@mintplayer/ng-bootstrap 22.2.0 → 22.4.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, signal, 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, 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
 
@@ -225,11 +225,6 @@ class BsDatatableComponent {
225
225
  /** Optional row template. When present, drives a per-row EmbeddedView render path. */
226
226
  this.rowTemplate = contentChild((BsRowTemplateDirective), /* @ts-ignore */
227
227
  ...(ngDevMode ? [{ debugName: "rowTemplate" }] : /* istanbul ignore next */ []));
228
- /** Internal data source — populated either from `data()` or from `fetch()` responses. */
229
- this.currentData = signal([], /* @ts-ignore */
230
- ...(ngDevMode ? [{ debugName: "currentData" }] : /* istanbul ignore next */ []));
231
- this.totalRecords = signal(0, /* @ts-ignore */
232
- ...(ngDevMode ? [{ debugName: "totalRecords" }] : /* istanbul ignore next */ []));
233
228
  /**
234
229
  * Merged column defs:
235
230
  * - `[columns]` if provided
@@ -269,8 +264,6 @@ class BsDatatableComponent {
269
264
  this.headerViews = [];
270
265
  /** EmbeddedViews for row templates, keyed by rowKey for reuse. */
271
266
  this.rowViews = new Map();
272
- /** Generation token: invalidates an in-flight virtual-mode preload when sort/fetcher changes. */
273
- this.virtualFetchToken = 0;
274
267
  this.destroyRef.onDestroy(() => {
275
268
  for (const v of this.headerViews)
276
269
  v.destroy();
@@ -279,66 +272,36 @@ class BsDatatableComponent {
279
272
  v.destroy();
280
273
  this.rowViews.clear();
281
274
  });
282
- // Sync data input → internal source.
275
+ // Forward the `[fetch]` callback to the WC, which owns the entire
276
+ // server-paged loop (initial page, on-demand windows, tree children,
277
+ // pagination, sort/perPage reloads) and derives `totalRecords` from the
278
+ // response. The wrapper no longer runs any fetch loop. Skipped on the
279
+ // server so SSR doesn't kick off a client fetch.
283
280
  effect(() => {
284
- const d = this.data();
285
- if (d !== null) {
286
- this.currentData.set(d);
287
- this.totalRecords.set(d.length);
288
- }
289
- });
290
- // Async fetch: re-run on fetch / settings changes. In virtual flat mode
291
- // the WC's virtualizer slices the in-memory `currentData` array, so the
292
- // wrapper drains every page from the fetcher up front. In tree mode the
293
- // wrapper does one root-page fetch; the WC pulls children on demand via
294
- // `mp-datatable-fetch-request` (bridged by `onFetchRequest` below), so
295
- // virtual + tree composes without front-loading.
296
- effect(() => {
297
- if (isPlatformServer(this.platformId))
281
+ const el = this.datatableRef()?.nativeElement;
282
+ if (!el)
298
283
  return;
299
- const fetcher = this.fetch();
300
- if (!fetcher)
284
+ if (isPlatformServer(this.platformId))
301
285
  return;
302
- const settings = this.settings();
303
- if (this.tree()) {
304
- const req = {
305
- page: settings.page.selected,
306
- perPage: settings.perPage.selected,
307
- sortColumns: settings.sortColumns,
308
- parentId: undefined,
309
- };
310
- // Sort changes invalidate the per-parent child cache (server-side sort
311
- // applies within siblings, so cached children are stale).
312
- const el = this.datatableRef()?.nativeElement;
313
- if (el && typeof el.invalidateChildren === 'function')
314
- el.invalidateChildren();
315
- void this.runFetch(fetcher, req, settings);
316
- }
317
- else if (this.virtualScroll()) {
318
- void this.runVirtualFetchAll(fetcher, settings.sortColumns);
319
- }
320
- else {
321
- const req = {
322
- page: settings.page.selected,
323
- perPage: settings.perPage.selected,
324
- sortColumns: settings.sortColumns,
325
- };
326
- void this.runFetch(fetcher, req, settings);
327
- }
286
+ el.fetch = this.fetch() ?? null;
328
287
  });
329
- // Forward columns + data to the WC.
288
+ // Forward columns to the WC.
330
289
  effect(() => {
331
290
  const el = this.datatableRef()?.nativeElement;
332
291
  if (!el)
333
292
  return;
334
293
  el.columns = this.effectiveColumns();
335
294
  });
295
+ // Static `[data]` only. When `[fetch]` is set the WC owns the rows, so the
296
+ // wrapper must not also push `el.data` (it would clobber fetched pages).
336
297
  effect(() => {
337
298
  const el = this.datatableRef()?.nativeElement;
338
299
  if (!el)
339
300
  return;
340
- el.data = this.currentData();
341
- // Stale row views for rows no longer present are pruned lazily on next render.
301
+ if (this.fetch())
302
+ return;
303
+ const d = this.data();
304
+ el.data = (d ?? []);
342
305
  });
343
306
  effect(() => {
344
307
  const el = this.datatableRef()?.nativeElement;
@@ -355,7 +318,6 @@ class BsDatatableComponent {
355
318
  el.page = settings.page.selected;
356
319
  el.perPage = settings.perPage.selected;
357
320
  el.perPageOptions = settings.perPage.values;
358
- el.totalRecords = fetching ? this.totalRecords() : null;
359
321
  });
360
322
  effect(() => {
361
323
  const el = this.datatableRef()?.nativeElement;
@@ -469,43 +431,6 @@ class BsDatatableComponent {
469
431
  return nodes;
470
432
  };
471
433
  }
472
- async runVirtualFetchAll(fetcher, sortColumns) {
473
- const token = ++this.virtualFetchToken;
474
- const perPage = 200;
475
- const first = await fetcher({ page: 1, perPage, sortColumns });
476
- if (!first || token !== this.virtualFetchToken)
477
- return;
478
- const accumulator = [...(first.data ?? [])];
479
- const totalRecords = first.totalRecords ?? accumulator.length;
480
- const totalPages = Math.max(1, first.totalPages ?? Math.ceil(totalRecords / perPage));
481
- this.currentData.set(accumulator);
482
- this.totalRecords.set(totalRecords);
483
- const remaining = Array.from({ length: totalPages - 1 }, (_, i) => i + 2);
484
- for (const page of remaining) {
485
- const response = await fetcher({ page, perPage, sortColumns });
486
- if (!response || token !== this.virtualFetchToken)
487
- return;
488
- accumulator.push(...(response.data ?? []));
489
- this.currentData.set([...accumulator]);
490
- }
491
- }
492
- async runFetch(fetcher, req, settings) {
493
- const response = await fetcher(req);
494
- if (!response)
495
- return;
496
- this.currentData.set(response.data ?? []);
497
- this.totalRecords.set(response.totalRecords ?? response.data?.length ?? 0);
498
- const desiredPageCount = Math.max(1, response.totalPages ?? 1);
499
- if (settings.page.values.length !== desiredPageCount) {
500
- this.settings.set(new DatatableSettings({
501
- ...settings,
502
- page: {
503
- values: Array.from({ length: desiredPageCount }, (_, i) => i + 1),
504
- selected: Math.min(settings.page.selected, desiredPageCount),
505
- },
506
- }));
507
- }
508
- }
509
434
  // ─── WC event handlers ───────────────────────────────────────────────────
510
435
  onSortChange(event) {
511
436
  const detail = event.detail;
@@ -518,25 +443,10 @@ class BsDatatableComponent {
518
443
  }
519
444
  onSelectionChange(event) {
520
445
  const detail = event.detail;
521
- const keyFn = this.rowKey();
522
- // The naïve `currentData().filter(id ∈ idSet)` drops cross-page
523
- // selections in pagination mode — `currentData` only holds the
524
- // currently-visible page, so any id selected on a page the user has
525
- // since navigated away from disappears. Look up known IDs in
526
- // `selection()` first (rows from earlier pages we still remember),
527
- // then fall back to `currentData()` for IDs the WC just acknowledged
528
- // from the current page.
529
- const existingById = new Map();
530
- this.selection().forEach((row, i) => existingById.set(keyFn(row, i), row));
531
- const currentById = new Map();
532
- this.currentData().forEach((row, i) => currentById.set(keyFn(row, i), row));
533
- const next = [];
534
- for (const id of detail.selectedIds) {
535
- const row = existingById.get(id) ?? currentById.get(id);
536
- if (row !== undefined)
537
- next.push(row);
538
- }
539
- this.selection.set(next);
446
+ // The WC owns the data and resolves ids → row objects itself (across page 1,
447
+ // fetched windows, and tree children), so we take the rows straight from the
448
+ // event — no wrapper-side row bookkeeping.
449
+ this.selection.set([...detail.selectedRows]);
540
450
  }
541
451
  onPageChange(event) {
542
452
  const detail = event.detail;
@@ -565,42 +475,6 @@ class BsDatatableComponent {
565
475
  this.rowContextMenu.emit(this.toBsEvent(event));
566
476
  }
567
477
  // ─── Tree-mode event handlers ────────────────────────────────────────────
568
- /**
569
- * Bridge the WC's fetch-request to the consumer's `[fetch]` callback. The
570
- * WC fires this when a row is expanded (or scrolled into view as a
571
- * placeholder) without cached children. We resolve the consumer's promise
572
- * and hand the response back to the WC via `setFetchResponse`.
573
- */
574
- onFetchRequest(event) {
575
- const detail = event.detail;
576
- const fetcher = this.fetch();
577
- if (!fetcher)
578
- return;
579
- void (async () => {
580
- try {
581
- const response = await fetcher({
582
- page: detail.page,
583
- perPage: detail.perPage,
584
- sortColumns: detail.sortColumns,
585
- parentId: detail.parentId ?? undefined,
586
- });
587
- const el = this.datatableRef()?.nativeElement;
588
- if (!el)
589
- return;
590
- el.setFetchResponse(detail.parentId, {
591
- data: response.data ?? [],
592
- totalRecords: response.totalRecords ?? response.data?.length ?? 0,
593
- page: response.page ?? detail.page,
594
- perPage: response.perPage ?? detail.perPage,
595
- });
596
- }
597
- catch (err) {
598
- // Surface failures to the consumer via the rowExpand event chain in a
599
- // future iteration. For v1 logging is sufficient to debug bad fetches.
600
- console.error('[bs-datatable] tree fetch failed', err);
601
- }
602
- })();
603
- }
604
478
  onRowExpand(event) {
605
479
  const detail = event.detail;
606
480
  this.rowExpand.emit({ row: detail.row, depth: detail.depth, parentId: detail.parentId });
@@ -626,11 +500,11 @@ class BsDatatableComponent {
626
500
  };
627
501
  }
628
502
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsDatatableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
629
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.0", 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\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-fetch-request)=\"onFetchRequest($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"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
503
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.0", 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\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"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
630
504
  }
631
505
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsDatatableComponent, decorators: [{
632
506
  type: Component,
633
- args: [{ selector: 'bs-datatable', schemas: [CUSTOM_ELEMENTS_SCHEMA], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mp-datatable\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-fetch-request)=\"onFetchRequest($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"] }]
507
+ args: [{ selector: 'bs-datatable', schemas: [CUSTOM_ELEMENTS_SCHEMA], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mp-datatable\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"] }]
634
508
  }], 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 }] }] } });
