@solar-angular/ui-zorro 18.0.5 → 18.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
1
2
|
import { Editor } from '../editor';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class SunEditorDrawer<T extends Record<string, any>> {
|
|
4
5
|
editor: Editor<T>;
|
|
5
6
|
width: string | number;
|
|
6
7
|
primaryKey: string;
|
|
8
|
+
visibleChange: EventEmitter<boolean>;
|
|
7
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<SunEditorDrawer<any>, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SunEditorDrawer<any>, "sun-editor-drawer", never, { "editor": { "alias": "editor"; "required": false; }; "width": { "alias": "width"; "required": false; }; "primaryKey": { "alias": "primaryKey"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SunEditorDrawer<any>, "sun-editor-drawer", never, { "editor": { "alias": "editor"; "required": false; }; "width": { "alias": "width"; "required": false; }; "primaryKey": { "alias": "primaryKey"; "required": false; }; }, { "visibleChange": "visibleChange"; }, never, ["*"], true, never>;
|
|
9
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
2
|
import { NzDrawerModule } from 'ng-zorro-antd/drawer';
|
|
3
3
|
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
4
4
|
import { NzSpinModule } from 'ng-zorro-antd/spin';
|
|
@@ -12,9 +12,10 @@ export class SunEditorDrawer {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
this.width = 600;
|
|
14
14
|
this.primaryKey = 'id';
|
|
15
|
+
this.visibleChange = new EventEmitter();
|
|
15
16
|
}
|
|
16
17
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SunEditorDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SunEditorDrawer, isStandalone: true, selector: "sun-editor-drawer", inputs: { editor: "editor", width: "width", primaryKey: "primaryKey" }, ngImport: i0, template: "<nz-drawer\n nzWrapClassName=\"sun-editor-drawer-wrapper\"\n [nzWidth]=\"width\"\n [nzClosable]=\"false\"\n [nzTitle]=\"editorTitle\"\n [nzFooter]=\"editorFooter\"\n [(nzVisible)]=\"editor.visible\"\n (nzOnClose)=\"editor.visible = false\">\n <nz-spin *nzDrawerContent [nzSpinning]=\"editor.loading\">\n <ng-content />\n </nz-spin>\n</nz-drawer>\n\n<ng-template #editorTitle>\n <div>{{ editor.model[primaryKey] ? '\u7F16\u8F91\u6761\u76EE' : '\u65B0\u589E\u6761\u76EE' }}</div>\n\n <span
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SunEditorDrawer, isStandalone: true, selector: "sun-editor-drawer", inputs: { editor: "editor", width: "width", primaryKey: "primaryKey" }, outputs: { visibleChange: "visibleChange" }, ngImport: i0, template: "<nz-drawer\n nzWrapClassName=\"sun-editor-drawer-wrapper\"\n [nzWidth]=\"width\"\n [nzClosable]=\"false\"\n [nzTitle]=\"editorTitle\"\n [nzFooter]=\"editorFooter\"\n [(nzVisible)]=\"editor.visible\"\n (nzVisibleChange)=\"visibleChange.emit($event)\"\n (nzOnClose)=\"editor.visible = false\"\n>\n <nz-spin *nzDrawerContent [nzSpinning]=\"editor.loading\">\n <ng-content />\n </nz-spin>\n</nz-drawer>\n\n<ng-template #editorTitle>\n <div>{{ editor.model[primaryKey] ? '\u7F16\u8F91\u6761\u76EE' : '\u65B0\u589E\u6761\u76EE' }}</div>\n\n <span\n nz-icon\n nzType=\"pushpin\"\n [nzTheme]=\"editor.pin ? 'twotone' : 'outline'\"\n (click)=\"editor.togglePin()\"\n ></span>\n</ng-template>\n\n<ng-template #editorFooter>\n <small nz-typography nzType=\"secondary\">\n \u6CE8\u610F\uFF1A\u6807\u7B7E\u4E0A\u5E26\u6709\n <span nz-typography nzType=\"danger\" style=\"font-family: SimSun, sans-serif\"\n >*</span\n >\n \u7B26\u53F7\u7684\u9879\u76EE\u4E3A\u5FC5\u586B\u9879\n </small>\n</ng-template>\n", styles: ["::ng-deep .sun-editor-drawer-wrapper .ant-drawer-title{display:flex;justify-content:space-between;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i1.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i1.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i2.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i3.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzTypographyModule }, { kind: "component", type: i4.NzTypographyComponent, selector: " nz-typography, [nz-typography], p[nz-paragraph], span[nz-text], h1[nz-title], h2[nz-title], h3[nz-title], h4[nz-title] ", inputs: ["nzCopyable", "nzEditable", "nzDisabled", "nzExpandable", "nzEllipsis", "nzCopyTooltips", "nzCopyIcons", "nzEditTooltip", "nzEditIcon", "nzContent", "nzEllipsisRows", "nzType", "nzCopyText", "nzSuffix"], outputs: ["nzContentChange", "nzCopy", "nzExpandChange", "nzOnEllipsis"], exportAs: ["nzTypography"] }] }); }
|
|
18
19
|
}
|
|
19
20
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SunEditorDrawer, decorators: [{
|
|
20
21
|
type: Component,
|
|
@@ -23,12 +24,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
23
24
|
NzSpinModule,
|
|
24
25
|
NzIconModule,
|
|
25
26
|
NzTypographyModule
|
|
26
|
-
], template: "<nz-drawer\n nzWrapClassName=\"sun-editor-drawer-wrapper\"\n [nzWidth]=\"width\"\n [nzClosable]=\"false\"\n [nzTitle]=\"editorTitle\"\n [nzFooter]=\"editorFooter\"\n [(nzVisible)]=\"editor.visible\"\n (nzOnClose)=\"editor.visible = false\">\n <nz-spin *nzDrawerContent [nzSpinning]=\"editor.loading\">\n <ng-content />\n </nz-spin>\n</nz-drawer>\n\n<ng-template #editorTitle>\n <div>{{ editor.model[primaryKey] ? '\u7F16\u8F91\u6761\u76EE' : '\u65B0\u589E\u6761\u76EE' }}</div>\n\n <span
|
|
27
|
+
], template: "<nz-drawer\n nzWrapClassName=\"sun-editor-drawer-wrapper\"\n [nzWidth]=\"width\"\n [nzClosable]=\"false\"\n [nzTitle]=\"editorTitle\"\n [nzFooter]=\"editorFooter\"\n [(nzVisible)]=\"editor.visible\"\n (nzVisibleChange)=\"visibleChange.emit($event)\"\n (nzOnClose)=\"editor.visible = false\"\n>\n <nz-spin *nzDrawerContent [nzSpinning]=\"editor.loading\">\n <ng-content />\n </nz-spin>\n</nz-drawer>\n\n<ng-template #editorTitle>\n <div>{{ editor.model[primaryKey] ? '\u7F16\u8F91\u6761\u76EE' : '\u65B0\u589E\u6761\u76EE' }}</div>\n\n <span\n nz-icon\n nzType=\"pushpin\"\n [nzTheme]=\"editor.pin ? 'twotone' : 'outline'\"\n (click)=\"editor.togglePin()\"\n ></span>\n</ng-template>\n\n<ng-template #editorFooter>\n <small nz-typography nzType=\"secondary\">\n \u6CE8\u610F\uFF1A\u6807\u7B7E\u4E0A\u5E26\u6709\n <span nz-typography nzType=\"danger\" style=\"font-family: SimSun, sans-serif\"\n >*</span\n >\n \u7B26\u53F7\u7684\u9879\u76EE\u4E3A\u5FC5\u586B\u9879\n </small>\n</ng-template>\n", styles: ["::ng-deep .sun-editor-drawer-wrapper .ant-drawer-title{display:flex;justify-content:space-between;align-items:center}\n"] }]
|
|
27
28
|
}], propDecorators: { editor: [{
|
|
28
29
|
type: Input
|
|
29
30
|
}], width: [{
|
|
30
31
|
type: Input
|
|
31
32
|
}], primaryKey: [{
|
|
32
33
|
type: Input
|
|
34
|
+
}], visibleChange: [{
|
|
35
|
+
type: Output
|
|
33
36
|
}] } });
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWRpdG9yLWRyYXdlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91aS16b3Jyby9jcnVkL2VkaXRvci1kcmF3ZXIvZWRpdG9yLWRyYXdlci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy91aS16b3Jyby9jcnVkL2VkaXRvci1kcmF3ZXIvZWRpdG9yLWRyYXdlci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQUU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ZT5cbiJdfQ==
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { form } from '@fluent-form/core';
|
|
2
2
|
import { finalize, tap } from 'rxjs';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Component, Input, inject } from '@angular/core';
|
|
4
|
+
import { EventEmitter, Component, Input, Output, inject } from '@angular/core';
|
|
5
5
|
import * as i1 from 'ng-zorro-antd/drawer';
|
|
6
6
|
import { NzDrawerModule } from 'ng-zorro-antd/drawer';
|
|
7
7
|
import * as i3 from 'ng-zorro-antd/icon';
|
|
@@ -79,9 +79,10 @@ class SunEditorDrawer {
|
|
|
79
79
|
constructor() {
|
|
80
80
|
this.width = 600;
|
|
81
81
|
this.primaryKey = 'id';
|
|
82
|
+
this.visibleChange = new EventEmitter();
|
|
82
83
|
}
|
|
83
84
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SunEditorDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
84
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SunEditorDrawer, isStandalone: true, selector: "sun-editor-drawer", inputs: { editor: "editor", width: "width", primaryKey: "primaryKey" }, ngImport: i0, template: "<nz-drawer\n nzWrapClassName=\"sun-editor-drawer-wrapper\"\n [nzWidth]=\"width\"\n [nzClosable]=\"false\"\n [nzTitle]=\"editorTitle\"\n [nzFooter]=\"editorFooter\"\n [(nzVisible)]=\"editor.visible\"\n (nzOnClose)=\"editor.visible = false\">\n <nz-spin *nzDrawerContent [nzSpinning]=\"editor.loading\">\n <ng-content />\n </nz-spin>\n</nz-drawer>\n\n<ng-template #editorTitle>\n <div>{{ editor.model[primaryKey] ? '\u7F16\u8F91\u6761\u76EE' : '\u65B0\u589E\u6761\u76EE' }}</div>\n\n <span
|
|
85
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SunEditorDrawer, isStandalone: true, selector: "sun-editor-drawer", inputs: { editor: "editor", width: "width", primaryKey: "primaryKey" }, outputs: { visibleChange: "visibleChange" }, ngImport: i0, template: "<nz-drawer\n nzWrapClassName=\"sun-editor-drawer-wrapper\"\n [nzWidth]=\"width\"\n [nzClosable]=\"false\"\n [nzTitle]=\"editorTitle\"\n [nzFooter]=\"editorFooter\"\n [(nzVisible)]=\"editor.visible\"\n (nzVisibleChange)=\"visibleChange.emit($event)\"\n (nzOnClose)=\"editor.visible = false\"\n>\n <nz-spin *nzDrawerContent [nzSpinning]=\"editor.loading\">\n <ng-content />\n </nz-spin>\n</nz-drawer>\n\n<ng-template #editorTitle>\n <div>{{ editor.model[primaryKey] ? '\u7F16\u8F91\u6761\u76EE' : '\u65B0\u589E\u6761\u76EE' }}</div>\n\n <span\n nz-icon\n nzType=\"pushpin\"\n [nzTheme]=\"editor.pin ? 'twotone' : 'outline'\"\n (click)=\"editor.togglePin()\"\n ></span>\n</ng-template>\n\n<ng-template #editorFooter>\n <small nz-typography nzType=\"secondary\">\n \u6CE8\u610F\uFF1A\u6807\u7B7E\u4E0A\u5E26\u6709\n <span nz-typography nzType=\"danger\" style=\"font-family: SimSun, sans-serif\"\n >*</span\n >\n \u7B26\u53F7\u7684\u9879\u76EE\u4E3A\u5FC5\u586B\u9879\n </small>\n</ng-template>\n", styles: ["::ng-deep .sun-editor-drawer-wrapper .ant-drawer-title{display:flex;justify-content:space-between;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: NzDrawerModule }, { kind: "component", type: i1.NzDrawerComponent, selector: "nz-drawer", inputs: ["nzContent", "nzCloseIcon", "nzClosable", "nzMaskClosable", "nzMask", "nzCloseOnNavigation", "nzNoAnimation", "nzKeyboard", "nzTitle", "nzExtra", "nzFooter", "nzPlacement", "nzSize", "nzMaskStyle", "nzBodyStyle", "nzWrapClassName", "nzWidth", "nzHeight", "nzZIndex", "nzOffsetX", "nzOffsetY", "nzVisible"], outputs: ["nzOnViewInit", "nzOnClose", "nzVisibleChange"], exportAs: ["nzDrawer"] }, { kind: "directive", type: i1.NzDrawerContentDirective, selector: "[nzDrawerContent]", exportAs: ["nzDrawerContent"] }, { kind: "ngmodule", type: NzSpinModule }, { kind: "component", type: i2.NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i3.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzTypographyModule }, { kind: "component", type: i4.NzTypographyComponent, selector: " nz-typography, [nz-typography], p[nz-paragraph], span[nz-text], h1[nz-title], h2[nz-title], h3[nz-title], h4[nz-title] ", inputs: ["nzCopyable", "nzEditable", "nzDisabled", "nzExpandable", "nzEllipsis", "nzCopyTooltips", "nzCopyIcons", "nzEditTooltip", "nzEditIcon", "nzContent", "nzEllipsisRows", "nzType", "nzCopyText", "nzSuffix"], outputs: ["nzContentChange", "nzCopy", "nzExpandChange", "nzOnEllipsis"], exportAs: ["nzTypography"] }] }); }
|
|
85
86
|
}
|
|
86
87
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SunEditorDrawer, decorators: [{
|
|
87
88
|
type: Component,
|
|
@@ -90,13 +91,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
90
91
|
NzSpinModule,
|
|
91
92
|
NzIconModule,
|
|
92
93
|
NzTypographyModule
|
|
93
|
-
], template: "<nz-drawer\n nzWrapClassName=\"sun-editor-drawer-wrapper\"\n [nzWidth]=\"width\"\n [nzClosable]=\"false\"\n [nzTitle]=\"editorTitle\"\n [nzFooter]=\"editorFooter\"\n [(nzVisible)]=\"editor.visible\"\n (nzOnClose)=\"editor.visible = false\">\n <nz-spin *nzDrawerContent [nzSpinning]=\"editor.loading\">\n <ng-content />\n </nz-spin>\n</nz-drawer>\n\n<ng-template #editorTitle>\n <div>{{ editor.model[primaryKey] ? '\u7F16\u8F91\u6761\u76EE' : '\u65B0\u589E\u6761\u76EE' }}</div>\n\n <span
|
|
94
|
+
], template: "<nz-drawer\n nzWrapClassName=\"sun-editor-drawer-wrapper\"\n [nzWidth]=\"width\"\n [nzClosable]=\"false\"\n [nzTitle]=\"editorTitle\"\n [nzFooter]=\"editorFooter\"\n [(nzVisible)]=\"editor.visible\"\n (nzVisibleChange)=\"visibleChange.emit($event)\"\n (nzOnClose)=\"editor.visible = false\"\n>\n <nz-spin *nzDrawerContent [nzSpinning]=\"editor.loading\">\n <ng-content />\n </nz-spin>\n</nz-drawer>\n\n<ng-template #editorTitle>\n <div>{{ editor.model[primaryKey] ? '\u7F16\u8F91\u6761\u76EE' : '\u65B0\u589E\u6761\u76EE' }}</div>\n\n <span\n nz-icon\n nzType=\"pushpin\"\n [nzTheme]=\"editor.pin ? 'twotone' : 'outline'\"\n (click)=\"editor.togglePin()\"\n ></span>\n</ng-template>\n\n<ng-template #editorFooter>\n <small nz-typography nzType=\"secondary\">\n \u6CE8\u610F\uFF1A\u6807\u7B7E\u4E0A\u5E26\u6709\n <span nz-typography nzType=\"danger\" style=\"font-family: SimSun, sans-serif\"\n >*</span\n >\n \u7B26\u53F7\u7684\u9879\u76EE\u4E3A\u5FC5\u586B\u9879\n </small>\n</ng-template>\n", styles: ["::ng-deep .sun-editor-drawer-wrapper .ant-drawer-title{display:flex;justify-content:space-between;align-items:center}\n"] }]
|
|
94
95
|
}], propDecorators: { editor: [{
|
|
95
96
|
type: Input
|
|
96
97
|
}], width: [{
|
|
97
98
|
type: Input
|
|
98
99
|
}], primaryKey: [{
|
|
99
100
|
type: Input
|
|
101
|
+
}], visibleChange: [{
|
|
102
|
+
type: Output
|
|
100
103
|
}] } });
|
|
101
104
|
|
|
102
105
|
class Searcher {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solar-angular-ui-zorro-crud.mjs","sources":["../../../packages/ui-zorro/crud/editor.ts","../../../packages/ui-zorro/crud/editor-drawer/editor-drawer.component.ts","../../../packages/ui-zorro/crud/editor-drawer/editor-drawer.component.html","../../../packages/ui-zorro/crud/searcher.ts","../../../packages/ui-zorro/crud/page.ts","../../../packages/ui-zorro/crud/solar-angular-ui-zorro-crud.ts"],"sourcesContent":["import { FormGroup } from '@angular/forms';\nimport { AbstractFormGroupSchema, form } from '@fluent-form/core';\nimport { Observable, finalize, tap } from 'rxjs';\n\nexport class Editor<T> {\n private _visible = false;\n /** 模型初始值 */\n originalModel: T = {} as T;\n model: T = {} as T;\n loading = false;\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n schema: AbstractFormGroupSchema = form(() => { });\n /** 是否在保存完之后固定抽屉 */\n pin = false;\n form?: FormGroup;\n\n get visible(): boolean {\n return this._visible;\n }\n\n set visible(value: boolean) {\n // 手动判断一下,因为双向绑定的原因,这里会被设置两次\n if (this._visible !== value) {\n if (!value) {\n this.reset(); // 关闭的时候自动重置\n }\n }\n this._visible = value;\n }\n\n /**\n * 自动控制 loading 状态\n */\n withLoading<X>() {\n this.loading = true;\n return (observable: Observable<X>) => {\n return observable.pipe(\n finalize(() => this.loading = false)\n );\n };\n }\n\n /**\n * next 时自动重置表单 或 收起编辑器\n */\n withAttach<X>() {\n return (observable: Observable<X>) => observable.pipe(\n tap(() => this.pin ? this.reset() : this.dismiss())\n );\n }\n\n /**\n * 呈现编辑器\n */\n present() {\n this.visible = true;\n }\n\n /**\n * 关闭编辑器\n */\n dismiss() {\n this.visible = false;\n }\n\n togglePin() {\n this.pin = !this.pin;\n }\n\n reset() {\n this.fill({} as T);\n }\n\n fill(model: T) {\n this.originalModel = model;\n this.model = model;\n }\n}\n","import { Component, Input } from '@angular/core';\nimport { NzDrawerModule } from 'ng-zorro-antd/drawer';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzSpinModule } from 'ng-zorro-antd/spin';\nimport { NzTypographyModule } from 'ng-zorro-antd/typography';\nimport { Editor } from '../editor';\n\n@Component({\n selector: 'sun-editor-drawer',\n standalone: true,\n imports: [\n NzDrawerModule,\n NzSpinModule,\n NzIconModule,\n NzTypographyModule\n ],\n templateUrl: './editor-drawer.component.html',\n styleUrl: './editor-drawer.component.scss'\n})\nexport class SunEditorDrawer<T extends Record<string, any>> {\n @Input() editor!: Editor<T>;\n @Input() width: string | number = 600;\n @Input() primaryKey = 'id';\n}\n","<nz-drawer\n nzWrapClassName=\"sun-editor-drawer-wrapper\"\n [nzWidth]=\"width\"\n [nzClosable]=\"false\"\n [nzTitle]=\"editorTitle\"\n [nzFooter]=\"editorFooter\"\n [(nzVisible)]=\"editor.visible\"\n (nzOnClose)=\"editor.visible = false\">\n <nz-spin *nzDrawerContent [nzSpinning]=\"editor.loading\">\n <ng-content />\n </nz-spin>\n</nz-drawer>\n\n<ng-template #editorTitle>\n <div>{{ editor.model[primaryKey] ? '编辑条目' : '新增条目' }}</div>\n\n <span nz-icon nzType=\"pushpin\" [nzTheme]=\"editor.pin ? 'twotone' : 'outline'\" (click)=\"editor.togglePin()\"></span>\n</ng-template>\n\n<ng-template #editorFooter>\n <small nz-typography nzType=\"secondary\">\n 注意:标签上带有\n <span nz-typography nzType=\"danger\" style=\"font-family: SimSun, sans-serif\">*</span>\n 符号的项目为必填项\n </small>\n</ng-template>\n","import { FormGroup } from '@angular/forms';\nimport { AbstractFormGroupSchema } from '@fluent-form/core';\n\nexport class Searcher<T> {\n form?: FormGroup;\n model: Partial<T> = {};\n\n schema!: AbstractFormGroupSchema;\n\n reset() {\n this.form?.reset({});\n }\n}\n","import { inject } from '@angular/core';\nimport { MessageService } from '@solar-angular/ui-zorro/message';\nimport { finalize, Observable } from 'rxjs';\nimport { Editor } from './editor';\nimport { Searcher } from './searcher';\n\n/**\n * 增删改查页面\n * @template T Searcher 的模型类型\n * @template U Editor 的模型类型,默认为 T\n * @template V Data 的模型类型,默认为 U\n */\nexport abstract class CrudPage<T, U = T, V = U> {\n protected data: V[] = [];\n\n protected pageSize = 10;\n protected pageNo = 1;\n\n protected loading = false;\n\n protected searcher = new Searcher<T>();\n protected editor = new Editor<U>();\n\n readonly message = inject(MessageService);\n\n protected withTableLoading<X>() {\n return (observable: Observable<X>) => {\n this.loading = true;\n return observable.pipe(\n finalize(() => this.loading = false)\n );\n };\n }\n\n /**\n * {@link MessageService.withLoading()} 的快捷方式\n * @param content\n */\n protected withLoading<X>(content?: string) {\n return this.message.withLoading<X>(content);\n }\n\n /**\n * {@link MessageService.withDeleteLoading()} 的快捷方式\n * @param content\n */\n protected withDeleteLoading<X>() {\n return this.message.withDeleteLoading<X>();\n }\n\n /**\n * {@link MessageService.withSaveLoading()} 的快捷方式\n * @param content\n */\n protected withSaveLoading<X>() {\n return this.message.withSaveLoading<X>();\n }\n\n /**\n * 编辑\n * @param entity\n */\n protected edit(entity: U) {\n this.editor.fill(entity);\n this.editor.present();\n }\n}\n\n/**\n * 带分页的增删改查页面\n * @template T Searcher 的模型类型\n * @template U Editor 的模型类型,默认为 T\n * @template V Data 的模型类型,默认为 U\n */\nexport abstract class PagingCrudPage<T, U = T, V = U> extends CrudPage<T, U, V> {\n protected totalSize!: number;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAIa,MAAM,CAAA;AAAnB,IAAA,WAAA,GAAA;QACU,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAEzB,IAAa,CAAA,aAAA,GAAM,EAAO,CAAC;QAC3B,IAAK,CAAA,KAAA,GAAM,EAAO,CAAC;QACnB,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;;QAEhB,IAAM,CAAA,MAAA,GAA4B,IAAI,CAAC,MAAQ,GAAC,CAAC,CAAC;;QAElD,IAAG,CAAA,GAAA,GAAG,KAAK,CAAC;KAgEb;AA7DC,IAAA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,MAAM,GAAG,IAAI,MAAM,EAAK,CAAC;AAE1B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;KA2C3C;IAzCW,gBAAgB,GAAA;QACxB,OAAO,CAAC,UAAyB,KAAI;AACnC,YAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACpB,YAAA,OAAO,UAAU,CAAC,IAAI,CACpB,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,CACrC,CAAC;AACJ,SAAC,CAAC;KACH;AAED;;;AAGG;AACO,IAAA,WAAW,CAAI,OAAgB,EAAA;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAI,OAAO,CAAC,CAAC;KAC7C;AAED;;;AAGG;IACO,iBAAiB,GAAA;AACzB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAK,CAAC;KAC5C;AAED;;;AAGG;IACO,eAAe,GAAA;AACvB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,EAAK,CAAC;KAC1C;AAED;;;AAGG;AACO,IAAA,IAAI,CAAC,MAAS,EAAA;AACtB,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACzB,QAAA,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;KACvB;AACF,CAAA;AAED;;;;;AAKG;AACG,MAAgB,cAAgC,SAAQ,QAAiB,CAAA;AAE9E;;AC5ED;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"solar-angular-ui-zorro-crud.mjs","sources":["../../../packages/ui-zorro/crud/editor.ts","../../../packages/ui-zorro/crud/editor-drawer/editor-drawer.component.ts","../../../packages/ui-zorro/crud/editor-drawer/editor-drawer.component.html","../../../packages/ui-zorro/crud/searcher.ts","../../../packages/ui-zorro/crud/page.ts","../../../packages/ui-zorro/crud/solar-angular-ui-zorro-crud.ts"],"sourcesContent":["import { FormGroup } from '@angular/forms';\nimport { AbstractFormGroupSchema, form } from '@fluent-form/core';\nimport { Observable, finalize, tap } from 'rxjs';\n\nexport class Editor<T> {\n private _visible = false;\n /** 模型初始值 */\n originalModel: T = {} as T;\n model: T = {} as T;\n loading = false;\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n schema: AbstractFormGroupSchema = form(() => { });\n /** 是否在保存完之后固定抽屉 */\n pin = false;\n form?: FormGroup;\n\n get visible(): boolean {\n return this._visible;\n }\n\n set visible(value: boolean) {\n // 手动判断一下,因为双向绑定的原因,这里会被设置两次\n if (this._visible !== value) {\n if (!value) {\n this.reset(); // 关闭的时候自动重置\n }\n }\n this._visible = value;\n }\n\n /**\n * 自动控制 loading 状态\n */\n withLoading<X>() {\n this.loading = true;\n return (observable: Observable<X>) => {\n return observable.pipe(\n finalize(() => this.loading = false)\n );\n };\n }\n\n /**\n * next 时自动重置表单 或 收起编辑器\n */\n withAttach<X>() {\n return (observable: Observable<X>) => observable.pipe(\n tap(() => this.pin ? this.reset() : this.dismiss())\n );\n }\n\n /**\n * 呈现编辑器\n */\n present() {\n this.visible = true;\n }\n\n /**\n * 关闭编辑器\n */\n dismiss() {\n this.visible = false;\n }\n\n togglePin() {\n this.pin = !this.pin;\n }\n\n reset() {\n this.fill({} as T);\n }\n\n fill(model: T) {\n this.originalModel = model;\n this.model = model;\n }\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { NzDrawerModule } from 'ng-zorro-antd/drawer';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzSpinModule } from 'ng-zorro-antd/spin';\nimport { NzTypographyModule } from 'ng-zorro-antd/typography';\nimport { Editor } from '../editor';\n\n@Component({\n selector: 'sun-editor-drawer',\n standalone: true,\n imports: [\n NzDrawerModule,\n NzSpinModule,\n NzIconModule,\n NzTypographyModule\n ],\n templateUrl: './editor-drawer.component.html',\n styleUrl: './editor-drawer.component.scss'\n})\nexport class SunEditorDrawer<T extends Record<string, any>> {\n @Input() editor!: Editor<T>;\n @Input() width: string | number = 600;\n @Input() primaryKey = 'id';\n\n @Output() visibleChange = new EventEmitter<boolean>();\n}\n","<nz-drawer\n nzWrapClassName=\"sun-editor-drawer-wrapper\"\n [nzWidth]=\"width\"\n [nzClosable]=\"false\"\n [nzTitle]=\"editorTitle\"\n [nzFooter]=\"editorFooter\"\n [(nzVisible)]=\"editor.visible\"\n (nzVisibleChange)=\"visibleChange.emit($event)\"\n (nzOnClose)=\"editor.visible = false\"\n>\n <nz-spin *nzDrawerContent [nzSpinning]=\"editor.loading\">\n <ng-content />\n </nz-spin>\n</nz-drawer>\n\n<ng-template #editorTitle>\n <div>{{ editor.model[primaryKey] ? '编辑条目' : '新增条目' }}</div>\n\n <span\n nz-icon\n nzType=\"pushpin\"\n [nzTheme]=\"editor.pin ? 'twotone' : 'outline'\"\n (click)=\"editor.togglePin()\"\n ></span>\n</ng-template>\n\n<ng-template #editorFooter>\n <small nz-typography nzType=\"secondary\">\n 注意:标签上带有\n <span nz-typography nzType=\"danger\" style=\"font-family: SimSun, sans-serif\"\n >*</span\n >\n 符号的项目为必填项\n </small>\n</ng-template>\n","import { FormGroup } from '@angular/forms';\nimport { AbstractFormGroupSchema } from '@fluent-form/core';\n\nexport class Searcher<T> {\n form?: FormGroup;\n model: Partial<T> = {};\n\n schema!: AbstractFormGroupSchema;\n\n reset() {\n this.form?.reset({});\n }\n}\n","import { inject } from '@angular/core';\nimport { MessageService } from '@solar-angular/ui-zorro/message';\nimport { finalize, Observable } from 'rxjs';\nimport { Editor } from './editor';\nimport { Searcher } from './searcher';\n\n/**\n * 增删改查页面\n * @template T Searcher 的模型类型\n * @template U Editor 的模型类型,默认为 T\n * @template V Data 的模型类型,默认为 U\n */\nexport abstract class CrudPage<T, U = T, V = U> {\n protected data: V[] = [];\n\n protected pageSize = 10;\n protected pageNo = 1;\n\n protected loading = false;\n\n protected searcher = new Searcher<T>();\n protected editor = new Editor<U>();\n\n readonly message = inject(MessageService);\n\n protected withTableLoading<X>() {\n return (observable: Observable<X>) => {\n this.loading = true;\n return observable.pipe(\n finalize(() => this.loading = false)\n );\n };\n }\n\n /**\n * {@link MessageService.withLoading()} 的快捷方式\n * @param content\n */\n protected withLoading<X>(content?: string) {\n return this.message.withLoading<X>(content);\n }\n\n /**\n * {@link MessageService.withDeleteLoading()} 的快捷方式\n * @param content\n */\n protected withDeleteLoading<X>() {\n return this.message.withDeleteLoading<X>();\n }\n\n /**\n * {@link MessageService.withSaveLoading()} 的快捷方式\n * @param content\n */\n protected withSaveLoading<X>() {\n return this.message.withSaveLoading<X>();\n }\n\n /**\n * 编辑\n * @param entity\n */\n protected edit(entity: U) {\n this.editor.fill(entity);\n this.editor.present();\n }\n}\n\n/**\n * 带分页的增删改查页面\n * @template T Searcher 的模型类型\n * @template U Editor 的模型类型,默认为 T\n * @template V Data 的模型类型,默认为 U\n */\nexport abstract class PagingCrudPage<T, U = T, V = U> extends CrudPage<T, U, V> {\n protected totalSize!: number;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAIa,MAAM,CAAA;AAAnB,IAAA,WAAA,GAAA;QACU,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;QAEzB,IAAa,CAAA,aAAA,GAAM,EAAO,CAAC;QAC3B,IAAK,CAAA,KAAA,GAAM,EAAO,CAAC;QACnB,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;;QAEhB,IAAM,CAAA,MAAA,GAA4B,IAAI,CAAC,MAAQ,GAAC,CAAC,CAAC;;QAElD,IAAG,CAAA,GAAA,GAAG,KAAK,CAAC;KAgEb;AA7DC,IAAA,IAAI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;KACtB;IAED,IAAI,OAAO,CAAC,KAAc,EAAA;;AAExB,QAAA,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,EAAE;YAC3B,IAAI,CAAC,KAAK,EAAE;AACV,gBAAA,IAAI,CAAC,KAAK,E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GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;KA2C3C;IAzCW,gBAAgB,GAAA;QACxB,OAAO,CAAC,UAAyB,KAAI;AACnC,YAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AACpB,YAAA,OAAO,UAAU,CAAC,IAAI,CACpB,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,CACrC,CAAC;AACJ,SAAC,CAAC;KACH;AAED;;;AAGG;AACO,IAAA,WAAW,CAAI,OAAgB,EAAA;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAI,OAAO,CAAC,CAAC;KAC7C;AAED;;;AAGG;IACO,iBAAiB,GAAA;AACzB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAK,CAAC;KAC5C;AAED;;;AAGG;IACO,eAAe,GAAA;AACvB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,EAAK,CAAC;KAC1C;AAED;;;AAGG;AACO,IAAA,IAAI,CAAC,MAAS,EAAA;AACtB,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACzB,QAAA,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;KACvB;AACF,CAAA;AAED;;;;;AAKG;AACG,MAAgB,cAAgC,SAAQ,QAAiB,CAAA;AAE9E;;AC5ED;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solar-angular/ui-zorro",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.7",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@solar-angular/core": "18.0.
|
|
10
|
-
"@solar-angular/planets": "18.0.
|
|
11
|
-
"@solar-angular/platform-browser": "18.0.
|
|
9
|
+
"@solar-angular/core": "18.0.7",
|
|
10
|
+
"@solar-angular/planets": "18.0.7",
|
|
11
|
+
"@solar-angular/platform-browser": "18.0.7",
|
|
12
12
|
"tslib": "^2.3.0"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|