@elite.framework/ng.core 1.0.29 → 1.0.31

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.
@@ -13,7 +13,7 @@ import * as i3 from 'primeng/autocomplete';
13
13
  import { AutoCompleteModule, AutoComplete } from 'primeng/autocomplete';
14
14
  import * as i3$1 from 'primeng/button';
15
15
  import { ButtonModule, Button } from 'primeng/button';
16
- import * as i7 from 'primeng/inputtext';
16
+ import * as i6 from 'primeng/inputtext';
17
17
  import { InputTextModule } from 'primeng/inputtext';
18
18
  import * as i8 from 'primeng/dialog';
19
19
  import { DialogModule } from 'primeng/dialog';
@@ -24,21 +24,22 @@ import * as i1$1 from '@angular/common/http';
24
24
  import { HttpParams } from '@angular/common/http';
25
25
  import * as i1$2 from 'primeng/api';
26
26
  import { MessageService } from 'primeng/api';
27
- import * as i4 from 'primeng/menu';
27
+ import * as i4$1 from 'primeng/menu';
28
28
  import { SafeHtmlPipe, MenuModule, Menu } from 'primeng/menu';
29
- import * as i2$1 from 'primeng/fileupload';
29
+ import * as i4 from 'primeng/fileupload';
30
30
  import { FileUploadModule } from 'primeng/fileupload';
31
- import * as i2$2 from '@angular/router';
31
+ import { ENVIRONMENT as ENVIRONMENT$1, AttachmentDto as AttachmentDto$1 } from '@framework/ng.core';
32
+ import * as i2$1 from '@angular/router';
32
33
  import { RouterModule } from '@angular/router';
33
34
  import * as i1$4 from 'primeng/colorpicker';
34
35
  import { ColorPickerModule } from 'primeng/colorpicker';
35
- import * as i4$2 from 'primeng/divider';
36
+ import * as i4$3 from 'primeng/divider';
36
37
  import { DividerModule } from 'primeng/divider';
37
38
  import * as i1$5 from 'primeng/tooltip';
38
39
  import { TooltipModule, Tooltip } from 'primeng/tooltip';
39
40
  import * as i5 from 'primeng/orderlist';
40
41
  import { OrderListModule } from 'primeng/orderlist';
41
- import * as i6 from 'primeng/checkbox';
42
+ import * as i6$1 from 'primeng/checkbox';
42
43
  import { CheckboxModule, Checkbox } from 'primeng/checkbox';
43
44
  import { ToggleSwitch } from 'primeng/toggleswitch';
44
45
  import * as i1$6 from 'primeng/dynamicdialog';
@@ -52,20 +53,20 @@ import { FormlyPrimeNGModule, withFormlyPrimeNG } from '@ngx-formly/primeng';
52
53
  import { ProgressSpinnerModule } from 'primeng/progressspinner';
53
54
  import { MessageModule } from 'primeng/message';
54
55
  import { ToolbarModule } from 'primeng/toolbar';
55
- import * as i4$1 from 'primeng/inputicon';
56
+ import * as i4$2 from 'primeng/inputicon';
56
57
  import { InputIconModule } from 'primeng/inputicon';
57
58
  import * as i5$1 from 'primeng/iconfield';
58
59
  import { IconFieldModule } from 'primeng/iconfield';
59
- import * as i2$3 from 'primeng/table';
60
+ import * as i2$2 from 'primeng/table';
60
61
  import { TableModule } from 'primeng/table';
61
62
  import * as i5$2 from 'primeng/drawer';
62
63
  import { DrawerModule, Drawer } from 'primeng/drawer';
63
- import { SwalService as SwalService$1 } from '@framework/ng.core';
64
- import * as i2$4 from 'primeng/datepicker';
64
+ import Swal from 'sweetalert2';
65
+ import * as i2$3 from 'primeng/datepicker';
65
66
  import { DatePickerModule } from 'primeng/datepicker';
66
67
  import { TabsModule } from 'primeng/tabs';
67
68
  import { Tag } from 'primeng/tag';
68
- import * as i2$5 from 'primeng/editor';
69
+ import * as i2$4 from 'primeng/editor';
69
70
  import { EditorModule } from 'primeng/editor';
70
71
  import { FormlyFormFieldModule as FormlyFormFieldModule$1 } from '@ngx-formly/primeng/form-field';
71
72
  import { InputNumber } from 'primeng/inputnumber';
@@ -73,11 +74,10 @@ import * as i3$3 from 'primeng/select';
73
74
  import { SelectModule } from 'primeng/select';
74
75
  import * as i5$3 from '@ngx-formly/core/select';
75
76
  import { FormlySelectModule as FormlySelectModule$1 } from '@ngx-formly/core/select';
76
- import * as i2$6 from 'primeng/textarea';
77
+ import * as i2$5 from 'primeng/textarea';
77
78
  import { TextareaModule } from 'primeng/textarea';
78
79
  import * as i3$4 from 'primeng/radiobutton';
79
80
  import { RadioButtonModule } from 'primeng/radiobutton';
80
- import Swal from 'sweetalert2';
81
81
 
82
82
  class ODataQueryBuilderComponent {
83
83
  set entityFields(fields) {
@@ -1116,7 +1116,7 @@ class ConditionExpressionBuilderType extends FieldType {
1116
1116
  </div>
1117
1117
  </ng-template>
1118
1118
  </div>
1119
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { 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: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i3.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "appendTo"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "component", type: i1$2.Footer, selector: "p-footer" }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i7.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
1119
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { 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: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i3.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "appendTo"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "component", type: i1$2.Footer, selector: "p-footer" }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
1120
1120
  }
1121
1121
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ConditionExpressionBuilderType, decorators: [{
1122
1122
  type: Component,
@@ -1322,59 +1322,84 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
1322
1322
  }]
1323
1323
  }] });
1324
1324
 
1325
- class AttachmentDto {
1326
- binaryObjectId;
1327
- description;
1328
- tiMt; // mimeType
1329
- id;
1330
- tiNa; // fileName
1331
- base64;
1332
- }
1333
-
1334
- // import { API_BASE_URL } from '../../tokens';
1335
1325
  class AttachmentTypeComponent extends FieldType {
1336
1326
  messageService;
1337
- maxFileSize = 1 * 1024 * 1024;
1327
+ defaultAcceptTypes = '.pdf,application/pdf,image/*,.txt,text/plain,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel';
1328
+ maxFileSize = 1 * 1024 * 1024; // 1 MB
1338
1329
  url = '';
1339
1330
  tenantId = 0;
1340
- env = inject(ENVIRONMENT);
1331
+ env = inject(ENVIRONMENT$1);
1341
1332
  constructor(messageService) {
1342
1333
  super();
1343
1334
  this.messageService = messageService;
1344
- this.url = this.env.apiUrl + '/files';
1335
+ this.url = this.env.apiUrl + (this.props['apiUrl'] ?? '/api/files');
1345
1336
  }
1346
1337
  get attachments() {
1347
- return this.formControl.value || [];
1338
+ return Array.isArray(this.formControl.value)
1339
+ ? this.formControl.value
1340
+ : (this.formControl.value ? [this.formControl.value] : []);
1348
1341
  }
1349
1342
  set attachments(value) {
1350
- this.formControl.setValue(value);
1343
+ if (this.props['multiple']) {
1344
+ this.formControl.setValue(value);
1345
+ }
1346
+ else {
1347
+ this.formControl.setValue(value?.[0] || null);
1348
+ }
1349
+ }
1350
+ get attachment() {
1351
+ return Array.isArray(this.formControl.value)
1352
+ ? (this.formControl.value[0] || null)
1353
+ : this.formControl.value || null;
1354
+ }
1355
+ set attachment(value) {
1356
+ if (this.props['multiple']) {
1357
+ const arr = Array.isArray(this.formControl.value)
1358
+ ? [...this.formControl.value]
1359
+ : (this.formControl.value ? [this.formControl.value] : []);
1360
+ if (value)
1361
+ arr.push(value);
1362
+ this.formControl.setValue(arr);
1363
+ }
1364
+ else {
1365
+ this.formControl.setValue(value);
1366
+ }
1351
1367
  }
1352
1368
  async onUpload(event) {
1353
1369
  const files = event.files;
1370
+ const isMultiple = this.props['multiple'] ?? true;
1371
+ const allowedTypes = this.props['accept'] || '';
1354
1372
  for (const file of files) {
1355
1373
  if (file.size > this.maxFileSize) {
1356
1374
  this.messageService.add({
1357
1375
  severity: 'error',
1358
1376
  summary: 'خطأ',
1359
- detail: `الملف "${file.name}" يتجاوز الحد الأقصى (1MB)`
1377
+ detail: `الملف "${file.name}" يتجاوز الحد الأقصى (1MB)`,
1378
+ });
1379
+ continue;
1380
+ }
1381
+ if (allowedTypes && !this.isFileTypeAllowed(file, allowedTypes)) {
1382
+ this.messageService.add({
1383
+ severity: 'error',
1384
+ summary: 'نوع الملف غير مسموح',
1385
+ detail: `الملف "${file.name}" ليس من الأنواع المسموحة`,
1360
1386
  });
1361
1387
  continue;
1362
1388
  }
1363
- const isDuplicate = this.attachments.some(a => a.tiNa === file.name);
1364
- if (isDuplicate) {
1365
- // this.messageService.add({
1366
- // severity: 'warn',
1367
- // summary: 'تكرار',
1368
- // detail: `الملف "${file.name}" موجود بالفعل`
1369
- // });
1389
+ if (isMultiple && this.attachments.some(a => a.fileName === file.name)) {
1370
1390
  continue;
1371
1391
  }
1372
1392
  const base64 = await this.fileToBase64(file);
1373
- const attachment = new AttachmentDto();
1374
- attachment.tiNa = file.name;
1375
- attachment.tiMt = file.type;
1393
+ const attachment = new AttachmentDto$1();
1394
+ attachment.fileName = file.name;
1395
+ attachment.mimeType = file.type;
1376
1396
  attachment.base64 = base64;
1377
- this.attachments = [...this.attachments, attachment];
1397
+ if (isMultiple) {
1398
+ this.attachments = [...this.attachments, attachment];
1399
+ }
1400
+ else {
1401
+ this.attachment = attachment;
1402
+ }
1378
1403
  }
1379
1404
  }
1380
1405
  remove(index) {
@@ -1390,7 +1415,18 @@ class AttachmentTypeComponent extends FieldType {
1390
1415
  const reader = new FileReader();
1391
1416
  reader.readAsDataURL(file);
1392
1417
  reader.onload = () => resolve(reader.result.split(',')[1]);
1393
- reader.onerror = (err) => reject(err);
1418
+ reader.onerror = err => reject(err);
1419
+ });
1420
+ }
1421
+ isFileTypeAllowed(file, allowedTypes) {
1422
+ const accepted = allowedTypes.split(',').map(t => t.trim());
1423
+ return accepted.some(type => {
1424
+ if (type === '*/*')
1425
+ return true;
1426
+ if (type.endsWith('/*')) {
1427
+ return file.type.startsWith(type.split('/')[0] + '/');
1428
+ }
1429
+ return file.type === type;
1394
1430
  });
1395
1431
  }
1396
1432
  getFileLabel(mime) {
@@ -1452,11 +1488,18 @@ class AttachmentTypeComponent extends FieldType {
1452
1488
  return 'pi pi-file';
1453
1489
  }
1454
1490
  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 });