635
509
  function setsEqual(a, b) {
636
510
  // In SSR the WC isn't upgraded yet, so reading `el.expandedIds` returns
@@ -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 { PaginationRequest, PaginationResponse, 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 TreeFetchRequestDetail,\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, BsDatatableFetchRequest } from '../datatable-fetch';\nimport { BsDatatableColumnDirective } from '../datatable-column/datatable-column.directive';\nimport { BsRowTemplateDirective, BsRowTemplateContext } from '../row-template/row-template.directive';\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 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 /** Internal data source — populated either from `data()` or from `fetch()` responses. */\n protected readonly currentData = signal<TData[]>([]);\n protected readonly totalRecords = signal<number>(0);\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 // Sync data input → internal source.\n effect(() => {\n const d = this.data();\n if (d !== null) {\n this.currentData.set(d);\n this.totalRecords.set(d.length);\n }\n });\n\n // Async fetch: re-run on fetch / settings changes. In virtual flat mode\n // the WC's virtualizer slices the in-memory `currentData` array, so the\n // wrapper drains every page from the fetcher up front. In tree mode the\n // wrapper does one root-page fetch; the WC pulls children on demand via\n // `mp-datatable-fetch-request` (bridged by `onFetchRequest` below), so\n // virtual + tree composes without front-loading.\n effect(() => {\n if (isPlatformServer(this.platformId)) return;\n const fetcher = this.fetch();\n if (!fetcher) return;\n const settings = this.settings();\n if (this.tree()) {\n const req: BsDatatableFetchRequest = {\n page: settings.page.selected,\n perPage: settings.perPage.selected,\n sortColumns: settings.sortColumns,\n parentId: undefined,\n };\n // Sort changes invalidate the per-parent child cache (server-side sort\n // applies within siblings, so cached children are stale).\n const el = this.datatableRef()?.nativeElement;\n if (el && typeof el.invalidateChildren === 'function') el.invalidateChildren();\n void this.runFetch(fetcher, req, settings);\n } else if (this.virtualScroll()) {\n void this.runVirtualFetchAll(fetcher, settings.sortColumns);\n } else {\n const req: PaginationRequest = {\n page: settings.page.selected,\n perPage: settings.perPage.selected,\n sortColumns: settings.sortColumns,\n };\n void this.runFetch(fetcher, req, settings);\n }\n });\n\n // Forward columns + data 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 effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.data = this.currentData() as unknown[];\n // Stale row views for rows no longer present are pruned lazily on next render.\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 el.totalRecords = fetching ? this.totalRecords() : null;\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 /** Generation token: invalidates an in-flight virtual-mode preload when sort/fetcher changes. */\n private virtualFetchToken = 0;\n\n private async runVirtualFetchAll(\n fetcher: BsDatatableFetch<TData>,\n sortColumns: SortColumn[],\n ): Promise<void> {\n const token = ++this.virtualFetchToken;\n const perPage = 200;\n const first = await fetcher({ page: 1, perPage, sortColumns });\n if (!first || token !== this.virtualFetchToken) return;\n const accumulator: TData[] = [...(first.data ?? [])];\n const totalRecords = first.totalRecords ?? accumulator.length;\n const totalPages = Math.max(1, first.totalPages ?? Math.ceil(totalRecords / perPage));\n this.currentData.set(accumulator);\n this.totalRecords.set(totalRecords);\n const remaining = Array.from({ length: totalPages - 1 }, (_, i) => i + 2);\n for (const page of remaining) {\n const response = await fetcher({ page, perPage, sortColumns });\n if (!response || token !== this.virtualFetchToken) return;\n accumulator.push(...(response.data ?? []));\n this.currentData.set([...accumulator]);\n }\n }\n\n private async runFetch(\n fetcher: BsDatatableFetch<TData>,\n req: PaginationRequest,\n settings: DatatableSettings,\n ): Promise<void> {\n const response = await fetcher(req);\n if (!response) return;\n this.currentData.set(response.data ?? []);\n this.totalRecords.set(response.totalRecords ?? response.data?.length ?? 0);\n\n const desiredPageCount = Math.max(1, response.totalPages ?? 1);\n if (settings.page.values.length !== desiredPageCount) {\n this.settings.set(\n new DatatableSettings({\n ...settings,\n page: {\n values: Array.from({ length: desiredPageCount }, (_, i) => i + 1),\n selected: Math.min(settings.page.selected, desiredPageCount),\n },\n }),\n );\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>).detail;\n const keyFn = this.rowKey();\n\n // The naïve `currentData().filter(id ∈ idSet)` drops cross-page\n // selections in pagination mode — `currentData` only holds the\n // currently-visible page, so any id selected on a page the user has\n // since navigated away from disappears. Look up known IDs in\n // `selection()` first (rows from earlier pages we still remember),\n // then fall back to `currentData()` for IDs the WC just acknowledged\n // from the current page.\n const existingById = new Map<string, TData>();\n this.selection().forEach((row, i) => existingById.set(keyFn(row, i), row));\n const currentById = new Map<string, TData>();\n this.currentData().forEach((row, i) => currentById.set(keyFn(row, i), row));\n\n const next: TData[] = [];\n for (const id of detail.selectedIds) {\n const row = existingById.get(id) ?? currentById.get(id);\n if (row !== undefined) next.push(row);\n }\n this.selection.set(next);\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 /**\n * Bridge the WC's fetch-request to the consumer's `[fetch]` callback. The\n * WC fires this when a row is expanded (or scrolled into view as a\n * placeholder) without cached children. We resolve the consumer's promise\n * and hand the response back to the WC via `setFetchResponse`.\n */\n onFetchRequest(event: Event): void {\n const detail = (event as CustomEvent<TreeFetchRequestDetail>).detail;\n const fetcher = this.fetch();\n if (!fetcher) return;\n void (async () => {\n try {\n const response = await fetcher({\n page: detail.page,\n perPage: detail.perPage,\n sortColumns: detail.sortColumns as SortColumn[],\n parentId: detail.parentId ?? undefined,\n });\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.setFetchResponse(detail.parentId, {\n data: response.data ?? [],\n totalRecords: response.totalRecords ?? response.data?.length ?? 0,\n page: response.page ?? detail.page,\n perPage: response.perPage ?? detail.perPage,\n });\n } catch (err) {\n // Surface failures to the consumer via the rowExpand event chain in a\n // future iteration. For v1 logging is sufficient to debug bad fetches.\n console.error('[bs-datatable] tree fetch failed', err);\n }\n })();\n }\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\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-fetch-request)=\"onFetchRequest($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 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;AAC9B,YAAA,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;SACnB;AACD,QAA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AC/C,CAA+C,EAAA;;;;AAK/C,IAAA,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI;AAAE,QAAA,OAAO,IAAI;AACvC,IAAA,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI;AAAE,QAAA,OAAO,KAAK;AACxC,IAAA,MAAM,KAAK,GAAG,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,MAAM;AAClD,IAAA,MAAM,KAAK,GAAG,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,MAAM;IAClD,IAAI,KAAK,KAAK,KAAK;AAAE,QAAA,OAAO,KAAK;AACjC,IAAA,MAAM,IAAI,GAAG,CAAC,YAAY,GAAG,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;IAC9C,KAAK,MAAM,CAAC,IAAI,CAAC;AAAE,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAAE,YAAA,OAAO,KAAK;AACjD,IAAA,OAAO,IAAI;AACb;;AE9lBA;;AAEG;;;;"}
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';\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 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\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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",
3
3
  "private": false,
4
- "version": "22.2.0",
4
+ "version": "22.4.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -405,7 +405,7 @@
405
405
  "@mintplayer/pagination": "^2.3.0",
406
406
  "@mintplayer/ng-focus-on-load": "^22.0.0",
407
407
  "@mintplayer/ng-swiper": "^22.0.0",
408
- "@mintplayer/web-components": "^1.6.0",
408
+ "@mintplayer/web-components": "^2.0.0",
409
409
  "lit": "^3.3.0"
410
410
  },
