@mintplayer/ng-bootstrap 22.18.0 → 22.20.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 (133) hide show
  1. package/_bootstrap.scss +10 -0
  2. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +3 -0
  3. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  4. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +6 -3
  5. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
  6. package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs +9 -11
  7. package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs.map +1 -1
  8. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +2 -4
  9. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
  10. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +3 -1
  11. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  12. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +36 -56
  13. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
  14. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +10 -18
  15. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +13 -24
  17. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
  18. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +6 -15
  19. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
  20. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +5 -7
  21. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
  22. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +17 -6
  23. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +47 -50
  25. package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-bootstrap-copy.mjs +8 -5
  27. package/fesm2022/mintplayer-ng-bootstrap-copy.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +265 -62
  29. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +2 -4
  31. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +2 -4
  33. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +4 -2
  35. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +21 -7
  37. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs +19 -14
  39. package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-bootstrap-enum.mjs +15 -12
  41. package/fesm2022/mintplayer-ng-bootstrap-enum.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +3 -3
  43. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
  44. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +16 -6
  45. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
  46. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +21 -4
  47. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
  48. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +26 -10
  49. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
  50. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +4 -1
  51. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
  52. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +2 -4
  53. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  54. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +8 -11
  55. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
  56. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +73 -67
  57. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
  58. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +4 -16
  59. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
  60. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +11 -22
  61. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
  62. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +2 -4
  63. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  64. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +188 -249
  65. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
  66. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +64 -146
  67. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  68. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +37 -30
  69. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
  70. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +9 -25
  71. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  72. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +2 -4
  73. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  74. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +3 -0
  75. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
  76. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +6 -6
  77. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  78. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +150 -83
  79. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
  80. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +3 -0
  81. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
  82. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +46 -44
  83. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
  84. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +2 -4
  85. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
  86. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +63 -89
  87. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
  88. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +6 -14
  89. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
  90. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +25 -56
  91. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
  92. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +1 -0
  93. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  94. package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs +47 -58
  95. package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs.map +1 -1
  96. package/package.json +2 -2
  97. package/types/mintplayer-ng-bootstrap-alert.d.ts +3 -1
  98. package/types/mintplayer-ng-bootstrap-button-type.d.ts +6 -6
  99. package/types/mintplayer-ng-bootstrap-calendar.d.ts +1 -1
  100. package/types/mintplayer-ng-bootstrap-carousel.d.ts +0 -1
  101. package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +1 -1
  102. package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +1 -1
  103. package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +1 -1
  104. package/types/mintplayer-ng-bootstrap-color-picker.d.ts +9 -3
  105. package/types/mintplayer-ng-bootstrap-context-menu.d.ts +8 -10
  106. package/types/mintplayer-ng-bootstrap-copy.d.ts +3 -1
  107. package/types/mintplayer-ng-bootstrap-datatable.d.ts +155 -11
  108. package/types/mintplayer-ng-bootstrap-datepicker.d.ts +1 -1
  109. package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +1 -1
  110. package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +3 -1
  111. package/types/mintplayer-ng-bootstrap-dropdown.d.ts +3 -0
  112. package/types/mintplayer-ng-bootstrap-enhanced-paste.d.ts +6 -1
  113. package/types/mintplayer-ng-bootstrap-enum.d.ts +17 -4
  114. package/types/mintplayer-ng-bootstrap-file-manager.d.ts +2 -3
  115. package/types/mintplayer-ng-bootstrap-file-upload.d.ts +7 -1
  116. package/types/mintplayer-ng-bootstrap-modal.d.ts +9 -1
  117. package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +10 -1
  118. package/types/mintplayer-ng-bootstrap-otp-input.d.ts +1 -1
  119. package/types/mintplayer-ng-bootstrap-pagination.d.ts +1 -1
  120. package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +1 -1
  121. package/types/mintplayer-ng-bootstrap-query-builder.d.ts +2 -3
  122. package/types/mintplayer-ng-bootstrap-resizable.d.ts +65 -31
  123. package/types/mintplayer-ng-bootstrap-scheduler.d.ts +27 -21
  124. package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +18 -2
  125. package/types/mintplayer-ng-bootstrap-select.d.ts +1 -1
  126. package/types/mintplayer-ng-bootstrap-tab-control.d.ts +2 -2
  127. package/types/mintplayer-ng-bootstrap-theming.d.ts +86 -54
  128. package/types/mintplayer-ng-bootstrap-timeline.d.ts +27 -5
  129. package/types/mintplayer-ng-bootstrap-timepicker.d.ts +1 -1
  130. package/types/mintplayer-ng-bootstrap-tooltip.d.ts +18 -17
  131. package/types/mintplayer-ng-bootstrap-tree-select.d.ts +3 -4
  132. package/types/mintplayer-ng-bootstrap-treeview.d.ts +4 -4
  133. package/types/mintplayer-ng-bootstrap-user-agent.d.ts +13 -4
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, TemplateRef, input, Directive, PLATFORM_ID, ViewContainerRef, DestroyRef, model, output, viewChild, contentChildren, contentChild, computed, effect, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
2
+ import { inject, TemplateRef, input, Directive, PLATFORM_ID, ViewContainerRef, DestroyRef, model, output, viewChild, contentChildren, contentChild, computed, signal, effect, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
3
3
  import { isPlatformServer } from '@angular/common';
4
4
  export { computeNextSort } from '@mintplayer/web-components/datatable';
5
5
  import { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';
@@ -63,14 +63,37 @@ class BsDatatableColumnDirective {
63
63
  /** Data property name on each row; used as `SortColumn.property` on sort. */
64
64
  this.name = input('', { ...(ngDevMode ? { debugName: "name" } : /* istanbul ignore next */ {}), alias: 'bsDatatableColumn' });
65
65
  this.sortable = input(true, { ...(ngDevMode ? { debugName: "sortable" } : /* istanbul ignore next */ {}), alias: 'bsDatatableColumnSortable' });
66
+ /** Opt this column into the filter row. Default `false`, unlike `sortable`. */
67
+ this.filterable = input(false, { ...(ngDevMode ? { debugName: "filterable" } : /* istanbul ignore next */ {}), alias: 'bsDatatableColumnFilterable' });
68
+ /**
69
+ * Purely visual: marks this column's trigger as "filtered". The component
70
+ * attaches no meaning to it — the consumer decides when it is true, because
71
+ * the component never filters the data itself.
72
+ */
73
+ this.filterActive = input(false, { ...(ngDevMode ? { debugName: "filterActive" } : /* istanbul ignore next */ {}), alias: 'bsDatatableColumnFilterActive' });
74
+ /** Short description of the active filter, shown on the trigger and in its name. */
75
+ this.filterSummary = input(undefined, { ...(ngDevMode ? { debugName: "filterSummary" } : /* istanbul ignore next */ {}), alias: 'bsDatatableColumnFilterSummary' });
76
+ /** Initial or externally restored selection for this column's panel. */
77
+ this.filterSelection = input(undefined, { ...(ngDevMode ? { debugName: "filterSelection" } : /* istanbul ignore next */ {}), alias: 'bsDatatableColumnFilterSelection' });
78
+ /**
79
+ * `'values'` (default) lists the column's distinct values as checkboxes;
80
+ * `'comparison'` offers an operator and one operand — the right shape for a
81
+ * quantity, where ticking forty individual years is a poor way to say
82
+ * "after 1990".
83
+ */
84
+ this.filterMode = input('values', { ...(ngDevMode ? { debugName: "filterMode" } : /* istanbul ignore next */ {}), alias: 'bsDatatableColumnFilterMode' });
85
+ /** `type` of the operand input in comparison mode. Default `'number'`. */
86
+ this.filterInputType = input(undefined, { ...(ngDevMode ? { debugName: "filterInputType" } : /* istanbul ignore next */ {}), alias: 'bsDatatableColumnFilterInputType' });
87
+ /** Operators offered in comparison mode, in order. Defaults to all six. */
88
+ this.filterOperators = input(undefined, { ...(ngDevMode ? { debugName: "filterOperators" } : /* istanbul ignore next */ {}), alias: 'bsDatatableColumnFilterOperators' });
66
89
  }
67
90
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsDatatableColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
68
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: BsDatatableColumnDirective, isStandalone: true, selector: "[bsDatatableColumn]", inputs: { name: { classPropertyName: "name", publicName: "bsDatatableColumn", isSignal: true, isRequired: false, transformFunction: null }, sortable: { classPropertyName: "sortable", publicName: "bsDatatableColumnSortable", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
91
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: BsDatatableColumnDirective, isStandalone: true, selector: "[bsDatatableColumn]", inputs: { name: { classPropertyName: "name", publicName: "bsDatatableColumn", isSignal: true, isRequired: false, transformFunction: null }, sortable: { classPropertyName: "sortable", publicName: "bsDatatableColumnSortable", isSignal: true, isRequired: false, transformFunction: null }, filterable: { classPropertyName: "filterable", publicName: "bsDatatableColumnFilterable", isSignal: true, isRequired: false, transformFunction: null }, filterActive: { classPropertyName: "filterActive", publicName: "bsDatatableColumnFilterActive", isSignal: true, isRequired: false, transformFunction: null }, filterSummary: { classPropertyName: "filterSummary", publicName: "bsDatatableColumnFilterSummary", isSignal: true, isRequired: false, transformFunction: null }, filterSelection: { classPropertyName: "filterSelection", publicName: "bsDatatableColumnFilterSelection", isSignal: true, isRequired: false, transformFunction: null }, filterMode: { classPropertyName: "filterMode", publicName: "bsDatatableColumnFilterMode", isSignal: true, isRequired: false, transformFunction: null }, filterInputType: { classPropertyName: "filterInputType", publicName: "bsDatatableColumnFilterInputType", isSignal: true, isRequired: false, transformFunction: null }, filterOperators: { classPropertyName: "filterOperators", publicName: "bsDatatableColumnFilterOperators", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
69
92
  }
70
93
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsDatatableColumnDirective, decorators: [{
71
94
  type: Directive,
72
95
  args: [{ selector: '[bsDatatableColumn]' }]
73
- }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsDatatableColumn", required: false }] }], sortable: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsDatatableColumnSortable", required: false }] }] } });
96
+ }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsDatatableColumn", required: false }] }], sortable: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsDatatableColumnSortable", required: false }] }], filterable: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsDatatableColumnFilterable", required: false }] }], filterActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsDatatableColumnFilterActive", required: false }] }], filterSummary: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsDatatableColumnFilterSummary", required: false }] }], filterSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsDatatableColumnFilterSelection", required: false }] }], filterMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsDatatableColumnFilterMode", required: false }] }], filterInputType: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsDatatableColumnFilterInputType", required: false }] }], filterOperators: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsDatatableColumnFilterOperators", required: false }] }] } });
74
97
 
