@solar-angular/ui-zorro 19.0.0 → 19.0.2

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,11 +1,10 @@
1
- import { EventEmitter } from '@angular/core';
2
1
  import { Editor } from '../editor';
3
2
  import * as i0 from "@angular/core";
4
3
  export declare class SunEditorDrawer<T extends Record<string, any>> {
5
- editor: Editor<T>;
6
- width: string | number;
7
- primaryKey: string;
8
- visibleChange: EventEmitter<boolean>;
4
+ readonly editor: import("@angular/core").InputSignal<Editor<T>>;
5
+ readonly width: import("@angular/core").InputSignal<string | number>;
6
+ readonly primaryKey: import("@angular/core").InputSignal<string>;
7
+ readonly visibleChange: import("@angular/core").OutputEmitterRef<boolean>;
9
8
  static ɵfac: i0.ɵɵFactoryDeclaration<SunEditorDrawer<any>, 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
+ static ɵcmp: i0.ɵɵComponentDeclaration<SunEditorDrawer<any>, "sun-editor-drawer", never, { "editor": { "alias": "editor"; "required": true; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "primaryKey": { "alias": "primaryKey"; "required": false; "isSignal": true; }; }, { "visibleChange": "visibleChange"; }, never, ["*"], true, never>;
11
10
  }
package/crud/editor.d.ts CHANGED
@@ -6,7 +6,7 @@ export declare class Editor<T> {
6
6
  originalModel: T;
7
7
  model: T;
8
8
  loading: boolean;
9
- schema: import("@angular/core").Signal<import("@fluent-form/core").AbstractFormGroupSchema>;
9
+ schema: import("@angular/core").Signal<import("@fluent-form/ui-zorro").FormGroupSchema<import("@fluent-form/core").SingleSchemaKey>>;
10
10
  /** 是否在保存完之后固定抽屉 */
11
11
  pin: boolean;
12
12
  form?: FormGroup;
@@ -2,7 +2,7 @@ import { FormGroup } from '@angular/forms';
2
2
  export declare class Searcher<T> {
3
3
  form?: FormGroup;
4
4
  model: Partial<T>;
5
- schema: import("@angular/core").Signal<import("@fluent-form/core").AbstractFormGroupSchema>;
5
+ schema: import("@angular/core").Signal<import("@fluent-form/ui-zorro").FormGroupSchema<import("@fluent-form/core").SingleSchemaKey>>;
6
6
  pageSize: number;
7
7
  pageNo: number;
8
8
  reset(): void;
@@ -1,14 +1,13 @@
1
- import { EventEmitter } from '@angular/core';
2
1
  import { Fan } from '@solar-kit/planets/earth';
3
2
  import { NzTooltipTrigger } from 'ng-zorro-antd/tooltip';
4
3
  import * as i0 from "@angular/core";
5
4
  export declare class SunFanPopover {
6
- fan?: Fan | null;
7
- disabled?: boolean;
8
- trigger: NzTooltipTrigger;
9
- placement: string | string[];
10
- visibleChange: EventEmitter<boolean>;
11
- unbind: EventEmitter<any>;
5
+ readonly fan: import("@angular/core").InputSignal<Fan | null | undefined>;
6
+ readonly disabled: import("@angular/core").InputSignal<boolean | undefined>;
7
+ readonly trigger: import("@angular/core").InputSignal<NzTooltipTrigger>;
8
+ readonly placement: import("@angular/core").InputSignal<string | string[]>;
9
+ readonly visibleChange: import("@angular/core").OutputEmitterRef<boolean>;
10
+ readonly unbind: import("@angular/core").OutputEmitterRef<void>;
12
11
  static ɵfac: i0.ɵɵFactoryDeclaration<SunFanPopover, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<SunFanPopover, "sun-fan-popover", never, { "fan": { "alias": "fan"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "trigger": { "alias": "trigger"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; }, { "visibleChange": "visibleChange"; "unbind": "unbind"; }, never, ["*"], true, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<SunFanPopover, "sun-fan-popover", never, { "fan": { "alias": "fan"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; }, { "visibleChange": "visibleChange"; "unbind": "unbind"; }, never, ["*"], true, never>;
14
13
  }
@@ -1,7 +1,7 @@
1
- import { form } from '@fluent-form/core';
1
+ import { form } from '@fluent-form/ui-zorro';
2
2
  import { finalize, tap } from 'rxjs';
3
3
  import * as i0 from '@angular/core';
4
- import { EventEmitter, Output, Input, Component, inject } from '@angular/core';
4
+ import { input, output, ChangeDetectionStrategy, Component, 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';
@@ -77,14 +77,15 @@ class Editor {
77
77
 
78
78
  class SunEditorDrawer {
79
79
  constructor() {
80
- this.width = 600;
80
+ this.editor = input.required();
81
+ this.width = input(600);
81
82
  // TODO: 有些 model 不一定有 primaryKey,可能是两个 foreignKeys,所以要考虑将 operation 变为一个函数
82
83
  // 考虑直接做到 signal 版本里,这里就变成一个 computed fn
83
- this.primaryKey = 'id';
84
- this.visibleChange = new EventEmitter();
84
+ this.primaryKey = input('id');
85
+ this.visibleChange = output();
85
86
  }
86
87
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunEditorDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
87
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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,[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"] }] }); }
88
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.14", type: SunEditorDrawer, isStandalone: true, selector: "sun-editor-drawer", inputs: { editor: { classPropertyName: "editor", publicName: "editor", isSignal: true, isRequired: true, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, primaryKey: { classPropertyName: "primaryKey", publicName: "primaryKey", isSignal: true, isRequired: false, transformFunction: null } }, 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 <nz-icon\n nzType=\"pushpin\"\n [nzTheme]=\"editor().pin ? 'twotone' : 'outline'\"\n (click)=\"editor().togglePin()\"\n ></nz-icon>\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,[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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
88
89
  }
89
90
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunEditorDrawer, decorators: [{
90
91
  type: Component,
@@ -93,16 +94,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
93
94
  NzSpinModule,
94
95
  NzIconModule,
95
96
  NzTypographyModule
96
- ], 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"] }]
97
- }], propDecorators: { editor: [{
98
- type: Input
99
- }], width: [{
100
- type: Input
101
- }], primaryKey: [{
102
- type: Input
103
- }], visibleChange: [{
104
- type: Output
105
- }] } });
97
+ ], changeDetection: ChangeDetectionStrategy.OnPush, 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 <nz-icon\n nzType=\"pushpin\"\n [nzTheme]=\"editor().pin ? 'twotone' : 'outline'\"\n (click)=\"editor().togglePin()\"\n ></nz-icon>\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"] }]
98
+ }] });
106
99
 