1455
- 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: "\n <div class=\"panel\">\n <p-fileUpload\n name=\"file\"\n [customUpload]=\"true\"\n [auto]=\"true\"\n [multiple]=\"true\"\n [maxFileSize]=\"maxFileSize\"\n accept=\".pdf,application/pdf,image/*,.txt,text/plain,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel\"\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 <ng-template pTemplate=\"header\" let-files let-chooseCallback=\"chooseCallback\" let-clearCallback=\"clearCallback\" let-uploadCallback=\"uploadCallback\">\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 (onClick)=\"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 />\n\n </div>\n\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files let-uploadedFiles=\"uploadedFiles\" let-removeFileCallback=\"removeFileCallback\" let-removeUploadedFileCallback=\"removeUploadedFileCallback\">\n\n <div *ngIf=\"uploadedFiles?.length > 0\">\n\n </div>\n </ng-template>\n <ng-template pTemplate=\"file\"> </ng-template>\n <ng-template pTemplate=\"empty\">\n <div *ngIf=\" attachments?.length == 0\" 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 <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\">Drag and drop files here to upload.</p> -->\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\n\n\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.tiMt)\"\n >\n {{ getFileLabel(file.tiMt) }}\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.tiMt)\"\n [ngClass]=\"getIconColor(file.tiMt)\"\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.tiNa }}\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</div>\n\n", dependencies: [{ kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i2$1.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: ReactiveFormsModule }, { 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: FormsModule }] });
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 *ngIf=\"props['multiple'] !== false && attachments?.length\">\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\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"] }] });
1456
1492
  }
1457
1493
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: AttachmentTypeComponent, decorators: [{
1458
1494
  type: Component,
1459
- args: [{ selector: 'attachment-type', standalone: true, imports: [FileUploadModule, ButtonModule, ReactiveFormsModule, CommonModule, FormsModule], providers: [MessageService], template: "\n <div class=\"panel\">\n <p-fileUpload\n name=\"file\"\n [customUpload]=\"true\"\n [auto]=\"true\"\n [multiple]=\"true\"\n [maxFileSize]=\"maxFileSize\"\n accept=\".pdf,application/pdf,image/*,.txt,text/plain,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel\"\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 <ng-template pTemplate=\"header\" let-files let-chooseCallback=\"chooseCallback\" let-clearCallback=\"clearCallback\" let-uploadCallback=\"uploadCallback\">\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 (onClick)=\"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 />\n\n </div>\n\n </div>\n </ng-template>\n <ng-template pTemplate=\"content\" let-files let-uploadedFiles=\"uploadedFiles\" let-removeFileCallback=\"removeFileCallback\" let-removeUploadedFileCallback=\"removeUploadedFileCallback\">\n\n <div *ngIf=\"uploadedFiles?.length > 0\">\n\n </div>\n </ng-template>\n <ng-template pTemplate=\"file\"> </ng-template>\n <ng-template pTemplate=\"empty\">\n <div *ngIf=\" attachments?.length == 0\" 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 <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\">Drag and drop files here to upload.</p> -->\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\n\n\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.tiMt)\"\n >\n {{ getFileLabel(file.tiMt) }}\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.tiMt)\"\n [ngClass]=\"getIconColor(file.tiMt)\"\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.tiNa }}\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</div>\n\n" }]
1495
+ args: [{ selector: 'attachment-type', standalone: true, imports: [
1496
+ CommonModule,
1497
+ ReactiveFormsModule,
1498
+ FormsModule,
1499
+ FileUploadModule,
1500
+ ButtonModule,
1501
+ 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 *ngIf=\"props['multiple'] !== false && attachments?.length\">\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\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" }]
1460
1503
  }], ctorParameters: () => [{ type: i1$2.MessageService }] });
1461
1504
 
1462
1505
  class BreadcrumbComponent {
@@ -1513,7 +1556,7 @@ class BreadcrumbComponent {
1513
1556
  </li>
1514
1557
  </ul>
1515
1558
  </nav>
1516
- `, isInline: true, 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: RouterModule }, { kind: "directive", type: i2$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
1559
+ `, isInline: true, 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: RouterModule }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
1517
1560
  }
