@es.framework/ng.ui.core 2.0.66 → 2.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/README.md +3 -3
  2. package/attachments/README.md +3 -3
  3. package/base-crud/README.md +3 -3
  4. package/breadcrumb/README.md +3 -3
  5. package/checkbox/README.md +3 -3
  6. package/collapsible/README.md +3 -3
  7. package/color-picker/README.md +3 -3
  8. package/column-settings-popover/README.md +3 -3
  9. package/custom-switch/README.md +3 -3
  10. package/datepicker/README.md +3 -3
  11. package/deactivation-reason/README.md +3 -3
  12. package/excel-import/README.md +3 -3
  13. package/fesm2022/es.framework-ng.ui.core-attachments.mjs +2 -2
  14. package/fesm2022/es.framework-ng.ui.core-attachments.mjs.map +1 -1
  15. package/fesm2022/es.framework-ng.ui.core-base-crud.mjs.map +1 -1
  16. package/fesm2022/es.framework-ng.ui.core-breadcrumb.mjs +110 -109
  17. package/fesm2022/es.framework-ng.ui.core-breadcrumb.mjs.map +1 -1
  18. package/fesm2022/es.framework-ng.ui.core-checkbox.mjs +54 -54
  19. package/fesm2022/es.framework-ng.ui.core-checkbox.mjs.map +1 -1
  20. package/fesm2022/es.framework-ng.ui.core-collapsible.mjs.map +1 -1
  21. package/fesm2022/es.framework-ng.ui.core-color-picker.mjs +44 -44
  22. package/fesm2022/es.framework-ng.ui.core-color-picker.mjs.map +1 -1
  23. package/fesm2022/es.framework-ng.ui.core-column-settings-popover.mjs +2 -2
  24. package/fesm2022/es.framework-ng.ui.core-column-settings-popover.mjs.map +1 -1
  25. package/fesm2022/es.framework-ng.ui.core-custom-switch.mjs.map +1 -1
  26. package/fesm2022/es.framework-ng.ui.core-datepicker.mjs +178 -178
  27. package/fesm2022/es.framework-ng.ui.core-datepicker.mjs.map +1 -1
  28. package/fesm2022/es.framework-ng.ui.core-deactivation-reason.mjs +46 -46
  29. package/fesm2022/es.framework-ng.ui.core-deactivation-reason.mjs.map +1 -1
  30. package/fesm2022/es.framework-ng.ui.core-excel-import.mjs.map +1 -1
  31. package/fesm2022/es.framework-ng.ui.core-filter-templates.mjs +624 -624
  32. package/fesm2022/es.framework-ng.ui.core-filter-templates.mjs.map +1 -1
  33. package/fesm2022/es.framework-ng.ui.core-form-button.mjs.map +1 -1
  34. package/fesm2022/es.framework-ng.ui.core-form-field.mjs +80 -80
  35. package/fesm2022/es.framework-ng.ui.core-form-field.mjs.map +1 -1
  36. package/fesm2022/es.framework-ng.ui.core-form-template.mjs.map +1 -1
  37. package/fesm2022/es.framework-ng.ui.core-formly-avatar-image.mjs.map +1 -1
  38. package/fesm2022/es.framework-ng.ui.core-formly-avatar-label.mjs +44 -44
  39. package/fesm2022/es.framework-ng.ui.core-formly-avatar-label.mjs.map +1 -1
  40. package/fesm2022/es.framework-ng.ui.core-formly-button-selector.mjs +92 -92
  41. package/fesm2022/es.framework-ng.ui.core-formly-button-selector.mjs.map +1 -1
  42. package/fesm2022/es.framework-ng.ui.core-formly-button.mjs +24 -24
  43. package/fesm2022/es.framework-ng.ui.core-formly-button.mjs.map +1 -1
  44. package/fesm2022/es.framework-ng.ui.core-formly-presets.mjs.map +1 -1
  45. package/fesm2022/es.framework-ng.ui.core-formly-prime-icon-picker.mjs +366 -366
  46. package/fesm2022/es.framework-ng.ui.core-formly-prime-icon-picker.mjs.map +1 -1
  47. package/fesm2022/es.framework-ng.ui.core-formly-split-button.mjs +16 -16
  48. package/fesm2022/es.framework-ng.ui.core-formly-split-button.mjs.map +1 -1
  49. package/fesm2022/es.framework-ng.ui.core-formly-ui-all.mjs.map +1 -1
  50. package/fesm2022/es.framework-ng.ui.core-formly-ui.mjs.map +1 -1
  51. package/fesm2022/es.framework-ng.ui.core-formly-username-with-domain.mjs +16 -16
  52. package/fesm2022/es.framework-ng.ui.core-formly-username-with-domain.mjs.map +1 -1
  53. package/fesm2022/es.framework-ng.ui.core-generic-assets.mjs.map +1 -1
  54. package/fesm2022/es.framework-ng.ui.core-generic-autocomplete.mjs +38 -38
  55. package/fesm2022/es.framework-ng.ui.core-generic-autocomplete.mjs.map +1 -1
  56. package/fesm2022/es.framework-ng.ui.core-generic-button.mjs +2 -2
  57. package/fesm2022/es.framework-ng.ui.core-generic-button.mjs.map +1 -1
  58. package/fesm2022/es.framework-ng.ui.core-generic-card.mjs +2 -2
  59. package/fesm2022/es.framework-ng.ui.core-generic-card.mjs.map +1 -1
  60. package/fesm2022/es.framework-ng.ui.core-generic-crud-table.mjs +12 -5
  61. package/fesm2022/es.framework-ng.ui.core-generic-crud-table.mjs.map +1 -1
  62. package/fesm2022/es.framework-ng.ui.core-generic-dialog.mjs +2 -2
  63. package/fesm2022/es.framework-ng.ui.core-generic-dialog.mjs.map +1 -1
  64. package/fesm2022/es.framework-ng.ui.core-generic-errormessage.mjs +2 -2
  65. package/fesm2022/es.framework-ng.ui.core-generic-errormessage.mjs.map +1 -1
  66. package/fesm2022/es.framework-ng.ui.core-generic-formly-fields.mjs +2 -2
  67. package/fesm2022/es.framework-ng.ui.core-generic-formly-fields.mjs.map +1 -1
  68. package/fesm2022/es.framework-ng.ui.core-generic-listbox.mjs +64 -64
  69. package/fesm2022/es.framework-ng.ui.core-generic-listbox.mjs.map +1 -1
  70. package/fesm2022/es.framework-ng.ui.core-generic-loadingspinner.mjs +2 -2
  71. package/fesm2022/es.framework-ng.ui.core-generic-loadingspinner.mjs.map +1 -1
  72. package/fesm2022/es.framework-ng.ui.core-generic-report-tabs.mjs +68 -68
  73. package/fesm2022/es.framework-ng.ui.core-generic-report-tabs.mjs.map +1 -1
  74. package/fesm2022/es.framework-ng.ui.core-generic-report.mjs +4 -2
  75. package/fesm2022/es.framework-ng.ui.core-generic-report.mjs.map +1 -1
  76. package/fesm2022/es.framework-ng.ui.core-generic-search-advanced.mjs +518 -495
  77. package/fesm2022/es.framework-ng.ui.core-generic-search-advanced.mjs.map +1 -1
  78. package/fesm2022/es.framework-ng.ui.core-generic-search.mjs +2 -2
  79. package/fesm2022/es.framework-ng.ui.core-generic-search.mjs.map +1 -1
  80. package/fesm2022/es.framework-ng.ui.core-generic-selector.mjs.map +1 -1
  81. package/fesm2022/es.framework-ng.ui.core-generic-table.mjs +4 -4
  82. package/fesm2022/es.framework-ng.ui.core-generic-table.mjs.map +1 -1
  83. package/fesm2022/es.framework-ng.ui.core-generic-view.mjs +2 -2
  84. package/fesm2022/es.framework-ng.ui.core-generic-view.mjs.map +1 -1
  85. package/fesm2022/es.framework-ng.ui.core-header-wrapper.mjs +2 -2
  86. package/fesm2022/es.framework-ng.ui.core-header-wrapper.mjs.map +1 -1
  87. package/fesm2022/es.framework-ng.ui.core-icon-picker.mjs +106 -106
  88. package/fesm2022/es.framework-ng.ui.core-icon-picker.mjs.map +1 -1
  89. package/fesm2022/es.framework-ng.ui.core-input-switch.mjs +58 -58
  90. package/fesm2022/es.framework-ng.ui.core-input-switch.mjs.map +1 -1
  91. package/fesm2022/es.framework-ng.ui.core-input-with-icon.mjs +26 -26
  92. package/fesm2022/es.framework-ng.ui.core-input-with-icon.mjs.map +1 -1
  93. package/fesm2022/es.framework-ng.ui.core-input.mjs +64 -64
  94. package/fesm2022/es.framework-ng.ui.core-input.mjs.map +1 -1
  95. package/fesm2022/es.framework-ng.ui.core-label-type.mjs +16 -16
  96. package/fesm2022/es.framework-ng.ui.core-label-type.mjs.map +1 -1
  97. package/fesm2022/es.framework-ng.ui.core-loading-skeletons.mjs +22 -22
  98. package/fesm2022/es.framework-ng.ui.core-loading-skeletons.mjs.map +1 -1
  99. package/fesm2022/es.framework-ng.ui.core-odata-query-builder.mjs +2 -2
  100. package/fesm2022/es.framework-ng.ui.core-odata-query-builder.mjs.map +1 -1
  101. package/fesm2022/es.framework-ng.ui.core-query-type.mjs +14 -14
  102. package/fesm2022/es.framework-ng.ui.core-query-type.mjs.map +1 -1
  103. package/fesm2022/es.framework-ng.ui.core-radio.mjs +30 -30
  104. package/fesm2022/es.framework-ng.ui.core-radio.mjs.map +1 -1
  105. package/fesm2022/es.framework-ng.ui.core-repeat.mjs +354 -354
  106. package/fesm2022/es.framework-ng.ui.core-repeat.mjs.map +1 -1
  107. package/fesm2022/es.framework-ng.ui.core-select.mjs +84 -84
  108. package/fesm2022/es.framework-ng.ui.core-select.mjs.map +1 -1
  109. package/fesm2022/es.framework-ng.ui.core-sidebar-cards.mjs +2 -2
  110. package/fesm2022/es.framework-ng.ui.core-sidebar-cards.mjs.map +1 -1
  111. package/fesm2022/es.framework-ng.ui.core-sidebar-toggles.mjs +2 -2
  112. package/fesm2022/es.framework-ng.ui.core-sidebar-toggles.mjs.map +1 -1
  113. package/fesm2022/es.framework-ng.ui.core-tabs.mjs +14 -14
  114. package/fesm2022/es.framework-ng.ui.core-tabs.mjs.map +1 -1
  115. package/fesm2022/es.framework-ng.ui.core-tag-type.mjs +80 -80
  116. package/fesm2022/es.framework-ng.ui.core-tag-type.mjs.map +1 -1
  117. package/fesm2022/es.framework-ng.ui.core-text-editor.mjs.map +1 -1
  118. package/fesm2022/es.framework-ng.ui.core-textarea.mjs.map +1 -1
  119. package/fesm2022/es.framework-ng.ui.core-wrappers.mjs +118 -118
  120. package/fesm2022/es.framework-ng.ui.core-wrappers.mjs.map +1 -1
  121. package/fesm2022/es.framework-ng.ui.core.mjs +2 -2
  122. package/fesm2022/es.framework-ng.ui.core.mjs.map +1 -1
  123. package/filter-templates/README.md +3 -3
  124. package/form-button/README.md +3 -3
  125. package/form-field/README.md +3 -3
  126. package/form-template/README.md +3 -3
  127. package/formly-avatar-image/README.md +3 -3
  128. package/formly-avatar-label/README.md +3 -3
  129. package/formly-button/README.md +3 -3
  130. package/formly-button-selector/README.md +3 -3
  131. package/formly-presets/README.md +3 -3
  132. package/formly-prime-icon-picker/README.md +3 -3
  133. package/formly-split-button/README.md +3 -3
  134. package/formly-ui/README.md +3 -3
  135. package/formly-ui-all/README.md +3 -3
  136. package/formly-username-with-domain/README.md +3 -3
  137. package/generic-assets/README.md +3 -3
  138. package/generic-autocomplete/README.md +3 -3
  139. package/generic-button/README.md +3 -3
  140. package/generic-card/README.md +3 -3
  141. package/generic-crud-table/README.md +3 -3
  142. package/generic-dialog/README.md +3 -3
  143. package/generic-errormessage/README.md +3 -3
  144. package/generic-formly-fields/README.md +3 -3
  145. package/generic-loadingspinner/README.md +3 -3
  146. package/generic-report/README.md +3 -3
  147. package/generic-search/README.md +3 -3
  148. package/generic-search-advanced/README.md +3 -3
  149. package/generic-selector/README.md +3 -3
  150. package/generic-table/README.md +3 -3
  151. package/generic-view/README.md +3 -3
  152. package/header-wrapper/README.md +3 -3
  153. package/icon-picker/README.md +3 -3
  154. package/input/README.md +3 -3
  155. package/input-switch/README.md +3 -3
  156. package/input-with-icon/README.md +3 -3
  157. package/label-type/README.md +3 -3
  158. package/loading-skeletons/README.md +3 -3
  159. package/odata-query-builder/README.md +3 -3
  160. package/package.json +1 -1
  161. package/query-type/README.md +3 -3
  162. package/radio/README.md +3 -3
  163. package/repeat/README.md +3 -3
  164. package/select/README.md +3 -3
  165. package/sidebar-cards/README.md +3 -3
  166. package/sidebar-toggles/README.md +3 -3
  167. package/styles.css +0 -0
  168. package/tabs/README.md +3 -3
  169. package/tag-type/README.md +3 -3
  170. package/text-editor/README.md +3 -3
  171. package/textarea/README.md +3 -3
  172. package/types/es.framework-ng.ui.core-generic-crud-table.d.ts +1 -0
  173. package/types/es.framework-ng.ui.core-generic-search-advanced.d.ts +5 -2
  174. package/wrappers/README.md +3 -3
