@elite.framework/ng.core 1.0.32 → 1.0.34

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.
@@ -28,7 +28,6 @@ import * as i4$1 from 'primeng/menu';
28
28
  import { SafeHtmlPipe, MenuModule, Menu } from 'primeng/menu';
29
29
  import * as i4 from 'primeng/fileupload';
30
30
  import { FileUploadModule } from 'primeng/fileupload';
31
- import { ENVIRONMENT as ENVIRONMENT$1, AttachmentDto as AttachmentDto$1 } from '@framework/ng.core';
32
31
  import * as i2$1 from '@angular/router';
33
32
  import { RouterModule } from '@angular/router';
34
33
  import * as i1$4 from 'primeng/colorpicker';
@@ -1322,13 +1321,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
1322
1321
  }]
1323
1322
  }] });
1324
1323
 
1324
+ class AttachmentDto {
1325
+ id;
1326
+ binaryObjectId;
1327
+ description;
1328
+ mimeType;
1329
+ fileName;
1330
+ base64;
1331
+ caption;
1332
+ link;
1333
+ }
1334
+
1325
1335
  class AttachmentTypeComponent extends FieldType {
1326
1336
  messageService;
1327
1337
  defaultAcceptTypes = '.pdf,application/pdf,image/*,.txt,text/plain,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel';
1328
1338
  maxFileSize = 1 * 1024 * 1024; // 1 MB
1329
1339
  url = '';
1330
1340
  tenantId = 0;
1331
- env = inject(ENVIRONMENT$1);
1341
+ env = inject(ENVIRONMENT);
1332
1342
  constructor(messageService) {
1333
1343
  super();
1334
1344
  this.messageService = messageService;
@@ -1390,7 +1400,7 @@ class AttachmentTypeComponent extends FieldType {
1390
1400
  continue;
1391
1401
  }
1392
1402
  const base64 = await this.fileToBase64(file);
1393
- const attachment = new AttachmentDto$1();
1403
+ const attachment = new AttachmentDto();
1394
1404
  attachment.fileName = file.name;
1395
1405
  attachment.mimeType = file.type;
1396
1406
  attachment.base64 = base64;
@@ -1488,7 +1498,7 @@ class AttachmentTypeComponent extends FieldType {
1488
1498
  return 'pi pi-file';
1489
1499
  }
1490
1500
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AttachmentTypeComponent, deps: [{ token: i1$2.MessageService }], target: i0.ɵɵFactoryTarget.Component });
1491
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: AttachmentTypeComponent, isStandalone: true, selector: "attachment-type", providers: [MessageService], usesInheritance: true, ngImport: i0, template: "<p-fileUpload\n name=\"file\"\n [customUpload]=\"true\"\n [auto]=\"true\"\n [multiple]=\"props['multiple'] !== false\"\n [maxFileSize]=\"maxFileSize\"\n [accept]=\"props['accept'] || defaultAcceptTypes\"\n (uploadHandler)=\"onUpload($event)\"\n chooseLabel=\"\u0627\u0633\u062D\u0628 \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0623\u0648 \u0627\u0646\u0642\u0631 \u0644\u0644\u0625\u0631\u0641\u0627\u0642\"\n class=\"w-full\"\n>\n <!-- Header Template -->\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\">\n <div class=\"flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\n <div class=\"flex gap-2\">\n <p-button\n (click)=\"choose($event, chooseCallback)\"\n icon=\"pi pi-plus\"\n [rounded]=\"true\"\n [outlined]=\"true\"\n styleClass=\"border border-green-600 text-green-600 hover:bg-green-100 bg-white shadow-sm !rounded-full\"\n ></p-button>\n </div>\n </div>\n </ng-template>\n\n <!-- Content Template -->\n <ng-template pTemplate=\"content\">\n <!-- Multi mode -->\n <div class=\"p-2 flex flex-wrap gap-4\">\n <div\n *ngFor=\"let file of attachments; let i = index\"\n class=\"relative w-24 h-28 bg-white border rounded-lg shadow-sm flex flex-col items-center justify-center\"\n >\n <!-- File type label -->\n <div\n class=\"absolute top-0 left-0 px-2 py-0.5 text-[10px] font-bold uppercase rounded-br-md shadow-sm text-white\"\n [ngClass]=\"getLabelClass(file.mimeType)\"\n >\n {{ getFileLabel(file.mimeType) }}\n </div>\n\n <!-- Remove button -->\n <button\n class=\"absolute top-1 right-1 text-red-500 hover:text-red-700\"\n (click)=\"remove(i)\"\n title=\"\u062D\u0630\u0641\"\n >\n <i class=\"pi pi-times text-xs\"></i>\n </button>\n\n <!-- Center icon -->\n <i\n [class]=\"getFileIcon(file.mimeType)\"\n [ngClass]=\"getIconColor(file.mimeType)\"\n class=\"!text-4xl text-center mt-5\"\n ></i>\n\n <!-- File name -->\n <div class=\"mt-1 text-[11px] text-gray-600 truncate max-w-[85%] text-center\">\n {{ file.fileName }}\n </div>\n\n <!-- Download icon -->\n <a\n class=\"absolute bottom-1 right-1 text-gray-400 hover:text-blue-500\"\n [href]=\"url+'/' + file.binaryObjectId\"\n target=\"_blank\"\n download\n title=\"\u062A\u062D\u0645\u064A\u0644\"\n >\n <i class=\"pi pi-download text-xs\"></i>\n </a>\n </div>\n</div>\n\n <!-- Single mode -->\n <div *ngIf=\"props['multiple'] === false && attachment\">\n <div class=\"flex items-center justify-between p-2 border-b\">\n <span>{{ attachment.fileName }}</span>\n <p-button\n icon=\"pi pi-times\"\n class=\"p-button-rounded p-button-text text-red-600\"\n (click)=\"remove(0)\"\n ></p-button>\n </div>\n <!-- Caption input if allowed -->\n <div *ngIf=\"props['allowCaption']\" class=\"mt-1\">\n <input\n pInputText\n type=\"text\"\n class=\"w-full border rounded px-2 py-1 text-sm\"\n placeholder=\"\u0623\u0636\u0641 \u0648\u0635\u0641\u0627\u064B\"\n (change)=\"attachment = attachment\"\n [(ngModel)]=\"attachment.caption\"\n />\n </div>\n </div>\n </ng-template>\n\n <!-- Empty Template -->\n <ng-template pTemplate=\"empty\">\n <div\n *ngIf=\"(props['multiple'] !== false && (!attachments || attachments.length === 0)) ||\n (props['multiple'] === false && !attachment)\"\n class=\"border-2 border-dashed rounded-md p-4 bg-gray-50 hover:bg-gray-100 transition flex align-items-center justify-content-center flex-column\"\n >\n <i class=\"pi pi-cloud-upload border-2 rounded p-5 text-8xl text-400 border-400\"></i>\n <p class=\"mt-4 mb-0\">\u0627\u0633\u062D\u0628 \u0648\u0623\u0641\u0644\u0650\u062A \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0647\u0646\u0627 \u0644\u0644\u062A\u062D\u0645\u064A\u0644.</p>\n </div>\n </ng-template>\n</p-fileUpload>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i4.FileUpload, selector: "p-fileupload, p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "chooseButtonProps", "uploadButtonProps", "cancelButtonProps", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i3$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }] });
1501
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: AttachmentTypeComponent, isStandalone: true, selector: "attachment-type", providers: [MessageService], usesInheritance: true, ngImport: i0, template: "<p-fileUpload\n name=\"file\"\n [customUpload]=\"true\"\n [auto]=\"true\"\n [multiple]=\"props['multiple'] !== false\"\n [maxFileSize]=\"maxFileSize\"\n [accept]=\"props['accept'] || defaultAcceptTypes\"\n (uploadHandler)=\"onUpload($event)\"\n chooseLabel=\"\u0627\u0633\u062D\u0628 \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0623\u0648 \u0627\u0646\u0642\u0631 \u0644\u0644\u0625\u0631\u0641\u0627\u0642\"\n class=\"w-full\"\n>\n <!-- Header Template -->\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\">\n <div class=\"flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\n <div class=\"flex gap-2\">\n <p-button\n (click)=\"choose($event, chooseCallback)\"\n icon=\"pi pi-plus\"\n [rounded]=\"true\"\n [outlined]=\"true\"\n styleClass=\"border border-green-600 text-green-600 hover:bg-green-100 bg-white shadow-sm !rounded-full\"\n ></p-button>\n </div>\n </div>\n </ng-template>\n\n <!-- Content Template -->\n <ng-template pTemplate=\"content\">\n <!-- Multi mode -->\n <div class=\"p-2 flex flex-wrap gap-4\">\n <div\n *ngFor=\"let file of attachments; let i = index\"\n style=\"height: 7rem;\"\n class=\"relative w-24 h-28 bg-white border rounded-lg shadow-sm flex flex-col items-center justify-center\"\n >\n <!-- File type label -->\n <div\n class=\"absolute top-0 left-0 px-2 py-0.5 text-[10px] font-bold uppercase rounded-br-md shadow-sm text-white\"\n [ngClass]=\"getLabelClass(file.mimeType)\"\n >\n {{ getFileLabel(file.mimeType) }}\n </div>\n\n <!-- Remove button -->\n <button\n class=\"absolute top-1 right-1 text-red-500 hover:text-red-700\"\n (click)=\"remove(i)\"\n title=\"\u062D\u0630\u0641\"\n >\n <i class=\"pi pi-times text-xs\"></i>\n </button>\n\n <!-- Center icon -->\n <i\n [class]=\"getFileIcon(file.mimeType)\"\n [ngClass]=\"getIconColor(file.mimeType)\"\n class=\"!text-4xl text-center mt-5\"\n ></i>\n\n <!-- File name -->\n <div class=\"mt-1 text-[11px] text-gray-600 truncate max-w-[85%] text-center\">\n\n <div class=\"truncate\">{{ file.fileName }}</div>\n </div>\n\n <!-- Download icon -->\n <a\n class=\"absolute bottom-1 right-1 text-gray-400 hover:text-blue-500\"\n [href]=\"url+'/' + file.binaryObjectId\"\n target=\"_blank\"\n download\n title=\"\u062A\u062D\u0645\u064A\u0644\"\n >\n <i class=\"pi pi-download text-xs\"></i>\n </a>\n </div>\n</div>\n\n <!-- Single mode -->\n <div *ngIf=\"props['multiple'] === false && attachment\">\n <div class=\"flex items-center justify-between p-2 border-b\">\n <span>{{ attachment.fileName }}</span>\n <p-button\n icon=\"pi pi-times\"\n class=\"p-button-rounded p-button-text text-red-600\"\n (click)=\"remove(0)\"\n ></p-button>\n </div>\n <!-- Caption input if allowed -->\n <div *ngIf=\"props['allowCaption']\" class=\"mt-1\">\n <input\n pInputText\n type=\"text\"\n class=\"w-full border rounded px-2 py-1 text-sm\"\n placeholder=\"\u0623\u0636\u0641 \u0648\u0635\u0641\u0627\u064B\"\n (change)=\"attachment = attachment\"\n [(ngModel)]=\"attachment.caption\"\n />\n </div>\n </div>\n </ng-template>\n\n <!-- Empty Template -->\n <ng-template pTemplate=\"empty\">\n <div\n *ngIf=\"(props['multiple'] !== false && (!attachments || attachments.length === 0)) ||\n (props['multiple'] === false && !attachment)\"\n class=\"border-2 border-dashed rounded-md p-4 bg-gray-50 hover:bg-gray-100 transition flex align-items-center justify-content-center flex-column\"\n >\n <i class=\"pi pi-cloud-upload border-2 rounded p-5 text-8xl text-400 border-400\"></i>\n <p class=\"mt-4 mb-0\">\u0627\u0633\u062D\u0628 \u0648\u0623\u0641\u0644\u0650\u062A \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0647\u0646\u0627 \u0644\u0644\u062A\u062D\u0645\u064A\u0644.</p>\n </div>\n </ng-template>\n</p-fileUpload>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i4.FileUpload, selector: "p-fileupload, p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "chooseButtonProps", "uploadButtonProps", "cancelButtonProps", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i3$1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }] });
1492
1502
  }