1518
1561
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: BreadcrumbComponent, decorators: [{
1519
1562
  type: Component,
@@ -1754,7 +1797,7 @@ class ColumnSettingsPopoverComponent {
1754
1797
  return true;
1755
1798
  }
1756
1799
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnSettingsPopoverComponent, deps: [{ token: i1$3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
1757
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: ColumnSettingsPopoverComponent, isStandalone: true, selector: "lib-column-settings-popover", inputs: { fixedColumns: "fixedColumns", toggleableColumns: "toggleableColumns", tableId: "tableId", selectedToggleableColumns: "selectedToggleableColumns" }, outputs: { selectedToggleableColumnsChange: "selectedToggleableColumnsChange" }, viewQueries: [{ propertyName: "op", first: true, predicate: ["op"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<p-popover #op appendTo=\"body\" styleClass=\"w-80\">\n\n\n\n\n <!-- \u2B50 \u0645\u0631\u0628\u0639 \u0627\u062E\u062A\u064A\u0627\u0631 \"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644\" \u2B50 -->\n <div class=\"flex items-center mb-3\">\n <p-checkbox\n [(ngModel)]=\"allColumnsSelected\"\n [binary]=\"true\"\n inputId=\"selectAllColumns\"\n ></p-checkbox>\n <label for=\"selectAllColumns\" class=\"ml-2 cursor-pointer font-medium text-color-secondary\">\n {{ 'COMMON.SELECT_ALL' | translate }}\n </label>\n </div>\n\n <p-orderList\n [value]=\"_displayOrderListColumns\"\n header=\"{{ 'COMMON.REORDER_AND_SELECT_COLUMNS' | translate }}\"\n [listStyle]=\"{'height':'250px'}\"\n [responsive]=\"true\"\n [dragdrop]=\"true\"\n (onReorder)=\"onOrderListReorder($event)\"\n styleClass=\"w-full\"\n >\n <ng-template let-col pTemplate=\"item\">\n <div class=\"p-2 border rounded-md flex items-center justify-between w-full\">\n <!-- \u0645\u0631\u0628\u0639 \u0627\u062E\u062A\u064A\u0627\u0631 \u0644\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0627\u0644\u0631\u0624\u064A\u0629 -->\n <p-checkbox\n [(ngModel)]=\"col.isSelected\"\n (ngModelChange)=\"onColumnVisibilityChange(col)\"\n [binary]=\"true\"\n class=\"mr-4\"\n ></p-checkbox>\n <span class=\"flex-grow\">{{ col.header | translate }}</span>\n <i class=\"pi pi-bars text-surface-400 cursor-grab\"></i> <!-- \u0623\u064A\u0642\u0648\u0646\u0629 \u0627\u0644\u0633\u062D\u0628 -->\n </div>\n </ng-template>\n </p-orderList>\n\n\n</p-popover>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i3$2.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: DividerModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: OrderListModule }, { kind: "component", type: i5.OrderList, selector: "p-orderList, p-orderlist, p-order-list", inputs: ["header", "styleClass", "tabindex", "ariaLabel", "ariaLabelledBy", "listStyle", "responsive", "filterBy", "filterPlaceholder", "filterLocale", "metaKeySelection", "dragdrop", "controlsPosition", "ariaFilterLabel", "filterMatchMode", "breakpoint", "stripedRows", "disabled", "trackBy", "scrollHeight", "autoOptionFocus", "selection", "value", "buttonProps", "moveUpButtonProps", "moveTopButtonProps", "moveDownButtonProps", "moveBottomButtonProps"], outputs: ["selectionChange", "onReorder", "onSelectionChange", "onFilterEvent", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i6.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
1800
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: ColumnSettingsPopoverComponent, isStandalone: true, selector: "lib-column-settings-popover", inputs: { fixedColumns: "fixedColumns", toggleableColumns: "toggleableColumns", tableId: "tableId", selectedToggleableColumns: "selectedToggleableColumns" }, outputs: { selectedToggleableColumnsChange: "selectedToggleableColumnsChange" }, viewQueries: [{ propertyName: "op", first: true, predicate: ["op"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<p-popover #op appendTo=\"body\" styleClass=\"w-80\">\n\n\n\n\n <!-- \u2B50 \u0645\u0631\u0628\u0639 \u0627\u062E\u062A\u064A\u0627\u0631 \"\u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644\" \u2B50 -->\n <div class=\"flex items-center mb-3\">\n <p-checkbox\n [(ngModel)]=\"allColumnsSelected\"\n [binary]=\"true\"\n inputId=\"selectAllColumns\"\n ></p-checkbox>\n <label for=\"selectAllColumns\" class=\"ml-2 cursor-pointer font-medium text-color-secondary\">\n {{ 'COMMON.SELECT_ALL' | translate }}\n </label>\n </div>\n\n <p-orderList\n [value]=\"_displayOrderListColumns\"\n header=\"{{ 'COMMON.REORDER_AND_SELECT_COLUMNS' | translate }}\"\n [listStyle]=\"{'height':'250px'}\"\n [responsive]=\"true\"\n [dragdrop]=\"true\"\n (onReorder)=\"onOrderListReorder($event)\"\n styleClass=\"w-full\"\n >\n <ng-template let-col pTemplate=\"item\">\n <div class=\"p-2 border rounded-md flex items-center justify-between w-full\">\n <!-- \u0645\u0631\u0628\u0639 \u0627\u062E\u062A\u064A\u0627\u0631 \u0644\u0644\u062A\u062D\u0643\u0645 \u0641\u064A \u0627\u0644\u0631\u0624\u064A\u0629 -->\n <p-checkbox\n [(ngModel)]=\"col.isSelected\"\n (ngModelChange)=\"onColumnVisibilityChange(col)\"\n [binary]=\"true\"\n class=\"mr-4\"\n ></p-checkbox>\n <span class=\"flex-grow\">{{ col.header | translate }}</span>\n <i class=\"pi pi-bars text-surface-400 cursor-grab\"></i> <!-- \u0623\u064A\u0642\u0648\u0646\u0629 \u0627\u0644\u0633\u062D\u0628 -->\n </div>\n </ng-template>\n </p-orderList>\n\n\n</p-popover>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i3$2.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: DividerModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: OrderListModule }, { kind: "component", type: i5.OrderList, selector: "p-orderList, p-orderlist, p-order-list", inputs: ["header", "styleClass", "tabindex", "ariaLabel", "ariaLabelledBy", "listStyle", "responsive", "filterBy", "filterPlaceholder", "filterLocale", "metaKeySelection", "dragdrop", "controlsPosition", "ariaFilterLabel", "filterMatchMode", "breakpoint", "stripedRows", "disabled", "trackBy", "scrollHeight", "autoOptionFocus", "selection", "value", "buttonProps", "moveUpButtonProps", "moveTopButtonProps", "moveDownButtonProps", "moveBottomButtonProps"], outputs: ["selectionChange", "onReorder", "onSelectionChange", "onFilterEvent", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i6$1.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
1758
1801
  }
1759
1802
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ColumnSettingsPopoverComponent, decorators: [{
1760
1803
  type: Component,
@@ -2308,7 +2351,7 @@ class UsernameWithDomainComponent extends FieldType {
2308
2351
  [formlyAttributes]="field"
2309
2352
  (blur)="onBlur()"
2310
2353
  />
2311
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { 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: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i7.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "ngmodule", type: // ✅ إضافة InputGroupModule
2354
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { 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: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "ngmodule", type: // ✅ إضافة InputGroupModule
2312
2355
  InputGroupAddonModule }, { kind: "directive", type: // ✅ إضافة InputGroupAddonModule
2313
2356
  FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }] });
2314
2357
  }
@@ -2755,7 +2798,7 @@ class GenericCard {
2755
2798
  return item.id || index;
2756
2799
  }
2757
2800
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericCard, deps: [{ token: i1$3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
2758
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericCard, isStandalone: true, selector: "lib-generic-card", inputs: { data: "data", columns: "columns", loading: "loading", actions: "actions", actionsMode: "actionsMode", showOperations: "showOperations", rowSelectable: "rowSelectable", showRowSelectionCheckbox: "showRowSelectionCheckbox", paginator: "paginator", rowClassFn: "rowClassFn", selection: "selection" }, outputs: { action: "action", selectionChange: "selectionChange", rowSelect: "rowSelect" }, ngImport: i0, template: "\n<div class=\"p-4 p-4 flex flex-col gap-6 font-inter\">\n <div *ngIf=\"loading\" class=\"col-span-full text-center py-8\">\n <div class=\"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500 inline-block\"></div>\n <p class=\"mt-4 text-gray-600\">Loading data...</p>\n </div>\n\n <div *ngIf=\"!loading && data.length === 0\" class=\"col-span-full text-center py-8 text-gray-500\">\n No records found.\n </div>\n\n <div *ngFor=\"let item of data; trackBy: trackById\"\n [ngClass]=\"rowClassFn(item)\"\n class=\"bg-white rounded-lg shadow-md hover:shadow-lg transition-shadow duration-300 overflow-hidden flex flex-row items-center\"\n (click)=\"handleCardClick(item)\"\n [class.cursor-pointer]=\"rowSelectable && !showRowSelectionCheckbox\">\n\n <div *ngIf=\"showRowSelectionCheckbox\" class=\"p-4\">\n <input type=\"checkbox\"\n [checked]=\"isItemSelected(item)\"\n (change)=\"toggleItemSelection(item, $event)\"\n class=\"form-checkbox h-5 w-5 text-blue-600 rounded focus:ring-blue-500\">\n </div>\n\n <div class=\"p-6 flex-grow\">\n <div class=\"flex flex-wrap -mx-2\">\n <ng-container *ngFor=\"let col of columns\">\n <div *ngIf=\"col.isCardVisible\" class=\"px-2 mb-2 w-full sm:w-1/5\">\n <div class=\"flex flex-col sm:flex-row sm:items-center text-sm\">\n <span class=\"font-semibold text-gray-700 sm:w-1/3 sm:min-w-[80px] sm:pr-2\">{{ col.header | translate }}:</span>\n <div class=\"flex-grow text-gray-800 text-left mt-1 sm:mt-0\">\n <ng-container *ngIf=\"col.clickable; else readonlyCardCell\">\n <span class=\"cursor-pointer hover:underline text-blue-600\"\n (click)=\"handleCellClick(col, item, $event)\"\n (mouseenter)=\"col.hoverable && onCellHover(col, item, $event)\"\n (mouseleave)=\"col.hoverable && onCellLeave(col, item, $event)\">\n <ng-container *ngIf=\"col.formatter; else defaultCardText\">\n <span [innerHTML]=\"col.formatter(item)\"></span>\n </ng-container>\n <ng-template #defaultCardText>\n {{ col.pipe ? col.pipe(item[col.field]) : item[col.field] }}\n </ng-template>\n </span>\n </ng-container>\n\n <ng-template #readonlyCardCell>\n <span>\n <ng-container *ngIf=\"col.formatter; else defaultCardText2\">\n <span [innerHTML]=\"col.formatter(item)\"></span>\n </ng-container>\n <ng-template #defaultCardText2>\n {{ col.pipe ? col.pipe(item[col.field]) : item[col.field] }}\n </ng-template>\n </span>\n </ng-template>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n\n </div>\n\n <div *ngIf=\"showOperations && actions.length > 0\" class=\"border-l border-gray-200 p-4 flex justify-end items-center\">\n <ng-container *ngIf=\"actionsMode === 'buttons'; else cardMenuTpl\">\n <ng-container *ngFor=\"let act of actions\">\n <button\n pButton\n type=\"button\"\n [icon]=\"act.icon || ''\"\n [title]=\"act.label?? '' | translate\"\n class=\"p-button-rounded p-button-text text-gray-600 hover:text-blue-600 custom-button-medium mr-1\"\n [ngClass]=\"act.styleClass\"\n (click)=\"action.emit({ name: act.name, row: item })\"\n ></button>\n </ng-container>\n </ng-container>\n\n <ng-template #cardMenuTpl>\n <p-menu\n #cardMenu\n [model]=\"getMenuItems(item)\"\n popup=\"true\"\n appendTo=\"body\">\n </p-menu>\n <button\n pButton\n type=\"button\"\n icon=\"pi pi-ellipsis-v\"\n class=\"p-button-rounded p-button-text text-gray-600 hover:text-blue-600\"\n (click)=\"cardMenu.toggle($event)\">\n </button>\n </ng-template>\n </div>\n </div>\n</div>\n", styles: [".custom-button-medium{width:2.5rem;height:2.5rem}.icon-delete{color:#ef4444}.icon-edit{color:#2563eb}\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: ButtonModule }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "ngmodule", type: MenuModule }, { kind: "component", type: i4.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex", "appendTo"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
2801
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericCard, isStandalone: true, selector: "lib-generic-card", inputs: { data: "data", columns: "columns", loading: "loading", actions: "actions", actionsMode: "actionsMode", showOperations: "showOperations", rowSelectable: "rowSelectable", showRowSelectionCheckbox: "showRowSelectionCheckbox", paginator: "paginator", rowClassFn: "rowClassFn", selection: "selection" }, outputs: { action: "action", selectionChange: "selectionChange", rowSelect: "rowSelect" }, ngImport: i0, template: "\n<div class=\"p-4 p-4 flex flex-col gap-6 font-inter\">\n <div *ngIf=\"loading\" class=\"col-span-full text-center py-8\">\n <div class=\"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500 inline-block\"></div>\n <p class=\"mt-4 text-gray-600\">Loading data...</p>\n </div>\n\n <div *ngIf=\"!loading && data.length === 0\" class=\"col-span-full text-center py-8 text-gray-500\">\n No records found.\n </div>\n\n <div *ngFor=\"let item of data; trackBy: trackById\"\n [ngClass]=\"rowClassFn(item)\"\n class=\"bg-white rounded-lg shadow-md hover:shadow-lg transition-shadow duration-300 overflow-hidden flex flex-row items-center\"\n (click)=\"handleCardClick(item)\"\n [class.cursor-pointer]=\"rowSelectable && !showRowSelectionCheckbox\">\n\n <div *ngIf=\"showRowSelectionCheckbox\" class=\"p-4\">\n <input type=\"checkbox\"\n [checked]=\"isItemSelected(item)\"\n (change)=\"toggleItemSelection(item, $event)\"\n class=\"form-checkbox h-5 w-5 text-blue-600 rounded focus:ring-blue-500\">\n </div>\n\n <div class=\"p-6 flex-grow\">\n <div class=\"flex flex-wrap -mx-2\">\n <ng-container *ngFor=\"let col of columns\">\n <div *ngIf=\"col.isCardVisible\" class=\"px-2 mb-2 w-full sm:w-1/5\">\n <div class=\"flex flex-col sm:flex-row sm:items-center text-sm\">\n <span class=\"font-semibold text-gray-700 sm:w-1/3 sm:min-w-[80px] sm:pr-2\">{{ col.header | translate }}:</span>\n <div class=\"flex-grow text-gray-800 text-left mt-1 sm:mt-0\">\n <ng-container *ngIf=\"col.clickable; else readonlyCardCell\">\n <span class=\"cursor-pointer hover:underline text-blue-600\"\n (click)=\"handleCellClick(col, item, $event)\"\n (mouseenter)=\"col.hoverable && onCellHover(col, item, $event)\"\n (mouseleave)=\"col.hoverable && onCellLeave(col, item, $event)\">\n <ng-container *ngIf=\"col.formatter; else defaultCardText\">\n <span [innerHTML]=\"col.formatter(item)\"></span>\n </ng-container>\n <ng-template #defaultCardText>\n {{ col.pipe ? col.pipe(item[col.field]) : item[col.field] }}\n </ng-template>\n </span>\n </ng-container>\n\n <ng-template #readonlyCardCell>\n <span>\n <ng-container *ngIf=\"col.formatter; else defaultCardText2\">\n <span [innerHTML]=\"col.formatter(item)\"></span>\n </ng-container>\n <ng-template #defaultCardText2>\n {{ col.pipe ? col.pipe(item[col.field]) : item[col.field] }}\n </ng-template>\n </span>\n </ng-template>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n\n </div>\n\n <div *ngIf=\"showOperations && actions.length > 0\" class=\"border-l border-gray-200 p-4 flex justify-end items-center\">\n <ng-container *ngIf=\"actionsMode === 'buttons'; else cardMenuTpl\">\n <ng-container *ngFor=\"let act of actions\">\n <button\n pButton\n type=\"button\"\n [icon]=\"act.icon || ''\"\n [title]=\"act.label?? '' | translate\"\n class=\"p-button-rounded p-button-text text-gray-600 hover:text-blue-600 custom-button-medium mr-1\"\n [ngClass]=\"act.styleClass\"\n (click)=\"action.emit({ name: act.name, row: item })\"\n ></button>\n </ng-container>\n </ng-container>\n\n <ng-template #cardMenuTpl>\n <p-menu\n #cardMenu\n [model]=\"getMenuItems(item)\"\n popup=\"true\"\n appendTo=\"body\">\n </p-menu>\n <button\n pButton\n type=\"button\"\n icon=\"pi pi-ellipsis-v\"\n class=\"p-button-rounded p-button-text text-gray-600 hover:text-blue-600\"\n (click)=\"cardMenu.toggle($event)\">\n </button>\n </ng-template>\n </div>\n </div>\n</div>\n", styles: [".custom-button-medium{width:2.5rem;height:2.5rem}.icon-delete{color:#ef4444}.icon-edit{color:#2563eb}\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: ButtonModule }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "ngmodule", type: MenuModule }, { kind: "component", type: i4$1.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex", "appendTo"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
2759
2802
  }
2760
2803
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericCard, decorators: [{
2761
2804
  type: Component,
@@ -2961,7 +3004,7 @@ class GenericSearch {
2961
3004
  this.search.emit(this.model);
2962
3005
  }
2963
3006
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericSearch, deps: [], target: i0.ɵɵFactoryTarget.Component });
2964
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericSearch, isStandalone: true, selector: "lib-generic-search", inputs: { placeholder: "placeholder", model: "model", fields: "fields" }, outputs: { search: "search" }, viewQueries: [{ propertyName: "overlay", first: true, predicate: ["overlay"], descendants: true }], ngImport: i0, template: "<div class=\"flex items-center gap-3\">\n<p-iconfield iconPosition=\"left\">\n\n <p-inputicon class=\"pi pi-search\"> </p-inputicon>\n <input pInputText type=\"text\" (keyup.enter)=\"onSubmit()\" [(ngModel)]=\"model['filter']\" placeholder=\"{{ 'SEARCH' | translate }}\" />\n <!-- 2) Search Button that toggles the popover -->\n\n</p-iconfield>\n<p-button icon=\"pi pi-filter\" outlined severity=\"secondary\" (onClick)=\"overlay.toggle($event)\" />\n</div>\n<!-- 4) Popover for Advanced Multi-field Search -->\n<p-popover #overlay [dismissable]=\"true\" styleClass=\"p-4 w-80\">\n\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit(); overlay.hide()\">\n <formly-form\n [form]=\"form\"\n [fields]=\"fields_\"\n [model]=\"model\"\n [options]=\"options\">\n </formly-form>\n\n <div class=\"flex justify-end mt-4 space-x-2\">\n <button type=\"submit\" pButton size=\"small\" label=\"{{ 'SEARCH' | translate }}\"></button>\n <button type=\"button\" pButton size=\"small\" class=\"p-button-text\" (click)=\"onReset(); overlay.hide()\">\n {{ 'CLEAR' | translate }}\n </button>\n </div>\n </form>\n\n</p-popover>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ToolbarModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { 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: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i3$2.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { 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: InputIconModule }, { kind: "component", type: i4$1.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["styleClass"] }, { kind: "ngmodule", type: IconFieldModule }, { kind: "component", type: i5$1.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["iconPosition", "styleClass"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i7.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
3007
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericSearch, isStandalone: true, selector: "lib-generic-search", inputs: { placeholder: "placeholder", model: "model", fields: "fields" }, outputs: { search: "search" }, viewQueries: [{ propertyName: "overlay", first: true, predicate: ["overlay"], descendants: true }], ngImport: i0, template: "<div class=\"flex items-center gap-3\">\n<p-iconfield iconPosition=\"left\">\n\n <p-inputicon class=\"pi pi-search\"> </p-inputicon>\n <input pInputText type=\"text\" (keyup.enter)=\"onSubmit()\" [(ngModel)]=\"model['filter']\" placeholder=\"{{ 'SEARCH' | translate }}\" />\n <!-- 2) Search Button that toggles the popover -->\n\n</p-iconfield>\n<p-button icon=\"pi pi-filter\" outlined severity=\"secondary\" (onClick)=\"overlay.toggle($event)\" />\n</div>\n<!-- 4) Popover for Advanced Multi-field Search -->\n<p-popover #overlay [dismissable]=\"true\" styleClass=\"p-4 w-80\">\n\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit(); overlay.hide()\">\n <formly-form\n [form]=\"form\"\n [fields]=\"fields_\"\n [model]=\"model\"\n [options]=\"options\">\n </formly-form>\n\n <div class=\"flex justify-end mt-4 space-x-2\">\n <button type=\"submit\" pButton size=\"small\" label=\"{{ 'SEARCH' | translate }}\"></button>\n <button type=\"button\" pButton size=\"small\" class=\"p-button-text\" (click)=\"onReset(); overlay.hide()\">\n {{ 'CLEAR' | translate }}\n </button>\n </div>\n </form>\n\n</p-popover>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ToolbarModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { 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: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i3$2.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { 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: InputIconModule }, { kind: "component", type: i4$2.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["styleClass"] }, { kind: "ngmodule", type: IconFieldModule }, { kind: "component", type: i5$1.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["iconPosition", "styleClass"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
2965
3008
  }
2966
3009
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericSearch, decorators: [{
2967
3010
  type: Component,
@@ -3134,7 +3177,7 @@ class GenericTable {
3134
3177
  }
3135
3178
  }
3136
3179
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
3137
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericTable, isStandalone: true, selector: "lib-generic-table", inputs: { data: "data", columns: "columns", loading: "loading", actions: "actions", actionsMode: "actionsMode", first: "first", rows: "rows", totalRecords: "totalRecords", sortField: "sortField", sortOrder: "sortOrder", globalFilterFields: "globalFilterFields", scrollHeight: "scrollHeight", rowSelectable: "rowSelectable", selection: "selection", paginator: "paginator", showRowSelectionCheckbox: "showRowSelectionCheckbox" }, outputs: { action: "action", pageChange: "pageChange", rowSelect: "rowSelect", selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "dt", first: true, predicate: ["dt"], descendants: true }], ngImport: i0, template: "\r\n<div class=\"flex-1 last:[&>td]:border-0 rounded-lg border border-surface w-full overflow-auto\">\r\n <p-table #dt\r\n [value]=\"data\"\r\n [columns]=\"columns\"\r\n [lazy]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [first]=\"first\"\r\n [totalRecords]=\"totalRecords\"\r\n [sortField]=\"sortField\"\r\n [sortOrder]=\"sortOrder\" (onLazyLoad)=\"onLazyLoad($event)\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [loading]=\"loading\"\r\n [scrollable]=\"true\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [selectionMode]=\"showRowSelectionCheckbox ? 'multiple' : (rowSelectable ? 'single' : undefined)\"\r\n [(selection)]=\"_selection\"\r\n (onRowSelect)=\"onInternalSelectionChange($event)\"\r\n (onRowUnselect)=\"onInternalSelectionChange($event)\"\r\n (onHeaderCheckboxToggle)=\"onInternalSelectionChange($event)\"\r\n tableLayout=\"fixed\"\r\n [customSort]=\"false\"\r\n (sortFunction)=\"customSort($event)\"\r\n >\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th *ngIf=\"showRowSelectionCheckbox\" style=\"width: 2rem\">\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n </th>\r\n <!-- <th style=\"width: 1rem\">\r\n <p-tableHeaderCheckbox />\r\n </th> -->\r\n\r\n <ng-container *ngFor=\"let col of columns\" >\r\n <th *ngIf=\"col.props?.table?.props?.width; else templateName\" [pSortableColumn]=\"col.key\"\r\n class=\"px-4 py-2 text-sm font-medium text-white text-center\"\r\n [style.min-width]=\"col.props?.table?.props?.width\">\r\n {{ col.props?.label | translate }}\r\n <p-sortIcon [field]=\"col.key\"></p-sortIcon>\r\n </th>\r\n\r\n <ng-template #templateName>\r\n <th class=\"px-4 py-2 text-sm font-medium text-white text-center\">\r\n {{ col.props?.label | translate }}\r\n <p-sortIcon [field]=\"col.key\"></p-sortIcon>\r\n </th>\r\n </ng-template>\r\n</ng-container>\r\n\r\n\r\n <th class=\"px-4 py-2 text-sm font-medium text-white text-center\"> {{ 'OPERATIONS' | translate }}</th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-i=\"rowIndex\">\r\n <tr class=\"even:bg-gray-50 hover:bg-gray-100\" (click)=\"rowSelect.emit(rowData)\">\r\n <!-- <td style=\"width: 1rem\">\r\n <p-tableCheckbox [value]=\"rowData\" />\r\n </td> -->\r\n <td *ngIf=\"showRowSelectionCheckbox\" style=\"width: 2rem\">\r\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\r\n </td>\r\n <td *ngFor=\"let col of columns_ ; let colIndex = index\"\r\n class=\"border-t border-gray-200 px-4 py-2 text-center text-sm text-gray-700\"\r\n [style.width]=\"col.props && col.props['table']\r\n && col.props['table']['props'] && col.props['table']['props']['width'] \"\r\n\r\n >\r\n\r\n\r\n <!-- \u0625\u0630\u0627 \u0627\u0644\u0639\u0645\u0648\u062F \u0642\u0627\u0628\u0644 \u0644\u0644\u0646\u0642\u0631 -->\r\n\r\n <formly-form\r\n [model]=\"rowData\"\r\n [form]=\"getForm(i, colIndex)\"\r\n [fields]=\"[cloneField(col)]\"\r\n [options]=\"options\">\r\n </formly-form>\r\n\r\n </td>\r\n <td class=\"border-t border-gray-200 px-4 py-2 text-center align-middle\">\r\n <ng-container [ngSwitch]=\"actionsMode\">\r\n <!-- Render buttons -->\r\n <ng-container *ngSwitchCase=\"'buttons'\">\r\n <ng-container *ngFor=\"let act of actions\">\r\n <button\r\n *ngIf=\"act.icon || act.label\"\r\n pButton\r\n [icon]=\"act.icon || ''\"\r\n [label]=\"(act.label || '') | translate\"\r\n [class]=\"act.styleClass || ''\"\r\n class=\"p-button-sm mx-1\"\r\n (click)=\"onAction(act, rowData)\"\r\n ></button>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- Render menu -->\r\n <ng-container *ngSwitchCase=\"'menu'\">\r\n <p-menu #menu [model]=\"getMenuItems(rowData)\" [popup]=\"true\" appendTo=\"body\">\r\n <ng-template let-item pTemplate=\"item\">\r\n <div class=\"flex items-center gap-2 px-2 py-1\">\r\n <i [ngClass]=\"item.icon\" class=\"text-primary-600\" *ngIf=\"item.icon\"></i>\r\n <span class=\"font-medium\">{{ (item.label || '') | translate }}</span>\r\n\r\n <span *ngIf=\"item.badge\" class=\"ml-auto text-xs bg-red-500 text-white px-2 py-1 rounded\">\r\n {{ item.badge }}\r\n </span>\r\n\r\n <!-- <p-inputSwitch *ngIf=\"item.toggle\" [(ngModel)]=\"item.toggleValue\" class=\"ml-auto\" /> -->\r\n </div>\r\n </ng-template>\r\n </p-menu>\r\n\r\n <p-button\r\n outlined\r\n icon=\"pi pi-ellipsis-v\"\r\n class=\"p-button-text p-button-sm\"\r\n (onClick)=\"menu.toggle($event)\"\r\n ></p-button>\r\n </ng-container>\r\n </ng-container>\r\n\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n</div>\r\n", styles: [".custom-button-medium{font-size:1.1rem;width:2.5rem;height:2.5rem;line-height:2.5rem;padding:0}.custom-button-gray{color:#333;background-color:transparent;border:none}.custom-button-gray:hover{background-color:#eee;color:#000}.icon-delete{color:red!important}.icon-edit{color:#333}\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: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$3.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2$3.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2$3.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i2$3.TableCheckbox, selector: "p-tableCheckbox", inputs: ["value", "disabled", "required", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i2$3.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { 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: MenuModule }, { kind: "component", type: i4.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex", "appendTo"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
3180
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericTable, isStandalone: true, selector: "lib-generic-table", inputs: { data: "data", columns: "columns", loading: "loading", actions: "actions", actionsMode: "actionsMode", first: "first", rows: "rows", totalRecords: "totalRecords", sortField: "sortField", sortOrder: "sortOrder", globalFilterFields: "globalFilterFields", scrollHeight: "scrollHeight", rowSelectable: "rowSelectable", selection: "selection", paginator: "paginator", showRowSelectionCheckbox: "showRowSelectionCheckbox" }, outputs: { action: "action", pageChange: "pageChange", rowSelect: "rowSelect", selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "dt", first: true, predicate: ["dt"], descendants: true }], ngImport: i0, template: "\r\n<div class=\"flex-1 last:[&>td]:border-0 rounded-lg border border-surface w-full overflow-auto\">\r\n <p-table #dt\r\n [value]=\"data\"\r\n [columns]=\"columns\"\r\n [lazy]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [first]=\"first\"\r\n [totalRecords]=\"totalRecords\"\r\n [sortField]=\"sortField\"\r\n [sortOrder]=\"sortOrder\" (onLazyLoad)=\"onLazyLoad($event)\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [loading]=\"loading\"\r\n [scrollable]=\"true\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [selectionMode]=\"showRowSelectionCheckbox ? 'multiple' : (rowSelectable ? 'single' : undefined)\"\r\n [(selection)]=\"_selection\"\r\n (onRowSelect)=\"onInternalSelectionChange($event)\"\r\n (onRowUnselect)=\"onInternalSelectionChange($event)\"\r\n (onHeaderCheckboxToggle)=\"onInternalSelectionChange($event)\"\r\n tableLayout=\"fixed\"\r\n [customSort]=\"false\"\r\n (sortFunction)=\"customSort($event)\"\r\n >\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th *ngIf=\"showRowSelectionCheckbox\" style=\"width: 2rem\">\r\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\r\n </th>\r\n <!-- <th style=\"width: 1rem\">\r\n <p-tableHeaderCheckbox />\r\n </th> -->\r\n\r\n <ng-container *ngFor=\"let col of columns\" >\r\n <th *ngIf=\"col.props?.table?.props?.width; else templateName\" [pSortableColumn]=\"col.key\"\r\n class=\"px-4 py-2 text-sm font-medium text-white text-center\"\r\n [style.min-width]=\"col.props?.table?.props?.width\">\r\n {{ col.props?.label | translate }}\r\n <p-sortIcon [field]=\"col.key\"></p-sortIcon>\r\n </th>\r\n\r\n <ng-template #templateName>\r\n <th class=\"px-4 py-2 text-sm font-medium text-white text-center\">\r\n {{ col.props?.label | translate }}\r\n <p-sortIcon [field]=\"col.key\"></p-sortIcon>\r\n </th>\r\n </ng-template>\r\n</ng-container>\r\n\r\n\r\n <th class=\"px-4 py-2 text-sm font-medium text-white text-center\"> {{ 'OPERATIONS' | translate }}</th>\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-i=\"rowIndex\">\r\n <tr class=\"even:bg-gray-50 hover:bg-gray-100\" (click)=\"rowSelect.emit(rowData)\">\r\n <!-- <td style=\"width: 1rem\">\r\n <p-tableCheckbox [value]=\"rowData\" />\r\n </td> -->\r\n <td *ngIf=\"showRowSelectionCheckbox\" style=\"width: 2rem\">\r\n <p-tableCheckbox [value]=\"rowData\"></p-tableCheckbox>\r\n </td>\r\n <td *ngFor=\"let col of columns_ ; let colIndex = index\"\r\n class=\"border-t border-gray-200 px-4 py-2 text-center text-sm text-gray-700\"\r\n [style.width]=\"col.props && col.props['table']\r\n && col.props['table']['props'] && col.props['table']['props']['width'] \"\r\n\r\n >\r\n\r\n\r\n <!-- \u0625\u0630\u0627 \u0627\u0644\u0639\u0645\u0648\u062F \u0642\u0627\u0628\u0644 \u0644\u0644\u0646\u0642\u0631 -->\r\n\r\n <formly-form\r\n [model]=\"rowData\"\r\n [form]=\"getForm(i, colIndex)\"\r\n [fields]=\"[cloneField(col)]\"\r\n [options]=\"options\">\r\n </formly-form>\r\n\r\n </td>\r\n <td class=\"border-t border-gray-200 px-4 py-2 text-center align-middle\">\r\n <ng-container [ngSwitch]=\"actionsMode\">\r\n <!-- Render buttons -->\r\n <ng-container *ngSwitchCase=\"'buttons'\">\r\n <ng-container *ngFor=\"let act of actions\">\r\n <button\r\n *ngIf=\"act.icon || act.label\"\r\n pButton\r\n [icon]=\"act.icon || ''\"\r\n [label]=\"(act.label || '') | translate\"\r\n [class]=\"act.styleClass || ''\"\r\n class=\"p-button-sm mx-1\"\r\n (click)=\"onAction(act, rowData)\"\r\n ></button>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- Render menu -->\r\n <ng-container *ngSwitchCase=\"'menu'\">\r\n <p-menu #menu [model]=\"getMenuItems(rowData)\" [popup]=\"true\" appendTo=\"body\">\r\n <ng-template let-item pTemplate=\"item\">\r\n <div class=\"flex items-center gap-2 px-2 py-1\">\r\n <i [ngClass]=\"item.icon\" class=\"text-primary-600\" *ngIf=\"item.icon\"></i>\r\n <span class=\"font-medium\">{{ (item.label || '') | translate }}</span>\r\n\r\n <span *ngIf=\"item.badge\" class=\"ml-auto text-xs bg-red-500 text-white px-2 py-1 rounded\">\r\n {{ item.badge }}\r\n </span>\r\n\r\n <!-- <p-inputSwitch *ngIf=\"item.toggle\" [(ngModel)]=\"item.toggleValue\" class=\"ml-auto\" /> -->\r\n </div>\r\n </ng-template>\r\n </p-menu>\r\n\r\n <p-button\r\n outlined\r\n icon=\"pi pi-ellipsis-v\"\r\n class=\"p-button-text p-button-sm\"\r\n (onClick)=\"menu.toggle($event)\"\r\n ></p-button>\r\n </ng-container>\r\n </ng-container>\r\n\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n</div>\r\n", styles: [".custom-button-medium{font-size:1.1rem;width:2.5rem;height:2.5rem;line-height:2.5rem;padding:0}.custom-button-gray{color:#333;background-color:transparent;border:none}.custom-button-gray:hover{background-color:#eee;color:#000}.icon-delete{color:red!important}.icon-edit{color:#333}\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: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2$2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2$2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i2$2.TableCheckbox, selector: "p-tableCheckbox", inputs: ["value", "disabled", "required", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i2$2.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { 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: MenuModule }, { kind: "component", type: i4$1.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex", "appendTo"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
3138
3181
  }
3139
3182
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericTable, decorators: [{
3140
3183
  type: Component,
@@ -3184,10 +3227,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
3184
3227
  type: Input
3185
3228
  }] } });
3186
3229
 
3230
+ // app/shared/services/swal.service.ts
3231
+ class SwalService {
3232
+ /** رسالة تأكيد قبل تنفيذ إجراء */
3233
+ confirm(title = 'هل أنت متأكد؟', text = 'لن يمكنك التراجع عن هذا الإجراء', confirmButtonText = 'نعم', cancelButtonText = 'إلغاء') {
3234
+ return Swal.fire({
3235
+ icon: 'warning',
3236
+ title,
3237
+ text,
3238
+ showCancelButton: true,
3239
+ confirmButtonText,
3240
+ cancelButtonText,
3241
+ // reverseButtons: true,
3242
+ customClass: {
3243
+ container: 'swal2-container' // ✅ أضف هذه الفئة
3244
+ }
3245
+ });
3246
+ }
3247
+ /** رسالة نجاح */
3248
+ success(title, text, timer = 2000) {
3249
+ return Swal.fire({
3250
+ icon: 'success',
3251
+ title,
3252
+ text,
3253
+ timer,
3254
+ showConfirmButton: false,
3255
+ customClass: {
3256
+ container: 'swal2-container' // ✅ أضف هذه الفئة
3257
+ }
3258
+ });
3259
+ }
3260
+ /** رسالة خطأ */
3261
+ error(title, text, footer) {
3262
+ return Swal.fire({
3263
+ icon: 'error',
3264
+ title,
3265
+ text,
3266
+ footer,
3267
+ customClass: {
3268
+ container: 'swal2-container' // ✅ أضف هذه الفئة
3269
+ }
3270
+ });
3271
+ }
3272
+ /** رسالة معلومات */
3273
+ info(title, text) {
3274
+ return Swal.fire({
3275
+ icon: 'info',
3276
+ title,
3277
+ text,
3278
+ });
3279
+ }
3280
+ /** عرض نافذة SweetAlert2 بأي خيارات تريد */
3281
+ alert(options) {
3282
+ return Swal.fire(options);
3283
+ }
3284
+ /** Toast بسيط قابل لإعادة الاستخدام */
3285
+ toast(title, icon = 'info', position = 'top-end', timer = 3000) {
3286
+ const Toast = Swal.mixin({
3287
+ toast: true,
3288
+ position,
3289
+ timer,
3290
+ showConfirmButton: false,
3291
+ });
3292
+ Toast.fire({ icon, title });
3293
+ }
3294
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: SwalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3295
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: SwalService, providedIn: 'root' });
3296
+ }
3297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: SwalService, decorators: [{
3298
+ type: Injectable,
3299
+ args: [{ providedIn: 'root' }]
3300
+ }] });
3301
+
3187
3302
  class GenericCrudTableComponent {
3188
3303
  genericTable;
3189
3304
  translate = inject(TranslateService);
3190
- swalService = inject(SwalService$1);
3305
+ swalService = inject(SwalService);
3191
3306
  home = { icon: 'pi pi-home', routerLink: '/' };
3192
3307
  data = [];
3193
3308
  formFields_ = []; // <-- هنا
@@ -3416,7 +3531,7 @@ class GenericCrudTableComponent {
3416
3531
  });
3417
3532
  }
3418
3533
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericCrudTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3419
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericCrudTableComponent, isStandalone: true, selector: "app-generic-crud-table", inputs: { data: "data", formFields: "formFields", columns: "columns", isViewMode: "isViewMode", isEditMode: "isEditMode", drawerVisible: "drawerVisible", dialogVisible: "dialogVisible", model: "model", loading: "loading", errorMsg: "errorMsg", errorMessage: "errorMessage", actions: "actions", actionsMode: "actionsMode", filters: "filters", filterModel: "filterModel", showSearch: "showSearch", first: "first", rows: "rows", totalRecords: "totalRecords", rowSelectable: "rowSelectable", scrollHeight: "scrollHeight", paginator: "paginator", service: "service", idField: "idField", showRowSelectionCheckbox: "showRowSelectionCheckbox", bulkActionButtons: "bulkActionButtons", singleActionButtons: "singleActionButtons", showAddButton: "showAddButton", addButtonIcon: "addButtonIcon", addButtonLabel: "addButtonLabel", addButtonPosition: "addButtonPosition", addButtonConfigs: "addButtonConfigs", breadcrumb: "breadcrumb", beforeSave: "beforeSave" }, outputs: { action: "action", bulkAction: "bulkAction", singleAction: "singleAction", search: "search", pageChange: "pageChange", onSearch: "onSearch", visibleChange: "visibleChange", rowSelect: "rowSelect" }, host: { classAttribute: "h-full flex-1 flex flex-col overflow-hidden border border-surface rounded-2xl p-4 bg-white" }, viewQueries: [{ propertyName: "genericTable", first: true, predicate: ["genericTable"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\r\n <div class=\"flex items-start gap-2 justify-between\">\r\n <div>\r\n <!-- <div class=\"text-2xl leading-8 font-medium bg-slate-800 p-4 rounded-md\">\r\n <p-breadcrumb\r\n [model]=\"breadcrumb_\"\r\n [home]=\"home\"\r\n styleClass=\"custom-breadcrumb\"\r\n ></p-breadcrumb>\r\n </div> -->\r\n\r\n<app-breadcrumb [breadcrumb]=\"breadcrumb_\"></app-breadcrumb>\r\n\r\n </div>\r\n\r\n<div class=\"flex items-center gap-2 justify-end flex-wrap\">\r\n <ng-container *ngIf=\"isSingleItemSelected\">\r\n <ng-container *ngFor=\"let btn of singleActionButtons; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n\r\n [icon]=\"btn.icon\"\r\n[label]=\"btn.label | translate\"\r\n[variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\"onSingleItemAction(btn)\"\r\n ></lib-generic-button>\r\n</ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"selectedItems.length > 0\">\r\n <ng-container *ngFor=\"let btn of bulkActionButtons; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n [icon]=\"btn.icon\"\r\n [label]=\"btn.label | translate\"\r\n [variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\"onInternalBulkAction(btn)\"\r\n ></lib-generic-button>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let btn of addButtonConfigs; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n [icon]=\"btn.icon\"\r\n [label]=\"btn.label | translate\"\r\n [variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\" this.action.emit({ name: btn.actionName ?? 'add', row: null! });\"\r\n ></lib-generic-button>\r\n </ng-container>\r\n\r\n <p-button\r\n icon=\"pi pi-circle-fill text-green-500\" *ngIf=\"showAddButton && addButtonConfigs.length == 0\"\r\n [label]=\"(addButtonLabel | translate)\r\n \"(onClick)=\"action.emit({ name: 'add', row: null! })\"\r\n outlined severity=\"secondary\" />\r\n\r\n </div>\r\n </div>\r\n <div class=\"mt-2 mb-4 flex items-center justify-between\">\r\n\r\n <ng-container *ngIf=\"showSearch && filters; else emptySearch\">\r\n <lib-generic-search\r\n [model]=\"filterModel\"\r\n [fields]=\"filters\"\r\n (search)=\"applySearch($event)\"\r\n (reset)=\"applySearch('')\"\r\n ></lib-generic-search>\r\n </ng-container>\r\n\r\n <ng-template #emptySearch>\r\n <!-- Render a dummy div to preserve expected DOM shape -->\r\n <!-- <div class=\"min-h-[2.5rem] w-[12rem]\"></div> -->\r\n </ng-template>\r\n\r\n <div class=\"flex items-center gap-3\">\r\n\r\n <p-button icon=\"pi pi-refresh\" outlined severity=\"secondary\" (onClick)=\"applySearch('')\" />\r\n <p-divider layout=\"vertical\" class=\"m-0 p-0\" />\r\n <p-button icon=\"pi pi-sort\" outlined severity=\"secondary\" />\r\n <p-button label=\"1 of 15\" outlined severity=\"secondary\" />\r\n <p-button icon=\"pi pi-chevron-right\" outlined severity=\"secondary\" />\r\n <p-button icon=\"pi pi-chevron-left\" outlined severity=\"secondary\" />\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n<lib-generic-table\r\n [data]=\"data\"\r\n [columns]=\"columns\"\r\n [paginator]=\"paginator\"\r\n [loading]=\"loading\"\r\n [actions]=\"actions\"\r\n [actionsMode]=\"actionsMode\"\r\n [first]=\"first\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [sortField]=\"sortField\"\r\n [sortOrder]=\"sortOrder\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [showRowSelectionCheckbox]=\"showRowSelectionCheckbox\"\r\n (action)=\"action.emit($event)\"\r\n (pageChange)=\"onLazyLoad($event)\"\r\n [rowSelectable]=\"rowSelectable\"\r\n (rowSelect)=\"onRowClick($event)\"\r\n [(selection)]=\"_selectedRows\"\r\n #genericTable\r\n></lib-generic-table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n<p-drawer *ngIf=\"drawerVisible\"\r\n[(visible)]=\"drawerVisible\" [closable]=\"true\"\r\n[dismissible]=\"false\" [closeOnEscape]=\"true\"\r\n(visibleChange)=\"visibleChange.emit($event)\"\r\nstyleClass=\"!w-full md:!w-80 lg:!w-[40rem]\">\r\n <!-- Header -->\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"flex items-center justify-between w-full\">\r\n <div class=\"flex items-center gap-2\">\r\n <i class=\"pi pi-arrow-left cursor-pointer text-xl\" (click)=\"visibleChange.emit(false)\"></i>\r\n <span class=\"font-bold text-lg\">{{ isEditMode ? '\u062A\u0639\u062F\u064A\u0644 ' : '\u0625\u0636\u0627\u0641\u0629' }}</span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n<form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" class=\"p-4\">\r\n <formly-form [form]=\"form\" [fields]=\"formFields_\" [model]=\"model\" [options]=\"options\"></formly-form>\r\n </form>\r\n\r\n <!-- Footer -->\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"flex justify-end gap-2\">\r\n <button\r\n pButton\r\n [label]=\"isEditMode ? ('UPDATE' | translate) : ('SAVE' | translate)\"\r\n [disabled]=\"loading || form.invalid\"\r\n [loading]=\"loading\"\r\n size=\"large\"\r\n type=\"submit\"\r\n (click)=\"onSubmit()\">\r\n </button>\r\n\r\n <button\r\n pButton\r\n label=\"{{ 'CANCEL' | translate }}\"\r\n severity=\"danger\"\r\n size=\"large\"\r\n (click)=\"visibleChange.emit(false)\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-drawer>\r\n\r\n<p-dialog\r\n *ngIf=\"dialogVisible\"\r\n [(visible)]=\"dialogVisible\"\r\n [modal]=\"true\"\r\n [closable]=\"true\"\r\n [dismissableMask]=\"true\"\r\n [closeOnEscape]=\"true\"\r\n (visibleChange)=\"visibleChange.emit($event)\"\r\n [style]=\"{ width: '95vw', maxWidth: '40rem' }\"\r\n [header]=\"viewHeaderTitle\"\r\n>\r\n<!-- backdrop-blur-sm -->\r\n <div class=\"relative\">\r\n <!-- Only visible in view mode: disables interaction and adds blur effect -->\r\n <div\r\n *ngIf=\"isViewMode\"\r\n class=\"absolute inset-0 z-10 bg-white/50 pointer-events-auto cursor-not-allowed rounded-md\">\r\n </div>\r\n\r\n <!-- Form -->\r\n <form *ngIf=\"form\" [formGroup]=\"form\" class=\"p-4\">\r\n <formly-form\r\n [form]=\"form\"\r\n [fields]=\"formFields_\"\r\n [model]=\"model\"\r\n [options]=\"options\">\r\n </formly-form>\r\n </form>\r\n </div>\r\n <!-- Footer -->\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"flex justify-end\">\r\n <button\r\n pButton\r\n label=\"{{ 'CLOSE' | translate }}\"\r\n severity=\"secondary\"\r\n size=\"large\"\r\n (click)=\"visibleChange.emit(false)\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n\r\n\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: TableModule }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: GenericButton, selector: "lib-generic-button", inputs: ["model", "type", "icon", "label", "variant", "severity", "size", "iconPosition", "disabled", "loading", "ariaLabel", "extraClasses", "permission"], outputs: ["clicked", "itemClick"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { 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: "component", type: GenericSearch, selector: "lib-generic-search", inputs: ["placeholder", "model", "fields"], outputs: ["search"] }, { kind: "component", type: GenericTable, selector: "lib-generic-table", inputs: ["data", "columns", "loading", "actions", "actionsMode", "first", "rows", "totalRecords", "sortField", "sortOrder", "globalFilterFields", "scrollHeight", "rowSelectable", "selection", "paginator", "showRowSelectionCheckbox"], outputs: ["action", "pageChange", "rowSelect", "selectionChange"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: DividerModule }, { kind: "component", type: i4$2.Divider, selector: "p-divider", inputs: ["styleClass", "layout", "type", "align"] }, { kind: "ngmodule", type: IconFieldModule }, { kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i5$2.Drawer, selector: "p-drawer", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: BreadcrumbComponent, selector: "app-breadcrumb", inputs: ["breadcrumb"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
3534
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: GenericCrudTableComponent, isStandalone: true, selector: "app-generic-crud-table", inputs: { data: "data", formFields: "formFields", columns: "columns", isViewMode: "isViewMode", isEditMode: "isEditMode", drawerVisible: "drawerVisible", dialogVisible: "dialogVisible", model: "model", loading: "loading", errorMsg: "errorMsg", errorMessage: "errorMessage", actions: "actions", actionsMode: "actionsMode", filters: "filters", filterModel: "filterModel", showSearch: "showSearch", first: "first", rows: "rows", totalRecords: "totalRecords", rowSelectable: "rowSelectable", scrollHeight: "scrollHeight", paginator: "paginator", service: "service", idField: "idField", showRowSelectionCheckbox: "showRowSelectionCheckbox", bulkActionButtons: "bulkActionButtons", singleActionButtons: "singleActionButtons", showAddButton: "showAddButton", addButtonIcon: "addButtonIcon", addButtonLabel: "addButtonLabel", addButtonPosition: "addButtonPosition", addButtonConfigs: "addButtonConfigs", breadcrumb: "breadcrumb", beforeSave: "beforeSave" }, outputs: { action: "action", bulkAction: "bulkAction", singleAction: "singleAction", search: "search", pageChange: "pageChange", onSearch: "onSearch", visibleChange: "visibleChange", rowSelect: "rowSelect" }, host: { classAttribute: "h-full flex-1 flex flex-col overflow-hidden border border-surface rounded-2xl p-4 bg-white" }, viewQueries: [{ propertyName: "genericTable", first: true, predicate: ["genericTable"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\r\n <div class=\"flex items-start gap-2 justify-between\">\r\n <div>\r\n <!-- <div class=\"text-2xl leading-8 font-medium bg-slate-800 p-4 rounded-md\">\r\n <p-breadcrumb\r\n [model]=\"breadcrumb_\"\r\n [home]=\"home\"\r\n styleClass=\"custom-breadcrumb\"\r\n ></p-breadcrumb>\r\n </div> -->\r\n\r\n<app-breadcrumb [breadcrumb]=\"breadcrumb_\"></app-breadcrumb>\r\n\r\n </div>\r\n\r\n<div class=\"flex items-center gap-2 justify-end flex-wrap\">\r\n <ng-container *ngIf=\"isSingleItemSelected\">\r\n <ng-container *ngFor=\"let btn of singleActionButtons; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n\r\n [icon]=\"btn.icon\"\r\n[label]=\"btn.label | translate\"\r\n[variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\"onSingleItemAction(btn)\"\r\n ></lib-generic-button>\r\n</ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"selectedItems.length > 0\">\r\n <ng-container *ngFor=\"let btn of bulkActionButtons; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n [icon]=\"btn.icon\"\r\n [label]=\"btn.label | translate\"\r\n [variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\"onInternalBulkAction(btn)\"\r\n ></lib-generic-button>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let btn of addButtonConfigs; trackBy: trackByIdx\">\r\n <lib-generic-button\r\n [icon]=\"btn.icon\"\r\n [label]=\"btn.label | translate\"\r\n [variant]=\"btn.variant\"\r\n [size]=\"btn.size\"\r\n [permission]=\"btn.permission\"\r\n (clicked)=\" this.action.emit({ name: btn.actionName ?? 'add', row: null! });\"\r\n ></lib-generic-button>\r\n </ng-container>\r\n\r\n <p-button\r\n icon=\"pi pi-circle-fill text-green-500\" *ngIf=\"showAddButton && addButtonConfigs.length == 0\"\r\n [label]=\"(addButtonLabel | translate)\r\n \"(onClick)=\"action.emit({ name: 'add', row: null! })\"\r\n outlined severity=\"secondary\" />\r\n\r\n </div>\r\n </div>\r\n <div class=\"mt-2 mb-4 flex items-center justify-between\">\r\n\r\n <ng-container *ngIf=\"showSearch && filters; else emptySearch\">\r\n <lib-generic-search\r\n [model]=\"filterModel\"\r\n [fields]=\"filters\"\r\n (search)=\"applySearch($event)\"\r\n (reset)=\"applySearch('')\"\r\n ></lib-generic-search>\r\n </ng-container>\r\n\r\n <ng-template #emptySearch>\r\n <!-- Render a dummy div to preserve expected DOM shape -->\r\n <!-- <div class=\"min-h-[2.5rem] w-[12rem]\"></div> -->\r\n </ng-template>\r\n\r\n <div class=\"flex items-center gap-3\">\r\n\r\n <p-button icon=\"pi pi-refresh\" outlined severity=\"secondary\" (onClick)=\"applySearch('')\" />\r\n <p-divider layout=\"vertical\" class=\"m-0 p-0\" />\r\n <p-button icon=\"pi pi-sort\" outlined severity=\"secondary\" />\r\n <p-button label=\"1 of 15\" outlined severity=\"secondary\" />\r\n <p-button icon=\"pi pi-chevron-right\" outlined severity=\"secondary\" />\r\n <p-button icon=\"pi pi-chevron-left\" outlined severity=\"secondary\" />\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n<lib-generic-table\r\n [data]=\"data\"\r\n [columns]=\"columns\"\r\n [paginator]=\"paginator\"\r\n [loading]=\"loading\"\r\n [actions]=\"actions\"\r\n [actionsMode]=\"actionsMode\"\r\n [first]=\"first\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [sortField]=\"sortField\"\r\n [sortOrder]=\"sortOrder\"\r\n [globalFilterFields]=\"globalFilterFields\"\r\n [scrollHeight]=\"scrollHeight\"\r\n [showRowSelectionCheckbox]=\"showRowSelectionCheckbox\"\r\n (action)=\"action.emit($event)\"\r\n (pageChange)=\"onLazyLoad($event)\"\r\n [rowSelectable]=\"rowSelectable\"\r\n (rowSelect)=\"onRowClick($event)\"\r\n [(selection)]=\"_selectedRows\"\r\n #genericTable\r\n></lib-generic-table>\r\n\r\n\r\n\r\n\r\n\r\n\r\n<p-drawer *ngIf=\"drawerVisible\"\r\n[(visible)]=\"drawerVisible\" [closable]=\"true\"\r\n[dismissible]=\"false\" [closeOnEscape]=\"true\"\r\n(visibleChange)=\"visibleChange.emit($event)\"\r\nstyleClass=\"!w-full md:!w-80 lg:!w-[40rem]\">\r\n <!-- Header -->\r\n <ng-template pTemplate=\"header\">\r\n <div class=\"flex items-center justify-between w-full\">\r\n <div class=\"flex items-center gap-2\">\r\n <i class=\"pi pi-arrow-left cursor-pointer text-xl\" (click)=\"visibleChange.emit(false)\"></i>\r\n <span class=\"font-bold text-lg\">{{ isEditMode ? '\u062A\u0639\u062F\u064A\u0644 ' : '\u0625\u0636\u0627\u0641\u0629' }}</span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n<form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" class=\"p-4\">\r\n <formly-form [form]=\"form\" [fields]=\"formFields_\" [model]=\"model\" [options]=\"options\"></formly-form>\r\n </form>\r\n\r\n <!-- Footer -->\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"flex justify-end gap-2\">\r\n <button\r\n pButton\r\n [label]=\"isEditMode ? ('UPDATE' | translate) : ('SAVE' | translate)\"\r\n [disabled]=\"loading || form.invalid\"\r\n [loading]=\"loading\"\r\n size=\"large\"\r\n type=\"submit\"\r\n (click)=\"onSubmit()\">\r\n </button>\r\n\r\n <button\r\n pButton\r\n label=\"{{ 'CANCEL' | translate }}\"\r\n severity=\"danger\"\r\n size=\"large\"\r\n (click)=\"visibleChange.emit(false)\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-drawer>\r\n\r\n<p-dialog\r\n *ngIf=\"dialogVisible\"\r\n [(visible)]=\"dialogVisible\"\r\n [modal]=\"true\"\r\n [closable]=\"true\"\r\n [dismissableMask]=\"true\"\r\n [closeOnEscape]=\"true\"\r\n (visibleChange)=\"visibleChange.emit($event)\"\r\n [style]=\"{ width: '95vw', maxWidth: '40rem' }\"\r\n [header]=\"viewHeaderTitle\"\r\n>\r\n<!-- backdrop-blur-sm -->\r\n <div class=\"relative\">\r\n <!-- Only visible in view mode: disables interaction and adds blur effect -->\r\n <div\r\n *ngIf=\"isViewMode\"\r\n class=\"absolute inset-0 z-10 bg-white/50 pointer-events-auto cursor-not-allowed rounded-md\">\r\n </div>\r\n\r\n <!-- Form -->\r\n <form *ngIf=\"form\" [formGroup]=\"form\" class=\"p-4\">\r\n <formly-form\r\n [form]=\"form\"\r\n [fields]=\"formFields_\"\r\n [model]=\"model\"\r\n [options]=\"options\">\r\n </formly-form>\r\n </form>\r\n </div>\r\n <!-- Footer -->\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"flex justify-end\">\r\n <button\r\n pButton\r\n label=\"{{ 'CLOSE' | translate }}\"\r\n severity=\"secondary\"\r\n size=\"large\"\r\n (click)=\"visibleChange.emit(false)\">\r\n </button>\r\n </div>\r\n </ng-template>\r\n</p-dialog>\r\n\r\n\r\n\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: TableModule }, { kind: "directive", type: i1$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: GenericButton, selector: "lib-generic-button", inputs: ["model", "type", "icon", "label", "variant", "severity", "size", "iconPosition", "disabled", "loading", "ariaLabel", "extraClasses", "permission"], outputs: ["clicked", "itemClick"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { 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: "component", type: GenericSearch, selector: "lib-generic-search", inputs: ["placeholder", "model", "fields"], outputs: ["search"] }, { kind: "component", type: GenericTable, selector: "lib-generic-table", inputs: ["data", "columns", "loading", "actions", "actionsMode", "first", "rows", "totalRecords", "sortField", "sortOrder", "globalFilterFields", "scrollHeight", "rowSelectable", "selection", "paginator", "showRowSelectionCheckbox"], outputs: ["action", "pageChange", "rowSelect", "selectionChange"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: DividerModule }, { kind: "component", type: i4$3.Divider, selector: "p-divider", inputs: ["styleClass", "layout", "type", "align"] }, { kind: "ngmodule", type: IconFieldModule }, { kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i5$2.Drawer, selector: "p-drawer", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: BreadcrumbComponent, selector: "app-breadcrumb", inputs: ["breadcrumb"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i8.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }] });
3420
3535
  }
3421
3536
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GenericCrudTableComponent, decorators: [{
3422
3537
  type: Component,
@@ -3761,7 +3876,7 @@ class FormlyFieldDatepicker extends FieldType {
3761
3876
  (onSelect)="onDateSelect($event)"
3762
3877
  (onBlur)="onTouched()"
3763
3878
  ></p-datepicker>
3764
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2$4.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: FormlyFormFieldModule }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3879
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2$3.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "ngmodule", type: FormlyFormFieldModule }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3765
3880
  }
3766
3881
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FormlyFieldDatepicker, decorators: [{
3767
3882
  type: Component,
@@ -3925,8 +4040,10 @@ class GenericSelectorTypeComponent extends FieldType {
3925
4040
  this.loading = true;
3926
4041
  const vf = this.to['valueField'] || 'id';
3927
4042
  const fixedFilters = this.to['fixedFilters'] || {};
4043
+ const lf = this.to['loadDefaultField'] || 'isDefault';
4044
+ const lfValue = this.to['loadDefaultValue'] || true;
3928
4045
  const searchParams = {
3929
- isDefault: true,
4046
+ [lf]: lfValue,
3930
4047
  ...fixedFilters,
3931
4048
  };
3932
4049
  this.api.getList(searchParams)
@@ -4877,7 +4994,7 @@ class RichTextEditorTypeComponent extends FieldType {
4877
4994
  [style]="{height: to['height'] || '200px'}"
4878
4995
  [placeholder]="to.placeholder"
4879
4996
  ></p-editor>
4880
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: EditorModule }, { kind: "component", type: i2$5.Editor, selector: "p-editor", inputs: ["style", "styleClass", "placeholder", "formats", "modules", "bounds", "scrollingContainer", "debug", "readonly"], outputs: ["onInit", "onTextChange", "onSelectionChange"] }, { kind: "directive", type: AutofocusDirective, selector: "[appAutofocus]", inputs: ["appAutofocus"] }] });
4997
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: EditorModule }, { kind: "component", type: i2$4.Editor, selector: "p-editor", inputs: ["style", "styleClass", "placeholder", "formats", "modules", "bounds", "scrollingContainer", "debug", "readonly"], outputs: ["onInit", "onTextChange", "onSelectionChange"] }, { kind: "directive", type: AutofocusDirective, selector: "[appAutofocus]", inputs: ["appAutofocus"] }] });
4881
4998
  }
4882
4999
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: RichTextEditorTypeComponent, decorators: [{
4883
5000
  type: Component,
@@ -4988,7 +5105,7 @@ class FormlyFieldInput extends FieldType {
4988
5105
  </ng-template>
4989
5106
  </p-inputNumber>
4990
5107
  </ng-template>
4991
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "ngmodule", type: FormlyFormFieldModule$1 }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i7.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5108
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "ngmodule", type: FormlyFormFieldModule$1 }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i6.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4992
5109
  }
4993
5110
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FormlyFieldInput, decorators: [{
4994
5111
  type: Component,
@@ -5251,7 +5368,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
5251
5368
 
5252
5369
  class FormlyFieldTextArea extends FieldType {
5253
5370
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FormlyFieldTextArea, deps: null, target: i0.ɵɵFactoryTarget.Component });
5254
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: FormlyFieldTextArea, isStandalone: true, selector: "formly-field-primeng-textarea", usesInheritance: true, ngImport: i0, template: ` <textarea [formControl]="formControl" [formlyAttributes]="field" class="w-full rounded-none block" [placeholder]="(props['placeholder'] ?? '')| translate" pInputTextarea></textarea> `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "ngmodule", type: FormlyFormFieldModule }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: SelectModule }, { kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i2$6.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5371
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: FormlyFieldTextArea, isStandalone: true, selector: "formly-field-primeng-textarea", usesInheritance: true, ngImport: i0, template: ` <textarea [formControl]="formControl" [formlyAttributes]="field" class="w-full rounded-none block" [placeholder]="(props['placeholder'] ?? '')| translate" pInputTextarea></textarea> `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "ngmodule", type: FormlyFormFieldModule }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: SelectModule }, { kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i2$5.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5255
5372
  }
5256
5373
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FormlyFieldTextArea, decorators: [{
5257
5374
  type: Component,
@@ -5340,7 +5457,7 @@ class FormlyFieldCheckbox extends FieldType {
5340
5457
 
5341
5458
  />
5342
5459
  </div>
5343
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "ngmodule", type: FormlyFormFieldModule }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i6.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5460
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "ngmodule", type: FormlyFormFieldModule }, { kind: "directive", type: FormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i6$1.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5344
5461
  }
5345
5462
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: FormlyFieldCheckbox, decorators: [{
5346
5463
  type: Component,
@@ -5976,7 +6093,7 @@ class BaseCrud {
5976
6093
  currentFilters = {};
5977
6094
  mode = '';
5978
6095
  scrollHeight = '400px';
5979
- swalService = inject(SwalService$1);
6096
+ swalService = inject(SwalService);
5980
6097
  dialogRef;
5981
6098
  dialogVisible = false;
5982
6099
  drawerVisible = false;
@@ -6419,6 +6536,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
6419
6536
  args: ['appRtlLang']
6420
6537
  }] } });