@@ -752,7 +752,7 @@ class GenericSearchAdvanced {
752
752
  this.drawerVisible = false;
753
753
  }
754
754
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: GenericSearchAdvanced, deps: [], target: i0.ɵɵFactoryTarget.Component });
755
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: GenericSearchAdvanced, isStandalone: true, selector: "lib-generic-search-advanced", inputs: { model: "model", fields: "fields", enableSelect: "enableSelect", enableGroup: "enableGroup", odataConfig: "odataConfig" }, outputs: { search: "search", paginationChange: "paginationChange", odataSearch: "odataSearch" }, ngImport: i0, template: "<div class=\"flex flex-wrap items-center gap-3 w-full\">\r\n <!-- Search Input with Icon -->\r\n <p-inputgroup class=\"w-full\">\r\n <input\r\n pInputText\r\n type=\"text\"\r\n [(ngModel)]=\"model['filter']\"\r\n placeholder=\"{{ 'SEARCH' | translate }}\"\r\n (keyup.enter)=\"onSubmit()\"\r\n />\r\n\r\n\r\n <p-inputgroup-addon>\r\n <p-button\r\n icon=\"pi pi-search\"\r\n severity=\"secondary\"\r\n (click)=\"onSubmit()\"\r\n ></p-button>\r\n </p-inputgroup-addon>\r\n <p-inputgroup-addon>\r\n <div class=\"relative inline-flex\">\r\n <p-button\r\n icon=\"pi pi-filter\"\r\n severity=\"secondary\"\r\n (onClick)=\"drawerVisible = true\">\r\n </p-button>\r\n\r\n @if (filterCount > 0) {\r\n <p-badge\r\n [value]=\"filterCount\"\r\n severity=\"warn\"\r\n size=\"small\"\r\n class=\"absolute -top-0 -right-0\">\r\n </p-badge>\r\n }\r\n </div>\r\n </p-inputgroup-addon>\r\n\r\n @if (model['filter'] || filterCount > 0) {\r\n <p-inputgroup-addon>\r\n <p-button\r\n icon=\"pi pi-times\"\r\n severity=\"danger\"\r\n (click)=\"model['filter']=''; onReset()\"\r\n ></p-button>\r\n </p-inputgroup-addon>\r\n }\r\n </p-inputgroup>\r\n\r\n\r\n </div>\r\n\r\n <!-- Drawer for Advanced Multi-field Search -->\r\n @if(drawerVisible){\r\n <p-drawer\r\n [(visible)]=\"drawerVisible\"\r\n position=\"right\"\r\n [styleClass]=\"'!w-full md:!w-80 lg:!w-[40rem] !h-full' \"\r\n [modal]=\"true\"\r\n [dismissible]=\"true\"\r\n styleClass=\"p-4 w-full max-w-md max-h-[90vh] flex flex-col\"\r\n >\r\n <!-- Entire form wrapper -->\r\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit(); drawerVisible=false\" class=\"flex flex-col flex-1\">\r\n <!-- Scrollable Form -->\r\n <div class=\"flex-1 overflow-auto\">\r\n <formly-form\r\n [form]=\"form\"\r\n [fields]=\"fields_\"\r\n [model]=\"model\"\r\n [options]=\"options\"\r\n >\r\n </formly-form>\r\n </div>\r\n\r\n </form>\r\n <!-- Action Buttons -->\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"flex justify-end mt-2 space-x-2 flex-none\">\r\n <button\r\n type=\"submit\"\r\n pButton size=\"small\"\r\n (click)=\" onSubmit(); drawerVisible=false\"\r\n label=\"{{ 'SEARCH' | translate }}\">\r\n </button>\r\n <button\r\n type=\"button\"\r\n pButton\r\n size=\"small\"\r\n class=\"p-button-text\"\r\n (click)=\"onReset(); drawerVisible=false\"\r\n >\r\n {{ 'CLEAR' | translate }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n </p-drawer>\r\n\r\n }\r\n", dependencies: [{ kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputIconModule }, { kind: "ngmodule", type: IconFieldModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i5.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: "ngmodule", type: InputGroupModule }, { kind: "component", type: i6.InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "ngmodule", type: InputGroupAddonModule }, { kind: "component", type: i7.InputGroupAddon, selector: "p-inputgroup-addon, p-inputGroupAddon", inputs: ["style", "styleClass"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "component", type: i8.Badge, selector: "p-badge", inputs: ["styleClass", "badgeSize", "size", "severity", "value", "badgeDisabled"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
755
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: GenericSearchAdvanced, isStandalone: true, selector: "lib-generic-search-advanced", inputs: { model: "model", fields: "fields", enableSelect: "enableSelect", enableGroup: "enableGroup", odataConfig: "odataConfig" }, outputs: { search: "search", paginationChange: "paginationChange", odataSearch: "odataSearch" }, ngImport: i0, template: "<div class=\"flex flex-wrap items-center gap-3 w-full\">\n <!-- Search Input with Icon -->\n <p-inputgroup class=\"w-full\">\n <input\n pInputText\n type=\"text\"\n [(ngModel)]=\"model['filter']\"\n placeholder=\"{{ 'SEARCH' | translate }}\"\n (keyup.enter)=\"onSubmit()\"\n />\n\n\n <p-inputgroup-addon>\n <p-button\n icon=\"pi pi-search\"\n severity=\"secondary\"\n (click)=\"onSubmit()\"\n ></p-button>\n </p-inputgroup-addon>\n <p-inputgroup-addon>\n <div class=\"relative inline-flex\">\n <p-button\n icon=\"pi pi-filter\"\n severity=\"secondary\"\n (onClick)=\"drawerVisible = true\">\n </p-button>\n\n @if (filterCount > 0) {\n <p-badge\n [value]=\"filterCount\"\n severity=\"warn\"\n size=\"small\"\n class=\"absolute -top-0 -right-0\">\n </p-badge>\n }\n </div>\n </p-inputgroup-addon>\n\n @if (model['filter'] || filterCount > 0) {\n <p-inputgroup-addon>\n <p-button\n icon=\"pi pi-times\"\n severity=\"danger\"\n (click)=\"model['filter']=''; onReset()\"\n ></p-button>\n </p-inputgroup-addon>\n }\n </p-inputgroup>\n\n\n </div>\n\n <!-- Drawer for Advanced Multi-field Search -->\n @if(drawerVisible){\n <p-drawer\n [(visible)]=\"drawerVisible\"\n position=\"right\"\n [styleClass]=\"'!w-full md:!w-80 lg:!w-[40rem] !h-full' \"\n [modal]=\"true\"\n [dismissible]=\"true\"\n styleClass=\"p-4 w-full max-w-md max-h-[90vh] flex flex-col\"\n >\n <!-- Entire form wrapper -->\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit(); drawerVisible=false\" class=\"flex flex-col flex-1\">\n <!-- Scrollable Form -->\n <div class=\"flex-1 overflow-auto\">\n <formly-form\n [form]=\"form\"\n [fields]=\"fields_\"\n [model]=\"model\"\n [options]=\"options\"\n >\n </formly-form>\n </div>\n\n </form>\n <!-- Action Buttons -->\n <ng-template pTemplate=\"footer\">\n <div class=\"flex justify-end mt-2 space-x-2 flex-none\">\n <button\n type=\"submit\"\n pButton size=\"small\"\n (click)=\" onSubmit(); drawerVisible=false\"\n label=\"{{ 'SEARCH' | translate }}\">\n </button>\n <button\n type=\"button\"\n pButton\n size=\"small\"\n class=\"p-button-text\"\n (click)=\"onReset(); drawerVisible=false\"\n >\n {{ 'CLEAR' | translate }}\n </button>\n </div>\n </ng-template>\n </p-drawer>\n\n }\n", dependencies: [{ kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: ToolbarModule }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: InputIconModule }, { kind: "ngmodule", type: IconFieldModule }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i5.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: "ngmodule", type: InputGroupModule }, { kind: "component", type: i6.InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "ngmodule", type: InputGroupAddonModule }, { kind: "component", type: i7.InputGroupAddon, selector: "p-inputgroup-addon, p-inputGroupAddon", inputs: ["style", "styleClass"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "component", type: i8.Badge, selector: "p-badge", inputs: ["styleClass", "badgeSize", "size", "severity", "value", "badgeDisabled"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
756
756
  }
757
757
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: GenericSearchAdvanced, decorators: [{
758
758
  type: Component,
@@ -770,7 +770,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
770
770
  InputGroupModule,
771
771
  InputGroupAddonModule,
772
772
  BadgeModule
773
- ], template: "<div class=\"flex flex-wrap items-center gap-3 w-full\">\r\n <!-- Search Input with Icon -->\r\n <p-inputgroup class=\"w-full\">\r\n <input\r\n pInputText\r\n type=\"text\"\r\n [(ngModel)]=\"model['filter']\"\r\n placeholder=\"{{ 'SEARCH' | translate }}\"\r\n (keyup.enter)=\"onSubmit()\"\r\n />\r\n\r\n\r\n <p-inputgroup-addon>\r\n <p-button\r\n icon=\"pi pi-search\"\r\n severity=\"secondary\"\r\n (click)=\"onSubmit()\"\r\n ></p-button>\r\n </p-inputgroup-addon>\r\n <p-inputgroup-addon>\r\n <div class=\"relative inline-flex\">\r\n <p-button\r\n icon=\"pi pi-filter\"\r\n severity=\"secondary\"\r\n (onClick)=\"drawerVisible = true\">\r\n </p-button>\r\n\r\n @if (filterCount > 0) {\r\n <p-badge\r\n [value]=\"filterCount\"\r\n severity=\"warn\"\r\n size=\"small\"\r\n class=\"absolute -top-0 -right-0\">\r\n </p-badge>\r\n }\r\n </div>\r\n </p-inputgroup-addon>\r\n\r\n @if (model['filter'] || filterCount > 0) {\r\n <p-inputgroup-addon>\r\n <p-button\r\n icon=\"pi pi-times\"\r\n severity=\"danger\"\r\n (click)=\"model['filter']=''; onReset()\"\r\n ></p-button>\r\n </p-inputgroup-addon>\r\n }\r\n </p-inputgroup>\r\n\r\n\r\n </div>\r\n\r\n <!-- Drawer for Advanced Multi-field Search -->\r\n @if(drawerVisible){\r\n <p-drawer\r\n [(visible)]=\"drawerVisible\"\r\n position=\"right\"\r\n [styleClass]=\"'!w-full md:!w-80 lg:!w-[40rem] !h-full' \"\r\n [modal]=\"true\"\r\n [dismissible]=\"true\"\r\n styleClass=\"p-4 w-full max-w-md max-h-[90vh] flex flex-col\"\r\n >\r\n <!-- Entire form wrapper -->\r\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit(); drawerVisible=false\" class=\"flex flex-col flex-1\">\r\n <!-- Scrollable Form -->\r\n <div class=\"flex-1 overflow-auto\">\r\n <formly-form\r\n [form]=\"form\"\r\n [fields]=\"fields_\"\r\n [model]=\"model\"\r\n [options]=\"options\"\r\n >\r\n </formly-form>\r\n </div>\r\n\r\n </form>\r\n <!-- Action Buttons -->\r\n <ng-template pTemplate=\"footer\">\r\n <div class=\"flex justify-end mt-2 space-x-2 flex-none\">\r\n <button\r\n type=\"submit\"\r\n pButton size=\"small\"\r\n (click)=\" onSubmit(); drawerVisible=false\"\r\n label=\"{{ 'SEARCH' | translate }}\">\r\n </button>\r\n <button\r\n type=\"button\"\r\n pButton\r\n size=\"small\"\r\n class=\"p-button-text\"\r\n (click)=\"onReset(); drawerVisible=false\"\r\n >\r\n {{ 'CLEAR' | translate }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n </p-drawer>\r\n\r\n }\r\n" }]
773
+ ], template: "<div class=\"flex flex-wrap items-center gap-3 w-full\">\n <!-- Search Input with Icon -->\n <p-inputgroup class=\"w-full\">\n <input\n pInputText\n type=\"text\"\n [(ngModel)]=\"model['filter']\"\n placeholder=\"{{ 'SEARCH' | translate }}\"\n (keyup.enter)=\"onSubmit()\"\n />\n\n\n <p-inputgroup-addon>\n <p-button\n icon=\"pi pi-search\"\n severity=\"secondary\"\n (click)=\"onSubmit()\"\n ></p-button>\n </p-inputgroup-addon>\n <p-inputgroup-addon>\n <div class=\"relative inline-flex\">\n <p-button\n icon=\"pi pi-filter\"\n severity=\"secondary\"\n (onClick)=\"drawerVisible = true\">\n </p-button>\n\n @if (filterCount > 0) {\n <p-badge\n [value]=\"filterCount\"\n severity=\"warn\"\n size=\"small\"\n class=\"absolute -top-0 -right-0\">\n </p-badge>\n }\n </div>\n </p-inputgroup-addon>\n\n @if (model['filter'] || filterCount > 0) {\n <p-inputgroup-addon>\n <p-button\n icon=\"pi pi-times\"\n severity=\"danger\"\n (click)=\"model['filter']=''; onReset()\"\n ></p-button>\n </p-inputgroup-addon>\n }\n </p-inputgroup>\n\n\n </div>\n\n <!-- Drawer for Advanced Multi-field Search -->\n @if(drawerVisible){\n <p-drawer\n [(visible)]=\"drawerVisible\"\n position=\"right\"\n [styleClass]=\"'!w-full md:!w-80 lg:!w-[40rem] !h-full' \"\n [modal]=\"true\"\n [dismissible]=\"true\"\n styleClass=\"p-4 w-full max-w-md max-h-[90vh] flex flex-col\"\n >\n <!-- Entire form wrapper -->\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit(); drawerVisible=false\" class=\"flex flex-col flex-1\">\n <!-- Scrollable Form -->\n <div class=\"flex-1 overflow-auto\">\n <formly-form\n [form]=\"form\"\n [fields]=\"fields_\"\n [model]=\"model\"\n [options]=\"options\"\n >\n </formly-form>\n </div>\n\n </form>\n <!-- Action Buttons -->\n <ng-template pTemplate=\"footer\">\n <div class=\"flex justify-end mt-2 space-x-2 flex-none\">\n <button\n type=\"submit\"\n pButton size=\"small\"\n (click)=\" onSubmit(); drawerVisible=false\"\n label=\"{{ 'SEARCH' | translate }}\">\n </button>\n <button\n type=\"button\"\n pButton\n size=\"small\"\n class=\"p-button-text\"\n (click)=\"onReset(); drawerVisible=false\"\n >\n {{ 'CLEAR' | translate }}\n </button>\n </div>\n </ng-template>\n </p-drawer>\n\n }\n" }]
774
774
  }], propDecorators: { search: [{
775
775
  type: Output
776
776
  }], paginationChange: [{
@@ -886,170 +886,170 @@ class SortBuilderComponent extends FieldType {
886
886
  return availableFields.length > 0 ? availableFields[0].key : '';
887
887
  }
888
888
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: SortBuilderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
889
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: SortBuilderComponent, isStandalone: true, selector: "formly-sort-builder", usesInheritance: true, ngImport: i0, template: `<div class="sort-builder p-3 border-round border-1 surface-border">
890
- <div class="mb-6">
891
- <h5 class="text-lg font-semibold text-gray-900 mb-2">{{ props.label || ('SORTING' | translate) }}</h5>
892
- <p class="text-gray-600 text-sm">{{ ('PRIORITY_HINT' | translate) }}</p>
893
- </div>
894
-
895
- <!-- Sort List -->
896
- @if (sorts.length > 0) {
897
- <div class="sort-list space-y-2 mb-3">
898
- @for (sort of sorts; track sort; let i = $index; let isFirst = $first; let isLast = $last) {
899
- <div
900
- class="sort-row p-2 border-round surface-card"
901
- pDraggable
902
- pDroppable
903
- (onDragStart)="onDragStart(i)"
904
- (onDrop)="onDrop($event, i)"
905
- [ngClass]="{'border-left-3 border-primary': isFirst, 'border-left-3 border-200': !isFirst}">
906
- <div class="grid grid-cols-4 align-items-center gap-2">
907
- <!-- Drag Handle -->
908
- <div class="col-span-2 flex">
909
- <button
910
- pButton
911
- icon="pi pi-bars"
912
- type="button"
913
- class="p-button-text p-button-plain cursor-move"
914
- [pTooltip]="'DRAG_TOOLTIP' | translate"
915
- tooltipPosition="top">
916
- </button>
917
- <p-select
918
- [options]="getAvailableFields(sort.field)"
919
- optionLabel="label"
920
- optionValue="key"
921
- [(ngModel)]="sort.field"
922
- (onChange)="updateValue()"
923
- [placeholder]="'SELECT_FIELD_SORT' | translate"
924
- [showClear]="true"
925
- appendTo="body"
926
- styleClass="w-full">
927
- </p-select>
928
- </div>
929
- <!-- Direction Selector -->
930
- <div class="col-fixed">
931
- <p-select
932
- [options]="directionOptions"
933
- [(ngModel)]="sort.direction"
934
- (onChange)="updateValue()"
935
- [placeholder]="'DIRECTION' | translate"
936
- appendTo="body"
937
- styleClass="w-full">
938
- </p-select>
939
- </div>
940
- <!-- Actions -->
941
- <div class="col-fixed flex gap-2" style="justify-content: flex-end;">
942
- <!-- Move Up -->
943
- @if (!isFirst) {
944
- <button
945
- outlined
946
- style="width: var(--p-button-icon-only-width);"
947
- pButton
948
- icon="pi pi-arrow-up"
949
- type="button"
950
- class="p-button-sm p-button-success"
951
- (click)="moveSort(i, i - 1)"
952
- [pTooltip]="'MOVE_UP' | translate"
953
- tooltipPosition="top">
954
- </button>
955
- }
956
- <!-- Move Down -->
957
- @if (!isLast) {
958
- <button
959
- outlined
960
- style="width: var(--p-button-icon-only-width);"
961
- pButton
962
- icon="pi pi-arrow-down"
963
- type="button"
964
- class="p-button-sm p-button-success"
965
- (click)="moveSort(i, i + 1)"
966
- [pTooltip]="'MOVE_DOWN' | translate"
967
- tooltipPosition="top">
968
- </button>
969
- }
970
- <!-- Remove -->
971
- <button
972
- style="width: var(--p-button-icon-only-width);"
973
- pButton
974
- icon="pi pi-times"
975
- type="button"
976
- class="p-button-sm p-button-danger"
977
- (click)="removeSort(i)"
978
- [pTooltip]="'REMOVE_SORT' | translate"
979
- tooltipPosition="top">
980
- </button>
981
- </div>
982
- </div>
983
- </div>
984
- }
985
- </div>
986
- }
987
-
988
- <!-- Empty State -->
989
- @if (sorts.length === 0) {
990
- <div class="empty-state text-center p-4 border-round surface-section">
991
- <i class="pi pi-sort-alt text-4xl text-500 mb-3"></i>
992
- <p class="text-500 mb-3">{{ 'NO_SORT_RULES' | translate }}</p>
993
- <p class="text-400 text-sm mb-3">{{ 'DEFAULT_ORDER' | translate }}</p>
994
- </div>
995
- }
996
-
997
- <!-- Actions -->
998
- <div class="flex gap-2">
999
- <button
1000
- pButton
1001
- icon="pi pi-sort-alt"
1002
- [label]="'ADD_SORT' | translate"
1003
- type="button"
1004
- class="p-button-outlined flex-1"
1005
- (click)="addSort()">
1006
- </button>
1007
-
1008
- @if (sorts.length > 1) {
1009
- <button
1010
- pButton
1011
- icon="pi pi-random"
1012
- [label]="'REVERSE_ORDER' | translate"
1013
- type="button"
1014
- class="p-button-outlined"
1015
- (click)="reverseSorts()"
1016
- [pTooltip]="'REVERSE_TOOLTIP' | translate"
1017
- tooltipPosition="top">
1018
- </button>
1019
- }
1020
-
1021
- @if (sorts.length > 0) {
1022
- <button
1023
- pButton
1024
- icon="pi pi-trash"
1025
- type="button"
1026
- class="p-button-outlined p-button-danger"
1027
- (click)="clearAll()"
1028
- [pTooltip]="'CLEAR_ALL_TOOLTIP' | translate"
1029
- tooltipPosition="top">
1030
- </button>
1031
- }
1032
- </div>
1033
-
1034
- <!-- Summary -->
1035
- @if (sorts.length > 0) {
1036
- <div class="sort-summary mt-3 p-2 border-round surface-ground">
1037
- <h5 class="mt-0 mb-2 text-sm">{{ 'SORT_SUMMARY' | translate }}:</h5>
1038
- <div class="text-sm text-500">
1039
- @for (sort of sorts; track sort; let i = $index) {
1040
- <span class="sort-step">
1041
- <span class="font-semibold">{{ getFieldLabel(sort.field) }}</span>
1042
- <span class="direction-badge" [ngClass]="sort.direction === 'asc' ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'">
1043
- {{ sort.direction === 'asc' ? '▲' : '▼' }}
1044
- </span>
1045
- @if (!isLast) {
1046
- <span> {{ 'THEN' | translate }} </span>
1047
- }
1048
- </span>
1049
- }
1050
- </div>
1051
- </div>
1052
- }
889
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: SortBuilderComponent, isStandalone: true, selector: "formly-sort-builder", usesInheritance: true, ngImport: i0, template: `<div class="sort-builder p-3 border-round border-1 surface-border">
890
+ <div class="mb-6">
891
+ <h5 class="text-lg font-semibold text-gray-900 mb-2">{{ props.label || ('SORTING' | translate) }}</h5>
892
+ <p class="text-gray-600 text-sm">{{ ('PRIORITY_HINT' | translate) }}</p>
893
+ </div>
894
+
895
+ <!-- Sort List -->
896
+ @if (sorts.length > 0) {
897
+ <div class="sort-list space-y-2 mb-3">
898
+ @for (sort of sorts; track sort; let i = $index; let isFirst = $first; let isLast = $last) {
899
+ <div
900
+ class="sort-row p-2 border-round surface-card"
901
+ pDraggable
902
+ pDroppable
903
+ (onDragStart)="onDragStart(i)"
904
+ (onDrop)="onDrop($event, i)"
905
+ [ngClass]="{'border-left-3 border-primary': isFirst, 'border-left-3 border-200': !isFirst}">
906
+ <div class="grid grid-cols-4 align-items-center gap-2">
907
+ <!-- Drag Handle -->
908
+ <div class="col-span-2 flex">
909
+ <button
910
+ pButton
911
+ icon="pi pi-bars"
912
+ type="button"
913
+ class="p-button-text p-button-plain cursor-move"
914
+ [pTooltip]="'DRAG_TOOLTIP' | translate"
915
+ tooltipPosition="top">
916
+ </button>
917
+ <p-select
918
+ [options]="getAvailableFields(sort.field)"
919
+ optionLabel="label"
920
+ optionValue="key"
921
+ [(ngModel)]="sort.field"
922
+ (onChange)="updateValue()"
923
+ [placeholder]="'SELECT_FIELD_SORT' | translate"
924
+ [showClear]="true"
925
+ appendTo="body"
926
+ styleClass="w-full">
927
+ </p-select>
928
+ </div>
929
+ <!-- Direction Selector -->
930
+ <div class="col-fixed">
931
+ <p-select
932
+ [options]="directionOptions"
933
+ [(ngModel)]="sort.direction"
934
+ (onChange)="updateValue()"
935
+ [placeholder]="'DIRECTION' | translate"
936
+ appendTo="body"
937
+ styleClass="w-full">
938
+ </p-select>
939
+ </div>
940
+ <!-- Actions -->
941
+ <div class="col-fixed flex gap-2" style="justify-content: flex-end;">
942
+ <!-- Move Up -->
943
+ @if (!isFirst) {
944
+ <button
945
+ outlined
946
+ style="width: var(--p-button-icon-only-width);"
947
+ pButton
948
+ icon="pi pi-arrow-up"
949
+ type="button"
950
+ class="p-button-sm p-button-success"
951
+ (click)="moveSort(i, i - 1)"
952
+ [pTooltip]="'MOVE_UP' | translate"
953
+ tooltipPosition="top">
954
+ </button>
955
+ }
956
+ <!-- Move Down -->
957
+ @if (!isLast) {
958
+ <button
959
+ outlined
960
+ style="width: var(--p-button-icon-only-width);"
961
+ pButton
962
+ icon="pi pi-arrow-down"
963
+ type="button"
964
+ class="p-button-sm p-button-success"
965
+ (click)="moveSort(i, i + 1)"
966
+ [pTooltip]="'MOVE_DOWN' | translate"
967
+ tooltipPosition="top">
968
+ </button>
969
+ }
970
+ <!-- Remove -->
971
+ <button
972
+ style="width: var(--p-button-icon-only-width);"
973
+ pButton
974
+ icon="pi pi-times"
975
+ type="button"
976
+ class="p-button-sm p-button-danger"
977
+ (click)="removeSort(i)"
978
+ [pTooltip]="'REMOVE_SORT' | translate"
979
+ tooltipPosition="top">
980
+ </button>
981
+ </div>
982
+ </div>
983
+ </div>
984
+ }
985
+ </div>
986
+ }
987
+
988
+ <!-- Empty State -->
989
+ @if (sorts.length === 0) {
990
+ <div class="empty-state text-center p-4 border-round surface-section">
991
+ <i class="pi pi-sort-alt text-4xl text-500 mb-3"></i>
992
+ <p class="text-500 mb-3">{{ 'NO_SORT_RULES' | translate }}</p>
993
+ <p class="text-400 text-sm mb-3">{{ 'DEFAULT_ORDER' | translate }}</p>
994
+ </div>
995
+ }
996
+
997
+ <!-- Actions -->
998
+ <div class="flex gap-2">
999
+ <button
1000
+ pButton
1001
+ icon="pi pi-sort-alt"
1002
+ [label]="'ADD_SORT' | translate"
1003
+ type="button"
1004
+ class="p-button-outlined flex-1"
1005
+ (click)="addSort()">
1006
+ </button>
1007
+
1008
+ @if (sorts.length > 1) {
1009
+ <button
1010
+ pButton
1011
+ icon="pi pi-random"
1012
+ [label]="'REVERSE_ORDER' | translate"
1013
+ type="button"
1014
+ class="p-button-outlined"
1015
+ (click)="reverseSorts()"
1016
+ [pTooltip]="'REVERSE_TOOLTIP' | translate"
1017
+ tooltipPosition="top">
1018
+ </button>
1019
+ }
1020
+
1021
+ @if (sorts.length > 0) {
1022
+ <button
1023
+ pButton
1024
+ icon="pi pi-trash"
1025
+ type="button"
1026
+ class="p-button-outlined p-button-danger"
1027
+ (click)="clearAll()"
1028
+ [pTooltip]="'CLEAR_ALL_TOOLTIP' | translate"
1029
+ tooltipPosition="top">
1030
+ </button>
1031
+ }
1032
+ </div>
1033
+
1034
+ <!-- Summary -->
1035
+ @if (sorts.length > 0) {
1036
+ <div class="sort-summary mt-3 p-2 border-round surface-ground">
1037
+ <h5 class="mt-0 mb-2 text-sm">{{ 'SORT_SUMMARY' | translate }}:</h5>
1038
+ <div class="text-sm text-500">
1039
+ @for (sort of sorts; track sort; let i = $index) {
1040
+ <span class="sort-step">
1041
+ <span class="font-semibold">{{ getFieldLabel(sort.field) }}</span>
1042
+ <span class="direction-badge" [ngClass]="sort.direction === 'asc' ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'">
1043
+ {{ sort.direction === 'asc' ? '▲' : '▼' }}
1044
+ </span>
1045
+ @if (!isLast) {
1046
+ <span> {{ 'THEN' | translate }} </span>
1047
+ }
1048
+ </span>
1049
+ }
1050
+ </div>
1051
+ </div>
1052
+ }
1053
1053
  </div>`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i3.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i5$1.Draggable, selector: "[pDraggable]", inputs: ["pDraggable", "dragEffect", "dragHandle", "pDraggableDisabled"], outputs: ["onDragStart", "onDragEnd", "onDrag"] }, { kind: "directive", type: i5$1.Droppable, selector: "[pDroppable]", inputs: ["pDroppable", "pDroppableDisabled", "dropEffect"], outputs: ["onDragEnter", "onDragLeave", "onDrop"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i6$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
1054
1054
  }
1055
1055
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: SortBuilderComponent, decorators: [{
@@ -1062,170 +1062,170 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
1062
1062
  DragDropModule,
1063
1063
  TooltipModule,
1064
1064
  TranslatePipe
1065
- ], template: `<div class="sort-builder p-3 border-round border-1 surface-border">
1066
- <div class="mb-6">
1067
- <h5 class="text-lg font-semibold text-gray-900 mb-2">{{ props.label || ('SORTING' | translate) }}</h5>
1068
- <p class="text-gray-600 text-sm">{{ ('PRIORITY_HINT' | translate) }}</p>
1069
- </div>
1070
-
1071
- <!-- Sort List -->
1072
- @if (sorts.length > 0) {
1073
- <div class="sort-list space-y-2 mb-3">
1074
- @for (sort of sorts; track sort; let i = $index; let isFirst = $first; let isLast = $last) {
1075
- <div
1076
- class="sort-row p-2 border-round surface-card"
1077
- pDraggable
1078
- pDroppable
1079
- (onDragStart)="onDragStart(i)"
1080
- (onDrop)="onDrop($event, i)"
1081
- [ngClass]="{'border-left-3 border-primary': isFirst, 'border-left-3 border-200': !isFirst}">
1082
- <div class="grid grid-cols-4 align-items-center gap-2">
1083
- <!-- Drag Handle -->
1084
- <div class="col-span-2 flex">
1085
- <button
1086
- pButton
1087
- icon="pi pi-bars"
1088
- type="button"
1089
- class="p-button-text p-button-plain cursor-move"
1090
- [pTooltip]="'DRAG_TOOLTIP' | translate"
1091
- tooltipPosition="top">
1092
- </button>
1093
- <p-select
1094
- [options]="getAvailableFields(sort.field)"
1095
- optionLabel="label"
1096
- optionValue="key"
1097
- [(ngModel)]="sort.field"
1098
- (onChange)="updateValue()"
1099
- [placeholder]="'SELECT_FIELD_SORT' | translate"
1100
- [showClear]="true"
1101
- appendTo="body"
1102
- styleClass="w-full">
1103
- </p-select>
1104
- </div>
1105
- <!-- Direction Selector -->
1106
- <div class="col-fixed">
1107
- <p-select
1108
- [options]="directionOptions"
1109
- [(ngModel)]="sort.direction"
1110
- (onChange)="updateValue()"
1111
- [placeholder]="'DIRECTION' | translate"
1112
- appendTo="body"
1113
- styleClass="w-full">
1114
- </p-select>
1115
- </div>
1116
- <!-- Actions -->
1117
- <div class="col-fixed flex gap-2" style="justify-content: flex-end;">
1118
- <!-- Move Up -->
1119
- @if (!isFirst) {
1120
- <button
1121
- outlined
1122
- style="width: var(--p-button-icon-only-width);"
1123
- pButton
1124
- icon="pi pi-arrow-up"
1125
- type="button"
1126
- class="p-button-sm p-button-success"
1127
- (click)="moveSort(i, i - 1)"
1128
- [pTooltip]="'MOVE_UP' | translate"
1129
- tooltipPosition="top">
1130
- </button>
1131
- }
1132
- <!-- Move Down -->
1133
- @if (!isLast) {
1134
- <button
1135
- outlined
1136
- style="width: var(--p-button-icon-only-width);"
1137
- pButton
1138
- icon="pi pi-arrow-down"
1139
- type="button"
1140
- class="p-button-sm p-button-success"
1141
- (click)="moveSort(i, i + 1)"
1142
- [pTooltip]="'MOVE_DOWN' | translate"
1143
- tooltipPosition="top">
1144
- </button>
1145
- }
1146
- <!-- Remove -->
1147
- <button
1148
- style="width: var(--p-button-icon-only-width);"
1149
- pButton
1150
- icon="pi pi-times"
1151
- type="button"
1152
- class="p-button-sm p-button-danger"
1153
- (click)="removeSort(i)"
1154
- [pTooltip]="'REMOVE_SORT' | translate"
1155
- tooltipPosition="top">
1156
- </button>
1157
- </div>
1158
- </div>
1159
- </div>
1160
- }
1161
- </div>
1162
- }
1163
-
1164
- <!-- Empty State -->
1165
- @if (sorts.length === 0) {
1166
- <div class="empty-state text-center p-4 border-round surface-section">
1167
- <i class="pi pi-sort-alt text-4xl text-500 mb-3"></i>
1168
- <p class="text-500 mb-3">{{ 'NO_SORT_RULES' | translate }}</p>
1169
- <p class="text-400 text-sm mb-3">{{ 'DEFAULT_ORDER' | translate }}</p>
1170
- </div>
1171
- }
1172
-
1173
- <!-- Actions -->
1174
- <div class="flex gap-2">
1175
- <button
1176
- pButton
1177
- icon="pi pi-sort-alt"
1178
- [label]="'ADD_SORT' | translate"
1179
- type="button"
1180
- class="p-button-outlined flex-1"
1181
- (click)="addSort()">
1182
- </button>
1183
-
1184
- @if (sorts.length > 1) {
1185
- <button
1186
- pButton
1187
- icon="pi pi-random"
1188
- [label]="'REVERSE_ORDER' | translate"
1189
- type="button"
1190
- class="p-button-outlined"
1191
- (click)="reverseSorts()"
1192
- [pTooltip]="'REVERSE_TOOLTIP' | translate"
1193
- tooltipPosition="top">
1194
- </button>
1195
- }
1196
-
1197
- @if (sorts.length > 0) {
1198
- <button
1199
- pButton
1200
- icon="pi pi-trash"
1201
- type="button"
1202
- class="p-button-outlined p-button-danger"
1203
- (click)="clearAll()"
1204
- [pTooltip]="'CLEAR_ALL_TOOLTIP' | translate"
1205
- tooltipPosition="top">
1206
- </button>
1207
- }
1208
- </div>
1209
-
1210
- <!-- Summary -->
1211
- @if (sorts.length > 0) {
1212
- <div class="sort-summary mt-3 p-2 border-round surface-ground">
1213
- <h5 class="mt-0 mb-2 text-sm">{{ 'SORT_SUMMARY' | translate }}:</h5>
1214
- <div class="text-sm text-500">
1215
- @for (sort of sorts; track sort; let i = $index) {
1216
- <span class="sort-step">
1217
- <span class="font-semibold">{{ getFieldLabel(sort.field) }}</span>
1218
- <span class="direction-badge" [ngClass]="sort.direction === 'asc' ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'">
1219
- {{ sort.direction === 'asc' ? '▲' : '▼' }}
1220
- </span>
1221
- @if (!isLast) {
1222
- <span> {{ 'THEN' | translate }} </span>
1223
- }
1224
- </span>
1225
- }
1226
- </div>
1227
- </div>
1228
- }
1065
+ ], template: `<div class="sort-builder p-3 border-round border-1 surface-border">
1066
+ <div class="mb-6">
1067
+ <h5 class="text-lg font-semibold text-gray-900 mb-2">{{ props.label || ('SORTING' | translate) }}</h5>
1068
+ <p class="text-gray-600 text-sm">{{ ('PRIORITY_HINT' | translate) }}</p>
1069
+ </div>
1070
+
1071
+ <!-- Sort List -->
1072
+ @if (sorts.length > 0) {
1073
+ <div class="sort-list space-y-2 mb-3">
1074
+ @for (sort of sorts; track sort; let i = $index; let isFirst = $first; let isLast = $last) {
1075
+ <div
1076
+ class="sort-row p-2 border-round surface-card"
1077
+ pDraggable
1078
+ pDroppable
1079
+ (onDragStart)="onDragStart(i)"
1080
+ (onDrop)="onDrop($event, i)"
1081
+ [ngClass]="{'border-left-3 border-primary': isFirst, 'border-left-3 border-200': !isFirst}">
1082
+ <div class="grid grid-cols-4 align-items-center gap-2">
1083
+ <!-- Drag Handle -->
1084
+ <div class="col-span-2 flex">
1085
+ <button
1086
+ pButton
1087
+ icon="pi pi-bars"
1088
+ type="button"
1089
+ class="p-button-text p-button-plain cursor-move"
1090
+ [pTooltip]="'DRAG_TOOLTIP' | translate"
1091
+ tooltipPosition="top">
1092
+ </button>
1093
+ <p-select
1094
+ [options]="getAvailableFields(sort.field)"
1095
+ optionLabel="label"
1096
+ optionValue="key"
1097
+ [(ngModel)]="sort.field"
1098
+ (onChange)="updateValue()"
1099
+ [placeholder]="'SELECT_FIELD_SORT' | translate"
1100
+ [showClear]="true"
1101
+ appendTo="body"
1102
+ styleClass="w-full">
1103
+ </p-select>
1104
+ </div>
1105
+ <!-- Direction Selector -->
1106
+ <div class="col-fixed">
1107
+ <p-select
1108
+ [options]="directionOptions"
1109
+ [(ngModel)]="sort.direction"
1110
+ (onChange)="updateValue()"
1111
+ [placeholder]="'DIRECTION' | translate"
1112
+ appendTo="body"
1113
+ styleClass="w-full">
1114
+ </p-select>
1115
+ </div>
1116
+ <!-- Actions -->
1117
+ <div class="col-fixed flex gap-2" style="justify-content: flex-end;">
1118
+ <!-- Move Up -->
1119
+ @if (!isFirst) {
1120
+ <button
1121
+ outlined
1122
+ style="width: var(--p-button-icon-only-width);"
1123
+ pButton
1124
+ icon="pi pi-arrow-up"
1125
+ type="button"
1126
+ class="p-button-sm p-button-success"
1127
+ (click)="moveSort(i, i - 1)"
1128
+ [pTooltip]="'MOVE_UP' | translate"
1129
+ tooltipPosition="top">
1130
+ </button>
1131
+ }
1132
+ <!-- Move Down -->
1133
+ @if (!isLast) {
1134
+ <button
1135
+ outlined
1136
+ style="width: var(--p-button-icon-only-width);"
1137
+ pButton
1138
+ icon="pi pi-arrow-down"
1139
+ type="button"
1140
+ class="p-button-sm p-button-success"
1141
+ (click)="moveSort(i, i + 1)"
1142
+ [pTooltip]="'MOVE_DOWN' | translate"
1143
+ tooltipPosition="top">
1144
+ </button>
1145
+ }
1146
+ <!-- Remove -->
1147
+ <button
1148
+ style="width: var(--p-button-icon-only-width);"
1149
+ pButton
1150
+ icon="pi pi-times"
1151
+ type="button"
1152
+ class="p-button-sm p-button-danger"
1153
+ (click)="removeSort(i)"
1154
+ [pTooltip]="'REMOVE_SORT' | translate"
1155
+ tooltipPosition="top">
1156
+ </button>
1157
+ </div>
1158
+ </div>
1159
+ </div>
1160
+ }
1161
+ </div>
1162
+ }
1163
+
1164
+ <!-- Empty State -->
1165
+ @if (sorts.length === 0) {
1166
+ <div class="empty-state text-center p-4 border-round surface-section">
1167
+ <i class="pi pi-sort-alt text-4xl text-500 mb-3"></i>
1168
+ <p class="text-500 mb-3">{{ 'NO_SORT_RULES' | translate }}</p>
1169
+ <p class="text-400 text-sm mb-3">{{ 'DEFAULT_ORDER' | translate }}</p>
1170
+ </div>
1171
+ }
1172
+
1173
+ <!-- Actions -->
1174
+ <div class="flex gap-2">
1175
+ <button
1176
+ pButton
1177
+ icon="pi pi-sort-alt"
1178
+ [label]="'ADD_SORT' | translate"
1179
+ type="button"
1180
+ class="p-button-outlined flex-1"
1181
+ (click)="addSort()">
1182
+ </button>
1183
+
1184
+ @if (sorts.length > 1) {
1185
+ <button
1186
+ pButton
1187
+ icon="pi pi-random"
1188
+ [label]="'REVERSE_ORDER' | translate"
1189
+ type="button"
1190
+ class="p-button-outlined"
1191
+ (click)="reverseSorts()"
1192
+ [pTooltip]="'REVERSE_TOOLTIP' | translate"
1193
+ tooltipPosition="top">
1194
+ </button>
1195
+ }
1196
+
1197
+ @if (sorts.length > 0) {
1198
+ <button
1199
+ pButton
1200
+ icon="pi pi-trash"
1201
+ type="button"
1202
+ class="p-button-outlined p-button-danger"
1203
+ (click)="clearAll()"
1204
+ [pTooltip]="'CLEAR_ALL_TOOLTIP' | translate"
1205
+ tooltipPosition="top">
1206
+ </button>
1207
+ }
1208
+ </div>
1209
+
1210
+ <!-- Summary -->
1211
+ @if (sorts.length > 0) {
1212
+ <div class="sort-summary mt-3 p-2 border-round surface-ground">
1213
+ <h5 class="mt-0 mb-2 text-sm">{{ 'SORT_SUMMARY' | translate }}:</h5>
1214
+ <div class="text-sm text-500">
1215
+ @for (sort of sorts; track sort; let i = $index) {
1216
+ <span class="sort-step">
1217
+ <span class="font-semibold">{{ getFieldLabel(sort.field) }}</span>
1218
+ <span class="direction-badge" [ngClass]="sort.direction === 'asc' ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'">
1219
+ {{ sort.direction === 'asc' ? '▲' : '▼' }}
1220
+ </span>
1221
+ @if (!isLast) {
1222
+ <span> {{ 'THEN' | translate }} </span>
1223
+ }
1224
+ </span>
1225
+ }
1226
+ </div>
1227
+ </div>
1228
+ }
1229
1229
  </div>` }]
