@ids-group-ltd/ids-design-system 0.13.0 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/CHANGELOG.md +656 -3
  2. package/components.md +32 -11
  3. package/docs/agent/INDEX.md +2 -0
  4. package/docs/agent/charts/ds-bar-chart.md +1 -1
  5. package/docs/agent/charts/ds-column-chart.md +1 -1
  6. package/docs/agent/charts/ds-config.md +12 -0
  7. package/docs/agent/charts/ds-donut-chart.md +2 -2
  8. package/docs/agent/charts/ds-funnel-chart.md +1 -1
  9. package/docs/agent/charts/ds-line-chart.md +3 -2
  10. package/docs/agent/feedback/ds-meter.md +11 -0
  11. package/docs/agent/feedback/ds-progress.md +4 -1
  12. package/docs/agent/forms/ds-button.md +1 -1
  13. package/docs/agent/forms/ds-icon-button.md +1 -1
  14. package/docs/agent/surfaces/ds-card.md +1 -1
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +2 -2
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +2 -2
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +9 -4
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +100 -15
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +2 -2
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +3 -0
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +47 -5
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +155 -21
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +9 -4
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +81 -18
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +9 -4
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +75 -23
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -1
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +2 -1
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +2 -2
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +107 -19
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +236 -31
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -1
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-meter.mjs +61 -0
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-meter.mjs.map +1 -0
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +4 -4
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +9 -4
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +2 -2
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +1 -1
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +34 -10
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +1 -1
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +9 -4
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +9 -4
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +2 -2
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
  71. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +119 -13
  72. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  73. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  74. package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -0
  75. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  76. package/migrations/0.13.1.json +236 -0
  77. package/migrations/0.13.2.json +269 -0
  78. package/package.json +9 -1
  79. package/styles/_chart-frame.scss +116 -4
  80. package/styles/_chart-interactive.scss +27 -7
  81. package/styles/_chart-motion.scss +61 -18
  82. package/styles/_dropdown-overlay.scss +9 -3
  83. package/styles/_focus.scss +10 -1
  84. package/styles/_overlay-motion.scss +11 -1
  85. package/styles/_tokens-charts.scss +5 -0
  86. package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +6 -1
  87. package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +87 -10
  88. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +1 -0
  89. package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +25 -2
  90. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +23 -3
  91. package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +6 -1
  92. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +60 -9
  93. package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +6 -1
  94. package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +53 -13
  95. package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +73 -11
  96. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +116 -12
  97. package/types/ids-group-ltd-ids-design-system-components-meter.d.ts +36 -0
  98. package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +6 -1
  99. package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +21 -3
  100. package/types/ids-group-ltd-ids-design-system-components-select.d.ts +6 -1
  101. package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +6 -1
  102. package/types/ids-group-ltd-ids-design-system-components.d.ts +47 -5
  103. package/types/ids-group-ltd-ids-design-system-core.d.ts +40 -1
  104. package/types/ids-group-ltd-ids-design-system.d.ts +6 -5
