@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,6 +1,6 @@
1
1
  import { HttpEventType } from '@angular/common/http';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, EventEmitter, booleanAttribute, numberAttribute, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { inject, model, input, numberAttribute, booleanAttribute, output, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { EarthService, ObjectStorageService } from '@solar-angular/planets/earth';
5
5
  import { ImageCompressor, FileManager } from '@solar-angular/platform-browser';
6
6
  import { MessageService } from '@solar-angular/ui-zorro/message';
@@ -23,7 +23,7 @@ class SunMediaUploader {
23
23
  this.imageCompressor = inject(ImageCompressor);
24
24
  this.message = inject(MessageService);
25
25
  this.fileManager = inject(FileManager);
26
- this.data = [
26
+ this.data = model([
27
27
  // {
28
28
  // uid: '1',
29
29
  // type: 'image',
@@ -35,31 +35,30 @@ class SunMediaUploader {
35
35
  // type: 'image',
36
36
  // url: '',
37
37
  // }
38
- ];
39
- this.limit = 9;
40
- this.deletable = true;
41
- this.uploadable = true;
42
- this.previewable = true;
43
- this.downloadable = false;
44
- this.shape = 'square';
45
- this.uploadKeys = this.earthService.mediaUploadKeys().pipe(filterResult(), unpackResult());
38
+ ]);
39
+ this.limit = input(9, { transform: numberAttribute });
40
+ this.deletable = input(true, { transform: booleanAttribute });
41
+ this.uploadable = input(true, { transform: booleanAttribute });
42
+ this.previewable = input(true, { transform: booleanAttribute });
43
+ this.downloadable = input(false, { transform: booleanAttribute });
44
+ this.shape = input('square');
45
+ this.uploadKeys = input(this.earthService.mediaUploadKeys().pipe(filterResult(), unpackResult()));
46
46
  /** 启用图片压缩 */
47
- this.compress = false;
48
- this.uploaded = new EventEmitter();
49
- this.delete = new EventEmitter();
50
- this.error = new EventEmitter();
51
- this.dataChange = new EventEmitter();
47
+ this.compress = input(false, { transform: booleanAttribute });
48
+ this.uploaded = output();
49
+ this.delete = output();
50
+ this.error = output();
52
51
  this.upload = (args) => {
53
52
  const file = args.postFile;
54
53
  const ext = fileExtensionOf(args.file.name);
55
- return this.uploadKeys.pipe(switchMap(uploadKey => this.oss.uploadWithEvents(file, `${uploadKey.keys[0]}.${ext}`, uploadKey))).subscribe({
54
+ return this.uploadKeys().pipe(switchMap(uploadKey => this.oss.uploadWithEvents(file, `${uploadKey.keys[0]}.${ext}`, uploadKey))).subscribe({
56
55
  next: event => {
57
56
  switch (event.type) {
58
57
  case HttpEventType.UploadProgress:
59
58
  args.onProgress({ percent: (event.loaded / event.total) * 100 }, args.file);
60
59
  break;
61
60
  case HttpEventType.Response:
62
- this.uploaded.next({
61
+ this.uploaded.emit({
63
62
  url: URL.createObjectURL(file),
64
63
  ...event.body
65
64
  });
@@ -86,38 +85,38 @@ class SunMediaUploader {
86
85
  };
87
86
  }
88
87
  onChange({ type, file, event }) {
89
- const media = this.data.find(o => o.uid === file.uid);
88
+ const media = this.data().find(o => o.uid === file.uid);
90
89
  switch (type) {
91
90
  case 'start': {
92
91
  const url = URL.createObjectURL(file.originFileObj);
93
- this.data = this.data.concat({
92
+ this.data.update(value => value.concat({
94
93
  uid: file.uid,
95
94
  url: url,
96
95
  thumbnailUrl: url,
97
96
  progress: 0.01,
98
97
  type: 'image',
99
98
  file: file.originFileObj
100
- });
101
- this.dataChange.emit(this.data);
99
+ }));
102
100
  break;
103
101
  }
104
102
  case 'progress':
105
103
  media.progress = +event.percent.toFixed(2);
104
+ this.data.update(value => [...value]);
106
105
  break;
107
106
  case 'success':
108
107
  delete media.progress;
108
+ this.data.update(value => [...value]);
109
109
  break;
110
110
  case 'error':
111
- this.data = this.data.filter(o => o.uid !== file.uid);
112
- this.dataChange.emit(this.data);
111
+ this.data.update(value => value.filter(o => o.uid !== file.uid));
113
112
  this.error.emit(media);
114
113
  break;
115
114
  }
116
115
  }
117
116
  onPreview(media) {
118
- const images = this.data.map(o => ({ src: o.url || o.thumbnailUrl }));
117
+ const images = this.data().map(o => ({ src: o.url || o.thumbnailUrl }));
119
118
  const ref = this.imageService.preview(images);
120
- ref.switchTo(this.data.findIndex(o => o === media));
119
+ ref.switchTo(this.data().findIndex(o => o === media));
121
120
  }
122
121
  onDownload(media) {
123
122
  from(this.fileManager.download(media.url)).pipe(this.message.withLoading('正在下载')).subscribe({
@@ -127,7 +126,7 @@ class SunMediaUploader {
127
126
  });
128
127
  }
129
128
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunMediaUploader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
130
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: SunMediaUploader, isStandalone: true, selector: "sun-media-uploader", inputs: { data: "data", limit: ["limit", "limit", numberAttribute], deletable: ["deletable", "deletable", booleanAttribute], uploadable: ["uploadable", "uploadable", booleanAttribute], previewable: ["previewable", "previewable", booleanAttribute], downloadable: ["downloadable", "downloadable", booleanAttribute], shape: "shape", uploadKeys: "uploadKeys", compress: ["compress", "compress", booleanAttribute] }, outputs: { uploaded: "uploaded", delete: "delete", error: "error", dataChange: "dataChange" }, host: { properties: { "class.sun-media-uploader-circle": "shape === 'circle'" }, classAttribute: "sun-media-uploader" }, ngImport: i0, template: "@for (item of data; track item) {\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 <span nz-icon nzType=\"eye\" nzTheme=\"outline\"></span>\u9884\u89C8\n </div>\n }\n @if (downloadable) {\n <div class=\"sun-media-uploader-action\" (click)=\"onDownload(item)\">\n <span nz-icon nzType=\"download\" nzTheme=\"outline\"></span>\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.next(item)\">\n <span nz-icon nzType=\"delete\" nzTheme=\"outline\"></span>\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 <span nz-icon nzType=\"plus\"></span>\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 }); }
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 }); }
131
130
  }
132
131
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunMediaUploader, decorators: [{
133
132
  type: Component,
@@ -138,41 +137,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
138
137
  NzPopconfirmModule
139
138
  ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
140
139
  class: 'sun-media-uploader',
141
- '[class.sun-media-uploader-circle]': `shape === 'circle'`,
142
- }, template: "@for (item of data; track item) {\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 <span nz-icon nzType=\"eye\" nzTheme=\"outline\"></span>\u9884\u89C8\n </div>\n }\n @if (downloadable) {\n <div class=\"sun-media-uploader-action\" (click)=\"onDownload(item)\">\n <span nz-icon nzType=\"download\" nzTheme=\"outline\"></span>\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.next(item)\">\n <span nz-icon nzType=\"delete\" nzTheme=\"outline\"></span>\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 <span nz-icon nzType=\"plus\"></span>\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"] }]
143
- }], propDecorators: { data: [{
144
- type: Input
145
- }], limit: [{
146
- type: Input,
147
- args: [{ transform: numberAttribute }]
148
- }], deletable: [{
149
- type: Input,
150
- args: [{ transform: booleanAttribute }]
151
- }], uploadable: [{
152
- type: Input,
153
- args: [{ transform: booleanAttribute }]
154
- }], previewable: [{
155
- type: Input,
156
- args: [{ transform: booleanAttribute }]
157
- }], downloadable: [{
158
- type: Input,
159
- args: [{ transform: booleanAttribute }]
160
- }], shape: [{
161
- type: Input
162
- }], uploadKeys: [{
163
- type: Input
164
- }], compress: [{
165
- type: Input,
166
- args: [{ transform: booleanAttribute }]
167
- }], uploaded: [{
168
- type: Output
169
- }], delete: [{
170
- type: Output
171
- }], error: [{
172
- type: Output
173
- }], dataChange: [{
174
- type: Output
175
- }] } });
140
+ '[class.sun-media-uploader-circle]': `shape() === 'circle'`,
141
+ }, 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"] }]
142
+ }] });
176
143
 
