This commit is contained in:
CHEVALLIER Abel
2025-11-13 16:23:22 +01:00
parent de9c515a47
commit cb235644dc
34924 changed files with 3811102 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
.title {
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
line-height: 24px;
display: block;
margin-bottom: 24px;
}

View File

@@ -0,0 +1,56 @@
<nz-list [nzDataSource]="data" [nzRenderItem]="item" [nzItemLayout]="'horizontal'">
<ng-template #item let-item>
<nz-list-item [nzActions]="[viewAction]">
<ng-template #viewAction>
<a (click)="open()">View Profile</a>
</ng-template>
<nz-list-item-meta
[nzTitle]="nzTitle"
nzAvatar="https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png"
nzDescription="Progresser AFX"
>
<ng-template #nzTitle>
<a href="https://ng.ant.design">{{ item.name }}</a>
</ng-template>
</nz-list-item-meta>
</nz-list-item>
</ng-template>
</nz-list>
<nz-drawer [nzVisible]="visible" [nzWidth]="640" [nzClosable]="false" (nzOnClose)="close()">
<ng-container *nzDrawerContent>
<p class="title">User Profile</p>
<nz-descriptions [nzColumn]="2" nzTitle="Personal">
<nz-descriptions-item nzTitle="Full Name" [nzSpan]="1">Lily</nz-descriptions-item>
<nz-descriptions-item nzTitle="Account" [nzSpan]="1">AntDesign&#64;example.com</nz-descriptions-item>
<nz-descriptions-item nzTitle="City" [nzSpan]="1">HangZhou</nz-descriptions-item>
<nz-descriptions-item nzTitle="Country" [nzSpan]="1">China🇨🇳</nz-descriptions-item>
<nz-descriptions-item nzTitle="Birthday" [nzSpan]="1">February 2,1900</nz-descriptions-item>
<nz-descriptions-item nzTitle="Website" [nzSpan]="1">-</nz-descriptions-item>
<nz-descriptions-item nzTitle="Message" [nzSpan]="2">
Make things as simple as possible but no simpler.
</nz-descriptions-item>
</nz-descriptions>
<nz-divider></nz-divider>
<nz-descriptions [nzColumn]="2" nzTitle="Company">
<nz-descriptions-item nzTitle="Position" [nzSpan]="1">Programmer</nz-descriptions-item>
<nz-descriptions-item nzTitle="Responsibilities" [nzSpan]="1">Coding</nz-descriptions-item>
<nz-descriptions-item nzTitle="Department" [nzSpan]="1">AFX</nz-descriptions-item>
<nz-descriptions-item nzTitle="Supervisor" [nzSpan]="1">Lin</nz-descriptions-item>
<nz-descriptions-item nzTitle="Skills" [nzSpan]="2">
C / C + +, data structures, software engineering, operating systems, computer networks, databases, compiler
theory, computer architecture, Microcomputer Principle and Interface Technology, Computer English, Java,
ASP, etc.
</nz-descriptions-item>
</nz-descriptions>
<nz-divider></nz-divider>
<nz-descriptions [nzColumn]="2" nzTitle="Contacts">
<nz-descriptions-item nzTitle="Email" [nzSpan]="1">AntDesign&#64;example.com</nz-descriptions-item>
<nz-descriptions-item nzTitle="Phone Number" [nzSpan]="1">+86 181 0000 0000</nz-descriptions-item>
<nz-descriptions-item nzTitle="Github" [nzSpan]="2">
<a href="https://github.com/NG-ZORRO/ng-zorro-antd" target="_blank">github.com/NG-ZORRO/ng-zorro-antd</a>
</nz-descriptions-item>
</nz-descriptions>
</ng-container>
</nz-drawer>

View File