107
100
  class Searcher {
108
101
  constructor() {
@@ -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 { 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 = 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 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 // TODO: 有些 model 不一定有 primaryKey,可能是两个 foreignKeys,所以要考虑将 operation 变为一个函数\n // 考虑直接做到 signal 版本里,这里就变成一个 computed fn\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 { form } from '@fluent-form/core';\n\nexport class Searcher<T> {\n form?: FormGroup;\n model: Partial<T> = {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n schema = form(() => { });\n\n pageSize = 10;\n pageNo = 1;\n\n reset() {\n this.pageNo = 1;\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 loading = false;\n\n protected searcher = new Searcher<T>();\n protected editor = new Editor<U>();\n\n /**\n * @deprecated 请使用 {@link Searcher.pageSize}\n */\n protected get pageSize() {\n return this.searcher.pageSize;\n }\n /**\n * @deprecated 请使用 {@link Searcher.pageSize}\n */\n protected set pageSize(value) {\n this.searcher.pageSize = value;\n }\n /**\n * @deprecated 请使用 {@link Searcher.pageNo}\n */\n protected get pageNo() {\n return this.searcher.pageNo;\n }\n /**\n * @deprecated 请使用 {@link Searcher.pageNo}\n */\n protected set pageNo(value) {\n this.searcher.pageNo = value;\n }\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,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EAAK;;AAG5C;;;AAGG;IACO,eAAe,GAAA;AACvB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,EAAK;;AAG1C;;;AAGG;AACO,IAAA,IAAI,CAAC,MAAS,EAAA;AACtB,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;AACxB,QAAA,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;;AAExB;AAED;;;;;AAKG;AACG,MAAgB,cAAgC,SAAQ,QAAiB,CAAA;AAE9E;;AClGD;;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 { form } from '@fluent-form/ui-zorro';\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 = 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 { ChangeDetectionStrategy, Component, 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 imports: [\n NzDrawerModule,\n NzSpinModule,\n NzIconModule,\n NzTypographyModule\n ],\n templateUrl: './editor-drawer.component.html',\n styleUrl: './editor-drawer.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SunEditorDrawer<T extends Record<string, any>> {\n readonly editor = input.required<Editor<T>>();\n readonly width = input<string | number>(600);\n // TODO: 有些 model 不一定有 primaryKey,可能是两个 foreignKeys,所以要考虑将 operation 变为一个函数\n // 考虑直接做到 signal 版本里,这里就变成一个 computed fn\n readonly primaryKey = input('id');\n\n readonly visibleChange = output<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 <nz-icon\n nzType=\"pushpin\"\n [nzTheme]=\"editor().pin ? 'twotone' : 'outline'\"\n (click)=\"editor().togglePin()\"\n ></nz-icon>\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 { form } from '@fluent-form/ui-zorro';\n\nexport class Searcher<T> {\n form?: FormGroup;\n model: Partial<T> = {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n schema = form(() => { });\n\n pageSize = 10;\n pageNo = 1;\n\n reset() {\n this.pageNo = 1;\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 loading = false;\n\n protected searcher = new Searcher<T>();\n protected editor = new Editor<U>();\n\n /**\n * @deprecated 请使用 {@link Searcher.pageSize}\n */\n protected get pageSize() {\n return this.searcher.pageSize;\n }\n /**\n * @deprecated 请使用 {@link Searcher.pageSize}\n */\n protected set pageSize(value) {\n this.searcher.pageSize = value;\n }\n /**\n * @deprecated 请使用 {@link Searcher.pageNo}\n */\n protected get pageNo() {\n return this.searcher.pageNo;\n }\n /**\n * @deprecated 请使用 {@link Searcher.pageNo}\n */\n protected set pageNo(value) {\n this.searcher.pageNo = value;\n }\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;;QAExB,IAAa,CAAA,aAAA,GAAM,EAAO;QAC1B,IAAK,CAAA,KAAA,GAAM,EAAO;QAClB,IAAO,CAAA,OAAA,GAAG,KAAK;;QAEf,IAAM,CAAA,MAAA,GAAG,IAAI,CAAC,MAAQ,GAAC,CAAC;;QAExB,IAAG,CAAA,GAAA,GAAG,KAAK;;AAGX,IAAA,IAAI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,QAAQ;;IAGtB,IAAI,OAAO,CAAC,KAAc,EAAA;;AAExB,QAAA,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,EAAE;YAC3B,IAAI,CAAC,KAAK,EAAE;AACV,gBAAA,IAAI,CAAC,KAAK,EAAE,CAAC;;;AAGjB,QAAA,IAAI,CAAC,QAAQ,GAAG,KAAK;;AAGvB;;AAEG;IACH,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;QACnB,OAAO,CAAC,UAAyB,KAAI;AACnC,YAAA,OAAO,UAAU,CAAC,IAAI,CACpB,QAAQ,CAAC,MAAM,IAA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gC,SAAQ,QAAiB,CAAA;AAE9E;;AClGD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Output, Input, Component } from '@angular/core';
2
+ import { input, output, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import * as i5 from 'ng-zorro-antd/avatar';
4
4
  import { NzAvatarModule } from 'ng-zorro-antd/avatar';
5
5
  import * as i6 from 'ng-zorro-antd/button';
@@ -17,13 +17,15 @@ import * as i8 from 'ng-zorro-antd/core/wave';
17
17
 
18
18
  class SunFanPopover {
19
19
  constructor() {
20
- this.trigger = 'click';
21
- this.placement = 'top';
22
- this.visibleChange = new EventEmitter();
23
- this.unbind = new EventEmitter();
20
+ this.fan = input();
21
+ this.disabled = input();
22
+ this.trigger = input('click');
23
+ this.placement = input('top');
24
+ this.visibleChange = output();
25
+ this.unbind = output();
24
26
  }
25
27
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunFanPopover, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
26
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SunFanPopover, isStandalone: true, selector: "sun-fan-popover", inputs: { fan: "fan", disabled: "disabled", trigger: "trigger", placement: "placement" }, outputs: { visibleChange: "visibleChange", unbind: "unbind" }, ngImport: i0, template: "<a\n nz-typography\n nz-popover\n [nzPopoverPlacement]=\"placement\"\n [nzPopoverTrigger]=\"trigger\"\n [nzDisabled]=\"disabled\"\n [nzPopoverContent]=\"fanTemplate\"\n (nzPopoverVisibleChange)=\"visibleChange.emit($event)\"\n>\n <ng-content>\n <span nz-icon nzType=\"wechat\"></span>\n </ng-content>\n</a>\n\n<ng-template #fanTemplate>\n <nz-space nzAlign=\"center\" nzDirection=\"vertical\" [nzSize]=\"6\">\n <nz-avatar\n *nzSpaceItem\n nzIcon=\"user\"\n [nzSize]=\"48\"\n [nzSrc]=\"fan?.avatar?.thumbnailUrl || fan?.avatarUrl\"\n [style.margin-top.px]=\"2\"\n />\n <div *nzSpaceItem>{{ fan?.fullName || fan?.nickName || '\u5FAE\u4FE1\u7528\u6237' }}</div>\n <button\n *nzSpaceItem\n nz-button\n nzSize=\"small\"\n nzDanger\n nzBlock\n nzType=\"primary\"\n (click)=\"unbind.emit()\"\n >\n \u89E3\u7ED1\n </button>\n </nz-space>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: NzPopoverModule }, { kind: "directive", type: i1.NzPopoverDirective, selector: "[nz-popover]", inputs: ["nzPopoverArrowPointAtCenter", "nzPopoverTitle", "nzPopoverContent", "nz-popover", "nzPopoverTrigger", "nzPopoverPlacement", "nzPopoverOrigin", "nzPopoverVisible", "nzPopoverMouseEnterDelay", "nzPopoverMouseLeaveDelay", "nzPopoverOverlayClassName", "nzPopoverOverlayStyle", "nzPopoverOverlayClickable", "nzPopoverBackdrop"], outputs: ["nzPopoverVisibleChange"], exportAs: ["nzPopover"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzTypographyModule }, { kind: "component", type: i3.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"] }, { kind: "ngmodule", type: NzSpaceModule }, { kind: "component", type: i4.NzSpaceComponent, selector: "nz-space, [nz-space]", inputs: ["nzDirection", "nzAlign", "nzSplit", "nzWrap", "nzSize"], exportAs: ["nzSpace"] }, { kind: "directive", type: i4.NzSpaceItemDirective, selector: "[nzSpaceItem]" }, { kind: "ngmodule", type: NzAvatarModule }, { kind: "component", type: i5.NzAvatarComponent, selector: "nz-avatar", inputs: ["nzShape", "nzSize", "nzGap", "nzText", "nzSrc", "nzSrcSet", "nzAlt", "nzIcon"], outputs: ["nzError"], exportAs: ["nzAvatar"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i6.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i7.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i8.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }] }); }
28
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.14", type: SunFanPopover, isStandalone: true, selector: "sun-fan-popover", inputs: { fan: { classPropertyName: "fan", publicName: "fan", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visibleChange: "visibleChange", unbind: "unbind" }, ngImport: i0, template: "<a\n nz-typography\n nz-popover\n [nzPopoverPlacement]=\"placement()\"\n [nzPopoverTrigger]=\"trigger()\"\n [nzDisabled]=\"disabled()\"\n [nzPopoverContent]=\"fanTemplate\"\n (nzPopoverVisibleChange)=\"visibleChange.emit($event)\">\n <ng-content>\n <nz-icon nzType=\"wechat\"></nz-icon>\n </ng-content>\n</a>\n\n<ng-template #fanTemplate>\n <nz-space nzAlign=\"center\" nzDirection=\"vertical\" [nzSize]=\"6\">\n <nz-avatar\n *nzSpaceItem\n nzIcon=\"user\"\n [nzSize]=\"48\"\n [nzSrc]=\"fan()?.avatar?.thumbnailUrl || fan()?.avatarUrl\"\n [style.margin-top.px]=\"2\" />\n <div *nzSpaceItem>{{ fan()?.fullName || fan()?.nickName || '\u5FAE\u4FE1\u7528\u6237' }}</div>\n <button *nzSpaceItem nz-button nzSize=\"small\" nzDanger nzBlock nzType=\"primary\" (click)=\"unbind.emit()\">\n \u89E3\u7ED1\n </button>\n </nz-space>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: NzPopoverModule }, { kind: "directive", type: i1.NzPopoverDirective, selector: "[nz-popover]", inputs: ["nzPopoverArrowPointAtCenter", "nzPopoverTitle", "nzPopoverContent", "nz-popover", "nzPopoverTrigger", "nzPopoverPlacement", "nzPopoverOrigin", "nzPopoverVisible", "nzPopoverMouseEnterDelay", "nzPopoverMouseLeaveDelay", "nzPopoverOverlayClassName", "nzPopoverOverlayStyle", "nzPopoverOverlayClickable", "nzPopoverBackdrop"], outputs: ["nzPopoverVisibleChange"], exportAs: ["nzPopover"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i2.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzTypographyModule }, { kind: "component", type: i3.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"] }, { kind: "ngmodule", type: NzSpaceModule }, { kind: "component", type: i4.NzSpaceComponent, selector: "nz-space, [nz-space]", inputs: ["nzDirection", "nzAlign", "nzSplit", "nzWrap", "nzSize"], exportAs: ["nzSpace"] }, { kind: "directive", type: i4.NzSpaceItemDirective, selector: "[nzSpaceItem]" }, { kind: "ngmodule", type: NzAvatarModule }, { kind: "component", type: i5.NzAvatarComponent, selector: "nz-avatar", inputs: ["nzShape", "nzSize", "nzGap", "nzText", "nzSrc", "nzSrcSet", "nzAlt", "nzIcon"], outputs: ["nzError"], exportAs: ["nzAvatar"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i6.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i7.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i8.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
27
29
  }
28
30
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunFanPopover, decorators: [{
29
31
  type: Component,
@@ -34,20 +36,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
34
36
  NzSpaceModule,
35
37
  NzAvatarModule,
36
38
  NzButtonModule
37
- ], template: "<a\n nz-typography\n nz-popover\n [nzPopoverPlacement]=\"placement\"\n [nzPopoverTrigger]=\"trigger\"\n [nzDisabled]=\"disabled\"\n [nzPopoverContent]=\"fanTemplate\"\n (nzPopoverVisibleChange)=\"visibleChange.emit($event)\"\n>\n <ng-content>\n <span nz-icon nzType=\"wechat\"></span>\n </ng-content>\n</a>\n\n<ng-template #fanTemplate>\n <nz-space nzAlign=\"center\" nzDirection=\"vertical\" [nzSize]=\"6\">\n <nz-avatar\n *nzSpaceItem\n nzIcon=\"user\"\n [nzSize]=\"48\"\n [nzSrc]=\"fan?.avatar?.thumbnailUrl || fan?.avatarUrl\"\n [style.margin-top.px]=\"2\"\n />\n <div *nzSpaceItem>{{ fan?.fullName || fan?.nickName || '\u5FAE\u4FE1\u7528\u6237' }}</div>\n <button\n *nzSpaceItem\n nz-button\n nzSize=\"small\"\n nzDanger\n nzBlock\n nzType=\"primary\"\n (click)=\"unbind.emit()\"\n >\n \u89E3\u7ED1\n </button>\n </nz-space>\n</ng-template>\n" }]
38
- }], propDecorators: { fan: [{
39
- type: Input
40
- }], disabled: [{
41
- type: Input
42
- }], trigger: [{
43
- type: Input
44
- }], placement: [{
45
- type: Input
46
- }], visibleChange: [{
47
- type: Output
48
- }], unbind: [{
49
- type: Output
50
- }] } });
39
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a\n nz-typography\n nz-popover\n [nzPopoverPlacement]=\"placement()\"\n [nzPopoverTrigger]=\"trigger()\"\n [nzDisabled]=\"disabled()\"\n [nzPopoverContent]=\"fanTemplate\"\n (nzPopoverVisibleChange)=\"visibleChange.emit($event)\">\n <ng-content>\n <nz-icon nzType=\"wechat\"></nz-icon>\n </ng-content>\n</a>\n\n<ng-template #fanTemplate>\n <nz-space nzAlign=\"center\" nzDirection=\"vertical\" [nzSize]=\"6\">\n <nz-avatar\n *nzSpaceItem\n nzIcon=\"user\"\n [nzSize]=\"48\"\n [nzSrc]=\"fan()?.avatar?.thumbnailUrl || fan()?.avatarUrl\"\n [style.margin-top.px]=\"2\" />\n <div *nzSpaceItem>{{ fan()?.fullName || fan()?.nickName || '\u5FAE\u4FE1\u7528\u6237' }}</div>\n <button *nzSpaceItem nz-button nzSize=\"small\" nzDanger nzBlock nzType=\"primary\" (click)=\"unbind.emit()\">\n \u89E3\u7ED1\n </button>\n </nz-space>\n</ng-template>\n" }]
40
+ }] });
51
41
 
