@exhaustive-ui/core 22.0.0-alpha.10 → 22.0.0-alpha.12

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 (122) hide show
  1. package/fesm2022/exhaustive-ui-core-autocomplete.mjs +5 -5
  2. package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
  3. package/fesm2022/exhaustive-ui-core-basecomponent.mjs +6 -1
  4. package/fesm2022/exhaustive-ui-core-basecomponent.mjs.map +1 -1
  5. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +11 -4
  6. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
  7. package/fesm2022/exhaustive-ui-core-card.mjs +0 -4
  8. package/fesm2022/exhaustive-ui-core-card.mjs.map +1 -1
  9. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +5 -5
  10. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
  11. package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
  12. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +11 -9
  13. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
  14. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +18 -1
  15. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
  16. package/fesm2022/exhaustive-ui-core-contextmenu.mjs +6 -4
  17. package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
  18. package/fesm2022/exhaustive-ui-core-datepicker.mjs +42 -7
  19. package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
  20. package/fesm2022/exhaustive-ui-core-dialog.mjs +2 -1
  21. package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
  22. package/fesm2022/exhaustive-ui-core-drawer.mjs +11 -2
  23. package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
  24. package/fesm2022/exhaustive-ui-core-fieldset.mjs +2 -2
  25. package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
  26. package/fesm2022/exhaustive-ui-core-fileupload.mjs +22 -11
  27. package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
  28. package/fesm2022/exhaustive-ui-core-iconfield.mjs +16 -1
  29. package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
  30. package/fesm2022/exhaustive-ui-core-inputgroup.mjs +9 -0
  31. package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
  32. package/fesm2022/exhaustive-ui-core-inputnumber.mjs +54 -21
  33. package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
  34. package/fesm2022/exhaustive-ui-core-inputtext.mjs +6 -5
  35. package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
  36. package/fesm2022/exhaustive-ui-core-listbox.mjs +4 -2
  37. package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
  38. package/fesm2022/exhaustive-ui-core-megamenu.mjs +1 -0
  39. package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
  40. package/fesm2022/exhaustive-ui-core-menu.mjs +2 -2
  41. package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
  42. package/fesm2022/exhaustive-ui-core-metergroup.mjs +5 -5
  43. package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
  44. package/fesm2022/exhaustive-ui-core-multiselect.mjs +25 -14
  45. package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
  46. package/fesm2022/exhaustive-ui-core-orderlist.mjs +9 -2
  47. package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
  48. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +2 -2
  49. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
  50. package/fesm2022/exhaustive-ui-core-paginator.mjs +4 -1
  51. package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
  52. package/fesm2022/exhaustive-ui-core-panelmenu.mjs +7 -1
  53. package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
  54. package/fesm2022/exhaustive-ui-core-password.mjs +34 -14
  55. package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
  56. package/fesm2022/exhaustive-ui-core-picklist.mjs +4 -4
  57. package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
  58. package/fesm2022/exhaustive-ui-core-popover.mjs +26 -7
  59. package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
  60. package/fesm2022/exhaustive-ui-core-select.mjs +20 -14
  61. package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
  62. package/fesm2022/exhaustive-ui-core-selectbutton.mjs +10 -6
  63. package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
  64. package/fesm2022/exhaustive-ui-core-slider.mjs +7 -3
  65. package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
  66. package/fesm2022/exhaustive-ui-core-splitter.mjs +5 -0
  67. package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
  68. package/fesm2022/exhaustive-ui-core-stepper.mjs +3 -0
  69. package/fesm2022/exhaustive-ui-core-stepper.mjs.map +1 -1
  70. package/fesm2022/exhaustive-ui-core-table.mjs +97 -65
  71. package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
  72. package/fesm2022/exhaustive-ui-core-tabs.mjs +37 -7
  73. package/fesm2022/exhaustive-ui-core-tabs.mjs.map +1 -1
  74. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +2 -1
  75. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
  76. package/fesm2022/exhaustive-ui-core-toast.mjs +12 -1
  77. package/fesm2022/exhaustive-ui-core-toast.mjs.map +1 -1
  78. package/fesm2022/exhaustive-ui-core-togglebutton.mjs +9 -2
  79. package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
  80. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +0 -2
  81. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
  82. package/fesm2022/exhaustive-ui-core-tree.mjs +4 -4
  83. package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
  84. package/fesm2022/exhaustive-ui-core-treeselect.mjs +15 -3
  85. package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
  86. package/fesm2022/exhaustive-ui-core-treetable.mjs +4 -0
  87. package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
  88. package/package.json +5 -5
  89. package/schematics/migrate-from-primeflex/index.js +4 -2
  90. package/schematics/migrate-from-primeflex/schema.json +5 -0
  91. package/schematics/utils/package-json.js +17 -0
  92. package/schematics/utils/primeflex.js +45 -10
  93. package/schematics/utils/versions.json +8 -8
  94. package/types/exhaustive-ui-core-api.d.ts +4 -0
  95. package/types/exhaustive-ui-core-basecomponent.d.ts +1 -0
  96. package/types/exhaustive-ui-core-breadcrumb.d.ts +7 -1
  97. package/types/exhaustive-ui-core-cascadeselect.d.ts +1 -1
  98. package/types/exhaustive-ui-core-chart.d.ts +2 -2
  99. package/types/exhaustive-ui-core-confirmdialog.d.ts +3 -2
  100. package/types/exhaustive-ui-core-confirmpopup.d.ts +4 -0
  101. package/types/exhaustive-ui-core-datepicker.d.ts +2 -1
  102. package/types/exhaustive-ui-core-drawer.d.ts +1 -0
  103. package/types/exhaustive-ui-core-fileupload.d.ts +4 -0
  104. package/types/exhaustive-ui-core-iconfield.d.ts +1 -2
  105. package/types/exhaustive-ui-core-inputnumber.d.ts +8 -0
  106. package/types/exhaustive-ui-core-megamenu.d.ts +1 -0
  107. package/types/exhaustive-ui-core-metergroup.d.ts +1 -1
  108. package/types/exhaustive-ui-core-orderlist.d.ts +6 -1
  109. package/types/exhaustive-ui-core-password.d.ts +7 -1
  110. package/types/exhaustive-ui-core-popover.d.ts +3 -0
  111. package/types/exhaustive-ui-core-select.d.ts +1 -0
  112. package/types/exhaustive-ui-core-selectbutton.d.ts +3 -0
  113. package/types/exhaustive-ui-core-splitter.d.ts +1 -0
  114. package/types/exhaustive-ui-core-stepper.d.ts +3 -2
  115. package/types/exhaustive-ui-core-table.d.ts +8 -1
  116. package/types/exhaustive-ui-core-tabs.d.ts +3 -0
  117. package/types/exhaustive-ui-core-togglebutton.d.ts +1 -0
  118. package/types/exhaustive-ui-core-treeselect.d.ts +6 -1
  119. package/types/exhaustive-ui-core-types-chart.d.ts +21 -1
  120. package/types/exhaustive-ui-core-types-confirmdialog.d.ts +1 -3
  121. package/types/exhaustive-ui-core-types-table.d.ts +1 -1
  122. package/types/exhaustive-ui-core-types-treetable.d.ts +2 -2