1230
1230
  }] });
1231
1231
 
@@ -1239,16 +1239,25 @@ class QueryBuilderComponent extends FieldType {
1239
1239
  { label: this.translate.instant('and'), value: 'and' },
1240
1240
  { label: this.translate.instant('or'), value: 'or' }
1241
1241
  ];
1242
- showAppliedFilters = false;
1242
+ get showDefaultConditions() {
1243
+ return this.props['showDefaultConditions'] !== false;
1244
+ }
1243
1245
  ngOnInit() {
1244
1246
  // Initialize with existing value or default group with conditions
1245
- if (this.formControl.value && (Array.isArray(this.formControl.value) && this.formControl.value.length > 0)) {
1247
+ if (this.formControl.value && Array.isArray(this.formControl.value) && this.formControl.value.length > 0) {
1246
1248
  this.initializeAppliedConditionsWithFieldConfigs();
1249
+ return;
1250
+ }
1251
+ if (this.showDefaultConditions) {
1247
1252
  this.initializeDefaultConditions();
1248
1253
  }
1249
1254
  else {
1250
- // Start with default conditions for important fields
1251
- this.initializeDefaultConditions();
1255
+ this.groups = [{
1256
+ logicalOperator: 'and',
1257
+ groupLogicalOperator: 'and',
1258
+ conditions: []
1259
+ }];
1260
+ this.formControl.setValue([], { emitEvent: false });
1252
1261
  }
1253
1262
  }
1254
1263
  initializeAppliedConditionsWithFieldConfigs() {
@@ -1287,16 +1296,7 @@ class QueryBuilderComponent extends FieldType {
1287
1296
  c.operator === dc.operator)))