177
144
  /**
178
145
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"solar-angular-ui-zorro-media-uploader.mjs","sources":["../../../packages/ui-zorro/media-uploader/media-uploader.component.ts","../../../packages/ui-zorro/media-uploader/media-uploader.component.html","../../../packages/ui-zorro/media-uploader/solar-angular-ui-zorro-media-uploader.ts"],"sourcesContent":["import { HttpEventType } from '@angular/common/http';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation, booleanAttribute, inject, numberAttribute } from '@angular/core';\nimport { EarthService, ObjectStorageService } from '@solar-angular/planets/earth';\nimport { FileManager, ImageCompressor } from '@solar-angular/platform-browser';\nimport { MessageService } from '@solar-angular/ui-zorro/message';\nimport { fileExtensionOf } from '@solar-kit/core';\nimport { filterResult, unpackResult } from '@solar-kit/planets/sun';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzImageModule, NzImageService } from 'ng-zorro-antd/image';\nimport { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';\nimport { NzUploadChangeParam, NzUploadFile, NzUploadModule, NzUploadXHRArgs } from 'ng-zorro-antd/upload';\nimport { Observable, from, fromEvent, of, switchMap, take, tap } from 'rxjs';\n\nexport interface SunMedia {\n uid: string;\n type: 'image' | 'video';\n progress?: number;\n active?: boolean;\n file?: Blob;\n url: string\n thumbnailUrl?: string;\n [key: string]: any;\n}\n\n@Component({\n selector: 'sun-media-uploader',\n imports: [\n NzIconModule,\n NzUploadModule,\n NzImageModule,\n NzPopconfirmModule\n ],\n templateUrl: './media-uploader.component.html',\n styleUrl: './media-uploader.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'sun-media-uploader',\n '[class.sun-media-uploader-circle]': `shape === 'circle'`,\n }\n})\nexport class SunMediaUploader {\n private readonly imageService = inject(NzImageService);\n private readonly earthService = inject(EarthService);\n private readonly oss = inject(ObjectStorageService);\n private readonly imageCompressor = inject(ImageCompressor);\n private readonly message = inject(MessageService);\n private readonly fileManager = inject(FileManager);\n\n @Input() data: SunMedia[] = [\n // {\n // uid: '1',\n // type: 'image',\n // url: '',\n // progress: 50\n // },\n // {\n // uid: '2',\n // type: 'image',\n // url: '',\n // }\n ];\n @Input({ transform: numberAttribute }) limit = 9;\n @Input({ transform: booleanAttribute }) deletable = true;\n @Input({ transform: booleanAttribute }) uploadable = true;\n @Input({ transform: booleanAttribute }) previewable = true;\n @Input({ transform: booleanAttribute }) downloadable = false;\n @Input() shape: 'circle' | 'square' = 'square';\n @Input() uploadKeys = this.earthService.mediaUploadKeys().pipe(\n filterResult(),\n unpackResult(),\n );\n /** 启用图片压缩 */\n @Input({ transform: booleanAttribute }) compress = false;\n\n @Output() uploaded = new EventEmitter<{ key: string, hash: string, url: string }>();\n @Output() delete = new EventEmitter<SunMedia>();\n @Output() error = new EventEmitter<SunMedia>();\n @Output() dataChange = new EventEmitter<SunMedia[]>();\n\n get transform() {\n return (file: NzUploadFile): Observable<Blob> => {\n if (!file.type?.startsWith('image/')) {\n return of(file as any);\n }\n\n const { messageId } = this.message.loading('正在压缩图像');\n const reader = new FileReader();\n\n const source = fromEvent(reader, 'load').pipe(\n take(1),\n switchMap(() => this.imageCompressor.compress(reader.result as string)),\n tap(() => this.message.remove(messageId))\n );\n reader.readAsDataURL(file as any);\n\n return source;\n };\n }\n\n upload = (args: NzUploadXHRArgs) => {\n const file = args.postFile as File;\n const ext = fileExtensionOf(args.file.name);\n\n return this.uploadKeys.pipe(\n switchMap(uploadKey => this.oss.uploadWithEvents(file, `${uploadKey.keys[0]}.${ext}`, uploadKey)),\n ).subscribe({\n next: event => {\n switch (event.type) {\n case HttpEventType.UploadProgress:\n args.onProgress!({ percent: (event.loaded / event.total!) * 100 }, args.file);\n break;\n\n case HttpEventType.Response:\n this.uploaded.next({\n url: URL.createObjectURL(file),\n ...event.body!\n });\n args.onSuccess!(event.body, args.file, event);\n break;\n }\n },\n error: error => {\n args.onError!(error, args.file);\n }\n });\n };\n\n onChange({ type, file, event }: NzUploadChangeParam): void {\n const media = this.data.find(o => o.uid === file.uid)!;\n\n switch (type) {\n case 'start': {\n const url = URL.createObjectURL(file.originFileObj!);\n this.data = this.data.concat({\n uid: file.uid,\n url: url,\n thumbnailUrl: url,\n progress: 0.01,\n type: 'image',\n file: file.originFileObj\n });\n this.dataChange.emit(this.data);\n break;\n }\n\n case 'progress':\n media.progress = +event!.percent.toFixed(2);\n break;\n\n case 'success':\n delete media.progress;\n break;\n\n case 'error':\n this.data = this.data.filter(o => o.uid !== file.uid);\n this.dataChange.emit(this.data);\n this.error.emit(media);\n break;\n }\n }\n\n onPreview(media: SunMedia) {\n const images = this.data.map(o => ({ src: o.url || o.thumbnailUrl! }));\n const ref = this.imageService.preview(images);\n ref.switchTo(this.data.findIndex(o => o === media));\n }\n\n onDownload(media: SunMedia) {\n from(this.fileManager.download(media.url)).pipe(\n this.message.withLoading('正在下载')\n ).subscribe({\n error: () => {\n this.message.error('下载失败');\n }\n });\n }\n}\n","@for (item of data; track item) {\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>上传中...</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 <span nz-icon nzType=\"eye\" nzTheme=\"outline\"></span>预览\n </div>\n }\n @if (downloadable) {\n <div class=\"sun-media-uploader-action\" (click)=\"onDownload(item)\">\n <span nz-icon nzType=\"download\" nzTheme=\"outline\"></span>下载\n </div>\n }\n @if (deletable) {\n <div\n class=\"sun-media-uploader-action\"\n nz-popconfirm\n nzType=\"danger\"\n nzPopconfirmTitle=\"您确定要删除该项目吗?\"\n nzOkDanger\n (nzOnConfirm)=\"delete.next(item)\">\n <span nz-icon nzType=\"delete\" nzTheme=\"outline\"></span>删除\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 <span nz-icon nzType=\"plus\"></span>\n <div class=\"sun-media-uploader-btn-text\">点击上传</div>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CAAoB,kBAAA,CAAA;AAC1D,qBAAA,EAAA,QAAA,EAAA,g/DAAA,EAAA,MAAA,EAAA,CAAA,mnDAAA,CAAA,EAAA;8BAUQ,IAAI,EAAA,CAAA;sBAAZ;gBAasC,KAAK,EAAA,CAAA;sBAA3C,KAAK;uBAAC,EAAE,SAAS,EAAE,eAAe,EAAE;gBACG,SAAS,EAAA,CAAA;sBAAhD,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBACE,UAAU,EAAA,CAAA;sBAAjD,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBACE,WAAW,EAAA,CAAA;sBAAlD,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBACE,YAAY,EAAA,CAAA;sBAAnD,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBAC7B,KAAK,EAAA,CAAA;sBAAb;gBACQ,UAAU,EAAA,CAAA;sBAAlB;gBAKuC,QAAQ,EAAA,CAAA;sBAA/C,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;gBAE5B,QAAQ,EAAA,CAAA;sBAAjB;gBACS,MAAM,EAAA,CAAA;sBAAf;gBACS,KAAK,EAAA,CAAA;sBAAd;gBACS,UAAU,EAAA,CAAA;sBAAnB;;;AE9EH;;AAEG;;;;"}
1
+ {"version":3,"file":"solar-angular-ui-zorro-media-uploader.mjs","sources":["../../../packages/ui-zorro/media-uploader/media-uploader.component.ts","../../../packages/ui-zorro/media-uploader/media-uploader.component.html","../../../packages/ui-zorro/media-uploader/solar-angular-ui-zorro-media-uploader.ts"],"sourcesContent":["import { HttpEventType } from '@angular/common/http';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation, booleanAttribute, inject, input, model, numberAttribute, output } from '@angular/core';\nimport { EarthService, ObjectStorageService } from '@solar-angular/planets/earth';\nimport { FileManager, ImageCompressor } from '@solar-angular/platform-browser';\nimport { MessageService } from '@solar-angular/ui-zorro/message';\nimport { fileExtensionOf } from '@solar-kit/core';\nimport { filterResult, unpackResult } from '@solar-kit/planets/sun';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzImageModule, NzImageService } from 'ng-zorro-antd/image';\nimport { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';\nimport { NzUploadChangeParam, NzUploadFile, NzUploadModule, NzUploadXHRArgs } from 'ng-zorro-antd/upload';\nimport { Observable, from, fromEvent, of, switchMap, take, tap } from 'rxjs';\n\nexport interface SunMedia {\n uid: string;\n type: 'image' | 'video';\n progress?: number;\n active?: boolean;\n file?: Blob;\n url: string\n thumbnailUrl?: string;\n [key: string]: any;\n}\n\n@Component({\n selector: 'sun-media-uploader',\n imports: [\n NzIconModule,\n NzUploadModule,\n NzImageModule,\n NzPopconfirmModule\n ],\n templateUrl: './media-uploader.component.html',\n styleUrl: './media-uploader.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'sun-media-uploader',\n '[class.sun-media-uploader-circle]': `shape() === 'circle'`,\n }\n})\nexport class SunMediaUploader {\n private readonly imageService = inject(NzImageService);\n private readonly earthService = inject(EarthService);\n private readonly oss = inject(ObjectStorageService);\n private readonly imageCompressor = inject(ImageCompressor);\n private readonly message = inject(MessageService);\n private readonly fileManager = inject(FileManager);\n\n readonly data = model<SunMedia[]>([\n // {\n // uid: '1',\n // type: 'image',\n // url: '',\n // progress: 50\n // },\n // {\n // uid: '2',\n // type: 'image',\n // url: '',\n // }\n ]);\n readonly limit = input(9, { transform: numberAttribute });\n readonly deletable = input(true, { transform: booleanAttribute });\n readonly uploadable = input(true, { transform: booleanAttribute });\n readonly previewable = input(true, { transform: booleanAttribute });\n readonly downloadable = input(false, { transform: booleanAttribute });\n readonly shape = input<'circle' | 'square'>('square');\n readonly uploadKeys = input(this.earthService.mediaUploadKeys().pipe(filterResult(), unpackResult()));\n /** 启用图片压缩 */\n readonly compress = input(false, { transform: booleanAttribute });\n\n readonly uploaded = output<{\n key: string;\n hash: string;\n url: string;\n }>();\n readonly delete = output<SunMedia>();\n readonly error = output<SunMedia>();\n\n get transform() {\n return (file: NzUploadFile): Observable<Blob> => {\n if (!file.type?.startsWith('image/')) {\n return of(file as any);\n }\n\n const { messageId } = this.message.loading('正在压缩图像');\n const reader = new FileReader();\n\n const source = fromEvent(reader, 'load').pipe(\n take(1),\n switchMap(() => this.imageCompressor.compress(reader.result as string)),\n tap(() => this.message.remove(messageId))\n );\n reader.readAsDataURL(file as any);\n\n return source;\n };\n }\n\n readonly upload = (args: NzUploadXHRArgs) => {\n const file = args.postFile as File;\n const ext = fileExtensionOf(args.file.name);\n\n return this.uploadKeys().pipe(\n switchMap(uploadKey => this.oss.uploadWithEvents(file, `${uploadKey.keys[0]}.${ext}`, uploadKey)),\n ).subscribe({\n next: event => {\n switch (event.type) {\n case HttpEventType.UploadProgress:\n args.onProgress!({ percent: (event.loaded / event.total!) * 100 }, args.file);\n break;\n\n case HttpEventType.Response:\n this.uploaded.emit({\n url: URL.createObjectURL(file),\n ...event.body!\n });\n args.onSuccess!(event.body, args.file, event);\n break;\n }\n },\n error: error => {\n args.onError!(error, args.file);\n }\n });\n };\n\n onChange({ type, file, event }: NzUploadChangeParam): void {\n const media = this.data().find(o => o.uid === file.uid)!;\n\n switch (type) {\n case 'start': {\n const url = URL.createObjectURL(file.originFileObj!);\n this.data.update(value =>\n value.concat({\n uid: file.uid,\n url: url,\n thumbnailUrl: url,\n progress: 0.01,\n type: 'image',\n file: file.originFileObj\n })\n )\n break;\n }\n\n case 'progress':\n media.progress = +event!.percent.toFixed(2);\n this.data.update(value => [...value])\n break;\n\n case 'success':\n delete media.progress;\n this.data.update(value => [...value])\n break;\n\n case 'error':\n this.data.update(value => value.filter(o => o.uid !== file.uid))\n this.error.emit(media);\n break;\n }\n }\n\n onPreview(media: SunMedia) {\n const images = this.data().map(o => ({ src: o.url || o.thumbnailUrl! }));\n const ref = this.imageService.preview(images);\n ref.switchTo(this.data().findIndex(o => o === media));\n }\n\n onDownload(media: SunMedia) {\n from(this.fileManager.download(media.url)).pipe(\n this.message.withLoading('正在下载')\n ).subscribe({\n error: () => {\n this.message.error('下载失败');\n }\n });\n }\n}\n","@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>上传中...</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 预览\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 下载\n </div>\n }\n @if (deletable()) {\n <div\n class=\"sun-media-uploader-action\"\n nz-popconfirm\n nzType=\"danger\"\n nzPopconfirmTitle=\"您确定要删除该项目吗?\"\n nzOkDanger\n (nzOnConfirm)=\"delete.emit(item)\">\n <nz-icon nzType=\"delete\" nzTheme=\"outline\"></nz-icon>\n 删除\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\">点击上传</div>\n </div>\n</nz-upload>\n","/**\n * Generated bundle index. Do not edit.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ACD,qBAAA,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAC/B,IAAA,EAAA;AACJ,wBAAA,KAAK,EAAE,oBAAoB;AAC3B,wBAAA,mCAAmC,EAAE,CAAsB,oBAAA,CAAA;AAC5D,qBAAA,EAAA,QAAA,EAAA,qiEAAA,EAAA,MAAA,EAAA,CAAA,mnDAAA,CAAA,EAAA;;;AEvCH;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { RouterLink } from '@angular/router';
4
4
  import * as i3 from 'ng-zorro-antd/button';
5
5
  import { NzButtonModule } from 'ng-zorro-antd/button';
@@ -12,7 +12,7 @@ import * as i5 from 'ng-zorro-antd/core/wave';
12
12
 
13
13
  class SunForbiddenPage {
14
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 <span nz-icon nzType=\"arrow-left\" nzTheme=\"outline\"></span>\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"] }] }); }
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 }); }
16
16
  }