@@ -265,7 +265,9 @@ const classes = {
265
265
  'p-datatable-row-selected': instance.selected()
266
266
  }),
267
267
  resizableColumn: 'p-datatable-resizable-column',
268
- reorderableColumn: 'p-datatable-reorderable-column',
268
+ reorderableColumn: ({ instance }) => ({
269
+ 'p-datatable-reorderable-column': instance.isEnabled()
270
+ }),
269
271
  rowEditorCancel: 'p-datatable-row-editor-cancel',
270
272
  frozenColumn: ({ instance }) => ({
271
273
  'p-datatable-frozen-column': instance.frozen(),
@@ -1488,13 +1490,19 @@ class Table extends BaseComponent {
1488
1490
  }
1489
1491
  });
1490
1492
  });
1493
+ let selectionInitialized = false;
1491
1494
  effect(() => {
1492
1495
  this.selection();
1493
1496
  untracked(() => {
1494
1497
  if (!this.preventSelectionSetterPropagation()) {
1495
1498
  this.updateSelectionKeys();
1496
1499
  this.tableService.onSelectionChange();
1500
+ // a selection set from outside is saved like one made by clicking a row
1501
+ if (selectionInitialized && this.isStateful()) {
1502
+ this.saveState();
1503
+ }
1497
1504
  }
1505
+ selectionInitialized = true;
1498
1506
  this.preventSelectionSetterPropagation.set(false);
1499
1507
  });
1500
1508
  });
