cmat 0.0.83 → 0.0.85

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.
Files changed (39) hide show
  1. package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
  2. package/fesm2022/cmat-components-custom-formly.mjs +1 -2
  3. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  4. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  5. package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
  6. package/fesm2022/cmat-components-drawer.mjs +0 -2
  7. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  8. package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
  9. package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
  10. package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
  11. package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
  12. package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
  13. package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
  14. package/fesm2022/cmat-components-page-header.mjs.map +1 -1
  15. package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
  16. package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
  17. package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
  18. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  19. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  20. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  21. package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
  22. package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
  23. package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
  24. package/fesm2022/cmat-components-upload.mjs +23 -10
  25. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  26. package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
  27. package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
  28. package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
  29. package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
  30. package/fesm2022/cmat.mjs +24 -14
  31. package/fesm2022/cmat.mjs.map +1 -1
  32. package/package.json +16 -16
  33. package/types/cmat-components-date-range.d.ts +1 -0
  34. package/types/cmat-components-drawer.d.ts +0 -1
  35. package/types/cmat-components-upload.d.ts +48 -50
  36. package/types/cmat-directives-data-exporter.d.ts +1 -1
  37. package/types/cmat-pipes-group-by.d.ts +1 -0
  38. package/types/cmat-services-local-storage.d.ts +5 -1
  39. package/types/cmat.d.ts +40 -39
package/fesm2022/cmat.mjs CHANGED
@@ -3879,10 +3879,9 @@ class CmatQuillTypeComponent extends FieldType {
3879
3879
  isPublic: false,
3880
3880
  fileCategory: 'Quill',
3881
3881
  filePath: this.props.filePath,
3882
- fileType: 'file',
3882
+ fileType: CmatUtilsService$1.getFileType(file.type),
3883
3883
  data: file
3884
3884
  };
3885
- fileModel.fileType = CmatUtilsService$1.getFileType(file.type);
3886
3885
  const formData = new FormData();
3887
3886
  formData.set('fileData', file, file.name);
3888
3887
  formData.append('fileInfo', JSON.stringify(fileModel));
@@ -4723,7 +4722,6 @@ class CmatDrawerComponent {
4723
4722
  this._overlayClickDestroyFn = null;
4724
4723
  this._overlayLeaveTimeoutId = null;
4725
4724
  this._modeChangeTimeoutId = null;
4726
- this._destroyed = false;
4727
4725
  }