52
42
  /**
53
43
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"solar-angular-ui-zorro-fan-popover.mjs","sources":["../../../packages/ui-zorro/fan-popover/fan-popover.component.ts","../../../packages/ui-zorro/fan-popover/fan-popover.component.html","../../../packages/ui-zorro/fan-popover/solar-angular-ui-zorro-fan-popover.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { Fan } from '@solar-kit/planets/earth';\nimport { NzAvatarModule } from 'ng-zorro-antd/avatar';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzPopoverModule } from 'ng-zorro-antd/popover';\nimport { NzSpaceModule } from 'ng-zorro-antd/space';\nimport { NzTooltipTrigger } from 'ng-zorro-antd/tooltip';\nimport { NzTypographyModule } from 'ng-zorro-antd/typography';\n\n@Component({\n selector: 'sun-fan-popover',\n imports: [\n NzPopoverModule,\n NzIconModule,\n NzTypographyModule,\n NzSpaceModule,\n NzAvatarModule,\n NzButtonModule\n ],\n templateUrl: './fan-popover.component.html'\n})\nexport class SunFanPopover {\n @Input() fan?: Fan | null;\n @Input() disabled?: boolean;\n @Input() trigger: NzTooltipTrigger = 'click';\n @Input() placement: string | string[] = 'top';\n\n @Output() visibleChange = new EventEmitter<boolean>();\n @Output() unbind = new EventEmitter();\n}\n","<a\n nz-typography\n nz-popover\n [nzPopoverPlacement]=\"placement\"\n [nzPopoverTrigger]=\"trigger\"\n [nzDisabled]=\"disabled\"\n [nzPopoverContent]=\"fanTemplate\"\n (nzPopoverVisibleChange)=\"visibleChange.emit($event)\"\n>\n <ng-content>\n <span nz-icon nzType=\"wechat\"></span>\n </ng-content>\n</a>\n\n<ng-template #fanTemplate>\n <nz-space nzAlign=\"center\" nzDirection=\"vertical\" [nzSize]=\"6\">\n <nz-avatar\n *nzSpaceItem\n nzIcon=\"user\"\n [nzSize]=\"48\"\n [nzSrc]=\"fan?.avatar?.thumbnailUrl || fan?.avatarUrl\"\n [style.margin-top.px]=\"2\"\n />\n <div *nzSpaceItem>{{ fan?.fullName || fan?.nickName || '微信用户' }}</div>\n <button\n *nzSpaceItem\n nz-button\n nzSize=\"small\"\n nzDanger\n nzBlock\n nzType=\"primary\"\n (click)=\"unbind.emit()\"\n >\n 解绑\n </button>\n </nz-space>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MAsBa,aAAa,CAAA;AAZ1B,IAAA,WAAA,GAAA;QAeW,IAAO,CAAA,OAAA,GAAqB,OAAO;QACnC,IAAS,CAAA,SAAA,GAAsB,KAAK;AAEnC,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAW;AAC3C,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAE;AACtC;+GARY,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,aAAa,ECtB1B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,GAAA,EAAA,KAAA,EAAA,QAAA,EAAA,UAAA,EAAA,OAAA,EAAA,SAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,OAAA,EAAA,EAAA,aAAA,EAAA,eAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,QAAA,E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Z,kBAAkB;wBAClB,aAAa;wBACb,cAAc;wBACd;AACD,qBAAA,EAAA,QAAA,EAAA,k7BAAA,EAAA;8BAIQ,GAAG,EAAA,CAAA;sBAAX;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,OAAO,EAAA,CAAA;sBAAf;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBAES,aAAa,EAAA,CAAA;sBAAtB;gBACS,MAAM,EAAA,CAAA;sBAAf;;;AE7BH;;AAEG;;;;"}
1
+ {"version":3,"file":"solar-angular-ui-zorro-fan-popover.mjs","sources":["../../../packages/ui-zorro/fan-popover/fan-popover.component.ts","../../../packages/ui-zorro/fan-popover/fan-popover.component.html","../../../packages/ui-zorro/fan-popover/solar-angular-ui-zorro-fan-popover.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\nimport { Fan } from '@solar-kit/planets/earth';\nimport { NzAvatarModule } from 'ng-zorro-antd/avatar';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzPopoverModule } from 'ng-zorro-antd/popover';\nimport { NzSpaceModule } from 'ng-zorro-antd/space';\nimport { NzTooltipTrigger } from 'ng-zorro-antd/tooltip';\nimport { NzTypographyModule } from 'ng-zorro-antd/typography';\n\n@Component({\n selector: 'sun-fan-popover',\n imports: [\n NzPopoverModule,\n NzIconModule,\n NzTypographyModule,\n NzSpaceModule,\n NzAvatarModule,\n NzButtonModule\n ],\n templateUrl: './fan-popover.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SunFanPopover {\n readonly fan = input<Fan | null>();\n readonly disabled = input<boolean>();\n readonly trigger = input<NzTooltipTrigger>('click');\n readonly placement = input<string | string[]>('top');\n\n readonly visibleChange = output<boolean>();\n readonly unbind = output();\n}\n","<a\n nz-typography\n nz-popover\n [nzPopoverPlacement]=\"placement()\"\n [nzPopoverTrigger]=\"trigger()\"\n [nzDisabled]=\"disabled()\"\n [nzPopoverContent]=\"fanTemplate\"\n (nzPopoverVisibleChange)=\"visibleChange.emit($event)\">\n <ng-content>\n <nz-icon nzType=\"wechat\"></nz-icon>\n </ng-content>\n</a>\n\n<ng-template #fanTemplate>\n <nz-space nzAlign=\"center\" nzDirection=\"vertical\" [nzSize]=\"6\">\n <nz-avatar\n *nzSpaceItem\n nzIcon=\"user\"\n [nzSize]=\"48\"\n [nzSrc]=\"fan()?.avatar?.thumbnailUrl || fan()?.avatarUrl\"\n [style.margin-top.px]=\"2\" />\n <div *nzSpaceItem>{{ fan()?.fullName || fan()?.nickName || '微信用户' }}</div>\n <button *nzSpaceItem nz-button nzSize=\"small\" nzDanger nzBlock nzType=\"primary\" (click)=\"unbind.emit()\">\n 解绑\n </button>\n </nz-space>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MAuBa,aAAa,CAAA;AAb1B,IAAA,WAAA,GAAA;QAcW,IAAG,CAAA,GAAA,GAAG,KAAK,EAAc;QACzB,IAAQ,CAAA,QAAA,GAAG,KAAK,EAAW;AAC3B,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAmB,OAAO,CAAC;AAC1C,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAoB,KAAK,CAAC;QAE3C,IAAa,CAAA,aAAA,GAAG,MAAM,EAAW;QACjC,IAAM,CAAA,MAAA,GAAG,MAAM,EAAE;AAC3B;+GARY,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,aAAa,ECvB1B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EA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AAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,SAAA,EAAA,UAAA,EAAA,WAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,SAAA,EAAA,QAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,2BAAA,EAAA,QAAA,EAAA,8IAAA,EAAA,MAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2EAAA,EAAA,MAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAKL,aAAa,EAAA,UAAA,EAAA,CAAA;kBAbzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAClB,OAAA,EAAA;wBACP,eAAe;wBACf,YAAY;wBACZ,kBAAkB;wBAClB,aAAa;wBACb,cAAc;wBACd;qBACD,EAEgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,g4BAAA,EAAA;;;AErBjD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
- import { button, textField, numberField, toggle, radioGroup, cascader, datePicker, dateRangePicker } from '@fluent-form/ui-zorro';
1
+ import { button, textField, numberField, toggle, radioGroup, cascader, datePicker, dateRangePicker, form } from '@fluent-form/ui-zorro';
2
2
  import { levels2tree, tree2list } from '@solar-kit/core';
3
- import { form, headless } from '@fluent-form/core';
3
+ import { headless } from '@fluent-form/core';
4
4
 
5
5
  function searchButton() {
6
6
  return button().icon('search').content('查询').type('primary');
@@ -101,12 +101,11 @@ function datetimeRangePicker(key, format = 'yyyy-MM-dd HH:mm') {
101
101
  * 实体表单
102
102
  *
103
103
  * 内置了一个 Headless ID 控件图示:`headless('id')`
104
- * @param schemas
105
104
  */