6421
6538
 
6539
+ class AttachmentDto {
6540
+ id;
6541
+ binaryObjectId;
6542
+ description;
6543
+ mimeType;
6544
+ fileName;
6545
+ base64;
6546
+ caption;
6547
+ link;
6548
+ }
6549
+
6422
6550
  class ListResultDto {
6423
6551
  items;
6424
6552
  constructor(initialValues = {}) {
@@ -6907,78 +7035,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImpor
6907
7035
  args: [REQUEST]
6908
7036
  }] }] });
6909
7037
 
6910
- // app/shared/services/swal.service.ts
6911
- class SwalService {
6912
- /** رسالة تأكيد قبل تنفيذ إجراء */
6913
- confirm(title = 'هل أنت متأكد؟', text = 'لن يمكنك التراجع عن هذا الإجراء', confirmButtonText = 'نعم', cancelButtonText = 'إلغاء') {
6914
- return Swal.fire({
6915
- icon: 'warning',
6916
- title,
6917
- text,
6918
- showCancelButton: true,
6919
- confirmButtonText,
6920
- cancelButtonText,
6921
- // reverseButtons: true,
6922
- customClass: {
6923
- container: 'swal2-container' // ✅ أضف هذه الفئة
6924
- }
6925
- });
6926
- }
6927
- /** رسالة نجاح */
6928
- success(title, text, timer = 2000) {
6929
- return Swal.fire({
6930
- icon: 'success',
6931
- title,
6932
- text,
6933
- timer,
6934
- showConfirmButton: false,
6935
- customClass: {
6936
- container: 'swal2-container' // ✅ أضف هذه الفئة
6937
- }
6938
- });
6939
- }
6940
- /** رسالة خطأ */
6941
- error(title, text, footer) {
6942
- return Swal.fire({
6943
- icon: 'error',
6944
- title,
6945
- text,
6946
- footer,
6947
- customClass: {
6948
- container: 'swal2-container' // ✅ أضف هذه الفئة
6949
- }
6950
- });
6951
- }
6952
- /** رسالة معلومات */
6953
- info(title, text) {
6954
- return Swal.fire({
6955
- icon: 'info',
6956
- title,
6957
- text,
6958
- });
6959
- }
6960
- /** عرض نافذة SweetAlert2 بأي خيارات تريد */
6961
- alert(options) {
6962
- return Swal.fire(options);
6963
- }
6964
- /** Toast بسيط قابل لإعادة الاستخدام */
6965
- toast(title, icon = 'info', position = 'top-end', timer = 3000) {
6966
- const Toast = Swal.mixin({
6967
- toast: true,
6968
- position,
6969
- timer,
6970
- showConfirmButton: false,
6971
- });
6972
- Toast.fire({ icon, title });
6973
- }
6974
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: SwalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6975
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: SwalService, providedIn: 'root' });
6976
- }
6977
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: SwalService, decorators: [{
6978
- type: Injectable,
6979
- args: [{ providedIn: 'root' }]
6980
- }] });
6981
-
6982
7038
  /*
6983
7039
  * Public API Surface of @framework/ng.core
6984
7040
  */