1493
1503
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AttachmentTypeComponent, decorators: [{
1494
1504
  type: Component,
@@ -1499,7 +1509,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
1499
1509
  FileUploadModule,
1500
1510
  ButtonModule,
1501
1511
  InputTextModule
1502
- ], providers: [MessageService], template: "<p-fileUpload\n name=\"file\"\n [customUpload]=\"true\"\n [auto]=\"true\"\n [multiple]=\"props['multiple'] !== false\"\n [maxFileSize]=\"maxFileSize\"\n [accept]=\"props['accept'] || defaultAcceptTypes\"\n (uploadHandler)=\"onUpload($event)\"\n chooseLabel=\"\u0627\u0633\u062D\u0628 \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0623\u0648 \u0627\u0646\u0642\u0631 \u0644\u0644\u0625\u0631\u0641\u0627\u0642\"\n class=\"w-full\"\n>\n <!-- Header Template -->\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\">\n <div class=\"flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\n <div class=\"flex gap-2\">\n <p-button\n (click)=\"choose($event, chooseCallback)\"\n icon=\"pi pi-plus\"\n [rounded]=\"true\"\n [outlined]=\"true\"\n styleClass=\"border border-green-600 text-green-600 hover:bg-green-100 bg-white shadow-sm !rounded-full\"\n ></p-button>\n </div>\n </div>\n </ng-template>\n\n <!-- Content Template -->\n <ng-template pTemplate=\"content\">\n <!-- Multi mode -->\n <div class=\"p-2 flex flex-wrap gap-4\">\n <div\n *ngFor=\"let file of attachments; let i = index\"\n class=\"relative w-24 h-28 bg-white border rounded-lg shadow-sm flex flex-col items-center justify-center\"\n >\n <!-- File type label -->\n <div\n class=\"absolute top-0 left-0 px-2 py-0.5 text-[10px] font-bold uppercase rounded-br-md shadow-sm text-white\"\n [ngClass]=\"getLabelClass(file.mimeType)\"\n >\n {{ getFileLabel(file.mimeType) }}\n </div>\n\n <!-- Remove button -->\n <button\n class=\"absolute top-1 right-1 text-red-500 hover:text-red-700\"\n (click)=\"remove(i)\"\n title=\"\u062D\u0630\u0641\"\n >\n <i class=\"pi pi-times text-xs\"></i>\n </button>\n\n <!-- Center icon -->\n <i\n [class]=\"getFileIcon(file.mimeType)\"\n [ngClass]=\"getIconColor(file.mimeType)\"\n class=\"!text-4xl text-center mt-5\"\n ></i>\n\n <!-- File name -->\n <div class=\"mt-1 text-[11px] text-gray-600 truncate max-w-[85%] text-center\">\n {{ file.fileName }}\n </div>\n\n <!-- Download icon -->\n <a\n class=\"absolute bottom-1 right-1 text-gray-400 hover:text-blue-500\"\n [href]=\"url+'/' + file.binaryObjectId\"\n target=\"_blank\"\n download\n title=\"\u062A\u062D\u0645\u064A\u0644\"\n >\n <i class=\"pi pi-download text-xs\"></i>\n </a>\n </div>\n</div>\n\n <!-- Single mode -->\n <div *ngIf=\"props['multiple'] === false && attachment\">\n <div class=\"flex items-center justify-between p-2 border-b\">\n <span>{{ attachment.fileName }}</span>\n <p-button\n icon=\"pi pi-times\"\n class=\"p-button-rounded p-button-text text-red-600\"\n (click)=\"remove(0)\"\n ></p-button>\n </div>\n <!-- Caption input if allowed -->\n <div *ngIf=\"props['allowCaption']\" class=\"mt-1\">\n <input\n pInputText\n type=\"text\"\n class=\"w-full border rounded px-2 py-1 text-sm\"\n placeholder=\"\u0623\u0636\u0641 \u0648\u0635\u0641\u0627\u064B\"\n (change)=\"attachment = attachment\"\n [(ngModel)]=\"attachment.caption\"\n />\n </div>\n </div>\n </ng-template>\n\n <!-- Empty Template -->\n <ng-template pTemplate=\"empty\">\n <div\n *ngIf=\"(props['multiple'] !== false && (!attachments || attachments.length === 0)) ||\n (props['multiple'] === false && !attachment)\"\n class=\"border-2 border-dashed rounded-md p-4 bg-gray-50 hover:bg-gray-100 transition flex align-items-center justify-content-center flex-column\"\n >\n <i class=\"pi pi-cloud-upload border-2 rounded p-5 text-8xl text-400 border-400\"></i>\n <p class=\"mt-4 mb-0\">\u0627\u0633\u062D\u0628 \u0648\u0623\u0641\u0644\u0650\u062A \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0647\u0646\u0627 \u0644\u0644\u062A\u062D\u0645\u064A\u0644.</p>\n </div>\n </ng-template>\n</p-fileUpload>\n" }]
1512
+ ], providers: [MessageService], template: "<p-fileUpload\n name=\"file\"\n [customUpload]=\"true\"\n [auto]=\"true\"\n [multiple]=\"props['multiple'] !== false\"\n [maxFileSize]=\"maxFileSize\"\n [accept]=\"props['accept'] || defaultAcceptTypes\"\n (uploadHandler)=\"onUpload($event)\"\n chooseLabel=\"\u0627\u0633\u062D\u0628 \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0623\u0648 \u0627\u0646\u0642\u0631 \u0644\u0644\u0625\u0631\u0641\u0627\u0642\"\n class=\"w-full\"\n>\n <!-- Header Template -->\n <ng-template pTemplate=\"header\" let-chooseCallback=\"chooseCallback\">\n <div class=\"flex flex-wrap justify-content-between align-items-center flex-1 gap-2\">\n <div class=\"flex gap-2\">\n <p-button\n (click)=\"choose($event, chooseCallback)\"\n icon=\"pi pi-plus\"\n [rounded]=\"true\"\n [outlined]=\"true\"\n styleClass=\"border border-green-600 text-green-600 hover:bg-green-100 bg-white shadow-sm !rounded-full\"\n ></p-button>\n </div>\n </div>\n </ng-template>\n\n <!-- Content Template -->\n <ng-template pTemplate=\"content\">\n <!-- Multi mode -->\n <div class=\"p-2 flex flex-wrap gap-4\">\n <div\n *ngFor=\"let file of attachments; let i = index\"\n style=\"height: 7rem;\"\n class=\"relative w-24 h-28 bg-white border rounded-lg shadow-sm flex flex-col items-center justify-center\"\n >\n <!-- File type label -->\n <div\n class=\"absolute top-0 left-0 px-2 py-0.5 text-[10px] font-bold uppercase rounded-br-md shadow-sm text-white\"\n [ngClass]=\"getLabelClass(file.mimeType)\"\n >\n {{ getFileLabel(file.mimeType) }}\n </div>\n\n <!-- Remove button -->\n <button\n class=\"absolute top-1 right-1 text-red-500 hover:text-red-700\"\n (click)=\"remove(i)\"\n title=\"\u062D\u0630\u0641\"\n >\n <i class=\"pi pi-times text-xs\"></i>\n </button>\n\n <!-- Center icon -->\n <i\n [class]=\"getFileIcon(file.mimeType)\"\n [ngClass]=\"getIconColor(file.mimeType)\"\n class=\"!text-4xl text-center mt-5\"\n ></i>\n\n <!-- File name -->\n <div class=\"mt-1 text-[11px] text-gray-600 truncate max-w-[85%] text-center\">\n\n <div class=\"truncate\">{{ file.fileName }}</div>\n </div>\n\n <!-- Download icon -->\n <a\n class=\"absolute bottom-1 right-1 text-gray-400 hover:text-blue-500\"\n [href]=\"url+'/' + file.binaryObjectId\"\n target=\"_blank\"\n download\n title=\"\u062A\u062D\u0645\u064A\u0644\"\n >\n <i class=\"pi pi-download text-xs\"></i>\n </a>\n </div>\n</div>\n\n <!-- Single mode -->\n <div *ngIf=\"props['multiple'] === false && attachment\">\n <div class=\"flex items-center justify-between p-2 border-b\">\n <span>{{ attachment.fileName }}</span>\n <p-button\n icon=\"pi pi-times\"\n class=\"p-button-rounded p-button-text text-red-600\"\n (click)=\"remove(0)\"\n ></p-button>\n </div>\n <!-- Caption input if allowed -->\n <div *ngIf=\"props['allowCaption']\" class=\"mt-1\">\n <input\n pInputText\n type=\"text\"\n class=\"w-full border rounded px-2 py-1 text-sm\"\n placeholder=\"\u0623\u0636\u0641 \u0648\u0635\u0641\u0627\u064B\"\n (change)=\"attachment = attachment\"\n [(ngModel)]=\"attachment.caption\"\n />\n </div>\n </div>\n </ng-template>\n\n <!-- Empty Template -->\n <ng-template pTemplate=\"empty\">\n <div\n *ngIf=\"(props['multiple'] !== false && (!attachments || attachments.length === 0)) ||\n (props['multiple'] === false && !attachment)\"\n class=\"border-2 border-dashed rounded-md p-4 bg-gray-50 hover:bg-gray-100 transition flex align-items-center justify-content-center flex-column\"\n >\n <i class=\"pi pi-cloud-upload border-2 rounded p-5 text-8xl text-400 border-400\"></i>\n <p class=\"mt-4 mb-0\">\u0627\u0633\u062D\u0628 \u0648\u0623\u0641\u0644\u0650\u062A \u0627\u0644\u0645\u0644\u0641\u0627\u062A \u0647\u0646\u0627 \u0644\u0644\u062A\u062D\u0645\u064A\u0644.</p>\n </div>\n </ng-template>\n</p-fileUpload>\n" }]
1503
1513
  }], ctorParameters: () => [{ type: i1$2.MessageService }] });
1504
1514
 
1505
1515
  class BreadcrumbComponent {
@@ -6536,17 +6546,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
6536
6546
  args: ['appRtlLang']
6537
6547
  }] } });
6538
6548
 
6539
- class AttachmentDto {
6540
- id;
6541
- binaryObjectId;
6542
- description;
6543
- mimeType;
6544
- fileName;
6545
- base64;
6546
- caption;
6547
- link;
6548
- }
6549
-
6550
6549
  class ListResultDto {
6551
6550
  items;
6552
6551
  constructor(initialValues = {}) {