@@ -1 +1 @@
1
- {"version":3,"file":"ids-group-ltd-ids-design-system-components-table.mjs","sources":["../../../src/lib/components/table/cell-template.directive.ts","../../../src/lib/components/table/header-filter.directive.ts","../../../src/lib/components/table/table-layout.ts","../../../src/lib/components/table/table.component.ts","../../../src/lib/components/table/table.component.html","../../../src/lib/components/table/ids-group-ltd-ids-design-system-components-table.ts"],"sourcesContent":["import { Directive, TemplateRef, inject, input } from '@angular/core';\n\n/**\n * Projects a custom cell template into <ds-table> for a specific column.\n *\n * Usage:\n * <ds-table [data]=\"rows\" [columns]=\"cols\">\n * <ng-template dsCellTemplate=\"product\" let-row>\n * <div>{{ asRule(row).product }}</div>\n * </ng-template>\n * </ds-table>\n *\n * The template context type is `unknown` because Angular cannot propagate\n * the parent <ds-table>'s row type to projected templates. Consumers should\n * narrow the row with a typed helper method on the host component.\n *\n * Context shape:\n * - $implicit: the row object (typed `unknown`)\n * - row: alias for the row object (typed `unknown`)\n */\n@Directive({\n selector: '[dsCellTemplate]',\n standalone: true,\n})\nexport class CellTemplateDirective {\n /** The `key` of the column this template replaces, matched against the table's\n * `columns`. A key no column declares renders nothing and warns nowhere. */\n readonly dsCellTemplate = input.required<string>();\n readonly template = inject(TemplateRef<{ $implicit: unknown; row: unknown }>);\n}\n","import { Directive, TemplateRef, inject, input } from '@angular/core';\n\n/** What a projected header filter is handed. */\nexport interface HeaderFilterContext {\n /** The column being filtered. */\n readonly $implicit: unknown;\n /** Alias for the column. */\n readonly column: unknown;\n /** Dismisses the popover — call it after applying, so the filter behaves like\n * the built-in checklist rather than staying open. */\n readonly close: () => void;\n}\n\n/**\n * Projects a custom filter into a `ds-table` header popover, for a criterion the\n * built-in checklist cannot express: a date range, a numeric threshold, an async\n * option list.\n *\n * ```html\n * <ds-table [data]=\"rows\" [columns]=\"cols\">\n * <ng-template\n * dsHeaderFilter=\"opened\"\n * [active]=\"!!range()\"\n * let-close=\"close\"\n * >\n * <ds-date-picker mode=\"range\" [(value)]=\"range\" />\n * <ds-button size=\"sm\" (pressed)=\"apply(); close()\">Apply</ds-button>\n * </ng-template>\n * </ds-table>\n * ```\n *\n * The table still owns the header button, the popover and the active-filter\n * styling — only the panel's contents change. It cannot know whether YOUR\n * criterion is set, though, so `active` is how the highlight gets told; without\n * it a custom filter renders but the header never marks itself filtered.\n *\n * The column is typed `unknown` for the same reason `dsCellTemplate`'s row is:\n * Angular cannot propagate the parent table's row type into a projected\n * template. Narrow it with a typed helper on the host.\n */\n@Directive({\n selector: 'ng-template[dsHeaderFilter]',\n standalone: true,\n})\nexport class HeaderFilterDirective {\n /** Key of the column this filter belongs to. */\n readonly dsHeaderFilter = input.required<string>();\n /** Whether YOUR criterion is currently set, which drives the header's\n * active-filter styling. */\n readonly active = input(false);\n\n readonly template = inject(TemplateRef<HeaderFilterContext>);\n}\n","import {\n Injectable,\n Signal,\n TemplateRef,\n ViewContainerRef,\n signal,\n} from '@angular/core';\nimport type { TableColumn } from './table.types';\n\n/** A stage in the column pipeline: ordering, hiding, widths. */\nexport type DsTableColumnStage<T> = (\n columns: readonly TableColumn<T>[],\n) => readonly TableColumn<T>[];\n\n/** A stage in the row pipeline: the set filters, ahead of the substring search. */\nexport type DsTableRowStage<T> = (rows: readonly T[]) => readonly T[];\n\n/**\n * Where in the table a feature may put markup.\n *\n * Three, because the column picker needs three: a trigger in the utility header cell, and its\n * popover and bottom sheet at the end of the host where an overlay belongs. One\n * `ViewContainerRef` was enough for the export button and is not enough for anything else.\n */\nexport type DsTableAnchor = 'toolbar' | 'header-utility' | 'overlays';\n\n/** Everything a resize feature hands the table: the width it overrides, and the handlers the\n * header's separator calls. The markup stays in the table because a directive has no view to\n * declare it in, so the table needs somewhere to send the events. */\nexport interface DsTableResizeContribution<T> {\n readonly widthOverride: (key: string) => number | undefined;\n readonly range: (\n column: TableColumn<T>,\n ) => { now: number; min: number; max: number } | null;\n readonly onStart: (column: TableColumn<T>, event: PointerEvent) => void;\n readonly onMove: (event: PointerEvent) => void;\n readonly onEnd: () => void;\n readonly onFocus: (column: TableColumn<T>, event: FocusEvent) => void;\n readonly onBlur: () => void;\n readonly onKey: (column: TableColumn<T>, event: KeyboardEvent) => void;\n readonly step: (column: TableColumn<T>, delta: number | 'auto') => void;\n}\n\n/**\n * What a feature is allowed to read back out of the table, and where it may put markup.\n *\n * A feature needs the table's derived state — the export serialises `visibleColumns` and\n * `sortedRows` through `cellText`. Those live on the component as `protected`, which a directive\n * cannot reach, so the contract is published here rather than by widening the component's surface:\n * this way the table's public API does not grow one member per feature.\n */\nexport interface DsTableView<T> {\n /** As declared, before any feature reorders or hides. A feature that OWNS the order needs the\n * unfolded list - reading `visibleColumns` would fold its own stage back in. */\n readonly declaredColumns: Signal<readonly TableColumn<T>[]>;\n readonly visibleColumns: Signal<readonly TableColumn<T>[]>;\n readonly sortedRows: Signal<readonly T[]>;\n readonly cellText: (row: T, column: TableColumn<T>) => string;\n /** A directive cannot insert markup into another component's template, so a feature with a\n * control of its own creates it in one of these. Undefined until the view exists. */\n readonly anchor: (\n name: DsTableAnchor,\n ) => Signal<ViewContainerRef | undefined>;\n /** The scroll container. A width ceiling has to be the viewport, and the header cells are\n * looked up inside it. */\n readonly scrollViewport: Signal<HTMLElement | undefined>;\n}\n\n/**\n * One named piece of the persisted column layout.\n *\n * The stored shape stays `{ order, widths, hidden }`, so a layout saved by an earlier version\n * still restores — the key IS the JSON key. Persistence walks whatever is registered instead of\n * naming the three inputs, which is what lets reorder, the picker and resize move out from under\n * it without the storage code changing.\n */\nexport interface DsTablePersistedSlice {\n readonly key: string;\n /** Serialisable. Read inside the caller's effect, so whatever it touches is tracked. */\n readonly read: () => unknown;\n readonly write: (value: unknown) => void;\n /** Back to the declared layout. \"Reset to default\" has to reach every slice, and only the\n * slice knows what its own default is. */\n readonly reset: () => void;\n}\n\n/** What an export feature hands the table, so `runExport()` and `exporting()` stay public API\n * while the implementation lives outside the component. */\nexport interface DsTableExportContribution<T> {\n readonly run: () => Promise<void>;\n readonly csv: (filename?: string, rows?: readonly T[]) => void;\n readonly exporting: Signal<boolean>;\n}\n\n/**\n * The seam an opt-in table feature writes into, so the table never names the feature.\n *\n * The ablation that priced this split (`docs/basic-advanced-split-audit.md` §9) kept hitting the\n * same shape: the table owns a derived value and a feature wants to contribute to it —\n * `visibleColumns` is the chain the column picker writes to, `filteredData` folds the set filters\n * into the substring search, the live region folds in the export state. Moving methods out one at a\n * time cannot express that; a registry of contributions can.\n *\n * @internal Not API. Provided by `ds-table` on itself, so a directive on the same element injects\n * the instance it belongs to and two tables on one screen stay independent.\n */\n@Injectable()\nexport class DsTableLayout<T = unknown> {\n private readonly columnStages = signal<readonly DsTableColumnStage<T>[]>([]);\n private readonly rowStages = signal<readonly DsTableRowStage<T>[]>([]);\n private readonly statusFragments = signal<readonly Signal<string>[]>([]);\n\n /** Registered once, at the contributing directive's construction — never per change\n * detection. A stage may read signals of its own: the fold runs inside the table's\n * `computed`, so whatever the stage touches is tracked by that computed rather than by\n * this service, which is what lets a feature stay reactive without the table knowing it\n * exists. */\n addColumnStage(stage: DsTableColumnStage<T>): void {\n this.columnStages.update((stages) => [...stages, stage]);\n }\n\n addRowStage(stage: DsTableRowStage<T>): void {\n this.rowStages.update((stages) => [...stages, stage]);\n }\n\n private readonly utilityColumnWanted = signal(false);\n\n /** The utility column carries the row-action kebab and the picker trigger. The table knows\n * about the first and must be told about the second, or the cell it anchors into is never\n * rendered and the feature has nowhere to go. */\n requestUtilityColumn(): void {\n this.utilityColumnWanted.set(true);\n }\n\n wantsUtilityColumn(): boolean {\n return this.utilityColumnWanted();\n }\n\n private readonly slices = signal<readonly DsTablePersistedSlice[]>([]);\n\n addPersistedSlice(slice: DsTablePersistedSlice): void {\n this.slices.update((registered) => [...registered, slice]);\n }\n\n persistedSlices(): readonly DsTablePersistedSlice[] {\n return this.slices();\n }\n\n resetPersisted(): void {\n for (const slice of this.slices()) {\n slice.reset();\n }\n }\n\n private readonly rowTemplate = signal<TemplateRef<{\n $implicit: TableColumn<T>;\n }> | null>(null);\n\n /** A per-column control in the column panel, for a feature the panel must not name - resize\n * puts its width buttons there. */\n registerPanelRowTemplate(\n template: TemplateRef<{ $implicit: TableColumn<T> }>,\n ): void {\n this.rowTemplate.set(template);\n }\n\n panelRowTemplate(): TemplateRef<{ $implicit: TableColumn<T> }> | null {\n return this.rowTemplate();\n }\n\n /** A line for the live region, folded in ahead of the table's own events. */\n addStatusFragment(fragment: Signal<string>): void {\n this.statusFragments.update((fragments) => [...fragments, fragment]);\n }\n\n foldColumns(columns: readonly TableColumn<T>[]): readonly TableColumn<T>[] {\n return this.columnStages().reduce(\n (carried, stage) => stage(carried),\n columns,\n );\n }\n\n foldRows(rows: readonly T[]): readonly T[] {\n return this.rowStages().reduce((carried, stage) => stage(carried), rows);\n }\n\n /** Empty when nothing contributes, so the table's own message is unchanged. */\n status(): string {\n return this.statusFragments()\n .map((fragment) => fragment())\n .filter(Boolean)\n .join('. ');\n }\n\n private published: DsTableView<T> | null = null;\n private readonly exportContribution =\n signal<DsTableExportContribution<T> | null>(null);\n\n /** Called by the table itself, before any directive can ask for it: a directive on the same\n * element is constructed after the component that provides this service. */\n publish(view: DsTableView<T>): void {\n this.published = view;\n }\n\n view(): DsTableView<T> {\n if (!this.published) {\n throw new Error(\n 'DsTableLayout was read before ds-table published its view — a feature directive must sit on the ds-table element.',\n );\n }\n\n return this.published;\n }\n\n /** The table keeps `runExport()` and `exporting()` as public API, because their docblocks\n * promise a button outside the table can drive them. The implementation is the feature's, so\n * the table asks here and can tell the difference between \"no export directive\" and \"nothing\n * to export\" — which is the one silent failure this whole shape is prone to. */\n setExport(contribution: DsTableExportContribution<T>): void {\n this.exportContribution.set(contribution);\n }\n\n runExport(): Promise<void> | null {\n return this.exportContribution()?.run() ?? null;\n }\n\n /** True when it ran, so the caller can tell \"no feature\" from \"nothing to export\". */\n exportCsv(filename?: string, rows?: readonly T[]): boolean {\n const contribution = this.exportContribution();\n contribution?.csv(filename, rows);\n\n return contribution !== null;\n }\n\n exporting(): boolean {\n return this.exportContribution()?.exporting() ?? false;\n }\n\n private readonly resizeContribution =\n signal<DsTableResizeContribution<T> | null>(null);\n\n setResize(contribution: DsTableResizeContribution<T>): void {\n this.resizeContribution.set(contribution);\n }\n\n /** Null when no resize feature is present, which is what the header's `@if` reads. */\n resize(): DsTableResizeContribution<T> | null {\n return this.resizeContribution();\n }\n}\n","import {\n Component,\n ElementRef,\n Injector,\n TemplateRef,\n ViewEncapsulation,\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChildren,\n effect,\n DestroyRef,\n inject,\n input,\n linkedSignal,\n model,\n output,\n signal,\n ViewContainerRef,\n viewChild,\n} from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { PaginationComponent } from '@ids-group-ltd/ids-design-system/components/pagination';\nimport { LoadingOverlayComponent } from '@ids-group-ltd/ids-design-system/components/loading-overlay';\nimport { PopoverComponent } from '@ids-group-ltd/ids-design-system/components/popover';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\nimport { MenuComponent } from '@ids-group-ltd/ids-design-system/components/menu';\nimport { MenuItemComponent } from '@ids-group-ltd/ids-design-system/components/menu';\nimport { MenuDividerComponent } from '@ids-group-ltd/ids-design-system/components/menu';\nimport { CellTemplateDirective } from './cell-template.directive';\nimport { HeaderFilterDirective } from './header-filter.directive';\nimport { DsTableLayout } from './table-layout';\nimport type {\n SortChangeEvent,\n SortDir,\n TableCellEditEvent,\n TableColumn,\n TableRowAction,\n TableRowActionEvent,\n TableExpandMode,\n TableFilterMode,\n TableSortMode,\n} from './table.types';\n\nconst NUMERIC = /^-?\\d+(\\.\\d+)?$/;\n\n// Assumed viewport until the scroller has been measured. Tall enough to fill a\n// laptop screen, so the first paint is not visibly short, and nowhere near the\n// row count a virtualized table is reached for.\nconst VIRTUAL_FALLBACK_HEIGHT = 720;\n\n// Extra rows each side of the viewport, so a flick shows no blank gap.\nconst VIRTUAL_OVERSCAN = 6;\n\n// Documented on `TableColumn.truncate`, which is where a consumer reads it.\nconst DEFAULT_CLIP_WIDTH_PX = 240;\n\n/** Rendered values that read as \"no data\", matched case-insensitively. */\nconst BLANK_CELL = new Set(['', '—', '-', '–', 'n/a', 'never', 'none']);\n\n/** Normalises \"no data\" to a single `null`, so the comparator has one blank\n * case to test and TypeScript narrows the rest without a cast. */\nfunction sortableOf(\n value: string | number | Date | null | undefined,\n): string | number | Date | null {\n if (value === null || value === undefined) {\n return null;\n }\n if (typeof value === 'string' && BLANK_CELL.has(value.trim().toLowerCase())) {\n return null;\n }\n\n return value;\n}\n\n/** Both sides are known non-blank here. `numeric: true` keeps \"item 10\" after\n * \"item 9\" instead of before it. */\nfunction compareSortValues(\n first: string | number | Date,\n second: string | number | Date,\n): number {\n if (first instanceof Date && second instanceof Date) {\n return first.getTime() - second.getTime();\n }\n if (typeof first === 'number' && typeof second === 'number') {\n return first - second;\n }\n\n const firstText = String(first);\n const secondText = String(second);\n if (NUMERIC.test(firstText) && NUMERIC.test(secondText)) {\n return Number(firstText) - Number(secondText);\n }\n\n // `sensitivity: 'base'` so \"Ångström\" sorts next to \"Angstrom\" and casing does\n // not split a column into two runs.\n return firstText.localeCompare(secondText, undefined, {\n numeric: true,\n sensitivity: 'base',\n });\n}\n\n@Component({\n selector: 'ds-table',\n standalone: true,\n imports: [\n IconComponent,\n NgTemplateOutlet,\n SkeletonComponent,\n PaginationComponent,\n LoadingOverlayComponent,\n PopoverComponent,\n TooltipDirective,\n MenuComponent,\n MenuItemComponent,\n MenuDividerComponent,\n // Only instantiated when a column sets `link`, so a consumer app with no router\n // provided still renders the table — the directive is never constructed.\n RouterLink,\n ],\n templateUrl: './table.component.html',\n styleUrl: './table.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.bordered]': 'borderedResolved()',\n '[class.selectable]': 'selectable()',\n '[class.pinned]': 'stickyFirstColumn()',\n '[class.expandable]': 'expandableRows()',\n '[class.sticky-scrollbar]': 'stickyScrollbarResolved()',\n '[class.resizable]': 'layout.resize() !== null',\n },\n providers: [DsTableLayout],\n})\nexport class TableComponent<T extends object> {\n /** Rows to render. */\n readonly data = input.required<readonly T[]>();\n /** Row identity used for tracking, selection, expansion and the active-row\n * highlight. Defaults to `row.id`; pass an accessor for display-only data\n * with no natural key (`[rowId]=\"row => row.channel + row.sentAt\"`), which\n * beats mapping synthetic ids into the data just to satisfy the table. */\n readonly rowId = input<((row: T) => string) | null>(null);\n /** Column definitions driving headers, cells and sorting. */\n readonly columns = input.required<readonly TableColumn<T>[]>();\n /** Adds a checkbox column for row/select-all selection. */\n readonly selectable = input(false, { transform: booleanAttribute });\n /** Opt-in outer border + radius. Off by default so tables flush inside a\n * `<ds-card padding=\"none\">` don't double-border.\n * Unset falls back to `DS_CONFIG.table.bordered`, then `false`. */\n readonly bordered = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n /** false — no loading state.\n * `true` — the table picks: skeleton rows while it has nothing to show, overlay\n * once rows are on screen. Prefer it; the right choice is a function of the row\n * count, which only the table holds.\n * 'skeleton' — first-load placeholder; rows are replaced with shimmer rows.\n * 'overlay' — re-fetch indicator; existing rows stay visible behind\n * a translucent overlay with a centred spinner. Pin either one only to\n * override the rule deliberately. */\n readonly loading = input<boolean | 'skeleton' | 'overlay'>(false);\n /** The mode actually rendered. Skeletons replace what the reader is looking at and\n * an overlay on an empty card says nothing, so `true` resolves per state rather\n * than picking a favourite. */\n protected readonly loadingMode = computed<'skeleton' | 'overlay' | false>(\n () => {\n const loading = this.loading();\n if (loading === false) {\n return false;\n }\n if (loading === true) {\n return this.filteredData().length ? 'overlay' : 'skeleton';\n }\n\n return loading;\n },\n );\n /** Keeps the header row pinned while the body scrolls. */\n readonly stickyHeader = input(true, { transform: booleanAttribute });\n /** Caps the scroll body height (any CSS length, e.g. `'320px'`) and scrolls it\n * vertically — pair with `stickyHeader` for a self-contained scroll region.\n * `null` (default) lets the table grow to its content. */\n readonly maxHeight = input<string | null>(null);\n /** Row density — `'compact'` tightens cell padding for spreadsheet-dense lists. */\n readonly density = input<'default' | 'compact'>('default');\n /** Tints odd rows for easier row-tracking across wide tables. */\n readonly zebra = input(false, { transform: booleanAttribute });\n /** Animate the body height when the row set changes (page/filter) instead of\n * snapping. Opt-in; instant under reduced-motion (the DS zeroes the token). */\n readonly animateHeight = input(false, { transform: booleanAttribute });\n /** Two-way set of currently selected row ids. */\n readonly selectedIds = model<Set<string>>(new Set<string>());\n /** Column key currently sorted by; `null` when unsorted. Two-way bindable\n * (`[(sortKey)]`) or one-way from your own state with `(sortChange)`. */\n readonly sortKey = input<string | null>(null);\n /** Emitted for `[(sortKey)]`. `sortChange` carries the same click with both\n * halves at once, which is usually the one to listen to. */\n readonly sortKeyChange = output<string | null>();\n /** Sort direction for `sortKey`. */\n readonly sortDir = input<SortDir>(null);\n /** Emitted for `[(sortDir)]`. */\n readonly sortDirChange = output<SortDir>();\n /**\n * What the header marks, and what a client sort reads.\n *\n * `linkedSignal` over BOTH inputs, not a `model`: Angular writes an input only\n * when the bound expression changed, diffing against the value IT last wrote, and\n * an internal `.set()` never updates that slot. Seeding from both means a host\n * answering with its own default re-seeds the pair even when one half of that\n * default equals what it last bound. A host that binds neither never re-seeds, so\n * the optimistic state survives.\n */\n private readonly sortState = linkedSignal<{\n readonly key: string | null;\n readonly dir: SortDir;\n }>(() => ({ key: this.sortKey(), dir: this.sortDir() }));\n protected readonly activeSortKey = computed(() => this.sortState().key);\n protected readonly activeSortDir = computed(() => this.sortState().dir);\n /** Sort states a column cycles through on click. Default includes null\n * (unsorted); pass ['asc','desc'] to forbid the unsorted state (e.g.\n * server-paged lists). */\n readonly sortingOrder = input<SortDir[]>(['asc', 'desc', null]);\n /**\n * Wording for the sort announcement, so it can be translated. Receives the\n * column's label and the new direction; return an empty string to say nothing.\n */\n readonly sortAnnouncement = input<(label: string, dir: SortDir) => string>(\n (label, dir) =>\n dir\n ? `Sorted by ${label}, ${dir === 'asc' ? 'ascending' : 'descending'}`\n : `Sorting cleared`,\n );\n /**\n * Wording for the row-range announcement, so it can be translated. Receives\n * the 1-based first and last row on screen and the total; return an empty\n * string to say nothing.\n */\n readonly rangeAnnouncement = input<\n (first: number, last: number, total: number) => string\n >((first, last, total) => `Showing ${first}–${last} of ${total}`);\n /** Number of shimmer rows rendered while `loading` is `'skeleton'`. */\n readonly skeletonRows = input<number>(5);\n /** Accessible name for the table (rendered as a visually-hidden caption).\n * Without it, screen-reader users get an unlabelled table. */\n readonly caption = input<string>('');\n /** When true, each row becomes a keyboard-operable control (tabindex,\n * Enter/Space → rowClicked) with an accessible name from the first\n * column. Off by default so non-navigating tables don't advertise a false\n * click affordance. Also the gate for the hover/pressed row tints. */\n readonly rowInteractive = input(false, { transform: booleanAttribute });\n\n /** Id of the row rendered as current (highlight + `aria-current`) — e.g. the\n * row whose detail drawer or side panel is open. `null` — none. */\n readonly activeRowId = input<string | null>(null);\n\n /** Client-side row filter — case-insensitive substring match against cell\n * text. Columns with `filterable: true` restrict the match set (none\n * marked — every column matches, hidden ones included). '' — no filtering. */\n readonly filterQuery = input<string>('');\n /** Two-way per-column set-filters: column key → the still-checked values.\n * A column absent from the map (or with every value checked) is unfiltered. */\n readonly columnFilters = model<Map<string, ReadonlySet<string>>>(new Map());\n\n /** Round-trip whatever the column features persist (order, widths, hidden keys) through\n * `localStorage`, so a reader's column layout survives a reload. Needs\n * `storageKey` — without one there is nothing to key a screen by, and two\n * tables would overwrite each other. Off by default. */\n readonly persistLayout = input(false, { transform: booleanAttribute });\n /** Screen id the persisted layout is stored under. Pick something stable per\n * table, not per route instance. */\n readonly storageKey = input<string>('');\n\n /** True while an export is in flight. Public so a button OUTSIDE the table can show the same\n * state as the built-in one. `false` when no export directive is present. */\n readonly exporting = computed(() => this.layout.exporting());\n\n /** Keeps the horizontal scrollbar reachable on tall tables: the scroll\n * container's native bar is hidden and a proxy stuck to the bottom of the\n * nearest scroll ancestor mirrors it both ways. Off by default. Unset falls\n * back to `DS_CONFIG.table.stickyScrollbar`, then `false`. */\n readonly stickyScrollbar = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n /** Rows per page. `null` (default) disables pagination — all rows render. */\n readonly pageSize = model<number | null>(null);\n /** Current 1-based page. Only meaningful when `pageSize()` is set. */\n readonly page = model<number>(1);\n /** Selectable page-size choices shown in the pagination control. */\n readonly pageSizeOptions = input<number[]>([10, 25, 50, 100]);\n /** Shows the page-size picker in the footer pager. Set false for a table whose\n * page size is fixed — the standalone `ds-pagination` has always taken this. */\n readonly showPageSize = input(true, { transform: booleanAttribute });\n /** Shows the \"N of M\" range label in the footer pager. */\n readonly showLabel = input(true, { transform: booleanAttribute });\n /** Server-side total row count. `null` (default) = client paging: the table\n * slices `data()` itself and the pager counts the rows in hand. When set, the\n * host has already sliced to one page — the pager uses this count and the\n * table renders `data()` as-is (no internal slice). */\n readonly total = input<number | null>(null);\n /** Scroll the table into view on a page change (opt-in) — keeps a bottom\n * pager from leaving the viewport on the previous page's last rows. */\n readonly scrollToTopOnPageChange = input(false, {\n transform: booleanAttribute,\n });\n /** Who sorts — see `TableSortMode`. Unset resolves to `'server'`: the table\n * emits `(sortChange)` and reorders nothing, which is what a paged table\n * needs. Declare `'client'` when the table holds every row, or `'none'` to\n * drop the affordance entirely. */\n readonly sortMode = input<TableSortMode | null>(null);\n /** Who filters — see `TableFilterMode`. Unset resolves to `'server'`: the\n * table tracks the selection in `columnFilters` for the host to turn into a\n * request, and runs no local pass. Declare `'client'` when the table holds\n * every row and should filter them itself. */\n readonly filterMode = input<TableFilterMode | null>(null);\n /**\n * The full value domain per column key, for a header filter the table cannot\n * derive itself. Without it the checklist is built from the rows in hand,\n * which on a server-paged table offers only the values that happen to be on\n * the current page.\n */\n readonly columnFilterOptions = input<ReadonlyMap<string, readonly string[]>>(\n new Map(),\n );\n protected readonly filterModeResolved = computed<TableFilterMode>(\n () => this.filterMode() ?? 'server',\n );\n protected readonly sortModeResolved = computed<TableSortMode>(\n () => this.sortMode() ?? 'server',\n );\n readonly borderedResolved = resolveWithConfig(\n this.bordered,\n (config) => config.table?.bordered,\n false,\n );\n readonly stickyScrollbarResolved = resolveWithConfig(\n this.stickyScrollbar,\n (config) => config.table?.stickyScrollbar,\n false,\n );\n /**\n * Where the sticky horizontal scrollbar comes to rest, as any CSS length.\n *\n * Unset, the table measures its scroll container's bottom padding and cancels it, so the bar\n * sits on the edge the reader can see. Set it for a scrollport whose reachable edge is not its\n * padding edge. Falls back to `DS_CONFIG.table.stickyScrollbarOffset`;\n * `--ds-table-sticky-scrollbar-offset` still wins over both, for a rule that has to reach one\n * table from a stylesheet.\n */\n readonly stickyScrollbarOffset = input<string | null>(null);\n readonly stickyScrollbarOffsetResolved = resolveWithConfig(\n this.stickyScrollbarOffset,\n (config) => config.table?.stickyScrollbarOffset,\n null,\n );\n\n /** Pin the first data column (and the select column) on horizontal scroll. */\n readonly stickyFirstColumn = input(false, { transform: booleanAttribute });\n\n /**\n * Render only the rows in view, padding the rest with two spacer rows. Opt-in,\n * and it needs `maxHeight` — without a bounded scroller there is no viewport to\n * window against, so nothing is virtualized (dev-warned).\n *\n * Every row must be the same height, which is `virtualRowSize`: the arithmetic\n * that decides what is in view has no other way to know where a row starts. So\n * virtual mode forces `table-layout: fixed` and single-line cells, and the\n * expansion panel is suppressed — a row that can grow breaks the maths.\n */\n readonly virtualScroll = input(false, { transform: booleanAttribute });\n /** Row height in px in virtual mode. Must match what the rows actually\n * measure, so it drives the CSS height rather than merely describing it. */\n readonly virtualRowSize = input(44);\n /**\n * Fetch rows as they scroll into view instead of receiving them all.\n *\n * `data` becomes a SPARSE array `total` long: put each fetched row at its\n * absolute index and leave the rest empty. Every gap inside the window\n * renders a skeleton row, and `(lazyLoad)` asks for the range covering it.\n *\n * Needs `virtualScroll` — without a window there is nothing to load\n * lazily AGAINST — and `total`, which is what the scrollbar is sized from.\n */\n readonly lazy = input(false, { transform: booleanAttribute });\n /** The range now on screen that `data` has gaps in — fetch it and write the\n * rows back at their absolute indices. Re-emits only when the range moves. */\n readonly lazyLoad = output<{ first: number; rows: number }>();\n\n /** Fires with the row on click (or Enter/Space when `rowInteractive`). */\n readonly rowClicked = output<T>();\n /** Fires whenever sort key/direction changes, in every `sortMode` but `'none'`. */\n readonly sortChange = output<SortChangeEvent>();\n\n /** Row-action menu items rendered as a trailing kebab (⋮) column.\n * Empty (default) — no column. Menu clicks never trigger `rowClicked`. */\n readonly rowActions = input<readonly TableRowAction<T>[]>([]);\n /** Fires with the chosen action and its row when a kebab menu item is selected. */\n readonly rowActionSelected = output<TableRowActionEvent<T>>();\n\n /** Fires when an `editable` cell is committed (Enter or blur) with the new value. */\n readonly cellEdited = output<TableCellEditEvent<T>>();\n\n /** Cell templates supplied as an explicit map instead of (or in addition to)\n * projected `dsCellTemplate` directives. Lets a wrapper component collect\n * the directives itself and pass them down, since content projected through\n * a wrapper's `<ng-content>` is not seen by this component's content query.\n * Entries here override projected ones. */\n readonly cellTemplateMap = input<\n Record<string, TemplateRef<{ $implicit: unknown; row: unknown }>>\n >({});\n\n /** Empty-state template, as an alternative to the `[empty]` content slot —\n * again for wrappers that can't rely on slot re-projection. */\n readonly emptyTemplate = input<TemplateRef<unknown> | null>(null);\n\n /** When true, each row renders a leading chevron button that toggles an\n * inline expansion panel below it. */\n readonly expandableRows = input(false, { transform: booleanAttribute });\n\n /** Two-way set of currently expanded row ids. */\n readonly expandedIds = model<Set<string>>(new Set<string>());\n\n /** `'single'` collapses the open row when another expander is clicked.\n * Enforced on interaction only: a set seeded with several ids is left alone\n * (and warned about in dev) rather than silently rewritten under the host. */\n readonly expandMode = input<TableExpandMode>('multiple');\n\n /** Renders an expand-all/collapse-all chevron in the expander column header,\n * page-scoped when paginating, like select-all. Suppressed under\n * `expandMode=\"single\"`, which it would contradict. */\n readonly expandAllToggle = input(false, { transform: booleanAttribute });\n\n /** Fires with the row when an expander opens it — including each row opened\n * by expand-all, so a host lazy-loading panel content sees every one. */\n readonly rowExpanded = output<T>();\n\n /** Fires with the row when an expander closes it, the row auto-closed by\n * `expandMode=\"single\"` included. It carries a row, so it cannot speak for an\n * id whose row is no longer in `data()` — under server-side paging that id is\n * cleared silently. `expandedIds` is the complete signal; this one is the\n * convenient one. */\n readonly rowCollapsed = output<T>();\n\n /** Template rendered inside an expanded row's panel.\n * Context: `$implicit` = row, `row` = row. */\n readonly rowExpandTemplate = input<TemplateRef<{\n $implicit: unknown;\n row: unknown;\n }> | null>(null);\n\n protected readonly cellTemplateDirectives = contentChildren(\n CellTemplateDirective,\n );\n\n protected readonly cellTemplates = computed<\n Record<string, TemplateRef<{ $implicit: unknown; row: unknown }>>\n >(() => {\n const map: Record<\n string,\n TemplateRef<{ $implicit: unknown; row: unknown }>\n > = {};\n for (const dir of this.cellTemplateDirectives()) {\n map[dir.dsCellTemplate()] = dir.template;\n }\n\n return { ...map, ...this.cellTemplateMap() };\n });\n\n protected cellTemplate(\n col: TableColumn<T>,\n ): TemplateRef<{ $implicit: unknown; row: unknown }> | null {\n return this.cellTemplates()[col.key] ?? null;\n }\n\n protected readonly tableClasses = computed(() => {\n const parts = ['table'];\n if (this.stickyHeader()) {\n parts.push('sticky-header');\n }\n if (this.density() === 'compact') {\n parts.push('compact');\n }\n if (this.zebra()) {\n parts.push('zebra');\n }\n if (this.virtualizing()) {\n parts.push('virtual');\n }\n\n return parts.join(' ');\n });\n\n protected readonly isSkeletonLoading = computed(\n () => this.loadingMode() === 'skeleton',\n );\n protected readonly isOverlayLoading = computed(\n () => this.loadingMode() === 'overlay',\n );\n /** The empty row is a CLAIM about the data — \"there are none\" — so it must not\n * appear while the table is still asking, in EITHER loading mode. `overlay` is\n * what a list uses on every read after the first, so suppressing only under\n * `skeleton` paints \"No rows yet\" under the spinner on a zero-row reload. */\n protected readonly showsEmptyRow = computed(\n () => this.loadingMode() === false && !this.filteredData().length,\n );\n\n protected readonly showsLoadingSpace = computed(\n () =>\n this.loadingMode() !== false &&\n this.loadingMode() !== 'skeleton' &&\n !this.filteredData().length,\n );\n\n protected readonly layout = inject<DsTableLayout<T>>(DsTableLayout);\n\n private readonly toolbarAnchor = viewChild('toolbarAnchor', {\n read: ViewContainerRef,\n });\n private readonly headerUtilityAnchor = viewChild('headerUtilityAnchor', {\n read: ViewContainerRef,\n });\n private readonly overlaysAnchor = viewChild('overlaysAnchor', {\n read: ViewContainerRef,\n });\n private readonly columnWidthControls = viewChild<\n TemplateRef<{ $implicit: TableColumn<T> }>\n >('columnWidthControls');\n\n protected readonly visibleColumns = computed<readonly TableColumn<T>[]>(() =>\n this.layout.foldColumns(this.columns()),\n );\n\n /** `'content'` is not a pixel value — it is carried by a class instead, see `fitsContent`. */\n protected columnWidth(col: TableColumn<T>): number | null {\n const dragged = this.layout.resize()?.widthOverride(col.key);\n if (dragged !== undefined) {\n return dragged;\n }\n\n return typeof col.width === 'number' ? col.width : null;\n }\n\n /** Shrink-to-content mode, unless the reader has dragged this column — a drag is a deliberate\n * pixel width and must win over the declared intent. */\n protected fitsContent(col: TableColumn<T>): boolean {\n return (\n col.width === 'content' &&\n this.layout.resize()?.widthOverride(col.key) === undefined\n );\n }\n\n protected readonly hasUtilityColumn = computed(\n () => this.hasRowActions() || this.layout.wantsUtilityColumn(),\n );\n\n private readonly columnFilterPopover = viewChild<PopoverComponent>(\n 'columnFilterPopover',\n );\n // Gates the panel's EXISTENCE on configuration, never on the clicked column: a handler that\n // raises its own `@if` reads the viewChild back in the same synchronous line, before change\n // detection has created it, and loses the click that opened it.\n protected readonly hasAnyColumnFilter = computed(() =>\n this.columns().some((col) => this.hasColumnFilter(col)),\n );\n protected readonly filterColumn = signal<TableColumn<T> | null>(null);\n protected readonly filterSearch = signal('');\n\n private readonly headerFilters = contentChildren(HeaderFilterDirective);\n\n private readonly headerFilterByKey = computed(() => {\n const map = new Map<string, HeaderFilterDirective>();\n for (const filter of this.headerFilters()) {\n map.set(filter.dsHeaderFilter(), filter);\n }\n\n return map;\n });\n\n protected headerFilterFor(\n col: TableColumn<T>,\n ): HeaderFilterDirective | undefined {\n return this.headerFilterByKey().get(col.key);\n }\n\n protected hasColumnFilter(col: TableColumn<T>): boolean {\n if (this.filterModeResolved() === 'none') {\n return false;\n }\n\n return col.filter === 'set' || !!this.headerFilterFor(col);\n }\n\n protected isFilterPanelOpen(col: TableColumn<T>): boolean {\n return (\n this.filterColumn()?.key === col.key &&\n (this.columnFilterPopover()?.opened() ?? false)\n );\n }\n\n protected isColumnFiltered(col: TableColumn<T>): boolean {\n // A projected filter owns its own criterion, so only the host can say\n // whether it is set; the table still draws the highlight.\n const projected = this.headerFilterFor(col);\n if (projected) {\n return projected.active();\n }\n const allowed = this.columnFilters().get(col.key);\n\n return !!allowed && allowed.size < this.optionsFor(col).length;\n }\n\n private optionsFor(col: TableColumn<T>): readonly string[] {\n const supplied = this.columnFilterOptions().get(col.key);\n if (supplied) {\n return supplied;\n }\n const seen = new Set<string>();\n for (const row of this.data()) {\n seen.add(this.cellValue(row, col));\n }\n\n return [...seen].sort((a, b) => a.localeCompare(b));\n }\n\n protected readonly filterValues = computed<readonly string[]>(() => {\n const col = this.filterColumn();\n if (!col) {\n return [];\n }\n const needle = this.filterSearch().trim().toLowerCase();\n const values = this.optionsFor(col);\n\n return needle\n ? values.filter((value) => value.toLowerCase().includes(needle))\n : values;\n });\n\n protected readonly filterSelectedCount = computed<number>(() => {\n const col = this.filterColumn();\n if (!col) {\n return 0;\n }\n const allowed = this.columnFilters().get(col.key);\n\n return allowed ? allowed.size : this.optionsFor(col).length;\n });\n\n protected isFilterValueChecked(value: string): boolean {\n const col = this.filterColumn();\n if (!col) {\n return false;\n }\n const allowed = this.columnFilters().get(col.key);\n\n return !allowed || allowed.has(value);\n }\n\n protected onColumnFilterClick(col: TableColumn<T>, event: Event): void {\n event.stopPropagation();\n this.filterColumn.set(col);\n this.filterSearch.set('');\n this.columnFilterPopover()?.toggle(event.currentTarget as HTMLElement);\n }\n\n protected onFilterSearch(event: Event): void {\n this.filterSearch.set((event.target as HTMLInputElement).value);\n }\n\n protected toggleFilterValue(value: string): void {\n const col = this.filterColumn();\n if (!col) {\n return;\n }\n const distinct = this.optionsFor(col);\n const current = new Set(this.columnFilters().get(col.key) ?? distinct);\n if (current.has(value)) {\n current.delete(value);\n } else {\n current.add(value);\n }\n const next = new Map(this.columnFilters());\n // No entry means unfiltered, so a full set is dropped rather than stored.\n if (current.size >= distinct.length) {\n next.delete(col.key);\n } else {\n next.set(col.key, current);\n }\n this.columnFilters.set(next);\n }\n\n protected headerFilterContext(col: TableColumn<T>): {\n $implicit: unknown;\n column: unknown;\n close: () => void;\n } {\n return {\n $implicit: col,\n column: col,\n close: () => this.columnFilterPopover()?.close(),\n };\n }\n\n protected clearColumnFilter(): void {\n const col = this.filterColumn();\n if (!col) {\n return;\n }\n const next = new Map(this.columnFilters());\n next.delete(col.key);\n this.columnFilters.set(next);\n }\n\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly editInput =\n viewChild<ElementRef<HTMLInputElement>>('editInput');\n protected readonly editingCell = signal<{\n rowId: string;\n key: string;\n } | null>(null);\n protected readonly editDraft = signal('');\n\n protected isEditing(row: T, col: TableColumn<T>): boolean {\n const cell = this.editingCell();\n\n return !!cell && cell.rowId === this.rowKey(row) && cell.key === col.key;\n }\n\n protected startEdit(row: T, col: TableColumn<T>, event: Event): void {\n if (!col.editable) {\n return;\n }\n event.stopPropagation();\n this.editDraft.set(this.cellValue(row, col));\n this.editingCell.set({ rowId: this.rowKey(row), key: col.key });\n afterNextRender(\n () => {\n const input = this.editInput()?.nativeElement;\n input?.focus();\n input?.select();\n },\n { injector: this.injector },\n );\n }\n\n protected onEditInput(event: Event): void {\n this.editDraft.set((event.target as HTMLInputElement).value);\n }\n\n protected commitEdit(row: T, col: TableColumn<T>): void {\n if (!this.isEditing(row, col)) {\n return;\n }\n this.editingCell.set(null);\n this.cellEdited.emit({ row, key: col.key, value: this.editDraft() });\n }\n\n protected cancelEdit(): void {\n this.editingCell.set(null);\n }\n\n /** Clip width for `truncate`. `'content'` has no clip width — the column is as\n * wide as its widest cell, so there is nothing to ellipsis against. */\n protected clipWidth(col: TableColumn<T>): number | null {\n return typeof col.width === 'number'\n ? col.width\n : col.width === 'content'\n ? null\n : DEFAULT_CLIP_WIDTH_PX;\n }\n\n protected readonly filteredData = computed<readonly T[]>(() => {\n const query = this.filterQuery().trim().toLowerCase();\n // In 'server' mode the host has already filtered; running the set filters\n // again here would filter the filtered. `filterQuery` is deliberately left\n // alone — it is a separate input with its own client/server story.\n const setFilters =\n this.filterModeResolved() === 'client'\n ? this.columnFilters()\n : new Map<string, ReadonlySet<string>>();\n const columns = this.columns();\n if (!query && setFilters.size === 0) {\n return this.layout.foldRows(this.data());\n }\n const marked = columns.filter((col) => col.filterable);\n const scope = marked.length ? marked : columns;\n const activeSetFilters = [...setFilters]\n .map(([key, allowed]) => ({\n col: columns.find((col) => col.key === key),\n allowed,\n }))\n .filter(\n (\n entry,\n ): entry is { col: TableColumn<T>; allowed: ReadonlySet<string> } =>\n !!entry.col,\n );\n\n return this.data().filter((row) => {\n if (\n query &&\n !scope.some((col) =>\n this.cellValue(row, col).toLowerCase().includes(query),\n )\n ) {\n return false;\n }\n\n return activeSetFilters.every(({ col, allowed }) =>\n allowed.has(this.cellValue(row, col)),\n );\n });\n });\n\n protected readonly sortedData = computed<readonly T[]>(() => {\n const rows = this.filteredData();\n if (this.sortModeResolved() !== 'client') {\n return rows;\n }\n const key = this.activeSortKey();\n const dir = this.activeSortDir();\n if (!key || !dir) {\n return rows;\n }\n const column = this.columns().find((col) => col.key === key);\n if (!column) {\n return rows;\n }\n\n const direction = dir === 'asc' ? 1 : -1;\n const sortValue = column.sortValue;\n\n return rows.slice().sort((a, b) => {\n const aValue = sortableOf(\n sortValue ? sortValue(a) : this.cellValue(a, column),\n );\n const bValue = sortableOf(\n sortValue ? sortValue(b) : this.cellValue(b, column),\n );\n\n // Blanks sink in BOTH directions, so `direction` is deliberately not\n // applied to this branch — a descending sort must not open with a screen\n // of empty rows.\n if (aValue === null || bValue === null) {\n if (aValue === null && bValue === null) {\n return 0;\n }\n\n return aValue === null ? 1 : -1;\n }\n\n return compareSortValues(aValue, bValue) * direction;\n });\n });\n\n protected readonly pagedData = computed<readonly T[]>(() => {\n const size = this.pageSize();\n // Server-side paging (`total` set): the host already sliced to one page.\n if (size === null || this.total() !== null) {\n return this.sortedData();\n }\n const start = (this.page() - 1) * size;\n\n return this.sortedData().slice(start, start + size);\n });\n\n /** Virtual mode windows this further; `rowSlots` is what the loop walks. */\n protected readonly displayData = computed<readonly T[]>(() =>\n this.pageSize() !== null ? this.pagedData() : this.sortedData(),\n );\n\n /**\n * The single live-region line. Loading wins while it lasts — a sort\n * announcement over rows that are being replaced tells the reader about a\n * state they cannot inspect yet.\n *\n * `aria-live=\"polite\"` does not announce a region's INITIAL content, so the\n * unsorted first render is silent; only real changes speak.\n */\n protected readonly statusMessage = computed<string>(() => {\n if (this.loadingMode() !== false) {\n return 'Loading…';\n }\n\n // A contributed line wins while it has one: an \"Export failed\" has to survive until the\n // reader moves on, and the feature that raised it is what clears it.\n return this.layout.status() || this.eventMessages();\n });\n\n private readonly eventMessages = computed<string>(() =>\n [this.sortMessage(), this.rangeMessage(), this.expansionMessage()]\n .filter(Boolean)\n .join('. '),\n );\n\n /** Only from two rows up: a single expander announces itself through its own\n * `aria-expanded`, and repeating that here would say everything twice. */\n private readonly expansionMessage = computed<string>(() => {\n const open = this.expandedIds();\n if (open.size < 2) {\n return '';\n }\n const onPage = this.displayData().filter((row) =>\n open.has(this.rowKey(row)),\n ).length;\n\n return onPage < 2 ? '' : `${onPage} rows expanded`;\n });\n\n private readonly sortMessage = computed<string>(() => {\n const key = this.activeSortKey();\n const dir = this.activeSortDir();\n if (!key) {\n return '';\n }\n const label = this.columns().find((col) => col.key === key)?.label ?? key;\n\n return this.sortAnnouncement()(label, dir);\n });\n\n private readonly rangeMessage = computed<string>(() => {\n const size = this.pageSize();\n if (size === null) {\n return '';\n }\n const rows = this.displayData().length;\n if (rows === 0) {\n return '';\n }\n const first = (this.page() - 1) * size + 1;\n const total = this.total() ?? this.filteredData().length;\n\n return this.rangeAnnouncement()(first, first + rows - 1, total);\n });\n\n protected readonly virtualizing = computed(\n () => this.virtualScroll() && !!this.maxHeight(),\n );\n\n protected readonly virtualRowHeight = computed(\n () => `${this.virtualRowSize()}px`,\n );\n\n /** How many rows the scroller spans. Lazy counts the rows that EXIST, not the\n * ones that have arrived — otherwise the spacers shrink to the loaded slice\n * and the scrollbar lies about the length of the list. */\n protected readonly virtualCount = computed(() =>\n this.lazy()\n ? (this.total() ?? this.displayData().length)\n : this.displayData().length,\n );\n\n protected readonly virtualWindow = computed(() => {\n if (!this.virtualizing()) {\n return null;\n }\n const rowSize = Math.max(1, this.virtualRowSize());\n const count = this.virtualCount();\n const height = this.viewportHeight() || VIRTUAL_FALLBACK_HEIGHT;\n const firstVisible = Math.floor(this.scrollTop() / rowSize);\n const start = Math.max(0, firstVisible - VIRTUAL_OVERSCAN);\n const end = Math.min(\n count,\n firstVisible + Math.ceil(height / rowSize) + VIRTUAL_OVERSCAN,\n );\n\n return {\n start,\n end,\n padTop: start * rowSize,\n padBottom: Math.max(0, count - end) * rowSize,\n };\n });\n\n /**\n * What the row loop walks: each slot carries its ABSOLUTE index, and a `null`\n * row is a gap the host has not filled yet.\n *\n * Absolute rather than loop-relative because everything downstream needs it —\n * striping parity, the skeleton's width seed, and the range `(lazyLoad)` asks\n * for.\n */\n protected readonly rowSlots = computed<\n readonly { row: T | null; index: number }[]\n >(() => {\n const window = this.virtualWindow();\n const data = this.displayData();\n const start = window ? window.start : 0;\n const end = window ? window.end : data.length;\n const slots: { row: T | null; index: number }[] = [];\n for (let index = start; index < end; index++) {\n slots.push({ row: data[index] ?? null, index });\n }\n\n return slots;\n });\n\n /** Zebra striping cannot come from `:nth-child` while windowing — the parity\n * of a rendered row depends on its ABSOLUTE index, and the spacer rows are\n * children too. Matches `:nth-child(odd)`, which is 1-based. */\n protected isStriped(absoluteIndex: number): boolean {\n return !!this.virtualWindow() && absoluteIndex % 2 === 0;\n }\n\n protected readonly allSelected = computed(() => {\n const data = this.displayData();\n if (data.length === 0) {\n return false;\n }\n const sel = this.selectedIds();\n\n return data.every((row) => sel.has(this.rowKey(row)));\n });\n\n // The header checkbox's indeterminate predicate: false when ALL of the page is selected.\n // Anything asking \"is a selection live\" wants `anySelected`.\n protected readonly someSelected = computed(() => {\n const data = this.displayData();\n const sel = this.selectedIds();\n\n return data.some((row) => sel.has(this.rowKey(row))) && !this.allSelected();\n });\n\n protected readonly anySelected = computed(() => this.selectedIds().size > 0);\n\n protected readonly selectAllLabel = computed(() =>\n this.pageSize() !== null\n ? 'Select all rows on this page'\n : 'Select all rows',\n );\n\n protected readonly allExpanded = computed(() => {\n const data = this.displayData();\n if (data.length === 0) {\n return false;\n }\n const open = this.expandedIds();\n\n return data.every((row) => open.has(this.rowKey(row)));\n });\n\n protected readonly expandAllVisible = computed(\n () => this.expandAllToggle() && this.expandMode() !== 'single',\n );\n\n protected readonly expandAllLabel = computed(() => {\n const scope = this.pageSize() !== null ? ' on this page' : '';\n\n return this.allExpanded()\n ? `Collapse all rows${scope}`\n : `Expand all rows${scope}`;\n });\n\n protected readonly skeletonArray = computed(() =>\n Array(this.skeletonRows()).fill(0),\n );\n\n protected readonly expandedColspan = computed(() => {\n let count = this.visibleColumns().length;\n if (this.selectable()) {\n count += 1;\n }\n if (this.expandableRows()) {\n count += 1;\n }\n if (this.hasUtilityColumn()) {\n count += 1;\n }\n\n return count;\n });\n\n protected readonly hasRowActions = computed(\n () => this.rowActions().length > 0,\n );\n protected readonly menuRow = signal<T | null>(null);\n private readonly rowMenuPopover =\n viewChild<PopoverComponent>('rowMenuPopover');\n private readonly columnPickerPopover = viewChild<PopoverComponent>(\n 'columnPickerPopover',\n );\n\n protected readonly hasTruncate = computed(() =>\n this.columns().some((col) => col.truncate),\n );\n\n private readonly scrollWrap =\n viewChild.required<ElementRef<HTMLElement>>('scrollWrap');\n private readonly hscrollProxy =\n viewChild<ElementRef<HTMLElement>>('hscrollProxy');\n private readonly tableHead = viewChild<ElementRef<HTMLElement>>('tableHead');\n\n private publishHeadHeight(head: HTMLElement): void {\n this.hostElement.nativeElement.style.setProperty(\n '--_table-head-h',\n `${head.getBoundingClientRect().height}px`,\n );\n }\n private readonly hostElement = inject<ElementRef<HTMLElement>>(ElementRef);\n\n // The scrollport a `position: sticky` offset inside this table resolves against.\n private scrollAncestor(): HTMLElement | null {\n for (\n let element = this.hostElement.nativeElement.parentElement;\n element;\n element = element.parentElement\n ) {\n const overflowY = getComputedStyle(element).overflowY;\n if (overflowY === 'auto' || overflowY === 'scroll') {\n return element;\n }\n }\n\n return document.scrollingElement as HTMLElement | null;\n }\n\n protected readonly hscrollContentWidth = signal(0);\n protected readonly hscrollNeeded = signal(false);\n private readonly scrollTop = signal(0);\n private readonly viewportHeight = signal(0);\n private lastLazyRequest: { first: number; rows: number } | null = null;\n\n constructor() {\n // The width buttons the column panel renders are still declared in this template, because a\n // directive has no view to declare an ng-template in — so the table hands the template over\n // and the resize feature owns everything the buttons DO.\n effect(() => {\n const template = this.columnWidthControls();\n if (template) {\n this.layout.registerPanelRowTemplate(template);\n }\n });\n\n // Published here rather than from an init hook: a directive on the same element is\n // constructed after this component, so by the time a feature asks, the view is here. The\n // anchor goes over as a signal — a viewChild is undefined until the view exists, and a\n // feature that renders a control of its own has to wait for it.\n this.layout.publish({\n visibleColumns: this.visibleColumns,\n sortedRows: this.sortedData,\n declaredColumns: this.columns,\n scrollViewport: computed(() => this.scrollWrap()?.nativeElement),\n cellText: (row, column) => this.cellValue(row, column),\n anchor: (name) =>\n name === 'toolbar'\n ? this.toolbarAnchor\n : name === 'header-utility'\n ? this.headerUtilityAnchor\n : this.overlaysAnchor,\n });\n\n // The scrim starts below the header, so it needs the header's height. Measured, not summed\n // from padding and line-height: `vertical-align: middle` on the inline-flex label extends\n // the line box past the strut by a font-metric amount no calc() can carry, and a sum is\n // blind to a taller control in the header.\n //\n // After RENDER, or the read lands before layout and publishes 0px, which insets the scrim by\n // nothing and covers the whole header. Twice: the observer catches a\n // header that grows on a narrower column or a density change, and the second pass re-reads\n // whenever the scrim is about to appear, so a load never depends on an observer having fired.\n afterRenderEffect((onCleanup) => {\n const head = this.tableHead()?.nativeElement;\n if (!head || typeof ResizeObserver === 'undefined') {\n return;\n }\n const observer = new ResizeObserver(() => this.publishHeadHeight(head));\n observer.observe(head);\n onCleanup(() => observer.disconnect());\n });\n afterRenderEffect(() => {\n this.isOverlayLoading();\n const head = this.tableHead()?.nativeElement;\n if (head) {\n this.publishHeadHeight(head);\n }\n });\n // One effect for both halves, because the restore CANNOT run in the\n // constructor: input signals are not set yet there, so storageKey() is still\n // '' and the restore silently no-ops. The first run with a usable key\n // restores; every later run saves.\n effect(() => {\n const key = this.layoutKey();\n // Read every slice so the effect tracks them, whichever feature owns them.\n const stored = Object.fromEntries(\n this.layout.persistedSlices().map((slice) => [slice.key, slice.read()]),\n );\n if (!key) {\n return;\n }\n if (!this.layoutRestored) {\n this.layoutRestored = true;\n this.restoreLayout(key);\n\n return;\n }\n this.saveLayout(key, stored);\n });\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() =>\n this.sortMode() === null &&\n this.total() === null &&\n this.columns().some((col) => col.sortable)\n ? '[ds-table] sortable columns default to sortMode=\"server\", so a header click only emits (sortChange) and the table reorders nothing itself. This table binds no `total`, which usually means it holds every row — declare sortMode=\"client\" to sort them in place.'\n : null,\n );\n\n devWarn(() =>\n this.filterMode() === null &&\n this.total() === null &&\n this.columns().some((col) => col.filter === 'set')\n ? '[ds-table] a header filter defaults to filterMode=\"server\", so ticking a value only updates `columnFilters` and filters nothing locally. This table binds no `total`, which usually means it holds every row — declare filterMode=\"client\" to filter them in place.'\n : null,\n );\n }\n\n effect((onCleanup) => {\n if (!this.virtualizing()) {\n return;\n }\n const wrap = this.scrollWrap().nativeElement;\n const onScroll = (): void => this.scrollTop.set(wrap.scrollTop);\n const measure = (): void => this.viewportHeight.set(wrap.clientHeight);\n wrap.addEventListener('scroll', onScroll, { passive: true });\n const resizeObserver = new ResizeObserver(measure);\n resizeObserver.observe(wrap);\n measure();\n onScroll();\n onCleanup(() => {\n wrap.removeEventListener('scroll', onScroll);\n resizeObserver.disconnect();\n });\n });\n\n // Ask for the visible range whenever it has gaps. Keyed on the range itself,\n // so scrolling within an already-requested window stays quiet and a request\n // in flight is not repeated every frame — the host is free to answer slowly.\n effect(() => {\n if (!this.lazy()) {\n return;\n }\n const slots = this.rowSlots();\n const gaps = slots.filter((slot) => slot.row === null);\n if (gaps.length === 0) {\n return;\n }\n const first = gaps[0].index;\n const rows = gaps[gaps.length - 1].index - first + 1;\n // Contained, not equal: the viewport is measured after the first paint, so\n // the window grows by an overscan or two right after opening and an\n // exact-match guard would fetch the same rows twice.\n const covered =\n this.lastLazyRequest &&\n first >= this.lastLazyRequest.first &&\n first + rows <= this.lastLazyRequest.first + this.lastLazyRequest.rows;\n if (covered) {\n return;\n }\n this.lastLazyRequest = { first, rows };\n this.lazyLoad.emit({ first, rows });\n });\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() =>\n this.lazy() && !this.virtualScroll()\n ? '[ds-table] lazy needs virtualScroll: without a window there is no range to fetch, so every gap in `data` renders a skeleton row and (lazyLoad) never narrows. Set virtualScroll (and maxHeight), or hand the table its rows outright.'\n : null,\n );\n devWarn(() =>\n this.lazy() && this.total() === null\n ? '[ds-table] lazy needs `total`: the scroller is sized from the rows that EXIST, and without it the spacers collapse to the slice that has arrived — the scrollbar then lies about the length of the list.'\n : null,\n );\n devWarn(() =>\n this.lazy() && this.sortMode() === 'client'\n ? '[ds-table] lazy with sortMode=\"client\" sorts only the rows that happen to have arrived, which is a different order every time a window loads. The server owns the order here — drop sortMode or declare \"server\".'\n : null,\n );\n devWarn(() =>\n this.virtualScroll() && !this.maxHeight()\n ? '[ds-table] virtualScroll needs maxHeight — without a bounded scroller there is no viewport to window against, so every row renders and nothing is virtualized. Set maxHeight (e.g. \"480px\").'\n : null,\n );\n devWarn(() =>\n this.virtualScroll() && this.expandableRows()\n ? '[ds-table] virtualScroll and expandableRows do not combine: an expanded row is taller than virtualRowSize, and every offset after it would be wrong. The expander renders but the panel is suppressed — move the detail into a modal or a drawer, or drop virtualScroll.'\n : null,\n );\n devWarn(() =>\n this.expandAllToggle() && this.expandMode() === 'single'\n ? '[ds-table] expandAllToggle contradicts expandMode=\"single\" — expanding every row is the one thing single mode exists to prevent. The header toggle is suppressed; drop one of the two.'\n : null,\n );\n devWarn(() =>\n this.expandAllToggle() && !this.expandableRows()\n ? '[ds-table] expandAllToggle needs expandableRows — without it there is no expander column to put the toggle in, so it renders nothing. Set expandableRows.'\n : null,\n );\n devWarn(() =>\n this.expandMode() === 'single' && this.expandedIds().size > 1\n ? '[ds-table] expandMode=\"single\" was given expandedIds holding several rows. A two-way model is the host\\'s to write, so it is left as passed rather than rewritten — the next expander click collapses back to one.'\n : null,\n );\n devWarn(() =>\n this.virtualScroll() && this.pageSize() !== null\n ? '[ds-table] virtualScroll with pageSize paginates a window of a page. Virtual scrolling is what pagination was for on a long list — pick one.'\n : null,\n );\n }\n\n // A sticky `bottom` resolves against the scrollport's CONTENT box, so anything this table\n // sticks to the bottom comes to rest one padding-bottom above the edge the reader sees. Both\n // the horizontal scrollbar proxy and the bulk-action bar subtract this; it is published on the\n // HOST so every descendant inherits one measurement, and measured rather than taken from a\n // token because the padding belongs to the consumer's scroll container and moves with a media\n // query.\n effect((onCleanup) => {\n const host = this.hostElement.nativeElement;\n const scroller = this.scrollAncestor();\n const publish = (): void =>\n host.style.setProperty(\n '--_table-scroller-pad-bottom',\n scroller ? getComputedStyle(scroller).paddingBottom : '0px',\n );\n publish();\n if (!scroller) {\n return;\n }\n const observer = new ResizeObserver(publish);\n observer.observe(scroller);\n onCleanup(() => observer.disconnect());\n });\n\n // Published as a custom property rather than bound on the proxy: the proxy is behind an\n // `@if`, and the stylesheet must be able to out-rank it with --ds-table-sticky-scrollbar-offset.\n effect(() => {\n const host = this.hostElement.nativeElement;\n const resolved = this.stickyScrollbarOffsetResolved();\n if (resolved === null) {\n host.style.removeProperty('--_table-sticky-scrollbar-offset');\n\n return;\n }\n host.style.setProperty('--_table-sticky-scrollbar-offset', resolved);\n });\n\n // Assigning an equal scrollLeft fires no scroll event, so the two mirrors\n // can't loop.\n effect((onCleanup) => {\n const proxy = this.hscrollProxy()?.nativeElement;\n if (!proxy) {\n return;\n }\n const wrap = this.scrollWrap().nativeElement;\n const fromWrap = (): void => {\n proxy.scrollLeft = wrap.scrollLeft;\n };\n const fromProxy = (): void => {\n wrap.scrollLeft = proxy.scrollLeft;\n };\n wrap.addEventListener('scroll', fromWrap, { passive: true });\n proxy.addEventListener('scroll', fromProxy, { passive: true });\n const measure = (): void => {\n this.hscrollContentWidth.set(wrap.scrollWidth);\n // Both are rounded integers, so a fractional layout width makes an\n // unscrollable wrap report one px more than it holds.\n this.hscrollNeeded.set(wrap.scrollWidth > wrap.clientWidth + 1);\n };\n // The wrap's own box never changes with content — watch the table too\n // (column toggles, data swaps change its width).\n const resizeObserver = new ResizeObserver(measure);\n resizeObserver.observe(wrap);\n const table = wrap.querySelector('table');\n if (table) {\n resizeObserver.observe(table);\n }\n measure();\n onCleanup(() => {\n wrap.removeEventListener('scroll', fromWrap);\n proxy.removeEventListener('scroll', fromProxy);\n resizeObserver.disconnect();\n });\n });\n\n // Opt-in height tween. Observer fires pre-paint: freezing the old height\n // here stops the jump being painted; disconnect during the anim so its own\n // resizes don't re-trigger it; clip (not hidden) avoids a scroll container.\n effect((onCleanup) => {\n if (!this.animateHeight()) {\n return;\n }\n const wrap = this.scrollWrap().nativeElement;\n let previousHeight: number | null = null;\n let previousWidth: number | null = null;\n let heightAnim: Animation | null = null;\n const observer = new ResizeObserver((entries) => {\n const entry = entries[0];\n const box = entry.borderBoxSize?.[0];\n const nextHeight = box ? box.blockSize : entry.contentRect.height;\n const nextWidth = box ? box.inlineSize : entry.contentRect.width;\n const fromHeight = previousHeight;\n const widthChanged = nextWidth !== previousWidth;\n previousHeight = nextHeight;\n previousWidth = nextWidth;\n // Only a height change at a stable width is a row-set swap; skip the\n // first measure and width-driven reflows (window/column resize) so the\n // tween doesn't chase a resize.\n if (fromHeight === null || widthChanged || nextHeight === fromHeight) {\n return;\n }\n const styles = getComputedStyle(wrap);\n const duration = this.parseDurationMs(\n styles.getPropertyValue('--duration-base'),\n );\n if (duration <= 0) {\n return;\n }\n observer.disconnect();\n heightAnim?.cancel();\n wrap.style.height = `${fromHeight}px`;\n wrap.style.overflowY = 'clip';\n heightAnim = wrap.animate(\n [{ height: `${fromHeight}px` }, { height: `${nextHeight}px` }],\n {\n duration,\n easing:\n styles.getPropertyValue('--ease-standard').trim() || 'ease-out',\n },\n );\n heightAnim.onfinish = heightAnim.oncancel = () => {\n heightAnim = null;\n wrap.style.height = '';\n wrap.style.overflowY = '';\n observer.observe(wrap);\n };\n });\n observer.observe(wrap);\n onCleanup(() => {\n if (heightAnim) {\n heightAnim.onfinish = heightAnim.oncancel = null;\n heightAnim.cancel();\n heightAnim = null;\n }\n wrap.style.height = '';\n wrap.style.overflowY = '';\n observer.disconnect();\n });\n });\n\n // Client-side paging only (with `total` set the host owns the clamp): when a\n // filter shrinks the result set below the current page, pull `page` back to\n // the last page that still has rows so the body never renders empty.\n effect(() => {\n const size = this.pageSize();\n if (size === null || this.total() !== null) {\n return;\n }\n const lastPage = Math.max(\n 1,\n Math.ceil(this.filteredData().length / size),\n );\n if (this.page() > lastPage) {\n this.page.set(lastPage);\n }\n });\n\n let previousPage = this.page();\n effect(() => {\n const current = this.page();\n const enabled = this.scrollToTopOnPageChange();\n if (current !== previousPage && enabled) {\n this.scrollWrap().nativeElement.scrollIntoView({ block: 'start' });\n }\n previousPage = current;\n });\n }\n\n private parseDurationMs(raw: string): number {\n const value = raw.trim();\n if (value.endsWith('ms')) {\n return parseFloat(value);\n }\n if (value.endsWith('s')) {\n return parseFloat(value) * 1000;\n }\n\n return parseFloat(value) || 0;\n }\n\n protected onRowMenuClick(row: T, event: Event): void {\n event.stopPropagation();\n this.menuRow.set(row);\n this.rowMenuPopover()?.toggle(event.currentTarget as HTMLElement);\n }\n\n protected isMenuOpenFor(row: T): boolean {\n return this.menuRow() === row && !!this.rowMenuPopover()?.opened();\n }\n\n protected isActionDisabled(action: TableRowAction<T>): boolean {\n const row = this.menuRow();\n\n return row !== null && !!action.disabled?.(row);\n }\n\n /** Items that apply to `row`. Called from the trigger's own gate as well as the\n * menu, so a row with nothing applicable shows no kebab instead of an empty one. */\n protected actionsFor(row: T): readonly TableRowAction<T>[] {\n return this.rowActions().filter((action) => !action.hidden?.(row));\n }\n\n protected hasActionsFor(row: T): boolean {\n return this.actionsFor(row).length > 0;\n }\n\n protected readonly visibleRowActions = computed<readonly TableRowAction<T>[]>(\n () => {\n const row = this.menuRow();\n\n return row === null ? [] : this.actionsFor(row);\n },\n );\n\n protected actionLabel(action: TableRowAction<T>): string {\n const label = action.label;\n if (typeof label !== 'function') {\n return label;\n }\n const row = this.menuRow();\n\n return row === null ? '' : label(row);\n }\n\n /** Empty unless the item is actually disabled for this row: a reason on a live\n * item would read as a caveat on something that works. */\n protected actionReason(action: TableRowAction<T>): string {\n const row = this.menuRow();\n if (row === null || !action.disabled?.(row)) {\n return '';\n }\n const reason = action.disabledReason;\n\n return typeof reason === 'function' ? reason(row) : (reason ?? '');\n }\n\n protected onRowAction(action: TableRowAction<T>): void {\n const row = this.menuRow();\n if (row === null) {\n return;\n }\n this.rowActionSelected.emit({ action, row });\n }\n\n protected isExpanded(row: T): boolean {\n return this.expandedIds().has(this.rowKey(row));\n }\n\n protected onToggleExpand(row: T, event: Event): void {\n event.stopPropagation();\n const key = this.rowKey(row);\n const open = this.expandedIds();\n\n if (open.has(key)) {\n const next = new Set<string>(open);\n next.delete(key);\n this.expandedIds.set(next);\n this.rowCollapsed.emit(row);\n\n return;\n }\n\n if (this.expandMode() === 'single') {\n // `data()` rather than `displayData()` so a row left open on another page\n // is reported too — but an event carries a row, so an id whose row is not\n // loaded at all is dropped without one. Documented on `rowCollapsed`.\n const closing =\n open.size > 0\n ? this.data().filter((other) => open.has(this.rowKey(other)))\n : [];\n this.expandedIds.set(new Set<string>([key]));\n closing.forEach((other) => this.rowCollapsed.emit(other));\n this.rowExpanded.emit(row);\n\n return;\n }\n\n const next = new Set<string>(open);\n next.add(key);\n this.expandedIds.set(next);\n this.rowExpanded.emit(row);\n }\n\n protected onToggleExpandAll(): void {\n const rows = this.displayData();\n const open = this.expandedIds();\n const collapsing = this.allExpanded();\n const changed = rows.filter(\n (row) => open.has(this.rowKey(row)) === collapsing,\n );\n if (changed.length === 0) {\n return;\n }\n\n const next = new Set<string>(open);\n rows.forEach((row) => {\n if (collapsing) {\n next.delete(this.rowKey(row));\n } else {\n next.add(this.rowKey(row));\n }\n });\n this.expandedIds.set(next);\n\n changed.forEach((row) =>\n collapsing ? this.rowCollapsed.emit(row) : this.rowExpanded.emit(row),\n );\n }\n\n protected isSelected(row: T): boolean {\n return this.selectedIds().has(this.rowKey(row));\n }\n\n protected onToggleAll(event: Event): void {\n const checked = (event.target as HTMLInputElement).checked;\n const next = new Set<string>(this.selectedIds());\n if (checked) {\n this.displayData().forEach((row) => next.add(this.rowKey(row)));\n } else {\n this.displayData().forEach((row) => next.delete(this.rowKey(row)));\n }\n this.selectedIds.set(next);\n }\n\n protected onToggleRow(row: T, event: Event): void {\n event.stopPropagation();\n const checked = (event.target as HTMLInputElement).checked;\n const next = new Set<string>(this.selectedIds());\n if (checked) {\n next.add(this.rowKey(row));\n } else {\n next.delete(this.rowKey(row));\n }\n this.selectedIds.set(next);\n }\n\n private selectionBeforeGesture = '';\n\n protected onRowMousedown(): void {\n this.selectionBeforeGesture = window.getSelection()?.toString() ?? '';\n }\n\n protected onRowClick(row: T, event: Event): void {\n if ((event.target as HTMLElement).closest('input')) {\n return;\n }\n // Only a selection created by this gesture blocks the click — a stale one\n // mousedown can't collapse (user-select:none content) must not wedge rows.\n const selection = window.getSelection()?.toString() ?? '';\n if (selection && selection !== this.selectionBeforeGesture) {\n return;\n }\n this.rowClicked.emit(row);\n }\n\n protected onRowKey(row: T, event: Event): void {\n // Only the row's own key opens the row: a key pressed on a control inside a\n // cell belongs to that control (Space on the select box, Enter on a button).\n if (!this.rowInteractive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.rowClicked.emit(row);\n }\n\n protected rowAriaLabel(row: T): string {\n const first = this.visibleColumns()[0];\n\n return first ? this.cellValue(row, first) : '';\n }\n\n /** Row identity — the `rowId` accessor when given, else `row.id`. Public so a\n * host reading `selectedIds`/`expandedIds` can compute the same keys. */\n rowKey(row: T): string {\n const accessor = this.rowId();\n if (accessor) {\n return accessor(row);\n }\n\n return String((row as { id?: unknown }).id ?? '');\n }\n\n protected sortableCol(col: TableColumn<T>): boolean {\n return !!col.sortable && this.sortModeResolved() !== 'none';\n }\n\n protected ariaSort(\n col: TableColumn<T>,\n ): 'ascending' | 'descending' | 'none' | null {\n if (!this.sortableCol(col)) {\n return null;\n }\n if (this.activeSortKey() === col.key && this.activeSortDir()) {\n return this.activeSortDir() === 'asc' ? 'ascending' : 'descending';\n }\n\n return 'none';\n }\n\n protected onSort(col: TableColumn<T>): void {\n if (!this.sortableCol(col)) {\n return;\n }\n const order = this.sortingOrder();\n const currentKey = this.activeSortKey();\n let dir: SortDir;\n if (currentKey !== col.key) {\n dir = order[0] ?? null;\n } else {\n const currentIndex = order.indexOf(this.activeSortDir());\n dir = order[(currentIndex + 1) % order.length] ?? null;\n }\n // The key survives `dir === null`: nulling it too would send a host that maps off\n // `sortKey` back to its own default sort.\n this.sortState.set({ key: col.key, dir });\n this.sortKeyChange.emit(col.key);\n this.sortDirChange.emit(dir);\n this.sortChange.emit({ key: col.key, dir });\n }\n\n protected headerClasses(col: TableColumn<T>): string {\n const parts: string[] = [];\n if (this.sortableCol(col)) {\n parts.push('sortable');\n }\n if (this.activeSortKey() === col.key && this.activeSortDir()) {\n parts.push(`sorted-${this.activeSortDir()}`);\n }\n\n return parts.join(' ');\n }\n\n protected sortIcon(col: TableColumn<T>): 'sortAsc' | 'sortDesc' | 'sort' {\n if (this.activeSortKey() !== col.key || !this.activeSortDir()) {\n return 'sort';\n }\n\n return this.activeSortDir() === 'asc' ? 'sortAsc' : 'sortDesc';\n }\n\n protected cellValue(row: T, col: TableColumn<T>): string {\n if (col.cell) {\n return col.cell(row);\n }\n\n return String((row as Record<string, unknown>)[col.key] ?? '');\n }\n\n protected cellLink(\n row: T,\n col: TableColumn<T>,\n ): string | readonly unknown[] | null {\n return col.link?.(row) ?? null;\n }\n\n // localStorage, not session: a column layout the reader arranged should still\n // be there tomorrow.\n private layoutKey(): string | null {\n const key = this.storageKey().trim();\n\n return this.persistLayout() && key ? `ds-table:${key}` : null;\n }\n\n private layoutRestored = false;\n\n private restoreLayout(key: string): void {\n try {\n const raw = localStorage.getItem(key);\n if (!raw) {\n return;\n }\n const saved = JSON.parse(raw) as Record<string, unknown>;\n // Only apply what was actually stored, and only what something owns: a table that has\n // never been rearranged must keep its declaration order and `hidden` flags, and a layout\n // saved when a feature was present must not be forced on a table that no longer has it.\n for (const slice of this.layout.persistedSlices()) {\n const value = saved[slice.key];\n if (value !== undefined && value !== null) {\n slice.write(value);\n }\n }\n } catch {\n // Unreadable or from an older shape: fall back to the declared layout.\n }\n }\n\n private saveLayout(key: string, stored: Record<string, unknown>): void {\n try {\n localStorage.setItem(key, JSON.stringify(stored));\n } catch {\n // Full or blocked: a lost column layout is not worth an error.\n }\n }\n\n /** Serialises the visible columns as a CSV download, through whichever export feature is on the\n * table. Pass `rows` to serialise a set you fetched yourself. Needs `dsTableExport`. */\n exportCsv(filename = 'table.csv', rows?: readonly T[]): void {\n if (!this.layout.exportCsv(filename, rows)) {\n this.warnNoExport('exportCsv');\n }\n }\n\n /** Runs the export: awaits the feature's `exportFetcher` when one is given, downloads the\n * result, drives `exporting()` and emits its `exportFailed`. Public so the button can live\n * anywhere: `<ds-button [loading]=\"table.exporting()\" (pressed)=\"table.runExport()\">`. */\n async runExport(): Promise<void> {\n const running = this.layout.runExport();\n if (!running) {\n this.warnNoExport('runExport');\n\n return;\n }\n await running;\n }\n\n private warnNoExport(called: string): void {\n devWarn(\n () =>\n `ds-table: ${called}() found no export feature. Add the dsTableExport directive to the table.`,\n );\n }\n\n /** Deterministic per-cell width so skeleton rows look organic but stable\n * across re-renders. */\n protected skeletonWidth(col: TableColumn<T>, rowIndex: number): string {\n const seed = `${col.key}-${rowIndex}`;\n let hash = 0;\n for (let charIndex = 0; charIndex < seed.length; charIndex++) {\n hash = (hash + seed.charCodeAt(charIndex)) | 0;\n }\n const widths = ['45%', '55%', '65%', '75%', '85%'];\n\n return widths[Math.abs(hash) % widths.length] ?? '70%';\n }\n}\n","<div class=\"table-toolbar\">\n <div class=\"toolbar-slot\">\n <ng-content select=\"[toolbar]\"></ng-content>\n </div>\n\n <ng-container #toolbarAnchor />\n</div>\n\n<!-- Wraps the SCROLL CONTAINER, not the table inside it: the scrim is\n `position: absolute; inset: 0`, so from in there it is sized to one viewport of\n the table and scrolls away with the content. -->\n<ds-loading-overlay\n [loading]=\"isOverlayLoading()\"\n [blur]=\"true\"\n [insetTop]=\"'var(--ds-table-head-h, var(--_table-head-h, 40px))'\"\n [inertContent]=\"false\">\n <div\n #scrollWrap\n class=\"scroll-wrap\"\n [class.scroll-y]=\"maxHeight()\"\n [style.max-height]=\"maxHeight()\">\n <div\n class=\"visually-hidden\"\n role=\"status\"\n aria-live=\"polite\">\n {{ statusMessage() }}\n </div>\n\n <table\n [class]=\"tableClasses()\"\n [style.--_table-virtual-row-h]=\"virtualRowHeight()\"\n [attr.role]=\"rowInteractive() ? 'grid' : null\"\n [attr.aria-busy]=\"loading() !== false ? 'true' : null\">\n @if (caption()) {\n <caption class=\"visually-hidden\">\n {{\n caption()\n }}\n </caption>\n }\n\n <thead #tableHead>\n <tr>\n @if (selectable()) {\n <th\n scope=\"col\"\n class=\"select-col pin-select\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"selectAllLabel()\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (change)=\"onToggleAll($event)\" />\n </th>\n }\n\n @if (expandableRows()) {\n <th\n scope=\"col\"\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\">\n @if (expandAllVisible()) {\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-label]=\"expandAllLabel()\"\n (click)=\"onToggleExpandAll()\">\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"allExpanded()\"\n [size]=\"16\" />\n </button>\n }\n </th>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <th\n scope=\"col\"\n dsTooltipWhenClipped\n [class]=\"headerClasses(col)\"\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.fit-content]=\"fitsContent(col)\"\n [style.width.px]=\"columnWidth(col)\"\n [style.min-width.px]=\"columnWidth(col)\"\n [style.max-width.px]=\"columnWidth(col)\"\n [attr.aria-sort]=\"ariaSort(col)\"\n [attr.data-col-key]=\"col.key\"\n [dsTooltip]=\"col.label\">\n @if (sortableCol(col)) {\n <button\n type=\"button\"\n class=\"th-label\"\n (click)=\"onSort(col)\">\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n\n <ds-icon\n class=\"sort-icon\"\n [name]=\"sortIcon(col)\"\n [size]=\"12\">\n </ds-icon>\n </button>\n } @else {\n <span class=\"th-label\">\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n </span>\n }\n\n @if (hasColumnFilter(col)) {\n <button\n type=\"button\"\n class=\"col-filter-btn\"\n aria-haspopup=\"dialog\"\n [class.active]=\"isColumnFiltered(col)\"\n [attr.aria-expanded]=\"isFilterPanelOpen(col)\"\n [attr.aria-label]=\"'Filter ' + col.label\"\n (click)=\"onColumnFilterClick(col, $event)\">\n <ds-icon\n name=\"filter\"\n [size]=\"12\" />\n </button>\n }\n\n @if (layout.resize(); as resize) {\n @let range = resize.range(col);\n\n <span\n class=\"col-resize\"\n role=\"separator\"\n tabindex=\"0\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"'Resize ' + col.label\"\n [attr.aria-valuenow]=\"range?.now ?? null\"\n [attr.aria-valuemin]=\"range?.min ?? null\"\n [attr.aria-valuemax]=\"range?.max ?? null\"\n (focus)=\"resize.onFocus(col, $event)\"\n (blur)=\"resize.onBlur()\"\n (pointerdown)=\"resize.onStart(col, $event)\"\n (pointermove)=\"resize.onMove($event)\"\n (pointerup)=\"resize.onEnd()\"\n (pointercancel)=\"resize.onEnd()\"\n (keydown)=\"resize.onKey(col, $event)\">\n </span>\n }\n </th>\n }\n\n @if (hasUtilityColumn()) {\n <th\n scope=\"col\"\n class=\"actions-col\">\n <ng-container #headerUtilityAnchor />\n\n @if (!layout.wantsUtilityColumn()) {\n <span class=\"visually-hidden\">\n Actions\n </span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <!-- Matches what the scrim covers, which is everything below the header:\n a row keeps its tabindex and its Enter handler otherwise, so a keyboard\n user could open a row whose data is mid-replacement while the pointer\n was stopped by the scrim. The header stays live on purpose — re-sorting\n is what puts the scrim up in the first place. -->\n <tbody [attr.inert]=\"isOverlayLoading() ? '' : null\">\n @if (isSkeletonLoading()) {\n @for (_ of skeletonArray(); track $index; let rowIndex = $index) {\n <ng-container\n [ngTemplateOutlet]=\"skeletonRow\"\n [ngTemplateOutletContext]=\"{ $implicit: rowIndex }\">\n </ng-container>\n }\n } @else if (showsLoadingSpace()) {\n <!-- Height, not a message. The empty state is a claim about the data and stays withheld\n while the table is still asking; without this the tbody is empty, the table collapses\n onto its header and the overlay spinner floats over nothing. -->\n <tr aria-hidden=\"true\">\n <td\n class=\"loading-space\"\n [attr.colspan]=\"expandedColspan()\">\n </td>\n </tr>\n } @else if (showsEmptyRow()) {\n <tr>\n <td\n class=\"empty\"\n [attr.colspan]=\"expandedColspan()\">\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\">\n </ng-container>\n } @else {\n <ng-content select=\"[empty]\"></ng-content>\n }\n </td>\n </tr>\n } @else {\n @if (virtualWindow(); as window) {\n <tr\n class=\"spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"window.padTop\">\n </tr>\n }\n\n @for (slot of rowSlots(); track slot.index) {\n @if (slot.row; as row) {\n <tr\n [class.selected]=\"isSelected(row)\"\n [class.expanded]=\"isExpanded(row)\"\n [class.clickable]=\"rowInteractive()\"\n [class.stripe]=\"isStriped(slot.index)\"\n [class.active]=\"rowKey(row) === activeRowId()\"\n [attr.aria-current]=\"\n rowKey(row) === activeRowId() ? 'true' : null\n \"\n [attr.tabindex]=\"rowInteractive() ? 0 : null\"\n [attr.aria-label]=\"rowInteractive() ? rowAriaLabel(row) : null\"\n (mousedown)=\"onRowMousedown()\"\n (click)=\"onRowClick(row, $event)\"\n (keydown.enter)=\"onRowKey(row, $event)\"\n (keydown.space)=\"onRowKey(row, $event)\">\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"'Select ' + rowAriaLabel(row)\"\n [checked]=\"isSelected(row)\"\n (change)=\"onToggleRow(row, $event)\"\n (click)=\"$event.stopPropagation()\" />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\">\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n [attr.aria-label]=\"\n isExpanded(row) ? 'Collapse row' : 'Expand row'\n \"\n (click)=\"onToggleExpand(row, $event)\">\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"isExpanded(row)\"\n [size]=\"16\" />\n </button>\n </td>\n }\n\n @for (\n col of visibleColumns();\n track col.key;\n let first = $first\n ) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.editable-cell]=\"col.editable\"\n [class.interactive-cell]=\"col.interactive\"\n [class.fit-content]=\"fitsContent(col)\"\n (dblclick)=\"startEdit(row, col, $event)\">\n @if (isEditing(row, col)) {\n <input\n #editInput\n type=\"text\"\n class=\"cell-edit\"\n [value]=\"editDraft()\"\n (input)=\"onEditInput($event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"commitEdit(row, col)\"\n (keydown.escape)=\"cancelEdit()\"\n (blur)=\"commitEdit(row, col)\" />\n } @else if (cellTemplate(col); as tpl) {\n @if (col.truncate) {\n <span\n class=\"cell-clip\"\n dsTooltipWhenClipped\n [style.max-width.px]=\"clipWidth(col)\"\n [dsTooltip]=\"cellValue(row, col)\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row: row,\n }\">\n </ng-container>\n </span>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row: row,\n }\">\n </ng-container>\n }\n } @else if (col.truncate) {\n <span\n class=\"cell-clip\"\n dsTooltipWhenClipped\n [style.max-width.px]=\"clipWidth(col)\"\n [dsTooltip]=\"cellValue(row, col)\">\n @if (cellLink(row, col); as target) {\n <a\n class=\"cell-link\"\n [routerLink]=\"target\"\n (click)=\"$event.stopPropagation()\">\n {{ cellValue(row, col) }}\n </a>\n } @else {\n {{ cellValue(row, col) }}\n }\n </span>\n } @else if (cellLink(row, col); as target) {\n <a\n class=\"cell-link\"\n [routerLink]=\"target\"\n (click)=\"$event.stopPropagation()\">\n {{ cellValue(row, col) }}\n </a>\n } @else {\n {{ cellValue(row, col) }}\n }\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\">\n @if (hasRowActions() && hasActionsFor(row)) {\n <button\n type=\"button\"\n class=\"row-actions-btn\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isMenuOpenFor(row)\"\n [attr.aria-label]=\"'Actions for ' + rowAriaLabel(row)\"\n (click)=\"onRowMenuClick(row, $event)\"\n (keydown.enter)=\"$event.stopPropagation()\"\n (keydown.space)=\"$event.stopPropagation()\">\n <ds-icon\n name=\"moreV\"\n [size]=\"16\" />\n </button>\n }\n </td>\n }\n </tr>\n\n @if (\n expandableRows() &&\n isExpanded(row) &&\n rowExpandTemplate() &&\n !virtualizing()\n ) {\n <tr class=\"expand-panel-row\">\n <td\n class=\"expand-panel-cell\"\n [attr.colspan]=\"expandedColspan()\">\n <!-- The animation runs on the grid track, so the panel needs a child to be the\n track's content; `overflow: hidden` on it is what makes the reveal read as\n the accordion's rather than as a jump. -->\n <div class=\"expand-panel-inner\">\n <ng-container\n [ngTemplateOutlet]=\"rowExpandTemplate()!\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row: row,\n }\">\n </ng-container>\n </div>\n </td>\n </tr>\n }\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"skeletonRow\"\n [ngTemplateOutletContext]=\"{ $implicit: slot.index }\">\n </ng-container>\n }\n }\n\n @if (virtualWindow(); as window) {\n <tr\n class=\"spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"window.padBottom\">\n </tr>\n }\n }\n </tbody>\n </table>\n </div>\n</ds-loading-overlay>\n\n@if (stickyScrollbarResolved()) {\n <div\n #hscrollProxy\n class=\"hscroll-proxy\"\n aria-hidden=\"true\"\n [class.hscroll-hidden]=\"!hscrollNeeded()\">\n <div\n class=\"hscroll-spacer\"\n [style.width.px]=\"hscrollContentWidth()\">\n </div>\n </div>\n}\n\n@if (pageSize(); as size) {\n <div class=\"pagination-footer\">\n <ds-pagination\n [total]=\"total() ?? filteredData().length\"\n [pageSize]=\"size\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [showPageSize]=\"showPageSize()\"\n [showLabel]=\"showLabel()\"\n [(currentPage)]=\"page\"\n (pageSizeChange)=\"pageSize.set($event)\" />\n </div>\n}\n\n@if (hasAnyColumnFilter()) {\n <ds-popover\n #columnFilterPopover\n align=\"start\"\n panelRole=\"dialog\"\n panelLabel=\"Filter values\">\n @if (filterColumn()) {\n @if (headerFilterFor(filterColumn()!); as projected) {\n <div class=\"col-filter col-filter-custom\">\n <ng-container\n [ngTemplateOutlet]=\"projected.template\"\n [ngTemplateOutletContext]=\"headerFilterContext(filterColumn()!)\" />\n </div>\n } @else {\n <div class=\"col-filter\">\n <input\n type=\"text\"\n class=\"col-filter-search\"\n placeholder=\"Search…\"\n [value]=\"filterSearch()\"\n (input)=\"onFilterSearch($event)\"\n (click)=\"$event.stopPropagation()\" />\n\n <div class=\"col-filter-list\">\n @for (value of filterValues(); track value) {\n <label class=\"col-filter-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isFilterValueChecked(value)\"\n (change)=\"toggleFilterValue(value)\" />\n {{ value || '(empty)' }}\n </label>\n } @empty {\n <div class=\"col-filter-empty\">\n No matches\n </div>\n }\n </div>\n\n <div class=\"col-filter-footer\">\n <span class=\"col-filter-count\">\n {{ filterSelectedCount() }} selected\n </span>\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"clearColumnFilter()\">\n Clear\n </button>\n </div>\n </div>\n }\n }\n </ds-popover>\n}\n\n<ng-container #overlaysAnchor />\n\n<ng-template\n #columnWidthControls\n let-col>\n @if (layout.resize(); as resize) {\n <span class=\"col-width\">\n <button\n type=\"button\"\n class=\"col-width-btn\"\n [attr.aria-label]=\"'Narrow ' + col.label\"\n (click)=\"resize.step(col, -16)\">\n <ds-icon\n name=\"minus\"\n [size]=\"14\" />\n </button>\n\n <button\n type=\"button\"\n class=\"col-width-btn\"\n [attr.aria-label]=\"'Widen ' + col.label\"\n (click)=\"resize.step(col, 16)\">\n <ds-icon\n name=\"plus\"\n [size]=\"14\" />\n </button>\n\n <button\n type=\"button\"\n class=\"col-width-btn col-width-auto\"\n [attr.aria-label]=\"'Fit ' + col.label + ' to its content'\"\n (click)=\"resize.step(col, 'auto')\">\n Fit\n </button>\n </span>\n }\n</ng-template>\n\n@if (hasRowActions()) {\n <ds-popover\n #rowMenuPopover\n align=\"end\">\n <ds-menu>\n @for (action of visibleRowActions(); track action.id; let first = $first) {\n <!-- Not before the first item: a divider at the top of a menu separates the menu from its\n own edge, which is a line with nothing on one side of it. -->\n @if (action.divider && !first) {\n <ds-menu-divider />\n }\n\n <ds-menu-item\n [icon]=\"action.icon ?? null\"\n [error]=\"action.error ?? false\"\n [disabled]=\"isActionDisabled(action)\"\n [description]=\"actionReason(action)\"\n (pressed)=\"onRowAction(action)\">\n {{ actionLabel(action) }}\n </ds-menu-item>\n }\n </ds-menu>\n </ds-popover>\n}\n\n@if (selectable() && anySelected()) {\n <div class=\"bulk-bar\">\n <span class=\"count\">\n {{ selectedIds().size }} selected\n </span>\n\n <span class=\"sep\"></span>\n\n <ng-content select=\"[bulk-actions]\"></ng-content>\n </div>\n}\n\n<!-- One skeleton row, shared by loading=\"skeleton\" and the gaps a lazy\n window has not filled yet. `$implicit` is the row's index: skeletonWidth\n varies the bar lengths from it, so a block of them does not read as a grid. -->\n<ng-template\n #skeletonRow\n let-rowIndex>\n <tr>\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <ds-skeleton\n width=\"14px\"\n height=\"14px\"\n [inline]=\"true\" />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\">\n </td>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\">\n <ds-skeleton\n height=\"14px\"\n [width]=\"skeletonWidth(col, rowIndex)\"\n [inline]=\"true\" />\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\"></td>\n }\n </tr>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAEA;;;;;;;;;;;;;;;;;AAiBG;MAKU,qBAAqB,CAAA;AAChC;AAC6E;AACpE,IAAA,cAAc,GAAG,KAAK,CAAC,QAAQ,oFAAU;AACzC,IAAA,QAAQ,GAAG,MAAM,EAAC,WAAiD,EAAC;wGAJlE,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACVD;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;MAKU,qBAAqB,CAAA;;AAEvB,IAAA,cAAc,GAAG,KAAK,CAAC,QAAQ,oFAAU;AAClD;AAC6B;AACpB,IAAA,MAAM,GAAG,KAAK,CAAC,KAAK,6EAAC;AAErB,IAAA,QAAQ,GAAG,MAAM,EAAC,WAAgC,EAAC;wGAPjD,qBAAqB,EAAA,IAAA,EAAA,EAAA,EA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cAAc,mEACa,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEvkC7E;;AAEG;;;;"}
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-table.mjs","sources":["../../../src/lib/components/table/cell-template.directive.ts","../../../src/lib/components/table/header-filter.directive.ts","../../../src/lib/components/table/table-layout.ts","../../../src/lib/components/table/table.component.ts","../../../src/lib/components/table/table.component.html","../../../src/lib/components/table/ids-group-ltd-ids-design-system-components-table.ts"],"sourcesContent":["import { Directive, TemplateRef, inject, input } from '@angular/core';\n\n/**\n * Projects a custom cell template into <ds-table> for a specific column.\n *\n * Usage:\n * <ds-table [data]=\"rows\" [columns]=\"cols\">\n * <ng-template dsCellTemplate=\"product\" let-row>\n * <div>{{ asRule(row).product }}</div>\n * </ng-template>\n * </ds-table>\n *\n * The template context type is `unknown` because Angular cannot propagate\n * the parent <ds-table>'s row type to projected templates. Consumers should\n * narrow the row with a typed helper method on the host component.\n *\n * Context shape:\n * - $implicit: the row object (typed `unknown`)\n * - row: alias for the row object (typed `unknown`)\n */\n@Directive({\n selector: '[dsCellTemplate]',\n standalone: true,\n})\nexport class CellTemplateDirective {\n /** The `key` of the column this template replaces, matched against the table's\n * `columns`. A key no column declares renders nothing and warns nowhere. */\n readonly dsCellTemplate = input.required<string>();\n readonly template = inject(TemplateRef<{ $implicit: unknown; row: unknown }>);\n}\n","import { Directive, TemplateRef, inject, input } from '@angular/core';\n\n/** What a projected header filter is handed. */\nexport interface HeaderFilterContext {\n /** The column being filtered. */\n readonly $implicit: unknown;\n /** Alias for the column. */\n readonly column: unknown;\n /** Dismisses the popover — call it after applying, so the filter behaves like\n * the built-in checklist rather than staying open. */\n readonly close: () => void;\n}\n\n/**\n * Projects a custom filter into a `ds-table` header popover, for a criterion the\n * built-in checklist cannot express: a date range, a numeric threshold, an async\n * option list.\n *\n * ```html\n * <ds-table [data]=\"rows\" [columns]=\"cols\">\n * <ng-template\n * dsHeaderFilter=\"opened\"\n * [active]=\"!!range()\"\n * let-close=\"close\"\n * >\n * <ds-date-picker mode=\"range\" [(value)]=\"range\" />\n * <ds-button size=\"sm\" (pressed)=\"apply(); close()\">Apply</ds-button>\n * </ng-template>\n * </ds-table>\n * ```\n *\n * The table still owns the header button, the popover and the active-filter\n * styling — only the panel's contents change. It cannot know whether YOUR\n * criterion is set, though, so `active` is how the highlight gets told; without\n * it a custom filter renders but the header never marks itself filtered.\n *\n * The column is typed `unknown` for the same reason `dsCellTemplate`'s row is:\n * Angular cannot propagate the parent table's row type into a projected\n * template. Narrow it with a typed helper on the host.\n */\n@Directive({\n selector: 'ng-template[dsHeaderFilter]',\n standalone: true,\n})\nexport class HeaderFilterDirective {\n /** Key of the column this filter belongs to. */\n readonly dsHeaderFilter = input.required<string>();\n /** Whether YOUR criterion is currently set, which drives the header's\n * active-filter styling. */\n readonly active = input(false);\n\n readonly template = inject(TemplateRef<HeaderFilterContext>);\n}\n","import {\n Injectable,\n Signal,\n TemplateRef,\n ViewContainerRef,\n signal,\n} from '@angular/core';\nimport type { TableColumn } from './table.types';\n\n/** A stage in the column pipeline: ordering, hiding, widths. */\nexport type DsTableColumnStage<T> = (\n columns: readonly TableColumn<T>[],\n) => readonly TableColumn<T>[];\n\n/** A stage in the row pipeline: the set filters, ahead of the substring search. */\nexport type DsTableRowStage<T> = (rows: readonly T[]) => readonly T[];\n\n/**\n * Where in the table a feature may put markup.\n *\n * Three, because the column picker needs three: a trigger in the utility header cell, and its\n * popover and bottom sheet at the end of the host where an overlay belongs. One\n * `ViewContainerRef` was enough for the export button and is not enough for anything else.\n */\nexport type DsTableAnchor = 'toolbar' | 'header-utility' | 'overlays';\n\n/** Everything a resize feature hands the table: the width it overrides, and the handlers the\n * header's separator calls. The markup stays in the table because a directive has no view to\n * declare it in, so the table needs somewhere to send the events. */\nexport interface DsTableResizeContribution<T> {\n readonly widthOverride: (key: string) => number | undefined;\n readonly range: (\n column: TableColumn<T>,\n ) => { now: number; min: number; max: number } | null;\n readonly onStart: (column: TableColumn<T>, event: PointerEvent) => void;\n readonly onMove: (event: PointerEvent) => void;\n readonly onEnd: () => void;\n readonly onFocus: (column: TableColumn<T>, event: FocusEvent) => void;\n readonly onBlur: () => void;\n readonly onKey: (column: TableColumn<T>, event: KeyboardEvent) => void;\n readonly step: (column: TableColumn<T>, delta: number | 'auto') => void;\n}\n\n/**\n * What a feature is allowed to read back out of the table, and where it may put markup.\n *\n * A feature needs the table's derived state — the export serialises `visibleColumns` and\n * `sortedRows` through `cellText`. Those live on the component as `protected`, which a directive\n * cannot reach, so the contract is published here rather than by widening the component's surface:\n * this way the table's public API does not grow one member per feature.\n */\nexport interface DsTableView<T> {\n /** As declared, before any feature reorders or hides. A feature that OWNS the order needs the\n * unfolded list - reading `visibleColumns` would fold its own stage back in. */\n readonly declaredColumns: Signal<readonly TableColumn<T>[]>;\n readonly visibleColumns: Signal<readonly TableColumn<T>[]>;\n readonly sortedRows: Signal<readonly T[]>;\n readonly cellText: (row: T, column: TableColumn<T>) => string;\n /** A directive cannot insert markup into another component's template, so a feature with a\n * control of its own creates it in one of these. Undefined until the view exists. */\n readonly anchor: (\n name: DsTableAnchor,\n ) => Signal<ViewContainerRef | undefined>;\n /** The scroll container. A width ceiling has to be the viewport, and the header cells are\n * looked up inside it. */\n readonly scrollViewport: Signal<HTMLElement | undefined>;\n}\n\n/**\n * One named piece of the persisted column layout.\n *\n * The stored shape stays `{ order, widths, hidden }`, so a layout saved by an earlier version\n * still restores — the key IS the JSON key. Persistence walks whatever is registered instead of\n * naming the three inputs, which is what lets reorder, the picker and resize move out from under\n * it without the storage code changing.\n */\nexport interface DsTablePersistedSlice {\n readonly key: string;\n /** Serialisable. Read inside the caller's effect, so whatever it touches is tracked. */\n readonly read: () => unknown;\n readonly write: (value: unknown) => void;\n /** Back to the declared layout. \"Reset to default\" has to reach every slice, and only the\n * slice knows what its own default is. */\n readonly reset: () => void;\n}\n\n/** What an export feature hands the table, so `runExport()` and `exporting()` stay public API\n * while the implementation lives outside the component. */\nexport interface DsTableExportContribution<T> {\n readonly run: () => Promise<void>;\n readonly csv: (filename?: string, rows?: readonly T[]) => void;\n readonly exporting: Signal<boolean>;\n}\n\n/**\n * The seam an opt-in table feature writes into, so the table never names the feature.\n *\n * The ablation that priced this split (`docs/basic-advanced-split-audit.md` §9) kept hitting the\n * same shape: the table owns a derived value and a feature wants to contribute to it —\n * `visibleColumns` is the chain the column picker writes to, `filteredData` folds the set filters\n * into the substring search, the live region folds in the export state. Moving methods out one at a\n * time cannot express that; a registry of contributions can.\n *\n * @internal Not API. Provided by `ds-table` on itself, so a directive on the same element injects\n * the instance it belongs to and two tables on one screen stay independent.\n */\n@Injectable()\nexport class DsTableLayout<T = unknown> {\n private readonly columnStages = signal<readonly DsTableColumnStage<T>[]>([]);\n private readonly rowStages = signal<readonly DsTableRowStage<T>[]>([]);\n private readonly statusFragments = signal<readonly Signal<string>[]>([]);\n\n /** Registered once, at the contributing directive's construction — never per change\n * detection. A stage may read signals of its own: the fold runs inside the table's\n * `computed`, so whatever the stage touches is tracked by that computed rather than by\n * this service, which is what lets a feature stay reactive without the table knowing it\n * exists. */\n addColumnStage(stage: DsTableColumnStage<T>): void {\n this.columnStages.update((stages) => [...stages, stage]);\n }\n\n addRowStage(stage: DsTableRowStage<T>): void {\n this.rowStages.update((stages) => [...stages, stage]);\n }\n\n private readonly utilityColumnWanted = signal(false);\n\n /** The utility column carries the row-action kebab and the picker trigger. The table knows\n * about the first and must be told about the second, or the cell it anchors into is never\n * rendered and the feature has nowhere to go. */\n requestUtilityColumn(): void {\n this.utilityColumnWanted.set(true);\n }\n\n wantsUtilityColumn(): boolean {\n return this.utilityColumnWanted();\n }\n\n private readonly slices = signal<readonly DsTablePersistedSlice[]>([]);\n\n addPersistedSlice(slice: DsTablePersistedSlice): void {\n this.slices.update((registered) => [...registered, slice]);\n }\n\n persistedSlices(): readonly DsTablePersistedSlice[] {\n return this.slices();\n }\n\n resetPersisted(): void {\n for (const slice of this.slices()) {\n slice.reset();\n }\n }\n\n private readonly rowTemplate = signal<TemplateRef<{\n $implicit: TableColumn<T>;\n }> | null>(null);\n\n /** A per-column control in the column panel, for a feature the panel must not name - resize\n * puts its width buttons there. */\n registerPanelRowTemplate(\n template: TemplateRef<{ $implicit: TableColumn<T> }>,\n ): void {\n this.rowTemplate.set(template);\n }\n\n panelRowTemplate(): TemplateRef<{ $implicit: TableColumn<T> }> | null {\n return this.rowTemplate();\n }\n\n /** A line for the live region, folded in ahead of the table's own events. */\n addStatusFragment(fragment: Signal<string>): void {\n this.statusFragments.update((fragments) => [...fragments, fragment]);\n }\n\n foldColumns(columns: readonly TableColumn<T>[]): readonly TableColumn<T>[] {\n return this.columnStages().reduce(\n (carried, stage) => stage(carried),\n columns,\n );\n }\n\n foldRows(rows: readonly T[]): readonly T[] {\n return this.rowStages().reduce((carried, stage) => stage(carried), rows);\n }\n\n /** Empty when nothing contributes, so the table's own message is unchanged. */\n status(): string {\n return this.statusFragments()\n .map((fragment) => fragment())\n .filter(Boolean)\n .join('. ');\n }\n\n private published: DsTableView<T> | null = null;\n private readonly exportContribution =\n signal<DsTableExportContribution<T> | null>(null);\n\n /** Called by the table itself, before any directive can ask for it: a directive on the same\n * element is constructed after the component that provides this service. */\n publish(view: DsTableView<T>): void {\n this.published = view;\n }\n\n view(): DsTableView<T> {\n if (!this.published) {\n throw new Error(\n 'DsTableLayout was read before ds-table published its view — a feature directive must sit on the ds-table element.',\n );\n }\n\n return this.published;\n }\n\n /** The table keeps `runExport()` and `exporting()` as public API, because their docblocks\n * promise a button outside the table can drive them. The implementation is the feature's, so\n * the table asks here and can tell the difference between \"no export directive\" and \"nothing\n * to export\" — which is the one silent failure this whole shape is prone to. */\n setExport(contribution: DsTableExportContribution<T>): void {\n this.exportContribution.set(contribution);\n }\n\n runExport(): Promise<void> | null {\n return this.exportContribution()?.run() ?? null;\n }\n\n /** True when it ran, so the caller can tell \"no feature\" from \"nothing to export\". */\n exportCsv(filename?: string, rows?: readonly T[]): boolean {\n const contribution = this.exportContribution();\n contribution?.csv(filename, rows);\n\n return contribution !== null;\n }\n\n exporting(): boolean {\n return this.exportContribution()?.exporting() ?? false;\n }\n\n private readonly resizeContribution =\n signal<DsTableResizeContribution<T> | null>(null);\n\n setResize(contribution: DsTableResizeContribution<T>): void {\n this.resizeContribution.set(contribution);\n }\n\n /** Null when no resize feature is present, which is what the header's `@if` reads. */\n resize(): DsTableResizeContribution<T> | null {\n return this.resizeContribution();\n }\n}\n","import {\n Component,\n ElementRef,\n Injector,\n TemplateRef,\n ViewEncapsulation,\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChildren,\n effect,\n DestroyRef,\n inject,\n input,\n linkedSignal,\n model,\n output,\n signal,\n ViewContainerRef,\n viewChild,\n} from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { devWarn } from '@ids-group-ltd/ids-design-system/core';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';\nimport { PaginationComponent } from '@ids-group-ltd/ids-design-system/components/pagination';\nimport { LoadingOverlayComponent } from '@ids-group-ltd/ids-design-system/components/loading-overlay';\nimport { PopoverComponent } from '@ids-group-ltd/ids-design-system/components/popover';\nimport { TooltipDirective } from '@ids-group-ltd/ids-design-system/components/tooltip';\nimport { MenuComponent } from '@ids-group-ltd/ids-design-system/components/menu';\nimport { MenuItemComponent } from '@ids-group-ltd/ids-design-system/components/menu';\nimport { MenuDividerComponent } from '@ids-group-ltd/ids-design-system/components/menu';\nimport { CellTemplateDirective } from './cell-template.directive';\nimport { HeaderFilterDirective } from './header-filter.directive';\nimport { DsTableLayout } from './table-layout';\nimport type {\n SortChangeEvent,\n SortDir,\n TableCellEditEvent,\n TableColumn,\n TableRowAction,\n TableRowActionEvent,\n TableExpandMode,\n TableFilterMode,\n TableSortMode,\n} from './table.types';\n\nconst NUMERIC = /^-?\\d+(\\.\\d+)?$/;\n\n// Assumed viewport until the scroller has been measured. Tall enough to fill a\n// laptop screen, so the first paint is not visibly short, and nowhere near the\n// row count a virtualized table is reached for.\nconst VIRTUAL_FALLBACK_HEIGHT = 720;\n\n// Extra rows each side of the viewport, so a flick shows no blank gap.\nconst VIRTUAL_OVERSCAN = 6;\n\n// Documented on `TableColumn.truncate`, which is where a consumer reads it.\nconst DEFAULT_CLIP_WIDTH_PX = 240;\n\n/** Rendered values that read as \"no data\", matched case-insensitively. */\nconst BLANK_CELL = new Set(['', '—', '-', '–', 'n/a', 'never', 'none']);\n\n/** Normalises \"no data\" to a single `null`, so the comparator has one blank\n * case to test and TypeScript narrows the rest without a cast. */\nfunction sortableOf(\n value: string | number | Date | null | undefined,\n): string | number | Date | null {\n if (value === null || value === undefined) {\n return null;\n }\n if (typeof value === 'string' && BLANK_CELL.has(value.trim().toLowerCase())) {\n return null;\n }\n\n return value;\n}\n\n/** Both sides are known non-blank here. `numeric: true` keeps \"item 10\" after\n * \"item 9\" instead of before it. */\nfunction compareSortValues(\n first: string | number | Date,\n second: string | number | Date,\n): number {\n if (first instanceof Date && second instanceof Date) {\n return first.getTime() - second.getTime();\n }\n if (typeof first === 'number' && typeof second === 'number') {\n return first - second;\n }\n\n const firstText = String(first);\n const secondText = String(second);\n if (NUMERIC.test(firstText) && NUMERIC.test(secondText)) {\n return Number(firstText) - Number(secondText);\n }\n\n // `sensitivity: 'base'` so \"Ångström\" sorts next to \"Angstrom\" and casing does\n // not split a column into two runs.\n return firstText.localeCompare(secondText, undefined, {\n numeric: true,\n sensitivity: 'base',\n });\n}\n\n@Component({\n selector: 'ds-table',\n standalone: true,\n imports: [\n IconComponent,\n NgTemplateOutlet,\n SkeletonComponent,\n PaginationComponent,\n LoadingOverlayComponent,\n PopoverComponent,\n TooltipDirective,\n MenuComponent,\n MenuItemComponent,\n MenuDividerComponent,\n // Only instantiated when a column sets `link`, so a consumer app with no router\n // provided still renders the table — the directive is never constructed.\n RouterLink,\n ],\n templateUrl: './table.component.html',\n styleUrl: './table.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.bordered]': 'borderedResolved()',\n '[class.selectable]': 'selectable()',\n '[class.pinned]': 'stickyFirstColumn()',\n '[class.expandable]': 'expandableRows()',\n '[class.sticky-scrollbar]': 'stickyScrollbarResolved()',\n '[class.resizable]': 'layout.resize() !== null',\n },\n providers: [DsTableLayout],\n})\nexport class TableComponent<T extends object> {\n /** Rows to render. */\n readonly data = input.required<readonly T[]>();\n /** Row identity used for tracking, selection, expansion and the active-row\n * highlight. Defaults to `row.id`; pass an accessor for display-only data\n * with no natural key (`[rowId]=\"row => row.channel + row.sentAt\"`), which\n * beats mapping synthetic ids into the data just to satisfy the table. */\n readonly rowId = input<((row: T) => string) | null>(null);\n /** Column definitions driving headers, cells and sorting. */\n readonly columns = input.required<readonly TableColumn<T>[]>();\n /** Adds a checkbox column for row/select-all selection. */\n readonly selectable = input(false, { transform: booleanAttribute });\n /** Opt-in outer border + radius. Off by default so tables flush inside a\n * `<ds-card padding=\"none\">` don't double-border.\n * Unset falls back to `DS_CONFIG.table.bordered`, then `false`. */\n readonly bordered = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n /** false — no loading state.\n * `true` — the table picks: skeleton rows while it has nothing to show, overlay\n * once rows are on screen. Prefer it; the right choice is a function of the row\n * count, which only the table holds.\n * 'skeleton' — first-load placeholder; rows are replaced with shimmer rows.\n * 'overlay' — re-fetch indicator; existing rows stay visible behind\n * a translucent overlay with a centred spinner. Pin either one only to\n * override the rule deliberately. */\n readonly loading = input<boolean | 'skeleton' | 'overlay'>(false);\n /** The mode actually rendered. Skeletons replace what the reader is looking at and\n * an overlay on an empty card says nothing, so `true` resolves per state rather\n * than picking a favourite. */\n protected readonly loadingMode = computed<'skeleton' | 'overlay' | false>(\n () => {\n const loading = this.loading();\n if (loading === false) {\n return false;\n }\n if (loading === true) {\n return this.filteredData().length ? 'overlay' : 'skeleton';\n }\n\n return loading;\n },\n );\n /** Keeps the header row pinned while the body scrolls. */\n readonly stickyHeader = input(true, { transform: booleanAttribute });\n /** Caps the scroll body height (any CSS length, e.g. `'320px'`) and scrolls it\n * vertically — pair with `stickyHeader` for a self-contained scroll region.\n * `null` (default) lets the table grow to its content. */\n readonly maxHeight = input<string | null>(null);\n /** Row density — `'compact'` tightens cell padding for spreadsheet-dense lists. */\n readonly density = input<'default' | 'compact'>('default');\n /** Tints odd rows for easier row-tracking across wide tables. */\n readonly zebra = input(false, { transform: booleanAttribute });\n /** Animate the body height when the row set changes (page/filter) instead of\n * snapping. Opt-in; instant under reduced-motion (the DS zeroes the token). */\n readonly animateHeight = input(false, { transform: booleanAttribute });\n /** Two-way set of currently selected row ids. */\n readonly selectedIds = model<Set<string>>(new Set<string>());\n /** Column key currently sorted by; `null` when unsorted. Two-way bindable\n * (`[(sortKey)]`) or one-way from your own state with `(sortChange)`. */\n readonly sortKey = input<string | null>(null);\n /** Emitted for `[(sortKey)]`. `sortChange` carries the same click with both\n * halves at once, which is usually the one to listen to. */\n readonly sortKeyChange = output<string | null>();\n /** Sort direction for `sortKey`. */\n readonly sortDir = input<SortDir>(null);\n /** Emitted for `[(sortDir)]`. */\n readonly sortDirChange = output<SortDir>();\n /**\n * What the header marks, and what a client sort reads.\n *\n * `linkedSignal` over BOTH inputs, not a `model`: Angular writes an input only\n * when the bound expression changed, diffing against the value IT last wrote, and\n * an internal `.set()` never updates that slot. Seeding from both means a host\n * answering with its own default re-seeds the pair even when one half of that\n * default equals what it last bound. A host that binds neither never re-seeds, so\n * the optimistic state survives.\n */\n private readonly sortState = linkedSignal<{\n readonly key: string | null;\n readonly dir: SortDir;\n }>(() => ({ key: this.sortKey(), dir: this.sortDir() }));\n protected readonly activeSortKey = computed(() => this.sortState().key);\n protected readonly activeSortDir = computed(() => this.sortState().dir);\n /** Sort states a column cycles through on click. Default includes null\n * (unsorted); pass ['asc','desc'] to forbid the unsorted state (e.g.\n * server-paged lists). */\n readonly sortingOrder = input<SortDir[]>(['asc', 'desc', null]);\n /**\n * Wording for the sort announcement, so it can be translated. Receives the\n * column's label and the new direction; return an empty string to say nothing.\n */\n readonly sortAnnouncement = input<(label: string, dir: SortDir) => string>(\n (label, dir) =>\n dir\n ? `Sorted by ${label}, ${dir === 'asc' ? 'ascending' : 'descending'}`\n : `Sorting cleared`,\n );\n /**\n * Wording for the row-range announcement, so it can be translated. Receives\n * the 1-based first and last row on screen and the total; return an empty\n * string to say nothing.\n */\n readonly rangeAnnouncement = input<\n (first: number, last: number, total: number) => string\n >((first, last, total) => `Showing ${first}–${last} of ${total}`);\n /** Number of shimmer rows rendered while `loading` is `'skeleton'`. */\n readonly skeletonRows = input<number>(5);\n /** Accessible name for the table (rendered as a visually-hidden caption).\n * Without it, screen-reader users get an unlabelled table. */\n readonly caption = input<string>('');\n /** When true, each row becomes a keyboard-operable control (tabindex,\n * Enter/Space → rowClicked) with an accessible name from the first\n * column. Off by default so non-navigating tables don't advertise a false\n * click affordance. Also the gate for the hover/pressed row tints. */\n readonly rowInteractive = input(false, { transform: booleanAttribute });\n\n /** Id of the row rendered as current (highlight + `aria-current`) — e.g. the\n * row whose detail drawer or side panel is open. `null` — none. */\n readonly activeRowId = input<string | null>(null);\n\n /** Client-side row filter — case-insensitive substring match against cell\n * text. Columns with `filterable: true` restrict the match set (none\n * marked — every column matches, hidden ones included). '' — no filtering. */\n readonly filterQuery = input<string>('');\n /** Two-way per-column set-filters: column key → the still-checked values.\n * A column absent from the map (or with every value checked) is unfiltered. */\n readonly columnFilters = model<Map<string, ReadonlySet<string>>>(new Map());\n\n /** Round-trip whatever the column features persist (order, widths, hidden keys) through\n * `localStorage`, so a reader's column layout survives a reload. Needs\n * `storageKey` — without one there is nothing to key a screen by, and two\n * tables would overwrite each other. Off by default. */\n readonly persistLayout = input(false, { transform: booleanAttribute });\n /** Screen id the persisted layout is stored under. Pick something stable per\n * table, not per route instance. */\n readonly storageKey = input<string>('');\n\n /** True while an export is in flight. Public so a button OUTSIDE the table can show the same\n * state as the built-in one. `false` when no export directive is present. */\n readonly exporting = computed(() => this.layout.exporting());\n\n /** Keeps the horizontal scrollbar reachable on tall tables: the scroll\n * container's native bar is hidden and a proxy stuck to the bottom of the\n * nearest scroll ancestor mirrors it both ways. Off by default. Unset falls\n * back to `DS_CONFIG.table.stickyScrollbar`, then `false`. */\n readonly stickyScrollbar = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n\n /** Rows per page. `null` (default) disables pagination — all rows render. */\n readonly pageSize = model<number | null>(null);\n /** Current 1-based page. Only meaningful when `pageSize()` is set. */\n readonly page = model<number>(1);\n /** Selectable page-size choices shown in the pagination control. */\n readonly pageSizeOptions = input<number[]>([10, 25, 50, 100]);\n /** Shows the page-size picker in the footer pager. Set false for a table whose\n * page size is fixed — the standalone `ds-pagination` has always taken this. */\n readonly showPageSize = input(true, { transform: booleanAttribute });\n /** Shows the \"N of M\" range label in the footer pager. */\n readonly showLabel = input(true, { transform: booleanAttribute });\n /** Server-side total row count. `null` (default) = client paging: the table\n * slices `data()` itself and the pager counts the rows in hand. When set, the\n * host has already sliced to one page — the pager uses this count and the\n * table renders `data()` as-is (no internal slice). */\n readonly total = input<number | null>(null);\n /** Scroll the table into view on a page change (opt-in) — keeps a bottom\n * pager from leaving the viewport on the previous page's last rows. */\n readonly scrollToTopOnPageChange = input(false, {\n transform: booleanAttribute,\n });\n /** Who sorts — see `TableSortMode`. Unset resolves to `'server'`: the table\n * emits `(sortChange)` and reorders nothing, which is what a paged table\n * needs. Declare `'client'` when the table holds every row, or `'none'` to\n * drop the affordance entirely. */\n readonly sortMode = input<TableSortMode | null>(null);\n /** Who filters — see `TableFilterMode`. Unset resolves to `'server'`: the\n * table tracks the selection in `columnFilters` for the host to turn into a\n * request, and runs no local pass. Declare `'client'` when the table holds\n * every row and should filter them itself. */\n readonly filterMode = input<TableFilterMode | null>(null);\n /**\n * The full value domain per column key, for a header filter the table cannot\n * derive itself. Without it the checklist is built from the rows in hand,\n * which on a server-paged table offers only the values that happen to be on\n * the current page.\n */\n readonly columnFilterOptions = input<ReadonlyMap<string, readonly string[]>>(\n new Map(),\n );\n protected readonly filterModeResolved = computed<TableFilterMode>(\n () => this.filterMode() ?? 'server',\n );\n protected readonly sortModeResolved = computed<TableSortMode>(\n () => this.sortMode() ?? 'server',\n );\n readonly borderedResolved = resolveWithConfig(\n this.bordered,\n (config) => config.table?.bordered,\n false,\n );\n readonly stickyScrollbarResolved = resolveWithConfig(\n this.stickyScrollbar,\n (config) => config.table?.stickyScrollbar,\n false,\n );\n /**\n * Where the sticky horizontal scrollbar comes to rest, as any CSS length.\n *\n * Unset, the table measures its scroll container's bottom padding and cancels it, so the bar\n * sits on the edge the reader can see. Set it for a scrollport whose reachable edge is not its\n * padding edge. Falls back to `DS_CONFIG.table.stickyScrollbarOffset`;\n * `--ds-table-sticky-scrollbar-offset` still wins over both, for a rule that has to reach one\n * table from a stylesheet.\n */\n readonly stickyScrollbarOffset = input<string | null>(null);\n readonly stickyScrollbarOffsetResolved = resolveWithConfig(\n this.stickyScrollbarOffset,\n (config) => config.table?.stickyScrollbarOffset,\n null,\n );\n\n /** Pin the first data column (and the select column) on horizontal scroll. */\n readonly stickyFirstColumn = input(false, { transform: booleanAttribute });\n\n /**\n * Render only the rows in view, padding the rest with two spacer rows. Opt-in,\n * and it needs `maxHeight` — without a bounded scroller there is no viewport to\n * window against, so nothing is virtualized (dev-warned).\n *\n * Every row must be the same height, which is `virtualRowSize`: the arithmetic\n * that decides what is in view has no other way to know where a row starts. So\n * virtual mode forces `table-layout: fixed` and single-line cells, and the\n * expansion panel is suppressed — a row that can grow breaks the maths.\n */\n readonly virtualScroll = input(false, { transform: booleanAttribute });\n /** Row height in px in virtual mode. Must match what the rows actually\n * measure, so it drives the CSS height rather than merely describing it. */\n readonly virtualRowSize = input(44);\n /**\n * Fetch rows as they scroll into view instead of receiving them all.\n *\n * `data` becomes a SPARSE array `total` long: put each fetched row at its\n * absolute index and leave the rest empty. Every gap inside the window\n * renders a skeleton row, and `(lazyLoad)` asks for the range covering it.\n *\n * Needs `virtualScroll` — without a window there is nothing to load\n * lazily AGAINST — and `total`, which is what the scrollbar is sized from.\n */\n readonly lazy = input(false, { transform: booleanAttribute });\n /** The range now on screen that `data` has gaps in — fetch it and write the\n * rows back at their absolute indices. Re-emits only when the range moves. */\n readonly lazyLoad = output<{ first: number; rows: number }>();\n\n /** Fires with the row on click (or Enter/Space when `rowInteractive`). */\n readonly rowClicked = output<T>();\n /** Fires whenever sort key/direction changes, in every `sortMode` but `'none'`. */\n readonly sortChange = output<SortChangeEvent>();\n\n /** Row-action menu items rendered as a trailing kebab (⋮) column.\n * Empty (default) — no column. Menu clicks never trigger `rowClicked`. */\n readonly rowActions = input<readonly TableRowAction<T>[]>([]);\n /** Fires with the chosen action and its row when a kebab menu item is selected. */\n readonly rowActionSelected = output<TableRowActionEvent<T>>();\n\n /** Fires when an `editable` cell is committed (Enter or blur) with the new value. */\n readonly cellEdited = output<TableCellEditEvent<T>>();\n\n /** Cell templates supplied as an explicit map instead of (or in addition to)\n * projected `dsCellTemplate` directives. Lets a wrapper component collect\n * the directives itself and pass them down, since content projected through\n * a wrapper's `<ng-content>` is not seen by this component's content query.\n * Entries here override projected ones. */\n readonly cellTemplateMap = input<\n Record<string, TemplateRef<{ $implicit: unknown; row: unknown }>>\n >({});\n\n /** Empty-state template, as an alternative to the `[empty]` content slot —\n * again for wrappers that can't rely on slot re-projection. */\n readonly emptyTemplate = input<TemplateRef<unknown> | null>(null);\n\n /** When true, each row renders a leading chevron button that toggles an\n * inline expansion panel below it. */\n readonly expandableRows = input(false, { transform: booleanAttribute });\n\n /** Two-way set of currently expanded row ids. */\n readonly expandedIds = model<Set<string>>(new Set<string>());\n\n /** `'single'` collapses the open row when another expander is clicked.\n * Enforced on interaction only: a set seeded with several ids is left alone\n * (and warned about in dev) rather than silently rewritten under the host. */\n readonly expandMode = input<TableExpandMode>('multiple');\n\n /** Renders an expand-all/collapse-all chevron in the expander column header,\n * page-scoped when paginating, like select-all. Suppressed under\n * `expandMode=\"single\"`, which it would contradict. */\n readonly expandAllToggle = input(false, { transform: booleanAttribute });\n\n /** Fires with the row when an expander opens it — including each row opened\n * by expand-all, so a host lazy-loading panel content sees every one. */\n readonly rowExpanded = output<T>();\n\n /** Fires with the row when an expander closes it, the row auto-closed by\n * `expandMode=\"single\"` included. It carries a row, so it cannot speak for an\n * id whose row is no longer in `data()` — under server-side paging that id is\n * cleared silently. `expandedIds` is the complete signal; this one is the\n * convenient one. */\n readonly rowCollapsed = output<T>();\n\n /** Template rendered inside an expanded row's panel.\n * Context: `$implicit` = row, `row` = row. */\n readonly rowExpandTemplate = input<TemplateRef<{\n $implicit: unknown;\n row: unknown;\n }> | null>(null);\n\n protected readonly cellTemplateDirectives = contentChildren(\n CellTemplateDirective,\n );\n\n protected readonly cellTemplates = computed<\n Record<string, TemplateRef<{ $implicit: unknown; row: unknown }>>\n >(() => {\n const map: Record<\n string,\n TemplateRef<{ $implicit: unknown; row: unknown }>\n > = {};\n for (const dir of this.cellTemplateDirectives()) {\n map[dir.dsCellTemplate()] = dir.template;\n }\n\n return { ...map, ...this.cellTemplateMap() };\n });\n\n protected cellTemplate(\n col: TableColumn<T>,\n ): TemplateRef<{ $implicit: unknown; row: unknown }> | null {\n return this.cellTemplates()[col.key] ?? null;\n }\n\n protected readonly tableClasses = computed(() => {\n const parts = ['table'];\n if (this.stickyHeader()) {\n parts.push('sticky-header');\n }\n if (this.density() === 'compact') {\n parts.push('compact');\n }\n if (this.zebra()) {\n parts.push('zebra');\n }\n if (this.virtualizing()) {\n parts.push('virtual');\n }\n\n return parts.join(' ');\n });\n\n protected readonly isSkeletonLoading = computed(\n () => this.loadingMode() === 'skeleton',\n );\n protected readonly isOverlayLoading = computed(\n () => this.loadingMode() === 'overlay',\n );\n /** The empty row is a CLAIM about the data — \"there are none\" — so it must not\n * appear while the table is still asking, in EITHER loading mode. `overlay` is\n * what a list uses on every read after the first, so suppressing only under\n * `skeleton` paints \"No rows yet\" under the spinner on a zero-row reload. */\n protected readonly showsEmptyRow = computed(\n () => this.loadingMode() === false && !this.filteredData().length,\n );\n\n protected readonly showsLoadingSpace = computed(\n () =>\n this.loadingMode() !== false &&\n this.loadingMode() !== 'skeleton' &&\n !this.filteredData().length,\n );\n\n protected readonly layout = inject<DsTableLayout<T>>(DsTableLayout);\n\n private readonly toolbarAnchor = viewChild('toolbarAnchor', {\n read: ViewContainerRef,\n });\n private readonly headerUtilityAnchor = viewChild('headerUtilityAnchor', {\n read: ViewContainerRef,\n });\n private readonly overlaysAnchor = viewChild('overlaysAnchor', {\n read: ViewContainerRef,\n });\n private readonly columnWidthControls = viewChild<\n TemplateRef<{ $implicit: TableColumn<T> }>\n >('columnWidthControls');\n\n protected readonly visibleColumns = computed<readonly TableColumn<T>[]>(() =>\n this.layout.foldColumns(this.columns()),\n );\n\n /** `'content'` is not a pixel value — it is carried by a class instead, see `fitsContent`. */\n protected columnWidth(col: TableColumn<T>): number | null {\n const dragged = this.layout.resize()?.widthOverride(col.key);\n if (dragged !== undefined) {\n return dragged;\n }\n\n return typeof col.width === 'number' ? col.width : null;\n }\n\n /** Shrink-to-content mode, unless the reader has dragged this column — a drag is a deliberate\n * pixel width and must win over the declared intent. */\n protected fitsContent(col: TableColumn<T>): boolean {\n return (\n col.width === 'content' &&\n this.layout.resize()?.widthOverride(col.key) === undefined\n );\n }\n\n protected readonly hasUtilityColumn = computed(\n () => this.hasRowActions() || this.layout.wantsUtilityColumn(),\n );\n\n private readonly columnFilterPopover = viewChild<PopoverComponent>(\n 'columnFilterPopover',\n );\n // Gates the panel's EXISTENCE on configuration, never on the clicked column: a handler that\n // raises its own `@if` reads the viewChild back in the same synchronous line, before change\n // detection has created it, and loses the click that opened it.\n protected readonly hasAnyColumnFilter = computed(() =>\n this.columns().some((col) => this.hasColumnFilter(col)),\n );\n protected readonly filterColumn = signal<TableColumn<T> | null>(null);\n protected readonly filterSearch = signal('');\n\n private readonly headerFilters = contentChildren(HeaderFilterDirective);\n\n private readonly headerFilterByKey = computed(() => {\n const map = new Map<string, HeaderFilterDirective>();\n for (const filter of this.headerFilters()) {\n map.set(filter.dsHeaderFilter(), filter);\n }\n\n return map;\n });\n\n protected headerFilterFor(\n col: TableColumn<T>,\n ): HeaderFilterDirective | undefined {\n return this.headerFilterByKey().get(col.key);\n }\n\n protected hasColumnFilter(col: TableColumn<T>): boolean {\n if (this.filterModeResolved() === 'none') {\n return false;\n }\n\n return col.filter === 'set' || !!this.headerFilterFor(col);\n }\n\n protected isFilterPanelOpen(col: TableColumn<T>): boolean {\n return (\n this.filterColumn()?.key === col.key &&\n (this.columnFilterPopover()?.opened() ?? false)\n );\n }\n\n protected isColumnFiltered(col: TableColumn<T>): boolean {\n // A projected filter owns its own criterion, so only the host can say\n // whether it is set; the table still draws the highlight.\n const projected = this.headerFilterFor(col);\n if (projected) {\n return projected.active();\n }\n const allowed = this.columnFilters().get(col.key);\n\n return !!allowed && allowed.size < this.optionsFor(col).length;\n }\n\n private optionsFor(col: TableColumn<T>): readonly string[] {\n const supplied = this.columnFilterOptions().get(col.key);\n if (supplied) {\n return supplied;\n }\n const seen = new Set<string>();\n for (const row of this.data()) {\n seen.add(this.cellValue(row, col));\n }\n\n return [...seen].sort((a, b) => a.localeCompare(b));\n }\n\n protected readonly filterValues = computed<readonly string[]>(() => {\n const col = this.filterColumn();\n if (!col) {\n return [];\n }\n const needle = this.filterSearch().trim().toLowerCase();\n const values = this.optionsFor(col);\n\n return needle\n ? values.filter((value) => value.toLowerCase().includes(needle))\n : values;\n });\n\n protected readonly filterSelectedCount = computed<number>(() => {\n const col = this.filterColumn();\n if (!col) {\n return 0;\n }\n const allowed = this.columnFilters().get(col.key);\n\n return allowed ? allowed.size : this.optionsFor(col).length;\n });\n\n protected isFilterValueChecked(value: string): boolean {\n const col = this.filterColumn();\n if (!col) {\n return false;\n }\n const allowed = this.columnFilters().get(col.key);\n\n return !allowed || allowed.has(value);\n }\n\n protected onColumnFilterClick(col: TableColumn<T>, event: Event): void {\n event.stopPropagation();\n this.filterColumn.set(col);\n this.filterSearch.set('');\n this.columnFilterPopover()?.toggle(event.currentTarget as HTMLElement);\n }\n\n protected onFilterSearch(event: Event): void {\n this.filterSearch.set((event.target as HTMLInputElement).value);\n }\n\n protected toggleFilterValue(value: string): void {\n const col = this.filterColumn();\n if (!col) {\n return;\n }\n const distinct = this.optionsFor(col);\n const current = new Set(this.columnFilters().get(col.key) ?? distinct);\n if (current.has(value)) {\n current.delete(value);\n } else {\n current.add(value);\n }\n const next = new Map(this.columnFilters());\n // No entry means unfiltered, so a full set is dropped rather than stored.\n if (current.size >= distinct.length) {\n next.delete(col.key);\n } else {\n next.set(col.key, current);\n }\n this.columnFilters.set(next);\n }\n\n protected headerFilterContext(col: TableColumn<T>): {\n $implicit: unknown;\n column: unknown;\n close: () => void;\n } {\n return {\n $implicit: col,\n column: col,\n close: () => this.columnFilterPopover()?.close(),\n };\n }\n\n protected clearColumnFilter(): void {\n const col = this.filterColumn();\n if (!col) {\n return;\n }\n const next = new Map(this.columnFilters());\n next.delete(col.key);\n this.columnFilters.set(next);\n }\n\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly editInput =\n viewChild<ElementRef<HTMLInputElement>>('editInput');\n protected readonly editingCell = signal<{\n rowId: string;\n key: string;\n } | null>(null);\n protected readonly editDraft = signal('');\n\n protected isEditing(row: T, col: TableColumn<T>): boolean {\n const cell = this.editingCell();\n\n return !!cell && cell.rowId === this.rowKey(row) && cell.key === col.key;\n }\n\n protected startEdit(row: T, col: TableColumn<T>, event: Event): void {\n if (!col.editable) {\n return;\n }\n event.stopPropagation();\n this.editDraft.set(this.cellValue(row, col));\n this.editingCell.set({ rowId: this.rowKey(row), key: col.key });\n afterNextRender(\n () => {\n const input = this.editInput()?.nativeElement;\n input?.focus();\n input?.select();\n },\n { injector: this.injector },\n );\n }\n\n protected onEditInput(event: Event): void {\n this.editDraft.set((event.target as HTMLInputElement).value);\n }\n\n protected commitEdit(row: T, col: TableColumn<T>): void {\n if (!this.isEditing(row, col)) {\n return;\n }\n this.editingCell.set(null);\n this.cellEdited.emit({ row, key: col.key, value: this.editDraft() });\n }\n\n protected cancelEdit(): void {\n this.editingCell.set(null);\n }\n\n /** Clip width for `truncate`. `'content'` has no clip width — the column is as\n * wide as its widest cell, so there is nothing to ellipsis against. */\n protected clipWidth(col: TableColumn<T>): number | null {\n return typeof col.width === 'number'\n ? col.width\n : col.width === 'content'\n ? null\n : DEFAULT_CLIP_WIDTH_PX;\n }\n\n protected readonly filteredData = computed<readonly T[]>(() => {\n const query = this.filterQuery().trim().toLowerCase();\n // In 'server' mode the host has already filtered; running the set filters\n // again here would filter the filtered. `filterQuery` is deliberately left\n // alone — it is a separate input with its own client/server story.\n const setFilters =\n this.filterModeResolved() === 'client'\n ? this.columnFilters()\n : new Map<string, ReadonlySet<string>>();\n const columns = this.columns();\n if (!query && setFilters.size === 0) {\n return this.layout.foldRows(this.data());\n }\n const marked = columns.filter((col) => col.filterable);\n const scope = marked.length ? marked : columns;\n const activeSetFilters = [...setFilters]\n .map(([key, allowed]) => ({\n col: columns.find((col) => col.key === key),\n allowed,\n }))\n .filter(\n (\n entry,\n ): entry is { col: TableColumn<T>; allowed: ReadonlySet<string> } =>\n !!entry.col,\n );\n\n return this.data().filter((row) => {\n if (\n query &&\n !scope.some((col) =>\n this.cellValue(row, col).toLowerCase().includes(query),\n )\n ) {\n return false;\n }\n\n return activeSetFilters.every(({ col, allowed }) =>\n allowed.has(this.cellValue(row, col)),\n );\n });\n });\n\n protected readonly sortedData = computed<readonly T[]>(() => {\n const rows = this.filteredData();\n if (this.sortModeResolved() !== 'client') {\n return rows;\n }\n const key = this.activeSortKey();\n const dir = this.activeSortDir();\n if (!key || !dir) {\n return rows;\n }\n const column = this.columns().find((col) => col.key === key);\n if (!column) {\n return rows;\n }\n\n const direction = dir === 'asc' ? 1 : -1;\n const sortValue = column.sortValue;\n\n return rows.slice().sort((a, b) => {\n const aValue = sortableOf(\n sortValue ? sortValue(a) : this.cellValue(a, column),\n );\n const bValue = sortableOf(\n sortValue ? sortValue(b) : this.cellValue(b, column),\n );\n\n // Blanks sink in BOTH directions, so `direction` is deliberately not\n // applied to this branch — a descending sort must not open with a screen\n // of empty rows.\n if (aValue === null || bValue === null) {\n if (aValue === null && bValue === null) {\n return 0;\n }\n\n return aValue === null ? 1 : -1;\n }\n\n return compareSortValues(aValue, bValue) * direction;\n });\n });\n\n protected readonly pagedData = computed<readonly T[]>(() => {\n const size = this.pageSize();\n // Server-side paging (`total` set): the host already sliced to one page.\n if (size === null || this.total() !== null) {\n return this.sortedData();\n }\n const start = (this.page() - 1) * size;\n\n return this.sortedData().slice(start, start + size);\n });\n\n /** Virtual mode windows this further; `rowSlots` is what the loop walks. */\n protected readonly displayData = computed<readonly T[]>(() =>\n this.pageSize() !== null ? this.pagedData() : this.sortedData(),\n );\n\n /**\n * The single live-region line. Loading wins while it lasts — a sort\n * announcement over rows that are being replaced tells the reader about a\n * state they cannot inspect yet.\n *\n * `aria-live=\"polite\"` does not announce a region's INITIAL content, so the\n * unsorted first render is silent; only real changes speak.\n */\n protected readonly statusMessage = computed<string>(() => {\n if (this.loadingMode() !== false) {\n return 'Loading…';\n }\n\n // A contributed line wins while it has one: an \"Export failed\" has to survive until the\n // reader moves on, and the feature that raised it is what clears it.\n return this.layout.status() || this.eventMessages();\n });\n\n private readonly eventMessages = computed<string>(() =>\n [this.sortMessage(), this.rangeMessage(), this.expansionMessage()]\n .filter(Boolean)\n .join('. '),\n );\n\n /** Only from two rows up: a single expander announces itself through its own\n * `aria-expanded`, and repeating that here would say everything twice. */\n private readonly expansionMessage = computed<string>(() => {\n const open = this.expandedIds();\n if (open.size < 2) {\n return '';\n }\n const onPage = this.displayData().filter((row) =>\n open.has(this.rowKey(row)),\n ).length;\n\n return onPage < 2 ? '' : `${onPage} rows expanded`;\n });\n\n private readonly sortMessage = computed<string>(() => {\n const key = this.activeSortKey();\n const dir = this.activeSortDir();\n if (!key) {\n return '';\n }\n const label = this.columns().find((col) => col.key === key)?.label ?? key;\n\n return this.sortAnnouncement()(label, dir);\n });\n\n private readonly rangeMessage = computed<string>(() => {\n const size = this.pageSize();\n if (size === null) {\n return '';\n }\n const rows = this.displayData().length;\n if (rows === 0) {\n return '';\n }\n const first = (this.page() - 1) * size + 1;\n const total = this.total() ?? this.filteredData().length;\n\n return this.rangeAnnouncement()(first, first + rows - 1, total);\n });\n\n protected readonly virtualizing = computed(\n () => this.virtualScroll() && !!this.maxHeight(),\n );\n\n protected readonly virtualRowHeight = computed(\n () => `${this.virtualRowSize()}px`,\n );\n\n /** How many rows the scroller spans. Lazy counts the rows that EXIST, not the\n * ones that have arrived — otherwise the spacers shrink to the loaded slice\n * and the scrollbar lies about the length of the list. */\n protected readonly virtualCount = computed(() =>\n this.lazy()\n ? (this.total() ?? this.displayData().length)\n : this.displayData().length,\n );\n\n protected readonly virtualWindow = computed(() => {\n if (!this.virtualizing()) {\n return null;\n }\n const rowSize = Math.max(1, this.virtualRowSize());\n const count = this.virtualCount();\n const height = this.viewportHeight() || VIRTUAL_FALLBACK_HEIGHT;\n const firstVisible = Math.floor(this.scrollTop() / rowSize);\n const start = Math.max(0, firstVisible - VIRTUAL_OVERSCAN);\n const end = Math.min(\n count,\n firstVisible + Math.ceil(height / rowSize) + VIRTUAL_OVERSCAN,\n );\n\n return {\n start,\n end,\n padTop: start * rowSize,\n padBottom: Math.max(0, count - end) * rowSize,\n };\n });\n\n /**\n * What the row loop walks: each slot carries its ABSOLUTE index, and a `null`\n * row is a gap the host has not filled yet.\n *\n * Absolute rather than loop-relative because everything downstream needs it —\n * striping parity, the skeleton's width seed, and the range `(lazyLoad)` asks\n * for.\n */\n protected readonly rowSlots = computed<\n readonly { row: T | null; index: number }[]\n >(() => {\n const window = this.virtualWindow();\n const data = this.displayData();\n const start = window ? window.start : 0;\n const end = window ? window.end : data.length;\n const slots: { row: T | null; index: number }[] = [];\n for (let index = start; index < end; index++) {\n slots.push({ row: data[index] ?? null, index });\n }\n\n return slots;\n });\n\n /** Zebra striping cannot come from `:nth-child` while windowing — the parity\n * of a rendered row depends on its ABSOLUTE index, and the spacer rows are\n * children too. Matches `:nth-child(odd)`, which is 1-based. */\n protected isStriped(absoluteIndex: number): boolean {\n return !!this.virtualWindow() && absoluteIndex % 2 === 0;\n }\n\n protected readonly allSelected = computed(() => {\n const data = this.displayData();\n if (data.length === 0) {\n return false;\n }\n const sel = this.selectedIds();\n\n return data.every((row) => sel.has(this.rowKey(row)));\n });\n\n // The header checkbox's indeterminate predicate: false when ALL of the page is selected.\n // Anything asking \"is a selection live\" wants `anySelected`.\n protected readonly someSelected = computed(() => {\n const data = this.displayData();\n const sel = this.selectedIds();\n\n return data.some((row) => sel.has(this.rowKey(row))) && !this.allSelected();\n });\n\n protected readonly anySelected = computed(() => this.selectedIds().size > 0);\n\n protected readonly selectAllLabel = computed(() =>\n this.pageSize() !== null\n ? 'Select all rows on this page'\n : 'Select all rows',\n );\n\n protected readonly allExpanded = computed(() => {\n const data = this.displayData();\n if (data.length === 0) {\n return false;\n }\n const open = this.expandedIds();\n\n return data.every((row) => open.has(this.rowKey(row)));\n });\n\n protected readonly expandAllVisible = computed(\n () => this.expandAllToggle() && this.expandMode() !== 'single',\n );\n\n protected readonly expandAllLabel = computed(() => {\n const scope = this.pageSize() !== null ? ' on this page' : '';\n\n return this.allExpanded()\n ? `Collapse all rows${scope}`\n : `Expand all rows${scope}`;\n });\n\n protected readonly skeletonArray = computed(() =>\n Array(this.skeletonRows()).fill(0),\n );\n\n protected readonly expandedColspan = computed(() => {\n let count = this.visibleColumns().length;\n if (this.selectable()) {\n count += 1;\n }\n if (this.expandableRows()) {\n count += 1;\n }\n if (this.hasUtilityColumn()) {\n count += 1;\n }\n\n return count;\n });\n\n protected readonly hasRowActions = computed(\n () => this.rowActions().length > 0,\n );\n protected readonly menuRow = signal<T | null>(null);\n private readonly rowMenuPopover =\n viewChild<PopoverComponent>('rowMenuPopover');\n private readonly columnPickerPopover = viewChild<PopoverComponent>(\n 'columnPickerPopover',\n );\n\n protected readonly hasTruncate = computed(() =>\n this.columns().some((col) => col.truncate),\n );\n\n private readonly scrollWrap =\n viewChild.required<ElementRef<HTMLElement>>('scrollWrap');\n private readonly hscrollProxy =\n viewChild<ElementRef<HTMLElement>>('hscrollProxy');\n private readonly tableHead = viewChild<ElementRef<HTMLElement>>('tableHead');\n\n private publishHeadHeight(head: HTMLElement): void {\n this.hostElement.nativeElement.style.setProperty(\n '--_table-head-h',\n `${head.getBoundingClientRect().height}px`,\n );\n }\n private readonly hostElement = inject<ElementRef<HTMLElement>>(ElementRef);\n\n // The scrollport a `position: sticky` offset inside this table resolves against.\n private scrollAncestor(): HTMLElement | null {\n for (\n let element = this.hostElement.nativeElement.parentElement;\n element;\n element = element.parentElement\n ) {\n const overflowY = getComputedStyle(element).overflowY;\n if (overflowY === 'auto' || overflowY === 'scroll') {\n return element;\n }\n }\n\n return document.scrollingElement as HTMLElement | null;\n }\n\n protected readonly hscrollContentWidth = signal(0);\n protected readonly hscrollNeeded = signal(false);\n private readonly scrollTop = signal(0);\n private readonly viewportHeight = signal(0);\n private lastLazyRequest: { first: number; rows: number } | null = null;\n\n constructor() {\n // The width buttons the column panel renders are still declared in this template, because a\n // directive has no view to declare an ng-template in — so the table hands the template over\n // and the resize feature owns everything the buttons DO.\n effect(() => {\n const template = this.columnWidthControls();\n if (template) {\n this.layout.registerPanelRowTemplate(template);\n }\n });\n\n // Published here rather than from an init hook: a directive on the same element is\n // constructed after this component, so by the time a feature asks, the view is here. The\n // anchor goes over as a signal — a viewChild is undefined until the view exists, and a\n // feature that renders a control of its own has to wait for it.\n this.layout.publish({\n visibleColumns: this.visibleColumns,\n sortedRows: this.sortedData,\n declaredColumns: this.columns,\n scrollViewport: computed(() => this.scrollWrap()?.nativeElement),\n cellText: (row, column) => this.cellValue(row, column),\n anchor: (name) =>\n name === 'toolbar'\n ? this.toolbarAnchor\n : name === 'header-utility'\n ? this.headerUtilityAnchor\n : this.overlaysAnchor,\n });\n\n // The scrim starts below the header, so it needs the header's height. Measured, not summed\n // from padding and line-height: `vertical-align: middle` on the inline-flex label extends\n // the line box past the strut by a font-metric amount no calc() can carry, and a sum is\n // blind to a taller control in the header.\n //\n // After RENDER, or the read lands before layout and publishes 0px, which insets the scrim by\n // nothing and covers the whole header. Twice: the observer catches a\n // header that grows on a narrower column or a density change, and the second pass re-reads\n // whenever the scrim is about to appear, so a load never depends on an observer having fired.\n afterRenderEffect((onCleanup) => {\n const head = this.tableHead()?.nativeElement;\n if (!head || typeof ResizeObserver === 'undefined') {\n return;\n }\n const observer = new ResizeObserver(() => this.publishHeadHeight(head));\n observer.observe(head);\n onCleanup(() => observer.disconnect());\n });\n afterRenderEffect(() => {\n this.isOverlayLoading();\n const head = this.tableHead()?.nativeElement;\n if (head) {\n this.publishHeadHeight(head);\n }\n });\n // One effect for both halves, because the restore CANNOT run in the\n // constructor: input signals are not set yet there, so storageKey() is still\n // '' and the restore silently no-ops. The first run with a usable key\n // restores; every later run saves.\n effect(() => {\n const key = this.layoutKey();\n // Read every slice so the effect tracks them, whichever feature owns them.\n const stored = Object.fromEntries(\n this.layout.persistedSlices().map((slice) => [slice.key, slice.read()]),\n );\n if (!key) {\n return;\n }\n if (!this.layoutRestored) {\n this.layoutRestored = true;\n this.restoreLayout(key);\n\n return;\n }\n this.saveLayout(key, stored);\n });\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() =>\n this.sortMode() === null &&\n this.total() === null &&\n this.columns().some((col) => col.sortable)\n ? '[ds-table] sortable columns default to sortMode=\"server\", so a header click only emits (sortChange) and the table reorders nothing itself. This table binds no `total`, which usually means it holds every row — declare sortMode=\"client\" to sort them in place.'\n : null,\n );\n\n devWarn(() =>\n this.filterMode() === null &&\n this.total() === null &&\n this.columns().some((col) => col.filter === 'set')\n ? '[ds-table] a header filter defaults to filterMode=\"server\", so ticking a value only updates `columnFilters` and filters nothing locally. This table binds no `total`, which usually means it holds every row — declare filterMode=\"client\" to filter them in place.'\n : null,\n );\n }\n\n effect((onCleanup) => {\n if (!this.virtualizing()) {\n return;\n }\n const wrap = this.scrollWrap().nativeElement;\n const onScroll = (): void => this.scrollTop.set(wrap.scrollTop);\n const measure = (): void => this.viewportHeight.set(wrap.clientHeight);\n wrap.addEventListener('scroll', onScroll, { passive: true });\n const resizeObserver = new ResizeObserver(measure);\n resizeObserver.observe(wrap);\n measure();\n onScroll();\n onCleanup(() => {\n wrap.removeEventListener('scroll', onScroll);\n resizeObserver.disconnect();\n });\n });\n\n // Ask for the visible range whenever it has gaps. Keyed on the range itself,\n // so scrolling within an already-requested window stays quiet and a request\n // in flight is not repeated every frame — the host is free to answer slowly.\n effect(() => {\n if (!this.lazy()) {\n return;\n }\n const slots = this.rowSlots();\n const gaps = slots.filter((slot) => slot.row === null);\n if (gaps.length === 0) {\n return;\n }\n const first = gaps[0].index;\n const rows = gaps[gaps.length - 1].index - first + 1;\n // Contained, not equal: the viewport is measured after the first paint, so\n // the window grows by an overscan or two right after opening and an\n // exact-match guard would fetch the same rows twice.\n const covered =\n this.lastLazyRequest &&\n first >= this.lastLazyRequest.first &&\n first + rows <= this.lastLazyRequest.first + this.lastLazyRequest.rows;\n if (covered) {\n return;\n }\n this.lastLazyRequest = { first, rows };\n this.lazyLoad.emit({ first, rows });\n });\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n devWarn(() =>\n this.lazy() && !this.virtualScroll()\n ? '[ds-table] lazy needs virtualScroll: without a window there is no range to fetch, so every gap in `data` renders a skeleton row and (lazyLoad) never narrows. Set virtualScroll (and maxHeight), or hand the table its rows outright.'\n : null,\n );\n devWarn(() =>\n this.lazy() && this.total() === null\n ? '[ds-table] lazy needs `total`: the scroller is sized from the rows that EXIST, and without it the spacers collapse to the slice that has arrived — the scrollbar then lies about the length of the list.'\n : null,\n );\n devWarn(() =>\n this.lazy() && this.sortMode() === 'client'\n ? '[ds-table] lazy with sortMode=\"client\" sorts only the rows that happen to have arrived, which is a different order every time a window loads. The server owns the order here — drop sortMode or declare \"server\".'\n : null,\n );\n devWarn(() =>\n this.virtualScroll() && !this.maxHeight()\n ? '[ds-table] virtualScroll needs maxHeight — without a bounded scroller there is no viewport to window against, so every row renders and nothing is virtualized. Set maxHeight (e.g. \"480px\").'\n : null,\n );\n devWarn(() =>\n this.virtualScroll() && this.expandableRows()\n ? '[ds-table] virtualScroll and expandableRows do not combine: an expanded row is taller than virtualRowSize, and every offset after it would be wrong. The expander renders but the panel is suppressed — move the detail into a modal or a drawer, or drop virtualScroll.'\n : null,\n );\n devWarn(() =>\n this.expandAllToggle() && this.expandMode() === 'single'\n ? '[ds-table] expandAllToggle contradicts expandMode=\"single\" — expanding every row is the one thing single mode exists to prevent. The header toggle is suppressed; drop one of the two.'\n : null,\n );\n devWarn(() =>\n this.expandAllToggle() && !this.expandableRows()\n ? '[ds-table] expandAllToggle needs expandableRows — without it there is no expander column to put the toggle in, so it renders nothing. Set expandableRows.'\n : null,\n );\n devWarn(() =>\n this.expandMode() === 'single' && this.expandedIds().size > 1\n ? '[ds-table] expandMode=\"single\" was given expandedIds holding several rows. A two-way model is the host\\'s to write, so it is left as passed rather than rewritten — the next expander click collapses back to one.'\n : null,\n );\n devWarn(() =>\n this.virtualScroll() && this.pageSize() !== null\n ? '[ds-table] virtualScroll with pageSize paginates a window of a page. Virtual scrolling is what pagination was for on a long list — pick one.'\n : null,\n );\n }\n\n // A sticky `bottom` resolves against the scrollport's CONTENT box, so anything this table\n // sticks to the bottom comes to rest one padding-bottom above the edge the reader sees. Both\n // the horizontal scrollbar proxy and the bulk-action bar subtract this; it is published on the\n // HOST so every descendant inherits one measurement, and measured rather than taken from a\n // token because the padding belongs to the consumer's scroll container and moves with a media\n // query.\n effect((onCleanup) => {\n const host = this.hostElement.nativeElement;\n const scroller = this.scrollAncestor();\n const publish = (): void =>\n host.style.setProperty(\n '--_table-scroller-pad-bottom',\n scroller ? getComputedStyle(scroller).paddingBottom : '0px',\n );\n publish();\n if (!scroller) {\n return;\n }\n const observer = new ResizeObserver(publish);\n observer.observe(scroller);\n onCleanup(() => observer.disconnect());\n });\n\n // Published as a custom property rather than bound on the proxy: the proxy is behind an\n // `@if`, and the stylesheet must be able to out-rank it with --ds-table-sticky-scrollbar-offset.\n effect(() => {\n const host = this.hostElement.nativeElement;\n const resolved = this.stickyScrollbarOffsetResolved();\n if (resolved === null) {\n host.style.removeProperty('--_table-sticky-scrollbar-offset');\n\n return;\n }\n host.style.setProperty('--_table-sticky-scrollbar-offset', resolved);\n });\n\n // Assigning an equal scrollLeft fires no scroll event, so the two mirrors\n // can't loop.\n effect((onCleanup) => {\n const proxy = this.hscrollProxy()?.nativeElement;\n if (!proxy) {\n return;\n }\n const wrap = this.scrollWrap().nativeElement;\n const fromWrap = (): void => {\n proxy.scrollLeft = wrap.scrollLeft;\n };\n const fromProxy = (): void => {\n wrap.scrollLeft = proxy.scrollLeft;\n };\n wrap.addEventListener('scroll', fromWrap, { passive: true });\n proxy.addEventListener('scroll', fromProxy, { passive: true });\n const measure = (): void => {\n this.hscrollContentWidth.set(wrap.scrollWidth);\n // Both are rounded integers, so a fractional layout width makes an\n // unscrollable wrap report one px more than it holds.\n this.hscrollNeeded.set(wrap.scrollWidth > wrap.clientWidth + 1);\n };\n // The wrap's own box never changes with content — watch the table too\n // (column toggles, data swaps change its width).\n const resizeObserver = new ResizeObserver(measure);\n resizeObserver.observe(wrap);\n const table = wrap.querySelector('table');\n if (table) {\n resizeObserver.observe(table);\n }\n measure();\n onCleanup(() => {\n wrap.removeEventListener('scroll', fromWrap);\n proxy.removeEventListener('scroll', fromProxy);\n resizeObserver.disconnect();\n });\n });\n\n // Opt-in height tween. Observer fires pre-paint: freezing the old height\n // here stops the jump being painted; disconnect during the anim so its own\n // resizes don't re-trigger it; clip (not hidden) avoids a scroll container.\n effect((onCleanup) => {\n if (!this.animateHeight()) {\n return;\n }\n const wrap = this.scrollWrap().nativeElement;\n let previousHeight: number | null = null;\n let previousWidth: number | null = null;\n let heightAnim: Animation | null = null;\n const observer = new ResizeObserver((entries) => {\n const entry = entries[0];\n const box = entry.borderBoxSize?.[0];\n const nextHeight = box ? box.blockSize : entry.contentRect.height;\n const nextWidth = box ? box.inlineSize : entry.contentRect.width;\n const fromHeight = previousHeight;\n const widthChanged = nextWidth !== previousWidth;\n previousHeight = nextHeight;\n previousWidth = nextWidth;\n // Only a height change at a stable width is a row-set swap; skip the\n // first measure and width-driven reflows (window/column resize) so the\n // tween doesn't chase a resize.\n if (fromHeight === null || widthChanged || nextHeight === fromHeight) {\n return;\n }\n const styles = getComputedStyle(wrap);\n const duration = this.parseDurationMs(\n styles.getPropertyValue('--duration-base'),\n );\n if (duration <= 0) {\n return;\n }\n observer.disconnect();\n heightAnim?.cancel();\n wrap.style.height = `${fromHeight}px`;\n wrap.style.overflowY = 'clip';\n heightAnim = wrap.animate(\n [{ height: `${fromHeight}px` }, { height: `${nextHeight}px` }],\n {\n duration,\n easing:\n styles.getPropertyValue('--ease-standard').trim() || 'ease-out',\n },\n );\n heightAnim.onfinish = heightAnim.oncancel = () => {\n heightAnim = null;\n wrap.style.height = '';\n wrap.style.overflowY = '';\n observer.observe(wrap);\n };\n });\n observer.observe(wrap);\n onCleanup(() => {\n if (heightAnim) {\n heightAnim.onfinish = heightAnim.oncancel = null;\n heightAnim.cancel();\n heightAnim = null;\n }\n wrap.style.height = '';\n wrap.style.overflowY = '';\n observer.disconnect();\n });\n });\n\n // Client-side paging only (with `total` set the host owns the clamp): when a\n // filter shrinks the result set below the current page, pull `page` back to\n // the last page that still has rows so the body never renders empty.\n effect(() => {\n const size = this.pageSize();\n if (size === null || this.total() !== null) {\n return;\n }\n const lastPage = Math.max(\n 1,\n Math.ceil(this.filteredData().length / size),\n );\n if (this.page() > lastPage) {\n this.page.set(lastPage);\n }\n });\n\n let previousPage = this.page();\n effect(() => {\n const current = this.page();\n const enabled = this.scrollToTopOnPageChange();\n if (current !== previousPage && enabled) {\n this.scrollWrap().nativeElement.scrollIntoView({ block: 'start' });\n }\n previousPage = current;\n });\n }\n\n private parseDurationMs(raw: string): number {\n const value = raw.trim();\n if (value.endsWith('ms')) {\n return parseFloat(value);\n }\n if (value.endsWith('s')) {\n return parseFloat(value) * 1000;\n }\n\n return parseFloat(value) || 0;\n }\n\n protected onRowMenuClick(row: T, event: Event): void {\n event.stopPropagation();\n this.menuRow.set(row);\n this.rowMenuPopover()?.toggle(event.currentTarget as HTMLElement);\n }\n\n protected isMenuOpenFor(row: T): boolean {\n return this.menuRow() === row && !!this.rowMenuPopover()?.opened();\n }\n\n protected isActionDisabled(action: TableRowAction<T>): boolean {\n const row = this.menuRow();\n\n return row !== null && !!action.disabled?.(row);\n }\n\n /** Items that apply to `row`. Called from the trigger's own gate as well as the\n * menu, so a row with nothing applicable shows no kebab instead of an empty one. */\n protected actionsFor(row: T): readonly TableRowAction<T>[] {\n return this.rowActions().filter((action) => !action.hidden?.(row));\n }\n\n protected hasActionsFor(row: T): boolean {\n return this.actionsFor(row).length > 0;\n }\n\n protected readonly visibleRowActions = computed<readonly TableRowAction<T>[]>(\n () => {\n const row = this.menuRow();\n\n return row === null ? [] : this.actionsFor(row);\n },\n );\n\n protected actionLabel(action: TableRowAction<T>): string {\n const label = action.label;\n if (typeof label !== 'function') {\n return label;\n }\n const row = this.menuRow();\n\n return row === null ? '' : label(row);\n }\n\n /** Empty unless the item is actually disabled for this row: a reason on a live\n * item would read as a caveat on something that works. */\n protected actionReason(action: TableRowAction<T>): string {\n const row = this.menuRow();\n if (row === null || !action.disabled?.(row)) {\n return '';\n }\n const reason = action.disabledReason;\n\n return typeof reason === 'function' ? reason(row) : (reason ?? '');\n }\n\n protected onRowAction(action: TableRowAction<T>): void {\n const row = this.menuRow();\n if (row === null) {\n return;\n }\n this.rowActionSelected.emit({ action, row });\n }\n\n protected isExpanded(row: T): boolean {\n return this.expandedIds().has(this.rowKey(row));\n }\n\n protected onToggleExpand(row: T, event: Event): void {\n event.stopPropagation();\n const key = this.rowKey(row);\n const open = this.expandedIds();\n\n if (open.has(key)) {\n const next = new Set<string>(open);\n next.delete(key);\n this.expandedIds.set(next);\n this.rowCollapsed.emit(row);\n\n return;\n }\n\n if (this.expandMode() === 'single') {\n // `data()` rather than `displayData()` so a row left open on another page\n // is reported too — but an event carries a row, so an id whose row is not\n // loaded at all is dropped without one. Documented on `rowCollapsed`.\n const closing =\n open.size > 0\n ? this.data().filter((other) => open.has(this.rowKey(other)))\n : [];\n this.expandedIds.set(new Set<string>([key]));\n closing.forEach((other) => this.rowCollapsed.emit(other));\n this.rowExpanded.emit(row);\n\n return;\n }\n\n const next = new Set<string>(open);\n next.add(key);\n this.expandedIds.set(next);\n this.rowExpanded.emit(row);\n }\n\n protected onToggleExpandAll(): void {\n const rows = this.displayData();\n const open = this.expandedIds();\n const collapsing = this.allExpanded();\n const changed = rows.filter(\n (row) => open.has(this.rowKey(row)) === collapsing,\n );\n if (changed.length === 0) {\n return;\n }\n\n const next = new Set<string>(open);\n rows.forEach((row) => {\n if (collapsing) {\n next.delete(this.rowKey(row));\n } else {\n next.add(this.rowKey(row));\n }\n });\n this.expandedIds.set(next);\n\n changed.forEach((row) =>\n collapsing ? this.rowCollapsed.emit(row) : this.rowExpanded.emit(row),\n );\n }\n\n protected isSelected(row: T): boolean {\n return this.selectedIds().has(this.rowKey(row));\n }\n\n protected onToggleAll(event: Event): void {\n const checked = (event.target as HTMLInputElement).checked;\n const next = new Set<string>(this.selectedIds());\n if (checked) {\n this.displayData().forEach((row) => next.add(this.rowKey(row)));\n } else {\n this.displayData().forEach((row) => next.delete(this.rowKey(row)));\n }\n this.selectedIds.set(next);\n }\n\n protected onToggleRow(row: T, event: Event): void {\n event.stopPropagation();\n const checked = (event.target as HTMLInputElement).checked;\n const next = new Set<string>(this.selectedIds());\n if (checked) {\n next.add(this.rowKey(row));\n } else {\n next.delete(this.rowKey(row));\n }\n this.selectedIds.set(next);\n }\n\n private selectionBeforeGesture = '';\n\n protected onRowMousedown(): void {\n this.selectionBeforeGesture = window.getSelection()?.toString() ?? '';\n }\n\n protected onRowClick(row: T, event: Event): void {\n if ((event.target as HTMLElement).closest('input')) {\n return;\n }\n // Only a selection created by this gesture blocks the click — a stale one\n // mousedown can't collapse (user-select:none content) must not wedge rows.\n const selection = window.getSelection()?.toString() ?? '';\n if (selection && selection !== this.selectionBeforeGesture) {\n return;\n }\n this.rowClicked.emit(row);\n }\n\n protected onRowKey(row: T, event: Event): void {\n // Only the row's own key opens the row: a key pressed on a control inside a\n // cell belongs to that control (Space on the select box, Enter on a button).\n if (!this.rowInteractive() || event.target !== event.currentTarget) {\n return;\n }\n event.preventDefault();\n this.rowClicked.emit(row);\n }\n\n protected rowAriaLabel(row: T): string {\n const first = this.visibleColumns()[0];\n\n return first ? this.cellValue(row, first) : '';\n }\n\n /** Row identity — the `rowId` accessor when given, else `row.id`. Public so a\n * host reading `selectedIds`/`expandedIds` can compute the same keys. */\n rowKey(row: T): string {\n const accessor = this.rowId();\n if (accessor) {\n return accessor(row);\n }\n\n return String((row as { id?: unknown }).id ?? '');\n }\n\n protected sortableCol(col: TableColumn<T>): boolean {\n return !!col.sortable && this.sortModeResolved() !== 'none';\n }\n\n protected ariaSort(\n col: TableColumn<T>,\n ): 'ascending' | 'descending' | 'none' | null {\n if (!this.sortableCol(col)) {\n return null;\n }\n if (this.activeSortKey() === col.key && this.activeSortDir()) {\n return this.activeSortDir() === 'asc' ? 'ascending' : 'descending';\n }\n\n return 'none';\n }\n\n protected onSort(col: TableColumn<T>): void {\n if (!this.sortableCol(col)) {\n return;\n }\n const order = this.sortingOrder();\n const currentKey = this.activeSortKey();\n let dir: SortDir;\n if (currentKey !== col.key) {\n dir = order[0] ?? null;\n } else {\n const currentIndex = order.indexOf(this.activeSortDir());\n dir = order[(currentIndex + 1) % order.length] ?? null;\n }\n // The key survives `dir === null`: nulling it too would send a host that maps off\n // `sortKey` back to its own default sort.\n this.sortState.set({ key: col.key, dir });\n this.sortKeyChange.emit(col.key);\n this.sortDirChange.emit(dir);\n this.sortChange.emit({ key: col.key, dir });\n }\n\n protected headerClasses(col: TableColumn<T>): string {\n const parts: string[] = [];\n if (this.sortableCol(col)) {\n parts.push('sortable');\n }\n if (this.activeSortKey() === col.key && this.activeSortDir()) {\n parts.push(`sorted-${this.activeSortDir()}`);\n }\n\n return parts.join(' ');\n }\n\n protected sortIcon(col: TableColumn<T>): 'sortAsc' | 'sortDesc' | 'sort' {\n if (this.activeSortKey() !== col.key || !this.activeSortDir()) {\n return 'sort';\n }\n\n return this.activeSortDir() === 'asc' ? 'sortAsc' : 'sortDesc';\n }\n\n protected cellValue(row: T, col: TableColumn<T>): string {\n if (col.cell) {\n return col.cell(row);\n }\n\n return String((row as Record<string, unknown>)[col.key] ?? '');\n }\n\n protected cellLink(\n row: T,\n col: TableColumn<T>,\n ): string | readonly unknown[] | null {\n return col.link?.(row) ?? null;\n }\n\n // localStorage, not session: a column layout the reader arranged should still\n // be there tomorrow.\n private layoutKey(): string | null {\n const key = this.storageKey().trim();\n\n return this.persistLayout() && key ? `ds-table:${key}` : null;\n }\n\n private layoutRestored = false;\n\n private restoreLayout(key: string): void {\n try {\n const raw = localStorage.getItem(key);\n if (!raw) {\n return;\n }\n const saved = JSON.parse(raw) as Record<string, unknown>;\n // Only apply what was actually stored, and only what something owns: a table that has\n // never been rearranged must keep its declaration order and `hidden` flags, and a layout\n // saved when a feature was present must not be forced on a table that no longer has it.\n for (const slice of this.layout.persistedSlices()) {\n const value = saved[slice.key];\n if (value !== undefined && value !== null) {\n slice.write(value);\n }\n }\n } catch {\n // Unreadable or from an older shape: fall back to the declared layout.\n }\n }\n\n private saveLayout(key: string, stored: Record<string, unknown>): void {\n try {\n localStorage.setItem(key, JSON.stringify(stored));\n } catch {\n // Full or blocked: a lost column layout is not worth an error.\n }\n }\n\n /** Serialises the visible columns as a CSV download, through whichever export feature is on the\n * table. Pass `rows` to serialise a set you fetched yourself. Needs `dsTableExport`. */\n exportCsv(filename = 'table.csv', rows?: readonly T[]): void {\n if (!this.layout.exportCsv(filename, rows)) {\n this.warnNoExport('exportCsv');\n }\n }\n\n /** Runs the export: awaits the feature's `exportFetcher` when one is given, downloads the\n * result, drives `exporting()` and emits its `exportFailed`. Public so the button can live\n * anywhere: `<ds-button [loading]=\"table.exporting()\" (pressed)=\"table.runExport()\">`. */\n async runExport(): Promise<void> {\n const running = this.layout.runExport();\n if (!running) {\n this.warnNoExport('runExport');\n\n return;\n }\n await running;\n }\n\n private warnNoExport(called: string): void {\n devWarn(\n () =>\n `ds-table: ${called}() found no export feature. Add the dsTableExport directive to the table.`,\n );\n }\n\n /** Deterministic per-cell width so skeleton rows look organic but stable\n * across re-renders. */\n protected skeletonWidth(col: TableColumn<T>, rowIndex: number): string {\n const seed = `${col.key}-${rowIndex}`;\n let hash = 0;\n for (let charIndex = 0; charIndex < seed.length; charIndex++) {\n hash = (hash + seed.charCodeAt(charIndex)) | 0;\n }\n const widths = ['45%', '55%', '65%', '75%', '85%'];\n\n return widths[Math.abs(hash) % widths.length] ?? '70%';\n }\n}\n","<div class=\"table-toolbar\">\n <div class=\"toolbar-slot\">\n <ng-content select=\"[toolbar]\"></ng-content>\n </div>\n\n <ng-container #toolbarAnchor />\n</div>\n\n<!-- Wraps the SCROLL CONTAINER, not the table inside it: the scrim is\n `position: absolute; inset: 0`, so from in there it is sized to one viewport of\n the table and scrolls away with the content. -->\n<ds-loading-overlay\n [loading]=\"isOverlayLoading()\"\n [blur]=\"true\"\n [insetTop]=\"'var(--ds-table-head-h, var(--_table-head-h, 40px))'\"\n [inertContent]=\"false\">\n <div\n #scrollWrap\n class=\"scroll-wrap\"\n [class.scroll-y]=\"maxHeight()\"\n [style.max-height]=\"maxHeight()\">\n <div\n class=\"visually-hidden\"\n role=\"status\"\n aria-live=\"polite\">\n {{ statusMessage() }}\n </div>\n\n <table\n [class]=\"tableClasses()\"\n [style.--_table-virtual-row-h]=\"virtualRowHeight()\"\n [attr.role]=\"rowInteractive() ? 'grid' : null\"\n [attr.aria-busy]=\"loading() !== false ? 'true' : null\">\n @if (caption()) {\n <caption class=\"visually-hidden\">\n {{\n caption()\n }}\n </caption>\n }\n\n <thead #tableHead>\n <tr>\n @if (selectable()) {\n <th\n scope=\"col\"\n class=\"select-col pin-select\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"selectAllLabel()\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (change)=\"onToggleAll($event)\" />\n </th>\n }\n\n @if (expandableRows()) {\n <th\n scope=\"col\"\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\">\n @if (expandAllVisible()) {\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-label]=\"expandAllLabel()\"\n (click)=\"onToggleExpandAll()\">\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"allExpanded()\"\n [size]=\"16\" />\n </button>\n }\n </th>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <th\n scope=\"col\"\n dsTooltipWhenClipped\n [class]=\"headerClasses(col)\"\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.fit-content]=\"fitsContent(col)\"\n [style.width.px]=\"columnWidth(col)\"\n [style.min-width.px]=\"columnWidth(col)\"\n [style.max-width.px]=\"columnWidth(col)\"\n [attr.aria-sort]=\"ariaSort(col)\"\n [attr.data-col-key]=\"col.key\"\n [dsTooltip]=\"col.label\">\n @if (sortableCol(col)) {\n <button\n type=\"button\"\n class=\"th-label\"\n (click)=\"onSort(col)\">\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n\n <ds-icon\n class=\"sort-icon\"\n [name]=\"sortIcon(col)\"\n [size]=\"12\">\n </ds-icon>\n </button>\n } @else {\n <span class=\"th-label\">\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n </span>\n }\n\n @if (hasColumnFilter(col)) {\n <button\n type=\"button\"\n class=\"col-filter-btn\"\n aria-haspopup=\"dialog\"\n [class.active]=\"isColumnFiltered(col)\"\n [attr.aria-expanded]=\"isFilterPanelOpen(col)\"\n [attr.aria-label]=\"'Filter ' + col.label\"\n (click)=\"onColumnFilterClick(col, $event)\">\n <ds-icon\n name=\"filter\"\n [size]=\"12\" />\n </button>\n }\n\n @if (layout.resize(); as resize) {\n @let range = resize.range(col);\n\n <span\n class=\"col-resize\"\n role=\"separator\"\n tabindex=\"0\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"'Resize ' + col.label\"\n [attr.aria-valuenow]=\"range?.now ?? null\"\n [attr.aria-valuemin]=\"range?.min ?? null\"\n [attr.aria-valuemax]=\"range?.max ?? null\"\n (focus)=\"resize.onFocus(col, $event)\"\n (blur)=\"resize.onBlur()\"\n (pointerdown)=\"resize.onStart(col, $event)\"\n (pointermove)=\"resize.onMove($event)\"\n (pointerup)=\"resize.onEnd()\"\n (pointercancel)=\"resize.onEnd()\"\n (keydown)=\"resize.onKey(col, $event)\">\n </span>\n }\n </th>\n }\n\n @if (hasUtilityColumn()) {\n <th\n scope=\"col\"\n class=\"actions-col\">\n <ng-container #headerUtilityAnchor />\n\n @if (!layout.wantsUtilityColumn()) {\n <span class=\"visually-hidden\">\n Actions\n </span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <!-- Matches what the scrim covers, which is everything below the header:\n a row keeps its tabindex and its Enter handler otherwise, so a keyboard\n user could open a row whose data is mid-replacement while the pointer\n was stopped by the scrim. The header stays live on purpose — re-sorting\n is what puts the scrim up in the first place. -->\n <tbody [attr.inert]=\"isOverlayLoading() ? '' : null\">\n @if (isSkeletonLoading()) {\n @for (_ of skeletonArray(); track $index; let rowIndex = $index) {\n <ng-container\n [ngTemplateOutlet]=\"skeletonRow\"\n [ngTemplateOutletContext]=\"{ $implicit: rowIndex }\">\n </ng-container>\n }\n } @else if (showsLoadingSpace()) {\n <!-- Height, not a message. The empty state is a claim about the data and stays withheld\n while the table is still asking; without this the tbody is empty, the table collapses\n onto its header and the overlay spinner floats over nothing. -->\n <tr aria-hidden=\"true\">\n <td\n class=\"loading-space\"\n [attr.colspan]=\"expandedColspan()\">\n </td>\n </tr>\n } @else if (showsEmptyRow()) {\n <tr>\n <td\n class=\"empty\"\n [attr.colspan]=\"expandedColspan()\">\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\">\n </ng-container>\n } @else {\n <ng-content select=\"[empty]\"></ng-content>\n }\n </td>\n </tr>\n } @else {\n @if (virtualWindow(); as window) {\n <tr\n class=\"spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"window.padTop\">\n </tr>\n }\n\n @for (slot of rowSlots(); track slot.index) {\n @if (slot.row; as row) {\n <tr\n [class.selected]=\"isSelected(row)\"\n [class.expanded]=\"isExpanded(row)\"\n [class.clickable]=\"rowInteractive()\"\n [class.stripe]=\"isStriped(slot.index)\"\n [class.active]=\"rowKey(row) === activeRowId()\"\n [attr.aria-current]=\"\n rowKey(row) === activeRowId() ? 'true' : null\n \"\n [attr.tabindex]=\"rowInteractive() ? 0 : null\"\n [attr.aria-label]=\"rowInteractive() ? rowAriaLabel(row) : null\"\n (mousedown)=\"onRowMousedown()\"\n (click)=\"onRowClick(row, $event)\"\n (keydown.enter)=\"onRowKey(row, $event)\"\n (keydown.space)=\"onRowKey(row, $event)\">\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"'Select ' + rowAriaLabel(row)\"\n [checked]=\"isSelected(row)\"\n (change)=\"onToggleRow(row, $event)\"\n (click)=\"$event.stopPropagation()\" />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\">\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n [attr.aria-label]=\"\n isExpanded(row) ? 'Collapse row' : 'Expand row'\n \"\n (click)=\"onToggleExpand(row, $event)\">\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"isExpanded(row)\"\n [size]=\"16\" />\n </button>\n </td>\n }\n\n @for (\n col of visibleColumns();\n track col.key;\n let first = $first\n ) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.editable-cell]=\"col.editable\"\n [class.interactive-cell]=\"col.interactive\"\n [class.fit-content]=\"fitsContent(col)\"\n (dblclick)=\"startEdit(row, col, $event)\">\n @if (isEditing(row, col)) {\n <input\n #editInput\n type=\"text\"\n class=\"cell-edit\"\n [value]=\"editDraft()\"\n (input)=\"onEditInput($event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"commitEdit(row, col)\"\n (keydown.escape)=\"cancelEdit()\"\n (blur)=\"commitEdit(row, col)\" />\n } @else if (cellTemplate(col); as tpl) {\n @if (col.truncate) {\n <span\n class=\"cell-clip\"\n dsTooltipWhenClipped\n [style.max-width.px]=\"clipWidth(col)\"\n [dsTooltip]=\"cellValue(row, col)\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row: row,\n }\">\n </ng-container>\n </span>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row: row,\n }\">\n </ng-container>\n }\n } @else if (col.truncate) {\n <span\n class=\"cell-clip\"\n dsTooltipWhenClipped\n [style.max-width.px]=\"clipWidth(col)\"\n [dsTooltip]=\"cellValue(row, col)\">\n @if (cellLink(row, col); as target) {\n <a\n class=\"cell-link\"\n [routerLink]=\"target\"\n (click)=\"$event.stopPropagation()\">\n {{ cellValue(row, col) }}\n </a>\n } @else {\n {{ cellValue(row, col) }}\n }\n </span>\n } @else if (cellLink(row, col); as target) {\n <a\n class=\"cell-link\"\n [routerLink]=\"target\"\n (click)=\"$event.stopPropagation()\">\n {{ cellValue(row, col) }}\n </a>\n } @else {\n {{ cellValue(row, col) }}\n }\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\">\n @if (hasRowActions() && hasActionsFor(row)) {\n <button\n type=\"button\"\n class=\"row-actions-btn\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isMenuOpenFor(row)\"\n [attr.aria-label]=\"'Actions for ' + rowAriaLabel(row)\"\n (click)=\"onRowMenuClick(row, $event)\"\n (keydown.enter)=\"$event.stopPropagation()\"\n (keydown.space)=\"$event.stopPropagation()\">\n <ds-icon\n name=\"moreV\"\n [size]=\"16\" />\n </button>\n }\n </td>\n }\n </tr>\n\n @if (\n expandableRows() &&\n isExpanded(row) &&\n rowExpandTemplate() &&\n !virtualizing()\n ) {\n <tr class=\"expand-panel-row\">\n <td\n class=\"expand-panel-cell\"\n [attr.colspan]=\"expandedColspan()\">\n <!-- The animation runs on the grid track, so the panel needs a child to be the\n track's content; `overflow: hidden` on it is what makes the reveal read as\n the accordion's rather than as a jump. -->\n <div class=\"expand-panel-inner\">\n <ng-container\n [ngTemplateOutlet]=\"rowExpandTemplate()!\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row: row,\n }\">\n </ng-container>\n </div>\n </td>\n </tr>\n }\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"skeletonRow\"\n [ngTemplateOutletContext]=\"{ $implicit: slot.index }\">\n </ng-container>\n }\n }\n\n @if (virtualWindow(); as window) {\n <tr\n class=\"spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"window.padBottom\">\n </tr>\n }\n }\n </tbody>\n </table>\n </div>\n</ds-loading-overlay>\n\n@if (stickyScrollbarResolved()) {\n <div\n #hscrollProxy\n class=\"hscroll-proxy\"\n aria-hidden=\"true\"\n [class.hscroll-hidden]=\"!hscrollNeeded()\">\n <div\n class=\"hscroll-spacer\"\n [style.width.px]=\"hscrollContentWidth()\">\n </div>\n </div>\n}\n\n@if (pageSize(); as size) {\n <div class=\"pagination-footer\">\n <ds-pagination\n [total]=\"total() ?? filteredData().length\"\n [pageSize]=\"size\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [showPageSize]=\"showPageSize()\"\n [showLabel]=\"showLabel()\"\n [(currentPage)]=\"page\"\n (pageSizeChange)=\"pageSize.set($event)\" />\n </div>\n}\n\n@if (hasAnyColumnFilter()) {\n <ds-popover\n #columnFilterPopover\n align=\"start\"\n panelRole=\"dialog\"\n panelLabel=\"Filter values\">\n @if (filterColumn()) {\n @if (headerFilterFor(filterColumn()!); as projected) {\n <div class=\"col-filter col-filter-custom\">\n <ng-container\n [ngTemplateOutlet]=\"projected.template\"\n [ngTemplateOutletContext]=\"headerFilterContext(filterColumn()!)\" />\n </div>\n } @else {\n <div class=\"col-filter\">\n <input\n type=\"text\"\n class=\"col-filter-search\"\n placeholder=\"Search…\"\n [value]=\"filterSearch()\"\n (input)=\"onFilterSearch($event)\"\n (click)=\"$event.stopPropagation()\" />\n\n <div class=\"col-filter-list\">\n @for (value of filterValues(); track value) {\n <label class=\"col-filter-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isFilterValueChecked(value)\"\n (change)=\"toggleFilterValue(value)\" />\n {{ value || '(empty)' }}\n </label>\n } @empty {\n <div class=\"col-filter-empty\">\n No matches\n </div>\n }\n </div>\n\n <div class=\"col-filter-footer\">\n <span class=\"col-filter-count\">\n {{ filterSelectedCount() }} selected\n </span>\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"clearColumnFilter()\">\n Clear\n </button>\n </div>\n </div>\n }\n }\n </ds-popover>\n}\n\n<ng-container #overlaysAnchor />\n\n<ng-template\n #columnWidthControls\n let-col>\n @if (layout.resize(); as resize) {\n <span class=\"col-width\">\n <button\n type=\"button\"\n class=\"col-width-btn\"\n [attr.aria-label]=\"'Narrow ' + col.label\"\n (click)=\"resize.step(col, -16)\">\n <ds-icon\n name=\"minus\"\n [size]=\"14\" />\n </button>\n\n <button\n type=\"button\"\n class=\"col-width-btn\"\n [attr.aria-label]=\"'Widen ' + col.label\"\n (click)=\"resize.step(col, 16)\">\n <ds-icon\n name=\"plus\"\n [size]=\"14\" />\n </button>\n\n <button\n type=\"button\"\n class=\"col-width-btn col-width-auto\"\n [attr.aria-label]=\"'Fit ' + col.label + ' to its content'\"\n (click)=\"resize.step(col, 'auto')\">\n Fit\n </button>\n </span>\n }\n</ng-template>\n\n@if (hasRowActions()) {\n <ds-popover\n #rowMenuPopover\n align=\"end\">\n <ds-menu>\n @for (action of visibleRowActions(); track action.id; let first = $first) {\n <!-- Not before the first item: a divider at the top of a menu separates the menu from its\n own edge, which is a line with nothing on one side of it. -->\n @if (action.divider && !first) {\n <ds-menu-divider />\n }\n\n <ds-menu-item\n [icon]=\"action.icon ?? null\"\n [error]=\"action.error ?? false\"\n [disabled]=\"isActionDisabled(action)\"\n [description]=\"actionReason(action)\"\n (pressed)=\"onRowAction(action)\">\n {{ actionLabel(action) }}\n </ds-menu-item>\n }\n </ds-menu>\n </ds-popover>\n}\n\n@if (selectable() && anySelected()) {\n <div class=\"bulk-bar\">\n <span class=\"count\">\n {{ selectedIds().size }} selected\n </span>\n\n <span class=\"sep\"></span>\n\n <ng-content select=\"[bulk-actions]\"></ng-content>\n </div>\n}\n\n<!-- One skeleton row, shared by loading=\"skeleton\" and the gaps a lazy\n window has not filled yet. `$implicit` is the row's index: skeletonWidth\n varies the bar lengths from it, so a block of them does not read as a grid. -->\n<ng-template\n #skeletonRow\n let-rowIndex>\n <tr>\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <ds-skeleton\n width=\"14px\"\n height=\"14px\"\n [inline]=\"true\" />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\">\n </td>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\">\n <ds-skeleton\n height=\"14px\"\n [width]=\"skeletonWidth(col, rowIndex)\"\n [inline]=\"true\" />\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\"></td>\n }\n </tr>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAEA;;;;;;;;;;;;;;;;;AAiBG;MAKU,qBAAqB,CAAA;AAChC;AAC6E;AACpE,IAAA,cAAc,GAAG,KAAK,CAAC,QAAQ,oFAAU;AACzC,IAAA,QAAQ,GAAG,MAAM,EAAC,WAAiD,EAAC;wGAJlE,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACVD;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;MAKU,qBAAqB,CAAA;;AAEvB,IAAA,cAAc,GAAG,KAAK,CAAC,QAAQ,oFAAU;AAClD;AAC6B;AACpB,IAA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