4728
4726
  get classList() {
4729
4727
  /* eslint-disable @typescript-eslint/naming-convention */
@@ -4787,7 +4785,6 @@ class CmatDrawerComponent {
4787
4785
  this._cmatDrawerService.registerComponent(this.name, this);
4788
4786
  }
4789
4787
  ngOnDestroy() {
4790
- this._destroyed = true;
4791
4788
  this._cmatDrawerService.deregisterComponent(this.name);
4792
4789
  this._cleanupOverlay();
4793
4790
  if (this._modeChangeTimeoutId !== null) {
@@ -15836,6 +15833,10 @@ class CmatUploadComponent {
15836
15833
  get fileType() {
15837
15834
  return CmatUtilsService$1.getFileType(this.file.type);
15838
15835
  }
15836
+ // eslint-disable-next-line @typescript-eslint/member-ordering
15837
+ get fileSize() {
15838
+ return Number(this.file.size);
15839
+ }
15839
15840
  ngOnInit() {
15840
15841
  if (this.autoUpload && this.id === null) {
15841
15842
  this.upload();
@@ -15850,12 +15851,13 @@ class CmatUploadComponent {
15850
15851
  fileCategory: this.fileCategory,
15851
15852
  isPublic: this.isPublic,
15852
15853
  filePath: this.filePath,
15853
- fileType: 'file',
15854
- data: this.file
15854
+ fileType: this.fileType,
15855
+ data: this._file
15855
15856
  };
15856
- fileModel.fileType = this.fileType;
15857
15857
  const formData = new FormData();
15858
- formData.set('fileData', this._file, this._file.name);
15858
+ if (this._file.data) {
15859
+ formData.set(this.fileAlias, this._file.data, this._file.fileName);
15860
+ }
15859
15861
  formData.append('fileInfo', JSON.stringify(fileModel));
15860
15862
  this._fileService.uploadFile(formData).pipe(takeUntilDestroyed(this._destroyRef)).subscribe((event) => {
15861
15863
  if (event.type === HttpEventType.UploadProgress && typeof event.total === 'number') {
@@ -15887,11 +15889,11 @@ class CmatUploadComponent {
15887
15889
  this.removeEvent.emit(this);
15888
15890
  }
15889
15891
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15890
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatUploadComponent, isStandalone: true, selector: "cmat-upload", inputs: { fileAlias: "fileAlias", filePath: "filePath", fileCategory: "fileCategory", isPublic: "isPublic", editMode: "editMode", autoUpload: "autoUpload", id: "id", file: "file" }, outputs: { removeEvent: "removeEvent", uploadEvent: "uploadEvent" }, exportAs: ["cmatUpload"], ngImport: i0, template: "<div class=\"flex flex-col\">\r\n <div class=\"flex flex-row items-center\">\r\n <span class=\"flex items-center px-1\">\r\n <mat-icon class=\"icon-size-6 text-hint\"\r\n [svgIcon]=\"fileType\"></mat-icon>\r\n </span>\r\n <span matTooltip=\"{{file.name}}\"\r\n class=\"text-sm flex flex-auto whitespace-nowrap overflow-x-hidden text-ellipsis\">{{file.name}}({{file.size | cmatBytes}})</span>\r\n <span class=\"flex flex-row gap-1 print:hidden\">\r\n @if(id===null){\r\n <button matIconButton color=\"primary\" class=\"w-8 min-h-8 h-8 max-w-8\" [ngClass]=\"{'disabled' : isUploading()}\"\r\n (click)=\"upload()\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon>\r\n </button>\r\n }\r\n\r\n @if(id!==null){\r\n <button matIconButton color=\"primary\" class=\"w-8 min-h-8 h-8 max-w-8\" (click)=\"download()\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'mat_outline:file_download'\"></mat-icon>\r\n </button>\r\n }\r\n\r\n @if(editMode){\r\n <button matIconButton color=\"warn\" class=\"w-8 min-h-8 h-8 max-w-8\" (click)=\"remove()\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon>\r\n </button>\r\n }\r\n </span>\r\n </div>\r\n @if(id===null){\r\n <mat-progress-bar [value]=\"progressPercentage()\"></mat-progress-bar>\r\n <div class=\"text-sm block whitespace-nowrap overflow-x-hidden text-ellipsis\">\r\n <span>{{progressPercentage()}}%</span><span> {{loaded() | cmatBytes}} of {{total() | cmatBytes}}</span>\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i1$g.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$b.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: CmatBytesPipe$1, name: "cmatBytes" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
15892
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatUploadComponent, isStandalone: true, selector: "cmat-upload", inputs: { fileAlias: "fileAlias", filePath: "filePath", fileCategory: "fileCategory", isPublic: "isPublic", editMode: "editMode", autoUpload: "autoUpload", id: "id", file: "file" }, outputs: { removeEvent: "removeEvent", uploadEvent: "uploadEvent" }, exportAs: ["cmatUpload"], ngImport: i0, template: "<div class=\"flex flex-col\">\r\n <div class=\"flex flex-row items-center\">\r\n <span class=\"flex items-center px-1\">\r\n <mat-icon class=\"icon-size-6 text-hint\" [svgIcon]=\"fileType\"></mat-icon>\r\n </span>\r\n <span matTooltip=\"{{file.name}}\"\r\n class=\"text-sm flex flex-auto whitespace-nowrap overflow-x-hidden text-ellipsis\">{{file.name}}({{fileSize |\r\n cmatBytes}})</span>\r\n <span class=\"flex flex-row gap-1 print:hidden\">\r\n @if(id===null){\r\n <button matIconButton color=\"primary\" class=\"w-8 min-h-8 h-8 max-w-8\" [ngClass]=\"{'disabled' : isUploading()}\"\r\n (click)=\"upload()\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon>\r\n </button>\r\n }\r\n\r\n @if(id!==null){\r\n <button matIconButton color=\"primary\" class=\"w-8 min-h-8 h-8 max-w-8\" (click)=\"download()\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'mat_outline:file_download'\"></mat-icon>\r\n </button>\r\n }\r\n\r\n @if(editMode){\r\n <button matIconButton color=\"warn\" class=\"w-8 min-h-8 h-8 max-w-8\" (click)=\"remove()\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon>\r\n </button>\r\n }\r\n </span>\r\n </div>\r\n @if(id===null){\r\n <mat-progress-bar [value]=\"progressPercentage()\"></mat-progress-bar>\r\n <div class=\"text-sm block whitespace-nowrap overflow-x-hidden text-ellipsis\">\r\n <span>{{progressPercentage()}}%</span><span> {{loaded() | cmatBytes}} of {{total() | cmatBytes}}</span>\r\n </div>\r\n }\r\n</div>", dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i1$g.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$b.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: CmatBytesPipe$1, name: "cmatBytes" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
15891
15893
  }
15892
15894
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatUploadComponent, decorators: [{
15893
15895
  type: Component,
15894
- args: [{ selector: 'cmat-upload', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatUpload', imports: [MatButtonModule, MatIconModule, MatProgressBarModule, MatTooltipModule, CmatBytesPipe$1, NgClass], template: "<div class=\"flex flex-col\">\r\n <div class=\"flex flex-row items-center\">\r\n <span class=\"flex items-center px-1\">\r\n <mat-icon class=\"icon-size-6 text-hint\"\r\n [svgIcon]=\"fileType\"></mat-icon>\r\n </span>\r\n <span matTooltip=\"{{file.name}}\"\r\n class=\"text-sm flex flex-auto whitespace-nowrap overflow-x-hidden text-ellipsis\">{{file.name}}({{file.size | cmatBytes}})</span>\r\n <span class=\"flex flex-row gap-1 print:hidden\">\r\n @if(id===null){\r\n <button matIconButton color=\"primary\" class=\"w-8 min-h-8 h-8 max-w-8\" [ngClass]=\"{'disabled' : isUploading()}\"\r\n (click)=\"upload()\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon>\r\n </button>\r\n }\r\n\r\n @if(id!==null){\r\n <button matIconButton color=\"primary\" class=\"w-8 min-h-8 h-8 max-w-8\" (click)=\"download()\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'mat_outline:file_download'\"></mat-icon>\r\n </button>\r\n }\r\n\r\n @if(editMode){\r\n <button matIconButton color=\"warn\" class=\"w-8 min-h-8 h-8 max-w-8\" (click)=\"remove()\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon>\r\n </button>\r\n }\r\n </span>\r\n </div>\r\n @if(id===null){\r\n <mat-progress-bar [value]=\"progressPercentage()\"></mat-progress-bar>\r\n <div class=\"text-sm block whitespace-nowrap overflow-x-hidden text-ellipsis\">\r\n <span>{{progressPercentage()}}%</span><span> {{loaded() | cmatBytes}} of {{total() | cmatBytes}}</span>\r\n </div>\r\n }\r\n</div>\r\n" }]
15896
+ args: [{ selector: 'cmat-upload', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatUpload', imports: [MatButtonModule, MatIconModule, MatProgressBarModule, MatTooltipModule, CmatBytesPipe$1, NgClass], template: "<div class=\"flex flex-col\">\r\n <div class=\"flex flex-row items-center\">\r\n <span class=\"flex items-center px-1\">\r\n <mat-icon class=\"icon-size-6 text-hint\" [svgIcon]=\"fileType\"></mat-icon>\r\n </span>\r\n <span matTooltip=\"{{file.name}}\"\r\n class=\"text-sm flex flex-auto whitespace-nowrap overflow-x-hidden text-ellipsis\">{{file.name}}({{fileSize |\r\n cmatBytes}})</span>\r\n <span class=\"flex flex-row gap-1 print:hidden\">\r\n @if(id===null){\r\n <button matIconButton color=\"primary\" class=\"w-8 min-h-8 h-8 max-w-8\" [ngClass]=\"{'disabled' : isUploading()}\"\r\n (click)=\"upload()\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon>\r\n </button>\r\n }\r\n\r\n @if(id!==null){\r\n <button matIconButton color=\"primary\" class=\"w-8 min-h-8 h-8 max-w-8\" (click)=\"download()\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'mat_outline:file_download'\"></mat-icon>\r\n </button>\r\n }\r\n\r\n @if(editMode){\r\n <button matIconButton color=\"warn\" class=\"w-8 min-h-8 h-8 max-w-8\" (click)=\"remove()\">\r\n <mat-icon class=\"icon-size-5\" [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon>\r\n </button>\r\n }\r\n </span>\r\n </div>\r\n @if(id===null){\r\n <mat-progress-bar [value]=\"progressPercentage()\"></mat-progress-bar>\r\n <div class=\"text-sm block whitespace-nowrap overflow-x-hidden text-ellipsis\">\r\n <span>{{progressPercentage()}}%</span><span> {{loaded() | cmatBytes}} of {{total() | cmatBytes}}</span>\r\n </div>\r\n }\r\n</div>" }]
15895
15897
  }], propDecorators: { fileAlias: [{
15896
15898
  type: Input
15897
15899
  }], filePath: [{
@@ -15931,6 +15933,7 @@ class CmatUploadQueueComponent {
15931
15933
  this.outputFilesDataEvent = new EventEmitter();
15932
15934
  this.id = 'cmatupload-' + crypto.randomUUID().slice(0, 8);
15933
15935
  this.isHandSet = signal(false, ...(ngDevMode ? [{ debugName: "isHandSet" }] : /* istanbul ignore next */ []));
15936
+ this.fileDataSource = signal([], ...(ngDevMode ? [{ debugName: "fileDataSource" }] : /* istanbul ignore next */ []));
15934
15937
  this._cmatMediaWatcherService = inject(CmatMediaWatcherService$1);
15935
15938
  this._elementRef = inject(ElementRef);
15936
15939
  this._destroyRef = inject(DestroyRef);
@@ -15954,6 +15957,11 @@ class CmatUploadQueueComponent {
15954
15957
  onDropOver(event) {
15955
15958
  event.preventDefault();
15956
15959
  }
15960
+ ngOnChanges(changes) {
15961
+ if (changes['filesData']) {
15962
+ this.fileDataSource.set(this.filesData);
15963
+ }
15964
+ }
15957
15965
  ngAfterViewInit() {
15958
15966
  const fileUpload = this._elementRef.nativeElement.querySelector(`#${this.id}`);
15959
15967
  if (!(fileUpload instanceof HTMLInputElement)) {
@@ -15980,11 +15988,12 @@ class CmatUploadQueueComponent {
15980
15988
  this.filesData = [...this.filesData, file];
15981
15989
  this.fileUploads.first.remove();
15982
15990
  }
15991
+ this.fileDataSource.set(this.filesData);
15983
15992
  }
15984
15993
  upload(event) {
15985
- const uploadId = event instanceof CmatUploadComponent ? event.id : event.id;
15986
- this.outputUploadIdEvent.emit(uploadId ?? '');
15994
+ this.outputUploadIdEvent.emit(event.id ?? '');
15987
15995
  this.outputFilesDataEvent.emit(this.filesData);
15996
+ this.fileDataSource.set(this.filesData);
15988
15997
  }
15989
15998
  remove(event) {
15990
15999
  if (this.filesData) {
@@ -15995,6 +16004,7 @@ class CmatUploadQueueComponent {
15995
16004
  this.outputRemoveIdEvent.emit(event.file.id);
15996
16005
  }
15997
16006
  this.outputFilesDataEvent.emit(this.filesData);
16007
+ this.fileDataSource.set(this.filesData);
15998
16008
  }
15999
16009
  }
16000
16010
  }
@@ -16025,11 +16035,11 @@ class CmatUploadQueueComponent {
16025
16035
  });
16026
16036
  }
16027
16037
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatUploadQueueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
16028
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatUploadQueueComponent, isStandalone: true, selector: "cmat-upload-queue", inputs: { fileAlias: "fileAlias", filePath: "filePath", fileCategory: "fileCategory", isPublic: "isPublic", required: "required", autoUpload: "autoUpload", multiple: "multiple", accept: "accept", title: "title", editMode: "editMode", filesData: "filesData" }, outputs: { outputRemoveIdEvent: "outputRemoveIdEvent", outputUploadIdEvent: "outputUploadIdEvent", outputFilesDataEvent: "outputFilesDataEvent" }, host: { listeners: { "drop": "onDrop($event)", "dragover": "onDropOver($event)" } }, viewQueries: [{ propertyName: "fileUploads", predicate: i0.forwardRef(() => CmatUploadComponent), descendants: true }], exportAs: ["cmatUploadQueue"], ngImport: i0, template: "<mat-card>\r\n <mat-card-header>\r\n <mat-card-title>\r\n <legend class=\"text-lg\">\r\n {{title}}\r\n @if(required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <input type=\"file\" class=\"hidden\" [id]=\"id\" [multiple]=\"multiple\" [accept]=\"accept\" />\r\n\r\n @if(editMode){\r\n <mat-card-actions class=\"flex flex-row gap-1 print:hidden\">\r\n @if(!isHandSet()){\r\n <button matButton=\"filled\" color=\"primary\" (click)=\"choose()\">\r\n @if(autoUpload){\r\n <mat-icon [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon>\r\n }@else {\r\n <mat-icon [svgIcon]=\"'mat_outline:add_box'\"></mat-icon>\r\n }\r\n <span class=\"ml-2\">\u9009\u62E9</span>\r\n </button>\r\n @if(filesData&&multiple&&filesData.length > 0){\r\n @if(!autoUpload){\r\n <button matButton=\"filled\" color=\"accent\" (click)=\"uploadAll()\"><mat-icon\r\n [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon><span class=\"ml-2\">\u4E0A\u4F20\u5168\u90E8</span></button>\r\n }\r\n\r\n <button matButton=\"filled\" color=\"warn\" (click)=\"removeAll()\"><mat-icon\r\n [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon><span class=\"ml-2\">\u5220\u9664\u5168\u90E8</span></button>\r\n }\r\n }@else {\r\n <button matIconButton color=\"primary\" (click)=\"choose()\">\r\n @if(autoUpload){\r\n <mat-icon [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon>\r\n }@else {\r\n <mat-icon [svgIcon]=\"'mat_outline:add_box'\"></mat-icon>\r\n }\r\n </button>\r\n\r\n @if(filesData&&multiple&&filesData.length > 0){\r\n @if(!autoUpload){\r\n <button matIconButton color=\"accent\" (click)=\"uploadAll()\"><mat-icon\r\n [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon></button>\r\n }\r\n\r\n <button matIconButton color=\"warn\" (click)=\"removeAll()\"><mat-icon\r\n [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon></button>\r\n }\r\n }\r\n </mat-card-actions>\r\n }\r\n\r\n <mat-card-content>\r\n <mat-list class=\"border-t\">\r\n @for (file of filesData; track $index) {\r\n <mat-list-item class=\"cmat-upload-file-item h-full\">\r\n <cmat-upload class=\"my-2\" [fileAlias]=\"fileAlias\" [filePath]=\"filePath\" [fileCategory]=\"fileCategory\"\r\n [autoUpload]=\"autoUpload\" [editMode]=\"editMode\" [file]=\"file\" [id]=\"file.id||null\" [isPublic]=\"isPublic\"\r\n (removeEvent)=\"remove($event)\" (uploadEvent)=\"upload($event)\"></cmat-upload>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </mat-card-content>\r\n</mat-card>\r\n", dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$6.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$6.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i1$6.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i1$6.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i1$6.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i2$1.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i2$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: CmatUploadComponent, selector: "cmat-upload", inputs: ["fileAlias", "filePath", "fileCategory", "isPublic", "editMode", "autoUpload", "id", "file"], outputs: ["removeEvent", "uploadEvent"], exportAs: ["cmatUpload"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
16038
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: CmatUploadQueueComponent, isStandalone: true, selector: "cmat-upload-queue", inputs: { fileAlias: "fileAlias", filePath: "filePath", fileCategory: "fileCategory", isPublic: "isPublic", required: "required", autoUpload: "autoUpload", multiple: "multiple", accept: "accept", title: "title", editMode: "editMode", filesData: "filesData" }, outputs: { outputRemoveIdEvent: "outputRemoveIdEvent", outputUploadIdEvent: "outputUploadIdEvent", outputFilesDataEvent: "outputFilesDataEvent" }, host: { listeners: { "drop": "onDrop($event)", "dragover": "onDropOver($event)" } }, viewQueries: [{ propertyName: "fileUploads", predicate: i0.forwardRef(() => CmatUploadComponent), descendants: true }], exportAs: ["cmatUploadQueue"], usesOnChanges: true, ngImport: i0, template: "<mat-card>\r\n <mat-card-header>\r\n <mat-card-title>\r\n <legend class=\"text-lg\">\r\n {{title}}\r\n @if(required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <input type=\"file\" class=\"hidden\" [id]=\"id\" [multiple]=\"multiple\" [accept]=\"accept\" />\r\n\r\n @if(editMode){\r\n <mat-card-actions class=\"flex flex-row gap-1 print:hidden\">\r\n @if(!isHandSet()){\r\n <button matButton=\"filled\" color=\"primary\" (click)=\"choose()\">\r\n @if(autoUpload){\r\n <mat-icon [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon>\r\n }@else {\r\n <mat-icon [svgIcon]=\"'mat_outline:add_box'\"></mat-icon>\r\n }\r\n <span class=\"ml-2\">\u9009\u62E9</span>\r\n </button>\r\n @if(fileDataSource()&&multiple&&fileDataSource().length > 0){\r\n @if(!autoUpload){\r\n <button matButton=\"filled\" color=\"accent\" (click)=\"uploadAll()\"><mat-icon\r\n [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon><span class=\"ml-2\">\u4E0A\u4F20\u5168\u90E8</span></button>\r\n }\r\n\r\n <button matButton=\"filled\" color=\"warn\" (click)=\"removeAll()\"><mat-icon\r\n [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon><span class=\"ml-2\">\u5220\u9664\u5168\u90E8</span></button>\r\n }\r\n }@else {\r\n <button matIconButton color=\"primary\" (click)=\"choose()\">\r\n @if(autoUpload){\r\n <mat-icon [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon>\r\n }@else {\r\n <mat-icon [svgIcon]=\"'mat_outline:add_box'\"></mat-icon>\r\n }\r\n </button>\r\n\r\n @if(fileDataSource()&&multiple&&fileDataSource().length > 0){\r\n @if(!autoUpload){\r\n <button matIconButton color=\"accent\" (click)=\"uploadAll()\"><mat-icon\r\n [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon></button>\r\n }\r\n\r\n <button matIconButton color=\"warn\" (click)=\"removeAll()\"><mat-icon\r\n [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon></button>\r\n }\r\n }\r\n </mat-card-actions>\r\n }\r\n\r\n <mat-card-content>\r\n <mat-list class=\"border-t\">\r\n @for (file of fileDataSource(); track $index) {\r\n <mat-list-item class=\"cmat-upload-file-item h-full\">\r\n <cmat-upload class=\"my-2\" [fileAlias]=\"fileAlias\" [filePath]=\"filePath\" [fileCategory]=\"fileCategory\"\r\n [autoUpload]=\"autoUpload\" [editMode]=\"editMode\" [file]=\"file\" [id]=\"file.id||null\" [isPublic]=\"isPublic\"\r\n (removeEvent)=\"remove($event)\" (uploadEvent)=\"upload($event)\"></cmat-upload>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </mat-card-content>\r\n</mat-card>\r\n", dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$6.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$6.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i1$6.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i1$6.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i1$6.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i2$1.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i2$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: CmatUploadComponent, selector: "cmat-upload", inputs: ["fileAlias", "filePath", "fileCategory", "isPublic", "editMode", "autoUpload", "id", "file"], outputs: ["removeEvent", "uploadEvent"], exportAs: ["cmatUpload"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
16029
16039
  }
16030
16040
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: CmatUploadQueueComponent, decorators: [{
16031
16041
  type: Component,
16032
- args: [{ selector: 'cmat-upload-queue', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatUploadQueue', imports: [MatCardModule, MatListModule, MatButtonModule, MatIconModule, CmatUploadComponent], template: "<mat-card>\r\n <mat-card-header>\r\n <mat-card-title>\r\n <legend class=\"text-lg\">\r\n {{title}}\r\n @if(required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <input type=\"file\" class=\"hidden\" [id]=\"id\" [multiple]=\"multiple\" [accept]=\"accept\" />\r\n\r\n @if(editMode){\r\n <mat-card-actions class=\"flex flex-row gap-1 print:hidden\">\r\n @if(!isHandSet()){\r\n <button matButton=\"filled\" color=\"primary\" (click)=\"choose()\">\r\n @if(autoUpload){\r\n <mat-icon [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon>\r\n }@else {\r\n <mat-icon [svgIcon]=\"'mat_outline:add_box'\"></mat-icon>\r\n }\r\n <span class=\"ml-2\">\u9009\u62E9</span>\r\n </button>\r\n @if(filesData&&multiple&&filesData.length > 0){\r\n @if(!autoUpload){\r\n <button matButton=\"filled\" color=\"accent\" (click)=\"uploadAll()\"><mat-icon\r\n [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon><span class=\"ml-2\">\u4E0A\u4F20\u5168\u90E8</span></button>\r\n }\r\n\r\n <button matButton=\"filled\" color=\"warn\" (click)=\"removeAll()\"><mat-icon\r\n [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon><span class=\"ml-2\">\u5220\u9664\u5168\u90E8</span></button>\r\n }\r\n }@else {\r\n <button matIconButton color=\"primary\" (click)=\"choose()\">\r\n @if(autoUpload){\r\n <mat-icon [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon>\r\n }@else {\r\n <mat-icon [svgIcon]=\"'mat_outline:add_box'\"></mat-icon>\r\n }\r\n </button>\r\n\r\n @if(filesData&&multiple&&filesData.length > 0){\r\n @if(!autoUpload){\r\n <button matIconButton color=\"accent\" (click)=\"uploadAll()\"><mat-icon\r\n [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon></button>\r\n }\r\n\r\n <button matIconButton color=\"warn\" (click)=\"removeAll()\"><mat-icon\r\n [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon></button>\r\n }\r\n }\r\n </mat-card-actions>\r\n }\r\n\r\n <mat-card-content>\r\n <mat-list class=\"border-t\">\r\n @for (file of filesData; track $index) {\r\n <mat-list-item class=\"cmat-upload-file-item h-full\">\r\n <cmat-upload class=\"my-2\" [fileAlias]=\"fileAlias\" [filePath]=\"filePath\" [fileCategory]=\"fileCategory\"\r\n [autoUpload]=\"autoUpload\" [editMode]=\"editMode\" [file]=\"file\" [id]=\"file.id||null\" [isPublic]=\"isPublic\"\r\n (removeEvent)=\"remove($event)\" (uploadEvent)=\"upload($event)\"></cmat-upload>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </mat-card-content>\r\n</mat-card>\r\n" }]
16042
+ args: [{ selector: 'cmat-upload-queue', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatUploadQueue', imports: [MatCardModule, MatListModule, MatButtonModule, MatIconModule, CmatUploadComponent], template: "<mat-card>\r\n <mat-card-header>\r\n <mat-card-title>\r\n <legend class=\"text-lg\">\r\n {{title}}\r\n @if(required){\r\n <span>*</span>\r\n }\r\n </legend>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <input type=\"file\" class=\"hidden\" [id]=\"id\" [multiple]=\"multiple\" [accept]=\"accept\" />\r\n\r\n @if(editMode){\r\n <mat-card-actions class=\"flex flex-row gap-1 print:hidden\">\r\n @if(!isHandSet()){\r\n <button matButton=\"filled\" color=\"primary\" (click)=\"choose()\">\r\n @if(autoUpload){\r\n <mat-icon [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon>\r\n }@else {\r\n <mat-icon [svgIcon]=\"'mat_outline:add_box'\"></mat-icon>\r\n }\r\n <span class=\"ml-2\">\u9009\u62E9</span>\r\n </button>\r\n @if(fileDataSource()&&multiple&&fileDataSource().length > 0){\r\n @if(!autoUpload){\r\n <button matButton=\"filled\" color=\"accent\" (click)=\"uploadAll()\"><mat-icon\r\n [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon><span class=\"ml-2\">\u4E0A\u4F20\u5168\u90E8</span></button>\r\n }\r\n\r\n <button matButton=\"filled\" color=\"warn\" (click)=\"removeAll()\"><mat-icon\r\n [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon><span class=\"ml-2\">\u5220\u9664\u5168\u90E8</span></button>\r\n }\r\n }@else {\r\n <button matIconButton color=\"primary\" (click)=\"choose()\">\r\n @if(autoUpload){\r\n <mat-icon [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon>\r\n }@else {\r\n <mat-icon [svgIcon]=\"'mat_outline:add_box'\"></mat-icon>\r\n }\r\n </button>\r\n\r\n @if(fileDataSource()&&multiple&&fileDataSource().length > 0){\r\n @if(!autoUpload){\r\n <button matIconButton color=\"accent\" (click)=\"uploadAll()\"><mat-icon\r\n [svgIcon]=\"'mat_outline:file_upload'\"></mat-icon></button>\r\n }\r\n\r\n <button matIconButton color=\"warn\" (click)=\"removeAll()\"><mat-icon\r\n [svgIcon]=\"'heroicons_solid:trash'\"></mat-icon></button>\r\n }\r\n }\r\n </mat-card-actions>\r\n }\r\n\r\n <mat-card-content>\r\n <mat-list class=\"border-t\">\r\n @for (file of fileDataSource(); track $index) {\r\n <mat-list-item class=\"cmat-upload-file-item h-full\">\r\n <cmat-upload class=\"my-2\" [fileAlias]=\"fileAlias\" [filePath]=\"filePath\" [fileCategory]=\"fileCategory\"\r\n [autoUpload]=\"autoUpload\" [editMode]=\"editMode\" [file]=\"file\" [id]=\"file.id||null\" [isPublic]=\"isPublic\"\r\n (removeEvent)=\"remove($event)\" (uploadEvent)=\"upload($event)\"></cmat-upload>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </mat-card-content>\r\n</mat-card>\r\n" }]
16033
16043
  }], ctorParameters: () => [], propDecorators: { fileUploads: [{
16034
16044
  type: ViewChildren,
16035
16045
  args: [forwardRef(() => CmatUploadComponent)]