17
17
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunForbiddenPage, decorators: [{
18
18
  type: Component,
@@ -21,7 +21,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
21
21
  NzResultModule,
22
22
  NzIconModule,
23
23
  NzButtonModule
24
- ], 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 <span nz-icon nzType=\"arrow-left\" nzTheme=\"outline\"></span>\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"] }]
24
+ ], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
25
25
  }] });
26
26
 
27
27
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"solar-angular-ui-zorro-page-forbidden.mjs","sources":["../../../packages/ui-zorro/page-forbidden/forbidden.page.ts","../../../packages/ui-zorro/page-forbidden/forbidden.page.html","../../../packages/ui-zorro/page-forbidden/solar-angular-ui-zorro-page-forbidden.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzResultModule } from 'ng-zorro-antd/result';\n\n@Component({\n selector: 'sun-forbidden',\n imports: [\n RouterLink,\n NzResultModule,\n NzIconModule,\n NzButtonModule\n ],\n templateUrl: './forbidden.page.html',\n styleUrl: './forbidden.page.scss'\n})\nexport class SunForbiddenPage { }\n","<nz-result nzStatus=\"403\" nzTitle=\"403\" nzSubTitle=\"抱歉,您没有权限访问该页面\">\n <div nz-result-extra>\n <button nz-button nzType=\"primary\" routerLink=\"/\">\n <span nz-icon nzType=\"arrow-left\" nzTheme=\"outline\"></span>\n 返回主页\n </button>\n </div>\n</nz-result>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAiBa,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECjB7B,iXAQA,EDCI,MAAA,EAAA,CAAA,4IAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,UAAU,mOACV,cAAc,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,SAAA,EAAA,UAAA,EAAA,YAAA,EAAA,SAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACd,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,YAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACZ,cAAc,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,QAAA,EAAA,iCAAA,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,CAAA,CAAA;;4FAKL,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAX5B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAChB,OAAA,EAAA;wBACP,UAAU;wBACV,cAAc;wBACd,YAAY;wBACZ;AACD,qBAAA,EAAA,QAAA,EAAA,iXAAA,EAAA,MAAA,EAAA,CAAA,4IAAA,CAAA,EAAA;;;AEbH;;AAEG;;;;"}
1
+ {"version":3,"file":"solar-angular-ui-zorro-page-forbidden.mjs","sources":["../../../packages/ui-zorro/page-forbidden/forbidden.page.ts","../../../packages/ui-zorro/page-forbidden/forbidden.page.html","../../../packages/ui-zorro/page-forbidden/solar-angular-ui-zorro-page-forbidden.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzResultModule } from 'ng-zorro-antd/result';\n\n@Component({\n selector: 'sun-forbidden',\n imports: [\n RouterLink,\n NzResultModule,\n NzIconModule,\n NzButtonModule\n ],\n templateUrl: './forbidden.page.html',\n styleUrl: './forbidden.page.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SunForbiddenPage { }\n","<nz-result nzStatus=\"403\" nzTitle=\"403\" nzSubTitle=\"抱歉,您没有权限访问该页面\">\n <div nz-result-extra>\n <button nz-button nzType=\"primary\" routerLink=\"/\">\n <nz-icon nzType=\"arrow-left\" nzTheme=\"outline\"></nz-icon>\n 返回主页\n </button>\n </div>\n</nz-result>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAkBa,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EClB7B,+WAQA,EDCI,MAAA,EAAA,CAAA,4IAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,UAAU,mOACV,cAAc,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,SAAA,EAAA,UAAA,EAAA,YAAA,EAAA,SAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA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A,EAAA;wBACP,UAAU;wBACV,cAAc;wBACd,YAAY;wBACZ;qBACD,EAGgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,+WAAA,EAAA,MAAA,EAAA,CAAA,4IAAA,CAAA,EAAA;;;AEhBjD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { AsyncPipe } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { Component } from '@angular/core';
3
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
5
  import * as i4 from 'ng-zorro-antd/button';
6
6
  import { NzButtonModule } from 'ng-zorro-antd/button';
@@ -23,7 +23,7 @@ class SunLogoutPage {
23
23
  this.router.navigateByUrl('/login');
24
24
  }
25
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 <span nz-icon nzType=\"arrow-right\" nzTheme=\"outline\"></span>\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"] }] }); }
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 }); }
27
27
  }