75
98
  /**
76
99
  * Marks an `<ng-template>` as the per-row body for `<bs-datatable>`. The
@@ -122,6 +145,41 @@ class BsRowTemplateContext {
122
145
  }
123
146
 
124
147
  class BsDatatableComponent {
148
+ /**
149
+ * Hands the previous generation over for disposal — it does **not** destroy
150
+ * anything, and must not.
151
+ *
152
+ * This runs inside `effectiveColumns`, and destroying a view detaches it,
153
+ * which dirties Angular's query signals: a signal write inside a computed,
154
+ * i.e. NG0600, the moment the host declares any view query. It is the exact
155
+ * mirror of why views are not CREATED here either — attach and detach are
156
+ * both signal writes, so neither belongs in a computed.
157
+ *
158
+ * Handing over is a plain field write, and the effect that forwards the
159
+ * columns disposes the batch on the same tick, so the leak this replaced
160
+ * stays fixed: at most one dead generation exists, and only momentarily.
161
+ */
162
+ retireTemplateViews() {
163
+ this.staleViews.push(...this.headerViews, ...this.filterViews);
164
+ this.headerViews = [];
165
+ this.filterViews = [];
166
+ this.releaseFilterSubscriptions();
167
+ }
168
+ /** Destroys the retired generation. Only ever called from an effect. */
169
+ disposeStaleViews() {
170
+ for (const v of this.staleViews)
171
+ v.destroy();
172
+ this.staleViews = [];
173
+ }
174
+ /**
175
+ * Without this the web component keeps calling into a destroyed view's signal
176
+ * on every value change, for the life of the element.
177
+ */
178
+ releaseFilterSubscriptions() {
179
+ for (const unsubscribe of this.filterUnsubscribes)
180
+ unsubscribe();
181
+ this.filterUnsubscribes = [];
182
+ }
125
183
  constructor() {
126
184
  this.platformId = inject(PLATFORM_ID);
127
185
  this.vcr = inject(ViewContainerRef);
@@ -131,12 +189,33 @@ class BsDatatableComponent {
131
189
  * template directives — if provided, takes precedence.
132
190
  */
133
191
  this.columnsInput = input(null, { ...(ngDevMode ? { debugName: "columnsInput" } : /* istanbul ignore next */ {}), alias: 'columns' });
134
- /** Static (already-paginated) data array. Use `[fetch]` for server-side pagination. */
192
+ /**
193
+ * The **complete** row set. Use `[fetch]` for server-side pagination.
194
+ *
195
+ * "Complete" matters to the filter panels: their value lists are computed from
196
+ * this array, so a consumer who pages `[data]` themselves is showing the
197
+ * component one page and will get a value list covering one page. That case
198
+ * needs `[distincts]`.
199
+ */
135
200
  this.data = input(null, /* @ts-ignore */
136
201
  ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
137
202
  /** Async data loader (server-side pagination). Mutually exclusive with `[data]`. */
138
203
  this.fetch = input(null, /* @ts-ignore */
139
204
  ...(ngDevMode ? [{ debugName: "fetch" }] : /* istanbul ignore next */ []));
205
+ /**
206
+ * Source of distinct values for the filter panels.
207
+ *
208
+ * Required whenever the component does not hold every row — with `[fetch]`,
209
+ * with external paging, or with a tree whose children are loaded on demand, a
210
+ * locally computed list would silently omit values, so it is not computed at
211
+ * all. Resolve `null` for a column to hand that one column back to the local
212
+ * path.
213
+ */
214
+ this.distincts = input(null, /* @ts-ignore */
215
+ ...(ngDevMode ? [{ debugName: "distincts" }] : /* istanbul ignore next */ []));
216
+ /** Partial override of the component's user-visible strings. */
217
+ this.labels = input(null, /* @ts-ignore */
218
+ ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
140
219
  /** Two-way bound pagination / sort settings. */
141
220
  this.settings = model(new DatatableSettings(), /* @ts-ignore */
142
221
  ...(ngDevMode ? [{ debugName: "settings" }] : /* istanbul ignore next */ []));
@@ -218,7 +297,16 @@ class BsDatatableComponent {
218
297
  this.rowExpand = output();
219
298
  /** Emitted after a row is collapsed. */
220
299
  this.rowCollapse = output();
221
- this.datatableRef = viewChild('datatable', /* @ts-ignore */
300
+ /**
301
+ * Emitted whenever a column's filter selection changes, including when it is
302
+ * cleared (`selected: []`).
303
+ *
304
+ * The component does not filter `[data]`: acting on this — and setting
305
+ * `filterActive` / `filterSummary` back on the column — is the consumer's job,
306
+ * because only they know whether the filter is client-side or a new query.
307
+ */
308
+ this.filterChange = output();
309
+ this.datatableRef = viewChild.required('datatable', /* @ts-ignore */
222
310
  ...(ngDevMode ? [{ debugName: "datatableRef" }] : /* istanbul ignore next */ []));
223
311
  /** Column directives (header template + sortable). Wrapper-level discovery. */
224
312
  this.columnDirectives = contentChildren(BsDatatableColumnDirective, /* @ts-ignore */
@@ -236,11 +324,28 @@ class BsDatatableComponent {
236
324
  const programmatic = this.columnsInput();
237
325
  if (programmatic && programmatic.length)
238
326
  return programmatic;
327
+ // Every recompute builds fresh closures with fresh views, so the previous
328
+ // generation is dead the moment we return. Without retiring them they
329
+ // accumulated until the component was destroyed — harmless-looking with one
330
+ // view per column, twice as bad now that filters add a second.
331
+ //
332
+ // Retired, not destroyed: see `retireTemplateViews`. Destroying here is
333
+ // NG0600.
334
+ this.retireTemplateViews();
239
335
  return this.columnDirectives().map((dir) => {
240
336
  let headerView;
337
+ let filterView;
338
+ let filterValues;
241
339
  return {
242
340
  name: dir.name(),
243
341
  sortable: dir.sortable(),
342
+ filterable: dir.filterable(),
343
+ filterActive: dir.filterActive(),
344
+ filterSummary: dir.filterSummary(),
345
+ filterSelection: dir.filterSelection(),
346
+ filterMode: dir.filterMode(),
347
+ filterInputType: dir.filterInputType(),
348
+ filterOperators: dir.filterOperators(),
244
349
  headerRenderer: () => {
245
350
  if (!headerView) {
246
351
  headerView = this.vcr.createEmbeddedView(dir.templateRef);
@@ -257,20 +362,71 @@ class BsDatatableComponent {
257
362
  frag.appendChild(n);
258
363
  return frag;
259
364
  },
365
+ // Installed UNCONDITIONALLY, and the nested template is resolved inside
366
+ // it rather than out here.
367
+ //
368
+ // `dir.filterPanelTemplate` is assigned by the nested directive's
369
+ // constructor, which does not run until the column's header view is
370
+ // created — too late for this computed's first evaluation. Reading it
371
+ // here would see `undefined` for every column and no override would ever
372
+ // appear. Creating the header view eagerly to force it is worse: the
373
+ // insertion dirties Angular's query signals inside a reactive read, and
374
+ // that throws NG0600 as soon as the host declares any `viewChild`.
375
+ //
376
+ // Returning `null` means "use the built-in panel", so a column with no
377
+ // override costs nothing.
378
+ filterRenderer: (_col, ctx) => {
379
+ const tpl = dir.filterPanelTemplate;
380
+ if (!tpl)
381
+ return null;
382
+ if (!filterView || !filterValues) {
383
+ // The context is a signal because the demos and specs are zoneless:
384
+ // mutating a context object notifies nothing, so the override would
385
+ // never repaint as values load.
386
+ filterValues = signal(ctx.values());
387
+ filterView = this.vcr.createEmbeddedView(tpl, { $implicit: filterValues, ctx });
388
+ this.filterViews.push(filterView);
389
+ const values = filterValues;
390
+ this.filterUnsubscribes.push(ctx.onChange(() => values.set(ctx.values())));
391
+ }
392
+ filterView.detectChanges();
393
+ const nodes = filterView.rootNodes.filter((n) => n instanceof Node);
394
+ if (nodes.length === 1)
395
+ return nodes[0];
396
+ const frag = document.createDocumentFragment();
397
+ for (const n of nodes)
398
+ frag.appendChild(n);
399
+ return frag;
400
+ },
260
401
  };
261
402
  });
262
403
  }, /* @ts-ignore */
263
404
  ...(ngDevMode ? [{ debugName: "effectiveColumns" }] : /* istanbul ignore next */ []));
264
405
  /** EmbeddedViews for header templates (one per column directive). */
265
406
  this.headerViews = [];
407
+ /** EmbeddedViews for filter panel templates (one per overriding column). */
408
+ this.filterViews = [];
409
+ /** `FilterContext.onChange` unsubscribes, one per live filter view. */
410
+ this.filterUnsubscribes = [];
411
+ /** The previous generation, awaiting disposal by the columns effect. */
412
+ this.staleViews = [];
266
413
  /** EmbeddedViews for row templates, keyed by rowKey for reuse. */
267
414
  this.rowViews = new Map();
268
415
  this.destroyRef.onDestroy(() => {
269
- for (const v of this.headerViews)
270
- v.destroy();
416
+ // Deliberately does NOT destroy the views. Every one of them is attached
417
+ // to this component's ViewContainerRef, so Angular tears them down with
418
+ // the host view; destroying them again from a cleanup hook re-enters that
419
+ // teardown and desynchronises the container's view bookkeeping — a hard
420
+ // "attached view should be in the same position within its container"
421
+ // assertion in dev mode. It only surfaces once a header template contains
422
+ // a nested structural directive, which `*bsDatatableFilterPanel` is, so
423
+ // the previous code looked correct right up until it was not.
424
+ //
425
+ // The subscriptions are the only thing here Angular knows nothing about.
426
+ this.releaseFilterSubscriptions();
271
427
  this.headerViews = [];
272
- for (const v of this.rowViews.values())
273
- v.destroy();
428
+ this.filterViews = [];
429
+ this.staleViews = [];
274
430
  this.rowViews.clear();
275
431
  });
276
432
  // Forward the `[fetch]` callback to the WC, which owns the entire
@@ -279,35 +435,43 @@ class BsDatatableComponent {
279
435
  // response. The wrapper no longer runs any fetch loop. Skipped on the
280
436
  // server so SSR doesn't kick off a client fetch.
281
437
  effect(() => {
282
- const el = this.datatableRef()?.nativeElement;
283
- if (!el)
284
- return;
438
+ const el = this.datatableRef().nativeElement;
285
439
  if (isPlatformServer(this.platformId))
286
440
  return;
287
441
  el.fetch = this.fetch() ?? null;
288
442
  });
289
- // Forward columns to the WC.
443
+ // Same server guard as `fetch`: the source is a network call in every real
444
+ // consumer, and a panel cannot be opened during SSR anyway.
290
445
  effect(() => {
291
- const el = this.datatableRef()?.nativeElement;
292
- if (!el)
446
+ const el = this.datatableRef().nativeElement;
447
+ if (isPlatformServer(this.platformId))
293
448
  return;
294
- el.columns = this.effectiveColumns();
449
+ el.distincts = this.distincts();
450
+ });
451
+ effect(() => {
452
+ const el = this.datatableRef().nativeElement;
453
+ el.labels = this.labels() ?? undefined;
454
+ });
455
+ // Forward columns to the WC, and dispose the generation the recompute
456
+ // retired. An effect may write signals; a computed may not, which is the
457
+ // whole reason the disposal happens out here.
458
+ effect(() => {
459
+ const columns = this.effectiveColumns();
460
+ this.disposeStaleViews();
461
+ const el = this.datatableRef().nativeElement;
462
+ el.columns = columns;
295
463
  });
296
464
  // Static `[data]` only. When `[fetch]` is set the WC owns the rows, so the
297
465
  // wrapper must not also push `el.data` (it would clobber fetched pages).
298
466
  effect(() => {
299
- const el = this.datatableRef()?.nativeElement;
300
- if (!el)
301
- return;
467
+ const el = this.datatableRef().nativeElement;
302
468
  if (this.fetch())
303
469
  return;
304
470
  const d = this.data();
305
471
  el.data = (d ?? []);
306
472
  });
307
473
  effect(() => {
308
- const el = this.datatableRef()?.nativeElement;
309
- if (!el)
310
- return;
474
+ const el = this.datatableRef().nativeElement;
311
475
  const settings = this.settings();
312
476
  const fetching = !!this.fetch();
313
477
  const virtual = this.virtualScroll();
@@ -321,37 +485,27 @@ class BsDatatableComponent {
321
485
  el.perPageOptions = settings.perPage.values;
322
486
  });
323
487
  effect(() => {
324
- const el = this.datatableRef()?.nativeElement;
325
- if (!el)
326
- return;
488
+ const el = this.datatableRef().nativeElement;
327
489
  const mode = this.selectable() ?? this.selectionMode();
328
490
  el.selectionMode = mode;
329
491
  });
330
492
  effect(() => {
331
- const el = this.datatableRef()?.nativeElement;
332
- if (!el)
333
- return;
493
+ const el = this.datatableRef().nativeElement;
334
494
  el.rowKey = (row, index) => this.rowKey()(row, index);
335
495
  });
336
496
  effect(() => {
337
- const el = this.datatableRef()?.nativeElement;
338
- if (!el)
339
- return;
497
+ const el = this.datatableRef().nativeElement;
340
498
  el.resizableColumns = this.resizableColumns();
341
499
  });
342
500
  effect(() => {
343
- const el = this.datatableRef()?.nativeElement;
344
- if (!el)
345
- return;
501
+ const el = this.datatableRef().nativeElement;
346
502
  el.virtualScroll = this.virtualScroll();
347
503
  el.itemSize = this.itemSize();
348
504
  el.virtualBuffer = this.virtualBuffer();
349
505
  });
350
506
  // Tree-mode prop sync to the WC.
351
507
  effect(() => {
352
- const el = this.datatableRef()?.nativeElement;
353
- if (!el)
354
- return;
508
+ const el = this.datatableRef().nativeElement;
355
509
  el.tree = this.tree();
356
510
  el.idKey = this.idKey();
357
511
  el.childCountKey = this.childCountKey();
@@ -362,9 +516,7 @@ class BsDatatableComponent {
362
516
  // — the WC's getter returns a fresh Set on every read.
363
517
  effect(() => {
364
518
  const desired = this.expandedIds();
365
- const el = this.datatableRef()?.nativeElement;
366
- if (!el)
367
- return;
519
+ const el = this.datatableRef().nativeElement;
368
520
  const current = el.expandedIds;
369
521
  if (setsEqual(current, desired))
370
522
  return;
@@ -372,33 +524,21 @@ class BsDatatableComponent {
372
524
  });
373
525
  // Wire the row renderer when *bsRowTemplate is provided.
374
526
  effect(() => {
375
- const el = this.datatableRef()?.nativeElement;
376
- if (!el)
377
- return;
527
+ const el = this.datatableRef().nativeElement;
378
528
  const tpl = this.rowTemplate();
379
- if (!tpl) {
380
- el.rowRenderer = undefined;
381
- // Destroy any stale row views.
382
- for (const v of this.rowViews.values())
383
- v.destroy();
384
- this.rowViews.clear();
385
- return;
386
- }
387
- el.rowRenderer = this.buildRowRenderer(tpl);
529
+ // Row views cached for a previous template would keep rendering ITS cells: drop them.
530
+ [...this.rowViews.values()].map((v) => v.destroy());
531
+ this.rowViews.clear();
532
+ el.rowRenderer = tpl ? this.buildRowRenderer(tpl) : undefined;
388
533
  });
389
534
  // Selection rows → IDs forwarded to WC.
390
535
  effect(() => {
391
- const el = this.datatableRef()?.nativeElement;
392
- if (!el)
393
- return;
536
+ const el = this.datatableRef().nativeElement;
394
537
  const rows = this.selection();
395
538
  const keyFn = this.rowKey();
396
539
  el.selectedIds = rows.map((row, i) => keyFn(row, i));
397
540
  });
398
541
  }
399
- ngAfterViewInit() {
400
- // Effects above re-run as the view is created; nothing else needed.
401
- }
402
542
  buildRowRenderer(tpl) {
403
543
  return (row, rowIndex, ctx) => {
404
544
  // Placeholder rows (tree-mode, children pending fetch) get a synthetic key
@@ -491,6 +631,9 @@ class BsDatatableComponent {
491
631
  return;
492
632
  this.expandedIds.set(next);
493
633
  }
634
+ onFilterChange(event) {
635
+ this.filterChange.emit(event.detail);
636
+ }
494
637
  toBsEvent(event) {
495
638
  const detail = event.detail;
496
639
  return {
@@ -501,12 +644,12 @@ class BsDatatableComponent {
501
644
  };
502
645
  }
503
646
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsDatatableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
504
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: BsDatatableComponent, isStandalone: true, selector: "bs-datatable", inputs: { columnsInput: { classPropertyName: "columnsInput", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, fetch: { classPropertyName: "fetch", publicName: "fetch", isSignal: true, isRequired: false, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, resizableColumns: { classPropertyName: "resizableColumns", publicName: "resizableColumns", isSignal: true, isRequired: false, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, virtualBuffer: { classPropertyName: "virtualBuffer", publicName: "virtualBuffer", isSignal: true, isRequired: false, transformFunction: null }, isResponsive: { classPropertyName: "isResponsive", publicName: "isResponsive", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, tree: { classPropertyName: "tree", publicName: "tree", isSignal: true, isRequired: false, transformFunction: null }, idKey: { classPropertyName: "idKey", publicName: "idKey", isSignal: true, isRequired: false, transformFunction: null }, childCountKey: { classPropertyName: "childCountKey", publicName: "childCountKey", isSignal: true, isRequired: false, transformFunction: null }, treeIndent: { classPropertyName: "treeIndent", publicName: "treeIndent", isSignal: true, isRequired: false, transformFunction: null }, expandedIds: { classPropertyName: "expandedIds", publicName: "expandedIds", isSignal: true, isRequired: false, transformFunction: null }, selectionStrategy: { classPropertyName: "selectionStrategy", publicName: "selectionStrategy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { settings: "settingsChange", selection: "selectionChange", rowClick: "rowClick", rowDblClick: "rowDblClick", rowContextMenu: "rowContextMenu", expandedIds: "expandedIdsChange", rowExpand: "rowExpand", rowCollapse: "rowCollapse" }, queries: [{ propertyName: "columnDirectives", predicate: BsDatatableColumnDirective, isSignal: true }, { propertyName: "rowTemplate", first: true, predicate: (BsRowTemplateDirective), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "datatableRef", first: true, predicate: ["datatable"], descendants: true, isSignal: true }], ngImport: i0, template: "<mp-datatable bsForwardAria\n #datatable\n class=\"bs-datatable\"\n (mp-datatable-sort-change)=\"onSortChange($event)\"\n (mp-datatable-selection-change)=\"onSelectionChange($event)\"\n (mp-datatable-page-change)=\"onPageChange($event)\"\n (mp-datatable-per-page-change)=\"onPerPageChange($event)\"\n (mp-datatable-row-click)=\"onRowClick($event)\"\n (mp-datatable-row-dblclick)=\"onRowDblClick($event)\"\n (mp-datatable-row-contextmenu)=\"onRowContextMenu($event)\"\n (mp-datatable-row-expand)=\"onRowExpand($event)\"\n (mp-datatable-row-collapse)=\"onRowCollapse($event)\"\n (mp-datatable-expanded-ids-change)=\"onExpandedIdsChange($event)\"\n></mp-datatable>\n", styles: [":host{display:block;width:100%}.bs-datatable{display:block;width:100%}\n"], dependencies: [{ kind: "directive", type: BsForwardAriaDirective, selector: "[bsForwardAria]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
647
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: BsDatatableComponent, isStandalone: true, selector: "bs-datatable", inputs: { columnsInput: { classPropertyName: "columnsInput", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, fetch: { classPropertyName: "fetch", publicName: "fetch", isSignal: true, isRequired: false, transformFunction: null }, distincts: { classPropertyName: "distincts", publicName: "distincts", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, resizableColumns: { classPropertyName: "resizableColumns", publicName: "resizableColumns", isSignal: true, isRequired: false, transformFunction: null }, pagination: { classPropertyName: "pagination", publicName: "pagination", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, virtualBuffer: { classPropertyName: "virtualBuffer", publicName: "virtualBuffer", isSignal: true, isRequired: false, transformFunction: null }, isResponsive: { classPropertyName: "isResponsive", publicName: "isResponsive", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, tree: { classPropertyName: "tree", publicName: "tree", isSignal: true, isRequired: false, transformFunction: null }, idKey: { classPropertyName: "idKey", publicName: "idKey", isSignal: true, isRequired: false, transformFunction: null }, childCountKey: { classPropertyName: "childCountKey", publicName: "childCountKey", isSignal: true, isRequired: false, transformFunction: null }, treeIndent: { classPropertyName: "treeIndent", publicName: "treeIndent", isSignal: true, isRequired: false, transformFunction: null }, expandedIds: { classPropertyName: "expandedIds", publicName: "expandedIds", isSignal: true, isRequired: false, transformFunction: null }, selectionStrategy: { classPropertyName: "selectionStrategy", publicName: "selectionStrategy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { settings: "settingsChange", selection: "selectionChange", rowClick: "rowClick", rowDblClick: "rowDblClick", rowContextMenu: "rowContextMenu", expandedIds: "expandedIdsChange", rowExpand: "rowExpand", rowCollapse: "rowCollapse", filterChange: "filterChange" }, queries: [{ propertyName: "columnDirectives", predicate: BsDatatableColumnDirective, isSignal: true }, { propertyName: "rowTemplate", first: true, predicate: (BsRowTemplateDirective), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "datatableRef", first: true, predicate: ["datatable"], descendants: true, isSignal: true }], ngImport: i0, template: "<mp-datatable bsForwardAria\n #datatable\n class=\"bs-datatable\"\n (mp-datatable-sort-change)=\"onSortChange($event)\"\n (mp-datatable-selection-change)=\"onSelectionChange($event)\"\n (mp-datatable-page-change)=\"onPageChange($event)\"\n (mp-datatable-per-page-change)=\"onPerPageChange($event)\"\n (mp-datatable-row-click)=\"onRowClick($event)\"\n (mp-datatable-row-dblclick)=\"onRowDblClick($event)\"\n (mp-datatable-row-contextmenu)=\"onRowContextMenu($event)\"\n (mp-datatable-row-expand)=\"onRowExpand($event)\"\n (mp-datatable-row-collapse)=\"onRowCollapse($event)\"\n (mp-datatable-expanded-ids-change)=\"onExpandedIdsChange($event)\"\n (mp-datatable-filter-change)=\"onFilterChange($event)\"\n></mp-datatable>\n", styles: [":host{display:block;width:100%}.bs-datatable{display:block;width:100%}\n"], dependencies: [{ kind: "directive", type: BsForwardAriaDirective, selector: "[bsForwardAria]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
505
648
  }
506
649
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsDatatableComponent, decorators: [{
507
650
  type: Component,
508
- args: [{ selector: 'bs-datatable', imports: [BsForwardAriaDirective], schemas: [CUSTOM_ELEMENTS_SCHEMA], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mp-datatable bsForwardAria\n #datatable\n class=\"bs-datatable\"\n (mp-datatable-sort-change)=\"onSortChange($event)\"\n (mp-datatable-selection-change)=\"onSelectionChange($event)\"\n (mp-datatable-page-change)=\"onPageChange($event)\"\n (mp-datatable-per-page-change)=\"onPerPageChange($event)\"\n (mp-datatable-row-click)=\"onRowClick($event)\"\n (mp-datatable-row-dblclick)=\"onRowDblClick($event)\"\n (mp-datatable-row-contextmenu)=\"onRowContextMenu($event)\"\n (mp-datatable-row-expand)=\"onRowExpand($event)\"\n (mp-datatable-row-collapse)=\"onRowCollapse($event)\"\n (mp-datatable-expanded-ids-change)=\"onExpandedIdsChange($event)\"\n></mp-datatable>\n", styles: [":host{display:block;width:100%}.bs-datatable{display:block;width:100%}\n"] }]
509
- }], ctorParameters: () => [], propDecorators: { columnsInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], fetch: [{ type: i0.Input, args: [{ isSignal: true, alias: "fetch", required: false }] }], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: false }] }, { type: i0.Output, args: ["settingsChange"] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], rowKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowKey", required: false }] }], resizableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizableColumns", required: false }] }], pagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagination", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], itemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemSize", required: false }] }], virtualBuffer: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualBuffer", required: false }] }], isResponsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "isResponsive", required: false }] }], compareWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "compareWith", required: false }] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], rowDblClick: [{ type: i0.Output, args: ["rowDblClick"] }], rowContextMenu: [{ type: i0.Output, args: ["rowContextMenu"] }], tree: [{ type: i0.Input, args: [{ isSignal: true, alias: "tree", required: false }] }], idKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "idKey", required: false }] }], childCountKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "childCountKey", required: false }] }], treeIndent: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeIndent", required: false }] }], expandedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIds", required: false }] }, { type: i0.Output, args: ["expandedIdsChange"] }], selectionStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionStrategy", required: false }] }], rowExpand: [{ type: i0.Output, args: ["rowExpand"] }], rowCollapse: [{ type: i0.Output, args: ["rowCollapse"] }], datatableRef: [{ type: i0.ViewChild, args: ['datatable', { isSignal: true }] }], columnDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BsDatatableColumnDirective), { isSignal: true }] }], rowTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsRowTemplateDirective), { isSignal: true }] }] } });
651
+ args: [{ selector: 'bs-datatable', imports: [BsForwardAriaDirective], schemas: [CUSTOM_ELEMENTS_SCHEMA], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mp-datatable bsForwardAria\n #datatable\n class=\"bs-datatable\"\n (mp-datatable-sort-change)=\"onSortChange($event)\"\n (mp-datatable-selection-change)=\"onSelectionChange($event)\"\n (mp-datatable-page-change)=\"onPageChange($event)\"\n (mp-datatable-per-page-change)=\"onPerPageChange($event)\"\n (mp-datatable-row-click)=\"onRowClick($event)\"\n (mp-datatable-row-dblclick)=\"onRowDblClick($event)\"\n (mp-datatable-row-contextmenu)=\"onRowContextMenu($event)\"\n (mp-datatable-row-expand)=\"onRowExpand($event)\"\n (mp-datatable-row-collapse)=\"onRowCollapse($event)\"\n (mp-datatable-expanded-ids-change)=\"onExpandedIdsChange($event)\"\n (mp-datatable-filter-change)=\"onFilterChange($event)\"\n></mp-datatable>\n", styles: [":host{display:block;width:100%}.bs-datatable{display:block;width:100%}\n"] }]
652
+ }], ctorParameters: () => [], propDecorators: { columnsInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], fetch: [{ type: i0.Input, args: [{ isSignal: true, alias: "fetch", required: false }] }], distincts: [{ type: i0.Input, args: [{ isSignal: true, alias: "distincts", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: false }] }, { type: i0.Output, args: ["settingsChange"] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], rowKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowKey", required: false }] }], resizableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizableColumns", required: false }] }], pagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "pagination", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], itemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemSize", required: false }] }], virtualBuffer: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualBuffer", required: false }] }], isResponsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "isResponsive", required: false }] }], compareWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "compareWith", required: false }] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], rowDblClick: [{ type: i0.Output, args: ["rowDblClick"] }], rowContextMenu: [{ type: i0.Output, args: ["rowContextMenu"] }], tree: [{ type: i0.Input, args: [{ isSignal: true, alias: "tree", required: false }] }], idKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "idKey", required: false }] }], childCountKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "childCountKey", required: false }] }], treeIndent: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeIndent", required: false }] }], expandedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIds", required: false }] }, { type: i0.Output, args: ["expandedIdsChange"] }], selectionStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionStrategy", required: false }] }], rowExpand: [{ type: i0.Output, args: ["rowExpand"] }], rowCollapse: [{ type: i0.Output, args: ["rowCollapse"] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], datatableRef: [{ type: i0.ViewChild, args: ['datatable', { isSignal: true }] }], columnDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BsDatatableColumnDirective), { isSignal: true }] }], rowTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsRowTemplateDirective), { isSignal: true }] }] } });
510
653
  function setsEqual(a, b) {
511
654
  // In SSR the WC isn't upgraded yet, so reading `el.expandedIds` returns
512
655
  // `undefined` instead of the getter's `new Set()`. Treat both-missing as
@@ -526,9 +669,69 @@ function setsEqual(a, b) {
526
669
  return true;
527
670
  }
528
671
 
672
+ /**
673
+ * Overrides the filter panel of the column it is nested in.
674
+ *
675
+ * ```html
676
+ * <div *bsDatatableColumn="'country'; filterable: true">
677
+ * Country
678
+ * <ng-container *bsDatatableFilterPanel="let values">
679
+ * <my-panel [values]="values()"></my-panel>
680
+ * </ng-container>
681
+ * </div>
682
+ * ```
683
+ *
684
+ * Nested inside the column rather than a sibling keyed by name: the column is
685
+ * the thing being configured, and a name-keyed sibling has no way to fail loudly
686
+ * when the two names drift apart. It is also the pattern every other per-item
687
+ * override in this workspace uses.
688
+ *
689
+ * Omitting it is not a lesser option — the web component renders a built-in
690
+ * panel (search, include/exclude, checkbox list, clear) which React and Vue get
691
+ * for free. This directive is for the cases that need something else.
692
+ *
693
+ * ### Inputs on the column, not here
694
+ *
695
+ * `filterable`, `filterActive`, `filterSummary` and `filterSelection` are inputs
696
+ * on `*bsDatatableColumn`. They cannot live here: this directive's own inputs
697
+ * are not yet set when its constructor runs, and the constructor is the only
698
+ * point at which it can register itself with the column early enough.
699
+ */
700
+ class BsDatatableFilterPanelDirective {
701
+ constructor() {
702
+ this.column = inject(BsDatatableColumnDirective);
703
+ this.templateRef = inject(TemplateRef);
704
+ // A plain field assignment, deliberately. See the field's own comment on
705
+ // `BsDatatableColumnDirective`: a signal write here is NG0600.
706
+ this.column.filterPanelTemplate = this.templateRef;
707
+ inject(DestroyRef).onDestroy(() => {
708
+ // Guarded: under `@if`, the incoming directive's constructor can run
709
+ // before the outgoing one's destroy hook, and an unguarded clear would
710
+ // erase the template that just replaced this one.
711
+ if (this.column.filterPanelTemplate === this.templateRef) {
712
+ this.column.filterPanelTemplate = undefined;
713
+ }
714
+ });
715
+ }
716
+ /**
717
+ * Lets `let values = $implicit` and `let ctx = ctx` type-check against the
718
+ * real context. Without it both are `any`, so `values().anything.deeper`
719
+ * compiles and fails at runtime.
720
+ */
721
+ static ngTemplateContextGuard(_dir, _ctx) {
722
+ return true;
723
+ }
724
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsDatatableFilterPanelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
725
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsDatatableFilterPanelDirective, isStandalone: true, selector: "[bsDatatableFilterPanel]", ngImport: i0 }); }
726
+ }
727
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsDatatableFilterPanelDirective, decorators: [{
728
+ type: Directive,
729
+ args: [{ selector: '[bsDatatableFilterPanel]' }]
730
+ }], ctorParameters: () => [] });
731
+
529
732
  /**
530
733
  * Generated bundle index. Do not edit.
531
734
  */
532
735
 
533
- export { BsDatatableColumnDirective, BsDatatableComponent, BsRowTemplateContext, BsRowTemplateDirective, DatatableSettings };
736
+ export { BsDatatableColumnDirective, BsDatatableComponent, BsDatatableFilterPanelDirective, BsRowTemplateContext, BsRowTemplateDirective, DatatableSettings };
534
737
  //# sourceMappingURL=mintplayer-ng-bootstrap-datatable.mjs.map