@exhaustive-ui/core 3.0.0-alpha.1 → 22.0.0-alpha.0

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 (153) hide show
  1. package/fesm2022/exhaustive-ui-core-api.mjs +4 -4
  2. package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
  3. package/fesm2022/exhaustive-ui-core-autocomplete.mjs +432 -376
  4. package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
  5. package/fesm2022/exhaustive-ui-core-carousel.mjs +240 -206
  6. package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
  7. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +79 -71
  8. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
  9. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +109 -97
  10. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
  11. package/fesm2022/exhaustive-ui-core-contextmenu.mjs +301 -323
  12. package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
  13. package/fesm2022/exhaustive-ui-core-datepicker.mjs +943 -793
  14. package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
  15. package/fesm2022/exhaustive-ui-core-dialog.mjs +167 -127
  16. package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
  17. package/fesm2022/exhaustive-ui-core-fileupload.mjs +485 -401
  18. package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
  19. package/fesm2022/exhaustive-ui-core-icons-angledoubledown.mjs +2 -2
  20. package/fesm2022/exhaustive-ui-core-icons-angledoubledown.mjs.map +1 -1
  21. package/fesm2022/exhaustive-ui-core-icons-angledoubleleft.mjs +2 -2
  22. package/fesm2022/exhaustive-ui-core-icons-angledoubleleft.mjs.map +1 -1
  23. package/fesm2022/exhaustive-ui-core-icons-angledoubleright.mjs +2 -2
  24. package/fesm2022/exhaustive-ui-core-icons-angledoubleright.mjs.map +1 -1
  25. package/fesm2022/exhaustive-ui-core-icons-angledoubleup.mjs +2 -2
  26. package/fesm2022/exhaustive-ui-core-icons-angledoubleup.mjs.map +1 -1
  27. package/fesm2022/exhaustive-ui-core-icons-angledown.mjs +2 -2
  28. package/fesm2022/exhaustive-ui-core-icons-angledown.mjs.map +1 -1
  29. package/fesm2022/exhaustive-ui-core-icons-angleleft.mjs +2 -2
  30. package/fesm2022/exhaustive-ui-core-icons-angleleft.mjs.map +1 -1
  31. package/fesm2022/exhaustive-ui-core-icons-angleright.mjs +2 -2
  32. package/fesm2022/exhaustive-ui-core-icons-angleright.mjs.map +1 -1
  33. package/fesm2022/exhaustive-ui-core-icons-angleup.mjs +2 -2
  34. package/fesm2022/exhaustive-ui-core-icons-angleup.mjs.map +1 -1
  35. package/fesm2022/exhaustive-ui-core-icons-arrowdown.mjs +2 -2
  36. package/fesm2022/exhaustive-ui-core-icons-arrowdown.mjs.map +1 -1
  37. package/fesm2022/exhaustive-ui-core-icons-arrowdownleft.mjs +2 -2
  38. package/fesm2022/exhaustive-ui-core-icons-arrowdownleft.mjs.map +1 -1
  39. package/fesm2022/exhaustive-ui-core-icons-arrowdownright.mjs +2 -2
  40. package/fesm2022/exhaustive-ui-core-icons-arrowdownright.mjs.map +1 -1
  41. package/fesm2022/exhaustive-ui-core-icons-arrowleft.mjs +2 -2
  42. package/fesm2022/exhaustive-ui-core-icons-arrowleft.mjs.map +1 -1
  43. package/fesm2022/exhaustive-ui-core-icons-arrowright.mjs +2 -2
  44. package/fesm2022/exhaustive-ui-core-icons-arrowright.mjs.map +1 -1
  45. package/fesm2022/exhaustive-ui-core-icons-arrowup.mjs +2 -2
  46. package/fesm2022/exhaustive-ui-core-icons-arrowup.mjs.map +1 -1
  47. package/fesm2022/exhaustive-ui-core-icons-ban.mjs +2 -2
  48. package/fesm2022/exhaustive-ui-core-icons-ban.mjs.map +1 -1
  49. package/fesm2022/exhaustive-ui-core-icons-bars.mjs +2 -2
  50. package/fesm2022/exhaustive-ui-core-icons-bars.mjs.map +1 -1
  51. package/fesm2022/exhaustive-ui-core-icons-blank.mjs +2 -2
  52. package/fesm2022/exhaustive-ui-core-icons-blank.mjs.map +1 -1
  53. package/fesm2022/exhaustive-ui-core-icons-calendar.mjs +2 -2
  54. package/fesm2022/exhaustive-ui-core-icons-calendar.mjs.map +1 -1
  55. package/fesm2022/exhaustive-ui-core-icons-caretleft.mjs +2 -2
  56. package/fesm2022/exhaustive-ui-core-icons-caretleft.mjs.map +1 -1
  57. package/fesm2022/exhaustive-ui-core-icons-caretright.mjs +2 -2
  58. package/fesm2022/exhaustive-ui-core-icons-caretright.mjs.map +1 -1
  59. package/fesm2022/exhaustive-ui-core-icons-check.mjs +2 -2
  60. package/fesm2022/exhaustive-ui-core-icons-check.mjs.map +1 -1
  61. package/fesm2022/exhaustive-ui-core-icons-chevrondown.mjs +2 -2
  62. package/fesm2022/exhaustive-ui-core-icons-chevrondown.mjs.map +1 -1
  63. package/fesm2022/exhaustive-ui-core-icons-chevronleft.mjs +2 -2
  64. package/fesm2022/exhaustive-ui-core-icons-chevronleft.mjs.map +1 -1
  65. package/fesm2022/exhaustive-ui-core-icons-chevronright.mjs +2 -2
  66. package/fesm2022/exhaustive-ui-core-icons-chevronright.mjs.map +1 -1
  67. package/fesm2022/exhaustive-ui-core-icons-chevronup.mjs +2 -2
  68. package/fesm2022/exhaustive-ui-core-icons-chevronup.mjs.map +1 -1
  69. package/fesm2022/exhaustive-ui-core-icons-exclamationtriangle.mjs +2 -2
  70. package/fesm2022/exhaustive-ui-core-icons-exclamationtriangle.mjs.map +1 -1
  71. package/fesm2022/exhaustive-ui-core-icons-eye.mjs +2 -2
  72. package/fesm2022/exhaustive-ui-core-icons-eye.mjs.map +1 -1
  73. package/fesm2022/exhaustive-ui-core-icons-eyeslash.mjs +2 -2
  74. package/fesm2022/exhaustive-ui-core-icons-eyeslash.mjs.map +1 -1
  75. package/fesm2022/exhaustive-ui-core-icons-filter.mjs +2 -2
  76. package/fesm2022/exhaustive-ui-core-icons-filter.mjs.map +1 -1
  77. package/fesm2022/exhaustive-ui-core-icons-filterfill.mjs +2 -2
  78. package/fesm2022/exhaustive-ui-core-icons-filterfill.mjs.map +1 -1
  79. package/fesm2022/exhaustive-ui-core-icons-filterslash.mjs +2 -2
  80. package/fesm2022/exhaustive-ui-core-icons-filterslash.mjs.map +1 -1
  81. package/fesm2022/exhaustive-ui-core-icons-home.mjs +2 -2
  82. package/fesm2022/exhaustive-ui-core-icons-home.mjs.map +1 -1
  83. package/fesm2022/exhaustive-ui-core-icons-infocircle.mjs +2 -2
  84. package/fesm2022/exhaustive-ui-core-icons-infocircle.mjs.map +1 -1
  85. package/fesm2022/exhaustive-ui-core-icons-minus.mjs +2 -2
  86. package/fesm2022/exhaustive-ui-core-icons-minus.mjs.map +1 -1
  87. package/fesm2022/exhaustive-ui-core-icons-pencil.mjs +2 -2
  88. package/fesm2022/exhaustive-ui-core-icons-pencil.mjs.map +1 -1
  89. package/fesm2022/exhaustive-ui-core-icons-plus.mjs +2 -2
  90. package/fesm2022/exhaustive-ui-core-icons-plus.mjs.map +1 -1
  91. package/fesm2022/exhaustive-ui-core-icons-refresh.mjs +2 -2
  92. package/fesm2022/exhaustive-ui-core-icons-refresh.mjs.map +1 -1
  93. package/fesm2022/exhaustive-ui-core-icons-search.mjs +2 -2
  94. package/fesm2022/exhaustive-ui-core-icons-search.mjs.map +1 -1
  95. package/fesm2022/exhaustive-ui-core-icons-searchminus.mjs +2 -2
  96. package/fesm2022/exhaustive-ui-core-icons-searchminus.mjs.map +1 -1
  97. package/fesm2022/exhaustive-ui-core-icons-searchplus.mjs +2 -2
  98. package/fesm2022/exhaustive-ui-core-icons-searchplus.mjs.map +1 -1
  99. package/fesm2022/exhaustive-ui-core-icons-sortalt.mjs +2 -2
  100. package/fesm2022/exhaustive-ui-core-icons-sortalt.mjs.map +1 -1
  101. package/fesm2022/exhaustive-ui-core-icons-sortamountdown.mjs +2 -2
  102. package/fesm2022/exhaustive-ui-core-icons-sortamountdown.mjs.map +1 -1
  103. package/fesm2022/exhaustive-ui-core-icons-sortamountupalt.mjs +2 -2
  104. package/fesm2022/exhaustive-ui-core-icons-sortamountupalt.mjs.map +1 -1
  105. package/fesm2022/exhaustive-ui-core-icons-spinner.mjs +2 -2
  106. package/fesm2022/exhaustive-ui-core-icons-spinner.mjs.map +1 -1
  107. package/fesm2022/exhaustive-ui-core-icons-star.mjs +2 -2
  108. package/fesm2022/exhaustive-ui-core-icons-star.mjs.map +1 -1
  109. package/fesm2022/exhaustive-ui-core-icons-starfill.mjs +2 -2
  110. package/fesm2022/exhaustive-ui-core-icons-starfill.mjs.map +1 -1
  111. package/fesm2022/exhaustive-ui-core-icons-thlarge.mjs +2 -2
  112. package/fesm2022/exhaustive-ui-core-icons-thlarge.mjs.map +1 -1
  113. package/fesm2022/exhaustive-ui-core-icons-times.mjs +2 -2
  114. package/fesm2022/exhaustive-ui-core-icons-times.mjs.map +1 -1
  115. package/fesm2022/exhaustive-ui-core-icons-timescircle.mjs +2 -2
  116. package/fesm2022/exhaustive-ui-core-icons-timescircle.mjs.map +1 -1
  117. package/fesm2022/exhaustive-ui-core-icons-trash.mjs +2 -2
  118. package/fesm2022/exhaustive-ui-core-icons-trash.mjs.map +1 -1
  119. package/fesm2022/exhaustive-ui-core-icons-undo.mjs +2 -2
  120. package/fesm2022/exhaustive-ui-core-icons-undo.mjs.map +1 -1
  121. package/fesm2022/exhaustive-ui-core-icons-upload.mjs +2 -2
  122. package/fesm2022/exhaustive-ui-core-icons-upload.mjs.map +1 -1
  123. package/fesm2022/exhaustive-ui-core-icons-windowmaximize.mjs +2 -2
  124. package/fesm2022/exhaustive-ui-core-icons-windowmaximize.mjs.map +1 -1
  125. package/fesm2022/exhaustive-ui-core-icons-windowminimize.mjs +2 -2
  126. package/fesm2022/exhaustive-ui-core-icons-windowminimize.mjs.map +1 -1
  127. package/fesm2022/exhaustive-ui-core-inplace.mjs +4 -4
  128. package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
  129. package/fesm2022/exhaustive-ui-core-listbox.mjs +303 -259
  130. package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
  131. package/fesm2022/exhaustive-ui-core-megamenu.mjs +6 -6
  132. package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
  133. package/fesm2022/exhaustive-ui-core-menubar.mjs +2 -2
  134. package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
  135. package/fesm2022/exhaustive-ui-core-motion.mjs +2 -2
  136. package/fesm2022/exhaustive-ui-core-motion.mjs.map +1 -1
  137. package/fesm2022/exhaustive-ui-core-multiselect.mjs +421 -333
  138. package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
  139. package/fesm2022/exhaustive-ui-core-panelmenu.mjs +4 -4
  140. package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
  141. package/fesm2022/exhaustive-ui-core-picklist.mjs +426 -346
  142. package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
  143. package/fesm2022/exhaustive-ui-core-select.mjs +391 -337
  144. package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
  145. package/fesm2022/exhaustive-ui-core-table.mjs +337 -293
  146. package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
  147. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +315 -325
  148. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
  149. package/fesm2022/exhaustive-ui-core-treeselect.mjs +11 -7
  150. package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
  151. package/package.json +11 -11
  152. package/schematics/migrations.json +5 -5
  153. package/schematics/utils/versions.json +8 -8