28
28
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunLogoutPage, decorators: [{
29
29
  type: Component,
@@ -32,7 +32,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
32
32
  NzResultModule,
33
33
  NzIconModule,
34
34
  NzButtonModule
35
- ], 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 <span nz-icon nzType=\"arrow-right\" nzTheme=\"outline\"></span>\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"] }]
35
+ ], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
36
36
  }], ctorParameters: () => [{ type: i1.Router }] });
37
37
 
38
38
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"solar-angular-ui-zorro-page-logout.mjs","sources":["../../../packages/ui-zorro/page-logout/logout.page.ts","../../../packages/ui-zorro/page-logout/logout.page.html","../../../packages/ui-zorro/page-logout/solar-angular-ui-zorro-page-logout.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { Component } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Router } from '@angular/router';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzResultModule } from 'ng-zorro-antd/result';\nimport { last, shareReplay, take, timer } from 'rxjs';\n\n@Component({\n selector: 'sun-logout',\n imports: [\n AsyncPipe,\n NzResultModule,\n NzIconModule,\n NzButtonModule\n ],\n templateUrl: './logout.page.html',\n styleUrl: './logout.page.scss'\n})\nexport class SunLogoutPage {\n protected readonly interval$ = timer(0, 1000).pipe(\n take(6),\n shareReplay(1)\n );\n\n constructor(private router: Router) {\n this.interval$.pipe(\n last(),\n takeUntilDestroyed()\n ).subscribe(() => this.login());\n }\n\n login() {\n this.router.navigateByUrl('/login');\n }\n\n}\n","<nz-result\n nzStatus=\"success\"\n nzTitle=\"您已成功退出登录!\"\n [nzSubTitle]=\"'系统将在 ' + (5 - (interval$ | async)!) + ' 秒后自动重定向...'\"\n>\n <div nz-result-extra>\n <button nz-button nzType=\"primary\" (click)=\"login()\">\n <span nz-icon nzType=\"arrow-right\" nzTheme=\"outline\"></span>\n 立即登录\n </button>\n </div>\n</nz-result>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAoBa,aAAa,CAAA;AAMxB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;QALP,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,CAChD,IAAI,CAAC,CAAC,CAAC,EACP,WAAW,CAAC,CAAC,CAAC,CACf;QAGC,IAAI,CAAC,SAAS,CAAC,IAAI,CACjB,IAAI,EAAE,EACN,kBAAkB,EAAE,CACrB,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;;IAGjC,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC;;+GAd1B,aAAa,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,CAAA,EAAA,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,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,CAAA,CAAA;;4FAKL,aAAa,EAAA,UAAA,EAAA,CAAA;kBAXzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EACb,OAAA,EAAA;wBACP,SAAS;wBACT,cAAc;wBACd,YAAY;wBACZ;AACD,qBAAA,EAAA,QAAA,EAAA,idAAA,EAAA,MAAA,EAAA,CAAA,4IAAA,CAAA,EAAA;;;AEhBH;;AAEG;;;;"}
1
+ {"version":3,"file":"solar-angular-ui-zorro-page-logout.mjs","sources":["../../../packages/ui-zorro/page-logout/logout.page.ts","../../../packages/ui-zorro/page-logout/logout.page.html","../../../packages/ui-zorro/page-logout/solar-angular-ui-zorro-page-logout.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Router } from '@angular/router';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzResultModule } from 'ng-zorro-antd/result';\nimport { last, shareReplay, take, timer } from 'rxjs';\n\n@Component({\n selector: 'sun-logout',\n imports: [\n AsyncPipe,\n NzResultModule,\n NzIconModule,\n NzButtonModule\n ],\n templateUrl: './logout.page.html',\n styleUrl: './logout.page.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SunLogoutPage {\n protected readonly interval$ = timer(0, 1000).pipe(\n take(6),\n shareReplay(1)\n );\n\n constructor(private router: Router) {\n this.interval$.pipe(\n last(),\n takeUntilDestroyed()\n ).subscribe(() => this.login());\n }\n\n login() {\n this.router.navigateByUrl('/login');\n }\n\n}\n","<nz-result\n nzStatus=\"success\"\n nzTitle=\"您已成功退出登录!\"\n [nzSubTitle]=\"'系统将在 ' + (5 - (interval$ | async)!) + ' 秒后自动重定向...'\"\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 立即登录\n </button>\n </div>\n</nz-result>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAqBa,aAAa,CAAA;AAMxB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;QALP,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,CAChD,IAAI,CAAC,CAAC,CAAC,EACP,WAAW,CAAC,CAAC,CAAC,CACf;QAGC,IAAI,CAAC,SAAS,CAAC,IAAI,CACjB,IAAI,EAAE,EACN,kBAAkB,EAAE,CACrB,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;;IAGjC,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC;;+GAd1B,aAAa,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECrB1B,+cAYA,EDAI,MAAA,EAAA,CAAA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,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;;4FAML,aAAa,EAAA,UAAA,EAAA,CAAA;kBAZzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EACb,OAAA,EAAA;wBACP,SAAS;wBACT,cAAc;wBACd,YAAY;wBACZ;qBACD,EAGgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,+cAAA,EAAA,MAAA,EAAA,CAAA,4IAAA,CAAA,EAAA;;;AEnBjD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component } from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { RouterLink } from '@angular/router';
4
4
  import * as i3 from 'ng-zorro-antd/button';
5
5
  import { NzButtonModule } from 'ng-zorro-antd/button';
@@ -12,7 +12,7 @@ import * as i5 from 'ng-zorro-antd/core/wave';
12
12
 
13
13
  class SunNotFoundPage {
14
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 <span nz-icon nzType=\"arrow-left\" nzTheme=\"outline\"></span>\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"] }] }); }
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 }); }
16
16
  }