411
411
  "dependencies": {
@@ -1,7 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { TemplateRef, AfterViewInit, ElementRef } from '@angular/core';
3
3
  import { DatatableColumnDef, DatatableSelectionMode, TreeIdKey, TreeSelectionStrategy, MpDatatable } from '@mintplayer/web-components/datatable';
4
- export { CellContent, CellRenderer, DatatableColumnDef, DatatableSelectionMode, HeaderRenderer, RowEventDetail, RowKey, RowRenderContext, RowRenderer, SelectionChangeEventDetail, SortChangeEventDetail, TreeExpandedIdsChangeDetail, TreeFetchRequestDetail, TreeFetchResponse, TreeIdKey, TreeRowExpandDetail, TreeSelectionStrategy, computeNextSort } 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';
5
5
  import { SortColumn, PaginationRequest, PaginationResponse } from '@mintplayer/pagination';
6
6
 
7
7
  declare class DatatableSettings {
@@ -187,9 +187,6 @@ declare class BsDatatableComponent<TData> implements AfterViewInit {
187
187
  readonly columnDirectives: _angular_core.Signal<readonly BsDatatableColumnDirective[]>;
188
188
  /** Optional row template. When present, drives a per-row EmbeddedView render path. */
189
189
  readonly rowTemplate: _angular_core.Signal<BsRowTemplateDirective<any> | undefined>;
190
- /** Internal data source — populated either from `data()` or from `fetch()` responses. */
191
- protected readonly currentData: _angular_core.WritableSignal<TData[]>;
192
- protected readonly totalRecords: _angular_core.WritableSignal<number>;
193
190
  /**
194
191
  * Merged column defs:
195
192
  * - `[columns]` if provided
@@ -204,10 +201,6 @@ declare class BsDatatableComponent<TData> implements AfterViewInit {
204
201
  constructor();
205
202
  ngAfterViewInit(): void;
206
203
  private buildRowRenderer;
207
- /** Generation token: invalidates an in-flight virtual-mode preload when sort/fetcher changes. */
208
- private virtualFetchToken;
209
- private runVirtualFetchAll;
210
- private runFetch;
211
204
  onSortChange(event: Event): void;
212
205
  onSelectionChange(event: Event): void;
213
206
  onPageChange(event: Event): void;
@@ -215,13 +208,6 @@ declare class BsDatatableComponent<TData> implements AfterViewInit {
215
208
  onRowClick(event: Event): void;
216
209
  onRowDblClick(event: Event): void;
217
210
  onRowContextMenu(event: Event): void;
218
- /**
219
- * Bridge the WC's fetch-request to the consumer's `[fetch]` callback. The
220
- * WC fires this when a row is expanded (or scrolled into view as a
221
- * placeholder) without cached children. We resolve the consumer's promise
222
- * and hand the response back to the WC via `setFetchResponse`.
223
- */
224
- onFetchRequest(event: Event): void;
225
211
  onRowExpand(event: Event): void;
226
212
  onRowCollapse(event: Event): void;
227
213
  onExpandedIdsChange(event: Event): void;