@solar-angular/ui-zorro 19.1.0 → 19.1.1

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.
@@ -74,10 +74,10 @@ class SunEditorDrawer {
74
74
  this.primaryKey = input('id');
75
75
  this.visibleChange = output();
76
76
  }
77
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunEditorDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
78
- 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); $event || editor().reset()\"\n (nzOnClose)=\"editor().dismiss()\">\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 nzType=\"pushpin\" [nzTheme]=\"editor().pin() ? 'twotone' : 'outline'\" (click)=\"editor().togglePin()\"></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\">*</span>\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 }); }
77
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SunEditorDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
78
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", 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); $event || editor().reset()\"\n (nzOnClose)=\"editor().dismiss()\">\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 nzType=\"pushpin\" [nzTheme]=\"editor().pin() ? 'twotone' : 'outline'\" (click)=\"editor().togglePin()\"></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\">*</span>\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 }); }
79
79
  }
80
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunEditorDrawer, decorators: [{
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SunEditorDrawer, decorators: [{
81
81
  type: Component,
82
82
  args: [{ selector: 'sun-editor-drawer', imports: [
83
83
  NzDrawerModule,
@@ -24,10 +24,10 @@ class SunFanPopover {
24
24
  this.visibleChange = output();
25
25
  this.unbind = output();
26
26
  }
27
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunFanPopover, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
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
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SunFanPopover, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
28
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", 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 }); }
29
29
  }
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunFanPopover, decorators: [{
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SunFanPopover, decorators: [{
31
31
  type: Component,
32
32
  args: [{ selector: 'sun-fan-popover', imports: [
33
33
  NzPopoverModule,
@@ -184,7 +184,7 @@ function useImprovedPickerPatchers() {
184
184
  }
185
185
  ];
186
186
  }
187
- function useControlValidationTipsPatchers() {
187
+ function useValidationTipsPatchers() {
188
188
  return {
189
189
  selector: SchemaType.Control,
190
190
  patch: schema => {
@@ -209,5 +209,5 @@ function useControlValidationTipsPatchers() {
209
209
  * Generated bundle index. Do not edit.
210
210
  */
211
211
 
212
- export { addButton, categoryCascader, cellphoneField, datetimePicker, datetimeRangePicker, enabledToggle, entitiesToOptions, entityForm, entityToOption, finishedToggle, genderRadioGroup, integerField, leafCascader, saveButton, searchButton, submitButton, useAutoPlaceholderPatchers, useControlValidationTipsPatchers, useImprovedPickerPatchers };
212
+ export { addButton, categoryCascader, cellphoneField, datetimePicker, datetimeRangePicker, enabledToggle, entitiesToOptions, entityForm, entityToOption, finishedToggle, genderRadioGroup, integerField, leafCascader, saveButton, searchButton, submitButton, useAutoPlaceholderPatchers, useImprovedPickerPatchers, useValidationTipsPatchers };
213
213
  //# sourceMappingURL=solar-angular-ui-zorro-fluent-form.mjs.map
@@ -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 { FormArray, FormGroup } from '@angular/forms';\nimport { 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 submitButton(): UnstableBuilder<ButtonComponentSchema, KindOrKey | 'content' | 'type' | 'variants' | 'listeners'> {\n return button()\n .content('提交')\n .type('primary')\n .variants({ block: true })\n .listeners({\n click: (event, context) => {\n const rootForm = context.control as FormGroup\n updateValidityEach(rootForm)\n if (rootForm.invalid) {\n event.preventDefault()\n }\n }\n })\n}\n\n/**\n * Alias of {@link submitButton}\n */\nexport const saveButton = submitButton;\n\nfunction updateValidityEach(form: FormGroup | FormArray): void {\n for (const control of Object.values(form.controls)) {\n if (control instanceof FormGroup || control instanceof FormArray) {\n updateValidityEach(control);\n } else {\n if (control.invalid) {\n control.markAsDirty();\n control.updateValueAndValidity({ onlySelf: true });\n }\n }\n }\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, SchemaType } 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\nexport function useControlValidationTipsPatchers(): SchemaPatcher {\n return {\n selector: SchemaType.Control,\n patch: schema => {\n schema['tips'] ??= {}\n schema['tips'].auto = {\n default: {\n min: '输入数值过小',\n max: '输入数值过大',\n minlength: '输入内容过短',\n maxlength: '输入内容过长',\n email: '请输入正确的邮箱地址',\n pattern: '输入内容格式不正确',\n required: '请填写' + (schema['label'] ? parseLabel(schema['label']) : '')\n }\n }\n return schema;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;SAKgB,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,YAAY,GAAA;AAC1B,IAAA,OAAO,MAAM;SACV,OAAO,CAAC,IAAI;SACZ,IAAI,CAAC,SAAS;AACd,SAAA,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AACxB,SAAA,SAAS,CAAC;AACT,QAAA,KAAK,EAAE,CAAC,KAAK,EAAE,OAAO,KAAI;AACxB,YAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAoB;YAC7C,kBAAkB,CAAC,QAAQ,CAAC;AAC5B,YAAA,IAAI,QAAQ,CAA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AM,IAAG;AACd,YAAA,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;AACrB,YAAA,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,GAAG;AACpB,gBAAA,OAAO,EAAE;AACP,oBAAA,GAAG,EAAE,QAAQ;AACb,oBAAA,GAAG,EAAE,QAAQ;AACb,oBAAA,SAAS,EAAE,QAAQ;AACnB,oBAAA,SAAS,EAAE,QAAQ;AACnB,oBAAA,KAAK,EAAE,YAAY;AACnB,oBAAA,OAAO,EAAE,WAAW;oBACpB,QAAQ,EAAE,KAAK,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE;AACtE;aACF;AACD,YAAA,OAAO,MAAM;;KAEhB;AACH;;ACvFA;;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 { FormArray, FormGroup } from '@angular/forms';\nimport { 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 submitButton(): UnstableBuilder<ButtonComponentSchema, KindOrKey | 'content' | 'type' | 'variants' | 'listeners'> {\n return button()\n .content('提交')\n .type('primary')\n .variants({ block: true })\n .listeners({\n click: (event, context) => {\n const rootForm = context.control as FormGroup\n updateValidityEach(rootForm)\n if (rootForm.invalid) {\n event.preventDefault()\n }\n }\n })\n}\n\n/**\n * Alias of {@link submitButton}\n */\nexport const saveButton = submitButton;\n\nfunction updateValidityEach(form: FormGroup | FormArray): void {\n for (const control of Object.values(form.controls)) {\n if (control instanceof FormGroup || control instanceof FormArray) {\n updateValidityEach(control);\n } else {\n if (control.invalid) {\n control.markAsDirty();\n control.updateValueAndValidity({ onlySelf: true });\n }\n }\n }\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, SchemaType } 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\nexport function useValidationTipsPatchers(): SchemaPatcher {\n return {\n selector: SchemaType.Control,\n patch: schema => {\n schema['tips'] ??= {}\n schema['tips'].auto = {\n default: {\n min: '输入数值过小',\n max: '输入数值过大',\n minlength: '输入内容过短',\n maxlength: '输入内容过长',\n email: '请输入正确的邮箱地址',\n pattern: '输入内容格式不正确',\n required: '请填写' + (schema['label'] ? parseLabel(schema['label']) : '')\n }\n }\n return schema;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;SAKgB,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,YAAY,GAAA;AAC1B,IAAA,OAAO,MAAM;SACV,OAAO,CAAC,IAAI;SACZ,IAAI,CAAC,SAAS;AACd,SAAA,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AACxB,SAAA,SAAS,CAAC;AACT,QAAA,KAAK,EAAE,CAAC,KAAK,EAAE,OAAO,KAAI;AACxB,YAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAoB;YAC7C,kBAAkB,CAAC,QAAQ,CAAC;AAC5B,YAAA,IAAI,QAAQ,CAAC,OAAO,EAAE;gBACpB,KAAK,CAAC,cAAc,EAAE;;;AAG3B,KAAA,CAAC;AACN;AAEA;;AAEG;AACI,MAAM,UAAU,GAAG;AAE1B,SAAS,kBAAkB,CAAC,IAA2B,EAAA;AACrD,IAAA,KAAK,MAAM,OAAO,IAAI,MAA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,QAAQ;AACb,oBAAA,SAAS,EAAE,QAAQ;AACnB,oBAAA,SAAS,EAAE,QAAQ;AACnB,oBAAA,KAAK,EAAE,YAAY;AACnB,oBAAA,OAAO,EAAE,WAAW;oBACpB,QAAQ,EAAE,KAAK,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE;AACtE;aACF;AACD,YAAA,OAAO,MAAM;;KAEhB;AACH;;ACvFA;;AAEG;;;;"}
@@ -125,10 +125,10 @@ class SunMediaUploader {
125
125
  }
126
126
  });
127
127
  }
128
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunMediaUploader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
129
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: SunMediaUploader, isStandalone: true, selector: "sun-media-uploader", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: false, transformFunction: null }, deletable: { classPropertyName: "deletable", publicName: "deletable", isSignal: true, isRequired: false, transformFunction: null }, uploadable: { classPropertyName: "uploadable", publicName: "uploadable", isSignal: true, isRequired: false, transformFunction: null }, previewable: { classPropertyName: "previewable", publicName: "previewable", isSignal: true, isRequired: false, transformFunction: null }, downloadable: { classPropertyName: "downloadable", publicName: "downloadable", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, uploadKeys: { classPropertyName: "uploadKeys", publicName: "uploadKeys", isSignal: true, isRequired: false, transformFunction: null }, compress: { classPropertyName: "compress", publicName: "compress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { data: "dataChange", uploaded: "uploaded", delete: "delete", error: "error" }, host: { properties: { "class.sun-media-uploader-circle": "shape() === 'circle'" }, classAttribute: "sun-media-uploader" }, ngImport: i0, template: "@for (item of data(); track item.uid) {\n <div class=\"sun-media-uploader-item\">\n <img class=\"sun-media-uploader-img\" [src]=\"item.thumbnailUrl || item.url\" />\n\n @if (item.progress) {\n <div class=\"sun-media-uploader-progress-bar\">\n <div\n class=\"sun-media-uploader-progress-inner\"\n [style]=\"{ transform: 'translateY(-' + item.progress + 'px)' }\"></div>\n <div class=\"sun-media-uploader-progress-text\">\n <div>{{ item.progress }}%</div>\n <div>\u4E0A\u4F20\u4E2D...</div>\n </div>\n </div>\n } @else {\n <div class=\"sun-media-uploader-mask\">\n @if (previewable()) {\n <div class=\"sun-media-uploader-action\" (click)=\"onPreview(item)\">\n <nz-icon nzType=\"eye\" nzTheme=\"outline\"></nz-icon>\n \u9884\u89C8\n </div>\n }\n @if (downloadable()) {\n <div class=\"sun-media-uploader-action\" (click)=\"onDownload(item)\">\n <nz-icon nzType=\"download\" nzTheme=\"outline\"></nz-icon>\n \u4E0B\u8F7D\n </div>\n }\n @if (deletable()) {\n <div\n class=\"sun-media-uploader-action\"\n nz-popconfirm\n nzType=\"danger\"\n nzPopconfirmTitle=\"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u9879\u76EE\u5417\uFF1F\"\n nzOkDanger\n (nzOnConfirm)=\"delete.emit(item)\">\n <nz-icon nzType=\"delete\" nzTheme=\"outline\"></nz-icon>\n \u5220\u9664\n </div>\n }\n </div>\n }\n </div>\n}\n\n<nz-upload\n nzAccept=\"image/*\"\n nzListType=\"picture-card\"\n [hidden]=\"data().length! >= limit() || !uploadable()\"\n [nzShowUploadList]=\"false\"\n [nzCustomRequest]=\"upload\"\n [nzTransformFile]=\"compress() ? transform : undefined\"\n (nzChange)=\"onChange($event)\">\n <div class=\"sun-media-uploader-btn\">\n <nz-icon nzType=\"plus\"></nz-icon>\n <div class=\"sun-media-uploader-btn-text\">\u70B9\u51FB\u4E0A\u4F20</div>\n </div>\n</nz-upload>\n", styles: [".sun-media-uploader{--item-size: 100px;--item-width: var(--item-size);--item-height: var(--item-size);display:flex;flex-wrap:wrap;gap:6px}.sun-media-uploader .ant-upload-picture-card-wrapper{width:auto}.sun-media-uploader .ant-upload.ant-upload-select-picture-card{height:var(--item-height);width:var(--item-width)}.sun-media-uploader-item{position:relative;height:var(--item-height);width:var(--item-width);border:.5px solid #d9d9d9;border-radius:var(--border-radius-base);overflow:hidden}.sun-media-uploader-item:hover{border-color:var(--color-primary)}.sun-media-uploader-progress-bar,.sun-media-uploader-mask{position:absolute;top:0;left:0;height:100%;width:100%;color:#fff;filter:drop-shadow(0 0 1px rgba(0,0,0,.5))}.sun-media-uploader-progress-inner,.sun-media-uploader-mask{background-color:#0000004d}.sun-media-uploader-progress-bar{display:flex;justify-content:center;align-items:center;text-align:center}.sun-media-uploader-progress-inner{position:absolute;top:0;left:0;width:100%;height:100%;transition:transform ease-out .3s}.sun-media-uploader-progress-text{position:relative;z-index:1}.sun-media-uploader-mask{display:flex;flex-direction:column;justify-content:center;gap:2px;opacity:0;transition:all ease-out .3s}.sun-media-uploader-mask:hover{opacity:1}.sun-media-uploader-action{display:flex;justify-content:center;gap:6px;padding-right:4px;cursor:pointer}.sun-media-uploader-btn-text{margin-top:6px}.sun-media-uploader-img,.sun-media-uploader-video{width:100%;height:100%;object-fit:cover}.sun-media-uploader-circle .sun-media-uploader-item,.sun-media-uploader-circle .ant-upload.ant-upload-select-picture-card{border-radius:50%}\n"], dependencies: [{ kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzUploadModule }, { kind: "component", type: i2.NzUploadComponent, selector: "nz-upload", inputs: ["nzType", "nzLimit", "nzSize", "nzFileType", "nzAccept", "nzAction", "nzDirectory", "nzOpenFileDialogOnClick", "nzBeforeUpload", "nzCustomRequest", "nzData", "nzFilter", "nzFileList", "nzDisabled", "nzHeaders", "nzListType", "nzMultiple", "nzName", "nzShowUploadList", "nzShowButton", "nzWithCredentials", "nzRemove", "nzPreview", "nzPreviewFile", "nzPreviewIsImage", "nzTransformFile", "nzDownload", "nzIconRender", "nzFileListRender"], outputs: ["nzChange", "nzFileListChange"], exportAs: ["nzUpload"] }, { kind: "ngmodule", type: NzImageModule }, { kind: "ngmodule", type: NzPopconfirmModule }, { kind: "directive", type: i3.NzPopconfirmDirective, selector: "[nz-popconfirm]", inputs: ["nzPopconfirmArrowPointAtCenter", "nzPopconfirmTitle", "nzPopconfirmTitleContext", "nz-popconfirm", "nzPopconfirmTrigger", "nzPopconfirmPlacement", "nzPopconfirmOrigin", "nzPopconfirmMouseEnterDelay", "nzPopconfirmMouseLeaveDelay", "nzPopconfirmOverlayClassName", "nzPopconfirmOverlayStyle", "nzPopconfirmVisible", "nzOkText", "nzOkType", "nzOkDisabled", "nzOkDanger", "nzCancelText", "nzBeforeConfirm", "nzIcon", "nzCondition", "nzPopconfirmShowArrow", "nzPopconfirmBackdrop", "nzAutofocus"], outputs: ["nzPopconfirmVisibleChange", "nzOnCancel", "nzOnConfirm"], exportAs: ["nzPopconfirm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
128
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SunMediaUploader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
129
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: SunMediaUploader, isStandalone: true, selector: "sun-media-uploader", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: false, transformFunction: null }, deletable: { classPropertyName: "deletable", publicName: "deletable", isSignal: true, isRequired: false, transformFunction: null }, uploadable: { classPropertyName: "uploadable", publicName: "uploadable", isSignal: true, isRequired: false, transformFunction: null }, previewable: { classPropertyName: "previewable", publicName: "previewable", isSignal: true, isRequired: false, transformFunction: null }, downloadable: { classPropertyName: "downloadable", publicName: "downloadable", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, uploadKeys: { classPropertyName: "uploadKeys", publicName: "uploadKeys", isSignal: true, isRequired: false, transformFunction: null }, compress: { classPropertyName: "compress", publicName: "compress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { data: "dataChange", uploaded: "uploaded", delete: "delete", error: "error" }, host: { properties: { "class.sun-media-uploader-circle": "shape() === 'circle'" }, classAttribute: "sun-media-uploader" }, ngImport: i0, template: "@for (item of data(); track item.uid) {\n <div class=\"sun-media-uploader-item\">\n <img class=\"sun-media-uploader-img\" [src]=\"item.thumbnailUrl || item.url\" />\n\n @if (item.progress) {\n <div class=\"sun-media-uploader-progress-bar\">\n <div\n class=\"sun-media-uploader-progress-inner\"\n [style]=\"{ transform: 'translateY(-' + item.progress + 'px)' }\"></div>\n <div class=\"sun-media-uploader-progress-text\">\n <div>{{ item.progress }}%</div>\n <div>\u4E0A\u4F20\u4E2D...</div>\n </div>\n </div>\n } @else {\n <div class=\"sun-media-uploader-mask\">\n @if (previewable()) {\n <div class=\"sun-media-uploader-action\" (click)=\"onPreview(item)\">\n <nz-icon nzType=\"eye\" nzTheme=\"outline\"></nz-icon>\n \u9884\u89C8\n </div>\n }\n @if (downloadable()) {\n <div class=\"sun-media-uploader-action\" (click)=\"onDownload(item)\">\n <nz-icon nzType=\"download\" nzTheme=\"outline\"></nz-icon>\n \u4E0B\u8F7D\n </div>\n }\n @if (deletable()) {\n <div\n class=\"sun-media-uploader-action\"\n nz-popconfirm\n nzType=\"danger\"\n nzPopconfirmTitle=\"\u60A8\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u9879\u76EE\u5417\uFF1F\"\n nzOkDanger\n (nzOnConfirm)=\"delete.emit(item)\">\n <nz-icon nzType=\"delete\" nzTheme=\"outline\"></nz-icon>\n \u5220\u9664\n </div>\n }\n </div>\n }\n </div>\n}\n\n<nz-upload\n nzAccept=\"image/*\"\n nzListType=\"picture-card\"\n [hidden]=\"data().length! >= limit() || !uploadable()\"\n [nzShowUploadList]=\"false\"\n [nzCustomRequest]=\"upload\"\n [nzTransformFile]=\"compress() ? transform : undefined\"\n (nzChange)=\"onChange($event)\">\n <div class=\"sun-media-uploader-btn\">\n <nz-icon nzType=\"plus\"></nz-icon>\n <div class=\"sun-media-uploader-btn-text\">\u70B9\u51FB\u4E0A\u4F20</div>\n </div>\n</nz-upload>\n", styles: [".sun-media-uploader{--item-size: 100px;--item-width: var(--item-size);--item-height: var(--item-size);display:flex;flex-wrap:wrap;gap:6px}.sun-media-uploader .ant-upload-picture-card-wrapper{width:auto}.sun-media-uploader .ant-upload.ant-upload-select-picture-card{height:var(--item-height);width:var(--item-width)}.sun-media-uploader-item{position:relative;height:var(--item-height);width:var(--item-width);border:.5px solid #d9d9d9;border-radius:var(--border-radius-base);overflow:hidden}.sun-media-uploader-item:hover{border-color:var(--color-primary)}.sun-media-uploader-progress-bar,.sun-media-uploader-mask{position:absolute;top:0;left:0;height:100%;width:100%;color:#fff;filter:drop-shadow(0 0 1px rgba(0,0,0,.5))}.sun-media-uploader-progress-inner,.sun-media-uploader-mask{background-color:#0000004d}.sun-media-uploader-progress-bar{display:flex;justify-content:center;align-items:center;text-align:center}.sun-media-uploader-progress-inner{position:absolute;top:0;left:0;width:100%;height:100%;transition:transform ease-out .3s}.sun-media-uploader-progress-text{position:relative;z-index:1}.sun-media-uploader-mask{display:flex;flex-direction:column;justify-content:center;gap:2px;opacity:0;transition:all ease-out .3s}.sun-media-uploader-mask:hover{opacity:1}.sun-media-uploader-action{display:flex;justify-content:center;gap:6px;padding-right:4px;cursor:pointer}.sun-media-uploader-btn-text{margin-top:6px}.sun-media-uploader-img,.sun-media-uploader-video{width:100%;height:100%;object-fit:cover}.sun-media-uploader-circle .sun-media-uploader-item,.sun-media-uploader-circle .ant-upload.ant-upload-select-picture-card{border-radius:50%}\n"], dependencies: [{ kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i1.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzUploadModule }, { kind: "component", type: i2.NzUploadComponent, selector: "nz-upload", inputs: ["nzType", "nzLimit", "nzSize", "nzFileType", "nzAccept", "nzAction", "nzDirectory", "nzOpenFileDialogOnClick", "nzBeforeUpload", "nzCustomRequest", "nzData", "nzFilter", "nzFileList", "nzDisabled", "nzHeaders", "nzListType", "nzMultiple", "nzName", "nzShowUploadList", "nzShowButton", "nzWithCredentials", "nzRemove", "nzPreview", "nzPreviewFile", "nzPreviewIsImage", "nzTransformFile", "nzDownload", "nzIconRender", "nzFileListRender"], outputs: ["nzChange", "nzFileListChange"], exportAs: ["nzUpload"] }, { kind: "ngmodule", type: NzImageModule }, { kind: "ngmodule", type: NzPopconfirmModule }, { kind: "directive", type: i3.NzPopconfirmDirective, selector: "[nz-popconfirm]", inputs: ["nzPopconfirmArrowPointAtCenter", "nzPopconfirmTitle", "nzPopconfirmTitleContext", "nz-popconfirm", "nzPopconfirmTrigger", "nzPopconfirmPlacement", "nzPopconfirmOrigin", "nzPopconfirmMouseEnterDelay", "nzPopconfirmMouseLeaveDelay", "nzPopconfirmOverlayClassName", "nzPopconfirmOverlayStyle", "nzPopconfirmVisible", "nzOkText", "nzOkType", "nzOkDisabled", "nzOkDanger", "nzCancelText", "nzBeforeConfirm", "nzIcon", "nzCondition", "nzPopconfirmShowArrow", "nzPopconfirmBackdrop", "nzAutofocus"], outputs: ["nzPopconfirmVisibleChange", "nzOnCancel", "nzOnConfirm"], exportAs: ["nzPopconfirm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
130
130
  }
131
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunMediaUploader, decorators: [{
131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SunMediaUploader, decorators: [{
132
132
  type: Component,
133
133
  args: [{ selector: 'sun-media-uploader', imports: [
134
134
  NzIconModule,
@@ -25,10 +25,10 @@ class MessageService extends NzMessageService {
25
25
  withSaveLoading() {
26
26
  return this.withLoading('正在保存');
27
27
  }
28
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MessageService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
29
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MessageService, providedIn: 'root' }); }
28
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MessageService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
29
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MessageService, providedIn: 'root' }); }
30
30
  }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MessageService, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: MessageService, decorators: [{
32
32
  type: Injectable,
33
33
  args: [{
34
34
  providedIn: 'root'
@@ -11,10 +11,10 @@ import * as i4 from 'ng-zorro-antd/core/transition-patch';
11
11
  import * as i5 from 'ng-zorro-antd/core/wave';
12
12
 
13
13
  class SunForbiddenPage {
14
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunForbiddenPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SunForbiddenPage, isStandalone: true, selector: "sun-forbidden", ngImport: i0, template: "<nz-result nzStatus=\"403\" nzTitle=\"403\" nzSubTitle=\"\u62B1\u6B49\uFF0C\u60A8\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u8BE5\u9875\u9762\">\n <div nz-result-extra>\n <button nz-button nzType=\"primary\" routerLink=\"/\">\n <nz-icon nzType=\"arrow-left\" nzTheme=\"outline\"></nz-icon>\n \u8FD4\u56DE\u4E3B\u9875\n </button>\n </div>\n</nz-result>\n", styles: [":host{height:100%;width:100%;display:flex;justify-content:center;align-items:center;background:var(--ant-primary-1);padding-bottom:10vh}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: NzResultModule }, { kind: "component", type: i1.NzResultComponent, selector: "nz-result", inputs: ["nzIcon", "nzTitle", "nzStatus", "nzSubTitle", "nzExtra"], exportAs: ["nzResult"] }, { kind: "directive", type: i1.NzResultExtraDirective, selector: "div[nz-result-extra]", exportAs: ["nzResultExtra"] }, { 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: NzButtonModule }, { kind: "component", type: i3.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i4.ɵ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: i5.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
14
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SunForbiddenPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: SunForbiddenPage, isStandalone: true, selector: "sun-forbidden", ngImport: i0, template: "<nz-result nzStatus=\"403\" nzTitle=\"403\" nzSubTitle=\"\u62B1\u6B49\uFF0C\u60A8\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u8BE5\u9875\u9762\">\n <div nz-result-extra>\n <button nz-button nzType=\"primary\" routerLink=\"/\">\n <nz-icon nzType=\"arrow-left\" nzTheme=\"outline\"></nz-icon>\n \u8FD4\u56DE\u4E3B\u9875\n </button>\n </div>\n</nz-result>\n", styles: [":host{height:100%;width:100%;display:flex;justify-content:center;align-items:center;background:var(--ant-primary-1);padding-bottom:10vh}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: NzResultModule }, { kind: "component", type: i1.NzResultComponent, selector: "nz-result", inputs: ["nzIcon", "nzTitle", "nzStatus", "nzSubTitle", "nzExtra"], exportAs: ["nzResult"] }, { kind: "directive", type: i1.NzResultExtraDirective, selector: "div[nz-result-extra]", exportAs: ["nzResultExtra"] }, { 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: NzButtonModule }, { kind: "component", type: i3.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i4.ɵ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: i5.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16
16
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunForbiddenPage, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SunForbiddenPage, decorators: [{
18
18
  type: Component,
19
19
  args: [{ selector: 'sun-forbidden', imports: [
20
20
  RouterLink,
@@ -22,10 +22,10 @@ class SunLogoutPage {
22
22
  login() {
23
23
  this.router.navigateByUrl('/login');
24
24
  }
25
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunLogoutPage, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
26
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SunLogoutPage, isStandalone: true, selector: "sun-logout", ngImport: i0, template: "<nz-result\n nzStatus=\"success\"\n nzTitle=\"\u60A8\u5DF2\u6210\u529F\u9000\u51FA\u767B\u5F55!\"\n [nzSubTitle]=\"'\u7CFB\u7EDF\u5C06\u5728 ' + (5 - (interval$ | async)!) + ' \u79D2\u540E\u81EA\u52A8\u91CD\u5B9A\u5411...'\"\n>\n <div nz-result-extra>\n <button nz-button nzType=\"primary\" (click)=\"login()\">\n <nz-icon nzType=\"arrow-right\" nzTheme=\"outline\"></nz-icon>\n \u7ACB\u5373\u767B\u5F55\n </button>\n </div>\n</nz-result>\n", styles: [":host{height:100%;width:100%;display:flex;justify-content:center;align-items:center;background:var(--ant-primary-1);padding-bottom:10vh}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: NzResultModule }, { kind: "component", type: i2.NzResultComponent, selector: "nz-result", inputs: ["nzIcon", "nzTitle", "nzStatus", "nzSubTitle", "nzExtra"], exportAs: ["nzResult"] }, { kind: "directive", type: i2.NzResultExtraDirective, selector: "div[nz-result-extra]", exportAs: ["nzResultExtra"] }, { 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: NzButtonModule }, { kind: "component", type: i4.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i5.ɵ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: i6.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
25
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SunLogoutPage, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
26
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: SunLogoutPage, isStandalone: true, selector: "sun-logout", ngImport: i0, template: "<nz-result\n nzStatus=\"success\"\n nzTitle=\"\u60A8\u5DF2\u6210\u529F\u9000\u51FA\u767B\u5F55!\"\n [nzSubTitle]=\"'\u7CFB\u7EDF\u5C06\u5728 ' + (5 - (interval$ | async)!) + ' \u79D2\u540E\u81EA\u52A8\u91CD\u5B9A\u5411...'\"\n>\n <div nz-result-extra>\n <button nz-button nzType=\"primary\" (click)=\"login()\">\n <nz-icon nzType=\"arrow-right\" nzTheme=\"outline\"></nz-icon>\n \u7ACB\u5373\u767B\u5F55\n </button>\n </div>\n</nz-result>\n", styles: [":host{height:100%;width:100%;display:flex;justify-content:center;align-items:center;background:var(--ant-primary-1);padding-bottom:10vh}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: NzResultModule }, { kind: "component", type: i2.NzResultComponent, selector: "nz-result", inputs: ["nzIcon", "nzTitle", "nzStatus", "nzSubTitle", "nzExtra"], exportAs: ["nzResult"] }, { kind: "directive", type: i2.NzResultExtraDirective, selector: "div[nz-result-extra]", exportAs: ["nzResultExtra"] }, { 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: NzButtonModule }, { kind: "component", type: i4.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i5.ɵ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: i6.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
27
27
  }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunLogoutPage, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SunLogoutPage, decorators: [{
29
29
  type: Component,
30
30
  args: [{ selector: 'sun-logout', imports: [
31
31
  AsyncPipe,
@@ -11,10 +11,10 @@ import * as i4 from 'ng-zorro-antd/core/transition-patch';
11
11
  import * as i5 from 'ng-zorro-antd/core/wave';
12
12
 
13
13
  class SunNotFoundPage {
14
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunNotFoundPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: SunNotFoundPage, isStandalone: true, selector: "sun-not-found", ngImport: i0, template: "<nz-result nzStatus=\"404\" nzTitle=\"404\" nzSubTitle=\"\u62B1\u6B49\uFF0C\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\">\n <div nz-result-extra>\n <button nz-button nzType=\"primary\" routerLink=\"/\">\n <nz-icon nzType=\"arrow-left\" nzTheme=\"outline\"></nz-icon>\n \u8FD4\u56DE\u4E3B\u9875\n </button>\n </div>\n</nz-result>\n", styles: [":host{height:100%;width:100%;display:flex;justify-content:center;align-items:center;background:var(--ant-primary-1);padding-bottom:10vh}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: NzResultModule }, { kind: "component", type: i1.NzResultComponent, selector: "nz-result", inputs: ["nzIcon", "nzTitle", "nzStatus", "nzSubTitle", "nzExtra"], exportAs: ["nzResult"] }, { kind: "directive", type: i1.NzResultExtraDirective, selector: "div[nz-result-extra]", exportAs: ["nzResultExtra"] }, { 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: NzButtonModule }, { kind: "component", type: i3.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i4.ɵ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: i5.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
14
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SunNotFoundPage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: SunNotFoundPage, isStandalone: true, selector: "sun-not-found", ngImport: i0, template: "<nz-result nzStatus=\"404\" nzTitle=\"404\" nzSubTitle=\"\u62B1\u6B49\uFF0C\u60A8\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728\">\n <div nz-result-extra>\n <button nz-button nzType=\"primary\" routerLink=\"/\">\n <nz-icon nzType=\"arrow-left\" nzTheme=\"outline\"></nz-icon>\n \u8FD4\u56DE\u4E3B\u9875\n </button>\n </div>\n</nz-result>\n", styles: [":host{height:100%;width:100%;display:flex;justify-content:center;align-items:center;background:var(--ant-primary-1);padding-bottom:10vh}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: NzResultModule }, { kind: "component", type: i1.NzResultComponent, selector: "nz-result", inputs: ["nzIcon", "nzTitle", "nzStatus", "nzSubTitle", "nzExtra"], exportAs: ["nzResult"] }, { kind: "directive", type: i1.NzResultExtraDirective, selector: "div[nz-result-extra]", exportAs: ["nzResultExtra"] }, { 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: NzButtonModule }, { kind: "component", type: i3.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i4.ɵ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: i5.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16
16
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunNotFoundPage, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SunNotFoundPage, decorators: [{
18
18
  type: Component,
19
19
  args: [{ selector: 'sun-not-found', imports: [
20
20
  RouterLink,
@@ -10,7 +10,7 @@ import { NzIconModule } from 'ng-zorro-antd/icon';
10
10
  import { NzNotificationService } from 'ng-zorro-antd/notification';
11
11
  import * as i4 from 'ng-zorro-antd/space';
12
12
  import { NzSpaceModule } from 'ng-zorro-antd/space';
13
- import { filter, exhaustMap } from 'rxjs';
13
+ import { filter, exhaustMap, take } from 'rxjs';
14
14
  import * as i2 from 'ng-zorro-antd/core/transition-patch';
15
15
  import * as i3 from 'ng-zorro-antd/core/wave';
16
16
 
@@ -25,10 +25,10 @@ class AppUpdater {
25
25
  .then(bool => bool || this.message.info('当前已是最新版本'))
26
26
  .catch(() => this.message.error('检查更新失败'));
27
27
  }
28
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppUpdater, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
29
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppUpdater, providedIn: 'root' }); }
28
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppUpdater, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
29
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppUpdater, providedIn: 'root' }); }
30
30
  }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppUpdater, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AppUpdater, decorators: [{
32
32
  type: Injectable,
33
33
  args: [{
34
34
  providedIn: 'root'
@@ -44,7 +44,7 @@ class SunUpdater {
44
44
  let loadingRef;
45
45
  updater.versionUpdates.pipe(filter(event => event.type === 'VERSION_DETECTED'), exhaustMap(() => {
46
46
  loadingRef = this.notification.info('温馨提示', '发现新版本,正在下载更新...', { nzCloseIcon: 'loading', nzDuration: 0 });
47
- return updater.versionUpdates.pipe(filter(event => event.type === 'VERSION_READY'));
47
+ return updater.versionUpdates.pipe(filter(event => event.type === 'VERSION_READY'), take(1));
48
48
  }), takeUntilDestroyed()).subscribe(() => {
49
49
  this.notification.remove(loadingRef.messageId);
50
50
  this.present();
@@ -72,10 +72,10 @@ class SunUpdater {
72
72
  this.present();
73
73
  }, 1000 * 60 * 5); // 5min
74
74
  }
75
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunUpdater, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
76
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.14", type: SunUpdater, isStandalone: true, selector: "sun-updater", viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template let-notification>\n <nz-space>\n <button *nzSpaceItem nz-button nzType=\"link\" nzSize=\"small\" (click)=\"defer(notification)\">\u7A0D\u540E\u63D0\u9192</button>\n <button *nzSpaceItem nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"update()\">\u7ACB\u5373\u66F4\u65B0</button>\n </nz-space>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: NzIconModule }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i1.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i2.ɵ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: i3.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { 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]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
75
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SunUpdater, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
76
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.15", type: SunUpdater, isStandalone: true, selector: "sun-updater", viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template let-notification>\n <nz-space>\n <button *nzSpaceItem nz-button nzType=\"link\" nzSize=\"small\" (click)=\"defer(notification)\">\u7A0D\u540E\u63D0\u9192</button>\n <button *nzSpaceItem nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"update()\">\u7ACB\u5373\u66F4\u65B0</button>\n </nz-space>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: NzIconModule }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i1.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i2.ɵ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: i3.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { 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]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
77
77
  }
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunUpdater, decorators: [{
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SunUpdater, decorators: [{
79
79
  type: Component,
80
80
  args: [{ selector: 'sun-updater', imports: [
81
81
  NzIconModule,
@@ -1 +1 @@
1
- {"version":3,"file":"solar-angular-ui-zorro-updater.mjs","sources":["../../../packages/ui-zorro/updater/app-updater.ts","../../../packages/ui-zorro/updater/updater.component.ts","../../../packages/ui-zorro/updater/updater.component.html","../../../packages/ui-zorro/updater/solar-angular-ui-zorro-updater.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { SwUpdate } from '@angular/service-worker';\nimport { NzMessageService } from 'ng-zorro-antd/message';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AppUpdater {\n protected readonly update = inject(SwUpdate);\n protected readonly message = inject(NzMessageService);\n\n checkForUpdate() {\n this.update.checkForUpdate()\n // 这里我们只处理 bool 为 false 的情况;如果为 true,意味着有新版本,应该由 sun-updates 组件处理\n .then(bool => bool || this.message.info('当前已是最新版本'))\n .catch(() => this.message.error('检查更新失败'))\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, TemplateRef, viewChild } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { SwUpdate } from '@angular/service-worker';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzNotificationComponent, NzNotificationRef, NzNotificationService } from 'ng-zorro-antd/notification';\nimport { NzSpaceModule } from 'ng-zorro-antd/space';\nimport { exhaustMap, filter } from 'rxjs';\n\n@Component({\n selector: 'sun-updater',\n imports: [\n NzIconModule,\n NzButtonModule,\n NzSpaceModule\n ],\n templateUrl: './updater.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SunUpdater {\n private readonly location = inject(DOCUMENT).defaultView!.location;\n private readonly notification = inject(NzNotificationService);\n\n readonly templateRef = viewChild.required(TemplateRef);\n\n constructor() {\n const updater = inject(SwUpdate);\n\n let loadingRef: NzNotificationRef;\n\n updater.versionUpdates.pipe(\n filter(event => event.type === 'VERSION_DETECTED'),\n exhaustMap(() => {\n loadingRef = this.notification.info(\n '温馨提示',\n '发现新版本,正在下载更新...',\n { nzCloseIcon: 'loading', nzDuration: 0 }\n );\n return updater.versionUpdates.pipe(\n filter(event => event.type === 'VERSION_READY')\n )\n }),\n takeUntilDestroyed()\n ).subscribe(() => {\n this.notification.remove(loadingRef.messageId);\n this.present();\n })\n\n updater.versionUpdates.pipe(\n filter(event => event.type === 'VERSION_INSTALLATION_FAILED'),\n takeUntilDestroyed()\n ).subscribe(event => {\n this.notification.remove(loadingRef.messageId);\n this.notification.error(\n '温馨提示',\n '新版本安装失败,原因:' + event.error,\n { nzDuration: 0 }\n );\n })\n\n updater.unrecoverable.pipe(\n takeUntilDestroyed()\n ).subscribe(event => {\n alert(`发生错误,我们无法从 ${event.reason} 恢复,请重新加载页面。`);\n });\n }\n\n private present() {\n this.notification.info(\n '新版本已就绪',\n '为了让您获得更好的使用体验,我们建议您立即进行更新。',\n {\n nzButton: this.templateRef(),\n nzDuration: 0\n }\n );\n }\n\n update() {\n this.location.reload();\n }\n\n defer(notification: NzNotificationComponent) {\n notification.close();\n\n setTimeout(() => {\n this.present();\n }, 1000 * 60 * 5); // 5min\n }\n}\n","<ng-template let-notification>\n <nz-space>\n <button *nzSpaceItem nz-button nzType=\"link\" nzSize=\"small\" (click)=\"defer(notification)\">稍后提醒</button>\n <button *nzSpaceItem nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"update()\">立即更新</button>\n </nz-space>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAOa,UAAU,CAAA;AAHvB,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;AACzB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAQtD;IANC,cAAc,GAAA;AACZ,QAAA,IAAI,CAAC,MAAM,CAAC,cAAc;;AAEvB,aAAA,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC;AAClD,aAAA,KAAK,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;;+GARnC,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAV,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,cAFT,MAAM,EAAA,CAAA,CAAA;;4FAEP,UAAU,EAAA,UAAA,EAAA,CAAA;kBAHtB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCcY,UAAU,CAAA;AAMrB,IAAA,WAAA,GAAA;QALiB,IAAQ,CAA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","../../../packages/ui-zorro/updater/updater.component.html","../../../packages/ui-zorro/updater/solar-angular-ui-zorro-updater.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { SwUpdate } from '@angular/service-worker';\nimport { NzMessageService } from 'ng-zorro-antd/message';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AppUpdater {\n protected readonly update = inject(SwUpdate);\n protected readonly message = inject(NzMessageService);\n\n checkForUpdate() {\n this.update.checkForUpdate()\n // 这里我们只处理 bool 为 false 的情况;如果为 true,意味着有新版本,应该由 sun-updates 组件处理\n .then(bool => bool || this.message.info('当前已是最新版本'))\n .catch(() => this.message.error('检查更新失败'))\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, TemplateRef, viewChild } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { SwUpdate } from '@angular/service-worker';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzNotificationComponent, NzNotificationRef, NzNotificationService } from 'ng-zorro-antd/notification';\nimport { NzSpaceModule } from 'ng-zorro-antd/space';\nimport { exhaustMap, filter, take } from 'rxjs';\n\n@Component({\n selector: 'sun-updater',\n imports: [\n NzIconModule,\n NzButtonModule,\n NzSpaceModule\n ],\n templateUrl: './updater.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SunUpdater {\n private readonly location = inject(DOCUMENT).defaultView!.location;\n private readonly notification = inject(NzNotificationService);\n\n readonly templateRef = viewChild.required(TemplateRef);\n\n constructor() {\n const updater = inject(SwUpdate);\n\n let loadingRef: NzNotificationRef;\n\n updater.versionUpdates.pipe(\n filter(event => event.type === 'VERSION_DETECTED'),\n exhaustMap(() => {\n loadingRef = this.notification.info(\n '温馨提示',\n '发现新版本,正在下载更新...',\n { nzCloseIcon: 'loading', nzDuration: 0 }\n );\n return updater.versionUpdates.pipe(\n filter(event => event.type === 'VERSION_READY'),\n take(1)\n )\n }),\n takeUntilDestroyed()\n ).subscribe(() => {\n this.notification.remove(loadingRef.messageId);\n this.present();\n })\n\n updater.versionUpdates.pipe(\n filter(event => event.type === 'VERSION_INSTALLATION_FAILED'),\n takeUntilDestroyed()\n ).subscribe(event => {\n this.notification.remove(loadingRef.messageId);\n this.notification.error(\n '温馨提示',\n '新版本安装失败,原因:' + event.error,\n { nzDuration: 0 }\n );\n })\n\n updater.unrecoverable.pipe(\n takeUntilDestroyed()\n ).subscribe(event => {\n alert(`发生错误,我们无法从 ${event.reason} 恢复,请重新加载页面。`);\n });\n }\n\n private present() {\n this.notification.info(\n '新版本已就绪',\n '为了让您获得更好的使用体验,我们建议您立即进行更新。',\n {\n nzButton: this.templateRef(),\n nzDuration: 0\n }\n );\n }\n\n update() {\n this.location.reload();\n }\n\n defer(notification: NzNotificationComponent) {\n notification.close();\n\n setTimeout(() => {\n this.present();\n }, 1000 * 60 * 5); // 5min\n }\n}\n","<ng-template let-notification>\n <nz-space>\n <button *nzSpaceItem nz-button nzType=\"link\" nzSize=\"small\" (click)=\"defer(notification)\">稍后提醒</button>\n <button *nzSpaceItem nz-button nzType=\"primary\" nzSize=\"small\" (click)=\"update()\">立即更新</button>\n </nz-space>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAOa,UAAU,CAAA;AAHvB,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;AACzB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAQtD;IANC,cAAc,GAAA;AACZ,QAAA,IAAI,CAAC,MAAM,CAAC,cAAc;;AAEvB,aAAA,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC;AAClD,aAAA,KAAK,CAAC,MAAM,IAAI,CAAC,OAAO,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CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAKJ,UAAU,EAAA,UAAA,EAAA,CAAA;kBAVtB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EACd,OAAA,EAAA;wBACP,YAAY;wBACZ,cAAc;wBACd;qBACD,EAEgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,qVAAA,EAAA;;;AElBjD;;AAEG;;;;"}
@@ -8,4 +8,4 @@ export declare function useAutoPlaceholderPatchers(): SchemaPatcher[];
8
8
  * 2. 为选择器添加搜索功能
9
9
  */
10
10
  export declare function useImprovedPickerPatchers(): SchemaPatcher[];
11
- export declare function useControlValidationTipsPatchers(): SchemaPatcher;
11
+ export declare function useValidationTipsPatchers(): SchemaPatcher;
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@solar-angular/ui-zorro",
3
- "version": "19.1.0",
3
+ "version": "19.1.1",
4
4
  "sideEffects": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "dependencies": {
9
- "@solar-angular/core": "19.1.0",
10
- "@solar-angular/planets": "19.1.0",
11
- "@solar-angular/platform-browser": "19.1.0",
9
+ "@solar-angular/core": "19.1.1",
10
+ "@solar-angular/planets": "19.1.1",
11
+ "@solar-angular/platform-browser": "19.1.1",
12
12
  "tslib": "^2.3.0"
13
13
  },
14
14
  "peerDependencies": {
@@ -36,10 +36,6 @@
36
36
  "types": "./crud/index.d.ts",
37
37
  "default": "./fesm2022/solar-angular-ui-zorro-crud.mjs"
38
38
  },
39
- "./fan-popover": {
40
- "types": "./fan-popover/index.d.ts",
41
- "default": "./fesm2022/solar-angular-ui-zorro-fan-popover.mjs"
42
- },
43
39
  "./fluent-form": {
44
40
  "types": "./fluent-form/index.d.ts",
45
41
  "default": "./fesm2022/solar-angular-ui-zorro-fluent-form.mjs"
@@ -67,6 +63,10 @@
67
63
  "./updater": {
68
64
  "types": "./updater/index.d.ts",
69
65
  "default": "./fesm2022/solar-angular-ui-zorro-updater.mjs"
66
+ },
67
+ "./fan-popover": {
68
+ "types": "./fan-popover/index.d.ts",
69
+ "default": "./fesm2022/solar-angular-ui-zorro-fan-popover.mjs"
70
70
  }
71
71
  }
72
72
  }