1288
1297
  }];
1289
1298
  this.updateValue();
1290
- }
1291
- toggleAppliedFilters() {
1292
- if (this.showAppliedFilters == true) {
1293
- this.initializeAppliedConditionsWithFieldConfigs();
1294
- this.initializeDefaultConditions();
1295
- }
1296
- else {
1297
- this.initializeAppliedConditionsWithFieldConfigs();
1298
- }
1299
- this.showAppliedFilters = !this.showAppliedFilters;
1299
+ // debugger
1300
1300
  }
1301
1301
  onAndClick(group, event) {
1302
1302
  group.logicalOperator = 'and';
@@ -1454,22 +1454,18 @@ class QueryBuilderComponent extends FieldType {
1454
1454
  // this.updateValue();
1455
1455
  // }
1456
1456
  removeGroup(groupIndex) {
1457
- if (this.groups[groupIndex]) {
1458
- // Get all field keys for this group before deleting
1459
- const fieldKeysToRemove = [];
1460
- // Collect all condition field keys in this group
1461
- if (this.groups[groupIndex].conditions) {
1462
- for (let c = 0; c < this.groups[groupIndex].conditions.length; c++) {
1463
- const fieldKey = this.getConditionValueKey(groupIndex, c);
1464
- fieldKeysToRemove.push(fieldKey);
1465
- }
1466
- }
1467
- // Remove the group
1468
- this.groups.splice(groupIndex, 1);
1469
- // Remove all associated fields from model
1470
- this.removeMultipleFromModel(fieldKeysToRemove);
1471
- this.updateValue();
1457
+ if (!this.groups[groupIndex]) {
1458
+ return;
1472
1459
  }
1460
+ this.groups.splice(groupIndex, 1);
1461
+ if (this.groups.length === 0) {
1462
+ this.groups.push({
1463
+ logicalOperator: 'and',
1464
+ groupLogicalOperator: 'and',
1465
+ conditions: []
1466
+ });
1467
+ }
1468
+ this.normalizeAfterStructureChange();
1473
1469
  }
1474
1470
  // Remove multiple fields from formly model
1475
1471
  removeMultipleFromModel(fieldKeys) {
@@ -1512,23 +1508,15 @@ class QueryBuilderComponent extends FieldType {
1512
1508
  }
1513
1509
  }
1514
1510
  removeCondition(groupIndex, conditionIndex) {
1515
- if (this.groups[groupIndex]) {
1516
- // Get the field key before deleting so we can remove from model
1517
- const fieldKey = this.getConditionValueKey(groupIndex, conditionIndex);
1518
- // Using delete operator (sets to undefined, then we filter)
1519
- delete this.groups[groupIndex].conditions[conditionIndex];
1520
- // Remove the undefined entries from conditions array
1521
- this.groups[groupIndex].conditions = this.groups[groupIndex].conditions.filter((condition) => condition !== undefined);
1522
- // Remove empty groups
1523
- if (this.groups[groupIndex].conditions.length === 0 && this.groups.length > 1) {
1524
- delete this.groups[groupIndex];
1525
- // Remove undefined groups from array
1526
- this.groups = this.groups.filter(group => group !== undefined);
1527
- }
1528
- // Remove from formly model
1529
- this.removeFromModel(fieldKey);
1530
- this.updateValue();
1511
+ const group = this.groups[groupIndex];
1512
+ if (!group) {
1513
+ return;
1514
+ }
1515
+ group.conditions.splice(conditionIndex, 1);
1516
+ if (group.conditions.length === 0 && this.groups.length > 1) {
1517
+ this.groups.splice(groupIndex, 1);
1531
1518
  }
1519
+ this.normalizeAfterStructureChange();
1532
1520
  }
1533
1521
  // Remove the field from formly model
1534
1522
  removeFromModel(fieldKey) {
@@ -1582,14 +1570,16 @@ class QueryBuilderComponent extends FieldType {
1582
1570
  this.cdr.detectChanges();
1583
1571
  }
1584
1572
  clearAll() {
1585
- this.groups = [];
1586
- // Completely reset the form and model
1587
- this.form.reset();
1588
- // Manually set model to empty object
1589
- Object.keys(this.model).forEach(key => {
1590
- delete this.model[key];
1591
- });
1592
- this.addGroup();
1573
+ this.groups = [{
1574
+ logicalOperator: 'and',
1575
+ groupLogicalOperator: 'and',
1576
+ conditions: []
1577
+ }];
1578
+ this.clearConditionValueKeysFromModel();
1579
+ this.formControl.setValue([], { emitEvent: false });
1580
+ this.formControl.markAsPristine();
1581
+ this.formControl.markAsUntouched();
1582
+ this.cdr.detectChanges();
1593
1583
  }
1594
1584
  // Helper methods
1595
1585
  getQueryStructure() {
@@ -1605,6 +1595,39 @@ class QueryBuilderComponent extends FieldType {
1605
1595
  this.updateValue();
1606
1596
  }
1607
1597
  }
1598
+ // Helpers
1599
+ isConditionValueKey(key) {
1600
+ return /^condition_\d+_\d+_value$/.test(key);
1601
+ }
1602
+ clearConditionValueKeysFromModel() {
1603
+ if (!this.model) {
1604
+ return;
1605
+ }
1606
+ Object.keys(this.model)
1607
+ .filter(key => this.isConditionValueKey(key))
1608
+ .forEach(key => delete this.model[key]);
1609
+ }
1610
+ rebuildConditionFieldConfigs() {
1611
+ for (let g = 0; g < this.groups.length; g++) {
1612
+ const group = this.groups[g];
1613
+ for (let c = 0; c < group.conditions.length; c++) {
1614
+ const condition = group.conditions[c];
1615
+ condition.operatorsForField = this.getOperatorsForField(condition.field);
1616
+ condition.valueFieldConfig = condition.field
1617
+ ? this.generateValueFieldConfig(condition, g, c)
1618
+ : null;
1619
+ const fieldKey = this.getConditionValueKey(g, c);
1620
+ if (this.model) {
1621
+ this.model[fieldKey] = condition.value;
1622
+ }
1623
+ }
1624
+ }
1625
+ }
1626
+ normalizeAfterStructureChange() {
1627
+ this.clearConditionValueKeysFromModel();
1628
+ this.rebuildConditionFieldConfigs();
1629
+ this.updateValue();
1630
+ }
1608
1631
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: QueryBuilderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1609
1632
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: QueryBuilderComponent, isStandalone: true, selector: "formly-query-builder", usesInheritance: true, ngImport: i0, template: "<div>\n\n <!-- Groups Container with Connecting Lines -->\n <div class=\"groups-container\" #groupsContainer>\n @for (group of groups; track group; let groupIndex = $index) {\n <div\n class=\"group-wrapper relative\"\n #groupElement>\n <!-- Vertical Connector Line from Previous Group -->\n @if (groupIndex > 0) {\n <div class=\"vertical-connector\">\n <div class=\"vertical-line\"></div>\n <!-- Operator Button -->\n <button\n type=\"button\"\n class=\"group-logical-operator-box\"\n [class.and]=\"group.groupLogicalOperator === 'and'\"\n [class.or]=\"group.groupLogicalOperator === 'or'\"\n (click)=\"opPopover.toggle($event)\">\n <span class=\"operator-text\">\n {{ getLogicalOperatorText(group.groupLogicalOperator || 'and') }}\n </span>\n <div class=\"connector-arrow\"></div>\n </button>\n <!-- Popover -->\n <p-popover #opPopover appendTo=\"body\">\n <div class=\"w-12rem\">\n <p-listbox\n [options]=\"logicalOperators\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [(ngModel)]=\"group.groupLogicalOperator\"\n (onChange)=\" opPopover.toggle($event)\"\n [style]=\"{ width: '100%' }\">\n </p-listbox>\n </div>\n </p-popover>\n </div>\n }\n <div class=\"group-container mb-6 p-1 bg-white rounded-lg border-l-4 border-t-1 border-b-1 border-r-1 shadow-sm transition-all duration-300 relative\"\n [class.border-blue-500]=\"group.logicalOperator === 'and'\"\n [class.border-or-500]=\"group.logicalOperator === 'or'\"\n [class.pulse]=\"groupIndex === 0\">\n <!-- Rounded Button for \"\u0631\u0628\u0637 \u0627\u0644\u0634\u0631\u0648\u0637\" on left border -->\n <div\n class=\"absolute -left-4 top-1/2 transform -translate-y-1/2 z-10 transition-all duration-300\"\n >\n <!-- Logical Operator Popover Button -->\n <p-button\n [severity]=\"group.logicalOperator === 'and' ? 'success' : 'info'\"\n [styleClass]=\"group.logicalOperator === 'and'\r\n ? 'p-button-icon-only p-button-rounded p-button-sm logical-and'\r\n : 'p-button-icon-only p-button-rounded p-button-sm logical-or'\"\r\n (click)=\"opPopover.toggle($event)\">\n {{group.logicalOperator === 'and' ? ('and' | translate) : ('or' | translate)}}\n </p-button>\n <!-- Popover for Operator Selection -->\n <p-popover #opPopover appendTo=\"body\">\n <div class=\"w-10rem\">\n <p-listbox\n [options]=\"[\r\n { label: 'and' | translate, value: 'and' },\r\n { label: 'or' | translate, value: 'or' }\r\n ]\"\r\n optionLabel=\"label\"\n optionValue=\"value\"\n [(ngModel)]=\"group.logicalOperator\"\n (onChange)=\"updateValue(); opPopover.toggle($event)\"\n [style]=\"{ width: '100%' }\">\n <ng-template let-item pTemplate=\"item\">\n {{ item.label }}\n </ng-template>\n </p-listbox>\n </div>\n </p-popover>\n </div>\n <!-- Group Header -->\n <div class=\"group-header-wrapper mb-4 pl-8\">\n <div class=\"group-header flex justify-between items-center\">\n <div class=\"flex gap-1\">\n <button\n pButton\n icon=\"pi pi-plus\"\n type=\"button\"\n class=\"p-button-success p-button p-button-sm !p-1.5 rounded-md transition-colors\"\n (click)=\"addCondition(groupIndex)\"\n pTooltip=\"{{ 'ADD_CONDITION' | translate }}\"\n tooltipPosition=\"top\">\n </button>\n <!-- @if (filterCount > 0) {\n <button\n pButton\n type=\"button\"\n icon=\"pi pi-filter\"\n class=\"p-button-outlined p-button-sm\"\n (click)=\"toggleAppliedFilters()\">\n {{ (showAppliedFilters ? 'SHOW_ALL' : 'SHOW_APPLIED') | translate }}\n </button>\n } -->\n @if (groups.length > 1) {\n <button\n pButton\n icon=\"pi pi-times\"\n type=\"button\"\n class=\"p-button-danger p-button p-button-sm !p-1.5 rounded-md transition-colors\"\n (click)=\"removeGroup(groupIndex)\"\n pTooltip=\"{{ 'DELETE_GROUP' | translate }}\"\n tooltipPosition=\"top\">\n </button>\n }\n </div>\n </div>\n </div>\n <!-- Conditions in this group -->\n @for (condition of group.conditions; track condition; let conditionIndex = $index) {\n <div\n class=\"p-1 bg-gray-50 \">\n <div class=\"grid grid-cols-1 gap-1 items-center\">\n <!-- Field Selector -->\n <div class=\"md:col-span-2\">\n <div class=\"flex w-full rounded-md overflow-hidden border border-gray-300 bg-white shadow-sm\">\n <!-- Field Selector Button -->\n <div style=\"align-items: center;display: flex; min-width: 130px;max-width: 130px;\" class=\"flex-shrink-0 \">\n <button\n type=\"button\"\n style=\"height: -webkit-fill-available;\"\n class=\"flex items-center justify-between w-full px-3 py-2 text-sm bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:z-10\"\n (click)=\"overlay.toggle($event)\">\n <span style=\"\r\n display: inline-block;\r\n max-width: 100px;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n \">{{ getFieldLabel(condition.field) || ('SELECT_FIELD' | translate) }}</span>\r\n <i class=\"pi pi-chevron-down mr-2 ml-2 text-xs\"></i>\n </button>\n <!-- Overlay Content -->\n <p-popover #overlay appendTo=\"body\">\n <div class=\"w-60\">\n <p-listbox\n tabindex=\"0\"\n [options]=\"props['fields']\"\n optionLabel=\"label\"\n optionValue=\"key\"\n [(ngModel)]=\"condition.field\"\n (onChange)=\"onFieldChange(condition, groupIndex, conditionIndex); overlay.toggle($event)\"\n [style]=\"{ width: '100%' }\">\n </p-listbox>\n </div>\n </p-popover>\n </div>\n <!-- Operator Button -->\n <div style=\"align-items: center;display: flex;\" class=\"flex-shrink-0 border-l border-r border-gray-300\">\n <button\n type=\"button\"\n class=\"flex items-center justify-center w-full px-3 py-2 text-sm bg-gray-50 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:z-10\"\n style=\"height: -webkit-fill-available;\"\n pTooltip=\"{{ getOperatorLabel(condition.operator).label }}\"\n (click)=\"opPopover.toggle($event)\">\n <i [class]=\"getOperatorLabel(condition.operator).icon\"></i>\n </button>\n <p-popover #opPopover appendTo=\"body\">\n <div class=\"w-60\">\n <p-listbox\n [options]=\"condition.operatorsForField\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [(ngModel)]=\"condition.operator\"\n (onChange)=\"updateValue();opPopover.toggle($event)\"\n [style]=\"{ width: '100%' }\">\n </p-listbox>\n </div>\n </p-popover>\n </div>\n <!-- Form Field -->\n <div style=\"background: #f9fafb\" class=\"flex-grow p-1\">\n <formly-form\n [form]=\"form\"\n [fields]=\"[condition.valueFieldConfig]\"\n [model]=\"model\">\n </formly-form>\n </div>\n <!-- Delete Button -->\n <div style=\"align-items: center;display: flex;\" class=\"flex-shrink-0\">\n <button\n style=\"height: -webkit-fill-available;\"\n class=\"flex items-center justify-center w-full px-3 py-2 text-sm bg-red-50 text-red-600 hover:bg-red-100 focus:outline-none focus:ring-2 focus:ring-red-500 focus:z-10\"\n type=\"button\"\n (click)=\"removeCondition(groupIndex, conditionIndex)\"\n pTooltip=\"\u062D\u0630\u0641 \u0627\u0644\u0634\u0631\u0637\"\n tooltipPosition=\"top\">\n <i class=\"pi pi-times\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n <!-- Group Footer -->\n <div class=\"group-footer flex justify-between items-center mt-3 pt-3 border-t border-gray-200 \">\n <small class=\"text-gray-500\">\n {{ group.conditions.length }} \u0634\u0631\u0637 \u0641\u064A \u0647\u0630\u0647 \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629\n </small>\n <small class=\"text-gray-500\">\n @if (groupIndex > 0) {\n <span>\n \u0645\u0631\u062A\u0628\u0637 \u0645\u0639 \u0627\u0644\u0633\u0627\u0628\u0642\u0629 \u0628\u0640 <strong [class.text-blue-600]=\"group.groupLogicalOperator === 'and'\"\n [class.text-amber-600]=\"group.groupLogicalOperator === 'or'\">\n {{ group.groupLogicalOperator === 'and' ? '\u0648' : '\u0623\u0648' }}\n </strong>\n </span>\n }\n </small>\n </div>\n </div>\n </div>\n }\n</div>\n\n<!-- Actions -->\n<div class=\"flex flex-wrap gap-3 mt-6\">\n <button\n pButton\n type=\"button\"\n icon=\"pi pi-plus\"\n [label]=\"'GROUP' | translate\"\n class=\"p-button-outlined p-button-sm !bg-white !border !border-blue-500 !text-blue-600 hover:!bg-blue-50 transition-colors flex items-center gap-2\"\n (click)=\"addGroup();\">\n </button>\n\n <button\n pButton\n type=\"button\"\n icon=\"pi pi-plus\"\n [label]=\"'CONDITION' | translate\"\n class=\"p-button-outlined p-button-sm !bg-white !border !border-blue-500 !text-blue-600 hover:!bg-blue-50 transition-colors flex items-center gap-2\"\n (click)=\"addConditionToLastGroup()\">\n </button>\n\n @if (groups.length > 0) {\n <button\n pButton\n type=\"button\"\n icon=\"pi pi-trash\"\n [label]=\"'CLEAR' | translate\"\n class=\"p-button-danger p-button-outlined p-button-sm !bg-white !border !border-red-500 !text-red-600 hover:!bg-red-50 transition-colors flex items-center gap-2\"\n (click)=\"clearAll()\">\n </button>\n }\n</div>\n\n<!-- Empty State -->\n@if (groups.length === 0) {\n <div class=\"empty-state text-center p-6 border-2 border-dashed border-gray-300 rounded-xl bg-gray-50\">\n <i class=\"pi pi-search text-4xl text-gray-400 mb-3\"></i>\n <p class=\"text-gray-500 mb-4\">{{ 'NO_SEARCH_CONDITIONS' | translate }}</p>\n <button\n pButton\n type=\"button\"\n icon=\"pi pi-plus\"\n [label]=\"'ADD_SEARCH_CONDITION' | translate\"\n class=\"p-button-outlined !px-4 !py-2\"\n (click)=\"addGroup()\">\n </button>\n </div>\n}\n</div>\n", styles: [".vertical-connector{position:relative;display:flex;justify-content:center;margin-bottom:1rem}.vertical-line{position:absolute;top:-1rem;height:1rem;width:2px;background-color:#d1d5db}.group-logical-operator-box{position:relative;padding:.25rem .75rem;border-radius:.375rem;font-weight:500;font-size:.75rem;z-index:10;transition:all .3s ease}.group-logical-operator-box.and{background-color:#dbeafe;color:#1d4ed8;border:1px solid #93c5fd}.group-logical-operator-box.or{background-color:#fef3c7;color:#92400e;border:1px solid #fcd34d}.connector-arrow{position:absolute;top:100%;left:50%;transform:translate(-50%);width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent}.group-logical-operator-box.and .connector-arrow{border-top:6px solid #93c5fd}.group-logical-operator-box.or .connector-arrow{border-top:6px solid #fcd34d}.border-blue-500{border-color:#93c5fd}.border-or-500{border-color:#fcd34d}.border-t-1{border-top-width:1px}.border-b-1{border-bottom-width:1px}.border-r-1{border-right-width:1px}.p-popover-content{padding:5px!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: SelectModule }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "ngmodule", type: CheckboxModule }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i6$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "ngmodule", type: MenuModule }, { kind: "ngmodule", type: InputGroupModule }, { kind: "ngmodule", type: InputGroupAddonModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i5$2.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: ListboxModule }, { kind: "component", type: i6$2.Listbox, selector: "p-listbox, p-listBox, p-list-box", inputs: ["hostName", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "ariaLabel", "selectOnFocus", "searchLocale", "focusOnHover", "filterMessage", "filterFields", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "scrollHeight", "tabindex", "multiple", "styleClass", "listStyle", "listStyleClass", "readonly", "checkbox", "filter", "filterBy", "filterMatchMode", "filterLocale", "metaKeySelection", "dataKey", "showToggleAll", "optionLabel", "optionValue", "optionGroupChildren", "optionGroupLabel", "optionDisabled", "ariaFilterLabel", "filterPlaceHolder", "emptyFilterMessage", "emptyMessage", "group", "options", "filterValue", "selectAll", "striped", "highlightOnSelect", "checkmark", "dragdrop", "dropListData", "fluid"], outputs: ["onChange", "onClick", "onDblClick", "onFilter", "onFocus", "onBlur", "onSelectAllChange", "onLazyLoad", "onDrop"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
1610
1633
  }
@@ -1656,124 +1679,124 @@ class TabTypeComponent extends FieldType {
1656
1679
  }
1657
1680
  }
1658
1681
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TabTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1659
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: TabTypeComponent, isStandalone: true, selector: "formly-tab-type", usesInheritance: true, ngImport: i0, template: `
1660
- <p-tabs
1661
- [value]="activeTabValue"
1662
- [scrollable]="props['scrollable'] !== false"
1663
- [lazy]="props['lazy'] !== false"
1664
- (valueChange)="onTabChange($event)">
1665
-
1666
- <p-tablist>
1667
- @for (tab of field.fieldGroup; track tab; let i = $index) {
1668
- <p-tab
1669
- [value]="i.toString()"
1670
- [disabled]="tab.props?.disabled">
1671
- @if(tab.props){
1672
- <div class="flex align-items-center gap-2">
1673
- <!-- Left Icon -->
1674
- @if (tab.props['leftIcon']) {
1675
- <i [class]="tab.props['leftIcon']" class="text-sm"></i>
1676
- }
1677
- <!-- Label -->
1678
- <span>{{ (tab.props['tabLabel'] ?? '') | translate }}</span>
1679
- <!-- Badge -->
1680
- @if (resolveBadge(tab) !== null) {
1681
- <p-badge
1682
- [value]="resolveBadge(tab)"
1683
- size="small">
1684
- </p-badge>
1685
- }
1686
- <!-- Right Icon -->
1687
- @if (tab.props['rightIcon']) {
1688
- <i [class]="tab.props['rightIcon']" class="text-sm"></i>
1689
- }
1690
- </div>
1691
- }
1692
- </p-tab>
1693
- }
1694
- </p-tablist>
1695
-
1696
- <p-tabpanels style="padding: 0;">
1697
- @for (tab of field.fieldGroup; track tab; let i = $index) {
1698
- <p-tabpanel
1699
- [value]="i.toString()">
1700
- <div class="p-3">
1701
- <formly-field [field]="tab"></formly-field>
1702
- <!-- Empty state -->
1703
- @if (!tab.fieldGroup || tab.fieldGroup.length === 0) {
1704
- <div
1705
- class="empty-tab text-center p-4 text-500">
1706
- <i class="pi pi-inbox text-2xl mb-2"></i>
1707
- <p>لا توجد حقول في هذه التبويبة</p>
1708
- </div>
1709
- }
1710
- </div>
1711
- </p-tabpanel>
1712
- }
1713
- </p-tabpanels>
1714
- </p-tabs>
1682
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: TabTypeComponent, isStandalone: true, selector: "formly-tab-type", usesInheritance: true, ngImport: i0, template: `
1683
+ <p-tabs
1684
+ [value]="activeTabValue"
1685
+ [scrollable]="props['scrollable'] !== false"
1686
+ [lazy]="props['lazy'] !== false"
1687
+ (valueChange)="onTabChange($event)">
1688
+
1689
+ <p-tablist>
1690
+ @for (tab of field.fieldGroup; track tab; let i = $index) {
1691
+ <p-tab
1692
+ [value]="i.toString()"
1693
+ [disabled]="tab.props?.disabled">
1694
+ @if(tab.props){
1695
+ <div class="flex align-items-center gap-2">
1696
+ <!-- Left Icon -->
1697
+ @if (tab.props['leftIcon']) {
1698
+ <i [class]="tab.props['leftIcon']" class="text-sm"></i>
1699
+ }
1700
+ <!-- Label -->
1701
+ <span>{{ (tab.props['tabLabel'] ?? '') | translate }}</span>
1702
+ <!-- Badge -->
1703
+ @if (resolveBadge(tab) !== null) {
1704
+ <p-badge
1705
+ [value]="resolveBadge(tab)"
1706
+ size="small">
1707
+ </p-badge>
1708
+ }
1709
+ <!-- Right Icon -->
1710
+ @if (tab.props['rightIcon']) {
1711
+ <i [class]="tab.props['rightIcon']" class="text-sm"></i>
1712
+ }
1713
+ </div>
1714
+ }
1715
+ </p-tab>
1716
+ }
1717
+ </p-tablist>
1718
+
1719
+ <p-tabpanels style="padding: 0;">
1720
+ @for (tab of field.fieldGroup; track tab; let i = $index) {
1721
+ <p-tabpanel
1722
+ [value]="i.toString()">
1723
+ <div class="p-3">
1724
+ <formly-field [field]="tab"></formly-field>
1725
+ <!-- Empty state -->
1726
+ @if (!tab.fieldGroup || tab.fieldGroup.length === 0) {
1727
+ <div
1728
+ class="empty-tab text-center p-4 text-500">
1729
+ <i class="pi pi-inbox text-2xl mb-2"></i>
1730
+ <p>لا توجد حقول في هذه التبويبة</p>
1731
+ </div>
1732
+ }
1733
+ </div>
1734
+ </p-tabpanel>
1735
+ }
1736
+ </p-tabpanels>
1737
+ </p-tabs>
1715
1738
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: TabsModule }, { kind: "component", type: i1$3.Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: i1$3.TabPanels, selector: "p-tabpanels" }, { kind: "component", type: i1$3.TabPanel, selector: "p-tabpanel", inputs: ["lazy", "value"], outputs: ["valueChange"] }, { kind: "component", type: i1$3.TabList, selector: "p-tablist" }, { kind: "component", type: i1$3.Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "component", type: i8.Badge, selector: "p-badge", inputs: ["styleClass", "badgeSize", "size", "severity", "value", "badgeDisabled"] }, { kind: "component", type: FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
1716
1739
  }
1717
1740
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TabTypeComponent, decorators: [{
1718
1741
  type: Component,
1719
1742
  args: [{
1720
1743
  selector: 'formly-tab-type',
1721
- template: `
1722
- <p-tabs
1723
- [value]="activeTabValue"
1724
- [scrollable]="props['scrollable'] !== false"
1725
- [lazy]="props['lazy'] !== false"
1726
- (valueChange)="onTabChange($event)">
1727
-
1728
- <p-tablist>
1729
- @for (tab of field.fieldGroup; track tab; let i = $index) {
1730
- <p-tab
1731
- [value]="i.toString()"
1732
- [disabled]="tab.props?.disabled">
1733
- @if(tab.props){
1734
- <div class="flex align-items-center gap-2">
1735
- <!-- Left Icon -->
1736
- @if (tab.props['leftIcon']) {
1737
- <i [class]="tab.props['leftIcon']" class="text-sm"></i>
1738
- }
1739
- <!-- Label -->
1740
- <span>{{ (tab.props['tabLabel'] ?? '') | translate }}</span>
1741
- <!-- Badge -->
1742
- @if (resolveBadge(tab) !== null) {
1743
- <p-badge
1744
- [value]="resolveBadge(tab)"
1745
- size="small">
1746
- </p-badge>
1747
- }
1748
- <!-- Right Icon -->
1749
- @if (tab.props['rightIcon']) {
1750
- <i [class]="tab.props['rightIcon']" class="text-sm"></i>
1751
- }
1752
- </div>
1753
- }
1754
- </p-tab>
1755
- }
1756
- </p-tablist>
1757
-
1758
- <p-tabpanels style="padding: 0;">
1759
- @for (tab of field.fieldGroup; track tab; let i = $index) {
1760
- <p-tabpanel
1761
- [value]="i.toString()">
1762
- <div class="p-3">
1763
- <formly-field [field]="tab"></formly-field>
1764
- <!-- Empty state -->
1765
- @if (!tab.fieldGroup || tab.fieldGroup.length === 0) {
1766
- <div
1767
- class="empty-tab text-center p-4 text-500">
1768
- <i class="pi pi-inbox text-2xl mb-2"></i>
1769
- <p>لا توجد حقول في هذه التبويبة</p>
1770
- </div>
1771
- }
1772
- </div>
1773
- </p-tabpanel>
1774
- }
1775
- </p-tabpanels>
1776
- </p-tabs>
1744
+ template: `
1745
+ <p-tabs
1746
+ [value]="activeTabValue"
1747
+ [scrollable]="props['scrollable'] !== false"
1748
+ [lazy]="props['lazy'] !== false"
1749
+ (valueChange)="onTabChange($event)">
1750
+
1751
+ <p-tablist>
1752
+ @for (tab of field.fieldGroup; track tab; let i = $index) {
1753
+ <p-tab
1754
+ [value]="i.toString()"
1755
+ [disabled]="tab.props?.disabled">
1756
+ @if(tab.props){
1757
+ <div class="flex align-items-center gap-2">
1758
+ <!-- Left Icon -->
1759
+ @if (tab.props['leftIcon']) {
1760
+ <i [class]="tab.props['leftIcon']" class="text-sm"></i>
1761
+ }
1762
+ <!-- Label -->
1763
+ <span>{{ (tab.props['tabLabel'] ?? '') | translate }}</span>
1764
+ <!-- Badge -->
1765
+ @if (resolveBadge(tab) !== null) {
1766
+ <p-badge
1767
+ [value]="resolveBadge(tab)"
1768
+ size="small">
1769
+ </p-badge>
1770
+ }
1771
+ <!-- Right Icon -->
1772
+ @if (tab.props['rightIcon']) {
1773
+ <i [class]="tab.props['rightIcon']" class="text-sm"></i>
1774
+ }
1775
+ </div>
1776
+ }
1777
+ </p-tab>
1778
+ }
1779
+ </p-tablist>
1780
+
1781
+ <p-tabpanels style="padding: 0;">
1782
+ @for (tab of field.fieldGroup; track tab; let i = $index) {
1783
+ <p-tabpanel
1784
+ [value]="i.toString()">
1785
+ <div class="p-3">
1786
+ <formly-field [field]="tab"></formly-field>
1787
+ <!-- Empty state -->
1788
+ @if (!tab.fieldGroup || tab.fieldGroup.length === 0) {
1789
+ <div
1790
+ class="empty-tab text-center p-4 text-500">
1791
+ <i class="pi pi-inbox text-2xl mb-2"></i>
1792
+ <p>لا توجد حقول في هذه التبويبة</p>
1793
+ </div>
1794
+ }
1795
+ </div>
1796
+ </p-tabpanel>
1797
+ }
1798
+ </p-tabpanels>
1799
+ </p-tabs>
1777
1800
  `,
1778
1801
  standalone: true,
1779
1802
  imports: [TabsModule, BadgeModule, FormlyField, TranslatePipe]