106
105
  function entityForm(composeFn) {
107
- return form(() => {
106
+ return form(it => {
108
107
  headless('id');
109
- composeFn();
108
+ composeFn(it);
110
109
  });
111
110
  }
112
111
 
@@ -1 +1 @@
1
- {"version":3,"file":"solar-angular-ui-zorro-fluent-form.mjs","sources":["../../../packages/ui-zorro/fluent-form/components.ts","../../../packages/ui-zorro/fluent-form/helper.ts","../../../packages/ui-zorro/fluent-form/controls.ts","../../../packages/ui-zorro/fluent-form/form.ts","../../../packages/ui-zorro/fluent-form/patchers.ts","../../../packages/ui-zorro/fluent-form/solar-angular-ui-zorro-fluent-form.ts"],"sourcesContent":["import { UnstableBuilder } from '@fluent-form/core';\nimport { button, ButtonComponentSchema } from '@fluent-form/ui-zorro';\nimport { KindOrKey } from './typing';\n\nexport function searchButton(): UnstableBuilder<ButtonComponentSchema, KindOrKey | 'icon' | 'content' | 'type'> {\n return button().icon('search').content('查询').type('primary');\n}\n\nexport function addButton(): UnstableBuilder<ButtonComponentSchema, KindOrKey | 'icon' | 'content' | 'type' | 'mode'> {\n return button().icon('plus').content('新增').type('primary').mode('button');\n}\n\nexport function saveButton(): UnstableBuilder<ButtonComponentSchema, KindOrKey | 'content' | 'type' | 'disabled'> {\n return button()\n .content('保存')\n .type('primary')\n .variants({ block: true })\n .disabled(({ control }) => control.invalid) as UnstableBuilder<ButtonComponentSchema, KindOrKey | 'content' | 'type' | 'disabled'>;\n}\n\nexport function submitButton(): UnstableBuilder<ButtonComponentSchema, KindOrKey | 'content' | 'type' | 'disabled'> {\n return button()\n .content('提交')\n .type('primary')\n .variants({ block: true })\n .disabled(({ control }) => control.invalid) as UnstableBuilder<ButtonComponentSchema, KindOrKey | 'content' | 'type' | 'disabled'>;\n}\n","\nexport function entityToOption<T extends { id: string | number, fullName: string }>(entity: T) {\n return { label: entity.fullName, value: entity.id, ...entity };\n}\n\nexport function entitiesToOptions<T extends { id: string | number, fullName: string }>(entities: T[]) {\n return entities.map(entity => entityToOption(entity));\n}\n","import { SchemaKey, SingleSchemaKey, UnstableBuilder } from '@fluent-form/core';\nimport { CascaderControlSchema, DatePickerControlSchema, DateRangePickerControlSchema, NumberFieldControlSchema, RadioGroupControlSchema, TextFieldControlSchema, ToggleControlSchema, cascader, datePicker, dateRangePicker, numberField, radioGroup, textField, toggle } from '@fluent-form/ui-zorro';\nimport { TreeNode, levels2tree, tree2list } from '@solar-kit/core';\nimport { Category, Channel } from '@solar-kit/planets/earth';\nimport { Gender } from '@solar-kit/planets/sun';\nimport { NzCascaderOption } from 'ng-zorro-antd/cascader';\nimport { entitiesToOptions } from './helper';\nimport { KindOrKey } from './typing';\n\nexport function cellphoneField(key = 'cellphone', length = 11): UnstableBuilder<TextFieldControlSchema, KindOrKey | 'type' | 'length'> {\n return textField(key).type('tel').length(length);\n}\n\nexport function integerField(key: SingleSchemaKey): UnstableBuilder<NumberFieldControlSchema, KindOrKey | 'precision'> {\n return numberField(key).precision(0);\n}\n\nexport function enabledToggle(key: SingleSchemaKey = 'enabled', defaultValue = true): UnstableBuilder<ToggleControlSchema, KindOrKey | 'placeholder' | 'defaultValue'> {\n return toggle(key).placeholder(['有效', '无效']).defaultValue(defaultValue);\n}\n\nexport function finishedToggle(key: SingleSchemaKey = 'finished', defaultValue = false): UnstableBuilder<ToggleControlSchema, KindOrKey | 'placeholder' | 'defaultValue'> {\n return toggle(key).placeholder(['已完成', '未完成']).defaultValue(defaultValue);\n}\n\nexport function genderRadioGroup(key = 'gender'): UnstableBuilder<RadioGroupControlSchema, KindOrKey | 'options'> {\n return radioGroup(key).options([\n { label: '女', value: Gender.Woman },\n { label: '男', value: Gender.Man }\n ]);\n}\n\nexport function categoryCascader(key: SingleSchemaKey, channels: Channel[], categories: Category[]): UnstableBuilder<CascaderControlSchema<SingleSchemaKey>, KindOrKey | 'options' | 'trigger' | 'mapper'> {\n return leafCascader(key).options(\n levels2tree(\n [\n entitiesToOptions(channels as { id: number, fullName: string, channel?: number }[]),\n entitiesToOptions(categories)\n ],\n { id: 'value', pid: 'channel' }\n )\n );\n}\n\n/**\n * 叶子节点级联选择器\n *\n * options 选项可以使用 `list2tree()` 或 `levels2tree()` 来构造\n *\n * @param key\n */\nexport function leafCascader(key: SingleSchemaKey): UnstableBuilder<CascaderControlSchema<SingleSchemaKey>, KindOrKey | 'trigger' | 'mapper'> {\n let list: TreeNode<NzCascaderOption>[];\n\n return cascader(key)\n .trigger('hover')\n .mapper({\n parser: (value: NzCascaderOption['value'] | null, schema) => {\n if (!value) return null;\n\n // 如果输入的是叶子节点,我们需要转为 [父节点, ..., 叶子节点]\n list ??= tree2list((schema as CascaderControlSchema).options as TreeNode<NzCascaderOption>[]);\n // 找到选中的叶子节点\n let node = list.find(node => node.value === value && (!node.children || node.children.length === 0));\n\n const levels = [];\n\n while (node) {\n levels.unshift(node.value);\n node = node.parent;\n }\n\n return levels;\n },\n formatter: value => {\n // 输出的是节点数组,我们只要叶子节点\n return value?.[value.length - 1];\n }\n })\n}\n\nexport function datetimePicker(key: string, format = 'yyyy-MM-dd HH:mm'): UnstableBuilder<DatePickerControlSchema, KindOrKey | 'time' | 'format'> {\n return datePicker(key)\n .time({ nzFormat: 'HH:mm' })\n .format(format);\n}\n\nexport function datetimeRangePicker(key: SchemaKey, format = 'yyyy-MM-dd HH:mm'): UnstableBuilder<DateRangePickerControlSchema, KindOrKey | 'time' | 'format'> {\n return dateRangePicker(key)\n .time({ nzFormat: 'HH:mm' })\n .format(format);\n}\n","import { form, headless } from '@fluent-form/core';\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n/**\n * 实体表单\n *\n * 内置了一个 Headless ID 控件图示:`headless('id')`\n * @param schemas\n */\nexport function entityForm(composeFn: () => NzSafeAny) {\n return form(() => {\n headless('id');\n composeFn();\n });\n}\n","import { SchemaPatcher } from '@fluent-form/core';\nimport { AbstractZorroControlSchema, Label } from '@fluent-form/ui-zorro';\n\nfunction parseLabel(label: string | Label): string {\n if (typeof label === 'string') {\n return label;\n }\n\n return label.content ?? '';\n}\n\nfunction autoPlaceholder(schema: AbstractZorroControlSchema, action: string) {\n const label = schema['label'];\n\n if (label && typeof label !== 'function') {\n (schema as any)['placeholder'] ??= action + parseLabel(label);\n }\n\n return schema;\n}\n\n/**\n * 为文本框字段自动添加 placeholder\n */\nexport function useAutoPlaceholderPatchers(): SchemaPatcher[] {\n return [\n {\n selector: ['text-field', 'number-field'],\n patch: schema => autoPlaceholder(schema, '请输入')\n },\n {\n selector: 'text-area',\n patch: schema => autoPlaceholder(schema, '请填写')\n },\n {\n selector: ['date-picker', 'time-picker', 'select', 'cascader', 'tree-select'],\n patch: schema => autoPlaceholder(schema, '请选择')\n }\n ];\n}\n\n/**\n * 1. 自动为非必填字段添加清除按钮\n * 2. 为选择器添加搜索功能\n */\nexport function useImprovedPickerPatchers(): SchemaPatcher[] {\n return [\n {\n selector: ['date-picker', 'date-range-picker', 'time-picker', 'select', 'cascader', 'tree-select'],\n patch: schema => {\n if (!schema['required']) {\n schema['clearable'] ??= true;\n }\n\n return schema;\n }\n },\n {\n selector: ['select', 'cascader', 'tree-select'],\n patch: schema => {\n schema['searchable'] ??= true;\n\n return schema;\n }\n }\n ];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;SAIgB,YAAY,GAAA;AAC1B,IAAA,OAAO,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;AAC9D;SAEgB,SAAS,GAAA;IACvB,OAAO,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;AAC3E;SAEgB,UAAU,GAAA;AACxB,IAAA,OAAO,MAAM;SACV,OAAO,CAAC,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A,OAAO,MAAM;AACf;AAEA;;AAEG;SACa,0BAA0B,GAAA;IACxC,OAAO;AACL,QAAA;AACE,YAAA,QAAQ,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;YACxC,KAAK,EAAE,MAAM,IAAI,eAAe,CAAC,MAAM,EAAE,KAAK;AAC/C,SAAA;AACD,QAAA;AACE,YAAA,QAAQ,EAAE,WAAW;YACrB,KAAK,EAAE,MAAM,IAAI,eAAe,CAAC,MAAM,EAAE,KAAK;AAC/C,SAAA;AACD,QAAA;YACE,QAAQ,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,CAAC;YAC7E,KAAK,EAAE,MAAM,IAAI,eAAe,CAAC,MAAM,EAAE,KAAK;AAC/C;KACF;AACH;AAEA;;;AAGG;SACa,yBAAyB,GAAA;IACvC,OAAO;AACL,QAAA;AACE,YAAA,QAAQ,EAAE,CAAC,aAAa,EAAE,mBAAmB,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,CAAC;YAClG,KAAK,EAAE,MAAM,IAAG;AACd,gBAAA,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE;AACvB,oBAAA,MAAM,CAAC,WAAW,CAAC,KAAK,IAAI;;AAG9B,gBAAA,OAAO,MAAM;;AAEhB,SAAA;AACD,QAAA;AACE,YAAA,QAAQ,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,aAAa,CAAC;YAC/C,KAAK,EAAE,MAAM,IAAG;AACd,gBAAA,MAAM,CAAC,YAAY,CAAC,KAAK,IAAI;AAE7B,gBAAA,OAAO,MAAM;;AAEhB;KACF;AACH;;AClEA;;AAEG;;;;"}
1
+ {"version":3,"file":"solar-angular-ui-zorro-fluent-form.mjs","sources":["../../../packages/ui-zorro/fluent-form/components.ts","../../../packages/ui-zorro/fluent-form/helper.ts","../../../packages/ui-zorro/fluent-form/controls.ts","../../../packages/ui-zorro/fluent-form/form.ts","../../../packages/ui-zorro/fluent-form/patchers.ts","../../../packages/ui-zorro/fluent-form/solar-angular-ui-zorro-fluent-form.ts"],"sourcesContent":["import { UnstableBuilder } from '@fluent-form/core';\nimport { button, ButtonComponentSchema } from '@fluent-form/ui-zorro';\nimport { KindOrKey } from './typing';\n\nexport function searchButton(): UnstableBuilder<ButtonComponentSchema, KindOrKey | 'icon' | 'content' | 'type'> {\n return button().icon('search').content('查询').type('primary');\n}\n\nexport function addButton(): UnstableBuilder<ButtonComponentSchema, KindOrKey | 'icon' | 'content' | 'type' | 'mode'> {\n return button().icon('plus').content('新增').type('primary').mode('button');\n}\n\nexport function saveButton(): UnstableBuilder<ButtonComponentSchema, KindOrKey | 'content' | 'type' | 'disabled'> {\n return button()\n .content('保存')\n .type('primary')\n .variants({ block: true })\n .disabled(({ control }) => control.invalid) as UnstableBuilder<ButtonComponentSchema, KindOrKey | 'content' | 'type' | 'disabled'>;\n}\n\nexport function submitButton(): UnstableBuilder<ButtonComponentSchema, KindOrKey | 'content' | 'type' | 'disabled'> {\n return button()\n .content('提交')\n .type('primary')\n .variants({ block: true })\n .disabled(({ control }) => control.invalid) as UnstableBuilder<ButtonComponentSchema, KindOrKey | 'content' | 'type' | 'disabled'>;\n}\n","\nexport function entityToOption<T extends { id: string | number, fullName: string }>(entity: T) {\n return { label: entity.fullName, value: entity.id, ...entity };\n}\n\nexport function entitiesToOptions<T extends { id: string | number, fullName: string }>(entities: T[]) {\n return entities.map(entity => entityToOption(entity));\n}\n","import { SchemaKey, SingleSchemaKey, UnstableBuilder } from '@fluent-form/core';\nimport { CascaderControlSchema, DatePickerControlSchema, DateRangePickerControlSchema, NumberFieldControlSchema, RadioGroupControlSchema, TextFieldControlSchema, ToggleControlSchema, cascader, datePicker, dateRangePicker, numberField, radioGroup, textField, toggle } from '@fluent-form/ui-zorro';\nimport { TreeNode, levels2tree, tree2list } from '@solar-kit/core';\nimport { Category, Channel } from '@solar-kit/planets/earth';\nimport { Gender } from '@solar-kit/planets/sun';\nimport { NzCascaderOption } from 'ng-zorro-antd/cascader';\nimport { entitiesToOptions } from './helper';\nimport { KindOrKey } from './typing';\n\nexport function cellphoneField(key = 'cellphone', length = 11): UnstableBuilder<TextFieldControlSchema, KindOrKey | 'type' | 'length'> {\n return textField(key).type('tel').length(length);\n}\n\nexport function integerField(key: SingleSchemaKey): UnstableBuilder<NumberFieldControlSchema, KindOrKey | 'precision'> {\n return numberField(key).precision(0);\n}\n\nexport function enabledToggle(key: SingleSchemaKey = 'enabled', defaultValue = true): UnstableBuilder<ToggleControlSchema, KindOrKey | 'placeholder' | 'defaultValue'> {\n return toggle(key).placeholder(['有效', '无效']).defaultValue(defaultValue);\n}\n\nexport function finishedToggle(key: SingleSchemaKey = 'finished', defaultValue = false): UnstableBuilder<ToggleControlSchema, KindOrKey | 'placeholder' | 'defaultValue'> {\n return toggle(key).placeholder(['已完成', '未完成']).defaultValue(defaultValue);\n}\n\nexport function genderRadioGroup(key = 'gender'): UnstableBuilder<RadioGroupControlSchema, KindOrKey | 'options'> {\n return radioGroup(key).options([\n { label: '女', value: Gender.Woman },\n { label: '男', value: Gender.Man }\n ]);\n}\n\nexport function categoryCascader(key: SingleSchemaKey, channels: Channel[], categories: Category[]): UnstableBuilder<CascaderControlSchema<SingleSchemaKey>, KindOrKey | 'options' | 'trigger' | 'mapper'> {\n return leafCascader(key).options(\n levels2tree(\n [\n entitiesToOptions(channels as { id: number, fullName: string, channel?: number }[]),\n entitiesToOptions(categories)\n ],\n { id: 'value', pid: 'channel' }\n )\n );\n}\n\n/**\n * 叶子节点级联选择器\n *\n * options 选项可以使用 `list2tree()` 或 `levels2tree()` 来构造\n *\n * @param key\n */\nexport function leafCascader(key: SingleSchemaKey): UnstableBuilder<CascaderControlSchema<SingleSchemaKey>, KindOrKey | 'trigger' | 'mapper'> {\n let list: TreeNode<NzCascaderOption>[];\n\n return cascader(key)\n .trigger('hover')\n .mapper({\n parser: (value: NzCascaderOption['value'] | null, schema) => {\n if (!value) return null;\n\n // 如果输入的是叶子节点,我们需要转为 [父节点, ..., 叶子节点]\n list ??= tree2list((schema as CascaderControlSchema).options as TreeNode<NzCascaderOption>[]);\n // 找到选中的叶子节点\n let node = list.find(node => node.value === value && (!node.children || node.children.length === 0));\n\n const levels = [];\n\n while (node) {\n levels.unshift(node.value);\n node = node.parent;\n }\n\n return levels;\n },\n formatter: value => {\n // 输出的是节点数组,我们只要叶子节点\n return value?.[value.length - 1];\n }\n })\n}\n\nexport function datetimePicker(key: string, format = 'yyyy-MM-dd HH:mm'): UnstableBuilder<DatePickerControlSchema, KindOrKey | 'time' | 'format'> {\n return datePicker(key)\n .time({ nzFormat: 'HH:mm' })\n .format(format);\n}\n\nexport function datetimeRangePicker(key: SchemaKey, format = 'yyyy-MM-dd HH:mm'): UnstableBuilder<DateRangePickerControlSchema, KindOrKey | 'time' | 'format'> {\n return dateRangePicker(key)\n .time({ nzFormat: 'HH:mm' })\n .format(format);\n}\n","import { Builder, headless, SingleSchemaKey } from '@fluent-form/core';\nimport { form, FormGroupSchema } from '@fluent-form/ui-zorro';\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n/**\n * 实体表单\n *\n * 内置了一个 Headless ID 控件图示:`headless('id')`\n */\nexport function entityForm(composeFn: (it: Builder<FormGroupSchema<SingleSchemaKey>>) => NzSafeAny) {\n return form(it => {\n headless('id');\n composeFn(it);\n });\n}\n","import { SchemaPatcher } from '@fluent-form/core';\nimport { AbstractZorroControlSchema, Label } from '@fluent-form/ui-zorro';\n\nfunction parseLabel(label: string | Label): string {\n if (typeof label === 'string') {\n return label;\n }\n\n return label.content ?? '';\n}\n\nfunction autoPlaceholder(schema: AbstractZorroControlSchema, action: string) {\n const label = schema['label'];\n\n if (label && typeof label !== 'function') {\n (schema as any)['placeholder'] ??= action + parseLabel(label);\n }\n\n return schema;\n}\n\n/**\n * 为文本框字段自动添加 placeholder\n */\nexport function useAutoPlaceholderPatchers(): SchemaPatcher[] {\n return [\n {\n selector: ['text-field', 'number-field'],\n patch: schema => autoPlaceholder(schema, '请输入')\n },\n {\n selector: 'text-area',\n patch: schema => autoPlaceholder(schema, '请填写')\n },\n {\n selector: ['date-picker', 'time-picker', 'select', 'cascader', 'tree-select'],\n patch: schema => autoPlaceholder(schema, '请选择')\n }\n ];\n}\n\n/**\n * 1. 自动为非必填字段添加清除按钮\n * 2. 为选择器添加搜索功能\n */\nexport function useImprovedPickerPatchers(): SchemaPatcher[] {\n return [\n {\n selector: ['date-picker', 'date-range-picker', 'time-picker', 'select', 'cascader', 'tree-select'],\n patch: schema => {\n if (!schema['required']) {\n schema['clearable'] ??= true;\n }\n\n return schema;\n }\n },\n {\n selector: ['select', 'cascader', 'tree-select'],\n patch: schema => {\n schema['searchable'] ??= true;\n\n return schema;\n }\n }\n ];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;SAIgB,YAAY,GAAA;AAC1B,IAAA,OAAO,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;AAC9D;SAEgB,SAAS,GAAA;IACvB,OAAO,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;AAC3E;SAEgB,UAAU,GAAA;AACxB,IAAA,OAAO,MAAM;SACV,OAAO,CAAC,IAAI;SACZ,IAAI,CAAC,SAAS;AACd,SAAA,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AACxB,SAAA,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAwF;AACtI;SAEgB,YAAY,GAAA;AAC1B,IAAA,OAAO,MAAM;SACV,OAAO,CAAC,IAAI;SACZ,IAAI,CAAC,SAAS;AACd,SAAA,QAAQ,CAAC,EAAE,KAAK,EAAE,IA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