@ui-organized/angular-table 0.0.0-stage → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-organized-angular-table.mjs","sources":["../../src/lib/core/track-store.ts","../../src/lib/core/create-deferred.ts","../../src/lib/core/table-context.ts","../../src/lib/components/table-row-actions.ts","../../src/lib/core/select-cells.ts","../../src/lib/core/actions-header.ts","../../src/lib/core/system-columns.ts","../../src/lib/core/create-data-table.ts","../../src/lib/core/element-props.ts","../../src/lib/core/element-ref.ts","../../src/lib/core/table-props-host.ts","../../src/lib/components/table-head-cell.ts","../../src/lib/components/table-selection-footer.ts","../../src/lib/components/table-row.ts","../../src/lib/components/table-states.ts","../../src/lib/components/table.ts","../../src/lib/components/table-reorder-toggle.ts","../../src/lib/components/table-selection-bar.ts","../../src/lib/components/table-filters.ts","../../src/lib/components/table-sheets.ts","../../src/lib/components/table-toolbar.ts","../../src/lib/components/table-pagination.ts","../../src/lib/components/table-sub-bar.ts","../../src/lib/components/table-cards.ts","../../src/lib/data-table.ts","../../src/public-api.ts","../../src/ui-organized-angular-table.ts"],"sourcesContent":["import { DestroyRef, inject, signal, type Signal } from \"@angular/core\";\nimport type { Store } from \"@ui-organized/table-core\";\n\n/**\n * Binds one of core's framework-free stores to Angular signals.\n *\n * `@ui-organized/table-core`'s `state.ts` chose `{ getState, subscribe,\n * dispatch }` because it is exactly what React's `useSyncExternalStore` wants —\n * and the shape turns out to cost nothing anywhere else: Vue mirrors it with a\n * `shallowRef`, Svelte with `$state`, and this with a `signal`.\n *\n * The store's two invariants are what make it safe: `getState()` returns the\n * same reference until something actually changes, and a no-op action notifies\n * nobody. So the mirror only ever changes when the state did.\n *\n * `DestroyRef` rather than `ngOnDestroy`, because this is called from an\n * injection context rather than from a class that has lifecycle hooks.\n */\nexport function trackStore<S, A>(store: Store<S, A>): Signal<S> {\n const state = signal<S>(store.getState());\n const unsubscribe = store.subscribe(() => state.set(store.getState()));\n inject(DestroyRef).onDestroy(unsubscribe);\n return state.asReadonly();\n}\n","import {\n DestroyRef,\n computed,\n effect,\n inject,\n signal,\n untracked,\n type Signal,\n} from \"@angular/core\";\n\n/**\n * Angular's answer to React's `useDeferredValue`, which Angular does not have.\n *\n * ── Why this file exists ────────────────────────────────────────────────────\n *\n * The React table splits every expensive filter into two values: the condition\n * list and the search string update **urgently**, so a controlled input never\n * lags a keystroke, while the row-model pass they drive reads a *deferred* copy.\n * The React adapter records what happens without the split — typing \"ada\" landed\n * as \"a\".\n *\n * Angular has no priority scheduler either. This is a deliberate transcription\n * of the answer `@ui-organized/vue-table` and `@ui-organized/svelte-table`\n * already give, rather than a third design: the trade-offs are identical, and\n * three answers to one problem in one design system would be a defect in itself.\n *\n * - The **source** stays urgent. Inputs bind to it directly, so typing is\n * never delayed and never drops a character.\n * - The **mirror** lags by one idle beat, and only the filtering reads it.\n * - A burst of keystrokes **coalesces** into one filter pass.\n * - The initial value is taken **synchronously**, because a table seeded with\n * `defaultFilters` has to render filtered on its first pass — on the server\n * too, where nothing is ever scheduled.\n *\n * Idle rather than a debounce because a fixed delay is wrong in both directions:\n * too short and it does nothing on a busy machine, too long and a fast typist\n * watches the table sit still. The deadline matters as much as the callback — a\n * table being scrolled while someone types keeps the main thread busy, and\n * without one the filter would never run.\n */\n\ntype Cancel = () => void;\n\n/** Long enough to coalesce a burst of typing, short enough to feel caused by it. */\nconst IDLE_TIMEOUT = 100;\n\nfunction scheduleIdle(run: () => void): Cancel {\n // SSR: no scheduler, and no rendering to protect either.\n if (typeof window === \"undefined\") {\n let cancelled = false;\n queueMicrotask(() => {\n if (!cancelled) run();\n });\n return () => {\n cancelled = true;\n };\n }\n const request = window.requestIdleCallback;\n if (typeof request === \"function\") {\n const handle = request(() => run(), { timeout: IDLE_TIMEOUT });\n return () => window.cancelIdleCallback?.(handle);\n }\n // Safari has no requestIdleCallback. A macrotask still yields to paint and to\n // input, which is the property being bought here.\n const handle = window.setTimeout(run, 0);\n return () => window.clearTimeout(handle);\n}\n\nexport function createDeferred<T>(source: () => T): Signal<T> {\n /**\n * `null` until something has actually been deferred, and the view below falls\n * through to the source while it is.\n *\n * The obvious spelling — `signal(untracked(source))` — reads the source at\n * *construction*, and this factory can be constructed before the host\n * component's inputs are set (see the `linkedSignal` note in\n * `./create-data-table.ts`). Falling through instead gives the same answer,\n * because the initial deferred value *is* the source value, and reads nothing\n * until someone asks.\n */\n const landed = signal<{ value: T } | null>(null);\n let cancel: Cancel | null = null;\n\n effect(() => {\n const value = source();\n cancel?.();\n cancel = scheduleIdle(() => {\n cancel = null;\n landed.set({ value });\n });\n });\n\n inject(DestroyRef).onDestroy(() => cancel?.());\n return computed(() => landed()?.value ?? untracked(source));\n}\n","import { InjectionToken, inject } from \"@angular/core\";\nimport type { RowData } from \"@ui-organized/table-core\";\nimport type { DataTableApi } from \"./types.js\";\n\n/**\n * The styled parts are usable on their own — that is the whole point of layer 2\n * — so they need somewhere to find the table without every one of them taking\n * the api as an input through four levels of markup.\n *\n * An `InjectionToken` on the element injector, which is Angular's spelling of\n * the same arrangement React uses a context object for: the component that owns\n * the table provides it, every part injects it, and a part rendered outside one\n * says so with a message that names the fix.\n */\nexport const UIO_DATA_TABLE = new InjectionToken<DataTableApi<any>>(\"ui-organized:data-table\");\n\n/** Providers for a component that owns a table. */\nexport function provideDataTable<T extends RowData>(factory: () => DataTableApi<T>) {\n return { provide: UIO_DATA_TABLE, useFactory: factory };\n}\n\nexport function injectDataTable<T extends RowData = RowData>(): DataTableApi<T> {\n const api = inject<DataTableApi<T> | null>(UIO_DATA_TABLE, { optional: true });\n if (!api) {\n throw new Error(\n \"A table part was rendered outside a table. Provide one with \" +\n \"`provideDataTable(...)` — or use <uio-data-table>, which does that for you.\",\n );\n }\n return api;\n}\n\n/** For parts that are legitimately optional inside a table (toolbars reused elsewhere). */\nexport function injectOptionalDataTable<T extends RowData = RowData>(): DataTableApi<T> | null {\n return inject<DataTableApi<T> | null>(UIO_DATA_TABLE, { optional: true });\n}\n","import { Component, computed, input } from \"@angular/core\";\nimport { UioButton, UioMenu, UioMenuItem, UioMenuTrigger } from \"@ui-organized/angular\";\nimport type { RowData } from \"@ui-organized/table-core\";\nimport { injectDataTable } from \"../core/table-context.js\";\nimport type { RowAction } from \"../core/types.js\";\nimport { internalGlyph as glyph } from \"@ui-organized/angular\";\nimport type { IconName } from \"@ui-organized/angular\";\n\n/**\n * Per-row actions, as a menu rather than a row of buttons.\n *\n * A menu is one tab stop per row instead of three, which matters a great deal\n * when there are two hundred rows — and it is the only affordance that survives\n * card mode unchanged.\n *\n * The six menu parts this needs are the ones §E added to `@ui-organized/angular`\n * before this package could exist.\n */\n@Component({\n selector: \"[uioTableRowActions]\",\n standalone: true,\n imports: [UioButton, UioMenu, UioMenuTrigger, UioMenuItem],\n template: `\n <!--\n Angular's menu surface *is* the \"uio-menu\" element — there is no separate\n content part, which is why \"align\" lands on the menu itself. The trigger\n sits beside it and names it, the way every overlay in\n \"@ui-organized/angular\" is written.\n -->\n @if (items().length > 0) {\n <button\n uioButton\n uioMenuTrigger\n [menu]=\"menu\"\n intent=\"ghost\"\n [size]=\"table.size()\"\n [icon]=\"glyph('menu')\"\n [attr.aria-label]=\"label()\"\n ></button>\n <!--\n Picks report through the menu's own (select), carrying the item's value:\n UioMenuItem has no select output, so (select) on an item binds a DOM\n event that never fires.\n -->\n <uio-menu #menu=\"uioMenu\" align=\"end\" (select)=\"run($event)\">\n @for (action of items(); track action.id) {\n <div\n uioMenuItem\n [value]=\"action.id\"\n [icon]=\"iconOf(action)\"\n [destructive]=\"!!action.destructive\"\n [disabled]=\"!!action.disabled?.(row())\"\n >\n {{ action.label }}\n </div>\n }\n </uio-menu>\n }\n `,\n})\nexport class UioTableRowActions<T extends RowData> {\n protected readonly glyph = glyph;\n /** The row the actions operate on. */\n readonly row = input.required<T>();\n /**\n * Overrides the table's own `rowActions`. Only needed when the part is used\n * outside a `<uio-data-table>`.\n */\n readonly actions = input<RowAction<T>[] | undefined>(undefined);\n /** Accessible name for the trigger. Defaults to \"Row actions\". */\n readonly label = input(\"Row actions\");\n\n protected readonly table = injectDataTable<T>();\n protected readonly items = computed(() => this.actions() ?? this.table.options.rowActions ?? []);\n\n protected run(id: string): void {\n const action = this.items().find((candidate) => candidate.id === id);\n if (action && !action.disabled?.(this.row())) void action.onRun(this.row());\n }\n\n protected iconOf(action: RowAction<T>): IconName | undefined {\n return action.icon;\n }\n}\n","import { Component, computed, input } from \"@angular/core\";\nimport { UioCheckbox } from \"@ui-organized/angular\";\nimport { headerToggleTarget } from \"@ui-organized/table-core\";\nimport { injectDataTable } from \"./table-context.js\";\n\n/**\n * ── Why the host is the `<span>` ────────────────────────────────────────────\n *\n * Both of these are rendered by `flexRenderComponent`, which creates the\n * component's host element — so the host is a node in the table whether it is\n * wanted or not. Selecting on `span[uioTableSelectCell]` rather than a custom\n * element makes that unavoidable node *be* the hit target React renders, instead\n * of an extra `<uio-table-select-cell>` wrapped around it.\n *\n * The same reasoning as everywhere else in this package: an Angular component\n * always has a host element, so the only way to match React's DOM is to make the\n * host the element React renders.\n */\n\n/**\n * The header's tri-state checkbox: from empty it selects the rows on screen;\n * from checked or mixed it clears the selection. What the box shows decides\n * the click, not the box's own next state — see `headerToggleTarget`.\n */\n@Component({\n selector: \"span[uioTableSelectAllCell]\",\n standalone: true,\n imports: [UioCheckbox],\n host: { class: \"data-table__select-hit\" },\n template: `\n <label\n uioCheckbox\n [checked]=\"table.selection.header().checked\"\n [indeterminate]=\"table.selection.header().indeterminate\"\n [attr.aria-label]=\"selectAllLabel()\"\n (checkedChange)=\"toggle()\"\n ></label>\n `,\n})\nexport class UioTableSelectAllCell {\n protected readonly table = injectDataTable();\n // \"shown\", not \"on this page\": when the table is virtualized the checkbox\n // governs the rendered window rather than a page, and the selection\n // footer's \"Select N hidden rows\" is the way to reach the rest.\n protected readonly selectAllLabel = computed(\n () => `Select the rows shown in ${this.table.label()}`,\n );\n\n protected toggle(): void {\n this.table.selection.togglePage(headerToggleTarget(this.table.selection.header()));\n }\n}\n\n/**\n * A row's selection checkbox, with shift-click range selection.\n *\n * Given a `UioCheckbox` with a closed prop API, the wrapper records `shiftKey`\n * from the pointer or keyboard event that *precedes* the change, which the\n * change handler then reads. It needs no change to `@ui-organized/angular`,\n * which is the point: widening a component's API to serve one consumer is how a\n * design system's props turn into a junk drawer.\n */\n@Component({\n selector: \"span[uioTableSelectCell]\",\n standalone: true,\n imports: [UioCheckbox],\n host: {\n class: \"data-table__select-hit\",\n \"(mousedown)\": \"remember($event)\",\n \"(keydown)\": \"remember($event)\",\n },\n template: `\n <label\n uioCheckbox\n [checked]=\"table.selection.isSelected(rowId())\"\n [attr.aria-label]=\"rowLabel()\"\n (checkedChange)=\"change($event)\"\n ></label>\n `,\n})\nexport class UioTableSelectCell {\n readonly rowId = input.required<string>();\n readonly rowLabel = input.required<string>();\n\n protected readonly table = injectDataTable();\n private shift = false;\n\n protected remember(event: MouseEvent | KeyboardEvent): void {\n this.shift = event.shiftKey;\n }\n\n protected change(checked: boolean): void {\n this.table.selection.toggle(this.rowId(), checked, this.shift);\n this.shift = false;\n }\n}\n","import { Component } from \"@angular/core\";\n\n/**\n * The actions column's header: a name for assistive tech and nothing visible.\n *\n * A component rather than a plain string, because the string would be *shown* —\n * a column of ellipsis buttons under a visible \"Actions\" heading is not what the\n * design draws, and a column with no accessible name at all is worse.\n */\n@Component({\n selector: \"uio-table-actions-header\",\n standalone: true,\n template: `<span class=\"data-table__sr-only\">Actions</span>`,\n})\nexport class UioTableActionsHeader {}\n","import { flexRenderComponent } from \"@tanstack/angular-table\";\nimport { ACTIONS_COLUMN_ID, SELECTION_COLUMN_ID, type RowData } from \"@ui-organized/table-core\";\nimport { UioTableRowActions } from \"../components/table-row-actions.js\";\nimport { UioTableSelectAllCell, UioTableSelectCell } from \"./select-cells.js\";\nimport { UioTableActionsHeader } from \"./actions-header.js\";\nimport type { TableColumn } from \"./types.js\";\n\n/**\n * The two columns the table adds for itself.\n *\n * They are built here rather than in the factory because their cells render real\n * components — `Checkbox`, `Menu` — and each reads the table from the injector,\n * which works because cells render inside the provider.\n *\n * `flexRenderComponent` rather than a bare component: the Angular adapter's\n * `FlexRender` identifies a component by the wrapper this returns, which is how\n * it tells \"a component to mount\" from \"a string to print\". The plan expected\n * this to need hand-rolled `TemplateRef` plumbing; v9's adapter ships it.\n */\nexport function selectionColumn<T extends RowData>(): TableColumn<T> {\n return {\n id: SELECTION_COLUMN_ID,\n header: () => flexRenderComponent(UioTableSelectAllCell),\n cell: ({ row, table }: any) => {\n // The identifying column's value is the only thing that makes one row's\n // checkbox distinguishable from another's in a screen reader's forms list.\n const primary = table\n .getAllLeafColumns()\n .find((column: any) => column.columnDef.meta?.primary)?.id;\n const name = primary ? String(row.getValue(primary) ?? row.id) : row.id;\n return flexRenderComponent(UioTableSelectCell, {\n inputs: { rowId: row.id, rowLabel: `Select ${name}` },\n });\n },\n size: 48,\n minSize: 48,\n maxSize: 48,\n enableSorting: false,\n enableResizing: false,\n enableHiding: false,\n meta: { align: \"center\", hideFromViewOptions: true },\n } as TableColumn<T>;\n}\n\nexport function actionsColumn<T extends RowData>(): TableColumn<T> {\n return {\n id: ACTIONS_COLUMN_ID,\n header: () => flexRenderComponent(UioTableActionsHeader),\n cell: ({ row }: any) =>\n flexRenderComponent(UioTableRowActions, { inputs: { row: row.original as T } }),\n size: 56,\n minSize: 56,\n maxSize: 56,\n enableSorting: false,\n enableResizing: false,\n enableHiding: false,\n meta: { align: \"end\", sticky: \"right\", hideFromViewOptions: true },\n } as TableColumn<T>;\n}\n","/**\n * The headless layer: core's stores and TanStack's Angular adapter, bound\n * together.\n *\n * Everything decided here is a *binding* decision — which signal holds what,\n * when a value is deferred, how focus is restored. Every behavioural decision\n * (what Tab does, what a shift-range covers, when to virtualize) lives in\n * `@ui-organized/table-core` and is reached from here, which is what keeps a\n * fourth framework adapter to this file plus the components.\n *\n * ── The three things Angular does differently ───────────────────────────────\n *\n * 1. **No prop spread.** Core hands back plain objects of classes and ARIA that\n * the other three adapters spread onto an element. `UioTableProps` in\n * `./element-props.ts` is the directive that stands in for it, and it has to\n * *diff* rather than assign — these bags change shape, not just value.\n * 2. **No per-element ref callback.** `viewChild` cannot reach a projected node,\n * which the viewport is, so `UioTableElementRef` writes into a signal.\n * 3. **No priority scheduler.** `./create-deferred.ts` stands in for\n * `useDeferredValue`, and is the same answer the Vue and Svelte packages give\n * rather than a third design.\n *\n * What Angular does *not* cost, contrary to the plan's estimate: `flexRender`.\n * `@tanstack/angular-table` v9 ships `FlexRender` as a structural directive, so\n * a header or cell renderer needs no `TemplateRef` plumbing of our own.\n */\nimport {\n DestroyRef,\n computed,\n effect,\n inject,\n linkedSignal,\n signal,\n untracked,\n} from \"@angular/core\";\nimport {\n injectTable,\n type AngularTable,\n type ColumnOrderState,\n type ColumnPinningState,\n type ColumnSizingState,\n type ColumnVisibilityState,\n type PaginationState,\n type SortingState,\n type TableState,\n type Updater,\n} from \"@tanstack/angular-table\";\nimport { injectVirtualizer } from \"@tanstack/angular-virtual\";\nimport {\n CARD_HEIGHT,\n DEFAULT_PAGE_SIZE,\n EMPTY_SELECTION,\n FACET_ROW_LIMIT,\n columnId as columnIdOf,\n copyRowsToClipboard,\n coreTableOptions,\n createDetailStore,\n createEditStore,\n createFilterReducer,\n createOperatorCatalogue,\n defaultOperatorFor,\n describeCondition,\n estimateRowHeight,\n exportRowsToCsv,\n facetOptions,\n filterAnnouncement,\n fromColumnFilters,\n gridKeyDown,\n headerCheckboxState,\n horizontalScrollState,\n horizontalScrollTarget,\n inferFilterType,\n INITIAL_FILTER_STATE,\n isEditing as isEditingCell,\n isNearEnd,\n isSelected as isRowSelected,\n layoutColumns,\n metaOf,\n NO_HORIZONTAL_SCROLL,\n normalizeFilterDef,\n operatorLabel,\n operatorsFor,\n orderFilterableFields,\n overscanFor,\n primaryColumnId,\n rangeSelect,\n resolveMode,\n retargetCondition,\n selectAllMatching as selectAllMatchingCore,\n selectPage,\n selectionCount as selectionCountCore,\n shouldVirtualize,\n spacerHeights,\n stepRow,\n toBulkSelection,\n toColumnFilters,\n watchWidth,\n type FilterChangeKind,\n type GridCursor,\n type RowData,\n type SelectionState,\n type TableChrome,\n type TableEditContext,\n type TableFilterCondition,\n type TableFilterState,\n type TableFilterType,\n type TableRowModel,\n type TableRowScope,\n type HorizontalScrollState,\n type UioTableFeatures,\n withDateColumns,\n canSelectHiddenRows,\n canStepColumn,\n currentColumnOrder,\n dropColumn,\n isMovableColumn,\n reorderModeOf,\n stepColumn,\n type DropSide,\n} from \"@ui-organized/table-core\";\nimport { trackStore } from \"./track-store.js\";\nimport { createDeferred } from \"./create-deferred.js\";\nimport { actionsColumn, selectionColumn } from \"./system-columns.js\";\nimport type {\n ColumnDrag,\n DataTableApi,\n RenderRow,\n TableColumn,\n TableFilterInput,\n UseDataTableOptions,\n} from \"./types.js\";\n\n/** Stable identity for the un-virtualized path. */\nconst NO_SPACERS = { top: 0, bottom: 0 };\n\n/**\n * Ids are assigned here rather than accepted, so they are deterministic —\n * which is what keeps visual baselines and test assertions stable across runs.\n */\nfunction seedFilterState(defaults: readonly TableFilterInput[] | undefined): TableFilterState {\n if (!defaults?.length) return INITIAL_FILTER_STATE;\n const conditions: TableFilterCondition[] = defaults.map((condition, index) => ({\n ...condition,\n id: `f${index + 1}`,\n }));\n return { ...INITIAL_FILTER_STATE, conditions, nextId: conditions.length + 1 };\n}\n\n/** Follows the same dot path `accessorKey` does, so nested data is reachable. */\nfunction readPath(row: unknown, path: string): unknown {\n if (!path.includes(\".\")) return (row as Record<string, unknown> | undefined)?.[path];\n let value: unknown = row;\n for (const key of path.split(\".\")) {\n value = (value as Record<string, unknown> | undefined)?.[key];\n }\n return value;\n}\n\n/** A few real values from a column, for type inference. */\nfunction sampleColumn<T extends RowData>(\n data: readonly T[],\n def: TableColumn<T>,\n id: string,\n): unknown[] {\n const key = (def as { accessorKey?: string }).accessorKey ?? id;\n // Twenty, not one: a leading null should not get to decide the type.\n return data.slice(0, 20).map((row) => readPath(row, key));\n}\n\n/** TanStack's logical pinning positions, in this design system's physical ones. */\nconst PINNED_SIDE: Record<string, \"left\" | \"right\" | false> = {\n start: \"left\",\n end: \"right\",\n false: false,\n undefined: false,\n};\n\nfunction applyUpdater<S>(updater: Updater<S>, previous: S): S {\n return typeof updater === \"function\" ? (updater as (old: S) => S)(previous) : updater;\n}\n\n/**\n * `meta.sticky` is our vocabulary; `columnPinning` is TanStack's.\n *\n * The two disagree on more than the key name since v9: TanStack pins to\n * `start`/`end`, which is the correct call for a library that has to work in\n * both writing directions, while this design system says `left`/`right` because\n * its sticky offsets are physical CSS properties.\n */\nfunction pinningFromMeta<T extends RowData>(\n columns: readonly TableColumn<T>[],\n): ColumnPinningState {\n const start: string[] = [];\n const end: string[] = [];\n for (const def of columns) {\n const sticky = metaOf<T>(def)?.sticky;\n if (sticky === \"left\") start.push(columnIdOf(def));\n else if (sticky === \"right\") end.push(columnIdOf(def));\n }\n return { start, end };\n}\n\nfunction prefersReducedMotion(): boolean {\n if (typeof window === \"undefined\" || typeof window.matchMedia !== \"function\") return false;\n return window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n}\n\nexport function createDataTable<T extends RowData>(\n options: () => UseDataTableOptions<T>,\n): DataTableApi<T> {\n const destroyRef = inject(DestroyRef);\n\n // ── Options, read reactively ──────────────────────────────────────────────\n const label = computed(() => options().label);\n const captionVisible = computed(() => options().captionVisible ?? false);\n const size = computed(() => options().size ?? \"md\");\n const variant = computed(() => options().variant ?? \"default\");\n const selectionMode = computed(() => options().selection ?? \"none\");\n const sortable = computed(() => options().sortable ?? true);\n const filterable = computed(() => options().filterable ?? true);\n const paginated = computed(() => options().paginated ?? false);\n const resizable = computed(() => options().resizable ?? false);\n const virtualOption = computed(() => options().virtual ?? true);\n const loading = computed(() => options().loading ?? false);\n const manual = computed(() => options().manual ?? false);\n\n // ── DOM handles ───────────────────────────────────────────────────────────\n // Signals written by `UioTableElementRef`, because Angular has no per-element\n // ref callback and `viewChild` cannot reach a *projected* node — which the\n // viewport is. The observers below are effects that must re-run when the node\n // arrives, which is why these are signals rather than plain fields.\n const rootRef = signal<HTMLElement | null>(null);\n // `HTMLElement`, not `HTMLDivElement`: in card mode the scroll container is a\n // `<ul>`, and the virtualizer attaches to whichever one is rendered.\n const viewportRef = signal<HTMLElement | null>(null);\n\n // ── Table state ───────────────────────────────────────────────────────────\n /**\n * Seeded state is a `linkedSignal`, and that is forced rather than stylistic.\n *\n * `signal(untracked(() => options().defaultSorting))` reads the options *at\n * construction* — and this factory can be constructed before the host\n * component's inputs are set, because a child part asks the injector for the\n * api during the creation pass while inputs are bound in the update pass.\n * Angular says so outright (NG0950: \"Input `data` is required but no value is\n * available yet\") and the table never bootstrapped.\n *\n * A `linkedSignal` is writable like a `signal` and computes its seed on the\n * first *read*, which happens during rendering — by which time the inputs\n * exist. It also re-seeds if the default changes, which for a static\n * `defaultSorting` is the same thing as seeding once.\n */\n const sorting = linkedSignal<SortingState>(() => options().defaultSorting ?? []);\n\n const catalogue = computed(() => createOperatorCatalogue(options().filterOperators));\n const filterState = linkedSignal<TableFilterState>(() =>\n seedFilterState(options().defaultFilters),\n );\n const dispatchFilter = (action: Parameters<ReturnType<typeof createFilterReducer>>[1]) => {\n filterState.set(createFilterReducer(catalogue())(filterState(), action));\n };\n const conditions = computed(() => filterState().conditions);\n\n /**\n * Conditions update **urgently**; only the filtering they drive is deferred.\n * See `./create-deferred.ts`.\n */\n const deferredConditions = createDeferred(() => conditions());\n const columnFilters = computed(() => toColumnFilters(deferredConditions()));\n\n const search = signal(\"\");\n const deferredSearch = createDeferred(() => search());\n\n const pagination = linkedSignal<PaginationState>(() => ({\n pageIndex: 0,\n pageSize: options().pageSize ?? DEFAULT_PAGE_SIZE,\n }));\n const columnVisibility = linkedSignal<ColumnVisibilityState>(\n () => options().defaultColumnVisibility ?? {},\n );\n const columnOrder = signal<ColumnOrderState>([]);\n const columnSizing = signal<ColumnSizingState>({});\n const selection = signal<SelectionState>(EMPTY_SELECTION);\n\n // ── Measurement ───────────────────────────────────────────────────────────\n // Two widths, because they answer different questions. The root's width picks\n // the responsive mode; the viewport's content width decides how much room the\n // columns actually have.\n const width = signal<number | null>(null);\n const viewportWidth = signal<number | null>(null);\n effect((onCleanup) => {\n const stop = watchWidth(rootRef(), (value) => width.set(value));\n onCleanup(stop);\n });\n effect((onCleanup) => {\n const stop = watchWidth(viewportRef(), (value) => viewportWidth.set(value));\n onCleanup(stop);\n });\n\n const mode = computed(() => resolveMode(options().responsive, width()));\n\n // ── Horizontal scroll ─────────────────────────────────────────────────────\n const scrollState = signal<HorizontalScrollState>(NO_HORIZONTAL_SCROLL);\n\n /**\n * Three signals, because three different things change the answer: the user\n * scrolls, the viewport is resized, and the content is re-laid out underneath\n * it. That last one moves neither the scroll offset nor the viewport's own\n * box, which is why the scrolled content is observed and not just its\n * container.\n *\n * Every update goes through a bail-out compare. The numbers change on every\n * frame of a scroll; the three booleans they answer change only at the ends.\n */\n effect((onCleanup) => {\n const element = viewportRef();\n if (!element) {\n scrollState.set(NO_HORIZONTAL_SCROLL);\n return;\n }\n const read = () => {\n const next = horizontalScrollState(element);\n const previous = untracked(scrollState);\n if (\n next.overflowing === previous.overflowing &&\n next.canScrollLeft === previous.canScrollLeft &&\n next.canScrollRight === previous.canScrollRight\n ) {\n return;\n }\n scrollState.set(next);\n };\n read();\n element.addEventListener(\"scroll\", read, { passive: true });\n // Guarded for jsdom and SSR, exactly as `watchWidth` is.\n const observer = typeof ResizeObserver === \"undefined\" ? null : new ResizeObserver(read);\n observer?.observe(element);\n const content = element.firstElementChild;\n if (content) observer?.observe(content);\n onCleanup(() => {\n element.removeEventListener(\"scroll\", read);\n observer?.disconnect();\n });\n });\n\n // ── Columns ───────────────────────────────────────────────────────────────\n // Date columns rewritten once, up front: everything below — filter types,\n // chips, sorting, export — then sees ISO days and the column's own format.\n // Same array back when no column declares `meta.date`.\n const userColumns = computed(() => withDateColumns(options().columns));\n\n const allColumns = computed(() => {\n const out: TableColumn<T>[] = [...userColumns()];\n if (selectionMode() !== \"none\") out.unshift(selectionColumn<T>());\n if (options().rowActions?.length) out.push(actionsColumn<T>());\n return out;\n });\n\n const primaryId = computed(() => primaryColumnId(userColumns()));\n const basePinning = computed(() => pinningFromMeta(allColumns()));\n\n // Created once, outside any computed: these are stores, not derived values,\n // and rebuilding one would discard an open editor mid-keystroke.\n const stores = { edit: createEditStore(), detail: createDetailStore() };\n const editState = trackStore(stores.edit);\n const detailState = trackStore(stores.detail);\n\n const editableColumns = computed(\n () =>\n new Set(\n options()\n .columns.filter((def) => metaOf<T>(def)?.edit)\n .map((def) => columnIdOf(def)),\n ),\n );\n\n const interactive = computed(\n () =>\n selectionMode() !== \"none\" ||\n editableColumns().size > 0 ||\n Boolean(options().onRowClick) ||\n Boolean(options().detail) ||\n Boolean(options().rowActions?.length),\n );\n\n /**\n * The filter type per filterable column, from its declaration or inferred from\n * the data. Read off the raw rows rather than the table's, because this is an\n * *input* to building the table.\n */\n const filterTypes = computed(() => {\n const types: Record<string, TableFilterType> = {};\n for (const def of userColumns()) {\n const filter = normalizeFilterDef(metaOf<T>(def)?.filter);\n if (!filter) continue;\n const id = columnIdOf(def);\n types[id] =\n filter.type ?? inferFilterType(sampleColumn(options().data, def, id), filter.options);\n }\n return types;\n });\n\n const tableOptions = computed(() =>\n coreTableOptions<T>({\n data: options().data,\n columns: allColumns(),\n getRowId: options().getRowId,\n selection: selectionMode(),\n sortable: sortable(),\n filterable: filterable(),\n paginated: paginated(),\n resizable: resizable(),\n manual: manual(),\n rowCount: options().rowCount,\n filterTypes: filterTypes(),\n catalogue: catalogue(),\n }),\n );\n\n /**\n * The controlled state, in one place — and handed back on the api, because\n * `table.state` is a *React*-adapter convenience. The Angular adapter exposes\n * signal-backed `atoms` instead, so the parts would have no equivalent to\n * read.\n */\n const state = computed<Partial<TableState<UioTableFeatures>>>(() => ({\n sorting: sorting(),\n columnFilters: columnFilters(),\n globalFilter: deferredSearch(),\n pagination: pagination(),\n columnVisibility: columnVisibility(),\n columnOrder: columnOrder(),\n columnSizing: columnSizing(),\n columnPinning: basePinning(),\n rowSelection: selection().rows,\n }));\n\n /**\n * An options *factory*, which is the Angular adapter's reactivity contract: it\n * re-reads the factory inside its own computed, so anything signal-backed in\n * here keeps the table in step without a watcher.\n */\n const table = injectTable<UioTableFeatures, T>(\n () =>\n ({\n ...tableOptions(),\n state: state(),\n onSortingChange: (updater: Updater<SortingState>) =>\n sorting.set(applyUpdater(updater, sorting())),\n // The raw TanStack instance is a documented escape hatch, so\n // `table.resetColumnFilters()` still has to work. It lands here and is\n // translated back into conditions — one direction of truth.\n onColumnFiltersChange: (updater: Updater<ReturnType<typeof toColumnFilters>>) =>\n dispatchFilter({\n type: \"replace\",\n conditions: fromColumnFilters(applyUpdater(updater, columnFilters())),\n }),\n onGlobalFilterChange: (updater: Updater<string>) =>\n search.set(applyUpdater(updater, search())),\n onPaginationChange: (updater: Updater<PaginationState>) =>\n pagination.set(applyUpdater(updater, pagination())),\n onColumnVisibilityChange: (updater: Updater<ColumnVisibilityState>) =>\n columnVisibility.set(applyUpdater(updater, columnVisibility())),\n onColumnOrderChange: (updater: Updater<ColumnOrderState>) =>\n columnOrder.set(applyUpdater(updater, columnOrder())),\n onColumnSizingChange: (updater: Updater<ColumnSizingState>) =>\n columnSizing.set(applyUpdater(updater, columnSizing())),\n onRowSelectionChange: (updater: Updater<Record<string, true>>) =>\n selection.set({ ...selection(), rows: applyUpdater(updater, selection().rows) }),\n }) as never,\n ) as AngularTable<UioTableFeatures, T>;\n\n const rows = computed(() => table.getRowModel().rows);\n const visibleColumns = computed(() => table.getVisibleLeafColumns());\n\n // A table narrower than its container would otherwise leave a bare strip where\n // the header band stops. The surplus goes to one column rather than being\n // spread across all of them — see `layoutColumns`.\n const layout = computed(() =>\n layoutColumns(\n visibleColumns().map((column) => ({\n id: column.id,\n size: column.getSize(),\n pinned: PINNED_SIDE[String(column.getIsPinned())] ?? false,\n })),\n mode() === \"table\" ? viewportWidth() : null,\n ),\n );\n\n // Post-filter, pre-pagination: what \"1–25 of 312\" counts.\n const totalMatching = computed(() =>\n manual() ? (options().rowCount ?? rows().length) : table.getPrePaginatedRowModel().rows.length,\n );\n const rowOffset = computed(() =>\n paginated() && !manual() ? pagination().pageIndex * pagination().pageSize : 0,\n );\n\n // ── Virtualization ────────────────────────────────────────────────────────\n const virtualizing = computed(() => shouldVirtualize(rows().length, virtualOption()));\n // Always constructed — tearing a virtualizer down when a filter drops the row\n // count below the threshold would lose the scroll position. An idle one costs\n // one scroll listener.\n const virtualizer = injectVirtualizer<HTMLElement, HTMLElement>(() => ({\n count: virtualizing() ? rows().length : 0,\n // `scrollElement`, not `getScrollElement`: the Angular adapter takes the\n // element itself and re-reads the factory when the signal fills in.\n scrollElement: viewportRef() ?? undefined,\n // Cards are much taller than rows and vary far more, so the first guess\n // differs by mode. Both are corrected by `measureElement` on the first frame.\n estimateSize: () => (mode() === \"cards\" ? CARD_HEIGHT : estimateRowHeight(size())),\n overscan: overscanFor(virtualOption()),\n // Rows are measured rather than trusted: the estimate is derived from\n // tokens, and a re-themed table would otherwise mis-position its content.\n measureElement: (element: HTMLElement) => element.getBoundingClientRect().height,\n }));\n\n const spacers = computed(() =>\n virtualizing()\n ? spacerHeights(virtualizer.getVirtualItems(), virtualizer.getTotalSize())\n : NO_SPACERS,\n );\n\n const renderRows = computed<RenderRow<T>[]>(() => {\n const build = (row: TableRowModel<T>, index: number): RenderRow<T> => ({\n row,\n index,\n // What `aria-rowindex` reports: where it sits in the whole dataset.\n absoluteIndex: index + rowOffset(),\n });\n if (!virtualizing()) return rows().map(build);\n const out: RenderRow<T>[] = [];\n for (const item of virtualizer.getVirtualItems()) {\n const row = rows()[item.index];\n if (row) out.push(build(row, item.index));\n }\n return out;\n });\n\n // ── Grid focus ────────────────────────────────────────────────────────────\n const cursorState = signal<GridCursor>({ row: 0, col: 0 });\n // A counter, not a boolean: the same cell can be re-focused (after an editor\n // closes) without the cursor changing.\n const focusRequest = signal(0);\n // With no rows there is nothing in the body to hold the tab stop, so it moves\n // to the header — still operable (sorting), still one tab stop.\n const effectiveCursor = computed<GridCursor>(() =>\n rows().length === 0 ? { row: -1, col: cursorState().col } : cursorState(),\n );\n\n const moveCursor = (next: GridCursor) => {\n const prev = untracked(cursorState);\n if (prev.row === next.row && prev.col === next.col) return;\n cursorState.set(next);\n };\n\n /**\n * Follow focus that has already moved — a click, or Tab landing on a cell.\n * Deliberately does NOT take focus.\n *\n * The two used to be one function in the React adapter, and it broke inline\n * editing outright: the editor's input took focus, its cell's `focus` event\n * bubbled, the cursor was \"set\", and the effect below focused the cell again —\n * pulling focus straight back out of the editor the user had just opened.\n */\n const setCursor = moveCursor;\n\n /** Move the cursor AND take DOM focus. Keyboard actions only. */\n const focusCell = (next: GridCursor) => {\n moveCursor(next);\n focusRequest.update((count) => count + 1);\n };\n\n effect(() => {\n const count = focusRequest();\n const viewport = untracked(viewportRef);\n if (count === 0 || !viewport) return;\n let attempts = 0;\n const tryFocus = () => {\n const { row, col } = untracked(effectiveCursor);\n const element = viewport.querySelector<HTMLElement>(`[data-cell=\"${row}:${col}\"]`);\n if (element) {\n element.focus();\n return;\n }\n // A PageDown into un-rendered territory scrolls first; the row exists one\n // frame later. Two attempts, then give up rather than spin.\n if (attempts++ < 2 && typeof requestAnimationFrame === \"function\") {\n requestAnimationFrame(tryFocus);\n }\n };\n tryFocus();\n });\n\n // ── Selection ─────────────────────────────────────────────────────────────\n const pageRowIds = computed(() => rows().map((row) => row.id));\n\n /**\n * The rows the header checkbox governs: what is **on screen**.\n *\n * For a paginated table that is the page. For a virtualized one it is the\n * rendered window, and that distinction is the whole point — `rows` on the\n * 100,000-row table is all 100,000, so a header checkbox scoped to it answers\n * one click by enumerating a hundred thousand ids.\n */\n const visibleRowIds = computed(() => renderRows().map((entry) => entry.row.id));\n const headerState = computed(() => headerCheckboxState(selection(), visibleRowIds()));\n\n const toggleRow = (rowId: string, checked: boolean, shift = false) => {\n selection.set(\n untracked(selectionMode) === \"single\"\n ? { ...EMPTY_SELECTION, rows: checked ? { [rowId]: true } : {}, anchor: rowId }\n : rangeSelect(untracked(selection), untracked(pageRowIds), rowId, shift, checked),\n );\n };\n\n const togglePage = (checked: boolean) => {\n selection.set(selectPage(untracked(selection), untracked(visibleRowIds), checked));\n };\n\n const selectEverythingMatching = () => {\n const next = selectAllMatchingCore(untracked(selection));\n // The loaded rows are materialised as well as the flag, so\n // `getSelectedRowModel()` — and therefore CSV export and any bulk action\n // over real row objects — still works for the rows the client has.\n const rowsState: Record<string, true> = {};\n for (const row of table.getPrePaginatedRowModel().rows) rowsState[row.id] = true;\n selection.set({ ...next, rows: rowsState });\n };\n\n const selectedRows = computed(() => {\n // `selection` is read explicitly even though `getSelectedRowModel` depends on\n // it: the table instance is stable and its row-model call is memoized, so\n // without this read the computed would have no dependency at all.\n selection();\n return table.getSelectedRowModel().rows.map((row) => row.original);\n });\n\n // ── Inline edit ───────────────────────────────────────────────────────────\n const startEdit = (row: TableRowModel<T>, colId: string) => {\n if (!untracked(editableColumns).has(colId)) return;\n stores.edit.dispatch({\n type: \"start\",\n target: { rowId: row.id, columnId: colId },\n value: row.getValue(colId),\n });\n };\n\n const commitEdit = () => {\n const editing = stores.edit.getState();\n const target = editing.target;\n // `pending` is the re-entry guard. A commit is reachable from three places\n // at once — Enter, Tab, and the editor's own blur as focus returns to the\n // cell — and without this an edit is written twice.\n if (!target || editing.invalid || editing.pending) return;\n const row = table.getRow(target.rowId);\n const column = untracked(allColumns).find((def) => columnIdOf(def) === target.columnId);\n const edit = metaOf<T>(column)?.edit;\n const value = edit?.parse ? edit.parse(editing.draft) : editing.draft;\n const message = edit?.validate?.(value, row.original) ?? null;\n if (message) {\n stores.edit.dispatch({ type: \"invalid\", message });\n return;\n }\n const patch = {\n rowId: target.rowId,\n columnId: target.columnId,\n row: row.original,\n value,\n previousValue: editing.original,\n };\n stores.edit.dispatch({ type: \"commit-start\" });\n Promise.resolve(untracked(options).onEdit?.(patch)).then(\n () => stores.edit.dispatch({ type: \"commit-done\" }),\n (error: unknown) =>\n stores.edit.dispatch({\n type: \"commit-failed\",\n message: error instanceof Error ? error.message : \"Could not save the change\",\n }),\n );\n };\n\n const editContextFor = (row: TableRowModel<T>, colId: string): TableEditContext<T> | null => {\n if (!isEditingCell(editState(), row.id, colId)) return null;\n return {\n row: row.original,\n rowId: row.id,\n columnId: colId,\n value: editState().draft,\n size: size(),\n invalid: editState().invalid,\n setValue: (value) => {\n const column = untracked(allColumns).find((def) => columnIdOf(def) === colId);\n const validate = metaOf<T>(column)?.edit?.validate;\n stores.edit.dispatch({\n type: \"change\",\n value,\n invalid: validate?.(value, row.original) ?? null,\n });\n },\n commit: commitEdit,\n cancel: () => stores.edit.dispatch({ type: \"cancel\" }),\n };\n };\n\n // ── Row detail ────────────────────────────────────────────────────────────\n const openDetail = (rowId: string) => {\n stores.detail.dispatch({ type: \"open\", rowId, index: untracked(pageRowIds).indexOf(rowId) });\n };\n\n const stepDetail = (direction: -1 | 1) => {\n const detail = stores.detail.getState();\n if (detail.dirty) {\n stores.detail.dispatch({ type: \"confirm\", intent: direction === -1 ? \"prev\" : \"next\" });\n return;\n }\n const next = stepRow(untracked(pageRowIds), detail.rowId, direction);\n if (next) stores.detail.dispatch({ type: \"go\", ...next });\n };\n\n const closeDetail = () => {\n if (stores.detail.getState().dirty) {\n stores.detail.dispatch({ type: \"confirm\", intent: \"close\" });\n return;\n }\n stores.detail.dispatch({ type: \"close\" });\n };\n\n const resolveDetailConfirm = (discard: boolean) => {\n const detail = stores.detail.getState();\n const intent = detail.confirming;\n stores.detail.dispatch({ type: \"dismiss\" });\n if (!discard || !intent) return;\n if (intent === \"close\") {\n stores.detail.dispatch({ type: \"close\" });\n return;\n }\n const next = stepRow(untracked(pageRowIds), detail.rowId, intent === \"prev\" ? -1 : 1);\n if (next) stores.detail.dispatch({ type: \"go\", ...next });\n };\n\n const detailRow = computed(() => {\n const rowId = detailState().rowId;\n if (!rowId) return null;\n const row = rows().find((candidate) => candidate.id === rowId);\n return row ? row.original : null;\n });\n\n // ── Export ────────────────────────────────────────────────────────────────\n const exportCsv = (scope: TableRowScope = \"view\") => {\n exportRowsToCsv(table, {\n scope,\n filename: `${untracked(label).toLowerCase().replace(/\\s+/g, \"-\")}.csv`,\n });\n };\n\n const copySelection = (scope: TableRowScope = \"selected\") =>\n copyRowsToClipboard(table, { scope });\n\n // ── Column reordering ───────────────────────────────────────────────────────\n // `reorderable: true | \"always\"` keeps headers movable all the time;\n // `\"toggle\"` only inside a reorder mode the toolbar switches. Card mode has\n // no headers to move, so it is never live there.\n const reorderMode = computed(() => reorderModeOf(options().reorderable));\n const reorderOn = signal(false);\n const reorderActive = computed(\n () =>\n mode() !== \"cards\" &&\n (reorderMode() === \"always\" || (reorderMode() === \"toggle\" && reorderOn())),\n );\n const drag = signal<ColumnDrag | null>(null);\n\n // Reads the visibility, pinning and order signals directly, so a template\n // calling these re-renders when any of them changes.\n const isMovable = (id: string): boolean => {\n const hidden = columnVisibility()[id] === false;\n const pins = basePinning();\n const pinned = Boolean(pins.start?.includes(id) || pins.end?.includes(id));\n return Boolean(table.getColumn(id)) && !hidden && isMovableColumn(id, pinned);\n };\n const orderNow = () =>\n currentColumnOrder(\n columnOrder(),\n table.getAllLeafColumns().map((column) => column.id),\n );\n const canMoveColumn = (id: string, direction: -1 | 1): boolean =>\n reorderActive() && canStepColumn(orderNow(), id, direction, isMovable);\n const moveColumnBy = (id: string, direction: -1 | 1) => {\n if (!untracked(() => canMoveColumn(id, direction))) return;\n table.setColumnOrder(untracked(() => stepColumn(orderNow(), id, direction, isMovable)));\n };\n const dropColumnOn = (source: string, target: string, side: DropSide) => {\n untracked(() => {\n if (!reorderActive() || !isMovable(source) || !isMovable(target)) return;\n table.setColumnOrder(dropColumn(orderNow(), source, target, side));\n });\n };\n\n // ── Keyboard ──────────────────────────────────────────────────────────────\n const onGridKeyDown = (event: KeyboardEvent) => {\n if (!untracked(interactive)) return;\n const cursor = untracked(effectiveCursor);\n const columns = untracked(visibleColumns);\n const column = columns[cursor.col];\n const pageRows = Math.max(\n 1,\n Math.floor((untracked(viewportRef)?.clientHeight ?? 0) / estimateRowHeight(untracked(size))) -\n 1,\n );\n const action = gridKeyDown(\n {\n cursor,\n rowCount: untracked(rows).length,\n colCount: columns.length,\n pageRows,\n editing: Boolean(untracked(editState).target),\n editable: column ? untracked(editableColumns).has(column.id) : false,\n selectable: untracked(selectionMode) !== \"none\",\n multiSelect: untracked(selectionMode) === \"multiple\",\n reorderable:\n Boolean(column) &&\n cursor.row < 0 &&\n untracked(reorderActive) &&\n untracked(() => isMovable(column!.id)),\n },\n {\n key: event.key,\n shift: event.shiftKey,\n ctrl: event.ctrlKey,\n meta: event.metaKey,\n alt: event.altKey,\n },\n );\n if (action.type === \"none\") return;\n event.preventDefault();\n\n switch (action.type) {\n case \"move\":\n focusCell(action.cursor);\n break;\n case \"move-column\":\n // Stepping trades places with the next movable visible column, which\n // is the neighbouring header, so the column is now one index over.\n // Focus follows it there once the new order has rendered: a frame\n // later, after change detection has moved the header.\n if (column && untracked(() => canMoveColumn(column.id, action.direction))) {\n moveColumnBy(column.id, action.direction);\n const next = { row: -1, col: cursor.col + action.direction };\n if (typeof requestAnimationFrame === \"function\") {\n requestAnimationFrame(() => focusCell(next));\n } else {\n focusCell(next);\n }\n }\n break;\n case \"page\":\n if (untracked(virtualizing)) {\n virtualizer().scrollToIndex(action.cursor.row, { align: \"center\" });\n }\n focusCell(action.cursor);\n break;\n case \"extend\": {\n const all = untracked(rows);\n const anchorRow = all[cursor.row];\n const targetRow = all[action.cursor.row];\n if (anchorRow && targetRow) {\n const current = untracked(selection);\n const seeded = current.anchor ? current : { ...current, anchor: anchorRow.id };\n selection.set(rangeSelect(seeded, untracked(pageRowIds), targetRow.id, true, true));\n }\n focusCell(action.cursor);\n break;\n }\n case \"toggle-select\": {\n const row = untracked(rows)[cursor.row];\n if (row) toggleRow(row.id, !isRowSelected(untracked(selection), row.id));\n break;\n }\n case \"select-all\":\n togglePage(true);\n break;\n case \"copy\":\n void copySelection(action.scope);\n break;\n case \"edit\": {\n const row = untracked(rows)[cursor.row];\n if (row && column) startEdit(row, column.id);\n break;\n }\n case \"commit\":\n commitEdit();\n // The editor is about to unmount; focus has to be given somewhere\n // deliberate, or it falls to <body> and the grid loses the user.\n focusCell(cursor);\n break;\n case \"commit-and-move\":\n commitEdit();\n focusCell(action.cursor);\n break;\n case \"cancel\":\n stores.edit.dispatch({ type: \"cancel\" });\n focusCell(cursor);\n break;\n case \"activate\": {\n if (cursor.row < 0) {\n if (column?.getCanSort()) column.toggleSorting();\n break;\n }\n const row = untracked(rows)[cursor.row];\n if (!row) break;\n const opts = untracked(options);\n if (opts.detail) openDetail(row.id);\n else opts.onRowClick?.(row.original);\n break;\n }\n default:\n break;\n }\n };\n\n // ── Server mode ───────────────────────────────────────────────────────────\n effect(() => {\n if (!manual()) return;\n const onQueryChange = options().onQueryChange;\n if (!onQueryChange) return;\n onQueryChange({\n sorting: sorting().map((entry) => ({ id: entry.id, desc: entry.desc })),\n filters: conditions(),\n search: deferredSearch(),\n pageIndex: pagination().pageIndex,\n pageSize: pagination().pageSize,\n });\n });\n\n // Infinite scroll. Attached to the viewport rather than to the virtualizer so\n // it works in the un-virtualized case too.\n effect((onCleanup) => {\n const viewport = viewportRef();\n const onLoadMore = options().onLoadMore;\n if (!viewport || !onLoadMore) return;\n const rowHeight = estimateRowHeight(size());\n const onScroll = () => {\n if (\n isNearEnd(\n {\n scrollTop: viewport.scrollTop,\n scrollHeight: viewport.scrollHeight,\n clientHeight: viewport.clientHeight,\n },\n rowHeight,\n )\n ) {\n onLoadMore();\n }\n };\n viewport.addEventListener(\"scroll\", onScroll, { passive: true });\n onCleanup(() => viewport.removeEventListener(\"scroll\", onScroll));\n });\n\n // ── Filters ───────────────────────────────────────────────────────────────\n const announcement = signal(\"\");\n\n const filterDefs = computed(() => {\n const defs = new Map<string, ReturnType<typeof normalizeFilterDef>>();\n for (const def of userColumns()) {\n const filter = normalizeFilterDef(metaOf<T>(def)?.filter);\n if (filter) defs.set(columnIdOf(def), filter);\n }\n return defs;\n });\n\n const columnLabel = (id: string) => {\n const column = table.getColumn(id);\n const header = column?.columnDef.header;\n return filterDefs().get(id)?.label ?? (typeof header === \"string\" ? header : id);\n };\n\n const typeOfColumn = (id: string) => filterTypes()[id] ?? \"text\";\n\n const fields = computed(() => {\n const counts = new Map<string, number>();\n for (const condition of conditions()) {\n counts.set(condition.columnId, (counts.get(condition.columnId) ?? 0) + 1);\n }\n return orderFilterableFields(\n [...filterDefs().entries()].map(([columnId, def], index) => ({\n columnId,\n label: columnLabel(columnId),\n type: typeOfColumn(columnId),\n count: counts.get(columnId) ?? 0,\n priority: def?.priority,\n index,\n })),\n );\n });\n\n const describe = (condition: TableFilterCondition) =>\n describeCondition(condition, {\n type: typeOfColumn(condition.columnId),\n columnLabel: columnLabel(condition.columnId),\n catalogue: catalogue(),\n options: filterDefs().get(condition.columnId)?.options,\n formatValue: filterDefs().get(condition.columnId)?.formatValue,\n });\n\n /** Announce discrete changes only — a per-keystroke live region is a firehose. */\n const announce = (kind: FilterChangeKind, condition?: TableFilterCondition) => {\n announcement.set(\n filterAnnouncement(\n { kind, description: condition ? describe(condition).text : undefined },\n untracked(totalMatching),\n ),\n );\n };\n\n const addFilter = (columnId: string) => {\n const def = filterDefs().get(columnId);\n const type = typeOfColumn(columnId);\n // The id the reducer is about to assign, returned so the caller can open the\n // new chip's editor without waiting for a render to find it.\n const id = `f${untracked(filterState).nextId}`;\n dispatchFilter({\n type: \"add\",\n columnId,\n operator: defaultOperatorFor(type, catalogue(), def),\n single: def?.single,\n });\n return id;\n };\n\n /** The chip's field segment: move a condition to another column. */\n const changeFilterField = (id: string, columnId: string) => {\n const condition = untracked(conditions).find((entry) => entry.id === id);\n if (!condition || condition.columnId === columnId) return;\n dispatchFilter(\n retargetCondition(\n condition,\n { type: typeOfColumn(condition.columnId) },\n { columnId, type: typeOfColumn(columnId), def: filterDefs().get(columnId) },\n catalogue(),\n ),\n );\n };\n\n const removeFilter = (id: string) => {\n const condition = untracked(conditions).find((entry) => entry.id === id);\n if (condition) announce(\"removed\", condition);\n dispatchFilter({ type: \"remove\", id });\n };\n\n const clearFilters = () => {\n announce(\"cleared\");\n dispatchFilter({ type: \"clear\" });\n };\n\n /**\n * `getFacetedUniqueValues` allocates an array per row, so it is capped: above\n * `FACET_ROW_LIMIT` the options render without counts and nothing is disabled.\n */\n const optionsForCondition = (condition: TableFilterCondition) => {\n const def = filterDefs().get(condition.columnId);\n const column = table.getColumn(condition.columnId);\n const showCounts = def?.counts ?? rows().length <= FACET_ROW_LIMIT;\n return facetOptions(\n showCounts ? column?.getFacetedUniqueValues() : undefined,\n def?.options,\n condition.values,\n showCounts,\n );\n };\n\n const operatorsForCondition = (condition: TableFilterCondition) => {\n const type = typeOfColumn(condition.columnId);\n return operatorsFor(type, catalogue(), filterDefs().get(condition.columnId)?.operators).map(\n (op) => ({ id: op.id, label: operatorLabel(op, type) }),\n );\n };\n\n const activate = (row: TableRowModel<T>) => {\n const opts = untracked(options);\n if (opts.detail) openDetail(row.id);\n else opts.onRowClick?.(row.original);\n };\n\n const chrome = computed<TableChrome>(() => ({\n size: size(),\n variant: variant(),\n interactive: interactive(),\n totalWidth: layout().totalWidth,\n rowCount: totalMatching(),\n colCount: visibleColumns().length,\n label: label(),\n multiSelectable: selectionMode() === \"multiple\",\n }));\n\n const scrollBy = (direction: -1 | 1) => {\n const element = untracked(viewportRef);\n if (!element) return;\n const left = horizontalScrollTarget(element, direction);\n // Smooth unless the user asked for less motion — and unless the engine has\n // no options-taking `scrollTo` at all (jsdom), where the assignment is the\n // same scroll without the animation.\n if (typeof element.scrollTo === \"function\" && !prefersReducedMotion()) {\n element.scrollTo({ left, behavior: \"smooth\" });\n } else {\n element.scrollLeft = left;\n }\n };\n\n // Kept so a caller that tears the table down mid-flight has somewhere to hang\n // cleanup; the effects above register their own.\n void destroyRef;\n\n return {\n table,\n state,\n rows,\n renderRows,\n chrome,\n get options() {\n return options();\n },\n size,\n variant,\n label,\n captionVisible,\n interactive,\n mode,\n loading,\n search: search.asReadonly(),\n setSearch: (value: string) => search.set(value),\n selection: {\n mode: selectionMode,\n state: selection.asReadonly(),\n count: computed(() => selectionCountCore(selection(), totalMatching())),\n rows: selectedRows,\n // No `untracked`: this is read from every row's prop bag, which is a\n // `computed` — untracking it would freeze `data-selected` at whatever\n // the first render saw.\n isSelected: (rowId) => isRowSelected(selection(), rowId),\n toggle: toggleRow,\n togglePage,\n selectAllMatching: selectEverythingMatching,\n clear: () => selection.set(EMPTY_SELECTION),\n header: headerState,\n canSelectAllMatching: computed(() =>\n canSelectHiddenRows(selection(), headerState(), totalMatching(), selectionMode()),\n ),\n totalMatching,\n asBulk: () => toBulkSelection(selection()),\n },\n filters: {\n conditions,\n fields,\n add: addFilter,\n update: (id, patch) => dispatchFilter({ type: \"update\", id, ...patch }),\n changeField: changeFilterField,\n restore: (condition) => dispatchFilter({ type: \"restore\", condition }),\n remove: removeFilter,\n clear: clearFilters,\n describe,\n operatorsFor: operatorsForCondition,\n optionsFor: optionsForCondition,\n typeOf: (condition) => typeOfColumn(condition.columnId),\n arityOf: (condition) => catalogue().get(condition.operator)?.arity ?? \"one\",\n expanded: computed(() => filterState().expanded),\n setExpanded: (expanded) => dispatchFilter({ type: \"set-expanded\", expanded }),\n editing: computed(() => filterState().editingId),\n setEditing: (id) => dispatchFilter({ type: \"set-editing\", id }),\n announcement: announcement.asReadonly(),\n },\n edit: {\n enabled: computed(() => editableColumns().size > 0),\n state: editState,\n isEditing: (rowId, colId) => isEditingCell(editState(), rowId, colId),\n start: startEdit,\n setValue: (value) => stores.edit.dispatch({ type: \"change\", value }),\n commit: commitEdit,\n cancel: () => stores.edit.dispatch({ type: \"cancel\" }),\n contextFor: editContextFor,\n },\n detail: {\n enabled: computed(() => Boolean(options().detail)),\n state: detailState,\n row: detailRow,\n total: totalMatching,\n open: openDetail,\n close: closeDetail,\n step: stepDetail,\n canStep: (direction) => stepRow(pageRowIds(), detailState().rowId, direction) !== null,\n setDirty: (dirty) => stores.detail.dispatch({ type: \"dirty\", dirty }),\n resolveConfirm: resolveDetailConfirm,\n },\n focus: {\n cursor: effectiveCursor,\n setCursor,\n focusCell,\n isFocused: (rowIndex, colIndex) => {\n const cursor = effectiveCursor();\n return cursor.row === rowIndex && cursor.col === colIndex;\n },\n },\n virtual: { enabled: virtualizing, virtualizer, spacers },\n scroll: { state: scrollState.asReadonly(), by: scrollBy },\n reorder: {\n mode: reorderMode,\n active: reorderActive,\n setActive: (value) => reorderOn.set(value),\n isMovable,\n canMove: canMoveColumn,\n move: moveColumnBy,\n drop: dropColumnOn,\n drag: drag.asReadonly(),\n setDrag: (value) => drag.set(value),\n },\n columnWidths: computed(() => layout().widths),\n rootRef,\n viewportRef,\n exportCsv,\n copySelection,\n onGridKeyDown,\n activate,\n primaryColumnId: primaryId,\n };\n}\n","import {\n Directive,\n ElementRef,\n Renderer2,\n effect,\n inject,\n input,\n type Signal,\n} from \"@angular/core\";\nimport type { ElementProps, TableStyle } from \"@ui-organized/table-core\";\n\n/**\n * Core's prop bags, applied to a real element.\n *\n * ── Why this directive exists ───────────────────────────────────────────────\n *\n * `@ui-organized/table-core` decides every class name, ARIA attribute and sticky\n * offset in one framework-free place and hands each back as a plain object — and\n * the other three adapters just spread it: `{...getCellProps(cell)}`. Angular\n * templates have no spread. Without this, eleven prop builders would have to be\n * unpacked field by field at thirty-odd call sites, and every field a builder\n * gained later would be silently missing from whichever sites nobody updated.\n *\n * So the spread becomes a directive, and the call site stays one binding:\n *\n * ```html\n * <td [uioTableProps]=\"cellProps()\">…</td>\n * ```\n *\n * ── Why it diffs rather than assigns ────────────────────────────────────────\n *\n * These bags change shape, not just value: a cell that stops being focused loses\n * `data-focus` entirely rather than setting it to `false`, and core is deliberate\n * about that — `stateFlag`'s whole point is that the stylesheet selects on\n * presence. So the previous keys are remembered and the ones that went away are\n * removed. Assigning only what is present would leave a stale `data-focus` on\n * every cell the cursor ever visited.\n *\n * ── Numeric lengths get `px` ────────────────────────────────────────────────\n *\n * React appends the unit for us and nothing else does. A column width of `180`\n * reaching the DOM as `width:180` is not a length, so the column falls back to\n * auto and the whole `table-layout: fixed` contract comes apart — invisible to\n * the parity gate, which does not compare `style`, and obvious the moment anyone\n * looks at the table. `@ui-organized/vue-table` found this the hard way.\n */\n\n/** The one property in core's `TableStyle` whose numbers are not lengths. */\nconst UNITLESS = new Set<keyof TableStyle>([\"zIndex\"]);\n\nconst CAMEL = /[A-Z]/g;\nconst kebab = (key: string) => key.replace(CAMEL, (letter) => `-${letter.toLowerCase()}`);\n\nfunction styleValue(key: string, value: string | number): string {\n return typeof value === \"number\" && !UNITLESS.has(key as keyof TableStyle)\n ? `${value}px`\n : String(value);\n}\n\n/**\n * The keys that are *properties* on the element rather than attributes.\n *\n * `tabIndex` and `colSpan` reach the DOM under different names than they are\n * written in, and `hidden` is a boolean attribute whose presence is the value.\n */\nfunction attributeName(key: string): string {\n if (key === \"tabIndex\") return \"tabindex\";\n if (key === \"colSpan\") return \"colspan\";\n return key;\n}\n\ninterface Applied {\n attributes: Set<string>;\n styles: Set<string>;\n}\n\nexport function applyElementProps(\n element: HTMLElement,\n renderer: Renderer2,\n props: ElementProps,\n previous: Applied,\n): Applied {\n const attributes = new Set<string>();\n const styles = new Set<string>();\n\n for (const [key, raw] of Object.entries(props)) {\n if (raw === undefined) continue;\n // `false` is a real value for an ARIA attribute and the absence of one for\n // every other kind. See the `aria-` branch below.\n if (raw === false && !key.startsWith(\"aria-\")) continue;\n if (key === \"className\") {\n renderer.setAttribute(element, \"class\", String(raw));\n attributes.add(\"class\");\n continue;\n }\n if (key === \"style\") {\n for (const [property, value] of Object.entries(raw as TableStyle)) {\n if (value === undefined) continue;\n renderer.setStyle(element, kebab(property), styleValue(property, value));\n styles.add(kebab(property));\n }\n continue;\n }\n const name = attributeName(key);\n /**\n * ARIA booleans are *enumerated*, not presence.\n *\n * `aria-selected=\"true\"` and `aria-selected=\"false\"` are two different\n * answers, and `aria-selected=\"\"` is neither — it is invalid, and a screen\n * reader falls back to \"not selected\" for a row that is. So an `aria-`\n * attribute is always stringified, `false` included, which is also exactly\n * what React does with one.\n *\n * Every other boolean attribute is the opposite: presence *is* the value, so\n * `true` writes an empty string and `false` was dropped above. That is what\n * core's own `stateFlag` produces for the other three libraries.\n */\n const value = key.startsWith(\"aria-\") ? String(raw) : raw === true ? \"\" : String(raw);\n renderer.setAttribute(element, name, value);\n attributes.add(name);\n }\n\n for (const name of previous.attributes) {\n if (!attributes.has(name)) renderer.removeAttribute(element, name);\n }\n for (const property of previous.styles) {\n if (!styles.has(property)) renderer.removeStyle(element, property);\n }\n\n return { attributes, styles };\n}\n\n@Directive({\n selector: \"[uioTableProps]\",\n standalone: true,\n})\nexport class UioTableProps {\n readonly props: Signal<ElementProps> = input.required<ElementProps>({ alias: \"uioTableProps\" });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n private applied: Applied = { attributes: new Set(), styles: new Set() };\n\n constructor() {\n effect(() => {\n this.applied = applyElementProps(\n this.host.nativeElement,\n this.renderer,\n this.props(),\n this.applied,\n );\n });\n }\n}\n","import { Directive, ElementRef, effect, inject, input, type WritableSignal } from \"@angular/core\";\n\n/**\n * Hand an element to a signal when it mounts, and `null` when it goes.\n *\n * React takes a callback ref for the root and the viewport; Vue binds a template\n * ref and watches it; Svelte uses an action. Angular has neither a per-element\n * ref callback nor a `viewChild` that can reach a **projected** node — and the\n * viewport is projected, because `<uio-table-viewport>` is written by the caller\n * inside `<uio-table>`. Writing into the api's own signal is what makes the\n * node's arrival reactive, which the resize and scroll observers need.\n *\n * ```html\n * <div [uioTableElementRef]=\"table.rootRef\">\n * ```\n */\n@Directive({\n selector: \"[uioTableElementRef]\",\n standalone: true,\n})\nexport class UioTableElementRef {\n readonly target = input.required<WritableSignal<HTMLElement | null>>({\n alias: \"uioTableElementRef\",\n });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n effect((onCleanup) => {\n const target = this.target();\n target.set(this.host.nativeElement);\n onCleanup(() => target.set(null));\n });\n }\n}\n","import { Directive, ElementRef, Renderer2, effect, inject, type Signal } from \"@angular/core\";\nimport type { ElementProps } from \"@ui-organized/table-core\";\nimport { applyElementProps } from \"./element-props.js\";\n\n/**\n * A part that applies core's prop bag to **its own host element**.\n *\n * `UioTableProps` is the directive for the ordinary case — a plain element in\n * someone's template, `<td [uioTableProps]=\"…\">`. It cannot serve a component\n * that computes its own props, because `hostDirectives` exposes the input for\n * *binding* and a component has no way to bind an input to itself.\n *\n * So the parts that own their props extend this instead. Subclasses declare\n * `tableProps` as a `computed` and the effect below keeps the host in step,\n * diffing exactly as the directive does — see `applyElementProps` for why\n * diffing rather than assigning is load-bearing.\n */\n@Directive()\nexport abstract class UioTablePropsHost {\n /** The bag this part puts on its own host element. */\n protected abstract readonly tableProps: Signal<ElementProps>;\n\n private readonly propsHost = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly propsRenderer = inject(Renderer2);\n\n constructor() {\n let applied = { attributes: new Set<string>(), styles: new Set<string>() };\n effect(() => {\n applied = applyElementProps(\n this.propsHost.nativeElement,\n this.propsRenderer,\n this.tableProps(),\n applied,\n );\n });\n }\n}\n","import { Component, computed, input } from \"@angular/core\";\nimport { FlexRender } from \"@tanstack/angular-table\";\nimport { UioIcon } from \"@ui-organized/angular\";\nimport {\n alignOf,\n dropSideAt,\n getHeadCellProps,\n getResizeHandleProps,\n metaOf,\n resizeKeyDown,\n stickyPositionOf,\n type RowData,\n type TableHeaderInstance,\n type TableInstance,\n} from \"@ui-organized/table-core\";\nimport { UioTablePropsHost } from \"../core/table-props-host.js\";\nimport { injectDataTable } from \"../core/table-context.js\";\nimport { internalGlyph as glyph } from \"@ui-organized/angular\";\n\n/**\n * Pointer drag and keyboard, on one control.\n *\n * The drag is TanStack's own handler; the keyboard is core's `resizeKeyDown`, so\n * the two cannot drift. It is a `role=\"separator\"` with `aria-valuenow`, which is\n * what makes the column width something a screen reader can report rather than\n * something only a mouse can discover.\n */\n@Component({\n selector: \"button[uioTableResizeHandle]\",\n standalone: true,\n host: {\n type: \"button\",\n \"(mousedown)\": \"startResize($event)\",\n \"(touchstart)\": \"startResize($event)\",\n \"(click)\": \"$event.stopPropagation()\",\n \"(keydown)\": \"onKeyDown($event)\",\n },\n template: \"\",\n})\nexport class UioTableResizeHandle<T extends RowData> extends UioTablePropsHost {\n readonly header = input.required<TableHeaderInstance<T>>();\n\n protected readonly table = injectDataTable<T>();\n private readonly column = computed(() => this.header().column);\n\n private readonly bounds = computed(() => {\n const width = this.column().getSize();\n return {\n width,\n min: this.column().columnDef.minSize ?? 0,\n max: this.column().columnDef.maxSize ?? width,\n };\n });\n\n /** Applied to this button by `UioTablePropsHost`. */\n protected readonly tableProps = computed(() => {\n const headerDef = this.column().columnDef.header;\n const bounds = this.bounds();\n return getResizeHandleProps({\n columnId: this.column().id,\n columnLabel: typeof headerDef === \"string\" ? headerDef : this.column().id,\n width: bounds.width,\n min: bounds.min,\n max: bounds.max,\n active: this.column().getIsResizing(),\n });\n });\n\n /** Stops the header's sort button from firing on the same press. */\n protected startResize(event: MouseEvent | TouchEvent): void {\n event.stopPropagation();\n this.header().getResizeHandler()(event);\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n const action = resizeKeyDown(this.bounds(), {\n key: event.key,\n shift: event.shiftKey,\n ctrl: event.ctrlKey,\n meta: event.metaKey,\n });\n if (action.type === \"none\") return;\n event.preventDefault();\n event.stopPropagation();\n const id = this.column().id;\n if (action.type === \"reset\") {\n this.table.table.setColumnSizing((old: Record<string, number>) => {\n const next = { ...old };\n delete next[id];\n return next;\n });\n return;\n }\n this.table.table.setColumnSizing((old: Record<string, number>) => ({\n ...old,\n [id]: action.width,\n }));\n }\n}\n\n/** One header cell: the sort control, the roving tab stop, and the resize grip. */\n@Component({\n selector: \"th[uioTableHeadCell]\",\n standalone: true,\n imports: [FlexRender, UioIcon, UioTableResizeHandle],\n host: {\n \"[attr.data-cell]\": \"'-1:' + index()\",\n \"[attr.tabindex]\": \"tabIndex()\",\n \"(focus)\": \"onFocus()\",\n // The whole header is a drop target; only its label area (in the\n // template) is a drag source.\n \"[attr.data-dragging]\": \"dragging() ? '' : null\",\n \"[attr.data-drop]\": \"dropSide() ?? null\",\n \"(dragover)\": \"onDragOver($event)\",\n \"(drop)\": \"onDrop($event)\",\n },\n template: `\n <!--\n The drag source is the label area, not the <th>: with the <th>\n draggable, pressing the resize handle started a native drag that took\n the pointer away from the resize. The handle sits outside this element.\n -->\n <div\n class=\"data-table__head-inner\"\n [attr.draggable]=\"movable() ? 'true' : null\"\n (dragstart)=\"onDragStart($event)\"\n (dragend)=\"onDragEnd()\"\n >\n <!--\n The roving tabindex covers the header row too, so ArrowUp out of the\n first body row lands somewhere focusable and Enter sorts from there.\n Inner controls are not their own tab stops in a grid; the cell is.\n -->\n @if (sortable()) {\n <button\n type=\"button\"\n class=\"data-table__sort-button\"\n [attr.tabindex]=\"interactive() ? -1 : null\"\n (click)=\"toggleSort($event)\"\n >\n <span class=\"data-table__head-label\">\n @if (!header().isPlaceholder) {\n <ng-container *flexRenderHeader=\"header(); let rendered\">{{ rendered }}</ng-container>\n }\n </span>\n @if (editable()) {\n <!--\n The pencil, and the words with it: as part of the column header,\n \", editable\" is announced with every cell in the column.\n -->\n <span class=\"data-table__edit-icon\">\n <span uioIcon [name]=\"glyph('edit')\" [size]=\"14\"></span>\n <span class=\"data-table__sr-only\">, editable</span>\n </span>\n }\n <span class=\"data-table__sort-icon\">\n <span uioIcon [name]=\"sortIcon()\" [size]=\"14\"></span>\n </span>\n </button>\n } @else {\n <span class=\"data-table__head-label\">\n @if (!header().isPlaceholder) {\n <ng-container *flexRenderHeader=\"header(); let rendered\">{{ rendered }}</ng-container>\n }\n </span>\n @if (editable()) {\n <!--\n The pencil, and the words with it: as part of the column header,\n \", editable\" is announced with every cell in the column.\n -->\n <span class=\"data-table__edit-icon\">\n <span uioIcon [name]=\"glyph('edit')\" [size]=\"14\"></span>\n <span class=\"data-table__sr-only\">, editable</span>\n </span>\n }\n }\n @if (movable()) {\n <!--\n Left and right, for a column that can be moved: the click-and-keyboard\n half of dragging the header. In an interactive grid they are not tab\n stops, like every control inside a cell; Alt+Arrow on the focused\n header is the keyboard route there.\n -->\n <span class=\"data-table__move\" [attr.data-mode]=\"table.reorder.mode()\">\n <button\n #moveLeft\n type=\"button\"\n class=\"data-table__move-button\"\n [attr.aria-label]=\"'Move ' + headerText() + ' left'\"\n [disabled]=\"!table.reorder.canMove(column().id, -1)\"\n [attr.tabindex]=\"interactive() ? -1 : null\"\n (click)=\"pressMove(-1, $event, moveLeft, moveRight)\"\n >\n <span uioIcon [name]=\"glyph('chevron-left')\" [size]=\"16\"></span>\n </button>\n <button\n #moveRight\n type=\"button\"\n class=\"data-table__move-button\"\n [attr.aria-label]=\"'Move ' + headerText() + ' right'\"\n [disabled]=\"!table.reorder.canMove(column().id, 1)\"\n [attr.tabindex]=\"interactive() ? -1 : null\"\n (click)=\"pressMove(1, $event, moveRight, moveLeft)\"\n >\n <span uioIcon [name]=\"glyph('chevron-right')\" [size]=\"16\"></span>\n </button>\n </span>\n }\n </div>\n @if (column().getCanResize()) {\n <button uioTableResizeHandle [header]=\"header()\"></button>\n }\n `,\n})\nexport class UioTableHeadCell<T extends RowData> extends UioTablePropsHost {\n protected readonly glyph = glyph;\n readonly header = input.required<TableHeaderInstance<T>>();\n readonly index = input.required<number>();\n\n protected readonly table = injectDataTable<T>();\n protected readonly column = computed(() => this.header().column);\n protected readonly sortable = computed(() => this.column().getCanSort());\n protected readonly sorted = computed(() => this.column().getIsSorted());\n protected readonly interactive = computed(() => this.table.interactive());\n protected readonly editable = computed(() => Boolean(metaOf<T>(this.column().columnDef)?.edit));\n protected readonly sortIcon = computed(() =>\n this.sorted() === \"desc\" ? \"sort-desc\" : \"sort-asc\",\n );\n\n private readonly focused = computed(() => {\n const cursor = this.table.focus.cursor();\n return this.interactive() && cursor.row === -1 && cursor.col === this.index();\n });\n\n protected readonly tabIndex = computed(() =>\n this.interactive() ? (this.focused() ? 0 : -1) : null,\n );\n\n /** Applied to this `<th>` by `UioTablePropsHost`. */\n protected readonly tableProps = computed(() =>\n getHeadCellProps({\n columnId: this.column().id,\n index: this.index(),\n align: alignOf(this.column().columnDef),\n sortable: this.sortable(),\n sortDirection: this.sorted() === false ? false : (this.sorted() as \"asc\" | \"desc\"),\n sticky: stickyPositionOf(this.table.table as unknown as TableInstance<T>, this.column()),\n resizing: this.column().getIsResizing(),\n interactive: this.interactive(),\n editable: this.editable(),\n }),\n );\n\n protected onFocus(): void {\n if (this.interactive()) this.table.focus.setCursor({ row: -1, col: this.index() });\n }\n\n // ── Column reordering ─────────────────────────────────────────────────────\n\n protected readonly movable = computed(\n () => this.table.reorder.active() && this.table.reorder.isMovable(this.column().id),\n );\n protected readonly headerText = computed(() => {\n const header = this.column().columnDef.header;\n return typeof header === \"string\" ? header : this.column().id;\n });\n protected readonly dragging = computed(\n () => this.table.reorder.drag()?.source === this.column().id,\n );\n protected readonly dropSide = computed(() => {\n const drag = this.table.reorder.drag();\n const id = this.column().id;\n return drag && drag.target === id && drag.source !== id ? drag.side : undefined;\n });\n\n protected onDragStart(event: DragEvent): void {\n if (!this.movable()) return;\n const origin = event.target as Element | null;\n if (origin?.closest(\".data-table__move\")) {\n event.preventDefault();\n return;\n }\n if (event.dataTransfer) {\n event.dataTransfer.effectAllowed = \"move\";\n event.dataTransfer.setData(\"text/plain\", this.column().id);\n }\n this.table.reorder.setDrag({ source: this.column().id, target: null, side: \"before\" });\n }\n\n protected onDragOver(event: DragEvent): void {\n const drag = this.table.reorder.drag();\n if (!this.movable() || !drag) return;\n event.preventDefault();\n if (event.dataTransfer) event.dataTransfer.dropEffect = \"move\";\n const side = dropSideAt(\n event.clientX,\n (event.currentTarget as HTMLElement).getBoundingClientRect(),\n );\n const id = this.column().id;\n if (drag.target !== id || drag.side !== side) {\n this.table.reorder.setDrag({ ...drag, target: id, side });\n }\n }\n\n protected onDrop(event: DragEvent): void {\n const drag = this.table.reorder.drag();\n if (!this.movable() || !drag) return;\n event.preventDefault();\n const side = dropSideAt(\n event.clientX,\n (event.currentTarget as HTMLElement).getBoundingClientRect(),\n );\n this.table.reorder.drop(drag.source, this.column().id, side);\n this.table.reorder.setDrag(null);\n }\n\n protected onDragEnd(): void {\n if (this.movable()) this.table.reorder.setDrag(null);\n }\n\n /**\n * Re-rendering in the new order moves this header's DOM node, and a moved\n * node drops focus. Put it back on the same button — or on the other one,\n * when this move took the column to the end it pointed at. Only after a\n * keyboard press: a mouse click does not leave focus on the button.\n */\n protected pressMove(\n direction: -1 | 1,\n event: MouseEvent,\n own: HTMLButtonElement,\n other: HTMLButtonElement,\n ): void {\n const hadFocus = document.activeElement === event.currentTarget;\n this.table.reorder.move(this.column().id, direction);\n if (!hadFocus || typeof requestAnimationFrame !== \"function\") return;\n requestAnimationFrame(() => (own.disabled ? other : own).focus());\n }\n\n protected toggleSort(event: Event): void {\n this.column().getToggleSortingHandler()?.(event);\n }\n}\n","import { Component, computed, effect, inject } from \"@angular/core\";\nimport { HostPresence, UioButton } from \"@ui-organized/angular\";\nimport { selectHiddenLabel, selectionCountLabel } from \"@ui-organized/table-core\";\nimport { injectDataTable } from \"../core/table-context.js\";\n\n/**\n * Under the rows: how many are selected, and the offer to select the matching\n * rows that are not on screen.\n *\n * At the bottom rather than in the toolbar, because that is where the user's\n * eye is once they have ticked down a page — and where the visible rows run\n * out is where \"there are more of these\" belongs. The bulk actions stay in the\n * toolbar (see `UioTableSelectionBar`).\n *\n * The offer is a real button, and counts the rows it would *add*: \"Select\n * 99,981 hidden rows\" says plainly that the ticks so far only reached what was\n * visible.\n */\n@Component({\n selector: \"div[uioTableSelectionFooter]\",\n standalone: true,\n providers: [HostPresence],\n imports: [UioButton],\n // The host is the footer itself, so this is one element, as React's single\n // `div.data-table__selection-footer` is.\n host: { class: \"data-table__selection-footer\" },\n template: `\n @if (count() > 0) {\n <!-- Announced on change: ticking a row changes nothing else a screen\n reader user would hear. -->\n <span class=\"data-table__selection-count\" aria-live=\"polite\">{{ countLabel() }}</span>\n\n @if (table.selection.canSelectAllMatching()) {\n <button\n uioButton\n [size]=\"table.size()\"\n intent=\"secondary\"\n (click)=\"table.selection.selectAllMatching()\"\n >\n {{ hiddenLabel() }}\n </button>\n }\n }\n `,\n})\nexport class UioTableSelectionFooter {\n private readonly presence = inject(HostPresence);\n\n constructor() {\n // A footer that renders nothing must not hold a row of layout: React\n // returns null, and an Angular host element cannot — so it takes itself\n // out of the DOM and puts itself back. See HostPresence.\n effect(() => this.presence.set(this.count() > 0));\n }\n\n protected readonly table = injectDataTable();\n protected readonly count = computed(() => this.table.selection.count());\n protected readonly countLabel = computed(() => selectionCountLabel(this.count()));\n protected readonly hiddenLabel = computed(() =>\n selectHiddenLabel(this.table.selection.totalMatching(), this.count()),\n );\n}\n","import { Component, ElementRef, computed, effect, inject, input, type Signal } from \"@angular/core\";\nimport { FlexRender } from \"@tanstack/angular-table\";\nimport {\n alignOf,\n getCellProps,\n getRowProps,\n metaOf,\n stickyPositionOf,\n type RowData,\n type TableCellInstance,\n type TableInstance,\n type TableRowModel,\n} from \"@ui-organized/table-core\";\nimport { UioTablePropsHost } from \"../core/table-props-host.js\";\nimport { injectDataTable } from \"../core/table-context.js\";\n\n/**\n * One cell.\n *\n * The identifying column is a real row header, which is what makes a screen\n * reader announce \"Ada Lovelace, Role, Engineer\" instead of just \"Engineer\" —\n * so the row picks `th` or `td` and this decorates whichever it wrote. Angular\n * has no dynamic element by name, and a component selector that matched both\n * would be two selectors on one class, so the tag choice lives in the row's\n * template and the behaviour lives here.\n */\n@Component({\n selector: \"[uioTableCell]\",\n standalone: true,\n imports: [FlexRender],\n host: {\n \"[attr.data-cell]\": \"rowIndex() + ':' + index()\",\n \"(focus)\": \"onFocus()\",\n \"(click)\": \"onClick($event)\",\n },\n template: `\n @if (editing()) {\n <span class=\"data-table__editor\" #editor>\n <ng-container *ngTemplateOutlet=\"editorTemplate()\" />\n </span>\n } @else {\n <ng-container *flexRenderCell=\"cell(); let rendered\">{{ rendered }}</ng-container>\n }\n `,\n})\nexport class UioTableCell<T extends RowData> extends UioTablePropsHost {\n readonly cell = input.required<TableCellInstance<T>>();\n readonly row = input.required<TableRowModel<T>>();\n readonly index = input.required<number>();\n readonly rowIndex = input.required<number>();\n readonly primary = input.required<boolean>();\n\n protected readonly table = injectDataTable<T>();\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n protected readonly column = computed(() => this.cell().column);\n private readonly meta = computed(() => metaOf<T>(this.column().columnDef));\n private readonly editable = computed(() => Boolean(this.meta()?.edit));\n\n protected readonly editing = computed(() =>\n this.table.edit.contextFor(this.row(), this.column().id),\n );\n\n private readonly focused = computed(() => {\n const cursor = this.table.focus.cursor();\n return cursor.row === this.rowIndex() && cursor.col === this.index();\n });\n\n /** Applied to this cell by `UioTablePropsHost`. */\n protected readonly tableProps = computed(() =>\n getCellProps({\n columnId: this.column().id,\n index: this.index(),\n align: alignOf(this.column().columnDef),\n primary: this.primary(),\n sticky: stickyPositionOf(this.table.table as unknown as TableInstance<T>, this.column()),\n focused: this.focused(),\n editable: this.editable(),\n editing: Boolean(this.editing()),\n invalid: Boolean(this.editing()?.invalid),\n interactive: this.table.interactive(),\n }),\n );\n\n protected readonly editorTemplate: Signal<unknown> = computed(() => {\n const context = this.editing();\n return context ? this.meta()?.edit?.render(context) : null;\n });\n\n constructor() {\n super();\n /**\n * The editor's mount focus, which is the package's job rather than the\n * consumer's: `meta.edit.render` returns whatever control the consumer\n * likes, and most of the library's controls do not expose their inner\n * `<input>`. React and Vue put this in a `CellEditor` component so the hook\n * exists only while editing; here the same guard is the `if` below.\n */\n effect(() => {\n if (!this.editing()) return;\n queueMicrotask(() => {\n const focusable = this.host.nativeElement.querySelector<HTMLElement>(\n '.data-table__editor input:not([type=\"hidden\"]), .data-table__editor textarea, .data-table__editor select, .data-table__editor [contenteditable=\"true\"]',\n );\n focusable?.focus();\n if (focusable instanceof HTMLInputElement) focusable.select();\n });\n });\n }\n\n protected onFocus(): void {\n if (this.table.interactive()) {\n this.table.focus.setCursor({ row: this.rowIndex(), col: this.index() });\n }\n }\n\n /**\n * One click opens the editor. The click stops here either way: it must not\n * also activate the row (open its detail sheet), and a click *inside* the open\n * editor must not restart the edit and throw the draft away.\n */\n protected onClick(event: Event): void {\n if (!this.editable()) return;\n event.stopPropagation();\n if (!this.editing()) this.table.edit.start(this.row(), this.column().id);\n }\n}\n\n/**\n * One row.\n *\n * React memoizes this on a hand-written nine-field comparator, and threads every\n * value it needs through props so the comparator can see them. Angular needs\n * neither: a signal-driven template updates only what changed, so the row takes\n * what genuinely *varies per row* as inputs and reads the rest from the\n * injector.\n */\n@Component({\n selector: \"tr[uioTableRow]\",\n standalone: true,\n imports: [UioTableCell],\n host: {\n \"[attr.data-index]\": \"index()\",\n \"(click)\": \"table.activate(row())\",\n },\n template: `\n @for (cell of cells(); track cell.id; let colIndex = $index) {\n @if (cell.column.id === table.primaryColumnId()) {\n <th\n uioTableCell\n scope=\"row\"\n [cell]=\"cell\"\n [row]=\"row()\"\n [index]=\"colIndex\"\n [rowIndex]=\"index()\"\n [primary]=\"true\"\n ></th>\n } @else {\n <td\n uioTableCell\n [cell]=\"cell\"\n [row]=\"row()\"\n [index]=\"colIndex\"\n [rowIndex]=\"index()\"\n [primary]=\"false\"\n ></td>\n }\n }\n `,\n})\nexport class UioTableRow<T extends RowData> extends UioTablePropsHost {\n readonly row = input.required<TableRowModel<T>>();\n readonly index = input.required<number>();\n readonly absoluteIndex = input.required<number>();\n\n protected readonly table = injectDataTable<T>();\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n protected readonly cells = computed(() => this.row().getVisibleCells());\n\n /** Applied to this `<tr>` by `UioTablePropsHost`. */\n protected readonly tableProps = computed(() =>\n getRowProps({\n rowId: this.row().id,\n index: this.absoluteIndex(),\n selected: this.table.selection.isSelected(this.row().id),\n editing: this.table.edit.state().target?.rowId === this.row().id,\n selectable: this.table.selection.mode() !== \"none\",\n interactive: this.table.interactive(),\n clickable: Boolean(this.table.options.onRowClick) || Boolean(this.table.options.detail),\n }),\n );\n\n constructor() {\n super();\n /**\n * The virtualizer measures the real row rather than trusting the estimate,\n * so a re-themed row height corrects itself on the first frame. Angular has\n * no per-element ref callback, so the row measures itself.\n */\n effect(() => {\n if (this.table.virtual.enabled()) {\n this.table.virtual.virtualizer().measureElement(this.host.nativeElement);\n }\n });\n }\n}\n","import { Component, computed, input } from \"@angular/core\";\nimport { UioSkeleton } from \"@ui-organized/angular\";\nimport { injectDataTable } from \"../core/table-context.js\";\n\n/**\n * Empty, loading and error all live *inside* `<tbody>` rather than replacing the\n * table.\n *\n * Keeping the header on screen keeps the column widths, the scroll position and\n * the filter controls exactly where they were — so clearing a filter that\n * emptied the table does not also move every control the user was about to\n * click.\n */\n@Component({\n selector: \"tr[uioTableEmpty]\",\n standalone: true,\n host: { class: \"data-table__row\" },\n template: `\n <td class=\"data-table__state-cell\" [attr.colspan]=\"table.chrome().colCount\">\n <div class=\"data-table__state\">\n <span class=\"data-table__state-title\">{{ heading() }}</span>\n @if (detail(); as text) {\n <span class=\"data-table__state-description\">{{ text }}</span>\n }\n <div class=\"data-table__state-actions\"><ng-content /></div>\n </div>\n </td>\n `,\n})\nexport class UioTableEmpty {\n readonly title = input<string | undefined>(undefined);\n readonly description = input<string | undefined>(undefined);\n\n protected readonly table = injectDataTable();\n protected readonly heading = computed(\n () => this.title() ?? this.table.options.empty?.title ?? \"Nothing to show\",\n );\n protected readonly detail = computed(\n () => this.description() ?? this.table.options.empty?.description,\n );\n}\n\n/**\n * Skeleton rows sized to the real row height, so the table does not resize when\n * the data lands — which is the entire reason to prefer a skeleton to a spinner.\n * (There is no Spinner in the library, which settles it anyway.)\n */\n@Component({\n selector: \"[uioTableLoading]\",\n standalone: true,\n imports: [UioSkeleton],\n template: `\n @for (index of bars(); track index) {\n <tr class=\"data-table__row\" aria-hidden=\"true\">\n @for (column of columns(); track column.id) {\n <td class=\"data-table__skeleton-cell\">\n <!--\n Varied but deterministic: identical bars read as a progress bar,\n and a random width changes on every render.\n -->\n <span\n uioSkeleton\n variant=\"text\"\n [width]=\"widthFor(column.id)\"\n [height]=\"barHeight()\"\n ></span>\n </td>\n }\n </tr>\n }\n `,\n})\nexport class UioTableLoading {\n readonly rows = input(8);\n\n protected readonly table = injectDataTable();\n protected readonly columns = computed(() => this.table.table.getVisibleLeafColumns());\n protected readonly bars = computed(() =>\n Array.from({ length: this.rows() }, (_, index) => index),\n );\n protected readonly barHeight = computed(() => (this.table.size() === \"sm\" ? 10 : 12));\n\n protected widthFor(columnId: string): string {\n return `${55 + ((columnId.length * 7) % 35)}%`;\n }\n}\n\n@Component({\n selector: \"tr[uioTableError]\",\n standalone: true,\n host: { class: \"data-table__row\" },\n template: `\n <td class=\"data-table__state-cell\" [attr.colspan]=\"table.chrome().colCount\">\n <!--\n \"alert\" rather than a plain region: the error arrives after the user has\n moved on, so it has to announce itself.\n -->\n <div class=\"data-table__state data-table__state--error\" role=\"alert\">\n <span class=\"data-table__state-title\">{{ title() }}</span>\n @if (message(); as text) {\n <span class=\"data-table__state-description\">{{ text }}</span>\n }\n </div>\n </td>\n `,\n})\nexport class UioTableError {\n readonly title = input(\"Could not load this table\");\n\n protected readonly table = injectDataTable();\n /** The table's `error` option, when it is a plain string. */\n protected readonly message = computed(() => {\n const error = this.table.options.error;\n return typeof error === \"string\" || typeof error === \"number\" ? String(error) : undefined;\n });\n}\n","import { Component, Directive, ElementRef, computed, effect, inject } from \"@angular/core\";\nimport {\n getCaptionProps,\n getColProps,\n getHeaderRowProps,\n getRootProps,\n getSpacerProps,\n getTableProps,\n getViewportProps,\n} from \"@ui-organized/table-core\";\nimport { UioTableProps } from \"../core/element-props.js\";\nimport { UioTablePropsHost } from \"../core/table-props-host.js\";\nimport { injectDataTable } from \"../core/table-context.js\";\nimport { UioTableHeadCell } from \"./table-head-cell.js\";\nimport { UioTableSelectionFooter } from \"./table-selection-footer.js\";\nimport { UioTableRow } from \"./table-row.js\";\nimport { UioTableEmpty, UioTableError, UioTableLoading } from \"./table-states.js\";\n\n/**\n * The parts, flat-exported — `UioTableHeader`, not `Table.Header`. That is the\n * repo's convention everywhere else (`UioDialogContent`, `UioMenuItem`) and\n * there is no reason for the table to be the exception.\n *\n * The DOM they compose to:\n *\n * <div uioTable> class=\"data-table\" root, size + variant\n * <div uioTableToolbar> …\n * <div uioTableViewport> class=\"data-table__viewport\", then <table>\n * <thead uioTableHeader>\n * <tbody uioTableBody> spacer / rows / spacer\n * <div uioTablePagination>\n *\n * ── Why every part is an attribute directive ────────────────────────────────\n *\n * `@ui-organized/angular` puts its components on the caller's own element\n * (`<button uioButton>`, `<span uioChip>`) rather than on a custom element, and\n * the table has two reasons of its own to do the same. A custom element between\n * `<table>` and `<thead>` is invalid HTML — the browser hoists the `<thead>`\n * straight back out — so `<uio-table-header>` cannot exist at all. And anywhere\n * else, a host element is a DOM node the other three libraries do not render,\n * which the parity gate reports as a difference on every case.\n *\n * So the caller writes the element and the part decorates it. Each one also\n * binds core's prop bag through `UioTablePropsHost` rather than unpacking it\n * field by field — see `../core/element-props.ts` for why that is the whole of\n * Angular's \"no prop spread\" cost.\n */\n\n/** The root: size, variant, and the element every part measures itself against. */\n@Directive({\n selector: \"div[uioTable]\",\n standalone: true,\n})\nexport class UioTable extends UioTablePropsHost {\n protected readonly table = injectDataTable();\n protected readonly tableProps = computed(() => getRootProps(this.table.chrome()));\n\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n super();\n // What a callback ref does in React and an action does in Svelte. The\n // responsive watcher is an effect that re-runs when this arrives.\n effect((onCleanup) => {\n this.table.rootRef.set(this.element.nativeElement);\n onCleanup(() => this.table.rootRef.set(null));\n });\n }\n}\n\n/**\n * The scroll container and the `<table>` element, which are inseparable: a\n * viewport with two tables in it means nothing, and `<caption>` and `<colgroup>`\n * have to be emitted between them.\n */\n@Component({\n selector: \"div[uioTableViewport]\",\n standalone: true,\n imports: [UioTableProps, UioTableSelectionFooter],\n template: `\n <!--\n One key handler for the whole grid rather than one per cell: the cursor is\n table state, so the key only has to reach the table. It sits on the element\n that carries \"role=grid\", not on the scroll container — which is also what\n stops it being a keyboard handler on a div with no role at all.\n -->\n <table [uioTableProps]=\"tableAttrs()\" (keydown)=\"onKeyDown($event)\">\n <!-- First child of table, per the content model. -->\n <caption [uioTableProps]=\"caption()\">\n {{\n table.label()\n }}\n </caption>\n <colgroup>\n @for (column of columns(); track column.id) {\n <col [uioTableProps]=\"colProps(column.id)\" />\n }\n </colgroup>\n <ng-content />\n </table>\n <!--\n After the table, inside the scroll container: it sticks to the viewport's\n bottom edge, so it costs a capped table scroll length rather than page\n height.\n -->\n <div uioTableSelectionFooter></div>\n `,\n})\nexport class UioTableViewport extends UioTablePropsHost {\n protected readonly table = injectDataTable();\n protected readonly tableProps = computed(() => {\n const props = getViewportProps(this.table.chrome());\n const cap = this.table.options.maxHeight;\n if (cap === undefined) return props;\n // The max height rides in on the same bag rather than a second binding, so\n // the diffing in `applyElementProps` owns every attribute on this element.\n return { ...props, style: { ...props.style, maxHeight: cap } };\n });\n\n protected readonly tableAttrs = computed(() => getTableProps(this.table.chrome()));\n protected readonly caption = computed(() => getCaptionProps(this.table.captionVisible()));\n protected readonly columns = computed(() => this.table.table.getVisibleLeafColumns());\n\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n super();\n effect((onCleanup) => {\n this.table.viewportRef.set(this.element.nativeElement);\n onCleanup(() => this.table.viewportRef.set(null));\n });\n }\n\n protected colProps(columnId: string) {\n return getColProps(this.table.columnWidths()[columnId]);\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (this.table.interactive()) this.table.onGridKeyDown(event);\n }\n}\n\n@Component({\n selector: \"thead[uioTableHeader]\",\n standalone: true,\n imports: [UioTableProps, UioTableHeadCell],\n host: { class: \"data-table__head\" },\n template: `\n @for (group of groups(); track group.id) {\n <tr [uioTableProps]=\"rowProps\">\n @for (header of group.headers; track header.id; let index = $index) {\n <th uioTableHeadCell [header]=\"header\" [index]=\"index\"></th>\n }\n </tr>\n }\n `,\n})\nexport class UioTableHeader {\n protected readonly table = injectDataTable();\n protected readonly groups = computed(() => this.table.table.getHeaderGroups());\n protected readonly rowProps = getHeaderRowProps();\n}\n\n/**\n * The body, and the four states it decides between on its own.\n *\n * Projected content wins: layer-2 composition is the point of these parts.\n * Otherwise `<tbody uioTableBody>` alone is a complete table body — the error,\n * the loading skeleton, the empty state and the rows are all its business.\n */\n@Component({\n selector: \"tbody[uioTableBody]\",\n standalone: true,\n imports: [UioTableProps, UioTableRow, UioTableEmpty, UioTableError, UioTableLoading],\n host: { class: \"data-table__body\" },\n template: `\n @switch (state()) {\n @case (\"error\") {\n <tr uioTableError></tr>\n }\n @case (\"loading\") {\n <ng-container uioTableLoading />\n }\n @case (\"empty\") {\n <tr uioTableEmpty></tr>\n }\n @default {\n @if (spacers().top > 0) {\n <tr [uioTableProps]=\"spacerRow(spacers().top)\">\n <td [uioTableProps]=\"spacerCell(spacers().top)\"></td>\n </tr>\n }\n @for (entry of table.renderRows(); track entry.row.id) {\n <tr\n uioTableRow\n [row]=\"entry.row\"\n [index]=\"entry.index\"\n [absoluteIndex]=\"entry.absoluteIndex\"\n ></tr>\n }\n @if (spacers().bottom > 0) {\n <tr [uioTableProps]=\"spacerRow(spacers().bottom)\">\n <td [uioTableProps]=\"spacerCell(spacers().bottom)\"></td>\n </tr>\n }\n }\n }\n <ng-content />\n `,\n})\nexport class UioTableBody {\n protected readonly table = injectDataTable();\n protected readonly spacers = computed(() =>\n this.table.virtual.enabled() ? this.table.virtual.spacers() : { top: 0, bottom: 0 },\n );\n\n protected readonly state = computed(() => {\n if (this.table.options.error) return \"error\";\n if (this.table.loading() && this.table.renderRows().length === 0) return \"loading\";\n if (this.table.renderRows().length === 0) return \"empty\";\n return \"rows\";\n });\n\n protected spacerRow(height: number) {\n return getSpacerProps(height, this.table.chrome().colCount).row;\n }\n protected spacerCell(height: number) {\n return getSpacerProps(height, this.table.chrome().colCount).cell;\n }\n}\n","import { Directive, computed } from \"@angular/core\";\nimport { injectDataTable } from \"../core/table-context.js\";\n\n/**\n * Enters and leaves reorder mode, for `reorderable: \"toggle\"`.\n *\n * A directive on a `uioButton` rather than a component of its own: React's\n * toggle is a single `<button>`, and an Angular component would put a host\n * element around it. So the button is the caller's, and this supplies what it\n * does and what it is called:\n *\n * <button uioButton uioTableReorderToggle #reorder=\"uioTableReorderToggle\"\n * [intent]=\"reorder.active() ? 'primary' : 'secondary'\">{{ reorder.text() }}</button>\n *\n * The label says what a press does next — \"Reorder\", then \"Done\" — rather\n * than carrying a pressed state, so it reads the same to a screen reader as\n * it does on screen. Render it only while `table.reorder.mode()` is \"toggle\"\n * and the table is not in card mode, as the toolbar does.\n */\n@Directive({\n selector: \"button[uioTableReorderToggle]\",\n standalone: true,\n exportAs: \"uioTableReorderToggle\",\n host: {\n type: \"button\",\n \"[attr.aria-label]\": \"active() ? 'Done reordering columns' : 'Reorder columns'\",\n \"(click)\": \"toggle()\",\n },\n})\nexport class UioTableReorderToggle {\n private readonly table = injectDataTable();\n\n readonly active = computed(() => this.table.reorder.active());\n readonly text = computed(() => (this.active() ? \"Done\" : \"Reorder\"));\n\n protected toggle(): void {\n this.table.reorder.setActive(!this.active());\n }\n}\n","import { Component, computed, effect, inject, input, signal } from \"@angular/core\";\nimport {\n UioAlertDialog,\n UioAlertDialogCancel,\n UioAlertDialogConfirm,\n UioAlertDialogDescription,\n UioAlertDialogFooter,\n UioAlertDialogTitle,\n UioButton,\n} from \"@ui-organized/angular\";\nimport type { RowData } from \"@ui-organized/table-core\";\nimport { HostPresence } from \"@ui-organized/angular\";\nimport { injectDataTable } from \"../core/table-context.js\";\nimport type { BulkAction } from \"../core/types.js\";\nimport type { IconName } from \"@ui-organized/angular\";\n\n/**\n * Appears only while something is selected, and then takes the place of the\n * toolbar's sort, filter and table actions: with rows selected, what to do\n * with them is the decision in front of the user, so it sits where they were\n * already looking rather than on a line of its own. The count, and the offer\n * to select the rows off screen, are in `UioTableSelectionFooter` under the\n * rows.\n *\n * Plain buttons in a labelled group, with no surface of its own. It shares the\n * toolbar row with the search box, so `role=\"toolbar\"`'s roving focus would\n * make it the only cluster in that row that Tab skips through. Destructive\n * actions route through `UioAlertDialog`; \"archive 40,000 rows\" is not an\n * undo-able mis-click.\n */\n@Component({\n selector: \"div[uioTableSelectionBar]\",\n standalone: true,\n providers: [HostPresence],\n /**\n * The host is the group itself, so this is one element, as React's single\n * `div.data-table__selection-bar[role=group]` is.\n */\n host: {\n role: \"group\",\n class: \"data-table__selection-bar\",\n \"aria-label\": \"Bulk actions\",\n },\n imports: [\n UioAlertDialog,\n UioAlertDialogTitle,\n UioAlertDialogDescription,\n UioAlertDialogFooter,\n UioAlertDialogCancel,\n UioAlertDialogConfirm,\n UioButton,\n ],\n template: `\n @if (count() > 0) {\n @for (action of items(); track action.id) {\n <button\n uioButton\n [size]=\"table.size()\"\n [intent]=\"action.destructive ? 'destructive-ghost' : 'ghost'\"\n [icon]=\"iconOf(action)\"\n (click)=\"choose(action)\"\n >\n {{ action.label }}\n </button>\n }\n\n <button uioButton [size]=\"table.size()\" intent=\"ghost\" (click)=\"table.selection.clear()\">\n Clear\n </button>\n\n <!--\n Angular's alert dialog is parts rather than props — one component and\n five directives, the same shape every overlay in\n \"@ui-organized/angular\" takes.\n -->\n <uio-alert-dialog [open]=\"confirming() !== null\" (openChange)=\"onOpenChange($event)\">\n <h2 uioAlertDialogTitle>{{ confirmTitle() }}</h2>\n <div uioAlertDialogDescription>{{ confirmDescription() }}</div>\n <div uioAlertDialogFooter>\n <button uioAlertDialogCancel>Cancel</button>\n <button uioAlertDialogConfirm intent=\"destructive\" (click)=\"runConfirmed()\">\n {{ confirmLabel() }}\n </button>\n </div>\n </uio-alert-dialog>\n }\n `,\n})\nexport class UioTableSelectionBar<T extends RowData> {\n private readonly presence = inject(HostPresence);\n\n constructor() {\n // A bar that renders nothing must not hold a row of layout: React\n // returns null, and an Angular host element cannot — so it takes\n // itself out of the DOM and puts itself back. See HostPresence.\n effect(() => this.presence.set(this.count() > 0));\n }\n readonly actions = input<BulkAction<T>[] | undefined>(undefined);\n\n protected readonly table = injectDataTable<T>();\n protected readonly confirming = signal<BulkAction<T> | null>(null);\n\n protected readonly items = computed(() => this.actions() ?? this.table.options.bulkActions ?? []);\n protected readonly count = computed(() => this.table.selection.count());\n private readonly rowsWord = computed(() =>\n this.count() === 1 ? \"1 row\" : `${this.count()} rows`,\n );\n\n protected readonly confirmTitle = computed(\n () => this.confirming()?.confirm?.title ?? `${this.confirming()?.label ?? \"Continue\"}?`,\n );\n protected readonly confirmDescription = computed(\n () =>\n this.confirming()?.confirm?.description ??\n `This will ${this.confirming()?.label.toLowerCase() ?? \"act on\"} ${this.rowsWord()}. This cannot be undone.`,\n );\n protected readonly confirmLabel = computed(\n () => this.confirming()?.confirm?.confirmLabel ?? this.confirming()?.label ?? \"Confirm\",\n );\n\n protected iconOf(action: BulkAction<T>): IconName | undefined {\n return action.icon;\n }\n\n private run(action: BulkAction<T>): void {\n void action.onRun(this.table.selection.rows(), this.table.selection.asBulk());\n }\n\n protected choose(action: BulkAction<T>): void {\n if (action.destructive) this.confirming.set(action);\n else this.run(action);\n }\n\n protected runConfirmed(): void {\n const action = this.confirming();\n if (action) this.run(action);\n this.confirming.set(null);\n }\n\n protected onOpenChange(open: boolean): void {\n if (!open) this.confirming.set(null);\n }\n}\n","import {\n Component,\n ElementRef,\n computed,\n effect,\n inject,\n input,\n signal,\n viewChild,\n} from \"@angular/core\";\nimport {\n UioButton,\n UioChip,\n UioChipSegment,\n UioDateInput,\n UioDivider,\n UioInput,\n UioListbox,\n UioMenu,\n UioMenuItem,\n UioMenuRadioGroup,\n UioMenuRadioItem,\n UioMenuSeparator,\n UioMenuTrigger,\n UioNumberField,\n UioPopover,\n UioPopoverTitle,\n UioPopoverTrigger,\n UioSearchInput,\n UioSegmentedControl,\n UioSelect,\n} from \"@ui-organized/angular\";\nimport {\n searchOptions,\n type FilterOperatorArity,\n type TableFilterCondition,\n type TableFilterValue,\n afterRowEntrance,\n} from \"@ui-organized/table-core\";\nimport { HostPresence } from \"@ui-organized/angular\";\nimport { injectDataTable } from \"../core/table-context.js\";\nimport { internalGlyph as glyph } from \"@ui-organized/angular\";\n\n/** Options above this many get a search box — the article's \"search in the panel\". */\nconst SEARCHABLE_ABOVE = 8;\n\n/**\n * Focus has to land somewhere deliberate when a chip disappears, or it falls to\n * `<body>` and a keyboard user loses their place entirely.\n */\nexport function focusAfterRemoval(removedId: string): void {\n if (typeof requestAnimationFrame !== \"function\") return;\n requestAnimationFrame(() => {\n const bar = document.querySelector(\".data-table__filters\");\n if (!bar) return;\n const chips = [...bar.querySelectorAll<HTMLElement>(\"[data-filter-id]\")];\n const next = chips.find((element) => element.dataset[\"filterId\"] !== removedId);\n (\n next?.querySelector<HTMLElement>(\"button\") ?? bar.querySelector<HTMLElement>(\"button\")\n )?.focus();\n });\n}\n\n/**\n * The value half of a condition editor.\n *\n * Which control appears follows from **type and operator together**, never from\n * the type alone — that is the whole point of separating the two. A date column\n * shows one date field for \"is before\", two for \"is between\", and a number plus\n * a unit for \"is in the last\".\n */\n@Component({\n selector: \"[uioTableFilterValueEditor]\",\n standalone: true,\n // A real element, not <ng-container>: Angular cannot host a component on a\n // container, and the failure is a runtime assertion that leaves the filter bar\n // empty. `display: contents` keeps the host out of the surrounding layout.\n host: { style: \"display: contents\" },\n imports: [\n UioDateInput,\n UioInput,\n UioListbox,\n UioNumberField,\n UioSearchInput,\n UioSegmentedControl,\n UioSelect,\n ],\n template: `\n @switch (kind()) {\n @case (\"none\") {\n <!-- \"is empty\" and \"is today\" take nothing, so there is nothing to render. -->\n }\n @case (\"boolean\") {\n <div\n uioSegmentedControl\n [size]=\"table.size()\"\n ariaLabel=\"Value\"\n [items]=\"BOOLEAN_ITEMS\"\n [value]=\"booleanValue()\"\n (valueChange)=\"setBoolean($event)\"\n ></div>\n }\n @case (\"enum\") {\n @if (searchable()) {\n <div\n uioSearchInput\n [size]=\"table.size()\"\n ariaLabel=\"Search values\"\n [value]=\"query()\"\n (valueChange)=\"query.set($event)\"\n ></div>\n }\n <!--\n \"label\", not \"ariaLabel\": Listbox has a closed prop API, so a bare\n aria-label is silently dropped and the listbox ships unnamed — an\n aria-input-field-name violation that only shows up with the popover\n open, which the story-level axe gate never sees.\n -->\n <div\n uioListbox\n class=\"data-table__filter-field data-table__filter-field--unlabelled\"\n [size]=\"table.size()\"\n [selectionMode]=\"arity() === 'many' ? 'multiple' : 'single'\"\n label=\"Value\"\n [options]=\"listboxOptions()\"\n [value]=\"selectedValues()\"\n emptyMessage=\"No matching values\"\n (valueChange)=\"setSelected($event)\"\n ></div>\n }\n @case (\"relative-date\") {\n <div class=\"data-table__filter-editor-value\">\n <div\n uioNumberField\n [size]=\"table.size()\"\n label=\"Amount\"\n [min]=\"1\"\n [value]=\"numberAt(0)\"\n (valueChange)=\"setAt(0, $event)\"\n ></div>\n <div\n uioSelect\n [size]=\"table.size()\"\n label=\"Unit\"\n [value]=\"condition().unit ?? 'day'\"\n [options]=\"UNITS\"\n (valueChange)=\"setUnit($event)\"\n ></div>\n </div>\n }\n @case (\"date\") {\n <div class=\"data-table__filter-editor-value\">\n <div\n uioDateInput\n class=\"data-table__filter-field\"\n [size]=\"table.size()\"\n [label]=\"arity() === 'two' ? 'From' : 'Date'\"\n [value]=\"stringAt(0)\"\n (valueChange)=\"setAt(0, $event || null)\"\n ></div>\n @if (arity() === \"two\") {\n <div\n uioDateInput\n [size]=\"table.size()\"\n label=\"To\"\n [value]=\"stringAt(1)\"\n (valueChange)=\"setAt(1, $event || null)\"\n ></div>\n }\n </div>\n }\n @case (\"number\") {\n <div class=\"data-table__filter-editor-value\">\n <div\n uioNumberField\n class=\"data-table__filter-field\"\n [size]=\"table.size()\"\n [label]=\"arity() === 'two' ? 'Minimum' : 'Value'\"\n [value]=\"numberAt(0)\"\n (valueChange)=\"setAt(0, $event)\"\n ></div>\n @if (arity() === \"two\") {\n <div\n uioNumberField\n [size]=\"table.size()\"\n label=\"Maximum\"\n [value]=\"numberAt(1)\"\n (valueChange)=\"setAt(1, $event)\"\n ></div>\n }\n </div>\n }\n @default {\n <div\n uioInput\n class=\"data-table__filter-field data-table__filter-field--unlabelled\"\n [size]=\"table.size()\"\n label=\"Value\"\n placeholder=\"Data\"\n [value]=\"stringAt(0)\"\n (valueChange)=\"setAt(0, $event)\"\n ></div>\n }\n }\n `,\n})\nexport class UioTableFilterValueEditor {\n readonly condition = input.required<TableFilterCondition>();\n readonly arity = input.required<FilterOperatorArity>();\n\n protected readonly table = injectDataTable();\n protected readonly query = signal(\"\");\n\n protected readonly BOOLEAN_ITEMS = [\n { value: \"true\", label: \"Yes\" },\n { value: \"false\", label: \"No\" },\n ];\n protected readonly UNITS = [\n { value: \"day\", label: \"days\" },\n { value: \"week\", label: \"weeks\" },\n { value: \"month\", label: \"months\" },\n { value: \"year\", label: \"years\" },\n ];\n\n private readonly type = computed(() => this.table.filters.typeOf(this.condition()));\n\n /** One switch value rather than nested conditions, which a template cannot nest. */\n protected readonly kind = computed(() => {\n if (this.arity() === \"none\") return \"none\";\n const type = this.type();\n if (type === \"date\") {\n const operator = this.condition().operator;\n return operator === \"in-last\" || operator === \"in-next\" ? \"relative-date\" : \"date\";\n }\n return type;\n });\n\n private readonly options = computed(() => this.table.filters.optionsFor(this.condition()));\n protected readonly searchable = computed(() => this.options().length > SEARCHABLE_ABOVE);\n protected readonly listboxOptions = computed(() =>\n // The count rides in the label because `ListboxOption.label` is a string —\n // which is also exactly what a screen reader reads out.\n searchOptions(this.options(), this.query()).map((option) => ({\n value: option.value,\n label: option.count > 0 ? `${option.label} · ${option.count}` : option.label,\n disabled: option.disabled,\n })),\n );\n protected readonly selectedValues = computed(() => this.condition().values.map(String));\n protected readonly booleanValue = computed(() => {\n const first = this.condition().values[0];\n return first === null || first === undefined ? undefined : String(first);\n });\n\n protected numberAt(index: number): number | null {\n const value = this.condition().values[index];\n return typeof value === \"number\" ? value : null;\n }\n protected stringAt(index: number): string {\n return String(this.condition().values[index] ?? \"\");\n }\n\n private set(values: TableFilterValue[]): void {\n this.table.filters.update(this.condition().id, { values });\n }\n protected setAt(index: number, value: TableFilterValue): void {\n const values = [...this.condition().values];\n while (values.length <= index) values.push(null);\n values[index] = value;\n this.set(values);\n }\n protected setBoolean(value: string): void {\n this.set([value === \"true\"]);\n }\n protected setSelected(values: string[]): void {\n this.set(this.arity() === \"many\" ? values : values.slice(0, 1));\n }\n protected setUnit(unit: string): void {\n this.table.filters.update(this.condition().id, {\n unit: unit as \"day\" | \"week\" | \"month\" | \"year\",\n });\n }\n}\n\n/**\n * One condition's value editor (Figma 2298:726): the value, then a rule and a\n * remove. The field and the operator have segments of their own on the chip,\n * so the editor carries only what the value segment opens.\n */\n@Component({\n selector: \"[uioTableFilterEditor]\",\n standalone: true,\n // A real element, not <ng-container>: Angular cannot host a component on a\n // container, and the failure is a runtime assertion that leaves the filter bar\n // empty. `display: contents` keeps the host out of the surrounding layout.\n host: { style: \"display: contents\" },\n imports: [UioButton, UioDivider, UioTableFilterValueEditor],\n template: `\n <div uioTableFilterValueEditor [condition]=\"condition()\" [arity]=\"arity()\"></div>\n\n <div uioDivider class=\"data-table__filter-editor-rule\"></div>\n\n <button\n uioButton\n intent=\"ghost\"\n [size]=\"table.size()\"\n [icon]=\"glyph('trash')\"\n class=\"data-table__filter-editor-remove\"\n (click)=\"remove()\"\n >\n Remove\n </button>\n `,\n})\nexport class UioTableFilterEditor {\n protected readonly glyph = glyph;\n readonly condition = input.required<TableFilterCondition>();\n\n protected readonly table = injectDataTable();\n protected readonly arity = computed(() => this.table.filters.arityOf(this.condition()));\n\n protected remove(): void {\n const id = this.condition().id;\n this.table.filters.remove(id);\n focusAfterRemoval(id);\n }\n}\n\ntype ChipMenu = \"field\" | \"operator\";\n\n/**\n * One condition, as a segmented chip (Figma 2462:2636): \"Name | is greater than\n * | 30\". Each segment opens the control for the one parameter it shows — the\n * field menu, the operator menu, the value editor — so changing a filter is one\n * click on the part you mean rather than a trip through a form.\n *\n * Removal lives in the field menu and at the foot of the value editor, not in a\n * dismiss button: a fourth 24px target in a row of segments is a coin-flip on\n * touch, and an operator that takes no value (\"is empty\") has no value editor to\n * put it in.\n */\n@Component({\n selector: \"[uioTableFilterChip]\",\n standalone: true,\n // A real element, not <ng-container>: Angular cannot host a component on a\n // container, and the failure is a runtime assertion that leaves the filter bar\n // empty. `display: contents` keeps the host out of the surrounding layout.\n host: { style: \"display: contents\" },\n imports: [\n UioChip,\n UioChipSegment,\n UioMenu,\n UioMenuItem,\n UioMenuRadioGroup,\n UioMenuRadioItem,\n UioMenuSeparator,\n UioMenuTrigger,\n UioPopover,\n UioPopoverTitle,\n UioPopoverTrigger,\n UioTableFilterEditor,\n ],\n template: `\n <!--\n The group's name is the whole sentence, so a screen reader moving into any\n one segment hears what the filter *is* before what the button does.\n\n The menus and the popover sit *beside* the chip, not inside it: segments\n have to be its direct children for the dividers and the pill's end padding\n to land, and their surfaces are overlays anchored to the trigger anyway.\n -->\n <span\n uioChip\n class=\"data-table__filter-chip\"\n [attr.aria-label]=\"'Filter: ' + description().text\"\n [selected]=\"editing() || menu() !== null\"\n [incomplete]=\"!description().complete\"\n [attr.data-column-id]=\"condition().columnId\"\n [attr.data-filter-id]=\"condition().id\"\n >\n <button uioChipSegment part=\"label\" uioMenuTrigger [menu]=\"fieldMenu\">\n {{ description().field }}\n </button>\n <button uioChipSegment part=\"operator\" uioMenuTrigger [menu]=\"operatorMenu\">\n {{ description().relative }}\n </button>\n @if (takesValue()) {\n <button uioChipSegment part=\"value\" uioPopoverTrigger [popover]=\"popover\">\n {{ description().value }}\n </button>\n }\n </span>\n\n <!-- \\`select\\` is the menu's output, not the item's: an item reports its value\n through the menu, and \\`(select)\\` on an item binds a DOM event that never\n fires. Radio items report through their group instead. -->\n <uio-menu\n #fieldMenu=\"uioMenu\"\n class=\"data-table__filter-picker\"\n [open]=\"menu() === 'field'\"\n (openChange)=\"setMenu('field', $event)\"\n (select)=\"$event === 'remove' && remove()\"\n >\n <div\n uioMenuRadioGroup\n [value]=\"condition().columnId\"\n (valueChange)=\"table.filters.changeField(condition().id, $event)\"\n >\n @for (field of table.filters.fields(); track field.columnId) {\n <div uioMenuRadioItem [value]=\"field.columnId\">{{ field.label }}</div>\n }\n </div>\n <div uioMenuSeparator></div>\n <div uioMenuItem value=\"remove\" icon=\"trash\">Remove filter</div>\n </uio-menu>\n\n <uio-menu\n #operatorMenu=\"uioMenu\"\n class=\"data-table__filter-picker\"\n [open]=\"menu() === 'operator'\"\n (openChange)=\"setMenu('operator', $event)\"\n >\n <div\n uioMenuRadioGroup\n [value]=\"condition().operator\"\n (valueChange)=\"table.filters.update(condition().id, { operator: $event })\"\n >\n @for (operator of operators(); track operator.id) {\n <div uioMenuRadioItem [value]=\"operator.id\">{{ operator.label }}</div>\n }\n </div>\n </uio-menu>\n\n <!-- Always present, opened only while the condition takes a value: a\n reference cannot cross from one @if block into another. -->\n <uio-popover\n #popover=\"uioPopover\"\n class=\"data-table__filter-editor-popup\"\n side=\"bottom\"\n align=\"start\"\n [open]=\"open() && takesValue()\"\n (openChange)=\"setOpen($event)\"\n (keydown)=\"onKeyDown($event)\"\n >\n <div #editor class=\"data-table__filter-editor\">\n <h2 uioPopoverTitle class=\"data-table__filter-editor-title\">\n {{ description().field }} {{ description().relative }}\n </h2>\n <div uioTableFilterEditor [condition]=\"condition()\"></div>\n </div>\n </uio-popover>\n `,\n})\nexport class UioTableFilterChip {\n readonly condition = input.required<TableFilterCondition>();\n\n protected readonly table = injectDataTable();\n private readonly editor = viewChild<ElementRef<HTMLElement>>(\"editor\");\n\n // Which chip's editor is open is filter state, not chip state: the chip that\n // opens is often the one the *header* just created, and removing an open\n // condition has to close its editor rather than leave a dangling id behind.\n protected readonly editing = computed(\n () => this.table.filters.editing() === this.condition().id,\n );\n // The first chip arrives inside a row that is still animating open, so the\n // editor waits for the row to settle rather than open against a moving\n // anchor and jump. An existing chip settles at once.\n private readonly settled = signal(false);\n protected readonly open = computed(() => this.editing() && this.settled());\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n // The two menus are this chip's alone, so they are local.\n protected readonly menu = signal<ChipMenu | null>(null);\n protected readonly description = computed(() => this.table.filters.describe(this.condition()));\n protected readonly takesValue = computed(\n () => this.table.filters.arityOf(this.condition()) !== \"none\",\n );\n protected readonly operators = computed(() => this.table.filters.operatorsFor(this.condition()));\n\n // The condition as it was when the editor opened, so Escape can revert it.\n private snapshot: TableFilterCondition | null = null;\n\n constructor() {\n effect((onCleanup) => {\n if (!this.editing()) {\n this.settled.set(false);\n return;\n }\n if (typeof requestAnimationFrame !== \"function\") {\n this.settled.set(true);\n return;\n }\n // A frame first: the effect can run before a new chip is attached, and a\n // detached row reports no animations.\n let cancel = () => {};\n const frame = requestAnimationFrame(() => {\n cancel = afterRowEntrance(this.host.nativeElement, () => this.settled.set(true));\n });\n onCleanup(() => {\n cancelAnimationFrame(frame);\n cancel();\n });\n });\n\n effect(() => {\n // Only when the editor opens — capturing on every change would defeat it.\n if (this.open()) this.snapshot = this.condition();\n });\n\n /**\n * Put focus in the first typeable field once the popover opens.\n *\n * **Two** frames, not one: the overlay moves focus into the surface on its\n * own first, and waiting a second frame puts this last, which is the only\n * thing that sticks.\n *\n * Deliberately only an `<input>`: a text, number, date or search field is\n * something you type into immediately. An enum list without a search box has\n * nothing to type into, so its focus is left where the overlay put it.\n */\n effect((onCleanup) => {\n const host = this.editor()?.nativeElement;\n if (!this.open() || !host || typeof requestAnimationFrame !== \"function\") return;\n let inner = 0;\n const outer = requestAnimationFrame(() => {\n inner = requestAnimationFrame(() => {\n const field = host.querySelector<HTMLInputElement>(\n 'input:not([type=\"hidden\"]):not([disabled])',\n );\n // Already there — Ark's own initial focus can land on the field, and\n // the user may be typing by now. Selecting would eat what they typed.\n if (!field || field === document.activeElement) return;\n field.focus();\n field.select();\n });\n });\n onCleanup(() => {\n cancelAnimationFrame(outer);\n cancelAnimationFrame(inner);\n });\n });\n }\n\n protected setOpen(next: boolean): void {\n this.table.filters.setEditing(next ? this.condition().id : null);\n }\n\n protected setMenu(name: ChipMenu, next: boolean): void {\n if (next) this.menu.set(name);\n else if (this.menu() === name) this.menu.set(null);\n }\n\n protected remove(): void {\n const id = this.condition().id;\n this.table.filters.remove(id);\n focusAfterRemoval(id);\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n if (event.key !== \"Escape\" || !this.snapshot) return;\n // The overlay closes on Escape anyway; this puts the value back first, so\n // Escape abandons the edit rather than committing it.\n this.table.filters.restore(this.snapshot);\n }\n}\n\n/**\n * The field picker, in both the shapes the design uses it: the header's\n * icon-only button (Figma 2298:336) and the filter bar's \"+ Add\" (2298:531).\n *\n * A `Menu`, like every other menu the table puts in its chrome. Picking a field\n * *does* something — it adds a filter and opens that filter's editor — so\n * `role=\"menu\"` with `menuitem` children is the honest semantic.\n */\n@Component({\n selector: \"[uioTableFilterAdd]\",\n standalone: true,\n imports: [UioButton, UioMenu, UioMenuTrigger, UioMenuItem],\n template: `\n @if (fields().length > 0) {\n <!--\n aria-label on the trigger also names the menu it opens: the machine\n points the menu's aria-labelledby at its trigger, which wins over any\n aria-label on the content. So the button's name has to be the menu's\n name too — \"Add filter\", not \"Filter\".\n -->\n @if (iconOnly()) {\n <button\n uioButton\n uioMenuTrigger\n [menu]=\"menu\"\n intent=\"secondary\"\n [size]=\"table.size()\"\n [icon]=\"glyph('filter')\"\n [attr.aria-label]=\"label()\"\n ></button>\n } @else {\n <button uioButton uioMenuTrigger [menu]=\"menu\" intent=\"ghost\" size=\"sm\" [icon]=\"glyph('plus')\">\n {{ label() }}\n </button>\n }\n <uio-menu\n #menu=\"uioMenu\"\n align=\"end\"\n class=\"data-table__filter-picker\"\n (select)=\"table.filters.add($event)\"\n >\n <!--\n A field that already carries conditions stays in the list — several\n conditions on one column is the point — with a count so it is obvious\n this adds another rather than replacing.\n -->\n @for (field of fields(); track field.columnId) {\n <div uioMenuItem [value]=\"field.columnId\">\n {{ field.count > 0 ? field.label + \" (\" + field.count + \")\" : field.label }}\n </div>\n }\n </uio-menu>\n }\n `,\n})\nexport class UioTableFilterAdd {\n protected readonly glyph = glyph;\n readonly label = input(\"Add filter\");\n readonly iconOnly = input(false);\n\n protected readonly table = injectDataTable();\n protected readonly fields = computed(() => this.table.filters.fields());\n}\n\n/**\n * The applied filters, on their own line under the header (Figma 2298:362).\n *\n * A *summary*, not a control panel: the filter button lives in the header above,\n * and this line does not exist until the user has actually filtered something. A\n * bar that is always present and usually empty is chrome that teaches people to\n * stop looking at it.\n */\n@Component({\n selector: \"div[uioTableFilters]\",\n standalone: true,\n providers: [HostPresence],\n imports: [UioButton, UioMenu, UioMenuTrigger, UioMenuItem, UioTableFilterChip],\n host: { class: \"data-table__filters\", role: \"group\", \"aria-label\": \"Filters\" },\n template: `\n <!--\n role=group, not role=toolbar: toolbar promises arrow-key navigation between\n its controls, and until that lands the promise would be a lie to assistive\n tech.\n -->\n @if (render()) {\n <span class=\"data-table__filters-label\">Filters</span>\n\n @for (condition of conditions(); track condition.id) {\n <span uioTableFilterChip [condition]=\"condition\"></span>\n }\n\n <!--\n aria-label on the trigger also names the menu it opens: the machine\n points the menu's aria-labelledby at its trigger, which wins over any\n aria-label on the content. So the button's name has to be the menu's name\n too — \"Add filter\", not \"Filter\".\n\n A field that already carries conditions stays in the list — several\n conditions on one column is the point — with a count so it is obvious\n this adds another rather than replacing.\n -->\n <button uioButton uioMenuTrigger [menu]=\"addSurface\" intent=\"ghost\" size=\"sm\" [icon]=\"glyph('plus')\">\n Add\n </button>\n <uio-menu\n #addSurface=\"uioMenu\"\n align=\"end\"\n class=\"data-table__filter-picker\"\n (select)=\"table.filters.add($event)\"\n >\n @for (field of filterFields(); track field.columnId) {\n <div uioMenuItem [value]=\"field.columnId\">\n {{ field.count > 0 ? field.label + \" (\" + field.count + \")\" : field.label }}\n </div>\n }\n </uio-menu>\n\n <button uioButton intent=\"ghost\" size=\"sm\" [icon]=\"glyph('rotate-ccw')\" (click)=\"table.filters.clear()\">\n Reset\n </button>\n\n <!--\n One polite region for add / remove / change / clear. Deliberately not a\n visible count: that changes on every keystroke elsewhere, and a live\n region that re-announces per keystroke is a firehose.\n -->\n <span class=\"data-table__sr-only\" role=\"status\" aria-live=\"polite\">\n {{ table.filters.announcement() }}\n </span>\n }\n `,\n})\nexport class UioTableFilters {\n protected readonly glyph = glyph;\n private readonly presence = inject(HostPresence);\n\n constructor() {\n // A bar that renders nothing must not hold a row of layout: React\n // returns null, and an Angular host element cannot — so it takes\n // itself out of the DOM and puts itself back. See HostPresence.\n effect(() => this.presence.set(this.render()));\n }\n protected readonly table = injectDataTable();\n protected readonly conditions = computed(() => this.table.filters.conditions());\n protected readonly filterFields = computed(() => this.table.filters.fields());\n protected readonly render = computed(\n () => this.table.options.filterable !== false && this.conditions().length > 0,\n );\n}\n","import {\n Component,\n Directive,\n Renderer2,\n TemplateRef,\n computed,\n effect,\n inject,\n input,\n signal,\n untracked,\n viewChild,\n viewChildren,\n type Signal,\n} from \"@angular/core\";\nimport { DOCUMENT } from \"@angular/common\";\nimport {\n UioAccordion,\n UioButton,\n UioRadioGroup,\n UioSelect,\n UioSheet,\n UioSheetClose,\n UioSheetFooter,\n UioSheetTitle,\n UioSheetTrigger,\n type AccordionItem,\n} from \"@ui-organized/angular\";\nimport type { TableFilterCondition } from \"@ui-organized/table-core\";\nimport { injectDataTable } from \"../core/table-context.js\";\nimport { UioTableFilterValueEditor } from \"./table-filters.js\";\nimport { internalGlyph as glyph } from \"@ui-organized/angular\";\n\n/**\n * Card mode's sort and filter controls: a labelled button that opens a bottom\n * sheet holding every control for that one concern.\n *\n * A menu anchored to a 36px icon is a desktop affordance. On a phone the menu\n * covers the cards it is sorting, and the filter chips wrap into a second\n * toolbar above a list that is already short of room. A sheet gives the\n * controls the full width and puts them within thumb reach, and the chips row\n * goes away: what is applied is counted on the button instead.\n *\n * ── Differences from React's markup, all forced ─────────────────────────────\n *\n * - `UioSheet` has no input for a class on its popup, so `data-table__sheet`\n * is added to the popup element itself once the sheet has attached it\n * (`addSheetPopupClass`). That is what lets the shared\n * `.sheet__popup--bottom.data-table__sheet` rule size it to its content.\n * - There is no `TableSheetButton`: Angular's trigger is a directive on a real\n * `<button>`, so the button cannot be wrapped in a component without putting\n * a host element between `uioSheetTrigger` and the element it has to be on.\n * The badge is written into each trigger instead — the count inside the\n * label, spoken as words (\"Filter, 2 applied\"), because a bare \"2\" announced\n * after \"Filter\" says nothing about what it counts.\n * - Contents render only while the sheet is open. `hideOthersFrom` marks every\n * overlay surface that exists when a modal opens, and Angular attaches a\n * menu's or select's surface when it is created; built at page load, the\n * sheet's own selects would be painted but hidden from assistive tech.\n */\n\n/**\n * Give the sheet's popup the table's class. The popup is attached in\n * `UioSheet.ngOnInit`, so by the time this effect runs it is in the document,\n * found by the id the dialog context gives its content part.\n */\nfunction addSheetPopupClass(sheet: Signal<UioSheet | undefined>): void {\n const renderer = inject(Renderer2);\n const document = inject(DOCUMENT);\n effect(() => {\n const instance = sheet();\n if (!instance) return;\n const popup = document.getElementById(instance.dialogContext.partId(\"content\"));\n if (popup) renderer.addClass(popup, \"data-table__sheet\");\n });\n}\n\n// ─── Sort ────────────────────────────────────────────────────────────────────\n\n@Component({\n selector: \"[uioTableSortSheet]\",\n standalone: true,\n host: { style: \"display: contents\" },\n imports: [\n UioButton,\n UioRadioGroup,\n UioSheet,\n UioSheetClose,\n UioSheetFooter,\n UioSheetTitle,\n UioSheetTrigger,\n ],\n template: `\n @if (columns().length > 0) {\n <button\n uioButton\n uioSheetTrigger\n [sheet]=\"sheet\"\n intent=\"secondary\"\n [size]=\"table.size()\"\n [icon]=\"icon()\"\n >\n {{ label() }}\n @if (count() > 0) {\n <span class=\"data-table__badge\" aria-hidden=\"true\">{{ count() }}</span>\n <span class=\"data-table__sr-only\">, {{ count() }} applied</span>\n }\n </button>\n <uio-sheet #sheet=\"uioSheet\" side=\"bottom\" size=\"lg\">\n @if (sheet.open()) {\n <h2 uioSheetTitle>{{ label() }}</h2>\n <div class=\"data-table__sheet-body\">\n <div\n uioRadioGroup\n label=\"Sort by\"\n [options]=\"columnOptions()\"\n [value]=\"activeId()\"\n (valueChange)=\"chooseColumn($event)\"\n ></div>\n <!--\n Disabled rather than hidden, as in the desktop menu: the sheet\n keeps its shape, so the second visit finds the controls where\n they were. Nothing is checked until there is a sort to have a\n direction: a pre-ticked \"Ascending\" over nothing reads as a sort\n that is applied.\n -->\n <div\n uioRadioGroup\n label=\"Direction\"\n orientation=\"horizontal\"\n [disabled]=\"!activeId()\"\n [options]=\"DIRECTIONS\"\n [value]=\"activeId() ? direction() : ''\"\n (valueChange)=\"chooseDirection($event)\"\n ></div>\n </div>\n <div uioSheetFooter>\n <button\n uioButton\n intent=\"ghost\"\n size=\"lg\"\n [disabled]=\"!activeId()\"\n (click)=\"table.table.setSorting([])\"\n >\n Clear sort\n </button>\n <button uioButton uioSheetClose intent=\"primary\" size=\"lg\">Done</button>\n </div>\n }\n </uio-sheet>\n }\n `,\n})\nexport class UioTableSortSheet {\n /** Button label and sheet title. */\n readonly label = input(\"Sort\");\n\n protected readonly table = injectDataTable();\n protected readonly DIRECTIONS = [\n { value: \"asc\", label: \"Ascending\" },\n { value: \"desc\", label: \"Descending\" },\n ];\n\n protected readonly columns = computed(() =>\n this.table.table.getAllLeafColumns().filter((column) => column.getCanSort()),\n );\n protected readonly columnOptions = computed(() =>\n this.columns().map((column) => {\n const header = column.columnDef.header;\n return { value: column.id, label: typeof header === \"string\" ? header : column.id };\n }),\n );\n private readonly sorting = computed(() => this.table.state().sorting ?? []);\n protected readonly count = computed(() => this.sorting().length);\n protected readonly activeId = computed(() => this.sorting()[0]?.id ?? \"\");\n protected readonly direction = computed(() => (this.sorting()[0]?.desc ? \"desc\" : \"asc\"));\n protected readonly icon = computed(() =>\n glyph(this.activeId() ? (this.sorting()[0]?.desc ? \"sort-desc\" : \"sort-asc\") : \"sort\"),\n );\n\n private readonly sheet = viewChild(UioSheet);\n\n constructor() {\n addSheetPopupClass(this.sheet);\n }\n\n protected chooseColumn(id: string): void {\n this.table.table.setSorting([{ id, desc: this.direction() === \"desc\" }]);\n }\n protected chooseDirection(next: string): void {\n const id = this.activeId();\n if (id) this.table.table.setSorting([{ id, desc: next === \"desc\" }]);\n }\n}\n\n// ─── Filter ──────────────────────────────────────────────────────────────────\n\n/**\n * One condition inside a field's section: its relation, its value, and a way\n * to clear it. The field is the section, so there is no field control.\n */\n@Component({\n selector: \"div[uioTableFilterSheetCondition]\",\n standalone: true,\n imports: [UioButton, UioSelect, UioTableFilterValueEditor],\n host: {\n class: \"data-table__sheet-filter\",\n \"[attr.data-filter-id]\": \"condition().id\",\n },\n template: `\n <div\n uioSelect\n [size]=\"table.size()\"\n label=\"Condition\"\n [options]=\"operatorOptions()\"\n [value]=\"condition().operator\"\n (valueChange)=\"table.filters.update(condition().id, { operator: $event })\"\n ></div>\n @if (arity() !== \"none\") {\n <div class=\"data-table__sheet-filter-value\">\n <div uioTableFilterValueEditor [condition]=\"condition()\" [arity]=\"arity()\"></div>\n </div>\n }\n @if (description().complete) {\n <button\n uioButton\n intent=\"ghost\"\n [size]=\"table.size()\"\n [icon]=\"glyph('close')\"\n class=\"data-table__sheet-remove\"\n [attr.aria-label]=\"'Clear filter: ' + description().text\"\n (click)=\"table.filters.remove(condition().id)\"\n >\n Clear {{ fieldLabel() }}\n </button>\n }\n `,\n})\nexport class UioTableFilterSheetCondition {\n protected readonly glyph = glyph;\n readonly condition = input.required<TableFilterCondition>();\n readonly fieldLabel = input.required<string>();\n\n protected readonly table = injectDataTable();\n protected readonly description = computed(() => this.table.filters.describe(this.condition()));\n protected readonly arity = computed(() => this.table.filters.arityOf(this.condition()));\n protected readonly operatorOptions = computed(() =>\n this.table.filters\n .operatorsFor(this.condition())\n .map((operator) => ({ value: operator.id, label: operator.label })),\n );\n}\n\n/**\n * Marks the template for one field's section, so the sheet can hand the\n * accordion one `TemplateRef` per field. `AccordionItem.content` takes a\n * template but passes it no context, so the field cannot be a template\n * variable; a view created from this template keeps the `@for` iteration it\n * was declared in, and with it the field.\n */\n@Directive({ selector: \"ng-template[uioTableSheetSection]\", standalone: true })\nexport class UioTableSheetSection {\n readonly field = input<string>(\"\", { alias: \"uioTableSheetSection\" });\n readonly template = inject<TemplateRef<unknown>>(TemplateRef);\n}\n\n/**\n * Every filterable field at once, one accordion section each, so filtering on\n * a phone is \"open the field, pick the value\" rather than \"add a filter,\n * choose its field, then pick the value\".\n *\n * Each section edits a real condition. While the sheet is open every field has\n * at least one, so its editor has something to write to: the sheet adds an\n * empty draft for any field without one. A draft is an incomplete condition,\n * which the filter model keeps but never applies, so drafts change nothing\n * until they are given a value; the badge counts only complete conditions;\n * and closing the sheet removes the drafts nobody filled in.\n */\n@Component({\n selector: \"[uioTableFilterSheet]\",\n standalone: true,\n host: { style: \"display: contents\" },\n imports: [\n UioAccordion,\n UioButton,\n UioSheet,\n UioSheetClose,\n UioSheetFooter,\n UioSheetTitle,\n UioSheetTrigger,\n UioTableFilterSheetCondition,\n UioTableSheetSection,\n ],\n template: `\n @if (fields().length > 0) {\n <button\n uioButton\n uioSheetTrigger\n [sheet]=\"sheet\"\n intent=\"secondary\"\n [size]=\"table.size()\"\n [icon]=\"glyph('filter')\"\n >\n {{ label() }}\n @if (count() > 0) {\n <span class=\"data-table__badge\" aria-hidden=\"true\">{{ count() }}</span>\n <span class=\"data-table__sr-only\">, {{ count() }} applied</span>\n }\n </button>\n <uio-sheet #sheet=\"uioSheet\" side=\"bottom\" size=\"lg\" (openChange)=\"onOpenChange($event)\">\n @if (sheet.open()) {\n <h2 uioSheetTitle>{{ label() }}</h2>\n <div class=\"data-table__sheet-body\">\n @for (field of fields(); track field.columnId) {\n <ng-template [uioTableSheetSection]=\"field.columnId\">\n <div class=\"data-table__sheet-section\">\n @for (condition of conditionsOf(field.columnId); track condition.id) {\n <div\n uioTableFilterSheetCondition\n [condition]=\"condition\"\n [fieldLabel]=\"field.label\"\n ></div>\n }\n </div>\n </ng-template>\n }\n <!--\n Every section starts collapsed, so the whole list of fields fits\n on screen at once; each header says what it applies, so nothing\n is hidden by being closed. Open one to edit it.\n -->\n <div\n uioAccordion\n multiple\n class=\"data-table__sheet-sections\"\n [items]=\"sections()\"\n [value]=\"expanded() ?? []\"\n (valueChange)=\"expanded.set($event)\"\n ></div>\n </div>\n <div uioSheetFooter>\n <button\n uioButton\n intent=\"ghost\"\n size=\"lg\"\n [disabled]=\"count() === 0\"\n (click)=\"clearApplied()\"\n >\n Clear all\n </button>\n <button uioButton uioSheetClose intent=\"primary\" size=\"lg\">Done</button>\n </div>\n }\n </uio-sheet>\n }\n `,\n})\nexport class UioTableFilterSheet {\n protected readonly glyph = glyph;\n /** Button label and sheet title. */\n readonly label = input(\"Filter\");\n\n protected readonly table = injectDataTable();\n private readonly sheet = viewChild(UioSheet);\n private readonly sectionTemplates = viewChildren(UioTableSheetSection);\n\n protected readonly fields = computed(() => this.table.filters.fields());\n protected readonly allFields = computed(() => this.fields().map((field) => field.columnId));\n private readonly applied = computed(() =>\n this.table.filters\n .conditions()\n .filter((condition) => this.table.filters.describe(condition).complete),\n );\n protected readonly count = computed(() => this.applied().length);\n\n private readonly isOpen = signal(false);\n /** Sections the user has collapsed or expanded; null until they touch one. */\n protected readonly expanded = signal<readonly (string | number)[] | null>(null);\n\n /**\n * The accordion's items. The title is the field, and once something is\n * applied, what it is: \"Role: is any of Admin\". It has to be one string —\n * `AccordionItem.title` takes no template — so the summary rides in the\n * title rather than in a styled line of its own beneath it.\n */\n protected readonly sections = computed<AccordionItem[]>(() => {\n const templates = new Map(\n this.sectionTemplates().map((section) => [section.field(), section.template]),\n );\n return this.fields().map((field) => {\n const summary = this.conditionsOf(field.columnId)\n .map((condition) => this.table.filters.describe(condition))\n .filter((description) => description.complete)\n .map((description) => `${description.relative} ${description.value}`)\n .join(\"; \");\n return {\n value: field.columnId,\n title: summary ? `${field.label}: ${summary}` : field.label,\n content: templates.get(field.columnId),\n };\n });\n });\n\n constructor() {\n addSheetPopupClass(this.sheet);\n\n // Re-run on every change while open, not just on opening: \"Clear\" empties\n // a field, and that field then needs a fresh draft to keep its editor.\n const missing = computed(() =>\n this.isOpen()\n ? this.allFields()\n .filter(\n (columnId) =>\n !this.table.filters\n .conditions()\n .some((condition) => condition.columnId === columnId),\n )\n .join(\",\")\n : \"\",\n );\n effect(() => {\n const key = missing();\n if (!key) return;\n untracked(() => {\n for (const columnId of key.split(\",\")) this.table.filters.add(columnId);\n // `add` also marks the condition as being edited, which opens a chip's\n // popover in table mode. There are no chips here; undo it.\n this.table.filters.setEditing(null);\n });\n });\n }\n\n protected conditionsOf(columnId: string): TableFilterCondition[] {\n return this.table.filters.conditions().filter((condition) => condition.columnId === columnId);\n }\n\n protected onOpenChange(open: boolean): void {\n this.isOpen.set(open);\n if (open) return;\n this.expanded.set(null);\n // The drafts nobody filled in.\n for (const condition of this.table.filters.conditions()) {\n if (!this.table.filters.describe(condition).complete) this.table.filters.remove(condition.id);\n }\n }\n\n /** Only what is applied: the drafts stay, so every section keeps its editor. */\n protected clearApplied(): void {\n for (const condition of this.applied()) this.table.filters.remove(condition.id);\n }\n}\n","import { Component, computed } from \"@angular/core\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport {\n UioButton,\n UioDivider,\n UioMenu,\n UioMenuCheckboxItem,\n UioMenuGroup,\n UioMenuGroupLabel,\n UioMenuItem,\n UioMenuRadioGroup,\n UioMenuRadioItem,\n UioMenuSeparator,\n UioMenuTrigger,\n UioSearchInput,\n} from \"@ui-organized/angular\";\nimport { toggleableColumns } from \"@ui-organized/table-core\";\nimport { injectDataTable } from \"../core/table-context.js\";\nimport { UioTableReorderToggle } from \"./table-reorder-toggle.js\";\nimport { UioTableSelectionBar } from \"./table-selection-bar.js\";\nimport { UioTableFilterSheet, UioTableSortSheet } from \"./table-sheets.js\";\nimport type { TableAction } from \"../core/types.js\";\nimport { internalGlyph as glyph } from \"@ui-organized/angular\";\nimport type { IconName } from \"@ui-organized/angular\";\n\n/**\n * The row above the table: search, filters, and the controls that change what\n * the table shows rather than what it contains.\n *\n * Not a `UioToolbar` — that is a `role=\"toolbar\"` with roving focus, which is\n * right for a cluster of icon buttons and wrong for a row containing a text\n * input.\n *\n * ── Why the controls are inline rather than six exported parts ──────────────\n *\n * React, Vue and Svelte export `TableSearch`, `TableSortMenu`, `TableViewOptions`,\n * `TableExportMenu`, `TableActions` and `TableScrollButtons` separately, and each\n * renders exactly the element it is — a fragment, in effect. **An Angular\n * component always has a host element**, so each of those would put a node in\n * the DOM that the other three do not render, and every parity case would differ.\n *\n * A directive on the caller's element is the usual escape, and it does not work\n * here: these parts configure themselves *from the table* rather than from\n * bindings, so a host directive would need the caller to bind what the part\n * already knows.\n *\n * So Angular's layer 2 is one part coarser here. The toolbar is still a part —\n * `<div uioTableToolbar>` — and everything it composes is still core's decision;\n * what a consumer loses is the ability to reorder the six controls, which the\n * other three allow. Recorded rather than hidden.\n */\n@Component({\n selector: \"div[uioTableToolbar]\",\n standalone: true,\n imports: [\n UioButton,\n UioDivider,\n UioMenu,\n UioMenuTrigger,\n UioMenuGroup,\n UioMenuGroupLabel,\n UioMenuItem,\n UioMenuCheckboxItem,\n UioMenuRadioGroup,\n UioMenuRadioItem,\n UioMenuSeparator,\n UioSearchInput,\n UioTableSelectionBar,\n UioTableReorderToggle,\n UioTableSortSheet,\n UioTableFilterSheet,\n NgTemplateOutlet,\n ],\n host: { class: \"data-table__toolbar\" },\n template: `\n @if (searchable()) {\n <div\n uioSearchInput\n class=\"data-table__search\"\n [size]=\"table.size()\"\n [value]=\"table.search()\"\n placeholder=\"Search\"\n [aria-label]=\"searchLabel()\"\n (valueChange)=\"table.setSearch($event)\"\n ></div>\n }\n <div class=\"data-table__toolbar-spacer\"></div>\n\n <!--\n While rows are selected, the bulk actions take the place of the table's\n own controls. What to do with the selection is the decision in front of\n the user; clearing it brings the controls back.\n -->\n @if (hasSelection()) {\n <div uioTableSelectionBar></div>\n <!-- Stays: \"Download selected rows\" and \"Copy selection\" are actions on\n the selection, and live nowhere else. -->\n <ng-container [ngTemplateOutlet]=\"exportMenu\" />\n } @else {\n <!--\n The developer's own header buttons. Real buttons rather than an overflow\n menu, because these are the actions a page is *for*: a primary action\n hidden behind a menu is a primary action nobody finds.\n -->\n @if (actions().length > 0) {\n <div class=\"data-table__toolbar-actions\">\n @for (action of actions(); track action.id) {\n <button\n uioButton\n [intent]=\"action.intent ?? 'tertiary'\"\n [size]=\"table.size()\"\n [icon]=\"iconOf(action)\"\n [disabled]=\"!!action.disabled\"\n [attr.aria-label]=\"isIconOnly(action) ? action.label : null\"\n (click)=\"action.onRun()\"\n >\n @if (!isIconOnly(action)) {\n {{ action.label }}\n }\n </button>\n }\n </div>\n <!--\n Only when there is something on both sides of it. A rule with nothing to\n its left is a rule separating the toolbar from its own edge.\n -->\n <div uioDivider orientation=\"vertical\" class=\"data-table__toolbar-divider\"></div>\n }\n\n <!--\n Card mode trades the two menus for labelled buttons that open a bottom\n sheet each, with what is applied counted on the button: there are no\n column headers to sort from and no room for a row of chips above the\n cards.\n -->\n @if (cards()) {\n @if (sortMenu()) {\n <div uioTableSortSheet></div>\n }\n @if (filterable()) {\n <div uioTableFilterSheet></div>\n }\n } @else {\n <!--\n Sorting from the header rather than from a column. The column headers\n already sort, so in table mode this is a convenience — in **card mode it is\n the only sort control there is**, and a table that silently loses the\n ability to sort at 640px is a table that is broken on phones.\n -->\n @if (sortMenu()) {\n <button\n uioButton\n uioMenuTrigger\n [menu]=\"sortMenuSurface\"\n intent=\"secondary\"\n [size]=\"table.size()\"\n [icon]=\"sortIcon()\"\n aria-label=\"Sort\"\n ></button>\n <uio-menu #sortMenuSurface=\"uioMenu\" align=\"end\" class=\"data-table__sort-menu\">\n <div uioMenuGroup>\n <div uioMenuGroupLabel>Sort by</div>\n <div uioMenuRadioGroup [value]=\"activeSortId()\" (valueChange)=\"chooseColumn($event)\">\n @for (column of sortableColumns(); track column.id) {\n <div uioMenuRadioItem [value]=\"column.id\">{{ headerOf(column) }}</div>\n }\n </div>\n </div>\n <div uioMenuSeparator></div>\n <div uioMenuGroup>\n <div uioMenuGroupLabel>Direction</div>\n <div\n uioMenuRadioGroup\n [value]=\"sortDirection()\"\n (valueChange)=\"chooseDirection($event)\"\n >\n <!--\n Disabled rather than hidden: the choice is always part of the\n menu's shape, and a menu that changes length as you use it is\n harder to aim at the second time.\n -->\n <div uioMenuRadioItem value=\"asc\" [disabled]=\"!activeSortId()\">Ascending</div>\n <div uioMenuRadioItem value=\"desc\" [disabled]=\"!activeSortId()\">Descending</div>\n </div>\n </div>\n @if (activeSortId()) {\n <div uioMenuSeparator></div>\n <div uioMenuItem value=\"clear-sorting\" (select)=\"table.table.setSorting([])\">\n Clear sorting\n </div>\n }\n </uio-menu>\n }\n\n @if (filterable() && filterFields().length > 0) {\n <!--\n aria-label on the trigger also names the menu it opens: the machine\n points the menu's aria-labelledby at its trigger, which wins over any\n aria-label on the content. So the button's name has to be the menu's name\n too — \"Add filter\", not \"Filter\".\n\n A field that already carries conditions stays in the list — several\n conditions on one column is the point — with a count so it is obvious\n this adds another rather than replacing.\n -->\n <button\n uioButton\n uioMenuTrigger\n [menu]=\"filterSurface\"\n intent=\"secondary\"\n [size]=\"table.size()\"\n [icon]=\"glyph('filter')\"\n aria-label=\"Add filter\"\n ></button>\n <uio-menu\n #filterSurface=\"uioMenu\"\n align=\"end\"\n class=\"data-table__filter-picker\"\n (select)=\"table.filters.add($event)\"\n >\n @for (field of filterFields(); track field.columnId) {\n <div uioMenuItem [value]=\"field.columnId\">\n {{ field.count > 0 ? field.label + \" (\" + field.count + \")\" : field.label }}\n </div>\n }\n </uio-menu>\n }\n }\n\n <ng-container [ngTemplateOutlet]=\"exportMenu\" />\n\n <!--\n Column visibility, and — when reordering is on — the keyboard-reachable\n half of reordering. A drag-only affordance fails the a11y gate, so the menu\n is the primary control and the drag is the enhancement.\n -->\n @if (hideable() && toggleable().length > 0) {\n <button\n uioButton\n uioMenuTrigger\n [menu]=\"columnsSurface\"\n intent=\"secondary\"\n [size]=\"table.size()\"\n [icon]=\"glyph('settings')\"\n aria-label=\"Columns\"\n ></button>\n <uio-menu #columnsSurface=\"uioMenu\" align=\"end\">\n <div uioMenuGroup>\n <div uioMenuGroupLabel>Visible columns</div>\n @for (column of toggleable(); track column.id) {\n <div\n uioMenuCheckboxItem\n [value]=\"column.id\"\n [checked]=\"column.getIsVisible()\"\n (checkedChange)=\"column.toggleVisibility($event)\"\n >\n {{ headerOf(column) }}\n </div>\n }\n </div>\n @if (table.options.reorderable) {\n <div uioMenuSeparator></div>\n <div uioMenuGroup>\n <div uioMenuGroupLabel>Reset</div>\n <div uioMenuItem value=\"reset-order\" (select)=\"table.table.resetColumnOrder()\">\n Reset column order\n </div>\n <div uioMenuItem value=\"reset-sizing\" (select)=\"table.table.resetColumnSizing()\">\n Reset column widths\n </div>\n </div>\n }\n </uio-menu>\n }\n\n <!--\n Reorder mode, for reorderable: \"toggle\". Card mode has no headers to\n move, so it never offers it.\n -->\n @if (reorderToggle()) {\n <button\n uioButton\n uioTableReorderToggle\n #reorder=\"uioTableReorderToggle\"\n [intent]=\"reorder.active() ? 'primary' : 'secondary'\"\n [size]=\"table.size()\"\n >\n {{ reorder.text() }}\n </button>\n }\n }\n\n <!--\n Left and right, for a table wider than its viewport. The scrollbar is the\n primary affordance; this is the *visible* one. Absent rather than disabled\n when everything fits: a pair of permanently dead buttons in every toolbar\n is worse noise than no buttons at all.\n -->\n @if (scroll().overflowing) {\n <div class=\"data-table__scroll-buttons\">\n <button\n uioButton\n intent=\"secondary\"\n [size]=\"table.size()\"\n [icon]=\"glyph('chevron-left')\"\n aria-label=\"Scroll left\"\n [disabled]=\"!scroll().canScrollLeft\"\n (click)=\"table.scroll.by(-1)\"\n ></button>\n <button\n uioButton\n intent=\"secondary\"\n [size]=\"table.size()\"\n [icon]=\"glyph('chevron-right')\"\n aria-label=\"Scroll right\"\n [disabled]=\"!scroll().canScrollRight\"\n (click)=\"table.scroll.by(1)\"\n ></button>\n </div>\n }\n\n <!--\n Rendered from both branches above: while rows are selected the export\n menu stays beside the bulk actions, because two of its items act on the\n selection and live nowhere else.\n -->\n <ng-template #exportMenu>\n <!--\n Export scopes are separate items rather than one button, because \"download\"\n means three different things depending on what is filtered and what is\n ticked — and silently picking one is how an export loses rows.\n -->\n @if (exportable()) {\n <button\n uioButton\n uioMenuTrigger\n [menu]=\"exportSurface\"\n intent=\"secondary\"\n [size]=\"table.size()\"\n [icon]=\"glyph('download')\"\n aria-label=\"Export\"\n ></button>\n <uio-menu #exportSurface=\"uioMenu\" align=\"end\" (select)=\"runExport($event)\">\n <div uioMenuItem value=\"csv-view\" [icon]=\"glyph('download')\">Download this view (CSV)</div>\n <div uioMenuItem value=\"csv-selected\" [icon]=\"glyph('download')\" [disabled]=\"!hasSelection()\">\n Download selected rows (CSV)\n </div>\n <div uioMenuItem value=\"csv-all\" [icon]=\"glyph('download')\">Download all rows (CSV)</div>\n <div uioMenuSeparator></div>\n <div uioMenuItem value=\"copy\" [icon]=\"glyph('copy')\" [disabled]=\"!hasSelection()\">\n Copy selection to clipboard\n </div>\n </uio-menu>\n }\n </ng-template>\n `,\n})\nexport class UioTableToolbar {\n protected readonly glyph = glyph;\n protected readonly table = injectDataTable();\n\n protected readonly searchable = computed(() => this.table.options.searchable ?? true);\n protected readonly hideable = computed(() => this.table.options.hideableColumns ?? false);\n protected readonly exportable = computed(() => this.table.options.exportable ?? false);\n protected readonly filterable = computed(() => this.table.options.filterable ?? true);\n protected readonly actions = computed(() => this.table.options.actions ?? []);\n protected readonly scroll = computed(() => this.table.scroll.state());\n protected readonly cards = computed(() => this.table.mode() === \"cards\");\n protected readonly hasSelection = computed(() => this.table.selection.count() > 0);\n protected readonly reorderToggle = computed(\n () => this.table.reorder.mode() === \"toggle\" && !this.cards(),\n );\n /**\n * The export menu's items report through `UioMenu (select)`, not their own:\n * `UioMenuItem` has no `select` output, so `(select)` on an item binds a DOM\n * event that never fires.\n */\n protected runExport(value: string) {\n if (value === \"copy\") void this.table.copySelection(\"selected\");\n else if (value === \"csv-view\") this.table.exportCsv(\"view\");\n else if (value === \"csv-selected\") this.table.exportCsv(\"selected\");\n else if (value === \"csv-all\") this.table.exportCsv(\"all\");\n }\n\n protected readonly searchLabel = computed(() => `Search ${this.table.label()}`);\n protected readonly filterFields = computed(() => this.table.filters.fields());\n\n protected readonly sortableColumns = computed(() =>\n this.table.table.getAllLeafColumns().filter((column) => column.getCanSort()),\n );\n protected readonly toggleable = computed(() =>\n toggleableColumns(this.table.table.getAllLeafColumns()),\n );\n protected readonly sortMenu = computed(\n () =>\n (this.table.options.sortMenu ?? true) &&\n (this.table.options.sortable ?? true) &&\n this.sortableColumns().length > 0,\n );\n\n private readonly activeSort = computed(() => this.table.state().sorting?.[0]);\n protected readonly activeSortId = computed(() => this.activeSort()?.id ?? \"\");\n protected readonly sortDirection = computed(() => (this.activeSort()?.desc ? \"desc\" : \"asc\"));\n protected readonly sortIcon = computed(() =>\n glyph(this.activeSortId() ? (this.activeSort()?.desc ? \"sort-desc\" : \"sort-asc\") : \"sort\"),\n );\n\n protected iconOf(action: TableAction): IconName | undefined {\n return action.icon;\n }\n // An icon-only button drops its visible label but keeps its accessible one —\n // the label is the whole name either way.\n protected isIconOnly(action: TableAction): boolean {\n return action.iconOnly === true && action.icon !== undefined;\n }\n protected headerOf(column: { id: string; columnDef: { header?: unknown } }): string {\n return typeof column.columnDef.header === \"string\" ? column.columnDef.header : column.id;\n }\n protected chooseColumn(id: string): void {\n this.table.table.setSorting(id ? [{ id, desc: this.sortDirection() === \"desc\" }] : []);\n }\n protected chooseDirection(next: string): void {\n const id = this.activeSortId();\n if (id) this.table.table.setSorting([{ id, desc: next === \"desc\" }]);\n }\n}\n","import { Component, computed, input } from \"@angular/core\";\nimport { UioPagination, UioSelect } from \"@ui-organized/angular\";\nimport { PAGE_SIZE_OPTIONS, pageSizeOptions } from \"@ui-organized/table-core\";\nimport { injectDataTable } from \"../core/table-context.js\";\n\n/**\n * Wraps the library's `Pagination`, which takes a page *count* — the conversion\n * from row count and page size happens here so consumers never do that\n * arithmetic themselves and get the off-by-one wrong.\n */\n@Component({\n selector: \"div[uioTablePagination]\",\n standalone: true,\n host: { class: \"data-table__pagination\" },\n imports: [UioPagination, UioSelect],\n template: `\n <!--\n Announced on change, because the rows it describes change underneath a\n screen reader user with no other signal that anything happened.\n -->\n <span class=\"data-table__pagination-status\" aria-live=\"polite\">{{ status() }}</span>\n\n <nav\n uioPagination\n [page]=\"pageIndex() + 1\"\n [count]=\"pageCount()\"\n (pageChange)=\"table.table.setPageIndex($event - 1)\"\n ></nav>\n\n @if (showPageSize()) {\n <div class=\"data-table__page-size\">\n <div\n uioSelect\n [size]=\"table.size()\"\n variant=\"ghost\"\n label=\"Rows per page\"\n [value]=\"pageSizeValue()\"\n [options]=\"sizeOptions()\"\n (valueChange)=\"table.table.setPageSize(+$event)\"\n ></div>\n </div>\n }\n `,\n})\nexport class UioTablePagination {\n readonly showPageSize = input(true);\n readonly pageSizes = input<number[]>([...PAGE_SIZE_OPTIONS]);\n\n protected readonly table = injectDataTable();\n private readonly pagination = computed(() => this.table.state().pagination);\n protected readonly pageIndex = computed(() => this.pagination()?.pageIndex ?? 0);\n protected readonly pageSize = computed(() => this.pagination()?.pageSize ?? 10);\n protected readonly pageSizeValue = computed(() => String(this.pageSize()));\n private readonly total = computed(() => this.table.selection.totalMatching());\n protected readonly pageCount = computed(() =>\n Math.max(1, Math.ceil(this.total() / this.pageSize())),\n );\n\n protected readonly status = computed(() => {\n const total = this.total();\n if (total === 0) return \"No rows\";\n const first = this.pageIndex() * this.pageSize() + 1;\n const last = Math.min(total, (this.pageIndex() + 1) * this.pageSize());\n return `${first}–${last} of ${total}`;\n });\n\n protected readonly sizeOptions = computed(() =>\n pageSizeOptions(this.pageSizes(), this.pageSize()).map((entry) => ({\n value: String(entry),\n label: String(entry),\n })),\n );\n}\n","import { Component, computed, effect, inject } from \"@angular/core\";\nimport { HostPresence } from \"@ui-organized/angular\";\nimport { injectDataTable } from \"../core/table-context.js\";\nimport { UioTableFilters } from \"./table-filters.js\";\n\n/**\n * The row under the toolbar: what is filtered.\n *\n * The selection's bulk actions used to share this line. They now replace the\n * toolbar's own controls while anything is selected (see `UioTableToolbar`), so\n * acting on the selection happens in the row the user was already reading.\n *\n * It renders nothing at all until there is a filter to show, so an empty row\n * never takes a slice of the table's `gap` — and nothing in card mode, where\n * the filter sheet holds them.\n */\n@Component({\n selector: \"div[uioTableSubBar]\",\n standalone: true,\n providers: [HostPresence],\n imports: [UioTableFilters],\n host: { class: \"data-table__subbar\" },\n // Gated, not just detached: HostPresence takes the host out of the DOM, but\n // the chips under it would still be built — and in card mode each chip's\n // editor popover would attach an overlay nobody can reach. React's sub-bar\n // returns null and mounts none of it; this is the same.\n template: `\n @if (render()) {\n <div uioTableFilters></div>\n }\n `,\n})\nexport class UioTableSubBar {\n private readonly presence = inject(HostPresence);\n\n constructor() {\n // A row that renders nothing must not hold a line of layout: React returns\n // null, and an Angular host element cannot — so it takes itself out of the\n // DOM and puts itself back. The filters do the same, one level in.\n effect(() => this.presence.set(this.render()));\n }\n protected readonly table = injectDataTable();\n // In card mode every filter lives in the filter sheet, and the toolbar's\n // Filter button counts them; a chips row would repeat it above a list that is\n // already short of room.\n protected readonly render = computed(\n () =>\n this.table.options.filterable !== false &&\n this.table.filters.conditions().length > 0 &&\n this.table.mode() !== \"cards\",\n );\n}\n","import { Component, ElementRef, computed, effect, inject, input, viewChild } from \"@angular/core\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport { FlexRender } from \"@tanstack/angular-table\";\nimport { UioCheckbox } from \"@ui-organized/angular\";\nimport { cardFieldOrder, type RowData, type TableRowModel } from \"@ui-organized/table-core\";\nimport { injectDataTable } from \"../core/table-context.js\";\nimport { UioTableRowActions } from \"./table-row-actions.js\";\nimport { UioTableEmpty } from \"./table-states.js\";\n\n/**\n * One card: the row's title, its controls in the top-right corner, and every\n * other visible column as a label and value.\n *\n * Title first, then the row's controls: the actions menu, and the checkbox\n * last, in the corner a thumb reaches and where a ticked card is easiest to scan\n * for down a list.\n */\n@Component({\n selector: \"li[uioTableCard]\",\n standalone: true,\n imports: [FlexRender, NgTemplateOutlet, UioCheckbox, UioTableRowActions],\n host: {\n class: \"data-table__card\",\n \"[class.data-table__card--selected]\": \"selected()\",\n \"[attr.data-index]\": \"index()\",\n \"[attr.data-row-id]\": \"row().id\",\n },\n template: `\n <div class=\"data-table__card-header\">\n <!--\n A button rather than a clickable card: a card is not an interactive\n element, and making one is how a keyboard user loses the row.\n -->\n @if (clickable()) {\n <button\n type=\"button\"\n class=\"data-table__card-title data-table__sort-button\"\n (click)=\"table.activate(row())\"\n >\n <ng-container [ngTemplateOutlet]=\"title\" />\n </button>\n } @else {\n <span class=\"data-table__card-title\"><ng-container [ngTemplateOutlet]=\"title\" /></span>\n }\n @if (hasActions() || selectable()) {\n <span class=\"data-table__card-controls\">\n @if (hasActions()) {\n <span\n uioTableRowActions\n style=\"display: contents\"\n [row]=\"row().original\"\n [label]=\"'Actions for ' + titleText()\"\n ></span>\n }\n @if (selectable()) {\n <label\n uioCheckbox\n [checked]=\"selected()\"\n [attr.aria-label]=\"'Select ' + titleText()\"\n (checkedChange)=\"table.selection.toggle(row().id, $event)\"\n ></label>\n }\n </span>\n }\n </div>\n\n <dl class=\"data-table__card-fields\">\n @for (field of fields(); track field.id) {\n <dt class=\"data-table__card-label\">{{ field.label }}</dt>\n <dd class=\"data-table__card-value\">\n <ng-container *flexRenderCell=\"field.cell; let rendered\">{{ rendered }}</ng-container>\n </dd>\n }\n </dl>\n\n <ng-template #title>\n @if (primaryCell(); as cell) {\n <ng-container *flexRenderCell=\"cell; let rendered\">{{ rendered }}</ng-container>\n } @else {\n {{ row().id }}\n }\n </ng-template>\n `,\n})\nexport class UioTableCard<T extends RowData> {\n readonly row = input.required<TableRowModel<T>>();\n readonly index = input.required<number>();\n /** Column ids in card order — `cardFieldOrder`, computed once by the list. */\n readonly fieldOrder = input.required<readonly string[]>();\n\n protected readonly table = injectDataTable<T>();\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n protected readonly selected = computed(() => this.table.selection.isSelected(this.row().id));\n protected readonly selectable = computed(() => this.table.selection.mode() !== \"none\");\n protected readonly hasActions = computed(() => (this.table.options.rowActions?.length ?? 0) > 0);\n protected readonly clickable = computed(\n () => Boolean(this.table.options.detail) || Boolean(this.table.options.onRowClick),\n );\n\n private readonly cells = computed(() => this.row().getVisibleCells());\n protected readonly primaryCell = computed(() => {\n const id = this.table.primaryColumnId();\n return id ? this.cells().find((cell) => cell.column.id === id) : undefined;\n });\n /** The words the card's controls are named with: \"Select Ada Lovelace\". */\n protected readonly titleText = computed(() => {\n const value = this.primaryCell()?.getValue();\n return typeof value === \"string\" ? value : this.row().id;\n });\n\n protected readonly fields = computed(() =>\n this.fieldOrder().flatMap((columnId) => {\n const cell = this.cells().find((candidate) => candidate.column.id === columnId);\n if (!cell) return [];\n const header = this.table.table.getColumn(columnId)?.columnDef.header;\n return [{ id: columnId, cell, label: typeof header === \"string\" ? header : columnId }];\n }),\n );\n\n constructor() {\n // Card heights vary with content, so the virtualizer measures rather than\n // estimates. Angular has no per-element ref callback; the card measures\n // itself, exactly as a table row does.\n effect(() => {\n if (this.table.virtual.enabled()) {\n this.table.virtual.virtualizer().measureElement(this.host.nativeElement);\n }\n });\n }\n}\n\n/**\n * Card mode: one card per row, below the breakpoint.\n *\n * The table is *replaced*, not hidden — rendering both trees and hiding one with\n * a container query would double the DOM and defeat virtualization on exactly\n * the devices that can least afford it. Selection, row actions and the detail\n * sheet all keep working, because they are table state rather than table markup.\n *\n * The host is `display: contents` and the list is inside it, because the list\n * is a `<ul>` with rows and a `<table>` with the empty state without them, and\n * an Angular host element cannot change its tag.\n */\n@Component({\n selector: \"div[uioTableCards]\",\n standalone: true,\n imports: [UioTableCard, UioTableEmpty],\n host: { style: \"display: contents\" },\n template: `\n @if (table.renderRows().length === 0) {\n <div class=\"data-table__cards\">\n <table class=\"data-table__table\">\n <caption class=\"data-table__sr-only\">\n {{\n table.label()\n }}\n </caption>\n <tbody>\n <tr uioTableEmpty></tr>\n </tbody>\n </table>\n </div>\n } @else {\n <ul\n #list\n class=\"data-table__cards\"\n [attr.aria-label]=\"table.label()\"\n [style.--data-table-max-height]=\"maxHeight()\"\n >\n @if (spacers().top > 0) {\n <li\n class=\"data-table__card-spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"spacers().top\"\n ></li>\n }\n @for (entry of table.renderRows(); track entry.row.id) {\n <li uioTableCard [row]=\"entry.row\" [index]=\"entry.index\" [fieldOrder]=\"fieldOrder()\"></li>\n }\n @if (spacers().bottom > 0) {\n <li\n class=\"data-table__card-spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"spacers().bottom\"\n ></li>\n }\n </ul>\n }\n `,\n})\nexport class UioTableCards {\n protected readonly table = injectDataTable();\n private readonly list = viewChild<ElementRef<HTMLElement>>(\"list\");\n\n protected readonly fieldOrder = computed(() => cardFieldOrder(this.table.options.columns));\n protected readonly spacers = computed(() =>\n this.table.virtual.enabled() ? this.table.virtual.spacers() : { top: 0, bottom: 0 },\n );\n protected readonly maxHeight = computed(() => {\n const cap = this.table.options.maxHeight;\n if (cap === undefined) return null;\n return typeof cap === \"number\" ? `${cap}px` : cap;\n });\n\n constructor() {\n // The list is the scroll container in card mode, so it is what the\n // virtualizer watches — the same signal the table viewport sets.\n effect((onCleanup) => {\n const element = this.list()?.nativeElement ?? null;\n this.table.viewportRef.set(element);\n onCleanup(() => this.table.viewportRef.set(null));\n });\n }\n}\n","import {\n Component,\n Injector,\n OnInit,\n computed,\n forwardRef,\n inject,\n input,\n runInInjectionContext,\n} from \"@angular/core\";\nimport type {\n DataTableQuery,\n ResponsiveConfig,\n RowData,\n SelectionMode,\n TableEditPatch,\n TableSize,\n TableVariant,\n VirtualConfig,\n ReorderSetting,\n} from \"@ui-organized/table-core\";\nimport { createDataTable } from \"./core/create-data-table.js\";\nimport { UIO_DATA_TABLE } from \"./core/table-context.js\";\nimport type {\n AngularNode,\n DataTableApi,\n BulkAction,\n DetailConfig,\n EmptyStateConfig,\n RowAction,\n TableAction,\n TableColumn,\n TableFilterInput,\n UseDataTableOptions,\n} from \"./core/types.js\";\nimport { UioToolbar } from \"@ui-organized/angular\";\nimport { UioTable, UioTableBody, UioTableHeader, UioTableViewport } from \"./components/table.js\";\nimport { UioTableCards } from \"./components/table-cards.js\";\nimport { UioTablePagination } from \"./components/table-pagination.js\";\nimport { UioTableSelectionFooter } from \"./components/table-selection-footer.js\";\nimport { UioTableSubBar } from \"./components/table-sub-bar.js\";\nimport { UioTableToolbar } from \"./components/table-toolbar.js\";\n\n/**\n * Layer 3: the whole table from an input object.\n *\n * It composes exactly the parts a consumer would compose by hand — which is the\n * test of whether layer 2 is real. Anything this does that the parts cannot is a\n * gap in the parts, not a feature of the wrapper.\n *\n * ── Why the inputs are spelled out ──────────────────────────────────────────\n *\n * React, Vue and Svelte all hand their whole props object to the composable. An\n * Angular component has no such object: `input()` is one signal per option, and\n * the options getter below assembles them. That is the last of the three costs\n * Angular carries, and it is the cheap one — it costs length, not correctness,\n * and it buys a properly typed template API in exchange.\n */\n@Component({\n selector: \"div[uioDataTable]\",\n standalone: true,\n // `UioTable` as a host directive rather than an element in the template: the\n // caller's own `<div uioDataTable>` *is* `.data-table`, so there is no wrapper\n // node. React's `<DataTable>` renders that div as its root and nothing above\n // it; this is how Angular says the same thing.\n hostDirectives: [UioTable],\n imports: [\n UioToolbar,\n UioTableToolbar,\n UioTableSubBar,\n UioTableViewport,\n UioTableHeader,\n UioTableBody,\n UioTablePagination,\n UioTableSelectionFooter,\n UioTableCards,\n ],\n providers: [\n {\n provide: UIO_DATA_TABLE,\n /**\n * The api is built once, on the first ask, and this provider hands that\n * same instance to every part below rather than building a second one.\n */\n useFactory: (host: UioDataTable<never>) => host.ensureApi(),\n deps: [forwardRef(() => UioDataTable)],\n },\n ],\n template: `\n <div uioTableToolbar></div>\n <div uioTableSubBar></div>\n\n <!--\n Below the breakpoint the table is replaced by one card per row, not\n hidden: both trees at once would double the DOM and defeat\n virtualization on exactly the devices that can least afford it.\n -->\n @if (cards()) {\n <div uioTableCards></div>\n <!-- No viewport to ride in: the table view's footer lives inside the\n viewport, so only card mode places one here. -->\n <div uioTableSelectionFooter></div>\n } @else {\n <div uioTableViewport>\n <thead uioTableHeader></thead>\n <tbody uioTableBody></tbody>\n </div>\n }\n\n @if (paginated()) {\n <div uioTablePagination></div>\n }\n `,\n})\nexport class UioDataTable<T extends RowData> implements OnInit {\n readonly data = input.required<readonly T[]>();\n readonly columns = input.required<readonly TableColumn<T>[]>();\n /**\n * The table's accessible name. Required, not optional: it becomes the\n * `<caption>`, and a table announced as \"table\" and nothing else is the most\n * common data-table accessibility failure there is.\n */\n readonly label = input.required<string>();\n readonly captionVisible = input(false);\n readonly getRowId = input<((row: T, index: number) => string) | undefined>(undefined);\n\n readonly size = input<TableSize>(\"md\");\n readonly variant = input<TableVariant>(\"default\");\n\n readonly selection = input<SelectionMode>(\"none\");\n readonly sortable = input(true);\n readonly filterable = input(true);\n readonly searchable = input(true);\n readonly paginated = input(false);\n readonly pageSize = input<number | undefined>(undefined);\n readonly resizable = input(false);\n /**\n * Lets people rearrange the columns by dragging a header, or with its move\n * buttons (and Alt+Arrow on a focused header). Adds \"Reset column order\" to\n * the Columns menu.\n *\n * - `true` / `\"always\"`: movable at any time; the move buttons appear on\n * hover and focus.\n * - `\"toggle\"`: movable only in a reorder mode, switched from the toolbar.\n *\n * The table's own columns (selection, row actions) and pinned columns stay\n * where they are.\n */\n readonly reorderable = input<ReorderSetting>(false);\n readonly hideableColumns = input(false);\n readonly sortMenu = input(true);\n readonly exportable = input(false);\n\n readonly virtual = input<boolean | VirtualConfig>(true);\n readonly maxHeight = input<number | string | undefined>(undefined);\n\n readonly loading = input(false);\n readonly error = input<AngularNode>(undefined);\n readonly empty = input<EmptyStateConfig | undefined>(undefined);\n\n readonly manual = input(false);\n readonly rowCount = input<number | undefined>(undefined);\n readonly onQueryChange = input<((query: DataTableQuery) => void) | undefined>(undefined);\n readonly onLoadMore = input<(() => void) | undefined>(undefined);\n\n readonly onRowClick = input<((row: T) => void) | undefined>(undefined);\n readonly onEdit = input<((patch: TableEditPatch<T>) => void | Promise<void>) | undefined>(\n undefined,\n );\n readonly rowActions = input<RowAction<T>[] | undefined>(undefined);\n readonly bulkActions = input<BulkAction<T>[] | undefined>(undefined);\n readonly actions = input<TableAction[] | undefined>(undefined);\n readonly detail = input<DetailConfig<T> | undefined>(undefined);\n readonly responsive = input<ResponsiveConfig | undefined>(undefined);\n\n readonly defaultSorting = input<{ id: string; desc: boolean }[] | undefined>(undefined);\n readonly defaultColumnVisibility = input<Record<string, boolean> | undefined>(undefined);\n readonly defaultFilters = input<TableFilterInput[] | undefined>(undefined);\n\n /** Every input, as the one object the shared factory reads. */\n private readonly options = computed<UseDataTableOptions<T>>(() => ({\n data: this.data(),\n columns: this.columns(),\n label: this.label(),\n captionVisible: this.captionVisible(),\n getRowId: this.getRowId(),\n size: this.size(),\n variant: this.variant(),\n selection: this.selection(),\n sortable: this.sortable(),\n filterable: this.filterable(),\n searchable: this.searchable(),\n paginated: this.paginated(),\n pageSize: this.pageSize(),\n resizable: this.resizable(),\n reorderable: this.reorderable(),\n hideableColumns: this.hideableColumns(),\n sortMenu: this.sortMenu(),\n exportable: this.exportable(),\n virtual: this.virtual(),\n maxHeight: this.maxHeight(),\n loading: this.loading(),\n error: this.error(),\n empty: this.empty(),\n manual: this.manual(),\n rowCount: this.rowCount(),\n onQueryChange: this.onQueryChange(),\n onLoadMore: this.onLoadMore(),\n onRowClick: this.onRowClick(),\n onEdit: this.onEdit(),\n rowActions: this.rowActions(),\n bulkActions: this.bulkActions(),\n actions: this.actions(),\n detail: this.detail(),\n responsive: this.responsive(),\n defaultSorting: this.defaultSorting(),\n defaultColumnVisibility: this.defaultColumnVisibility(),\n defaultFilters: this.defaultFilters(),\n }));\n\n private readonly injector = inject(Injector);\n\n /**\n * Public because the provider above reads it; not part of the template API.\n *\n * Built in `ngOnInit` rather than in a field initialiser, and that is forced\n * rather than chosen: `createDataTable` reads `data`, `columns` and `label`\n * immediately — `injectTable` has to construct a table out of them — and a\n * **required input has no value during construction**. Angular says so\n * outright (NG0950), and the table simply failed to bootstrap.\n *\n * `runInInjectionContext` because `ngOnInit` is not one, and the factory needs\n * `inject` for `DestroyRef`, `injectTable` and `injectVirtualizer`. The\n * provider above resolves lazily — a child injects it while the view is being\n * created, which is after this has run.\n */\n private created: DataTableApi<T> | null = null;\n\n /**\n * Built on first ask rather than in `ngOnInit`, so the order between this\n * component's lifecycle and a child part's injection stops mattering. Either\n * way the inputs are set by the time it runs, which is the whole constraint.\n */\n ensureApi(): DataTableApi<T> {\n this.created ??= runInInjectionContext(this.injector, () =>\n createDataTable<T>(() => this.options()),\n );\n return this.created;\n }\n\n ngOnInit(): void {\n this.ensureApi();\n }\n\n protected readonly cards = computed(() => this.ensureApi().mode() === \"cards\");\n}\n","/**\n * `@ui-organized/angular-table` — the Angular data table.\n *\n * Three layers, the same three the React, Vue and Svelte packages ship: the\n * `createDataTable` factory, the styled parts, and a batteries-included\n * `<uio-data-table>`. The behaviour underneath all of them is\n * `@ui-organized/table-core`, shared verbatim — same class names, same\n * stylesheet, same token contract, no fork of the logic.\n */\n\n// ── Layer 1: headless ───────────────────────────────────────────────────────\nexport { createDataTable } from \"./lib/core/create-data-table.js\";\nexport { trackStore } from \"./lib/core/track-store.js\";\nexport { createDeferred } from \"./lib/core/create-deferred.js\";\nexport {\n UIO_DATA_TABLE,\n provideDataTable,\n injectDataTable,\n injectOptionalDataTable,\n} from \"./lib/core/table-context.js\";\nexport { selectionColumn, actionsColumn } from \"./lib/core/system-columns.js\";\nexport { UioTableProps, applyElementProps } from \"./lib/core/element-props.js\";\nexport { UioTableElementRef } from \"./lib/core/element-ref.js\";\nexport { UioTableSelectAllCell, UioTableSelectCell } from \"./lib/core/select-cells.js\";\nexport { UioTableActionsHeader } from \"./lib/core/actions-header.js\";\n\nexport type {\n AngularNode,\n BulkAction,\n DataTableApi,\n DetailApi,\n DetailConfig,\n EditApi,\n EmptyStateConfig,\n FilterableField,\n FiltersApi,\n FocusApi,\n HorizontalScrollApi,\n RenderRow,\n RowAction,\n SelectionApi,\n TableAction,\n TableColumn,\n TableEditRenderer,\n TableFilterInput,\n UseDataTableOptions,\n VirtualApi,\n} from \"./lib/core/types.js\";\n\n// ── Layer 2: parts ──────────────────────────────────────────────────────────\nexport {\n UioTable,\n UioTableViewport,\n UioTableHeader,\n UioTableBody,\n} from \"./lib/components/table.js\";\nexport { UioTableHeadCell, UioTableResizeHandle } from \"./lib/components/table-head-cell.js\";\nexport { UioTableRow, UioTableCell } from \"./lib/components/table-row.js\";\nexport { UioTableEmpty, UioTableLoading, UioTableError } from \"./lib/components/table-states.js\";\n/**\n * One part where the other three libraries export seven.\n *\n * `TableSearch`, `TableSortMenu`, `TableViewOptions`, `TableExportMenu`,\n * `TableActions` and `TableScrollButtons` each render exactly the element they\n * are in React, Vue and Svelte — a fragment, in effect. An Angular component\n * always has a host element, so each of those would put a node in the DOM the\n * other three do not render. They are composed inside `UioTableToolbar`\n * instead; see the note there.\n */\nexport { UioTableToolbar } from \"./lib/components/table-toolbar.js\";\n/**\n * `TableFilterAdd` is not exported: like the six toolbar controls, it renders a\n * trigger and a portalled menu and nothing else, so an Angular host element\n * would be a node the other three libraries do not have. It is composed inside\n * `UioTableToolbar` and `UioTableFilters`.\n */\nexport {\n UioTableFilters,\n UioTableFilterChip,\n UioTableFilterEditor,\n UioTableFilterValueEditor,\n focusAfterRemoval,\n} from \"./lib/components/table-filters.js\";\nexport { UioTablePagination } from \"./lib/components/table-pagination.js\";\nexport { UioTableSelectionBar } from \"./lib/components/table-selection-bar.js\";\nexport { UioTableReorderToggle } from \"./lib/components/table-reorder-toggle.js\";\nexport { UioTableSelectionFooter } from \"./lib/components/table-selection-footer.js\";\nexport { UioTableSubBar } from \"./lib/components/table-sub-bar.js\";\nexport { UioTableRowActions } from \"./lib/components/table-row-actions.js\";\nexport { UioTableCards, UioTableCard } from \"./lib/components/table-cards.js\";\n/**\n * Card mode's sort and filter sheets. React also exports `TableSheetButton`;\n * Angular's sheet trigger is a directive on a real `<button>`, which a\n * component cannot wrap without a host element in between, so it has no\n * counterpart here.\n */\nexport {\n UioTableSortSheet,\n UioTableFilterSheet,\n UioTableFilterSheetCondition,\n UioTableSheetSection,\n} from \"./lib/components/table-sheets.js\";\n\n// ── Layer 3: the wrapper ────────────────────────────────────────────────────\nexport { UioDataTable } from \"./lib/data-table.js\";\n\n// Re-exported so a consumer needs one import for the whole table, not two.\nexport type {\n DataTableQuery,\n SelectionMode,\n TableDateDef,\n ReorderSetting,\n TableDateSetting,\n TableFilterCondition,\n TableFilterType,\n TableMode,\n TableRowModel,\n TableRowScope,\n TableSize,\n TableVariant,\n ResponsiveConfig,\n VirtualConfig,\n} from \"@ui-organized/table-core\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["glyph","columnIdOf","selectAllMatchingCore","isEditingCell","isRowSelected","selectionCountCore","i1.UioTable"],"mappings":";;;;;;;;;AAGA;;;;;;;;;;;;;;AAcG;AACG,SAAU,UAAU,CAAO,KAAkB,EAAA;IACjD,MAAM,KAAK,GAAG,MAAM,CAAI,KAAK,CAAC,QAAQ,EAAE,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAC;AACzC,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,C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