@@ -2740,6 +2748,16 @@ class Table extends BaseComponent {
2740
2748
  this.dropPosition.set(null);
2741
2749
  }
2742
2750
  }
2751
+ onColumnDragEnd() {
2752
+ // a drop outside a header fires no drop event: clear the drag state here
2753
+ if (this.draggedColumn()) {
2754
+ this.reorderIndicatorUpViewChild().nativeElement.style.display = 'none';
2755
+ this.reorderIndicatorDownViewChild().nativeElement.style.display = 'none';
2756
+ this.draggedColumn().draggable = false;
2757
+ this.draggedColumn.set(null);
2758
+ this.dropPosition.set(null);
2759
+ }
2760
+ }
2743
2761
  resizeTableCells(newColumnWidth, nextColumnWidth) {
2744
2762
  let colIndex = DomHandler.index(this.resizeColumnElement());
2745
2763
  let width = this.columnResizeMode() === 'expand' ? this._initialColWidths() : this._totalTableWidth();
@@ -2760,7 +2778,7 @@ class Table extends BaseComponent {
2760
2778
  }
2761
2779
  `;
2762
2780
  });
2763
- this.renderer.setProperty(this.styleElement(), 'innerHTML', innerHTML);
2781
+ this.renderer.setProperty(this.styleElement(), 'textContent', innerHTML);
2764
2782
  }
2765
2783
  onRowDragStart(event, index) {
2766
2784
  this.rowDragging.set(true);
@@ -2970,7 +2988,7 @@ class Table extends BaseComponent {
2970
2988
  }
2971
2989
  `;
2972
2990
  });
2973
- this.styleElement().innerHTML = innerHTML;
2991
+ this.styleElement().textContent = innerHTML;
2974
2992
  }
2975
2993
  }
2976
2994
  }
@@ -3061,7 +3079,7 @@ class Table extends BaseComponent {
3061
3079
  }
3062
3080
  }
3063
3081
  `;
3064
- this.renderer.setProperty(this.responsiveStyleElement(), 'innerHTML', innerHTML);
3082
+ this.renderer.setProperty(this.responsiveStyleElement(), 'textContent', innerHTML);
3065
3083
  DomHandler.setAttribute(this.responsiveStyleElement(), 'nonce', this.config?.csp()?.nonce);
3066
3084
  }
3067
3085
  }
@@ -3938,7 +3956,7 @@ class TableBody extends BaseComponent {
3938
3956
  @if (dataTable.loading()) {
3939
3957
  <ng-container *ngTemplateOutlet="dataTable.loadingBodyTemplate() || dataTable._loadingBodyTemplate(); context: { $implicit: columns(), frozen: frozen() }"></ng-container>
3940
3958
  }
3941
- @if (dataTable.isEmpty() && !dataTable.loading()) {
3959
+ @if (dataTable.isEmpty() && !dataTable.loading() && !frozenRows()) {
3942
3960
  <ng-container *ngTemplateOutlet="dataTable.emptyMessageTemplate() || dataTable._emptyMessageTemplate(); context: { $implicit: columns(), frozen: frozen() }"></ng-container>
3943
3961
  }
3944
3962
  `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.Eager, encapsulation: i0.ViewEncapsulation.None });