@@ -0,0 +1,23 @@
import { fakeAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { <%= classify(name) %>Component } from './<%= dasherize(name) %>.component';
describe('<%= classify(name) %>Component', () => {
let component: <%= classify(name) %>Component;
let fixture: ComponentFixture<<%= classify(name) %>Component>;
beforeEach(fakeAsync(() => {
TestBed.configureTestingModule({
declarations: [ <%= classify(name) %>Component ]
})
.compileComponents();
;
fixture = TestBed.createComponent(<%= classify(name) %>Component);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should compile', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,97 @@
import { Component } from '@angular/core';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzDescriptionsModule } from 'ng-zorro-antd/descriptions';
import { NzDividerModule } from 'ng-zorro-antd/divider';
import { NzDrawerModule } from 'ng-zorro-antd/drawer';
import { NzListModule } from 'ng-zorro-antd/list';
@Component({
selector: '<%= selector %>',
imports: [NzButtonModule, NzDescriptionsModule, NzDividerModule, NzDrawerModule, NzListModule],
<% if(inlineTemplate) { %>template: `
<nz-list [nzDataSource]="data" [nzRenderItem]="item" [nzItemLayout]="'horizontal'">
<ng-template #item let-item>
<nz-list-item [nzActions]="[viewAction]">
<ng-template #viewAction>
<a (click)="open()">View Profile</a>
</ng-template>
<nz-list-item-meta
[nzTitle]="nzTitle"
nzAvatar="https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png"
nzDescription="Progresser AFX"
>
<ng-template #nzTitle>
<a href="https://ng.ant.design">{{ item.name }}</a>
</ng-template>
</nz-list-item-meta>
</nz-list-item>
</ng-template>
</nz-list>
<nz-drawer [nzVisible]="visible" [nzWidth]="640" [nzClosable]="false" (nzOnClose)="close()">
<ng-container *nzDrawerContent>
<p class="title">User Profile</p>
<nz-descriptions [nzColumn]="2" nzTitle="Personal">
<nz-descriptions-item nzTitle="Full Name" [nzSpan]="1">Lily</nz-descriptions-item>
<nz-descriptions-item nzTitle="Account" [nzSpan]="1">AntDesign&#64;example.com</nz-descriptions-item>
<nz-descriptions-item nzTitle="City" [nzSpan]="1">HangZhou</nz-descriptions-item>
<nz-descriptions-item nzTitle="Country" [nzSpan]="1">China🇨🇳</nz-descriptions-item>
<nz-descriptions-item nzTitle="Birthday" [nzSpan]="1">February 2,1900</nz-descriptions-item>
<nz-descriptions-item nzTitle="Website" [nzSpan]="1">-</nz-descriptions-item>
<nz-descriptions-item nzTitle="Message" [nzSpan]="2">
Make things as simple as possible but no simpler.
</nz-descriptions-item>
</nz-descriptions>
<nz-divider></nz-divider>
<nz-descriptions [nzColumn]="2" nzTitle="Company">
<nz-descriptions-item nzTitle="Position" [nzSpan]="1">Programmer</nz-descriptions-item>
<nz-descriptions-item nzTitle="Responsibilities" [nzSpan]="1">Coding</nz-descriptions-item>
<nz-descriptions-item nzTitle="Department" [nzSpan]="1">AFX</nz-descriptions-item>
<nz-descriptions-item nzTitle="Supervisor" [nzSpan]="1">Lin</nz-descriptions-item>
<nz-descriptions-item nzTitle="Skills" [nzSpan]="2">
C / C + +, data structures, software engineering, operating systems, computer networks, databases, compiler
theory, computer architecture, Microcomputer Principle and Interface Technology, Computer English, Java,
ASP, etc.
</nz-descriptions-item>
</nz-descriptions>
<nz-divider></nz-divider>
<nz-descriptions [nzColumn]="2" nzTitle="Contacts">
<nz-descriptions-item nzTitle="Email" [nzSpan]="1">AntDesign&#64;example.com</nz-descriptions-item>
<nz-descriptions-item nzTitle="Phone Number" [nzSpan]="1">+86 181 0000 0000</nz-descriptions-item>
<nz-descriptions-item nzTitle="Github" [nzSpan]="2">
<a href="https://github.com/NG-ZORRO/ng-zorro-antd" target="_blank">github.com/NG-ZORRO/ng-zorro-antd</a>
</nz-descriptions-item>
</nz-descriptions>
</ng-container>
</nz-drawer>
`<% } else { %>templateUrl: './<%= dasherize(name) %>.component.html'<% } %>,
<% if(inlineStyle) { %>styles: [`
.title {
font-size: 16px;
color: rgba(0, 0, 0, 0.85);
line-height: 24px;
display: block;
margin-bottom: 24px;
}
`]<% } else { %>styleUrls: ['./<%= dasherize(name) %>.component.<%= style %>']<% } %>
})
export class <%= classify(name) %>Component {
data = [
{
name: 'Lily'
},
{
name: 'Lily'
}
];
visible = false;
open(): void {
this.visible = true;
}
close(): void {
this.visible = false;
}
}

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const schematics_1 = require("@angular-devkit/schematics");
const build_component_1 = require("../../utils/build-component");
function default_1(options) {
return (0, schematics_1.chain)([
(0, build_component_1.buildComponent)(Object.assign({}, options), {
template: './__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template',
stylesheet: './__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template'
})
]);
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../schematics/demo/drawer-user-profile/index.ts"],"names":[],"mappings":";;AAQA,4BAUC;AAlBD,2DAGoC;AACpC,iEAA6D;AAI7D,mBAAwB,OAAe;IACrC,OAAO,IAAA,kBAAK,EAAC;QACX,IAAA,gCAAc,oBACP,OAAO,GACZ;YACE,QAAQ,EAAE,kFAAkF;YAC5F,UAAU,EAAE,uFAAuF;SACpG,CACF;KACF,CAAC,CAAC;AACL,CAAC"}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=schema.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../schematics/demo/drawer-user-profile/schema.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1 @@
{"$schema":"http://json-schema.org/schema","$id":"user-profile-drawer","title":"NG-ZORRO user-profile drawer","type":"object","properties":{"path":{"type":"string","format":"path","description":"The path to create the component.","visible":false},"project":{"type":"string","description":"The name of the project.","$default":{"$source":"projectName"}},"name":{"type":"string","description":"The name of the component.","$default":{"$source":"argv","index":0},"x-prompt":"What should be the name of the component?"},"inlineStyle":{"description":"When true, includes styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file.","type":"boolean","default":false,"alias":"s"},"inlineTemplate":{"description":"When true, includes template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file.","type":"boolean","default":false,"alias":"t"},"standalone":{"description":"Whether the generated component is standalone.","type":"boolean"},"prefix":{"type":"string","description":"The prefix to apply to the generated component selector.","alias":"p","oneOf":[{"maxLength":0},{"minLength":1,"format":"html-selector"}]},"styleext":{"description":"The file extension to use for style files.","type":"string","default":"css","x-deprecated":"Use \"style\" instead."},"style":{"description":"The file extension or preprocessor to use for style files.","type":"string","default":"css","enum":["css","scss","sass","less","styl"]},"spec":{"type":"boolean","description":"When true (the default), generates a \"spec.ts\" test file for the new component.","default":true,"x-deprecated":"Use \"skipTests\" instead."},"skipTests":{"type":"boolean","description":"When true, does not create \"spec.ts\" test files for the new component."},"flat":{"type":"boolean","description":"Flag to indicate if a dir is created.","default":false},"skipImport":{"type":"boolean","description":"When true, does not import this component into the owning NgModule."},"selector":{"type":"string","format":"html-selector","description":"The selector to use for the component."},"module":{"type":"string","description":"Allows specification of the declaring module.","alias":"m"},"export":{"type":"boolean","default":false,"description":"When true, the declaring NgModule exports this component."},"entryComponent":{"type":"boolean","default":false,"description":"When true, the new component is the entry component of the declaring NgModule."},"classnameWithModule":{"type":"boolean","description":"When true, Use module class name as additional prefix for the component classname.","default":false}},"required":["name"]}