17
17
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunNotFoundPage, decorators: [{
18
18
  type: Component,
@@ -21,7 +21,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
21
21
  NzResultModule,
22
22
  NzIconModule,
23
23
  NzButtonModule
24
- ], 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 <span nz-icon nzType=\"arrow-left\" nzTheme=\"outline\"></span>\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"] }]
24
+ ], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
25
25
  }] });
26
26
 
27
27
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"solar-angular-ui-zorro-page-not-found.mjs","sources":["../../../packages/ui-zorro/page-not-found/not-found.page.ts","../../../packages/ui-zorro/page-not-found/not-found.page.html","../../../packages/ui-zorro/page-not-found/solar-angular-ui-zorro-page-not-found.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzResultModule } from 'ng-zorro-antd/result';\n\n@Component({\n selector: 'sun-not-found',\n imports: [\n RouterLink,\n NzResultModule,\n NzIconModule,\n NzButtonModule\n ],\n templateUrl: './not-found.page.html',\n styleUrl: './not-found.page.scss'\n})\nexport class SunNotFoundPage { }\n","<nz-result nzStatus=\"404\" nzTitle=\"404\" nzSubTitle=\"抱歉,您访问的页面不存在\">\n <div nz-result-extra>\n <button nz-button nzType=\"primary\" routerLink=\"/\">\n <span nz-icon nzType=\"arrow-left\" nzTheme=\"outline\"></span>\n 返回主页\n </button>\n </div>\n</nz-result>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAiBa,eAAe,CAAA;+GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECjB5B,2WAQA,EDCI,MAAA,EAAA,CAAA,4IAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,UAAU,mOACV,cAAc,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,SAAA,EAAA,UAAA,EAAA,YAAA,EAAA,SAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,QAAA,EAAA,C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AEbH;;AAEG;;;;"}
1
+ {"version":3,"file":"solar-angular-ui-zorro-page-not-found.mjs","sources":["../../../packages/ui-zorro/page-not-found/not-found.page.ts","../../../packages/ui-zorro/page-not-found/not-found.page.html","../../../packages/ui-zorro/page-not-found/solar-angular-ui-zorro-page-not-found.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzResultModule } from 'ng-zorro-antd/result';\n\n@Component({\n selector: 'sun-not-found',\n imports: [\n RouterLink,\n NzResultModule,\n NzIconModule,\n NzButtonModule\n ],\n templateUrl: './not-found.page.html',\n styleUrl: './not-found.page.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SunNotFoundPage { }\n","<nz-result nzStatus=\"404\" nzTitle=\"404\" nzSubTitle=\"抱歉,您访问的页面不存在\">\n <div nz-result-extra>\n <button nz-button nzType=\"primary\" routerLink=\"/\">\n <nz-icon nzType=\"arrow-left\" nzTheme=\"outline\"></nz-icon>\n 返回主页\n </button>\n </div>\n</nz-result>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAkBa,eAAe,CAAA;+GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EClB5B,yWAQA,EDCI,MAAA,EAAA,CAAA,4IAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,UAAU,mOACV,cAAc,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,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EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAML,eAAe,EAAA,UAAA,EAAA,CAAA;kBAZ3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAChB,OAAA,EAAA;wBACP,UAAU;wBACV,cAAc;wBACd,YAAY;wBACZ;qBACD,EAGgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,yWAAA,EAAA,MAAA,EAAA,CAAA,4IAAA,CAAA,EAAA;;;AEhBjD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Injectable, TemplateRef, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { inject, Injectable, viewChild, TemplateRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { SwUpdate } from '@angular/service-worker';
4
4
  import { NzMessageService } from 'ng-zorro-antd/message';
5
5
  import { DOCUMENT } from '@angular/common';
@@ -7,10 +7,10 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
7
  import * as i1 from 'ng-zorro-antd/button';
8
8
  import { NzButtonModule } from 'ng-zorro-antd/button';
9
9
  import { NzIconModule } from 'ng-zorro-antd/icon';
10
- import { NzNotificationService, NzNotificationModule } from 'ng-zorro-antd/notification';
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, tap, exhaustMap } from 'rxjs';
13
+ import { filter, exhaustMap } 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
 
@@ -20,12 +20,10 @@ class AppUpdater {
20
20
  this.message = inject(NzMessageService);
21
21
  }
22
22
  checkForUpdate() {
23
- const loading = this.message.loading('正在检查更新...', { nzDuration: 0 });
24
23
  this.update.checkForUpdate()
25
24
  // 这里我们只处理 bool 为 false 的情况;如果为 true,意味着有新版本,应该由 sun-updates 组件处理
26
25
  .then(bool => bool || this.message.info('当前已是最新版本'))
27
- .catch(() => this.message.error('检查更新失败'))
28
- .finally(() => this.message.remove(loading.messageId));
26
+ .catch(() => this.message.error('检查更新失败'));
29
27
  }
30
28
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppUpdater, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
31
29
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AppUpdater, providedIn: 'root' }); }
@@ -41,11 +39,13 @@ class SunUpdater {
41
39
  constructor() {
42
40
  this.location = inject(DOCUMENT).defaultView.location;
43
41
  this.notification = inject(NzNotificationService);
42
+ this.templateRef = viewChild.required(TemplateRef);
44
43
  const updater = inject(SwUpdate);
45
44
  let loadingRef;
46
- updater.versionUpdates.pipe(filter(event => event.type === 'VERSION_DETECTED'), tap(() => {
45
+ updater.versionUpdates.pipe(filter(event => event.type === 'VERSION_DETECTED'), exhaustMap(() => {
47
46
  loadingRef = this.notification.info('温馨提示', '发现新版本,正在下载更新...', { nzCloseIcon: 'loading', nzDuration: 0 });
48
- }), exhaustMap(() => updater.versionUpdates.pipe(filter(event => event.type === 'VERSION_READY'))), takeUntilDestroyed()).subscribe(() => {
47
+ return updater.versionUpdates.pipe(filter(event => event.type === 'VERSION_READY'));
48
+ }), takeUntilDestroyed()).subscribe(() => {
49
49
  this.notification.remove(loadingRef.messageId);
50
50
  this.present();
51
51
  });
@@ -59,7 +59,7 @@ class SunUpdater {
59
59
  }
60
60
  present() {
61
61
  this.notification.info('新版本已就绪', '为了让您获得更好的使用体验,我们建议您立即进行更新。', {
62
- nzButton: this.templateRef,
62
+ nzButton: this.templateRef(),
63
63
  nzDuration: 0
64
64
  });
65
65
  }
@@ -73,20 +73,16 @@ class SunUpdater {
73
73
  }, 1000 * 60 * 5); // 5min
74
74
  }
75
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: "14.0.0", version: "19.2.14", type: SunUpdater, isStandalone: true, selector: "sun-updater", viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: 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]" }, { kind: "ngmodule", type: NzNotificationModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
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 }); }
77
77
  }
78
78
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SunUpdater, decorators: [{
79
79
  type: Component,
80
80
  args: [{ selector: 'sun-updater', imports: [
81
81
  NzIconModule,
82
82
  NzButtonModule,
83
- NzSpaceModule,
84
- NzNotificationModule
83
+ NzSpaceModule
85
84
  ], changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
86
- }], ctorParameters: () => [], propDecorators: { templateRef: [{
87
- type: ViewChild,
88
- args: [TemplateRef, { static: true }]
89
- }] } });
85
+ }], ctorParameters: () => [] });
90
86
 
91
87
  /**
92
88
  * Generated bundle index. Do not edit.