@mintplayer/ng-bootstrap 22.18.0 → 22.19.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.
|
@@ -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
|
-
/**
|
|
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,6 +297,15 @@ class BsDatatableComponent {
|
|
|
218
297
|
this.rowExpand = output();
|
|
219
298
|
/** Emitted after a row is collapsed. */
|
|
220
299
|
this.rowCollapse = output();
|
|
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();
|
|
221
309
|
this.datatableRef = viewChild('datatable', /* @ts-ignore */
|
|
222
310
|
...(ngDevMode ? [{ debugName: "datatableRef" }] : /* istanbul ignore next */ []));
|
|
223
311
|
/** Column directives (header template + sortable). Wrapper-level discovery. */
|
|
@@ -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
|
-
|
|
270
|
-
|
|
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
|
-
|
|
273
|
-
|
|
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
|
|
@@ -286,12 +442,32 @@ class BsDatatableComponent {
|
|
|
286
442
|
return;
|
|
287
443
|
el.fetch = this.fetch() ?? null;
|
|
288
444
|
});
|
|
289
|
-
//
|
|
445
|
+
// Same server guard as `fetch`: the source is a network call in every real
|
|
446
|
+
// consumer, and a panel cannot be opened during SSR anyway.
|
|
447
|
+
effect(() => {
|
|
448
|
+
const el = this.datatableRef()?.nativeElement;
|
|
449
|
+
if (!el)
|
|
450
|
+
return;
|
|
451
|
+
if (isPlatformServer(this.platformId))
|
|
452
|
+
return;
|
|
453
|
+
el.distincts = this.distincts();
|
|
454
|
+
});
|
|
455
|
+
effect(() => {
|
|
456
|
+
const el = this.datatableRef()?.nativeElement;
|
|
457
|
+
if (!el)
|
|
458
|
+
return;
|
|
459
|
+
el.labels = this.labels() ?? undefined;
|
|
460
|
+
});
|
|
461
|
+
// Forward columns to the WC, and dispose the generation the recompute
|
|
462
|
+
// retired. An effect may write signals; a computed may not, which is the
|
|
463
|
+
// whole reason the disposal happens out here.
|
|
290
464
|
effect(() => {
|
|
465
|
+
const columns = this.effectiveColumns();
|
|
466
|
+
this.disposeStaleViews();
|
|
291
467
|
const el = this.datatableRef()?.nativeElement;
|
|
292
468
|
if (!el)
|
|
293
469
|
return;
|
|
294
|
-
el.columns =
|
|
470
|
+
el.columns = columns;
|
|
295
471
|
});
|
|
296
472
|
// Static `[data]` only. When `[fetch]` is set the WC owns the rows, so the
|
|
297
473
|
// wrapper must not also push `el.data` (it would clobber fetched pages).
|
|
@@ -491,6 +667,9 @@ class BsDatatableComponent {
|
|
|
491
667
|
return;
|
|
492
668
|
this.expandedIds.set(next);
|
|
493
669
|
}
|
|
670
|
+
onFilterChange(event) {
|
|
671
|
+
this.filterChange.emit(event.detail);
|
|
672
|
+
}
|
|
494
673
|
toBsEvent(event) {
|
|
495
674
|
const detail = event.detail;
|
|
496
675
|
return {
|
|
@@ -501,12 +680,12 @@ class BsDatatableComponent {
|
|
|
501
680
|
};
|
|
502
681
|
}
|
|
503
682
|
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 }); }
|
|
683
|
+
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
684
|
}
|
|
506
685
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsDatatableComponent, decorators: [{
|
|
507
686
|
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 }] }] } });
|
|
687
|
+
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"] }]
|
|
688
|
+
}], 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
689
|
function setsEqual(a, b) {
|
|
511
690
|
// In SSR the WC isn't upgraded yet, so reading `el.expandedIds` returns
|
|
512
691
|
// `undefined` instead of the getter's `new Set()`. Treat both-missing as
|
|
@@ -526,9 +705,69 @@ function setsEqual(a, b) {
|
|
|
526
705
|
return true;
|
|
527
706
|
}
|
|
528
707
|
|
|
708
|
+
/**
|
|
709
|
+
* Overrides the filter panel of the column it is nested in.
|
|
710
|
+
*
|
|
711
|
+
* ```html
|
|
712
|
+
* <div *bsDatatableColumn="'country'; filterable: true">
|
|
713
|
+
* Country
|
|
714
|
+
* <ng-container *bsDatatableFilterPanel="let values">
|
|
715
|
+
* <my-panel [values]="values()"></my-panel>
|
|
716
|
+
* </ng-container>
|
|
717
|
+
* </div>
|
|
718
|
+
* ```
|
|
719
|
+
*
|
|
720
|
+
* Nested inside the column rather than a sibling keyed by name: the column is
|
|
721
|
+
* the thing being configured, and a name-keyed sibling has no way to fail loudly
|
|
722
|
+
* when the two names drift apart. It is also the pattern every other per-item
|
|
723
|
+
* override in this workspace uses.
|
|
724
|
+
*
|
|
725
|
+
* Omitting it is not a lesser option — the web component renders a built-in
|
|
726
|
+
* panel (search, include/exclude, checkbox list, clear) which React and Vue get
|
|
727
|
+
* for free. This directive is for the cases that need something else.
|
|
728
|
+
*
|
|
729
|
+
* ### Inputs on the column, not here
|
|
730
|
+
*
|
|
731
|
+
* `filterable`, `filterActive`, `filterSummary` and `filterSelection` are inputs
|
|
732
|
+
* on `*bsDatatableColumn`. They cannot live here: this directive's own inputs
|
|
733
|
+
* are not yet set when its constructor runs, and the constructor is the only
|
|
734
|
+
* point at which it can register itself with the column early enough.
|
|
735
|
+
*/
|
|
736
|
+
class BsDatatableFilterPanelDirective {
|
|
737
|
+
constructor() {
|
|
738
|
+
this.column = inject(BsDatatableColumnDirective);
|
|
739
|
+
this.templateRef = inject(TemplateRef);
|
|
740
|
+
// A plain field assignment, deliberately. See the field's own comment on
|
|
741
|
+
// `BsDatatableColumnDirective`: a signal write here is NG0600.
|
|
742
|
+
this.column.filterPanelTemplate = this.templateRef;
|
|
743
|
+
inject(DestroyRef).onDestroy(() => {
|
|
744
|
+
// Guarded: under `@if`, the incoming directive's constructor can run
|
|
745
|
+
// before the outgoing one's destroy hook, and an unguarded clear would
|
|
746
|
+
// erase the template that just replaced this one.
|
|
747
|
+
if (this.column.filterPanelTemplate === this.templateRef) {
|
|
748
|
+
this.column.filterPanelTemplate = undefined;
|
|
749
|
+
}
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Lets `let values = $implicit` and `let ctx = ctx` type-check against the
|
|
754
|
+
* real context. Without it both are `any`, so `values().anything.deeper`
|
|
755
|
+
* compiles and fails at runtime.
|
|
756
|
+
*/
|
|
757
|
+
static ngTemplateContextGuard(_dir, _ctx) {
|
|
758
|
+
return true;
|
|
759
|
+
}
|
|
760
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsDatatableFilterPanelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
761
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsDatatableFilterPanelDirective, isStandalone: true, selector: "[bsDatatableFilterPanel]", ngImport: i0 }); }
|
|
762
|
+
}
|
|
763
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsDatatableFilterPanelDirective, decorators: [{
|
|
764
|
+
type: Directive,
|
|
765
|
+
args: [{ selector: '[bsDatatableFilterPanel]' }]
|
|
766
|
+
}], ctorParameters: () => [] });
|
|
767
|
+
|
|
529
768
|
/**
|
|
530
769
|
* Generated bundle index. Do not edit.
|
|
531
770
|
*/
|
|
532
771
|
|
|
533
|
-
export { BsDatatableColumnDirective, BsDatatableComponent, BsRowTemplateContext, BsRowTemplateDirective, DatatableSettings };
|
|
772
|
+
export { BsDatatableColumnDirective, BsDatatableComponent, BsDatatableFilterPanelDirective, BsRowTemplateContext, BsRowTemplateDirective, DatatableSettings };
|
|
534
773
|
//# sourceMappingURL=mintplayer-ng-bootstrap-datatable.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-datatable.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-settings.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-column/datatable-column.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/row-template/row-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable/datatable.component.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable/datatable.component.html","../../../../libs/mintplayer-ng-bootstrap/datatable/mintplayer-ng-bootstrap-datatable.ts"],"sourcesContent":["import { PaginationRequest, SortColumn } from \"@mintplayer/pagination\";\n\nexport class DatatableSettings {\n constructor(data?: Partial<DatatableSettings>) {\n Object.assign(this, data);\n\n if (data && data.perPage) {\n this.perPage = data.perPage;\n } else {\n // Set default value\n this.perPage = {\n values: [10, 20, 50],\n selected: 20\n };\n }\n\n if (data && data.page) {\n this.page = data.page;\n } else {\n // Set default value\n this.page = {\n values: [1],\n selected: 1\n };\n }\n }\n\n public sortColumns: SortColumn[] = [];\n public perPage: { values: number[], selected: number };\n public page: { values: number[], selected: number };\n public pageNumberOfBoxes: number = 11;\n\n public toPagination() {\n const res = <PaginationRequest>{\n sortColumns: this.sortColumns,\n perPage: this.perPage.selected,\n page: this.page.selected\n };\n return res;\n }\n}","import { Directive, inject, input, TemplateRef } from '@angular/core';\n\n/**\n * Declares a column in `<bs-datatable>`.\n *\n * - `bsDatatableColumn` (the directive value) is the **data property name** —\n * it must match the field key on each row in the fetched data and is what\n * `SortColumn.property` references when the column is clicked.\n * - The directive's **template content** is the header template — what gets\n * rendered inside the `<th>`.\n *\n * Example:\n * ```html\n * <div *bsDatatableColumn=\"'YearStarted'; sortable: true\">Year started</div>\n * ```\n *\n * Optional `bsDatatableColumnSortable` controls whether the header acts as a\n * sort toggle (default `true`).\n */\n@Directive({ selector: '[bsDatatableColumn]' })\nexport class BsDatatableColumnDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\n\n /** Data property name on each row; used as `SortColumn.property` on sort. */\n readonly name = input('', { alias: 'bsDatatableColumn' });\n\n readonly sortable = input(true, { alias: 'bsDatatableColumnSortable' });\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Marks an `<ng-template>` as the per-row body for `<bs-datatable>`. The\n * template's `$implicit` is the row object. The template should render one\n * `<td>` per data column (in column order).\n *\n * In tree mode (`[tree]=\"true\"`) the context also carries `depth` (0 for\n * roots, +1 per nesting level), `isExpanded`, and `isPlaceholder` (true when\n * the row is a not-yet-loaded child slot — `$implicit` is undefined).\n *\n * Example:\n * ```html\n * <ng-container *bsRowTemplate=\"let artist\">\n * <td class=\"text-nowrap\">{{ artist?.name }}</td>\n * <td class=\"text-nowrap\">{{ artist?.yearStarted }}</td>\n * </ng-container>\n *\n * <!-- tree mode: render a spinner for placeholder rows -->\n * <ng-container *bsRowTemplate=\"let item; let isPlaceholder = isPlaceholder\">\n * @if (isPlaceholder) { <td colspan=\"3\"><i>Loading…</i></td> }\n * @else { <td>{{ item.name }}</td><td>{{ item.headcount }}</td><td>{{ item.code }}</td> }\n * </ng-container>\n * ```\n */\n@Directive({ selector: '[bsRowTemplate]' })\nexport class BsRowTemplateDirective<TData = unknown> {\n readonly templateRef = inject<TemplateRef<BsRowTemplateContext<TData>>>(TemplateRef);\n\n static ngTemplateContextGuard<TData>(\n _dir: BsRowTemplateDirective<TData>,\n ctx: unknown,\n ): ctx is BsRowTemplateContext<Exclude<TData, false | 0 | '' | null | undefined>> {\n return true;\n }\n}\n\nexport class BsRowTemplateContext<TData = unknown> {\n $implicit: TData | undefined = undefined;\n index?: number;\n /** 0 for roots; +1 per nesting level. Always 0 in flat mode. */\n depth = 0;\n /** True when the row is currently expanded. Always false in flat mode. */\n isExpanded = false;\n /** True when the row is a not-yet-loaded child slot — `$implicit` is undefined. */\n isPlaceholder = false;\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n CUSTOM_ELEMENTS_SCHEMA,\n DestroyRef,\n effect,\n ElementRef,\n EmbeddedViewRef,\n inject,\n input,\n model,\n output,\n PLATFORM_ID,\n signal,\n ViewContainerRef,\n viewChild,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { SortColumn } from '@mintplayer/pagination';\nimport {\n computeNextSort,\n type DatatableColumnDef,\n type DatatableSelectionMode,\n type MpDatatable,\n type RowEventDetail,\n type RowRenderer,\n type SortChangeEventDetail,\n type SelectionChangeEventDetail,\n type TreeRowExpandDetail,\n type TreeExpandedIdsChangeDetail,\n type TreeIdKey,\n type TreeSelectionStrategy,\n} from '@mintplayer/web-components/datatable';\n\n// Side-effect import: registers <mp-datatable>.\nimport '@mintplayer/web-components/datatable';\n\nimport { DatatableSettings } from '../datatable-settings';\nimport { BsDatatableFetch } from '../datatable-fetch';\nimport { BsDatatableColumnDirective } from '../datatable-column/datatable-column.directive';\nimport { BsRowTemplateDirective, BsRowTemplateContext } from '../row-template/row-template.directive';\nimport { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';\n\nexport interface BsDatatableRowEvent<T> {\n row: T;\n rowIndex: number;\n rowKey: string;\n originalEvent: Event;\n}\n\nexport interface BsDatatableTreeRowEvent<T> {\n row: T;\n depth: number;\n parentId: unknown | null;\n}\n\n@Component({\n selector: 'bs-datatable',\n templateUrl: './datatable.component.html',\n imports: [BsForwardAriaDirective],\n styleUrls: ['./datatable.component.scss'],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsDatatableComponent<TData> implements AfterViewInit {\n private readonly platformId = inject(PLATFORM_ID);\n private readonly vcr = inject(ViewContainerRef);\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Programmatic column list. Mutually exclusive with the `*bsDatatableColumn`\n * template directives — if provided, takes precedence.\n */\n readonly columnsInput = input<DatatableColumnDef<TData>[] | null>(null, { alias: 'columns' });\n\n /** Static (already-paginated) data array. Use `[fetch]` for server-side pagination. */\n readonly data = input<TData[] | null>(null);\n\n /** Async data loader (server-side pagination). Mutually exclusive with `[data]`. */\n readonly fetch = input<BsDatatableFetch<TData> | null>(null);\n\n /** Two-way bound pagination / sort settings. */\n readonly settings = model<DatatableSettings>(new DatatableSettings());\n\n /** `'none'` hides selection; `'multiple'` shows checkboxes; `'single'` is a single-row selection. */\n readonly selectionMode = input<DatatableSelectionMode>('none');\n /** @deprecated Use `selectionMode`. Kept for source-level compatibility. */\n readonly selectable = input<DatatableSelectionMode | undefined>(undefined);\n\n /** Two-way bound array of selected rows (identity via `rowKey`). */\n readonly selection = model<TData[]>([]);\n\n /** Required for selection / async refetch identity. Default `String((row as any).id)`. */\n readonly rowKey = input<(row: TData, index: number) => string>((row: TData, index: number) => {\n const r = row as { id?: unknown } | null;\n return r && r.id != null ? String(r.id) : `row-${index}`;\n });\n\n /** Drag-resize column widths. Default `true`. */\n readonly resizableColumns = input<boolean>(true);\n\n /** Built-in pagination footer. Ignored when `[fetch]` is provided (server-side paging owns the page state). */\n readonly pagination = input<boolean>(true);\n\n /** Enable virtual scrolling for large datasets. */\n readonly virtualScroll = input<boolean>(false);\n /** Approximate row height in px (drives virtual scroll). */\n readonly itemSize = input<number>(40);\n /** Off-screen row buffer per side for virtual scrolling. */\n readonly virtualBuffer = input<number>(10);\n\n /** Forwarded to the inner table (legacy responsive flag, currently a CSS hook). */\n readonly isResponsive = input<boolean>(false);\n\n /** Optional row equality predicate (selection identity across re-fetches). */\n readonly compareWith = input<((a: TData, b: TData) => boolean) | undefined>(undefined);\n\n /** Emitted on row single-click. */\n readonly rowClick = output<BsDatatableRowEvent<TData>>();\n /** Emitted on row double-click. */\n readonly rowDblClick = output<BsDatatableRowEvent<TData>>();\n /** Emitted on row context-menu. */\n readonly rowContextMenu = output<BsDatatableRowEvent<TData>>();\n\n // ─── Tree-mode inputs / models / outputs ─────────────────────────────────\n\n /** Enable tree mode (chevron column, nested expansion, lazy children). */\n readonly tree = input<boolean>(false);\n\n /**\n * Property name (or function) that extracts the row's stable identity.\n * Required when `tree=true`. Used as the expansion key and as the\n * `parentId` value the WC sends in `mp-datatable-fetch-request`.\n */\n readonly idKey = input<TreeIdKey<TData> | null>(null);\n\n /**\n * Property name on the row holding the direct-child count. Drives chevron\n * visibility AND placeholder reservation for lazy children. Required when\n * `tree=true`.\n */\n readonly childCountKey = input<string | null>(null);\n\n /** Indent in rem per depth level on the chevron cell. Default `1.25`. */\n readonly treeIndent = input<number>(1.25);\n\n /** Two-way bound set of expanded-row ids (keyed by `idKey`). */\n readonly expandedIds = model<Set<unknown>>(new Set());\n\n /**\n * `'flat'` (default) leaves selection to per-row toggles; `'cascading'`\n * (recommended in tree mode) propagates a parent toggle to all loaded\n * descendants and surfaces an indeterminate state on partially-selected\n * parents.\n */\n readonly selectionStrategy = input<TreeSelectionStrategy>('flat');\n\n /** Emitted after a row is expanded. */\n readonly rowExpand = output<BsDatatableTreeRowEvent<TData>>();\n /** Emitted after a row is collapsed. */\n readonly rowCollapse = output<BsDatatableTreeRowEvent<TData>>();\n\n readonly datatableRef = viewChild<ElementRef<MpDatatable>>('datatable');\n\n /** Column directives (header template + sortable). Wrapper-level discovery. */\n readonly columnDirectives = contentChildren(BsDatatableColumnDirective);\n\n /** Optional row template. When present, drives a per-row EmbeddedView render path. */\n readonly rowTemplate = contentChild(BsRowTemplateDirective<TData>);\n\n /**\n * Merged column defs:\n * - `[columns]` if provided\n * - else the `*bsDatatableColumn` directives mapped onto column defs whose\n * `headerRenderer` returns a DOM node produced from the directive's template.\n */\n protected readonly effectiveColumns = computed<DatatableColumnDef<TData>[]>(() => {\n const programmatic = this.columnsInput();\n if (programmatic && programmatic.length) return programmatic;\n return this.columnDirectives().map((dir): DatatableColumnDef<TData> => {\n let headerView: EmbeddedViewRef<unknown> | undefined;\n return {\n name: dir.name(),\n sortable: dir.sortable(),\n headerRenderer: () => {\n if (!headerView) {\n headerView = this.vcr.createEmbeddedView(dir.templateRef);\n this.headerViews.push(headerView);\n }\n headerView.detectChanges();\n const nodes = headerView.rootNodes.filter((n: unknown): n is Node => n instanceof Node);\n if (nodes.length === 0) return '';\n if (nodes.length === 1) return nodes[0];\n const frag = document.createDocumentFragment();\n for (const n of nodes) frag.appendChild(n);\n return frag;\n },\n };\n });\n });\n\n /** EmbeddedViews for header templates (one per column directive). */\n private headerViews: EmbeddedViewRef<unknown>[] = [];\n /** EmbeddedViews for row templates, keyed by rowKey for reuse. */\n private rowViews = new Map<string, EmbeddedViewRef<BsRowTemplateContext<TData>>>();\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n for (const v of this.headerViews) v.destroy();\n this.headerViews = [];\n for (const v of this.rowViews.values()) v.destroy();\n this.rowViews.clear();\n });\n\n // Forward the `[fetch]` callback to the WC, which owns the entire\n // server-paged loop (initial page, on-demand windows, tree children,\n // pagination, sort/perPage reloads) and derives `totalRecords` from the\n // response. The wrapper no longer runs any fetch loop. Skipped on the\n // server so SSR doesn't kick off a client fetch.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n if (isPlatformServer(this.platformId)) return;\n el.fetch = (this.fetch() as unknown as MpDatatable['fetch']) ?? null;\n });\n\n // Forward columns to the WC.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.columns = this.effectiveColumns() as DatatableColumnDef[];\n });\n\n // Static `[data]` only. When `[fetch]` is set the WC owns the rows, so the\n // wrapper must not also push `el.data` (it would clobber fetched pages).\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n if (this.fetch()) return;\n const d = this.data();\n el.data = (d ?? []) as unknown[];\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const settings = this.settings();\n const fetching = !!this.fetch();\n const virtual = this.virtualScroll();\n el.sortColumns = settings.sortColumns.map((c) => ({ property: c.property, direction: c.direction }));\n el.autoSort = !fetching;\n // Pagination renders in non-virtual mode; in fetch mode the wrapper\n // owns page state and the WC just reports the change via event.\n el.pagination = this.pagination() && !virtual;\n el.page = settings.page.selected;\n el.perPage = settings.perPage.selected;\n el.perPageOptions = settings.perPage.values;\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const mode = this.selectable() ?? this.selectionMode();\n el.selectionMode = mode;\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.rowKey = (row, index) => this.rowKey()(row as TData, index);\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.resizableColumns = this.resizableColumns();\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.virtualScroll = this.virtualScroll();\n el.itemSize = this.itemSize();\n el.virtualBuffer = this.virtualBuffer();\n });\n\n // Tree-mode prop sync to the WC.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.tree = this.tree();\n el.idKey = this.idKey() as TreeIdKey;\n el.childCountKey = this.childCountKey();\n el.treeIndent = this.treeIndent();\n el.selectionStrategy = this.selectionStrategy();\n });\n\n // Two-way bind `expandedIds` to the WC. Skip-on-echo via structural equality\n // — the WC's getter returns a fresh Set on every read.\n effect(() => {\n const desired = this.expandedIds();\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const current = el.expandedIds;\n if (setsEqual(current, desired)) return;\n el.expandedIds = desired;\n });\n\n // Wire the row renderer when *bsRowTemplate is provided.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const tpl = this.rowTemplate();\n if (!tpl) {\n el.rowRenderer = undefined;\n // Destroy any stale row views.\n for (const v of this.rowViews.values()) v.destroy();\n this.rowViews.clear();\n return;\n }\n el.rowRenderer = this.buildRowRenderer(tpl) as RowRenderer;\n });\n\n // Selection rows → IDs forwarded to WC.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const rows = this.selection();\n const keyFn = this.rowKey();\n el.selectedIds = rows.map((row, i) => keyFn(row, i));\n });\n }\n\n ngAfterViewInit(): void {\n // Effects above re-run as the view is created; nothing else needed.\n }\n\n private buildRowRenderer(tpl: BsRowTemplateDirective<TData>): RowRenderer<TData> {\n return (row, rowIndex, ctx) => {\n // Placeholder rows (tree-mode, children pending fetch) get a synthetic key\n // so the view is reused per slot. Consumers detect them via `isPlaceholder`.\n const isPlaceholder = ctx?.isPlaceholder ?? row === undefined;\n const depth = ctx?.depth ?? 0;\n const isExpanded = ctx?.isExpanded ?? false;\n const key = isPlaceholder\n ? `__placeholder-${rowIndex}`\n : this.rowKey()(row as TData, rowIndex);\n let viewRef = this.rowViews.get(key);\n if (!viewRef) {\n const context = new BsRowTemplateContext<TData>();\n context.$implicit = row as TData | undefined;\n context.index = rowIndex;\n context.depth = depth;\n context.isExpanded = isExpanded;\n context.isPlaceholder = isPlaceholder;\n viewRef = this.vcr.createEmbeddedView(tpl.templateRef, context);\n this.rowViews.set(key, viewRef);\n } else {\n viewRef.context.$implicit = row as TData | undefined;\n viewRef.context.index = rowIndex;\n viewRef.context.depth = depth;\n viewRef.context.isExpanded = isExpanded;\n viewRef.context.isPlaceholder = isPlaceholder;\n }\n viewRef.detectChanges();\n const nodes = viewRef.rootNodes.filter((n: unknown): n is Node => n instanceof Node);\n return nodes;\n };\n }\n\n // ─── WC event handlers ───────────────────────────────────────────────────\n\n onSortChange(event: Event): void {\n const detail = (event as CustomEvent<SortChangeEventDetail>).detail;\n const settings = this.settings();\n this.settings.set(\n new DatatableSettings({\n ...settings,\n sortColumns: detail.sortColumns as SortColumn[],\n page: { ...settings.page, selected: 1 },\n }),\n );\n }\n\n onSelectionChange(event: Event): void {\n const detail = (event as CustomEvent<SelectionChangeEventDetail<TData>>).detail;\n // The WC owns the data and resolves ids → row objects itself (across page 1,\n // fetched windows, and tree children), so we take the rows straight from the\n // event — no wrapper-side row bookkeeping.\n this.selection.set([...detail.selectedRows]);\n }\n\n onPageChange(event: Event): void {\n const detail = (event as CustomEvent<{ page: number }>).detail;\n const settings = this.settings();\n this.settings.set(\n new DatatableSettings({\n ...settings,\n page: { ...settings.page, selected: detail.page },\n }),\n );\n }\n\n onPerPageChange(event: Event): void {\n const detail = (event as CustomEvent<{ perPage: number }>).detail;\n const settings = this.settings();\n this.settings.set(\n new DatatableSettings({\n ...settings,\n perPage: { ...settings.perPage, selected: detail.perPage },\n page: { ...settings.page, selected: 1 },\n }),\n );\n }\n\n onRowClick(event: Event): void {\n this.rowClick.emit(this.toBsEvent(event));\n }\n onRowDblClick(event: Event): void {\n this.rowDblClick.emit(this.toBsEvent(event));\n }\n onRowContextMenu(event: Event): void {\n this.rowContextMenu.emit(this.toBsEvent(event));\n }\n\n // ─── Tree-mode event handlers ────────────────────────────────────────────\n\n onRowExpand(event: Event): void {\n const detail = (event as CustomEvent<TreeRowExpandDetail<TData>>).detail;\n this.rowExpand.emit({ row: detail.row, depth: detail.depth, parentId: detail.parentId });\n }\n\n onRowCollapse(event: Event): void {\n const detail = (event as CustomEvent<TreeRowExpandDetail<TData>>).detail;\n this.rowCollapse.emit({ row: detail.row, depth: detail.depth, parentId: detail.parentId });\n }\n\n onExpandedIdsChange(event: Event): void {\n const detail = (event as CustomEvent<TreeExpandedIdsChangeDetail>).detail;\n const next = new Set(detail.expandedIds);\n if (setsEqual(this.expandedIds(), next)) return;\n this.expandedIds.set(next);\n }\n\n private toBsEvent(event: Event): BsDatatableRowEvent<TData> {\n const detail = (event as CustomEvent<RowEventDetail<TData>>).detail;\n return {\n row: detail.row,\n rowIndex: detail.rowIndex,\n rowKey: detail.rowKey,\n originalEvent: detail.originalEvent,\n };\n }\n}\n\nfunction setsEqual<T>(\n a: Set<T> | ReadonlyArray<T> | null | undefined,\n b: Set<T> | ReadonlyArray<T> | null | undefined,\n): boolean {\n // In SSR the WC isn't upgraded yet, so reading `el.expandedIds` returns\n // `undefined` instead of the getter's `new Set()`. Treat both-missing as\n // equal so the sync effect short-circuits cleanly during pre-hydration.\n if (a == null && b == null) return true;\n if (a == null || b == null) return false;\n const aSize = a instanceof Set ? a.size : a.length;\n const bSize = b instanceof Set ? b.size : b.length;\n if (aSize !== bSize) return false;\n const bSet = b instanceof Set ? b : new Set(b);\n for (const v of a) if (!bSet.has(v)) return false;\n return true;\n}\n\nexport { computeNextSort };\n","<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","/**\n * Generated b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../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-settings.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-column/datatable-column.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/row-template/row-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable/datatable.component.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable/datatable.component.html","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-filter-panel/datatable-filter-panel.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/mintplayer-ng-bootstrap-datatable.ts"],"sourcesContent":["import { PaginationRequest, SortColumn } from \"@mintplayer/pagination\";\n\nexport class DatatableSettings {\n constructor(data?: Partial<DatatableSettings>) {\n Object.assign(this, data);\n\n if (data && data.perPage) {\n this.perPage = data.perPage;\n } else {\n // Set default value\n this.perPage = {\n values: [10, 20, 50],\n selected: 20\n };\n }\n\n if (data && data.page) {\n this.page = data.page;\n } else {\n // Set default value\n this.page = {\n values: [1],\n selected: 1\n };\n }\n }\n\n public sortColumns: SortColumn[] = [];\n public perPage: { values: number[], selected: number };\n public page: { values: number[], selected: number };\n public pageNumberOfBoxes: number = 11;\n\n public toPagination() {\n const res = <PaginationRequest>{\n sortColumns: this.sortColumns,\n perPage: this.perPage.selected,\n page: this.page.selected\n };\n return res;\n }\n}","import { Directive, inject, input, TemplateRef, type Signal } from '@angular/core';\nimport type {\n FilterContext,\n FilterInputType,\n FilterMode,\n FilterOperator,\n FilterSelection,\n DistinctValues,\n} from '@mintplayer/web-components/datatable';\n\n/**\n * Context of a `*bsDatatableFilterPanel` template.\n *\n * `$implicit` is a **Signal**, not a plain object. The demos and the specs run\n * zoneless, where mutating a context object notifies nothing and the panel never\n * repaints; a signal the wrapper writes to is what makes the override update as\n * values load.\n */\nexport interface BsDatatableFilterPanelContext {\n $implicit: Signal<DistinctValues | null>;\n ctx: FilterContext;\n}\n\n/**\n * Declares a column in `<bs-datatable>`.\n *\n * - `bsDatatableColumn` (the directive value) is the **data property name** —\n * it must match the field key on each row in the fetched data and is what\n * `SortColumn.property` references when the column is clicked.\n * - The directive's **template content** is the header template — what gets\n * rendered inside the `<th>`.\n *\n * Example:\n * ```html\n * <div *bsDatatableColumn=\"'YearStarted'; sortable: true\">Year started</div>\n * ```\n *\n * Optional `bsDatatableColumnSortable` controls whether the header acts as a\n * sort toggle (default `true`).\n */\n@Directive({ selector: '[bsDatatableColumn]' })\nexport class BsDatatableColumnDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\n\n /** Data property name on each row; used as `SortColumn.property` on sort. */\n readonly name = input('', { alias: 'bsDatatableColumn' });\n\n readonly sortable = input(true, { alias: 'bsDatatableColumnSortable' });\n\n /** Opt this column into the filter row. Default `false`, unlike `sortable`. */\n readonly filterable = input(false, { alias: 'bsDatatableColumnFilterable' });\n\n /**\n * Purely visual: marks this column's trigger as \"filtered\". The component\n * attaches no meaning to it — the consumer decides when it is true, because\n * the component never filters the data itself.\n */\n readonly filterActive = input(false, { alias: 'bsDatatableColumnFilterActive' });\n\n /** Short description of the active filter, shown on the trigger and in its name. */\n readonly filterSummary = input<string | undefined>(undefined, {\n alias: 'bsDatatableColumnFilterSummary',\n });\n\n /** Initial or externally restored selection for this column's panel. */\n readonly filterSelection = input<FilterSelection | undefined>(undefined, {\n alias: 'bsDatatableColumnFilterSelection',\n });\n\n /**\n * `'values'` (default) lists the column's distinct values as checkboxes;\n * `'comparison'` offers an operator and one operand — the right shape for a\n * quantity, where ticking forty individual years is a poor way to say\n * \"after 1990\".\n */\n readonly filterMode = input<FilterMode>('values', { alias: 'bsDatatableColumnFilterMode' });\n\n /** `type` of the operand input in comparison mode. Default `'number'`. */\n readonly filterInputType = input<FilterInputType | undefined>(undefined, {\n alias: 'bsDatatableColumnFilterInputType',\n });\n\n /** Operators offered in comparison mode, in order. Defaults to all six. */\n readonly filterOperators = input<FilterOperator[] | undefined>(undefined, {\n alias: 'bsDatatableColumnFilterOperators',\n });\n\n /**\n * Set by a nested `*bsDatatableFilterPanel`, and a **plain field** rather than\n * a signal on purpose.\n *\n * The nested directive assigns this from its constructor, which runs while\n * the column's own header view is being created — i.e. inside a reactive\n * read. Writing a signal there is NG0600. Nothing reads this reactively: the\n * wrapper resolves it when the web component asks for the panel's contents,\n * which is at panel open, long after any computed has settled.\n */\n filterPanelTemplate?: TemplateRef<BsDatatableFilterPanelContext>;\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Marks an `<ng-template>` as the per-row body for `<bs-datatable>`. The\n * template's `$implicit` is the row object. The template should render one\n * `<td>` per data column (in column order).\n *\n * In tree mode (`[tree]=\"true\"`) the context also carries `depth` (0 for\n * roots, +1 per nesting level), `isExpanded`, and `isPlaceholder` (true when\n * the row is a not-yet-loaded child slot — `$implicit` is undefined).\n *\n * Example:\n * ```html\n * <ng-container *bsRowTemplate=\"let artist\">\n * <td class=\"text-nowrap\">{{ artist?.name }}</td>\n * <td class=\"text-nowrap\">{{ artist?.yearStarted }}</td>\n * </ng-container>\n *\n * <!-- tree mode: render a spinner for placeholder rows -->\n * <ng-container *bsRowTemplate=\"let item; let isPlaceholder = isPlaceholder\">\n * @if (isPlaceholder) { <td colspan=\"3\"><i>Loading…</i></td> }\n * @else { <td>{{ item.name }}</td><td>{{ item.headcount }}</td><td>{{ item.code }}</td> }\n * </ng-container>\n * ```\n */\n@Directive({ selector: '[bsRowTemplate]' })\nexport class BsRowTemplateDirective<TData = unknown> {\n readonly templateRef = inject<TemplateRef<BsRowTemplateContext<TData>>>(TemplateRef);\n\n static ngTemplateContextGuard<TData>(\n _dir: BsRowTemplateDirective<TData>,\n ctx: unknown,\n ): ctx is BsRowTemplateContext<Exclude<TData, false | 0 | '' | null | undefined>> {\n return true;\n }\n}\n\nexport class BsRowTemplateContext<TData = unknown> {\n $implicit: TData | undefined = undefined;\n index?: number;\n /** 0 for roots; +1 per nesting level. Always 0 in flat mode. */\n depth = 0;\n /** True when the row is currently expanded. Always false in flat mode. */\n isExpanded = false;\n /** True when the row is a not-yet-loaded child slot — `$implicit` is undefined. */\n isPlaceholder = false;\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n CUSTOM_ELEMENTS_SCHEMA,\n DestroyRef,\n effect,\n ElementRef,\n EmbeddedViewRef,\n type ViewRef,\n inject,\n input,\n model,\n output,\n PLATFORM_ID,\n signal,\n type WritableSignal,\n ViewContainerRef,\n viewChild,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { SortColumn } from '@mintplayer/pagination';\nimport {\n computeNextSort,\n type DatatableColumnDef,\n type DatatableDistincts,\n type DatatableLabels,\n type DatatableSelectionMode,\n type DistinctValues,\n type FilterChangeDetail,\n type MpDatatable,\n type RowEventDetail,\n type RowRenderer,\n type SortChangeEventDetail,\n type SelectionChangeEventDetail,\n type TreeRowExpandDetail,\n type TreeExpandedIdsChangeDetail,\n type TreeIdKey,\n type TreeSelectionStrategy,\n} from '@mintplayer/web-components/datatable';\n\n// Side-effect import: registers <mp-datatable>.\nimport '@mintplayer/web-components/datatable';\n\nimport { DatatableSettings } from '../datatable-settings';\nimport { BsDatatableFetch } from '../datatable-fetch';\nimport {\n BsDatatableColumnDirective,\n type BsDatatableFilterPanelContext,\n} from '../datatable-column/datatable-column.directive';\nimport { BsRowTemplateDirective, BsRowTemplateContext } from '../row-template/row-template.directive';\nimport { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';\n\nexport interface BsDatatableRowEvent<T> {\n row: T;\n rowIndex: number;\n rowKey: string;\n originalEvent: Event;\n}\n\nexport interface BsDatatableTreeRowEvent<T> {\n row: T;\n depth: number;\n parentId: unknown | null;\n}\n\n@Component({\n selector: 'bs-datatable',\n templateUrl: './datatable.component.html',\n imports: [BsForwardAriaDirective],\n styleUrls: ['./datatable.component.scss'],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsDatatableComponent<TData> implements AfterViewInit {\n private readonly platformId = inject(PLATFORM_ID);\n private readonly vcr = inject(ViewContainerRef);\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Programmatic column list. Mutually exclusive with the `*bsDatatableColumn`\n * template directives — if provided, takes precedence.\n */\n readonly columnsInput = input<DatatableColumnDef<TData>[] | null>(null, { alias: 'columns' });\n\n /**\n * The **complete** row set. Use `[fetch]` for server-side pagination.\n *\n * \"Complete\" matters to the filter panels: their value lists are computed from\n * this array, so a consumer who pages `[data]` themselves is showing the\n * component one page and will get a value list covering one page. That case\n * needs `[distincts]`.\n */\n readonly data = input<TData[] | null>(null);\n\n /** Async data loader (server-side pagination). Mutually exclusive with `[data]`. */\n readonly fetch = input<BsDatatableFetch<TData> | null>(null);\n\n /**\n * Source of distinct values for the filter panels.\n *\n * Required whenever the component does not hold every row — with `[fetch]`,\n * with external paging, or with a tree whose children are loaded on demand, a\n * locally computed list would silently omit values, so it is not computed at\n * all. Resolve `null` for a column to hand that one column back to the local\n * path.\n */\n readonly distincts = input<DatatableDistincts | null>(null);\n\n /** Partial override of the component's user-visible strings. */\n readonly labels = input<Partial<DatatableLabels> | null>(null);\n\n /** Two-way bound pagination / sort settings. */\n readonly settings = model<DatatableSettings>(new DatatableSettings());\n\n /** `'none'` hides selection; `'multiple'` shows checkboxes; `'single'` is a single-row selection. */\n readonly selectionMode = input<DatatableSelectionMode>('none');\n /** @deprecated Use `selectionMode`. Kept for source-level compatibility. */\n readonly selectable = input<DatatableSelectionMode | undefined>(undefined);\n\n /** Two-way bound array of selected rows (identity via `rowKey`). */\n readonly selection = model<TData[]>([]);\n\n /** Required for selection / async refetch identity. Default `String((row as any).id)`. */\n readonly rowKey = input<(row: TData, index: number) => string>((row: TData, index: number) => {\n const r = row as { id?: unknown } | null;\n return r && r.id != null ? String(r.id) : `row-${index}`;\n });\n\n /** Drag-resize column widths. Default `true`. */\n readonly resizableColumns = input<boolean>(true);\n\n /** Built-in pagination footer. Ignored when `[fetch]` is provided (server-side paging owns the page state). */\n readonly pagination = input<boolean>(true);\n\n /** Enable virtual scrolling for large datasets. */\n readonly virtualScroll = input<boolean>(false);\n /** Approximate row height in px (drives virtual scroll). */\n readonly itemSize = input<number>(40);\n /** Off-screen row buffer per side for virtual scrolling. */\n readonly virtualBuffer = input<number>(10);\n\n /** Forwarded to the inner table (legacy responsive flag, currently a CSS hook). */\n readonly isResponsive = input<boolean>(false);\n\n /** Optional row equality predicate (selection identity across re-fetches). */\n readonly compareWith = input<((a: TData, b: TData) => boolean) | undefined>(undefined);\n\n /** Emitted on row single-click. */\n readonly rowClick = output<BsDatatableRowEvent<TData>>();\n /** Emitted on row double-click. */\n readonly rowDblClick = output<BsDatatableRowEvent<TData>>();\n /** Emitted on row context-menu. */\n readonly rowContextMenu = output<BsDatatableRowEvent<TData>>();\n\n // ─── Tree-mode inputs / models / outputs ─────────────────────────────────\n\n /** Enable tree mode (chevron column, nested expansion, lazy children). */\n readonly tree = input<boolean>(false);\n\n /**\n * Property name (or function) that extracts the row's stable identity.\n * Required when `tree=true`. Used as the expansion key and as the\n * `parentId` value the WC sends in `mp-datatable-fetch-request`.\n */\n readonly idKey = input<TreeIdKey<TData> | null>(null);\n\n /**\n * Property name on the row holding the direct-child count. Drives chevron\n * visibility AND placeholder reservation for lazy children. Required when\n * `tree=true`.\n */\n readonly childCountKey = input<string | null>(null);\n\n /** Indent in rem per depth level on the chevron cell. Default `1.25`. */\n readonly treeIndent = input<number>(1.25);\n\n /** Two-way bound set of expanded-row ids (keyed by `idKey`). */\n readonly expandedIds = model<Set<unknown>>(new Set());\n\n /**\n * `'flat'` (default) leaves selection to per-row toggles; `'cascading'`\n * (recommended in tree mode) propagates a parent toggle to all loaded\n * descendants and surfaces an indeterminate state on partially-selected\n * parents.\n */\n readonly selectionStrategy = input<TreeSelectionStrategy>('flat');\n\n /** Emitted after a row is expanded. */\n readonly rowExpand = output<BsDatatableTreeRowEvent<TData>>();\n /** Emitted after a row is collapsed. */\n readonly rowCollapse = output<BsDatatableTreeRowEvent<TData>>();\n\n /**\n * Emitted whenever a column's filter selection changes, including when it is\n * cleared (`selected: []`).\n *\n * The component does not filter `[data]`: acting on this — and setting\n * `filterActive` / `filterSummary` back on the column — is the consumer's job,\n * because only they know whether the filter is client-side or a new query.\n */\n readonly filterChange = output<FilterChangeDetail>();\n\n readonly datatableRef = viewChild<ElementRef<MpDatatable>>('datatable');\n\n /** Column directives (header template + sortable). Wrapper-level discovery. */\n readonly columnDirectives = contentChildren(BsDatatableColumnDirective);\n\n /** Optional row template. When present, drives a per-row EmbeddedView render path. */\n readonly rowTemplate = contentChild(BsRowTemplateDirective<TData>);\n\n /**\n * Merged column defs:\n * - `[columns]` if provided\n * - else the `*bsDatatableColumn` directives mapped onto column defs whose\n * `headerRenderer` returns a DOM node produced from the directive's template.\n */\n protected readonly effectiveColumns = computed<DatatableColumnDef<TData>[]>(() => {\n const programmatic = this.columnsInput();\n if (programmatic && programmatic.length) return programmatic;\n\n // Every recompute builds fresh closures with fresh views, so the previous\n // generation is dead the moment we return. Without retiring them they\n // accumulated until the component was destroyed — harmless-looking with one\n // view per column, twice as bad now that filters add a second.\n //\n // Retired, not destroyed: see `retireTemplateViews`. Destroying here is\n // NG0600.\n this.retireTemplateViews();\n\n return this.columnDirectives().map((dir): DatatableColumnDef<TData> => {\n let headerView: EmbeddedViewRef<unknown> | undefined;\n let filterView: EmbeddedViewRef<BsDatatableFilterPanelContext> | undefined;\n let filterValues: WritableSignal<DistinctValues | null> | undefined;\n return {\n name: dir.name(),\n sortable: dir.sortable(),\n filterable: dir.filterable(),\n filterActive: dir.filterActive(),\n filterSummary: dir.filterSummary(),\n filterSelection: dir.filterSelection(),\n filterMode: dir.filterMode(),\n filterInputType: dir.filterInputType(),\n filterOperators: dir.filterOperators(),\n headerRenderer: () => {\n if (!headerView) {\n headerView = this.vcr.createEmbeddedView(dir.templateRef);\n this.headerViews.push(headerView);\n }\n headerView.detectChanges();\n const nodes = headerView.rootNodes.filter((n: unknown): n is Node => n instanceof Node);\n if (nodes.length === 0) return '';\n if (nodes.length === 1) return nodes[0];\n const frag = document.createDocumentFragment();\n for (const n of nodes) frag.appendChild(n);\n return frag;\n },\n // Installed UNCONDITIONALLY, and the nested template is resolved inside\n // it rather than out here.\n //\n // `dir.filterPanelTemplate` is assigned by the nested directive's\n // constructor, which does not run until the column's header view is\n // created — too late for this computed's first evaluation. Reading it\n // here would see `undefined` for every column and no override would ever\n // appear. Creating the header view eagerly to force it is worse: the\n // insertion dirties Angular's query signals inside a reactive read, and\n // that throws NG0600 as soon as the host declares any `viewChild`.\n //\n // Returning `null` means \"use the built-in panel\", so a column with no\n // override costs nothing.\n filterRenderer: (_col, ctx) => {\n const tpl = dir.filterPanelTemplate;\n if (!tpl) return null;\n if (!filterView || !filterValues) {\n // The context is a signal because the demos and specs are zoneless:\n // mutating a context object notifies nothing, so the override would\n // never repaint as values load.\n filterValues = signal(ctx.values());\n filterView = this.vcr.createEmbeddedView(tpl, { $implicit: filterValues, ctx });\n this.filterViews.push(filterView);\n const values = filterValues;\n this.filterUnsubscribes.push(ctx.onChange(() => values.set(ctx.values())));\n }\n filterView.detectChanges();\n const nodes = filterView.rootNodes.filter((n: unknown): n is Node => n instanceof Node);\n if (nodes.length === 1) return nodes[0];\n const frag = document.createDocumentFragment();\n for (const n of nodes) frag.appendChild(n);\n return frag;\n },\n };\n });\n });\n\n /** EmbeddedViews for header templates (one per column directive). */\n private headerViews: EmbeddedViewRef<unknown>[] = [];\n /** EmbeddedViews for filter panel templates (one per overriding column). */\n private filterViews: EmbeddedViewRef<BsDatatableFilterPanelContext>[] = [];\n /** `FilterContext.onChange` unsubscribes, one per live filter view. */\n private filterUnsubscribes: (() => void)[] = [];\n\n /** The previous generation, awaiting disposal by the columns effect. */\n private staleViews: ViewRef[] = [];\n\n /**\n * Hands the previous generation over for disposal — it does **not** destroy\n * anything, and must not.\n *\n * This runs inside `effectiveColumns`, and destroying a view detaches it,\n * which dirties Angular's query signals: a signal write inside a computed,\n * i.e. NG0600, the moment the host declares any view query. It is the exact\n * mirror of why views are not CREATED here either — attach and detach are\n * both signal writes, so neither belongs in a computed.\n *\n * Handing over is a plain field write, and the effect that forwards the\n * columns disposes the batch on the same tick, so the leak this replaced\n * stays fixed: at most one dead generation exists, and only momentarily.\n */\n private retireTemplateViews(): void {\n this.staleViews.push(...this.headerViews, ...this.filterViews);\n this.headerViews = [];\n this.filterViews = [];\n this.releaseFilterSubscriptions();\n }\n\n /** Destroys the retired generation. Only ever called from an effect. */\n private disposeStaleViews(): void {\n for (const v of this.staleViews) v.destroy();\n this.staleViews = [];\n }\n\n /**\n * Without this the web component keeps calling into a destroyed view's signal\n * on every value change, for the life of the element.\n */\n private releaseFilterSubscriptions(): void {\n for (const unsubscribe of this.filterUnsubscribes) unsubscribe();\n this.filterUnsubscribes = [];\n }\n /** EmbeddedViews for row templates, keyed by rowKey for reuse. */\n private rowViews = new Map<string, EmbeddedViewRef<BsRowTemplateContext<TData>>>();\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n // Deliberately does NOT destroy the views. Every one of them is attached\n // to this component's ViewContainerRef, so Angular tears them down with\n // the host view; destroying them again from a cleanup hook re-enters that\n // teardown and desynchronises the container's view bookkeeping — a hard\n // \"attached view should be in the same position within its container\"\n // assertion in dev mode. It only surfaces once a header template contains\n // a nested structural directive, which `*bsDatatableFilterPanel` is, so\n // the previous code looked correct right up until it was not.\n //\n // The subscriptions are the only thing here Angular knows nothing about.\n this.releaseFilterSubscriptions();\n this.headerViews = [];\n this.filterViews = [];\n this.staleViews = [];\n this.rowViews.clear();\n });\n\n // Forward the `[fetch]` callback to the WC, which owns the entire\n // server-paged loop (initial page, on-demand windows, tree children,\n // pagination, sort/perPage reloads) and derives `totalRecords` from the\n // response. The wrapper no longer runs any fetch loop. Skipped on the\n // server so SSR doesn't kick off a client fetch.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n if (isPlatformServer(this.platformId)) return;\n el.fetch = (this.fetch() as unknown as MpDatatable['fetch']) ?? null;\n });\n\n // Same server guard as `fetch`: the source is a network call in every real\n // consumer, and a panel cannot be opened during SSR anyway.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n if (isPlatformServer(this.platformId)) return;\n el.distincts = this.distincts();\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.labels = this.labels() ?? undefined;\n });\n\n // Forward columns to the WC, and dispose the generation the recompute\n // retired. An effect may write signals; a computed may not, which is the\n // whole reason the disposal happens out here.\n effect(() => {\n const columns = this.effectiveColumns();\n this.disposeStaleViews();\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.columns = columns as DatatableColumnDef[];\n });\n\n // Static `[data]` only. When `[fetch]` is set the WC owns the rows, so the\n // wrapper must not also push `el.data` (it would clobber fetched pages).\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n if (this.fetch()) return;\n const d = this.data();\n el.data = (d ?? []) as unknown[];\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const settings = this.settings();\n const fetching = !!this.fetch();\n const virtual = this.virtualScroll();\n el.sortColumns = settings.sortColumns.map((c) => ({ property: c.property, direction: c.direction }));\n el.autoSort = !fetching;\n // Pagination renders in non-virtual mode; in fetch mode the wrapper\n // owns page state and the WC just reports the change via event.\n el.pagination = this.pagination() && !virtual;\n el.page = settings.page.selected;\n el.perPage = settings.perPage.selected;\n el.perPageOptions = settings.perPage.values;\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const mode = this.selectable() ?? this.selectionMode();\n el.selectionMode = mode;\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.rowKey = (row, index) => this.rowKey()(row as TData, index);\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.resizableColumns = this.resizableColumns();\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.virtualScroll = this.virtualScroll();\n el.itemSize = this.itemSize();\n el.virtualBuffer = this.virtualBuffer();\n });\n\n // Tree-mode prop sync to the WC.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.tree = this.tree();\n el.idKey = this.idKey() as TreeIdKey;\n el.childCountKey = this.childCountKey();\n el.treeIndent = this.treeIndent();\n el.selectionStrategy = this.selectionStrategy();\n });\n\n // Two-way bind `expandedIds` to the WC. Skip-on-echo via structural equality\n // — the WC's getter returns a fresh Set on every read.\n effect(() => {\n const desired = this.expandedIds();\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const current = el.expandedIds;\n if (setsEqual(current, desired)) return;\n el.expandedIds = desired;\n });\n\n // Wire the row renderer when *bsRowTemplate is provided.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const tpl = this.rowTemplate();\n if (!tpl) {\n el.rowRenderer = undefined;\n // Destroy any stale row views.\n for (const v of this.rowViews.values()) v.destroy();\n this.rowViews.clear();\n return;\n }\n el.rowRenderer = this.buildRowRenderer(tpl) as RowRenderer;\n });\n\n // Selection rows → IDs forwarded to WC.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const rows = this.selection();\n const keyFn = this.rowKey();\n el.selectedIds = rows.map((row, i) => keyFn(row, i));\n });\n }\n\n ngAfterViewInit(): void {\n // Effects above re-run as the view is created; nothing else needed.\n }\n\n private buildRowRenderer(tpl: BsRowTemplateDirective<TData>): RowRenderer<TData> {\n return (row, rowIndex, ctx) => {\n // Placeholder rows (tree-mode, children pending fetch) get a synthetic key\n // so the view is reused per slot. Consumers detect them via `isPlaceholder`.\n const isPlaceholder = ctx?.isPlaceholder ?? row === undefined;\n const depth = ctx?.depth ?? 0;\n const isExpanded = ctx?.isExpanded ?? false;\n const key = isPlaceholder\n ? `__placeholder-${rowIndex}`\n : this.rowKey()(row as TData, rowIndex);\n let viewRef = this.rowViews.get(key);\n if (!viewRef) {\n const context = new BsRowTemplateContext<TData>();\n context.$implicit = row as TData | undefined;\n context.index = rowIndex;\n context.depth = depth;\n context.isExpanded = isExpanded;\n context.isPlaceholder = isPlaceholder;\n viewRef = this.vcr.createEmbeddedView(tpl.templateRef, context);\n this.rowViews.set(key, viewRef);\n } else {\n viewRef.context.$implicit = row as TData | undefined;\n viewRef.context.index = rowIndex;\n viewRef.context.depth = depth;\n viewRef.context.isExpanded = isExpanded;\n viewRef.context.isPlaceholder = isPlaceholder;\n }\n viewRef.detectChanges();\n const nodes = viewRef.rootNodes.filter((n: unknown): n is Node => n instanceof Node);\n return nodes;\n };\n }\n\n // ─── WC event handlers ───────────────────────────────────────────────────\n\n onSortChange(event: Event): void {\n const detail = (event as CustomEvent<SortChangeEventDetail>).detail;\n const settings = this.settings();\n this.settings.set(\n new DatatableSettings({\n ...settings,\n sortColumns: detail.sortColumns as SortColumn[],\n page: { ...settings.page, selected: 1 },\n }),\n );\n }\n\n onSelectionChange(event: Event): void {\n const detail = (event as CustomEvent<SelectionChangeEventDetail<TData>>).detail;\n // The WC owns the data and resolves ids → row objects itself (across page 1,\n // fetched windows, and tree children), so we take the rows straight from the\n // event — no wrapper-side row bookkeeping.\n this.selection.set([...detail.selectedRows]);\n }\n\n onPageChange(event: Event): void {\n const detail = (event as CustomEvent<{ page: number }>).detail;\n const settings = this.settings();\n this.settings.set(\n new DatatableSettings({\n ...settings,\n page: { ...settings.page, selected: detail.page },\n }),\n );\n }\n\n onPerPageChange(event: Event): void {\n const detail = (event as CustomEvent<{ perPage: number }>).detail;\n const settings = this.settings();\n this.settings.set(\n new DatatableSettings({\n ...settings,\n perPage: { ...settings.perPage, selected: detail.perPage },\n page: { ...settings.page, selected: 1 },\n }),\n );\n }\n\n onRowClick(event: Event): void {\n this.rowClick.emit(this.toBsEvent(event));\n }\n onRowDblClick(event: Event): void {\n this.rowDblClick.emit(this.toBsEvent(event));\n }\n onRowContextMenu(event: Event): void {\n this.rowContextMenu.emit(this.toBsEvent(event));\n }\n\n // ─── Tree-mode event handlers ────────────────────────────────────────────\n\n onRowExpand(event: Event): void {\n const detail = (event as CustomEvent<TreeRowExpandDetail<TData>>).detail;\n this.rowExpand.emit({ row: detail.row, depth: detail.depth, parentId: detail.parentId });\n }\n\n onRowCollapse(event: Event): void {\n const detail = (event as CustomEvent<TreeRowExpandDetail<TData>>).detail;\n this.rowCollapse.emit({ row: detail.row, depth: detail.depth, parentId: detail.parentId });\n }\n\n onExpandedIdsChange(event: Event): void {\n const detail = (event as CustomEvent<TreeExpandedIdsChangeDetail>).detail;\n const next = new Set(detail.expandedIds);\n if (setsEqual(this.expandedIds(), next)) return;\n this.expandedIds.set(next);\n }\n\n onFilterChange(event: Event): void {\n this.filterChange.emit((event as CustomEvent<FilterChangeDetail>).detail);\n }\n\n private toBsEvent(event: Event): BsDatatableRowEvent<TData> {\n const detail = (event as CustomEvent<RowEventDetail<TData>>).detail;\n return {\n row: detail.row,\n rowIndex: detail.rowIndex,\n rowKey: detail.rowKey,\n originalEvent: detail.originalEvent,\n };\n }\n}\n\nfunction setsEqual<T>(\n a: Set<T> | ReadonlyArray<T> | null | undefined,\n b: Set<T> | ReadonlyArray<T> | null | undefined,\n): boolean {\n // In SSR the WC isn't upgraded yet, so reading `el.expandedIds` returns\n // `undefined` instead of the getter's `new Set()`. Treat both-missing as\n // equal so the sync effect short-circuits cleanly during pre-hydration.\n if (a == null && b == null) return true;\n if (a == null || b == null) return false;\n const aSize = a instanceof Set ? a.size : a.length;\n const bSize = b instanceof Set ? b.size : b.length;\n if (aSize !== bSize) return false;\n const bSet = b instanceof Set ? b : new Set(b);\n for (const v of a) if (!bSet.has(v)) return false;\n return true;\n}\n\nexport { computeNextSort };\n","<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","import { DestroyRef, Directive, inject, TemplateRef } from '@angular/core';\nimport {\n BsDatatableColumnDirective,\n type BsDatatableFilterPanelContext,\n} from '../datatable-column/datatable-column.directive';\n\n/**\n * Overrides the filter panel of the column it is nested in.\n *\n * ```html\n * <div *bsDatatableColumn=\"'country'; filterable: true\">\n * Country\n * <ng-container *bsDatatableFilterPanel=\"let values\">\n * <my-panel [values]=\"values()\"></my-panel>\n * </ng-container>\n * </div>\n * ```\n *\n * Nested inside the column rather than a sibling keyed by name: the column is\n * the thing being configured, and a name-keyed sibling has no way to fail loudly\n * when the two names drift apart. It is also the pattern every other per-item\n * override in this workspace uses.\n *\n * Omitting it is not a lesser option — the web component renders a built-in\n * panel (search, include/exclude, checkbox list, clear) which React and Vue get\n * for free. This directive is for the cases that need something else.\n *\n * ### Inputs on the column, not here\n *\n * `filterable`, `filterActive`, `filterSummary` and `filterSelection` are inputs\n * on `*bsDatatableColumn`. They cannot live here: this directive's own inputs\n * are not yet set when its constructor runs, and the constructor is the only\n * point at which it can register itself with the column early enough.\n */\n@Directive({ selector: '[bsDatatableFilterPanel]' })\nexport class BsDatatableFilterPanelDirective {\n private readonly column = inject(BsDatatableColumnDirective);\n private readonly templateRef =\n inject<TemplateRef<BsDatatableFilterPanelContext>>(TemplateRef);\n\n constructor() {\n // A plain field assignment, deliberately. See the field's own comment on\n // `BsDatatableColumnDirective`: a signal write here is NG0600.\n this.column.filterPanelTemplate = this.templateRef;\n\n inject(DestroyRef).onDestroy(() => {\n // Guarded: under `@if`, the incoming directive's constructor can run\n // before the outgoing one's destroy hook, and an unguarded clear would\n // erase the template that just replaced this one.\n if (this.column.filterPanelTemplate === this.templateRef) {\n this.column.filterPanelTemplate = undefined;\n }\n });\n }\n\n /**\n * Lets `let values = $implicit` and `let ctx = ctx` type-check against the\n * real context. Without it both are `any`, so `values().anything.deeper`\n * compiles and fails at runtime.\n */\n static ngTemplateContextGuard(\n _dir: BsDatatableFilterPanelDirective,\n _ctx: unknown,\n ): _ctx is BsDatatableFilterPanelContext {\n return true;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAEa,iBAAiB,CAAA;AAC1B,IAAA,WAAA,CAAY,IAAiC,EAAA;QAwBtC,IAAA,CAAA,WAAW,GAAiB,EAAE;QAG9B,IAAA,CAAA,iBAAiB,GAAW,EAAE;AA1BjC,QAAA,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC;AAEzB,QAAA,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE;AACtB,YAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO;QAC/B;aAAO;;YAEH,IAAI,CAAC,OAAO,GAAG;AACX,gBAAA,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AACpB,gBAAA,QAAQ,EAAE;aACb;QACL;AAEA,QAAA,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE;AACnB,YAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI;QACzB;aAAO;;YAEH,IAAI,CAAC,IAAI,GAAG;gBACR,MAAM,EAAE,CAAC,CAAC,CAAC;AACX,gBAAA,QAAQ,EAAE;aACb;QACL;IACJ;IAOO,YAAY,GAAA;AACf,QAAA,MAAM,GAAG,GAAsB;YAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;AAC7B,YAAA,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ;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A,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA/B,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,SAAS;mBAAC,EAAE,QAAQ,EAAE,0BAA0B,EAAE;;;AClCnD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef, AfterViewInit, ElementRef } from '@angular/core';
|
|
3
|
-
import { DatatableColumnDef, DatatableSelectionMode, TreeIdKey, TreeSelectionStrategy, MpDatatable } from '@mintplayer/web-components/datatable';
|
|
4
|
-
export { CellContent, CellRenderer, DatatableColumnDef, DatatableFetch, DatatableFetchRequest, DatatableFetchResponse, DatatableSelectionMode, HeaderRenderer, RowEventDetail, RowKey, RowRenderContext, RowRenderer, SelectionChangeEventDetail, SortChangeEventDetail, TreeExpandedIdsChangeDetail, TreeIdKey, TreeRowExpandDetail, TreeSelectionStrategy, computeNextSort } from '@mintplayer/web-components/datatable';
|
|
2
|
+
import { TemplateRef, Signal, AfterViewInit, ElementRef } from '@angular/core';
|
|
3
|
+
import { FilterSelection, FilterMode, FilterInputType, FilterOperator, DistinctValues, FilterContext, DatatableColumnDef, DatatableDistincts, DatatableLabels, DatatableSelectionMode, TreeIdKey, TreeSelectionStrategy, FilterChangeDetail, MpDatatable } from '@mintplayer/web-components/datatable';
|
|
4
|
+
export { CellContent, CellRenderer, ComparisonFilterChangeDetail, DatatableColumnDef, DatatableDistincts, DatatableFetch, DatatableFetchRequest, DatatableFetchResponse, DatatableLabels, DatatableSelectionMode, DistinctValue, DistinctValues, DistinctsRequest, FilterChangeDetail, FilterContext, FilterInputType, FilterMode, FilterOperator, FilterRenderer, FilterSelection, HeaderRenderer, RowEventDetail, RowKey, RowRenderContext, RowRenderer, SelectionChangeEventDetail, SortChangeEventDetail, TreeExpandedIdsChangeDetail, TreeIdKey, TreeRowExpandDetail, TreeSelectionStrategy, ValuesFilterChangeDetail, computeNextSort } from '@mintplayer/web-components/datatable';
|
|
5
5
|
import { SortColumn, PaginationRequest, PaginationResponse } from '@mintplayer/pagination';
|
|
6
6
|
|
|
7
7
|
declare class DatatableSettings {
|
|
@@ -33,6 +33,18 @@ interface BsDatatableFetchRequest extends PaginationRequest {
|
|
|
33
33
|
}
|
|
34
34
|
type BsDatatableFetch<T> = (req: BsDatatableFetchRequest) => Promise<PaginationResponse<T>>;
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Context of a `*bsDatatableFilterPanel` template.
|
|
38
|
+
*
|
|
39
|
+
* `$implicit` is a **Signal**, not a plain object. The demos and the specs run
|
|
40
|
+
* zoneless, where mutating a context object notifies nothing and the panel never
|
|
41
|
+
* repaints; a signal the wrapper writes to is what makes the override update as
|
|
42
|
+
* values load.
|
|
43
|
+
*/
|
|
44
|
+
interface BsDatatableFilterPanelContext {
|
|
45
|
+
$implicit: Signal<DistinctValues | null>;
|
|
46
|
+
ctx: FilterContext;
|
|
47
|
+
}
|
|
36
48
|
/**
|
|
37
49
|
* Declares a column in `<bs-datatable>`.
|
|
38
50
|
*
|
|
@@ -55,8 +67,42 @@ declare class BsDatatableColumnDirective {
|
|
|
55
67
|
/** Data property name on each row; used as `SortColumn.property` on sort. */
|
|
56
68
|
readonly name: _angular_core.InputSignal<string>;
|
|
57
69
|
readonly sortable: _angular_core.InputSignal<boolean>;
|
|
70
|
+
/** Opt this column into the filter row. Default `false`, unlike `sortable`. */
|
|
71
|
+
readonly filterable: _angular_core.InputSignal<boolean>;
|
|
72
|
+
/**
|
|
73
|
+
* Purely visual: marks this column's trigger as "filtered". The component
|
|
74
|
+
* attaches no meaning to it — the consumer decides when it is true, because
|
|
75
|
+
* the component never filters the data itself.
|
|
76
|
+
*/
|
|
77
|
+
readonly filterActive: _angular_core.InputSignal<boolean>;
|
|
78
|
+
/** Short description of the active filter, shown on the trigger and in its name. */
|
|
79
|
+
readonly filterSummary: _angular_core.InputSignal<string | undefined>;
|
|
80
|
+
/** Initial or externally restored selection for this column's panel. */
|
|
81
|
+
readonly filterSelection: _angular_core.InputSignal<FilterSelection | undefined>;
|
|
82
|
+
/**
|
|
83
|
+
* `'values'` (default) lists the column's distinct values as checkboxes;
|
|
84
|
+
* `'comparison'` offers an operator and one operand — the right shape for a
|
|
85
|
+
* quantity, where ticking forty individual years is a poor way to say
|
|
86
|
+
* "after 1990".
|
|
87
|
+
*/
|
|
88
|
+
readonly filterMode: _angular_core.InputSignal<FilterMode>;
|
|
89
|
+
/** `type` of the operand input in comparison mode. Default `'number'`. */
|
|
90
|
+
readonly filterInputType: _angular_core.InputSignal<FilterInputType | undefined>;
|
|
91
|
+
/** Operators offered in comparison mode, in order. Defaults to all six. */
|
|
92
|
+
readonly filterOperators: _angular_core.InputSignal<FilterOperator[] | undefined>;
|
|
93
|
+
/**
|
|
94
|
+
* Set by a nested `*bsDatatableFilterPanel`, and a **plain field** rather than
|
|
95
|
+
* a signal on purpose.
|
|
96
|
+
*
|
|
97
|
+
* The nested directive assigns this from its constructor, which runs while
|
|
98
|
+
* the column's own header view is being created — i.e. inside a reactive
|
|
99
|
+
* read. Writing a signal there is NG0600. Nothing reads this reactively: the
|
|
100
|
+
* wrapper resolves it when the web component asks for the panel's contents,
|
|
101
|
+
* which is at panel open, long after any computed has settled.
|
|
102
|
+
*/
|
|
103
|
+
filterPanelTemplate?: TemplateRef<BsDatatableFilterPanelContext>;
|
|
58
104
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsDatatableColumnDirective, never>;
|
|
59
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsDatatableColumnDirective, "[bsDatatableColumn]", never, { "name": { "alias": "bsDatatableColumn"; "required": false; "isSignal": true; }; "sortable": { "alias": "bsDatatableColumnSortable"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
105
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsDatatableColumnDirective, "[bsDatatableColumn]", never, { "name": { "alias": "bsDatatableColumn"; "required": false; "isSignal": true; }; "sortable": { "alias": "bsDatatableColumnSortable"; "required": false; "isSignal": true; }; "filterable": { "alias": "bsDatatableColumnFilterable"; "required": false; "isSignal": true; }; "filterActive": { "alias": "bsDatatableColumnFilterActive"; "required": false; "isSignal": true; }; "filterSummary": { "alias": "bsDatatableColumnFilterSummary"; "required": false; "isSignal": true; }; "filterSelection": { "alias": "bsDatatableColumnFilterSelection"; "required": false; "isSignal": true; }; "filterMode": { "alias": "bsDatatableColumnFilterMode"; "required": false; "isSignal": true; }; "filterInputType": { "alias": "bsDatatableColumnFilterInputType"; "required": false; "isSignal": true; }; "filterOperators": { "alias": "bsDatatableColumnFilterOperators"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
60
106
|
}
|
|
61
107
|
|
|
62
108
|
/**
|
|
@@ -119,10 +165,29 @@ declare class BsDatatableComponent<TData> implements AfterViewInit {
|
|
|
119
165
|
* template directives — if provided, takes precedence.
|
|
120
166
|
*/
|
|
121
167
|
readonly columnsInput: _angular_core.InputSignal<DatatableColumnDef<TData>[] | null>;
|
|
122
|
-
/**
|
|
168
|
+
/**
|
|
169
|
+
* The **complete** row set. Use `[fetch]` for server-side pagination.
|
|
170
|
+
*
|
|
171
|
+
* "Complete" matters to the filter panels: their value lists are computed from
|
|
172
|
+
* this array, so a consumer who pages `[data]` themselves is showing the
|
|
173
|
+
* component one page and will get a value list covering one page. That case
|
|
174
|
+
* needs `[distincts]`.
|
|
175
|
+
*/
|
|
123
176
|
readonly data: _angular_core.InputSignal<TData[] | null>;
|
|
124
177
|
/** Async data loader (server-side pagination). Mutually exclusive with `[data]`. */
|
|
125
178
|
readonly fetch: _angular_core.InputSignal<BsDatatableFetch<TData> | null>;
|
|
179
|
+
/**
|
|
180
|
+
* Source of distinct values for the filter panels.
|
|
181
|
+
*
|
|
182
|
+
* Required whenever the component does not hold every row — with `[fetch]`,
|
|
183
|
+
* with external paging, or with a tree whose children are loaded on demand, a
|
|
184
|
+
* locally computed list would silently omit values, so it is not computed at
|
|
185
|
+
* all. Resolve `null` for a column to hand that one column back to the local
|
|
186
|
+
* path.
|
|
187
|
+
*/
|
|
188
|
+
readonly distincts: _angular_core.InputSignal<DatatableDistincts | null>;
|
|
189
|
+
/** Partial override of the component's user-visible strings. */
|
|
190
|
+
readonly labels: _angular_core.InputSignal<Partial<DatatableLabels> | null>;
|
|
126
191
|
/** Two-way bound pagination / sort settings. */
|
|
127
192
|
readonly settings: _angular_core.ModelSignal<DatatableSettings>;
|
|
128
193
|
/** `'none'` hides selection; `'multiple'` shows checkboxes; `'single'` is a single-row selection. */
|
|
@@ -182,6 +247,15 @@ declare class BsDatatableComponent<TData> implements AfterViewInit {
|
|
|
182
247
|
readonly rowExpand: _angular_core.OutputEmitterRef<BsDatatableTreeRowEvent<TData>>;
|
|
183
248
|
/** Emitted after a row is collapsed. */
|
|
184
249
|
readonly rowCollapse: _angular_core.OutputEmitterRef<BsDatatableTreeRowEvent<TData>>;
|
|
250
|
+
/**
|
|
251
|
+
* Emitted whenever a column's filter selection changes, including when it is
|
|
252
|
+
* cleared (`selected: []`).
|
|
253
|
+
*
|
|
254
|
+
* The component does not filter `[data]`: acting on this — and setting
|
|
255
|
+
* `filterActive` / `filterSummary` back on the column — is the consumer's job,
|
|
256
|
+
* because only they know whether the filter is client-side or a new query.
|
|
257
|
+
*/
|
|
258
|
+
readonly filterChange: _angular_core.OutputEmitterRef<FilterChangeDetail>;
|
|
185
259
|
readonly datatableRef: _angular_core.Signal<ElementRef<MpDatatable> | undefined>;
|
|
186
260
|
/** Column directives (header template + sortable). Wrapper-level discovery. */
|
|
187
261
|
readonly columnDirectives: _angular_core.Signal<readonly BsDatatableColumnDirective[]>;
|
|
@@ -196,6 +270,34 @@ declare class BsDatatableComponent<TData> implements AfterViewInit {
|
|
|
196
270
|
protected readonly effectiveColumns: _angular_core.Signal<DatatableColumnDef<TData>[]>;
|
|
197
271
|
/** EmbeddedViews for header templates (one per column directive). */
|
|
198
272
|
private headerViews;
|
|
273
|
+
/** EmbeddedViews for filter panel templates (one per overriding column). */
|
|
274
|
+
private filterViews;
|
|
275
|
+
/** `FilterContext.onChange` unsubscribes, one per live filter view. */
|
|
276
|
+
private filterUnsubscribes;
|
|
277
|
+
/** The previous generation, awaiting disposal by the columns effect. */
|
|
278
|
+
private staleViews;
|
|
279
|
+
/**
|
|
280
|
+
* Hands the previous generation over for disposal — it does **not** destroy
|
|
281
|
+
* anything, and must not.
|
|
282
|
+
*
|
|
283
|
+
* This runs inside `effectiveColumns`, and destroying a view detaches it,
|
|
284
|
+
* which dirties Angular's query signals: a signal write inside a computed,
|
|
285
|
+
* i.e. NG0600, the moment the host declares any view query. It is the exact
|
|
286
|
+
* mirror of why views are not CREATED here either — attach and detach are
|
|
287
|
+
* both signal writes, so neither belongs in a computed.
|
|
288
|
+
*
|
|
289
|
+
* Handing over is a plain field write, and the effect that forwards the
|
|
290
|
+
* columns disposes the batch on the same tick, so the leak this replaced
|
|
291
|
+
* stays fixed: at most one dead generation exists, and only momentarily.
|
|
292
|
+
*/
|
|
293
|
+
private retireTemplateViews;
|
|
294
|
+
/** Destroys the retired generation. Only ever called from an effect. */
|
|
295
|
+
private disposeStaleViews;
|
|
296
|
+
/**
|
|
297
|
+
* Without this the web component keeps calling into a destroyed view's signal
|
|
298
|
+
* on every value change, for the life of the element.
|
|
299
|
+
*/
|
|
300
|
+
private releaseFilterSubscriptions;
|
|
199
301
|
/** EmbeddedViews for row templates, keyed by rowKey for reuse. */
|
|
200
302
|
private rowViews;
|
|
201
303
|
constructor();
|
|
@@ -211,10 +313,53 @@ declare class BsDatatableComponent<TData> implements AfterViewInit {
|
|
|
211
313
|
onRowExpand(event: Event): void;
|
|
212
314
|
onRowCollapse(event: Event): void;
|
|
213
315
|
onExpandedIdsChange(event: Event): void;
|
|
316
|
+
onFilterChange(event: Event): void;
|
|
214
317
|
private toBsEvent;
|
|
215
318
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsDatatableComponent<any>, never>;
|
|
216
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsDatatableComponent<any>, "bs-datatable", never, { "columnsInput": { "alias": "columns"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "fetch": { "alias": "fetch"; "required": false; "isSignal": true; }; "settings": { "alias": "settings"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "rowKey": { "alias": "rowKey"; "required": false; "isSignal": true; }; "resizableColumns": { "alias": "resizableColumns"; "required": false; "isSignal": true; }; "pagination": { "alias": "pagination"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; "virtualBuffer": { "alias": "virtualBuffer"; "required": false; "isSignal": true; }; "isResponsive": { "alias": "isResponsive"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "tree": { "alias": "tree"; "required": false; "isSignal": true; }; "idKey": { "alias": "idKey"; "required": false; "isSignal": true; }; "childCountKey": { "alias": "childCountKey"; "required": false; "isSignal": true; }; "treeIndent": { "alias": "treeIndent"; "required": false; "isSignal": true; }; "expandedIds": { "alias": "expandedIds"; "required": false; "isSignal": true; }; "selectionStrategy": { "alias": "selectionStrategy"; "required": false; "isSignal": true; }; }, { "settings": "settingsChange"; "selection": "selectionChange"; "rowClick": "rowClick"; "rowDblClick": "rowDblClick"; "rowContextMenu": "rowContextMenu"; "expandedIds": "expandedIdsChange"; "rowExpand": "rowExpand"; "rowCollapse": "rowCollapse"; }, ["columnDirectives", "rowTemplate"], never, true, never>;
|
|
319
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsDatatableComponent<any>, "bs-datatable", never, { "columnsInput": { "alias": "columns"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "fetch": { "alias": "fetch"; "required": false; "isSignal": true; }; "distincts": { "alias": "distincts"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "settings": { "alias": "settings"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "rowKey": { "alias": "rowKey"; "required": false; "isSignal": true; }; "resizableColumns": { "alias": "resizableColumns"; "required": false; "isSignal": true; }; "pagination": { "alias": "pagination"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; "virtualBuffer": { "alias": "virtualBuffer"; "required": false; "isSignal": true; }; "isResponsive": { "alias": "isResponsive"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "tree": { "alias": "tree"; "required": false; "isSignal": true; }; "idKey": { "alias": "idKey"; "required": false; "isSignal": true; }; "childCountKey": { "alias": "childCountKey"; "required": false; "isSignal": true; }; "treeIndent": { "alias": "treeIndent"; "required": false; "isSignal": true; }; "expandedIds": { "alias": "expandedIds"; "required": false; "isSignal": true; }; "selectionStrategy": { "alias": "selectionStrategy"; "required": false; "isSignal": true; }; }, { "settings": "settingsChange"; "selection": "selectionChange"; "rowClick": "rowClick"; "rowDblClick": "rowDblClick"; "rowContextMenu": "rowContextMenu"; "expandedIds": "expandedIdsChange"; "rowExpand": "rowExpand"; "rowCollapse": "rowCollapse"; "filterChange": "filterChange"; }, ["columnDirectives", "rowTemplate"], never, true, never>;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Overrides the filter panel of the column it is nested in.
|
|
324
|
+
*
|
|
325
|
+
* ```html
|
|
326
|
+
* <div *bsDatatableColumn="'country'; filterable: true">
|
|
327
|
+
* Country
|
|
328
|
+
* <ng-container *bsDatatableFilterPanel="let values">
|
|
329
|
+
* <my-panel [values]="values()"></my-panel>
|
|
330
|
+
* </ng-container>
|
|
331
|
+
* </div>
|
|
332
|
+
* ```
|
|
333
|
+
*
|
|
334
|
+
* Nested inside the column rather than a sibling keyed by name: the column is
|
|
335
|
+
* the thing being configured, and a name-keyed sibling has no way to fail loudly
|
|
336
|
+
* when the two names drift apart. It is also the pattern every other per-item
|
|
337
|
+
* override in this workspace uses.
|
|
338
|
+
*
|
|
339
|
+
* Omitting it is not a lesser option — the web component renders a built-in
|
|
340
|
+
* panel (search, include/exclude, checkbox list, clear) which React and Vue get
|
|
341
|
+
* for free. This directive is for the cases that need something else.
|
|
342
|
+
*
|
|
343
|
+
* ### Inputs on the column, not here
|
|
344
|
+
*
|
|
345
|
+
* `filterable`, `filterActive`, `filterSummary` and `filterSelection` are inputs
|
|
346
|
+
* on `*bsDatatableColumn`. They cannot live here: this directive's own inputs
|
|
347
|
+
* are not yet set when its constructor runs, and the constructor is the only
|
|
348
|
+
* point at which it can register itself with the column early enough.
|
|
349
|
+
*/
|
|
350
|
+
declare class BsDatatableFilterPanelDirective {
|
|
351
|
+
private readonly column;
|
|
352
|
+
private readonly templateRef;
|
|
353
|
+
constructor();
|
|
354
|
+
/**
|
|
355
|
+
* Lets `let values = $implicit` and `let ctx = ctx` type-check against the
|
|
356
|
+
* real context. Without it both are `any`, so `values().anything.deeper`
|
|
357
|
+
* compiles and fails at runtime.
|
|
358
|
+
*/
|
|
359
|
+
static ngTemplateContextGuard(_dir: BsDatatableFilterPanelDirective, _ctx: unknown): _ctx is BsDatatableFilterPanelContext;
|
|
360
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsDatatableFilterPanelDirective, never>;
|
|
361
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsDatatableFilterPanelDirective, "[bsDatatableFilterPanel]", never, {}, {}, never, never, true, never>;
|
|
217
362
|
}
|
|
218
363
|
|
|
219
|
-
export { BsDatatableColumnDirective, BsDatatableComponent, BsRowTemplateContext, BsRowTemplateDirective, DatatableSettings };
|
|
220
|
-
export type { BsDatatableFetch, BsDatatableFetchRequest, BsDatatableRowEvent, BsDatatableTreeRowEvent };
|
|
364
|
+
export { BsDatatableColumnDirective, BsDatatableComponent, BsDatatableFilterPanelDirective, BsRowTemplateContext, BsRowTemplateDirective, DatatableSettings };
|
|
365
|
+
export type { BsDatatableFetch, BsDatatableFetchRequest, BsDatatableFilterPanelContext, BsDatatableRowEvent, BsDatatableTreeRowEvent };
|