@@ -4114,7 +4132,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
4114
4132
  @if (dataTable.loading()) {
4115
4133
  <ng-container *ngTemplateOutlet="dataTable.loadingBodyTemplate() || dataTable._loadingBodyTemplate(); context: { $implicit: columns(), frozen: frozen() }"></ng-container>
4116
4134
  }
4117
- @if (dataTable.isEmpty() && !dataTable.loading()) {
4135
+ @if (dataTable.isEmpty() && !dataTable.loading() && !frozenRows()) {
4118
4136
  <ng-container *ngTemplateOutlet="dataTable.emptyMessageTemplate() || dataTable._emptyMessageTemplate(); context: { $implicit: columns(), frozen: frozen() }"></ng-container>
4119
4137
  }
4120
4138
  `,
@@ -4965,6 +4983,8 @@ class ReorderableColumn extends BaseComponent {
4965
4983
  ...(ngDevMode ? [{ debugName: "dragEnterListener" }] : /* istanbul ignore next */ []));
4966
4984
  dragLeaveListener = signal(undefined, /* @ts-ignore */
4967
4985
  ...(ngDevMode ? [{ debugName: "dragLeaveListener" }] : /* istanbul ignore next */ []));
4986
+ dragEndListener = signal(undefined, /* @ts-ignore */
4987
+ ...(ngDevMode ? [{ debugName: "dragEndListener" }] : /* istanbul ignore next */ []));
4968
4988
  mouseDownListener = signal(undefined, /* @ts-ignore */
4969
4989
  ...(ngDevMode ? [{ debugName: "mouseDownListener" }] : /* istanbul ignore next */ []));
4970
4990
  _componentStyle = inject(TableStyle);
@@ -4984,6 +5004,7 @@ class ReorderableColumn extends BaseComponent {
4984
5004
  this.dragOverListener.set(this.renderer.listen(this.el.nativeElement, 'dragover', this.onDragOver.bind(this)));
4985
5005
  this.dragEnterListener.set(this.renderer.listen(this.el.nativeElement, 'dragenter', this.onDragEnter.bind(this)));
4986
5006
  this.dragLeaveListener.set(this.renderer.listen(this.el.nativeElement, 'dragleave', this.onDragLeave.bind(this)));
5007
+ this.dragEndListener.set(this.renderer.listen(this.el.nativeElement, 'dragend', this.onDragEnd.bind(this)));
4987
5008
  });
4988
5009
  }
4989
5010
  }
@@ -5008,6 +5029,10 @@ class ReorderableColumn extends BaseComponent {
5008
5029
  this.dragLeaveListener()();
5009
5030
  this.dragLeaveListener.set(null);
5010
5031
  }
5032
+ if (this.dragEndListener()) {
5033
+ this.dragEndListener()();
5034
+ this.dragEndListener.set(null);
5035
+ }
5011
5036
  }
5012
5037
  onMouseDown(event) {
5013
5038
  if (event.target.nodeName === 'INPUT' || event.target.nodeName === 'TEXTAREA' || event.target.closest?.('[data-pc-column-resizer="true"]'))
@@ -5027,6 +5052,9 @@ class ReorderableColumn extends BaseComponent {
5027
5052
  onDragLeave(event) {
5028
5053
  this.dataTable.onColumnDragLeave(event);
5029
5054
  }
5055
+ onDragEnd() {
5056
+ this.dataTable.onColumnDragEnd();
5057
+ }
5030
5058
  onDrop(event) {
5031
5059
  if (this.isEnabled()) {
5032
5060
  this.dataTable.onColumnDrop(event, this.el.nativeElement);
@@ -6610,7 +6638,7 @@ class ColumnFilter extends BaseComponent {
6610
6638
  let fieldFilter = this.dataTable._filters()[this.field()];
6611
6639
  if (fieldFilter) {
6612
6640
  if (Array.isArray(fieldFilter))
6613
- return !this.dataTable.isFilterBlank(fieldFilter[0].value);
6641
+ return fieldFilter.some((meta) => !this.dataTable.isFilterBlank(meta.value));
6614
6642
  else
6615
6643
  return !this.dataTable.isFilterBlank(fieldFilter.value);
6616
6644
  }
@@ -6865,8 +6893,8 @@ class ColumnFilter extends BaseComponent {
6865
6893
  [pt]="pt()"
6866
6894
  [unstyled]="unstyled()"
6867
6895
  ></p-columnFilterFormElement>
6868
- <div>
6869
- @if (showRemoveIcon) {
6896
+ @if (showRemoveIcon) {
6897
+ <div>
6870
6898
  <p-button
6871
6899
  [styleClass]="cx('pcFilterRemoveRuleButton')"
6872
6900
  [pt]="ptm('pcFilterRemoveRuleButton')"
@@ -6886,8 +6914,8 @@ class ColumnFilter extends BaseComponent {
6886
6914
  <ng-template *ngTemplateOutlet="removeRuleIconTemplate() || _removeRuleIconTemplate()"></ng-template>
6887
6915
  </ng-template>
6888
6916
  </p-button>
6889
- }
6890
- </div>
6917
+ </div>
6918
+ }
6891
6919
  </div>
6892
6920
  }
6893
6921
  </div>
@@ -6912,31 +6940,33 @@ class ColumnFilter extends BaseComponent {
6912
6940
  </ng-template>
6913
6941
  </p-button>
6914
6942
  }
6915
- <div [class]="cx('filterButtonbar')" [pBind]="ptm('filterButtonBar')">
6916
- @if (showClearButton()) {
6917
- <p-button
6918
- #clearBtn
6919
- [outlined]="true"
6920
- (onClick)="clearFilter()"
6921
- [attr.aria-label]="clearButtonLabel"
6922
- [label]="clearButtonLabel"
6923
- [buttonProps]="filterButtonProps()?.popover?.clear"
6924
- [pt]="ptm('pcFilterClearButton')"
6925
- [unstyled]="unstyled()"
6926
- />
6927
- }
6928
- @if (showApplyButton()) {
6929
- <p-button
6930
- (onClick)="applyFilter()"
6931
- size="small"
6932
- [label]="applyButtonLabel"
6933
- [attr.aria-label]="applyButtonLabel"
6934
- [buttonProps]="filterButtonProps()?.popover?.apply"
6935
- [pt]="ptm('pcFilterApplyButton')"
6936
- [unstyled]="unstyled()"
6937
- />
6938
- }
6939
- </div>
6943
+ @if (showClearButton() || showApplyButton()) {
6944
+ <div [class]="cx('filterButtonbar')" [pBind]="ptm('filterButtonBar')">
6945
+ @if (showClearButton()) {
6946
+ <p-button
6947
+ #clearBtn
6948
+ [outlined]="filterButtonProps()?.popover?.clear?.outlined ?? true"
6949
+ (onClick)="clearFilter()"
6950
+ [attr.aria-label]="clearButtonLabel"
6951
+ [label]="clearButtonLabel"
6952
+ [buttonProps]="filterButtonProps()?.popover?.clear"
6953
+ [pt]="ptm('pcFilterClearButton')"
6954
+ [unstyled]="unstyled()"
6955
+ />
6956
+ }
6957
+ @if (showApplyButton()) {
6958
+ <p-button
6959
+ (onClick)="applyFilter()"
6960
+ size="small"
6961
+ [label]="applyButtonLabel"
6962
+ [attr.aria-label]="applyButtonLabel"
6963
+ [buttonProps]="filterButtonProps()?.popover?.apply"
6964
+ [pt]="ptm('pcFilterApplyButton')"
6965
+ [unstyled]="unstyled()"
6966
+ />
6967
+ }
6968
+ </div>
6969
+ }
6940
6970
  }
6941
6971
  <ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate(); context: { $implicit: field() }"></ng-container>
6942
6972
  </div>
@@ -7097,8 +7127,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
7097
7127
  [pt]="pt()"
7098
7128
  [unstyled]="unstyled()"
7099
7129
  ></p-columnFilterFormElement>
7100
- <div>
7101
- @if (showRemoveIcon) {
7130
+ @if (showRemoveIcon) {
7131
+ <div>
7102
7132
  <p-button
7103
7133
  [styleClass]="cx('pcFilterRemoveRuleButton')"
7104
7134
  [pt]="ptm('pcFilterRemoveRuleButton')"
@@ -7118,8 +7148,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
7118
7148
  <ng-template *ngTemplateOutlet="removeRuleIconTemplate() || _removeRuleIconTemplate()"></ng-template>
7119
7149
  </ng-template>
7120
7150
  </p-button>
7121
- }
7122
- </div>
7151
+ </div>
7152
+ }
7123
7153
  </div>
7124
7154
  }
7125
7155
  </div>
@@ -7144,31 +7174,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
7144
7174
  </ng-template>
7145
7175
  </p-button>
7146
7176
  }
7147
- <div [class]="cx('filterButtonbar')" [pBind]="ptm('filterButtonBar')">
7148
- @if (showClearButton()) {
7149
- <p-button
7150
- #clearBtn
7151
- [outlined]="true"
7152
- (onClick)="clearFilter()"
7153
- [attr.aria-label]="clearButtonLabel"
7154
- [label]="clearButtonLabel"
7155
- [buttonProps]="filterButtonProps()?.popover?.clear"
7156
- [pt]="ptm('pcFilterClearButton')"
7157
- [unstyled]="unstyled()"
7158
- />
7159
- }
7160
- @if (showApplyButton()) {
7161
- <p-button
7162
- (onClick)="applyFilter()"
7163
- size="small"
7164
- [label]="applyButtonLabel"
7165
- [attr.aria-label]="applyButtonLabel"
7166
- [buttonProps]="filterButtonProps()?.popover?.apply"
7167
- [pt]="ptm('pcFilterApplyButton')"
7168
- [unstyled]="unstyled()"
7169
- />
7170
- }
7171
- </div>
7177
+ @if (showClearButton() || showApplyButton()) {
7178
+ <div [class]="cx('filterButtonbar')" [pBind]="ptm('filterButtonBar')">
7179
+ @if (showClearButton()) {
7180
+ <p-button
7181
+ #clearBtn
7182
+ [outlined]="filterButtonProps()?.popover?.clear?.outlined ?? true"
7183
+ (onClick)="clearFilter()"
7184
+ [attr.aria-label]="clearButtonLabel"
7185
+ [label]="clearButtonLabel"
7186
+ [buttonProps]="filterButtonProps()?.popover?.clear"
7187
+ [pt]="ptm('pcFilterClearButton')"
7188
+ [unstyled]="unstyled()"
7189
+ />
7190
+ }
7191
+ @if (showApplyButton()) {
7192
+ <p-button
7193
+ (onClick)="applyFilter()"
7194
+ size="small"
7195
+ [label]="applyButtonLabel"
7196
+ [attr.aria-label]="applyButtonLabel"
7197
+ [buttonProps]="filterButtonProps()?.popover?.apply"
7198
+ [pt]="ptm('pcFilterApplyButton')"
7199
+ [unstyled]="unstyled()"
7200
+ />
7201
+ }
7202
+ </div>
7203
+ }
7172
7204
  }
7173
7205
  <ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate(); context: { $implicit: field() }"></ng-container>
7174
7206
  </div>