@@ -6597,53 +6597,61 @@ class ColumnFilter extends BaseComponent {
6597
6597
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ColumnFilter, deps: [], target: i0.ɵɵFactoryTarget.Component });
6598
6598
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: ColumnFilter, isStandalone: false, selector: "p-columnFilter, p-column-filter, p-columnfilter", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, showMenu: { classPropertyName: "showMenu", publicName: "showMenu", isSignal: true, isRequired: false, transformFunction: null }, matchMode: { classPropertyName: "matchMode", publicName: "matchMode", isSignal: true, isRequired: false, transformFunction: null }, operator: { classPropertyName: "operator", publicName: "operator", isSignal: true, isRequired: false, transformFunction: null }, showOperator: { classPropertyName: "showOperator", publicName: "showOperator", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, showApplyButton: { classPropertyName: "showApplyButton", publicName: "showApplyButton", isSignal: true, isRequired: false, transformFunction: null }, showMatchModes: { classPropertyName: "showMatchModes", publicName: "showMatchModes", isSignal: true, isRequired: false, transformFunction: null }, showAddButton: { classPropertyName: "showAddButton", publicName: "showAddButton", isSignal: true, isRequired: false, transformFunction: null }, hideOnClear: { classPropertyName: "hideOnClear", publicName: "hideOnClear", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, matchModeOptions: { classPropertyName: "matchModeOptions", publicName: "matchModeOptions", isSignal: true, isRequired: false, transformFunction: null }, maxConstraints: { classPropertyName: "maxConstraints", publicName: "maxConstraints", isSignal: true, isRequired: false, transformFunction: null }, minFractionDigits: { classPropertyName: "minFractionDigits", publicName: "minFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, maxFractionDigits: { classPropertyName: "maxFractionDigits", publicName: "maxFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, localeMatcher: { classPropertyName: "localeMatcher", publicName: "localeMatcher", isSignal: true, isRequired: false, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null }, currencyDisplay: { classPropertyName: "currencyDisplay", publicName: "currencyDisplay", isSignal: true, isRequired: false, transformFunction: null }, filterOn: { classPropertyName: "filterOn", publicName: "filterOn", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, showButtons: { classPropertyName: "showButtons", publicName: "showButtons", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, filterButtonProps: { classPropertyName: "filterButtonProps", publicName: "filterButtonProps", isSignal: true, isRequired: false, transformFunction: null }, motionOptions: { classPropertyName: "motionOptions", publicName: "motionOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onShow: "onShow", onHide: "onHide" }, providers: [TableStyle], queries: [{ propertyName: "_templates", predicate: PrimeTemplate, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], isSignal: true }, { propertyName: "filterTemplate", first: true, predicate: ["filter"], isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], isSignal: true }, { propertyName: "filterIconTemplate", first: true, predicate: ["filtericon"], isSignal: true }, { propertyName: "removeRuleIconTemplate", first: true, predicate: ["removeruleicon"], isSignal: true }, { propertyName: "addRuleIconTemplate", first: true, predicate: ["addruleicon"], isSignal: true }], viewQueries: [{ propertyName: "icon", first: true, predicate: Button, descendants: true, read: ElementRef, isSignal: true }, { propertyName: "clearButtonViewChild", first: true, predicate: ["clearBtn"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
6599
6599
  <div [class]="cx('filter')">
6600
- <p-columnFilterFormElement
6601
- *ngIf="display() === 'row'"
6602
- class="p-fluid"
6603
- [type]="type()"
6604
- [field]="field()"
6605
- [ariaLabel]="ariaLabel()"
6606
- [filterConstraint]="dataTable._filters()[field()]"
6607
- [filterTemplate]="filterTemplate() || _filterTemplate()"
6608
- [placeholder]="placeholder()"
6609
- [minFractionDigits]="minFractionDigits()"
6610
- [maxFractionDigits]="maxFractionDigits()"
6611
- [prefix]="prefix()"
6612
- [suffix]="suffix()"
6613
- [locale]="locale()"
6614
- [localeMatcher]="localeMatcher()"
6615
- [currency]="currency()"
6616
- [currencyDisplay]="currencyDisplay()"
6617
- [useGrouping]="useGrouping()"
6618
- [showButtons]="showButtons()"
6619
- [filterOn]="filterOn()"
6620
- [pt]="pt()"
6621
- [unstyled]="unstyled()"
6622
- ></p-columnFilterFormElement>
6623
- <p-button
6624
- *ngIf="showMenuButton()"
6625
- [styleClass]="cx('pcColumnFilterButton')"
6626
- [pt]="ptm('pcColumnFilterButton')"
6627
- [attr.aria-haspopup]="true"
6628
- [ariaLabel]="filterMenuButtonAriaLabel"
6629
- [attr.aria-controls]="overlayVisible() ? overlayId() : null"
6630
- [attr.aria-expanded]="overlayVisible() ?? false"
6631
- (click)="toggleMenu($event)"
6632
- (keydown)="onToggleButtonKeyDown($event)"
6633
- [buttonProps]="filterButtonProps()?.filter"
6634
- #menuButton
6635
- [unstyled]="unstyled()"
6636
- >
6637
- <ng-template #icon>
6638
- <ng-container>
6639
- <svg data-p-icon="filter" *ngIf="!filterIconTemplate() && !_filterIconTemplate() && !hasFilter" [pBind]="ptm('pcColumnFilterButton')['icon']" />
6640
- <svg data-p-icon="filter-fill" *ngIf="!filterIconTemplate() && !_filterIconTemplate() && hasFilter" [pBind]="ptm('pcColumnFilterButton')['icon']" />
6641
- <span *ngIf="filterIconTemplate() || _filterIconTemplate()" [pBind]="ptm('pcColumnFilterButton')['icon']" [attr.data-pc-section]="'columnfilterbuttonicon'">
6642
- <ng-template *ngTemplateOutlet="filterIconTemplate() || _filterIconTemplate(); context: { hasFilter: hasFilter }"></ng-template>
6643
- </span>
6644
- </ng-container>
6645
- </ng-template>
6646
- </p-button>
6600
+ @if (display() === 'row') {
6601
+ <p-columnFilterFormElement
6602
+ class="p-fluid"
6603
+ [type]="type()"
6604
+ [field]="field()"
6605
+ [ariaLabel]="ariaLabel()"
6606
+ [filterConstraint]="dataTable._filters()[field()]"
6607
+ [filterTemplate]="filterTemplate() || _filterTemplate()"
6608
+ [placeholder]="placeholder()"
6609
+ [minFractionDigits]="minFractionDigits()"
6610
+ [maxFractionDigits]="maxFractionDigits()"
6611
+ [prefix]="prefix()"
6612
+ [suffix]="suffix()"
6613
+ [locale]="locale()"
6614
+ [localeMatcher]="localeMatcher()"
6615
+ [currency]="currency()"
6616
+ [currencyDisplay]="currencyDisplay()"
6617
+ [useGrouping]="useGrouping()"
6618
+ [showButtons]="showButtons()"
6619
+ [filterOn]="filterOn()"
6620
+ [pt]="pt()"
6621
+ [unstyled]="unstyled()"
6622
+ ></p-columnFilterFormElement>
6623
+ }
6624
+ @if (showMenuButton()) {
6625
+ <p-button
6626
+ [styleClass]="cx('pcColumnFilterButton')"
6627
+ [pt]="ptm('pcColumnFilterButton')"
6628
+ [attr.aria-haspopup]="true"
6629
+ [ariaLabel]="filterMenuButtonAriaLabel"
6630
+ [attr.aria-controls]="overlayVisible() ? overlayId() : null"
6631
+ [attr.aria-expanded]="overlayVisible() ?? false"
6632
+ (click)="toggleMenu($event)"
6633
+ (keydown)="onToggleButtonKeyDown($event)"
6634
+ [buttonProps]="filterButtonProps()?.filter"
6635
+ #menuButton
6636
+ [unstyled]="unstyled()"
6637
+ >
6638
+ <ng-template #icon>
6639
+ <ng-container>
6640
+ @if (!filterIconTemplate() && !_filterIconTemplate() && !hasFilter) {
6641
+ <svg data-p-icon="filter" [pBind]="ptm('pcColumnFilterButton')['icon']" />
6642
+ }
6643
+ @if (!filterIconTemplate() && !_filterIconTemplate() && hasFilter) {
6644
+ <svg data-p-icon="filter-fill" [pBind]="ptm('pcColumnFilterButton')['icon']" />
6645
+ }
6646
+ @if (filterIconTemplate() || _filterIconTemplate()) {
6647
+ <span [pBind]="ptm('pcColumnFilterButton')['icon']" [attr.data-pc-section]="'columnfilterbuttonicon'">
6648
+ <ng-template *ngTemplateOutlet="filterIconTemplate() || _filterIconTemplate(); context: { hasFilter: hasFilter }"></ng-template>
6649
+ </span>
6650
+ }
6651
+ </ng-container>
6652
+ </ng-template>
6653
+ </p-button>
6654
+ }
6647
6655
  @if (renderOverlay()) {
6648
6656
  <div
6649
6657
  [pMotion]="showMenu() && overlayVisible()"
@@ -6661,88 +6669,98 @@ class ColumnFilter extends BaseComponent {
6661
6669
  (keydown.escape)="onEscape()"
6662
6670
  >
6663
6671
  <ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate(); context: { $implicit: field() }"></ng-container>
6664
- <ul *ngIf="display() === 'row'; else menu" [class]="cx('filterConstraintList')" [pBind]="ptm('filterConstraintList')">
6665
- <li
6666
- *ngFor="let matchMode of matchModes(); let i = index"
6667
- (click)="onRowMatchModeChange(matchMode.value)"
6668
- (keydown)="onRowMatchModeKeyDown($event)"
6669
- (keydown.enter)="onRowMatchModeChange(matchMode.value)"
6670
- [class]="cx('filterConstraint')"
6671
- [pBind]="ptm('filterConstraint', ptmFilterConstraintOptions(matchMode))"
6672
- [class.p-datatable-filter-constraint-selected]="isRowMatchModeSelected(matchMode.value)"
6673
- [attr.tabindex]="i === 0 ? '0' : null"
6674
- >
6675
- {{ matchMode.label }}
6676
- </li>
6677
- <li [class]="cx('filterConstraintSeparator')" [pBind]="ptm('filterConstraintSeparator', { context: { index: i } })"></li>
6678
- <li [class]="cx('filterConstraint')" [pBind]="ptm('emtpyFilterLabel')" (click)="onRowClearItemClick()" (keydown)="onRowMatchModeKeyDown($event)" (keydown.enter)="onRowClearItemClick()">
6679
- {{ noFilterLabel }}
6680
- </li>
6681
- </ul>
6682
- <ng-template #menu>
6683
- <div [class]="cx('filterOperator')" [pBind]="ptm('filterOperator')" *ngIf="isShowOperator()">
6684
- <p-select
6685
- [options]="operatorOptions()"
6686
- [pt]="ptm('pcFilterOperatorDropdown')"
6687
- [ngModel]="_operator()"
6688
- [ngModelOptions]="{ standalone: true }"
6689
- (ngModelChange)="onOperatorChange($event)"
6690
- [class]="cx('pcFilterOperatorDropdown')"
6691
- [unstyled]="unstyled()"
6692
- ></p-select>
6693
- </div>
6694
- <div [class]="cx('filterRuleList')" [pBind]="ptm('filterRuleList')">
6695
- <div *ngFor="let fieldConstraint of fieldConstraints; let i = index" [ngClass]="cx('filterRule')" [pBind]="ptm('filterRule')">
6672
+ @if (display() === 'row') {
6673
+ <ul [class]="cx('filterConstraintList')" [pBind]="ptm('filterConstraintList')">
6674
+ @for (matchMode of matchModes(); track matchMode; let i = $index) {
6675
+ <li
6676
+ (click)="onRowMatchModeChange(matchMode.value)"
6677
+ (keydown)="onRowMatchModeKeyDown($event)"
6678
+ (keydown.enter)="onRowMatchModeChange(matchMode.value)"
6679
+ [class]="cx('filterConstraint')"
6680
+ [pBind]="ptm('filterConstraint', ptmFilterConstraintOptions(matchMode))"
6681
+ [class.p-datatable-filter-constraint-selected]="isRowMatchModeSelected(matchMode.value)"
6682
+ [attr.tabindex]="i === 0 ? '0' : null"
6683
+ >
6684
+ {{ matchMode.label }}
6685
+ </li>
6686
+ }
6687
+ <li [class]="cx('filterConstraintSeparator')" [pBind]="ptm('filterConstraintSeparator', { context: { index: i } })"></li>
6688
+ <li [class]="cx('filterConstraint')" [pBind]="ptm('emtpyFilterLabel')" (click)="onRowClearItemClick()" (keydown)="onRowMatchModeKeyDown($event)" (keydown.enter)="onRowClearItemClick()">
6689
+ {{ noFilterLabel }}
6690
+ </li>
6691
+ </ul>
6692
+ } @else {
6693
+ @if (isShowOperator()) {
6694
+ <div [class]="cx('filterOperator')" [pBind]="ptm('filterOperator')">
6696
6695
  <p-select
6697
- *ngIf="showMatchModes() && matchModes()"
6698
- [options]="matchModes()"
6699
- [ngModel]="fieldConstraint.matchMode"
6696
+ [options]="operatorOptions()"
6697
+ [pt]="ptm('pcFilterOperatorDropdown')"
6698
+ [ngModel]="_operator()"
6700
6699
  [ngModelOptions]="{ standalone: true }"
6701
- (ngModelChange)="onMenuMatchModeChange($event, fieldConstraint)"
6702
- [class]="cx('pcFilterConstraintDropdown')"
6703
- [pt]="ptm('pcFilterConstraintDropdown')"
6700
+ (ngModelChange)="onOperatorChange($event)"
6701
+ [class]="cx('pcFilterOperatorDropdown')"
6704
6702
  [unstyled]="unstyled()"
6705
6703
  ></p-select>
6706
- <p-columnFilterFormElement
6707
- [type]="type()"
6708
- [field]="field()"
6709
- [filterConstraint]="fieldConstraint"
6710
- [filterTemplate]="filterTemplate() || _filterTemplate()"
6711
- [placeholder]="placeholder()"
6712
- [minFractionDigits]="minFractionDigits()"
6713
- [maxFractionDigits]="maxFractionDigits()"
6714
- [prefix]="prefix()"
6715
- [suffix]="suffix()"
6716
- [locale]="locale()"
6717
- [localeMatcher]="localeMatcher()"
6718
- [currency]="currency()"
6719
- [currencyDisplay]="currencyDisplay()"
6720
- [useGrouping]="useGrouping()"
6721
- [filterOn]="filterOn()"
6722
- [pt]="pt()"
6723
- [unstyled]="unstyled()"
6724
- ></p-columnFilterFormElement>
6725
- <div>
6726
- <p-button
6727
- *ngIf="showRemoveIcon"
6728
- [styleClass]="cx('pcFilterRemoveRuleButton')"
6729
- [pt]="ptm('pcFilterRemoveRuleButton')"
6730
- [text]="true"
6731
- severity="danger"
6732
- size="small"
6733
- (onClick)="removeConstraint(fieldConstraint)"
6734
- [ariaLabel]="removeRuleButtonLabel"
6735
- [label]="removeRuleButtonLabel"
6736
- [buttonProps]="filterButtonProps()?.popover?.removeRule"
6704
+ </div>
6705
+ }
6706
+ <div [class]="cx('filterRuleList')" [pBind]="ptm('filterRuleList')">
6707
+ @for (fieldConstraint of fieldConstraints; track fieldConstraint; let i = $index) {
6708
+ <div [ngClass]="cx('filterRule')" [pBind]="ptm('filterRule')">
6709
+ @if (showMatchModes() && matchModes()) {
6710
+ <p-select
6711
+ [options]="matchModes()"
6712
+ [ngModel]="fieldConstraint.matchMode"
6713
+ [ngModelOptions]="{ standalone: true }"
6714
+ (ngModelChange)="onMenuMatchModeChange($event, fieldConstraint)"
6715
+ [class]="cx('pcFilterConstraintDropdown')"
6716
+ [pt]="ptm('pcFilterConstraintDropdown')"
6717
+ [unstyled]="unstyled()"
6718
+ ></p-select>
6719
+ }
6720
+ <p-columnFilterFormElement
6721
+ [type]="type()"
6722
+ [field]="field()"
6723
+ [filterConstraint]="fieldConstraint"
6724
+ [filterTemplate]="filterTemplate() || _filterTemplate()"
6725
+ [placeholder]="placeholder()"
6726
+ [minFractionDigits]="minFractionDigits()"
6727
+ [maxFractionDigits]="maxFractionDigits()"
6728
+ [prefix]="prefix()"
6729
+ [suffix]="suffix()"
6730
+ [locale]="locale()"
6731
+ [localeMatcher]="localeMatcher()"
6732
+ [currency]="currency()"
6733
+ [currencyDisplay]="currencyDisplay()"
6734
+ [useGrouping]="useGrouping()"
6735
+ [filterOn]="filterOn()"
6736
+ [pt]="pt()"
6737
6737
  [unstyled]="unstyled()"
6738
- >
6739
- <ng-template #icon>
6740
- <svg data-p-icon="trash" *ngIf="!removeRuleIconTemplate() && !_removeRuleIconTemplate()" [pBind]="ptm('pcFilterRemoveRuleButton')['icon']" />
6741
- <ng-template *ngTemplateOutlet="removeRuleIconTemplate() || _removeRuleIconTemplate()"></ng-template>
6742
- </ng-template>
6743
- </p-button>
6738
+ ></p-columnFilterFormElement>
6739
+ <div>
6740
+ @if (showRemoveIcon) {
6741
+ <p-button
6742
+ [styleClass]="cx('pcFilterRemoveRuleButton')"
6743
+ [pt]="ptm('pcFilterRemoveRuleButton')"
6744
+ [text]="true"
6745
+ severity="danger"
6746
+ size="small"
6747
+ (onClick)="removeConstraint(fieldConstraint)"
6748
+ [ariaLabel]="removeRuleButtonLabel"
6749
+ [label]="removeRuleButtonLabel"
6750
+ [buttonProps]="filterButtonProps()?.popover?.removeRule"
6751
+ [unstyled]="unstyled()"
6752
+ >
6753
+ <ng-template #icon>
6754
+ @if (!removeRuleIconTemplate() && !_removeRuleIconTemplate()) {
6755
+ <svg data-p-icon="trash" [pBind]="ptm('pcFilterRemoveRuleButton')['icon']" />
6756
+ }
6757
+ <ng-template *ngTemplateOutlet="removeRuleIconTemplate() || _removeRuleIconTemplate()"></ng-template>
6758
+ </ng-template>
6759
+ </p-button>
6760
+ }
6761
+ </div>
6744
6762
  </div>
6745
- </div>
6763
+ }
6746
6764
  </div>
6747
6765
  @if (isShowAddConstraint) {
6748
6766
  <p-button
@@ -6758,40 +6776,44 @@ class ColumnFilter extends BaseComponent {
6758
6776
  [unstyled]="unstyled()"
6759
6777
  >
6760
6778
  <ng-template #icon>
6761
- <svg data-p-icon="plus" *ngIf="!addRuleIconTemplate() && !_addRuleIconTemplate()" [pBind]="ptm('pcAddRuleButtonLabel')['icon']" />
6779
+ @if (!addRuleIconTemplate() && !_addRuleIconTemplate()) {
6780
+ <svg data-p-icon="plus" [pBind]="ptm('pcAddRuleButtonLabel')['icon']" />
6781
+ }
6762
6782
  <ng-template *ngTemplateOutlet="addRuleIconTemplate() || _addRuleIconTemplate()"></ng-template>
6763
6783
  </ng-template>
6764
6784
  </p-button>
6765
6785
  }
6766
6786
  <div [class]="cx('filterButtonbar')" [pBind]="ptm('filterButtonBar')">
6767
- <p-button
6768
- #clearBtn
6769
- *ngIf="showClearButton()"
6770
- [outlined]="true"
6771
- (onClick)="clearFilter()"
6772
- [attr.aria-label]="clearButtonLabel"
6773
- [label]="clearButtonLabel"
6774
- [buttonProps]="filterButtonProps()?.popover?.clear"
6775
- [pt]="ptm('pcFilterClearButton')"
6776
- [unstyled]="unstyled()"
6777
- />
6778
- <p-button
6779
- *ngIf="showApplyButton()"
6780
- (onClick)="applyFilter()"
6781
- size="small"
6782
- [label]="applyButtonLabel"
6783
- [attr.aria-label]="applyButtonLabel"
6784
- [buttonProps]="filterButtonProps()?.popover?.apply"
6785
- [pt]="ptm('pcFilterApplyButton')"
6786
- [unstyled]="unstyled()"
6787
- />
6787
+ @if (showClearButton()) {
6788
+ <p-button
6789
+ #clearBtn
6790
+ [outlined]="true"
6791
+ (onClick)="clearFilter()"
6792
+ [attr.aria-label]="clearButtonLabel"
6793
+ [label]="clearButtonLabel"
6794
+ [buttonProps]="filterButtonProps()?.popover?.clear"
6795
+ [pt]="ptm('pcFilterClearButton')"
6796
+ [unstyled]="unstyled()"
6797
+ />
6798
+ }
6799
+ @if (showApplyButton()) {
6800
+ <p-button
6801
+ (onClick)="applyFilter()"
6802
+ size="small"
6803
+ [label]="applyButtonLabel"
6804
+ [attr.aria-label]="applyButtonLabel"
6805
+ [buttonProps]="filterButtonProps()?.popover?.apply"
6806
+ [pt]="ptm('pcFilterApplyButton')"
6807
+ [unstyled]="unstyled()"
6808
+ />
6809
+ }
6788
6810
  </div>
6789
- </ng-template>
6811
+ }
6790
6812
  <ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate(); context: { $implicit: field() }"></ng-container>
6791
6813
  </div>
6792
6814
  }
6793
6815
  </div>
6794
- `, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => i2.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgForOf), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => i10.Select), selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i0.forwardRef(() => i7.NgControlStatus), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(() => i7.NgModel), selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i0.forwardRef(() => i11.Button), selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i0.forwardRef(() => FilterIcon), selector: "[data-p-icon=\"filter\"]" }, { kind: "component", type: i0.forwardRef(() => FilterFillIcon), selector: "[data-p-icon=\"filter-fill\"]" }, { kind: "component", type: i0.forwardRef(() => PlusIcon), selector: "[data-p-icon=\"plus\"]" }, { kind: "component", type: i0.forwardRef(() => TrashIcon), selector: "[data-p-icon=\"trash\"]" }, { kind: "directive", type: i0.forwardRef(() => i1.Bind), selector: "[pBind]", inputs: ["pBind"] }, { kind: "directive", type: i0.forwardRef(() => i12.MotionDirective), selector: "[pMotion]", inputs: ["pMotion", "pMotionName", "pMotionType", "pMotionSafe", "pMotionDisabled", "pMotionAppear", "pMotionEnter", "pMotionLeave", "pMotionDuration", "pMotionHideStrategy", "pMotionEnterFromClass", "pMotionEnterToClass", "pMotionEnterActiveClass", "pMotionLeaveFromClass", "pMotionLeaveToClass", "pMotionLeaveActiveClass", "pMotionOptions"], outputs: ["pMotionOnBeforeEnter", "pMotionOnEnter", "pMotionOnAfterEnter", "pMotionOnEnterCancelled", "pMotionOnBeforeLeave", "pMotionOnLeave", "pMotionOnAfterLeave", "pMotionOnLeaveCancelled"] }, { kind: "component", type: i0.forwardRef(() => ColumnFilterFormElement), selector: "p-columnFilterFormElement", inputs: ["field", "type", "filterConstraint", "filterTemplate", "placeholder", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping", "ariaLabel", "filterOn"] }], changeDetection: i0.ChangeDetectionStrategy.Eager, encapsulation: i0.ViewEncapsulation.None });
6816
+ `, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => i2.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => i10.Select), selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i0.forwardRef(() => i7.NgControlStatus), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(() => i7.NgModel), selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i0.forwardRef(() => i11.Button), selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i0.forwardRef(() => FilterIcon), selector: "[data-p-icon=\"filter\"]" }, { kind: "component", type: i0.forwardRef(() => FilterFillIcon), selector: "[data-p-icon=\"filter-fill\"]" }, { kind: "component", type: i0.forwardRef(() => PlusIcon), selector: "[data-p-icon=\"plus\"]" }, { kind: "component", type: i0.forwardRef(() => TrashIcon), selector: "[data-p-icon=\"trash\"]" }, { kind: "directive", type: i0.forwardRef(() => i1.Bind), selector: "[pBind]", inputs: ["pBind"] }, { kind: "directive", type: i0.forwardRef(() => i12.MotionDirective), selector: "[pMotion]", inputs: ["pMotion", "pMotionName", "pMotionType", "pMotionSafe", "pMotionDisabled", "pMotionAppear", "pMotionEnter", "pMotionLeave", "pMotionDuration", "pMotionHideStrategy", "pMotionEnterFromClass", "pMotionEnterToClass", "pMotionEnterActiveClass", "pMotionLeaveFromClass", "pMotionLeaveToClass", "pMotionLeaveActiveClass", "pMotionOptions"], outputs: ["pMotionOnBeforeEnter", "pMotionOnEnter", "pMotionOnAfterEnter", "pMotionOnEnterCancelled", "pMotionOnBeforeLeave", "pMotionOnLeave", "pMotionOnAfterLeave", "pMotionOnLeaveCancelled"] }, { kind: "component", type: i0.forwardRef(() => ColumnFilterFormElement), selector: "p-columnFilterFormElement", inputs: ["field", "type", "filterConstraint", "filterTemplate", "placeholder", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "useGrouping", "ariaLabel", "filterOn"] }], changeDetection: i0.ChangeDetectionStrategy.Eager, encapsulation: i0.ViewEncapsulation.None });
6795
6817
  }
6796
6818
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ColumnFilter, decorators: [{
6797
6819
  type: Component,
@@ -6801,53 +6823,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
6801
6823
  standalone: false,
6802
6824
  template: `
6803
6825
  <div [class]="cx('filter')">
6804
- <p-columnFilterFormElement
6805
- *ngIf="display() === 'row'"
6806
- class="p-fluid"
6807
- [type]="type()"
6808
- [field]="field()"
6809
- [ariaLabel]="ariaLabel()"
6810
- [filterConstraint]="dataTable._filters()[field()]"
6811
- [filterTemplate]="filterTemplate() || _filterTemplate()"
6812
- [placeholder]="placeholder()"
6813
- [minFractionDigits]="minFractionDigits()"
6814
- [maxFractionDigits]="maxFractionDigits()"
6815
- [prefix]="prefix()"
6816
- [suffix]="suffix()"
6817
- [locale]="locale()"
6818
- [localeMatcher]="localeMatcher()"
6819
- [currency]="currency()"
6820
- [currencyDisplay]="currencyDisplay()"
6821
- [useGrouping]="useGrouping()"
6822
- [showButtons]="showButtons()"
6823
- [filterOn]="filterOn()"
6824
- [pt]="pt()"
6825
- [unstyled]="unstyled()"
6826
- ></p-columnFilterFormElement>
6827
- <p-button
6828
- *ngIf="showMenuButton()"
6829
- [styleClass]="cx('pcColumnFilterButton')"
6830
- [pt]="ptm('pcColumnFilterButton')"
6831
- [attr.aria-haspopup]="true"
6832
- [ariaLabel]="filterMenuButtonAriaLabel"
6833
- [attr.aria-controls]="overlayVisible() ? overlayId() : null"
6834
- [attr.aria-expanded]="overlayVisible() ?? false"
6835
- (click)="toggleMenu($event)"
6836
- (keydown)="onToggleButtonKeyDown($event)"
6837
- [buttonProps]="filterButtonProps()?.filter"
6838
- #menuButton
6839
- [unstyled]="unstyled()"
6840
- >
6841
- <ng-template #icon>
6842
- <ng-container>
6843
- <svg data-p-icon="filter" *ngIf="!filterIconTemplate() && !_filterIconTemplate() && !hasFilter" [pBind]="ptm('pcColumnFilterButton')['icon']" />
6844
- <svg data-p-icon="filter-fill" *ngIf="!filterIconTemplate() && !_filterIconTemplate() && hasFilter" [pBind]="ptm('pcColumnFilterButton')['icon']" />
6845
- <span *ngIf="filterIconTemplate() || _filterIconTemplate()" [pBind]="ptm('pcColumnFilterButton')['icon']" [attr.data-pc-section]="'columnfilterbuttonicon'">
6846
- <ng-template *ngTemplateOutlet="filterIconTemplate() || _filterIconTemplate(); context: { hasFilter: hasFilter }"></ng-template>
6847
- </span>
6848
- </ng-container>
6849
- </ng-template>
6850
- </p-button>
6826
+ @if (display() === 'row') {
6827
+ <p-columnFilterFormElement
6828
+ class="p-fluid"
6829
+ [type]="type()"
6830
+ [field]="field()"
6831
+ [ariaLabel]="ariaLabel()"
6832
+ [filterConstraint]="dataTable._filters()[field()]"
6833
+ [filterTemplate]="filterTemplate() || _filterTemplate()"
6834
+ [placeholder]="placeholder()"
6835
+ [minFractionDigits]="minFractionDigits()"
6836
+ [maxFractionDigits]="maxFractionDigits()"
6837
+ [prefix]="prefix()"
6838
+ [suffix]="suffix()"
6839
+ [locale]="locale()"
6840
+ [localeMatcher]="localeMatcher()"
6841
+ [currency]="currency()"
6842
+ [currencyDisplay]="currencyDisplay()"
6843
+ [useGrouping]="useGrouping()"
6844
+ [showButtons]="showButtons()"
6845
+ [filterOn]="filterOn()"
6846
+ [pt]="pt()"
6847
+ [unstyled]="unstyled()"
6848
+ ></p-columnFilterFormElement>
6849
+ }
6850
+ @if (showMenuButton()) {
6851
+ <p-button
6852
+ [styleClass]="cx('pcColumnFilterButton')"
6853
+ [pt]="ptm('pcColumnFilterButton')"
6854
+ [attr.aria-haspopup]="true"
6855
+ [ariaLabel]="filterMenuButtonAriaLabel"
6856
+ [attr.aria-controls]="overlayVisible() ? overlayId() : null"
6857
+ [attr.aria-expanded]="overlayVisible() ?? false"
6858
+ (click)="toggleMenu($event)"
6859
+ (keydown)="onToggleButtonKeyDown($event)"
6860
+ [buttonProps]="filterButtonProps()?.filter"
6861
+ #menuButton
6862
+ [unstyled]="unstyled()"
6863
+ >
6864
+ <ng-template #icon>
6865
+ <ng-container>
6866
+ @if (!filterIconTemplate() && !_filterIconTemplate() && !hasFilter) {
6867
+ <svg data-p-icon="filter" [pBind]="ptm('pcColumnFilterButton')['icon']" />
6868
+ }
6869
+ @if (!filterIconTemplate() && !_filterIconTemplate() && hasFilter) {
6870
+ <svg data-p-icon="filter-fill" [pBind]="ptm('pcColumnFilterButton')['icon']" />
6871
+ }
6872
+ @if (filterIconTemplate() || _filterIconTemplate()) {
6873
+ <span [pBind]="ptm('pcColumnFilterButton')['icon']" [attr.data-pc-section]="'columnfilterbuttonicon'">
6874
+ <ng-template *ngTemplateOutlet="filterIconTemplate() || _filterIconTemplate(); context: { hasFilter: hasFilter }"></ng-template>
6875
+ </span>
6876
+ }
6877
+ </ng-container>
6878
+ </ng-template>
6879
+ </p-button>
6880
+ }
6851
6881
  @if (renderOverlay()) {
6852
6882
  <div
6853
6883
  [pMotion]="showMenu() && overlayVisible()"
@@ -6865,88 +6895,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
6865
6895
  (keydown.escape)="onEscape()"
6866
6896
  >
6867
6897
  <ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate(); context: { $implicit: field() }"></ng-container>
6868
- <ul *ngIf="display() === 'row'; else menu" [class]="cx('filterConstraintList')" [pBind]="ptm('filterConstraintList')">
6869
- <li
6870
- *ngFor="let matchMode of matchModes(); let i = index"
6871
- (click)="onRowMatchModeChange(matchMode.value)"
6872
- (keydown)="onRowMatchModeKeyDown($event)"
6873
- (keydown.enter)="onRowMatchModeChange(matchMode.value)"
6874
- [class]="cx('filterConstraint')"
6875
- [pBind]="ptm('filterConstraint', ptmFilterConstraintOptions(matchMode))"
6876
- [class.p-datatable-filter-constraint-selected]="isRowMatchModeSelected(matchMode.value)"
6877
- [attr.tabindex]="i === 0 ? '0' : null"
6878
- >
6879
- {{ matchMode.label }}
6880
- </li>
6881
- <li [class]="cx('filterConstraintSeparator')" [pBind]="ptm('filterConstraintSeparator', { context: { index: i } })"></li>
6882
- <li [class]="cx('filterConstraint')" [pBind]="ptm('emtpyFilterLabel')" (click)="onRowClearItemClick()" (keydown)="onRowMatchModeKeyDown($event)" (keydown.enter)="onRowClearItemClick()">
6883
- {{ noFilterLabel }}
6884
- </li>
6885
- </ul>
6886
- <ng-template #menu>
6887
- <div [class]="cx('filterOperator')" [pBind]="ptm('filterOperator')" *ngIf="isShowOperator()">
6888
- <p-select
6889
- [options]="operatorOptions()"
6890
- [pt]="ptm('pcFilterOperatorDropdown')"
6891
- [ngModel]="_operator()"
6892
- [ngModelOptions]="{ standalone: true }"
6893
- (ngModelChange)="onOperatorChange($event)"
6894
- [class]="cx('pcFilterOperatorDropdown')"
6895
- [unstyled]="unstyled()"
6896
- ></p-select>
6897
- </div>
6898
- <div [class]="cx('filterRuleList')" [pBind]="ptm('filterRuleList')">
6899
- <div *ngFor="let fieldConstraint of fieldConstraints; let i = index" [ngClass]="cx('filterRule')" [pBind]="ptm('filterRule')">
6898
+ @if (display() === 'row') {
6899
+ <ul [class]="cx('filterConstraintList')" [pBind]="ptm('filterConstraintList')">
6900
+ @for (matchMode of matchModes(); track matchMode; let i = $index) {
6901
+ <li
6902
+ (click)="onRowMatchModeChange(matchMode.value)"
6903
+ (keydown)="onRowMatchModeKeyDown($event)"
6904
+ (keydown.enter)="onRowMatchModeChange(matchMode.value)"
6905
+ [class]="cx('filterConstraint')"
6906
+ [pBind]="ptm('filterConstraint', ptmFilterConstraintOptions(matchMode))"
6907
+ [class.p-datatable-filter-constraint-selected]="isRowMatchModeSelected(matchMode.value)"
6908
+ [attr.tabindex]="i === 0 ? '0' : null"
6909
+ >
6910
+ {{ matchMode.label }}
6911
+ </li>
6912
+ }
6913
+ <li [class]="cx('filterConstraintSeparator')" [pBind]="ptm('filterConstraintSeparator', { context: { index: i } })"></li>
6914
+ <li [class]="cx('filterConstraint')" [pBind]="ptm('emtpyFilterLabel')" (click)="onRowClearItemClick()" (keydown)="onRowMatchModeKeyDown($event)" (keydown.enter)="onRowClearItemClick()">
6915
+ {{ noFilterLabel }}
6916
+ </li>
6917
+ </ul>
6918
+ } @else {
6919
+ @if (isShowOperator()) {
6920
+ <div [class]="cx('filterOperator')" [pBind]="ptm('filterOperator')">
6900
6921
  <p-select
6901
- *ngIf="showMatchModes() && matchModes()"
6902
- [options]="matchModes()"
6903
- [ngModel]="fieldConstraint.matchMode"
6922
+ [options]="operatorOptions()"
6923
+ [pt]="ptm('pcFilterOperatorDropdown')"
6924
+ [ngModel]="_operator()"
6904
6925
  [ngModelOptions]="{ standalone: true }"
6905
- (ngModelChange)="onMenuMatchModeChange($event, fieldConstraint)"
6906
- [class]="cx('pcFilterConstraintDropdown')"
6907
- [pt]="ptm('pcFilterConstraintDropdown')"
6926
+ (ngModelChange)="onOperatorChange($event)"
6927
+ [class]="cx('pcFilterOperatorDropdown')"
6908
6928
  [unstyled]="unstyled()"
6909
6929
  ></p-select>
6910
- <p-columnFilterFormElement
6911
- [type]="type()"
6912
- [field]="field()"
6913
- [filterConstraint]="fieldConstraint"
6914
- [filterTemplate]="filterTemplate() || _filterTemplate()"
6915
- [placeholder]="placeholder()"
6916
- [minFractionDigits]="minFractionDigits()"
6917
- [maxFractionDigits]="maxFractionDigits()"
6918
- [prefix]="prefix()"
6919
- [suffix]="suffix()"
6920
- [locale]="locale()"
6921
- [localeMatcher]="localeMatcher()"
6922
- [currency]="currency()"
6923
- [currencyDisplay]="currencyDisplay()"
6924
- [useGrouping]="useGrouping()"
6925
- [filterOn]="filterOn()"
6926
- [pt]="pt()"
6927
- [unstyled]="unstyled()"
6928
- ></p-columnFilterFormElement>
6929
- <div>
6930
- <p-button
6931
- *ngIf="showRemoveIcon"
6932
- [styleClass]="cx('pcFilterRemoveRuleButton')"
6933
- [pt]="ptm('pcFilterRemoveRuleButton')"
6934
- [text]="true"
6935
- severity="danger"
6936
- size="small"
6937
- (onClick)="removeConstraint(fieldConstraint)"
6938
- [ariaLabel]="removeRuleButtonLabel"
6939
- [label]="removeRuleButtonLabel"
6940
- [buttonProps]="filterButtonProps()?.popover?.removeRule"
6930
+ </div>
6931
+ }
6932
+ <div [class]="cx('filterRuleList')" [pBind]="ptm('filterRuleList')">
6933
+ @for (fieldConstraint of fieldConstraints; track fieldConstraint; let i = $index) {
6934
+ <div [ngClass]="cx('filterRule')" [pBind]="ptm('filterRule')">
6935
+ @if (showMatchModes() && matchModes()) {
6936
+ <p-select
6937
+ [options]="matchModes()"
6938
+ [ngModel]="fieldConstraint.matchMode"
6939
+ [ngModelOptions]="{ standalone: true }"
6940
+ (ngModelChange)="onMenuMatchModeChange($event, fieldConstraint)"
6941
+ [class]="cx('pcFilterConstraintDropdown')"
6942
+ [pt]="ptm('pcFilterConstraintDropdown')"
6943
+ [unstyled]="unstyled()"
6944
+ ></p-select>
6945
+ }
6946
+ <p-columnFilterFormElement
6947
+ [type]="type()"
6948
+ [field]="field()"
6949
+ [filterConstraint]="fieldConstraint"
6950
+ [filterTemplate]="filterTemplate() || _filterTemplate()"
6951
+ [placeholder]="placeholder()"
6952
+ [minFractionDigits]="minFractionDigits()"
6953
+ [maxFractionDigits]="maxFractionDigits()"
6954
+ [prefix]="prefix()"
6955
+ [suffix]="suffix()"
6956
+ [locale]="locale()"
6957
+ [localeMatcher]="localeMatcher()"
6958
+ [currency]="currency()"
6959
+ [currencyDisplay]="currencyDisplay()"
6960
+ [useGrouping]="useGrouping()"
6961
+ [filterOn]="filterOn()"
6962
+ [pt]="pt()"
6941
6963
  [unstyled]="unstyled()"
6942
- >
6943
- <ng-template #icon>
6944
- <svg data-p-icon="trash" *ngIf="!removeRuleIconTemplate() && !_removeRuleIconTemplate()" [pBind]="ptm('pcFilterRemoveRuleButton')['icon']" />
6945
- <ng-template *ngTemplateOutlet="removeRuleIconTemplate() || _removeRuleIconTemplate()"></ng-template>
6946
- </ng-template>
6947
- </p-button>
6964
+ ></p-columnFilterFormElement>
6965
+ <div>
6966
+ @if (showRemoveIcon) {
6967
+ <p-button
6968
+ [styleClass]="cx('pcFilterRemoveRuleButton')"
6969
+ [pt]="ptm('pcFilterRemoveRuleButton')"
6970
+ [text]="true"
6971
+ severity="danger"
6972
+ size="small"
6973
+ (onClick)="removeConstraint(fieldConstraint)"
6974
+ [ariaLabel]="removeRuleButtonLabel"
6975
+ [label]="removeRuleButtonLabel"
6976
+ [buttonProps]="filterButtonProps()?.popover?.removeRule"
6977
+ [unstyled]="unstyled()"
6978
+ >
6979
+ <ng-template #icon>
6980
+ @if (!removeRuleIconTemplate() && !_removeRuleIconTemplate()) {
6981
+ <svg data-p-icon="trash" [pBind]="ptm('pcFilterRemoveRuleButton')['icon']" />
6982
+ }
6983
+ <ng-template *ngTemplateOutlet="removeRuleIconTemplate() || _removeRuleIconTemplate()"></ng-template>
6984
+ </ng-template>
6985
+ </p-button>
6986
+ }
6987
+ </div>
6948
6988
  </div>
6949
- </div>
6989
+ }
6950
6990
  </div>
6951
6991
  @if (isShowAddConstraint) {
6952
6992
  <p-button
@@ -6962,35 +7002,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
6962
7002
  [unstyled]="unstyled()"
6963
7003
  >
6964
7004
  <ng-template #icon>
6965
- <svg data-p-icon="plus" *ngIf="!addRuleIconTemplate() && !_addRuleIconTemplate()" [pBind]="ptm('pcAddRuleButtonLabel')['icon']" />
7005
+ @if (!addRuleIconTemplate() && !_addRuleIconTemplate()) {
7006
+ <svg data-p-icon="plus" [pBind]="ptm('pcAddRuleButtonLabel')['icon']" />
7007
+ }
6966
7008
  <ng-template *ngTemplateOutlet="addRuleIconTemplate() || _addRuleIconTemplate()"></ng-template>
6967
7009
  </ng-template>
6968
7010
  </p-button>
6969
7011
  }
6970
7012
  <div [class]="cx('filterButtonbar')" [pBind]="ptm('filterButtonBar')">
6971
- <p-button
6972
- #clearBtn
6973
- *ngIf="showClearButton()"
6974
- [outlined]="true"
6975
- (onClick)="clearFilter()"
6976
- [attr.aria-label]="clearButtonLabel"
6977
- [label]="clearButtonLabel"
6978
- [buttonProps]="filterButtonProps()?.popover?.clear"
6979
- [pt]="ptm('pcFilterClearButton')"
6980
- [unstyled]="unstyled()"
6981
- />
6982
- <p-button
6983
- *ngIf="showApplyButton()"
6984
- (onClick)="applyFilter()"
6985
- size="small"
6986
- [label]="applyButtonLabel"
6987
- [attr.aria-label]="applyButtonLabel"
6988
- [buttonProps]="filterButtonProps()?.popover?.apply"
6989
- [pt]="ptm('pcFilterApplyButton')"
6990
- [unstyled]="unstyled()"
6991
- />
7013
+ @if (showClearButton()) {
7014
+ <p-button
7015
+ #clearBtn
7016
+ [outlined]="true"
7017
+ (onClick)="clearFilter()"
7018
+ [attr.aria-label]="clearButtonLabel"
7019
+ [label]="clearButtonLabel"
7020
+ [buttonProps]="filterButtonProps()?.popover?.clear"
7021
+ [pt]="ptm('pcFilterClearButton')"
7022
+ [unstyled]="unstyled()"
7023
+ />
7024
+ }
7025
+ @if (showApplyButton()) {
7026
+ <p-button
7027
+ (onClick)="applyFilter()"
7028
+ size="small"
7029
+ [label]="applyButtonLabel"
7030
+ [attr.aria-label]="applyButtonLabel"
7031
+ [buttonProps]="filterButtonProps()?.popover?.apply"
7032
+ [pt]="ptm('pcFilterApplyButton')"
7033
+ [unstyled]="unstyled()"
7034
+ />
7035
+ }
6992
7036
  </div>
6993
- </ng-template>
7037
+ }
6994
7038
  <ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate(); context: { $implicit: field() }"></ng-container>
6995
7039
  </div>
6996
7040
  }