@lifecorner/angular-ui-kit 3.32.0 → 3.33.1
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.
- package/fesm2022/lifecorner-angular-ui-kit-bottom-nav.mjs +2 -2
- package/fesm2022/lifecorner-angular-ui-kit-bottom-nav.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-chat.mjs +21 -5
- package/fesm2022/lifecorner-angular-ui-kit-chat.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-combobox.mjs +65 -19
- package/fesm2022/lifecorner-angular-ui-kit-combobox.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-datepicker.mjs +7 -6
- package/fesm2022/lifecorner-angular-ui-kit-datepicker.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-header.mjs +21 -4
- package/fesm2022/lifecorner-angular-ui-kit-header.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-internal-a11y.mjs +21 -1
- package/fesm2022/lifecorner-angular-ui-kit-internal-a11y.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-list.mjs +2 -2
- package/fesm2022/lifecorner-angular-ui-kit-list.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-log-viewer.mjs +2 -2
- package/fesm2022/lifecorner-angular-ui-kit-log-viewer.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-next-step-card.mjs +21 -4
- package/fesm2022/lifecorner-angular-ui-kit-next-step-card.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-notification-center.mjs +2 -2
- package/fesm2022/lifecorner-angular-ui-kit-notification-center.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-select.mjs +5 -4
- package/fesm2022/lifecorner-angular-ui-kit-select.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-sidenav.mjs +4 -4
- package/fesm2022/lifecorner-angular-ui-kit-sidenav.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-table.mjs +2 -2
- package/fesm2022/lifecorner-angular-ui-kit-table.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-tag-input.mjs +2 -2
- package/fesm2022/lifecorner-angular-ui-kit-tag-input.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-textarea.mjs +2 -2
- package/fesm2022/lifecorner-angular-ui-kit-textarea.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-toast.mjs +9 -4
- package/fesm2022/lifecorner-angular-ui-kit-toast.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-tooltip.mjs +7 -0
- package/fesm2022/lifecorner-angular-ui-kit-tooltip.mjs.map +1 -1
- package/package.json +1 -1
- package/src/styles/theme-contrast.spec.ts +14 -6
- package/types/lifecorner-angular-ui-kit-bottom-nav.d.ts +3 -2
- package/types/lifecorner-angular-ui-kit-chat.d.ts +14 -1
- package/types/lifecorner-angular-ui-kit-combobox.d.ts +18 -1
- package/types/lifecorner-angular-ui-kit-datepicker.d.ts +4 -1
- package/types/lifecorner-angular-ui-kit-header.d.ts +26 -0
- package/types/lifecorner-angular-ui-kit-internal-a11y.d.ts +12 -1
- package/types/lifecorner-angular-ui-kit-list.d.ts +6 -1
- package/types/lifecorner-angular-ui-kit-next-step-card.d.ts +15 -0
- package/types/lifecorner-angular-ui-kit-select.d.ts +7 -0
- package/types/lifecorner-angular-ui-kit-sidenav.d.ts +3 -1
- package/types/lifecorner-angular-ui-kit-toast.d.ts +17 -3
- package/types/lifecorner-angular-ui-kit-tooltip.d.ts +7 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecorner-angular-ui-kit-table.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/table/table-cell.directive.ts","../../../../libs/angular-ui-kit/src/lib/table/table.component.ts","../../../../libs/angular-ui-kit/src/lib/table/table.component.html"],"sourcesContent":["import { Directive, input, TemplateRef, inject } from '@angular/core';\n\n/**\n * Directive for defining custom cell templates in the Table component.\n *\n * @example\n * ```html\n * <lc-table [columns]=\"columns\" [data]=\"data\">\n * <ng-template lcTableCell=\"status\" let-row>\n * <lc-badge [variant]=\"row.status\">{{ row.status }}</lc-badge>\n * </ng-template>\n * </lc-table>\n * ```\n */\n@Directive({\n selector: '[lcTableCell]',\n standalone: true,\n})\nexport class TableCellDirective {\n /** The column key this template applies to */\n readonly columnKey = input('', { alias: 'lcTableCell' });\n\n public template = inject(TemplateRef<{ $implicit: Record<string, unknown> }>);\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n ElementRef,\n input,\n output,\n computed,\n signal,\n linkedSignal,\n viewChild,\n viewChildren,\n afterRenderEffect,\n ContentChildren,\n QueryList,\n} from '@angular/core';\nimport { NgStyle, NgTemplateOutlet } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { TableCellDirective } from './table-cell.directive';\nimport { InputComponent } from '@lifecorner/angular-ui-kit/input';\nimport { SelectComponent } from '@lifecorner/angular-ui-kit/select';\nimport { ButtonComponent, ButtonVariant } from '@lifecorner/angular-ui-kit/button';\nimport { IconComponent, ɵprovideKitIcons } from '@lifecorner/angular-ui-kit/icon';\nimport { ICON_CHEVRON_RIGHT } from '@lifecorner/angular-ui-kit/icons';\n\ntype TableCellClass = string | ((\n value: unknown,\n row: Record<string, unknown>,\n column: TableColumn,\n rowIndex: number\n) => string);\n\ntype TableCellStyle = Record<string, string> | ((\n value: unknown,\n row: Record<string, unknown>,\n column: TableColumn,\n rowIndex: number\n) => Record<string, string>);\n\nexport interface TableColumn {\n key: string;\n label: string;\n sortable?: boolean;\n filterable?: boolean;\n editable?: boolean;\n width?: string;\n /** Optional CSS class(es) applied to both th and td cells */\n cssClass?: string;\n /**\n * Optional CSS class(es) for td cells only (string or resolver callback).\n * Since 3.19 a class colour or font size wins over the kit's cell defaults;\n * `cellStyle` still wins over the class.\n */\n cellClass?: TableCellClass;\n /** Optional inline styles for td cells only (object or resolver callback) */\n cellStyle?: TableCellStyle;\n /** Optional tooltip shown on hover over the column header */\n tooltip?: string;\n /** Optional formatter for cell output when no custom template is used */\n formatter?: (\n value: unknown,\n row: Record<string, unknown>,\n column: TableColumn,\n rowIndex: number\n ) => unknown;\n /** Input type for inline editing (default: text) */\n editType?: 'text' | 'number' | 'select';\n /** Options for select edit type */\n editOptions?: string[];\n /**\n * Horizontal alignment of the column's header and cells. `end` aligns both\n * at the end edge (right in LTR) and sets `font-variant-numeric:\n * tabular-nums`, for amounts, counts and percentages. A sort arrow then sits\n * before the label, so the label stays flush with the figures. Adds\n * `lc-table__cell--end` to the `th` and every `td`. It wins over a\n * `cellClass` that sets `text-align`; use `cellStyle` to override it. A\n * custom `lcTableCell` template inherits the alignment, but a flex or block\n * child needs its own `justify-content: flex-end`. (3.17)\n * @default 'start'\n */\n align?: TableColumnAlign;\n}\n\n/** Horizontal alignment of a table column (3.17). */\nexport type TableColumnAlign = 'start' | 'end';\n\n/**\n * A row-level action rendered in the table's actions column (e.g. Freigeben, Ablehnen).\n * Action button clicks never trigger the row's `rowClick` output.\n */\nexport interface TableAction {\n /** Unique identifier emitted with the {@link ActionClickEvent} */\n key: string;\n /** Visible button label (omit for icon-only buttons when an `icon` is set) */\n label?: string;\n /** Optional icon name rendered before the label */\n icon?: string;\n /** Button variant (default: 'ghost') */\n variant?: ButtonVariant;\n /** Optional tooltip / aria-label, useful for icon-only actions */\n tooltip?: string;\n /** Hide this action for specific rows */\n hidden?: (row: Record<string, unknown>, rowIndex: number) => boolean;\n /** Disable this action for specific rows */\n disabled?: (row: Record<string, unknown>, rowIndex: number) => boolean;\n}\n\nexport type TableActionsAlign = 'start' | 'center' | 'end';\n\nexport interface ActionClickEvent {\n action: string;\n row: Record<string, unknown>;\n rowIndex: number;\n}\n\nexport interface SortEvent {\n column: string;\n direction: 'asc' | 'desc';\n}\n\nexport interface CellEditEvent {\n row: Record<string, unknown>;\n column: string;\n oldValue: unknown;\n newValue: unknown;\n /** Index of `row` in the `data` input (not its position on screen). */\n rowIndex: number;\n}\n\nexport interface SelectionChangeEvent {\n selected: Record<string, unknown>[];\n allSelected: boolean;\n}\n\n/** Emitted when a parent (group) row is expanded or collapsed in tree mode. */\nexport interface RowToggleEvent {\n id: string;\n expanded: boolean;\n row: Record<string, unknown>;\n}\n\n/**\n * Configuration that enables hierarchical (tree / grouped) rows. Mirrors the\n * discrete `idKey` / `parentKey` / `treeColumn` inputs and is exported for\n * consumers that prefer to pass a single config object around.\n */\nexport interface TableTreeConfig {\n idKey: string;\n parentKey: string;\n treeColumn?: string;\n}\n\nexport type TableVariant = 'default' | 'striped' | 'bordered';\nexport type TableSize = 'sm' | 'md' | 'lg';\n\n/**\n * Internal, render-ready view-model for a single visible table row. In flat\n * mode every row is depth 0 with no tree adornments; in tree mode it carries\n * the disclosure / indentation / aria metadata for the row.\n */\ninterface DisplayRow {\n /** The underlying data object. */\n row: Record<string, unknown>;\n /**\n * The row's index into `data()` — in both modes. It is what action, class,\n * style and formatter callbacks receive as `rowIndex`, and what identifies\n * the row in `CellEditEvent`. (It used to be the *positional* index in flat\n * mode — page offset plus row position — which, once a sort or filter was\n * active, pointed at a different row of `data()` than the one on screen.)\n */\n absIndex: number;\n /**\n * What selection and inline editing are keyed by: the row's `idKey` value\n * when the table has one, otherwise the row object itself. Either survives a\n * re-sort, a filter and a page change; an id also survives the parent\n * replacing its data array with fresh objects.\n */\n key: unknown;\n /** Row id (tree mode only; `null` in flat mode). */\n id: string | null;\n /** Tree depth — 0 for roots and for every row in flat mode. */\n depth: number;\n /** 1-based depth, surfaced as `aria-level` in tree mode. */\n level: number;\n /** Whether this row has visible children (renders a chevron). */\n hasChildren: boolean;\n /** Whether this parent row is currently expanded. */\n expanded: boolean;\n /** 1-based position within its sibling group (`aria-posinset`). */\n posInSet: number;\n /** Size of its sibling group (`aria-setsize`). */\n setSize: number;\n}\n\n/**\n * Controls inside a clickable row whose clicks are their own (3.16, BA-3).\n * The role values are unquoted identifiers, so the kit's icon-name scan\n * (`kit-icons.spec.ts`) does not read `link` as a glyph.\n */\nconst NESTED_CONTROL =\n 'a[href], button, input, select, textarea, summary, label, [contenteditable], ' +\n '[tabindex]:not([tabindex=\"-1\"]), [role=button], [role=link], [role=switch], ' +\n '[role=checkbox], [role=menuitem], [role=tab], [role=option]';\n\n/** Whether a row event started on a control inside the row (not on the row itself). */\nfunction isFromNestedControl(event: Event): boolean {\n const row = event.currentTarget as Element | null;\n const target = event.target as Element | null;\n if (!row || !target || typeof target.closest !== 'function') return false;\n const hit = target.closest(NESTED_CONTROL);\n return !!hit && hit !== row && row.contains(hit);\n}\n\n/**\n * Table component for displaying structured data in rows and columns.\n *\n * Features:\n * - Column-based sorting with sort direction indicators\n * - Variant styles (default, striped, bordered)\n * - Size presets (sm, md, lg)\n * - Hoverable row highlighting\n * - Per-column formatter callbacks for display values\n * - Per-cell class/style callbacks for conditional styling\n * - Custom cell templates via content projection\n * - Composed cells (e.g. avatar + badge + actions)\n * - Hierarchical \"tree\" rows (grouped / expandable) via `idKey` + `parentKey`\n * - Responsive horizontal scrolling\n * - `clickable` rows: tab stops, Enter/Space emit `rowClick` (3.16)\n * - `caption` as the table's `<caption>`, visible or for screen readers only\n * (`showCaption`, 3.16)\n * - Empty state text for no data\n * - Accessible with proper table semantics\n *\n * @example\n * ```html\n * <lc-table [columns]=\"columns\" [data]=\"data\" variant=\"striped\" [hoverable]=\"true\"\n * (sort)=\"onSort($event)\" (rowClick)=\"onRowClick($event)\" />\n * ```\n *\n * @example\n * ```ts\n * columns: TableColumn[] = [\n * {\n * key: 'amount',\n * label: 'Amount',\n * formatter: (value) => new Intl.NumberFormat('de-DE', {\n * style: 'currency',\n * currency: 'EUR',\n * }).format(Number(value ?? 0)),\n * },\n * ];\n * ```\n */\n@Component({\n selector: 'lc-table',\n standalone: true,\n imports: [NgTemplateOutlet, NgStyle, FormsModule, SelectComponent, InputComponent, ButtonComponent, IconComponent],\n viewProviders: [ɵprovideKitIcons([ICON_CHEVRON_RIGHT])],\n templateUrl: './table.component.html',\n styleUrl: './table.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableComponent {\n /** Custom cell templates */\n @ContentChildren(TableCellDirective) cellTemplates!: QueryList<TableCellDirective>;\n\n /** Array of column definitions */\n columns = input<TableColumn[]>([]);\n\n /** Array of data objects to display */\n data = input<Record<string, unknown>[]>([]);\n\n /** Visual variant of the table */\n variant = input<TableVariant>('default');\n\n /** Size of the table */\n size = input<TableSize>('md');\n\n /** Whether rows should highlight on hover */\n hoverable = input<boolean>(false);\n\n /**\n * Rows are interactive (3.16, BA-3): each data row is a tab stop, Enter and\n * Space emit `rowClick` (Space does not scroll the page), pointer and hover\n * as `hoverable`. Clicks and keys on controls inside a row (buttons, links,\n * inputs, switches) stay theirs and emit no `rowClick`. Set it whenever you\n * handle `rowClick`. Tree mode keeps its roving tab stop. A focused row is\n * read by its cells, not as \"clickable\": let the row open something that\n * announces itself (a dialog, a page).\n * @default false\n */\n clickable = input<boolean>(false);\n\n /**\n * Title of the table, rendered as its `<caption>` (3.16, BA-3), so it also\n * names the table for screen readers. Empty renders no caption.\n * @default ''\n */\n caption = input<string>('');\n\n /**\n * Show the caption above the table (16 px semibold, 12 px above the table);\n * `false` keeps it for screen readers only.\n * @default true\n */\n showCaption = input<boolean>(true);\n\n /** Whether table should be responsive (horizontal scroll on mobile) */\n responsive = input<boolean>(true);\n\n /** Text shown when data is empty */\n emptyText = input<string>('No data available');\n\n /** Placeholder prefix of the column filters, followed by the column label (`filterable`). */\n filterPlaceholderLabel = input('Filter');\n\n /** Accessible name of the select-all checkbox (`selectable`). */\n selectAllAriaLabel = input('Select all rows');\n\n /** Accessible name of a row checkbox, followed by the row number. */\n selectRowAriaLabel = input('Select row');\n\n /** Screen-reader state of a column sorted ascending. */\n sortedAscendingLabel = input('sorted ascending');\n\n /** Screen-reader state of a column sorted descending. */\n sortedDescendingLabel = input('sorted descending');\n\n /** Tree mode: accessible name prefix of the expand toggle, followed by the row label. */\n expandRowAriaLabel = input('Aufklappen:');\n\n /** Tree mode: accessible name prefix of the collapse toggle, followed by the row label. */\n collapseRowAriaLabel = input('Einklappen:');\n\n /** Pagination: word between the shown range and the total (`1–10 of 42`). */\n rangeOfLabel = input('of');\n\n /** Accessible name of the page-size select. */\n rowsPerPageAriaLabel = input('Rows per page');\n\n /** Accessible name of the previous-page button. */\n previousPageAriaLabel = input('Previous page');\n\n /** Accessible name of the next-page button. */\n nextPageAriaLabel = input('Next page');\n\n // -- Pagination --\n /** Enable pagination */\n paginate = input<boolean>(false);\n\n /** Rows per page */\n pageSize = input<number>(10);\n\n /** Available page size options */\n pageSizeOptions = input<number[]>([5, 10, 25, 50]);\n\n /**\n * Pagination: the text after the number in each page-size option\n * (`10 / page`). German: `'/ Seite'`. (3.19)\n * @default '/ page'\n */\n pageSizeLabel = input('/ page');\n\n // -- Selection --\n /** Enable row selection checkboxes */\n selectable = input<boolean>(false);\n\n // -- Column Filters --\n /** Enable per-column text filters */\n filterable = input<boolean>(false);\n\n // -- Inline Editing --\n /** Enable inline cell editing on double-click */\n editable = input<boolean>(false);\n\n // -- Row Actions --\n /**\n * Row-level actions rendered in a trailing actions column (e.g. Freigeben / Ablehnen).\n * Clicking an action button does NOT trigger the row's `rowClick` output.\n */\n actions = input<TableAction[]>([]);\n\n /** Header label for the actions column */\n actionsLabel = input<string>('');\n\n /** Width of the actions column (e.g. '120px') */\n actionsWidth = input<string | undefined>(undefined);\n\n /** Horizontal alignment of the action buttons (and header label) within the cell */\n actionsAlign = input<TableActionsAlign>('start');\n\n // -- Tree / grouped rows --\n /**\n * Row field holding the unique id. Required (together with {@link parentKey})\n * to enable hierarchical \"tree mode\". Absent ⇒ today's flat table.\n */\n idKey = input<string | undefined>(undefined);\n\n /**\n * Row field referencing the parent row's id. Presence of both `idKey` and\n * `parentKey` enables tree mode. Rows with an absent/empty or unknown parent\n * id are treated as roots.\n */\n parentKey = input<string | undefined>(undefined);\n\n /** Column key the chevron + indentation attach to. Default: first column. */\n treeColumn = input<string | undefined>(undefined);\n\n /** Initial expand state for all parent rows when uncontrolled. Default: true. */\n defaultExpanded = input<boolean>(true);\n\n /**\n * Controlled set of expanded parent ids. When provided, the table renders\n * exactly these as expanded; combine with {@link expandedIdsChange} for\n * `[(expandedIds)]`. When omitted, expansion is uncontrolled and seeded by\n * {@link defaultExpanded}.\n */\n expandedIds = input<string[] | undefined>(undefined);\n\n /** Indentation per depth level, in px. Default: 20. */\n indentSize = input<number>(20);\n\n /** Accessible name prefix of a column filter, followed by the column label. */\n filterAriaLabel = input('Filter by');\n\n /** Emitted when a sortable column header is clicked */\n readonly sort = output<SortEvent>();\n\n /** Emitted when a row is clicked */\n readonly rowClick = output<Record<string, unknown>>();\n\n /** Emitted when a cell is edited */\n readonly cellEdit = output<CellEditEvent>();\n\n /** Emitted when row selection changes */\n readonly selectionChange = output<SelectionChangeEvent>();\n\n /** Emitted when a row action button is clicked */\n readonly actionClick = output<ActionClickEvent>();\n\n /** Emitted when a parent row is expanded/collapsed (tree mode). */\n readonly rowToggle = output<RowToggleEvent>();\n\n /** Emitted with the full list of expanded parent ids; enables `[(expandedIds)]`. */\n readonly expandedIdsChange = output<string[]>();\n\n // -- Internal state --\n protected currentSort = signal<{ column: string; direction: 'asc' | 'desc' } | null>(null);\n /**\n * Effective page size. Seeded from the `pageSize` input (resetting if it\n * changes) and overridable by the user via the page-size dropdown.\n */\n protected internalPageSize = linkedSignal(() => this.pageSize());\n /**\n * Current page, kept within range: when the data shrinks or the page size\n * grows so that the page no longer exists, it moves back to the last one\n * (rather than showing an empty page captioned \"31–30 of 30\").\n */\n protected currentPage = linkedSignal<number, number>({\n source: () => this.totalPages(),\n computation: (total, previous) => Math.min(previous?.value ?? 0, total - 1),\n });\n /**\n * Selected row keys (see `DisplayRow.key`). Pruned when `data` changes, so\n * a key whose row is gone doesn't linger and count towards \"all selected\".\n */\n protected selectedRows = linkedSignal<Set<unknown>, Set<unknown>>({\n source: () => this.rowKeys(),\n computation: (keys, previous) => {\n if (!previous) return new Set<unknown>();\n const kept = new Set([...previous.value].filter((k) => keys.has(k)));\n return kept.size === previous.value.size ? previous.value : kept;\n },\n });\n protected columnFilters = signal<Record<string, string>>({});\n protected editingCell = signal<{ key: unknown; column: string } | null>(null);\n protected editValue = signal<string>('');\n\n /** The inline-edit input while a cell is being edited. */\n private readonly editInput = viewChild<ElementRef<HTMLInputElement>>('editInput');\n private focusedEditInput: HTMLInputElement | null = null;\n\n constructor() {\n // The edit input is inserted on double-click. `autofocus` is only honoured\n // for elements present when the page loads, so the input never received\n // focus (and Enter/Escape/blur never reached it); focus it once it renders.\n afterRenderEffect(() => {\n const el = this.editInput()?.nativeElement ?? null;\n if (el && el !== this.focusedEditInput) {\n el.focus();\n }\n this.focusedEditInput = el;\n });\n }\n\n /** The key of every row currently in `data()`. */\n private readonly rowKeys = computed(() => new Set(this.data().map((row) => this.rowKey(row))));\n\n /** See `DisplayRow.key`. */\n private rowKey(row: Record<string, unknown>): unknown {\n const idKey = this.idKey();\n return idKey ? String(row[idKey] ?? '') : row;\n }\n /** User expand/collapse overrides keyed by row id (uncontrolled mode). */\n private readonly expandOverrides = signal<Map<string, boolean>>(new Map());\n\n /**\n * Filtered data (applies column filters)\n */\n protected readonly filteredData = computed(() => {\n let items = this.data();\n const filters = this.columnFilters();\n\n if (this.filterable()) {\n for (const [key, value] of Object.entries(filters)) {\n if (value.trim()) {\n items = items.filter(row =>\n String(row[key] ?? '').toLowerCase().includes(value.toLowerCase())\n );\n }\n }\n }\n\n return items;\n });\n\n /** Comparator for the active sort, shared by flat sorting and tree sibling sorting. */\n private rowComparator(sortState: { column: string; direction: 'asc' | 'desc' }) {\n return (a: Record<string, unknown>, b: Record<string, unknown>): number => {\n const aVal = a[sortState.column];\n const bVal = b[sortState.column];\n let cmp = 0;\n if (aVal == null && bVal == null) cmp = 0;\n else if (aVal == null) cmp = -1;\n else if (bVal == null) cmp = 1;\n else if (typeof aVal === 'number' && typeof bVal === 'number') cmp = aVal - bVal;\n else cmp = String(aVal).localeCompare(String(bVal));\n return sortState.direction === 'asc' ? cmp : -cmp;\n };\n }\n\n /**\n * Sorted data\n */\n protected readonly sortedData = computed(() => {\n const items = [...this.filteredData()];\n const sortState = this.currentSort();\n if (!sortState) return items;\n return items.sort(this.rowComparator(sortState));\n });\n\n /**\n * Paginated data (or all if pagination disabled). Flat mode only.\n */\n protected readonly displayData = computed(() => {\n const items = this.sortedData();\n if (!this.paginate()) return items;\n const ps = this.internalPageSize();\n const start = this.currentPage() * ps;\n return items.slice(start, start + ps);\n });\n\n // -- Tree / grouped rows -----------------------------------------------------\n\n /** Whether hierarchical tree mode is active. */\n protected readonly treeMode = computed(() => !!this.idKey() && !!this.parentKey());\n\n /** Column the chevron + indentation attach to (defaults to the first column). */\n protected readonly effectiveTreeColumn = computed(\n () => this.treeColumn() || this.columns()[0]?.key\n );\n\n /** Stable map of row object → its index in `data()` (row identity for tree mode). */\n private readonly dataIndexMap = computed(() => {\n const map = new Map<Record<string, unknown>, number>();\n this.data().forEach((row, i) => map.set(row, i));\n return map;\n });\n\n /** Parent → ordered children index built from `idKey`/`parentKey`. */\n private readonly treeBuild = computed(() => {\n const idKey = this.idKey();\n const parentKey = this.parentKey();\n const byId = new Map<string, Record<string, unknown>>();\n const childrenOf = new Map<string, Record<string, unknown>[]>();\n const roots: Record<string, unknown>[] = [];\n if (!idKey || !parentKey) return { byId, childrenOf, roots };\n\n const rows = this.data();\n for (const row of rows) {\n const id = String(row[idKey] ?? '');\n if (id) byId.set(id, row);\n }\n for (const row of rows) {\n const parentRaw = row[parentKey];\n const parentId = parentRaw == null ? '' : String(parentRaw);\n if (parentId && byId.has(parentId)) {\n const siblings = childrenOf.get(parentId) ?? [];\n siblings.push(row);\n childrenOf.set(parentId, siblings);\n } else {\n // No parent, empty parent, or orphaned (unknown parent) ⇒ root.\n roots.push(row);\n }\n }\n return { byId, childrenOf, roots };\n });\n\n /**\n * Tree restricted to rows that match the active filters together with their\n * ancestor chain (so the path to a match stays visible).\n */\n private readonly treeFiltered = computed(() => {\n const { byId, childrenOf, roots } = this.treeBuild();\n const parentKey = this.parentKey();\n const filters = this.columnFilters();\n const active =\n this.filterable() && parentKey && Object.values(filters).some((v) => v.trim());\n if (!active) return { childrenOf, roots };\n\n const matches = (row: Record<string, unknown>): boolean =>\n Object.entries(filters).every(\n ([key, value]) =>\n !value.trim() ||\n String(row[key] ?? '').toLowerCase().includes(value.toLowerCase())\n );\n\n // Visible = every matching row plus all of its ancestors.\n const visible = new Set<Record<string, unknown>>();\n for (const row of this.data()) {\n if (!matches(row)) continue;\n let current: Record<string, unknown> | undefined = row;\n while (current && !visible.has(current)) {\n visible.add(current);\n const parentRaw: unknown = current[parentKey];\n const parentId = parentRaw == null ? '' : String(parentRaw);\n current = parentId ? byId.get(parentId) : undefined;\n }\n }\n\n const visibleChildrenOf = new Map<string, Record<string, unknown>[]>();\n const visibleRoots: Record<string, unknown>[] = [];\n for (const row of this.data()) {\n if (!visible.has(row)) continue;\n const parentRaw = row[parentKey];\n const parentId = parentRaw == null ? '' : String(parentRaw);\n const parent = parentId ? byId.get(parentId) : undefined;\n if (parent && visible.has(parent)) {\n const siblings = visibleChildrenOf.get(parentId) ?? [];\n siblings.push(row);\n visibleChildrenOf.set(parentId, siblings);\n } else {\n visibleRoots.push(row);\n }\n }\n return { childrenOf: visibleChildrenOf, roots: visibleRoots };\n });\n\n /** Tree with each sibling group sorted by the active sort (structure kept intact). */\n private readonly treeSorted = computed(() => {\n const { childrenOf, roots } = this.treeFiltered();\n const sortState = this.currentSort();\n if (!sortState) return { childrenOf, roots };\n const cmp = this.rowComparator(sortState);\n const sortedChildrenOf = new Map<string, Record<string, unknown>[]>();\n for (const [parentId, siblings] of childrenOf) {\n sortedChildrenOf.set(parentId, [...siblings].sort(cmp));\n }\n return { childrenOf: sortedChildrenOf, roots: [...roots].sort(cmp) };\n });\n\n /** Root rows after filter/sort — the unit of pagination in tree mode. */\n private readonly treeRoots = computed(() => this.treeSorted().roots);\n\n /**\n * Render-ready rows. In flat mode this wraps the existing paginated data; in\n * tree mode it paginates roots and flattens each visible (expanded) subtree.\n */\n protected readonly displayRows = computed<DisplayRow[]>(() => {\n const dataIndex = this.dataIndexMap();\n if (!this.treeMode()) {\n return this.displayData().map((row) => ({\n row,\n absIndex: dataIndex.get(row) ?? -1,\n key: this.rowKey(row),\n id: null,\n depth: 0,\n level: 0,\n hasChildren: false,\n expanded: false,\n posInSet: 0,\n setSize: 0,\n }));\n }\n\n const idKey = this.idKey() as string;\n const { childrenOf } = this.treeSorted();\n let roots = this.treeRoots();\n if (this.paginate()) {\n const ps = this.internalPageSize();\n const start = this.currentPage() * ps;\n roots = roots.slice(start, start + ps);\n }\n\n const out: DisplayRow[] = [];\n const walk = (group: Record<string, unknown>[], depth: number): void => {\n group.forEach((row, idx) => {\n const id = String(row[idKey] ?? '');\n const children = childrenOf.get(id) ?? [];\n const hasChildren = children.length > 0;\n const expanded = hasChildren && this.isExpanded(id);\n out.push({\n row,\n absIndex: dataIndex.get(row) ?? -1,\n key: this.rowKey(row),\n id,\n depth,\n level: depth + 1,\n hasChildren,\n expanded,\n posInSet: idx + 1,\n setSize: group.length,\n });\n if (expanded) walk(children, depth + 1);\n });\n };\n walk(roots, 0);\n return out;\n });\n\n /** Total pages */\n protected readonly totalPages = computed(() => {\n if (!this.paginate()) return 1;\n const total = this.treeMode() ? this.treeRoots().length : this.filteredData().length;\n return Math.max(1, Math.ceil(total / this.internalPageSize()));\n });\n\n /**\n * Pagination row count. Tree mode counts root rows (the paginated unit); flat\n * mode counts filtered rows.\n */\n protected readonly totalRows = computed(() =>\n this.treeMode() ? this.treeRoots().length : this.filteredData().length\n );\n\n /** Whether all visible rows are selected */\n protected readonly allSelected = computed(() => {\n const rows = this.displayRows();\n if (rows.length === 0) return false;\n const selected = this.selectedRows();\n return rows.every((r) => selected.has(r.key));\n });\n\n /** Whether some, but not all, visible rows are selected — the header box's mixed state. */\n protected readonly someSelected = computed(() => {\n const selected = this.selectedRows();\n return !this.allSelected() && this.displayRows().some((r) => selected.has(r.key));\n });\n\n protected readonly pageSizeSelectOptions = computed(() => {\n const label = this.pageSizeLabel();\n return this.pageSizeOptions().map((opt) => ({\n value: opt,\n label: `${opt} ${label}`.trim(),\n }));\n });\n\n /**\n * Size of the pagination controls: the page-size select's `size` and the\n * `lc-table-pagination--<size>` class that sizes prev/next to match it.\n */\n protected readonly paginationSize = computed<TableSize>(() => {\n const size = this.size();\n return size === 'sm' ? 'sm' : size === 'lg' ? 'lg' : 'md';\n });\n\n /**\n * Computed CSS classes for the table element\n */\n tableClasses = computed(() => {\n const classes = ['lc-table'];\n classes.push(`lc-table--${this.variant()}`);\n classes.push(`lc-table--${this.size()}`);\n if (this.hoverable()) classes.push('lc-table--hoverable');\n if (this.clickable()) classes.push('lc-table--clickable');\n return classes.join(' ');\n });\n\n /**\n * Computed CSS classes for the wrapper element\n */\n wrapperClasses = computed(() => {\n const classes = ['lc-table-wrapper'];\n if (this.responsive()) classes.push('lc-table-wrapper--responsive');\n return classes.join(' ');\n });\n\n // -- Sort --\n handleSort(columnKey: string): void {\n const column = this.columns().find((col) => col.key === columnKey);\n if (!column || !column.sortable) return;\n\n const current = this.currentSort();\n let direction: 'asc' | 'desc' = 'asc';\n if (current && current.column === columnKey) {\n direction = current.direction === 'asc' ? 'desc' : 'asc';\n }\n\n this.currentSort.set({ column: columnKey, direction });\n this.sort.emit({ column: columnKey, direction });\n }\n\n getSortState(columnKey: string): 'asc' | 'desc' | null {\n const current = this.currentSort();\n if (current && current.column === columnKey) return current.direction;\n return null;\n }\n\n getAriaSort(columnKey: string): string | null {\n const sortState = this.getSortState(columnKey);\n if (sortState === 'asc') return 'ascending';\n if (sortState === 'desc') return 'descending';\n return null;\n }\n\n getHeaderClasses(column: TableColumn): string {\n const classes: string[] = [];\n if (column.sortable) classes.push('sortable');\n const sortState = this.getSortState(column.key);\n if (sortState) classes.push(`sorted-${sortState}`);\n if (column.align === 'end') classes.push('lc-table__cell--end');\n return classes.join(' ');\n }\n\n getCellValue(row: Record<string, unknown>, columnKey: string): unknown {\n return row[columnKey];\n }\n\n getFormattedCellValue(\n row: Record<string, unknown>,\n column: TableColumn,\n rowIndex: number\n ): unknown {\n const value = this.getCellValue(row, column.key);\n if (!column.formatter) return value;\n\n return column.formatter(value, row, column, rowIndex);\n }\n\n getCellClasses(\n row: Record<string, unknown>,\n column: TableColumn,\n rowIndex: number\n ): string {\n const classes: string[] = [];\n if (column.cssClass) classes.push(column.cssClass);\n if (column.align === 'end') classes.push('lc-table__cell--end');\n\n if (typeof column.cellClass === 'string') {\n classes.push(column.cellClass);\n } else if (typeof column.cellClass === 'function') {\n const resolved = column.cellClass(\n this.getCellValue(row, column.key),\n row,\n column,\n rowIndex\n );\n if (resolved) classes.push(resolved);\n }\n\n return classes.join(' ').trim();\n }\n\n getCellStyles(\n row: Record<string, unknown>,\n column: TableColumn,\n rowIndex: number\n ): Record<string, string> | null {\n if (!column.cellStyle) return null;\n\n if (typeof column.cellStyle === 'function') {\n return column.cellStyle(\n this.getCellValue(row, column.key),\n row,\n column,\n rowIndex\n );\n }\n\n return column.cellStyle;\n }\n\n /** Whether the given column is the disclosure/indent column in tree mode. */\n protected isTreeColumn(columnKey: string): boolean {\n return this.treeMode() && columnKey === this.effectiveTreeColumn();\n }\n\n /** Indent levels to render before a row's chevron (one guide per ancestor depth). */\n protected indentLevels(depth: number): number[] {\n return Array.from({ length: depth }, (_, i) => i);\n }\n\n /** Accessible name for a row's disclosure button (the tree column's value). */\n protected treeCellLabel(row: Record<string, unknown>): string {\n const col = this.effectiveTreeColumn();\n return col ? String(row[col] ?? '') : '';\n }\n\n getCellTemplate(columnKey: string): TableCellDirective | undefined {\n return this.cellTemplates?.find((template) => template.columnKey() === columnKey);\n }\n\n hasCustomTemplate(columnKey: string): boolean {\n return !!this.getCellTemplate(columnKey);\n }\n\n onRowClick(row: Record<string, unknown>, event?: Event): void {\n // Clickable rows (3.16): a click on a control inside the row is the\n // control's own. Without `clickable` every click reaches `rowClick` (3.15).\n if (this.clickable() && event && isFromNestedControl(event)) return;\n this.rowClick.emit(row);\n }\n\n // -- Row Actions --\n /** Whether the trailing actions column should be rendered */\n protected readonly hasActions = computed(() => this.actions().length > 0);\n\n protected isActionHidden(\n action: TableAction,\n row: Record<string, unknown>,\n rowIndex: number\n ): boolean {\n return action.hidden ? action.hidden(row, rowIndex) : false;\n }\n\n protected isActionDisabled(\n action: TableAction,\n row: Record<string, unknown>,\n rowIndex: number\n ): boolean {\n return action.disabled ? action.disabled(row, rowIndex) : false;\n }\n\n /**\n * Handles an action button click. The DOM click is stopped from propagating\n * (see template `$event.stopPropagation()`), so the row's `rowClick` never fires.\n */\n protected onActionClick(\n action: TableAction,\n row: Record<string, unknown>,\n rowIndex: number\n ): void {\n this.actionClick.emit({\n action: action.key,\n row,\n rowIndex,\n });\n }\n\n // -- Tree keyboard model -----------------------------------------------------\n // `role=\"treegrid\"` promises a composite widget: one tab stop, arrows to move\n // between rows, Right/Left to open/close a group or step into/out of it. The\n // rows carry a roving tabindex; the focused row is remembered by key so it\n // survives re-renders, and falls back to the first row when it is gone.\n\n private readonly rowEls = viewChildren<ElementRef<HTMLTableRowElement>>('dataRow');\n private readonly focusedRowKey = signal<unknown>(null);\n\n /** Key of the row that holds the tab stop. */\n private readonly effectiveFocusedKey = computed(() => {\n const rows = this.displayRows();\n const key = this.focusedRowKey();\n return rows.some((r) => r.key === key) ? key : rows[0]?.key;\n });\n\n protected rowTabindex(dr: DisplayRow): number | null {\n // Flat mode: a tab stop per data row only with `clickable` (3.16).\n if (!this.treeMode()) return this.clickable() ? 0 : null;\n return dr.key === this.effectiveFocusedKey() ? 0 : -1;\n }\n\n protected onRowFocus(dr: DisplayRow): void {\n if (this.treeMode()) this.focusedRowKey.set(dr.key);\n }\n\n protected onRowKeydown(event: KeyboardEvent, dr: DisplayRow): void {\n if (!this.treeMode()) {\n // Clickable flat rows (3.16): Enter and Space on the row itself. Keys of\n // a nested control (a button, a link, a switch) stay the control's.\n if (!this.clickable() || event.target !== event.currentTarget) return;\n if (event.key !== 'Enter' && event.key !== ' ') return;\n event.preventDefault(); // Space would scroll the page\n this.rowClick.emit(dr.row);\n return;\n }\n // Keys typed into an inline editor or the row's own controls are theirs.\n if ((event.target as HTMLElement).tagName === 'INPUT') return;\n const rows = this.displayRows();\n const index = rows.findIndex((r) => r.key === dr.key);\n if (index < 0) return;\n\n switch (event.key) {\n case 'ArrowDown':\n this.focusRow(index + 1);\n break;\n case 'ArrowUp':\n this.focusRow(index - 1);\n break;\n case 'Home':\n this.focusRow(0);\n break;\n case 'End':\n this.focusRow(rows.length - 1);\n break;\n case 'ArrowRight':\n if (!dr.hasChildren) return;\n if (dr.expanded) this.focusRow(index + 1); // first child\n else if (dr.id) this.toggleRow(dr.id, dr.row);\n break;\n case 'ArrowLeft':\n if (dr.hasChildren && dr.expanded && dr.id) {\n this.toggleRow(dr.id, dr.row);\n } else if (dr.depth > 0) {\n // Step out to the parent: the nearest row above with a smaller depth.\n for (let i = index - 1; i >= 0; i--) {\n if (rows[i].depth < dr.depth) {\n this.focusRow(i);\n break;\n }\n }\n } else {\n return;\n }\n break;\n case 'Enter':\n this.rowClick.emit(dr.row);\n break;\n case ' ':\n if (!this.selectable()) return;\n this.toggleRowSelect(dr.row);\n break;\n default:\n return;\n }\n event.preventDefault();\n }\n\n private focusRow(index: number): void {\n const rows = this.displayRows();\n if (index < 0 || index >= rows.length) return;\n this.focusedRowKey.set(rows[index].key);\n this.rowEls()[index]?.nativeElement.focus();\n }\n\n // -- Tree expand / collapse --------------------------------------------------\n\n /** Whether the parent row with the given id is currently expanded. */\n protected isExpanded(id: string): boolean {\n const controlled = this.expandedIds();\n if (controlled !== undefined) return controlled.includes(id);\n const override = this.expandOverrides().get(id);\n if (override !== undefined) return override;\n return this.defaultExpanded();\n }\n\n /** Chevron click: toggle expand state without triggering the row click. */\n protected onChevronClick(displayRow: DisplayRow, event: Event): void {\n event.stopPropagation();\n if (displayRow.id) this.toggleRow(displayRow.id, displayRow.row);\n }\n\n private toggleRow(id: string, row: Record<string, unknown>): void {\n const expanded = !this.isExpanded(id);\n this.expandOverrides.update((map) => {\n const next = new Map(map);\n next.set(id, expanded);\n return next;\n });\n this.rowToggle.emit({ id, expanded, row });\n this.expandedIdsChange.emit(this.nextExpandedIds(id, expanded));\n }\n\n /** The full list of expanded parent ids after applying a single toggle. */\n private nextExpandedIds(changedId: string, changedExpanded: boolean): string[] {\n const controlled = this.expandedIds();\n const overrides = this.expandOverrides();\n const parentIds = Array.from(this.treeBuild().childrenOf.keys());\n return parentIds.filter((pid) => {\n if (pid === changedId) return changedExpanded;\n if (controlled !== undefined) return controlled.includes(pid);\n const override = overrides.get(pid);\n return override !== undefined ? override : this.defaultExpanded();\n });\n }\n\n // -- Pagination --\n protected goToPage(page: number): void {\n if (page >= 0 && page < this.totalPages()) {\n this.currentPage.set(page);\n }\n }\n\n protected onPageSizeChange(event: Event): void {\n const newSize = Number((event.target as HTMLSelectElement).value);\n this.internalPageSize.set(newSize);\n this.currentPage.set(0);\n }\n\n protected onPageSizeModelChange(value: string | number | null): void {\n if (value == null) {\n return;\n }\n const parsed = typeof value === 'number' ? value : Number(value);\n if (!Number.isFinite(parsed)) {\n return;\n }\n this.internalPageSize.set(parsed);\n this.currentPage.set(0);\n }\n\n protected get paginationStart(): number {\n if (this.totalRows() === 0) return 0;\n return this.currentPage() * this.internalPageSize() + 1;\n }\n\n protected get paginationEnd(): number {\n return Math.min((this.currentPage() + 1) * this.internalPageSize(), this.totalRows());\n }\n\n // -- Selection --\n // Keyed by row identity (see `DisplayRow.key`), never by position: a sort or\n // filter changes where a row is shown, not which row it is.\n protected toggleSelectAll(): void {\n const selected = new Set(this.selectedRows());\n const rows = this.displayRows();\n const allSelected = this.allSelected();\n\n rows.forEach((r) => {\n if (allSelected) selected.delete(r.key);\n else selected.add(r.key);\n });\n\n this.selectedRows.set(selected);\n this.emitSelectionChange();\n }\n\n protected toggleRowSelect(row: Record<string, unknown>): void {\n const key = this.rowKey(row);\n const selected = new Set(this.selectedRows());\n if (selected.has(key)) selected.delete(key);\n else selected.add(key);\n this.selectedRows.set(selected);\n this.emitSelectionChange();\n }\n\n protected isRowSelected(row: Record<string, unknown>): boolean {\n return this.selectedRows().has(this.rowKey(row));\n }\n\n private emitSelectionChange(): void {\n const keys = this.selectedRows();\n // In data order, so the consumer gets a stable list whatever the sort.\n const selected = this.data().filter((row) => keys.has(this.rowKey(row)));\n this.selectionChange.emit({ selected, allSelected: this.allSelected() });\n }\n\n // -- Column Filters --\n protected onFilterChange(columnKey: string, value: string): void {\n const filters = { ...this.columnFilters(), [columnKey]: value };\n this.columnFilters.set(filters);\n this.currentPage.set(0);\n }\n\n protected getFilterValue(columnKey: string): string {\n return this.columnFilters()[columnKey] || '';\n }\n\n // -- Inline Editing --\n // Keyed by row identity too — the edited cell is the one the user clicked,\n // whichever position sorting put it in.\n protected startEdit(row: Record<string, unknown>, column: string, currentValue: unknown): void {\n if (!this.editable()) return;\n const col = this.columns().find(c => c.key === column);\n if (col && col.editable === false) return;\n this.editingCell.set({ key: this.rowKey(row), column });\n this.editValue.set(String(currentValue ?? ''));\n }\n\n protected isEditing(row: Record<string, unknown>, column: string): boolean {\n const cell = this.editingCell();\n return cell !== null && cell.key === this.rowKey(row) && cell.column === column;\n }\n\n protected commitEdit(row: Record<string, unknown>, column: string): void {\n // Only the cell being edited commits: the input's blur arrives after Enter\n // or Escape already ended the edit, and must not commit (or re-commit).\n if (!this.isEditing(row, column)) return;\n const oldValue = row[column];\n const newValue = this.editValue();\n this.editingCell.set(null);\n this.editValue.set('');\n if (String(oldValue ?? '') !== newValue) {\n const rowIndex = this.dataIndexMap().get(row) ?? -1;\n this.cellEdit.emit({ row, column, oldValue, newValue, rowIndex });\n }\n }\n\n protected cancelEdit(): void {\n this.editingCell.set(null);\n this.editValue.set('');\n }\n\n protected onEditKeydown(event: KeyboardEvent, row: Record<string, unknown>, column: string): void {\n if (event.key === 'Enter') {\n this.commitEdit(row, column);\n } else if (event.key === 'Escape') {\n this.cancelEdit();\n }\n }\n\n /** Enter/Space on a focused sortable header sorts, like a click does. */\n protected onHeaderKeydown(event: KeyboardEvent, columnKey: string): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.handleSort(columnKey);\n }\n }\n\n protected getInputValue(event: Event): string {\n return (event.target as HTMLInputElement).value;\n }\n}\n","<div [class]=\"wrapperClasses()\">\n <table [class]=\"tableClasses()\" [attr.role]=\"treeMode() ? 'treegrid' : 'table'\">\n @if (caption()) {\n <!-- First child of the table, so it names the table (and the treegrid). -->\n <caption class=\"lc-table__caption\" [class.lc-table__caption--hidden]=\"!showCaption()\">{{ caption() }}</caption>\n }\n <thead>\n <!-- Filter row -->\n @if (filterable()) {\n <tr class=\"lc-table__filter-row\">\n @if (selectable()) {\n <th class=\"lc-table__select-cell\"></th>\n }\n @for (column of columns(); track column.key) {\n <th>\n @if (column.filterable !== false) {\n <lc-input\n class=\"lc-table__filter-input\"\n size=\"xs\"\n [placeholder]=\"filterPlaceholderLabel() + ' ' + column.label\"\n [ariaLabel]=\"filterAriaLabel() + ' ' + column.label\"\n [ngModel]=\"getFilterValue(column.key)\"\n (ngModelChange)=\"onFilterChange(column.key, $event)\"\n />\n }\n </th>\n }\n @if (hasActions()) {\n <th class=\"lc-table__actions-cell\"></th>\n }\n </tr>\n }\n <!-- Header row -->\n <tr>\n @if (selectable()) {\n <th class=\"lc-table__select-cell\" scope=\"col\">\n <!-- The label's ::before covers the cell: a 44 px hit area (request 043). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- only stops the click; the checkbox inside is the keyboard control -->\n <label class=\"lc-table__select-hit\" (click)=\"$event.stopPropagation()\">\n <input\n type=\"checkbox\"\n class=\"lc-table__checkbox\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (change)=\"toggleSelectAll()\"\n [attr.aria-label]=\"selectAllAriaLabel()\"\n />\n </label>\n </th>\n }\n @for (column of columns(); track column.key) {\n <!-- A sortable header is a keyboard stop too: Enter/Space sort like a click. -->\n <th\n scope=\"col\"\n [class]=\"getHeaderClasses(column) + (column.cssClass ? ' ' + column.cssClass : '')\"\n [attr.aria-sort]=\"getAriaSort(column.key)\"\n [attr.tabindex]=\"column.sortable ? 0 : null\"\n [style.width]=\"column.width\"\n [title]=\"column.tooltip || ''\"\n (click)=\"handleSort(column.key)\"\n (keydown)=\"column.sortable ? onHeaderKeydown($event, column.key) : null\">\n @if (column.align === 'end') {\n <!-- 3.17: the arrow is placed before the label (CSS), so the label stays\n flush with the figures; in the DOM it still follows the label. No\n whitespace between the label and the arrow. -->\n <span class=\"lc-table__sort-label\">{{ column.label }}@if (column.sortable && getSortState(column.key)) {<span class=\"sort-indicator\" [attr.aria-label]=\"getSortState(column.key) === 'asc' ? sortedAscendingLabel() : sortedDescendingLabel()\">\n @if (getSortState(column.key) === 'asc') {\n ↑\n } @else {\n ↓\n }\n </span>}</span>\n } @else {\n {{ column.label }}\n @if (column.sortable && getSortState(column.key)) {\n <span class=\"sort-indicator\" [attr.aria-label]=\"getSortState(column.key) === 'asc' ? sortedAscendingLabel() : sortedDescendingLabel()\">\n @if (getSortState(column.key) === 'asc') {\n ↑\n } @else {\n ↓\n }\n </span>\n }\n }\n </th>\n }\n @if (hasActions()) {\n <th\n scope=\"col\"\n class=\"lc-table__actions-cell\"\n [class]=\"'lc-table__actions-cell--' + actionsAlign()\"\n [style.width]=\"actionsWidth()\"\n >\n {{ actionsLabel() }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @if (displayRows().length === 0) {\n <tr>\n <td [attr.colspan]=\"columns().length + (selectable() ? 1 : 0) + (hasActions() ? 1 : 0)\" class=\"lc-table__empty\">\n {{ emptyText() }}\n </td>\n </tr>\n } @else {\n @for (dr of displayRows(); track dr.key) {\n <!-- In tree mode the rows form the treegrid's keyboard model: a roving\n tab stop plus Arrow/Home/End/Enter/Space handling (see the\n component). Flat mode keeps plain table rows. -->\n <tr\n #dataRow\n [class.lc-table__row--selected]=\"selectable() && isRowSelected(dr.row)\"\n [class.lc-table__row--group]=\"dr.hasChildren\"\n [attr.role]=\"treeMode() ? 'row' : null\"\n [attr.tabindex]=\"rowTabindex(dr)\"\n [attr.aria-level]=\"treeMode() ? dr.level : null\"\n [attr.aria-expanded]=\"treeMode() && dr.hasChildren ? dr.expanded : null\"\n [attr.aria-posinset]=\"treeMode() ? dr.posInSet : null\"\n [attr.aria-setsize]=\"treeMode() ? dr.setSize : null\"\n [attr.aria-selected]=\"treeMode() && selectable() ? isRowSelected(dr.row) : null\"\n (click)=\"onRowClick(dr.row, $event)\"\n (focus)=\"onRowFocus(dr)\"\n (keydown)=\"onRowKeydown($event, dr)\"\n >\n @if (selectable()) {\n <td class=\"lc-table__select-cell\" [attr.role]=\"treeMode() ? 'gridcell' : null\">\n <!-- A click in the cell toggles the box, never the row (request 043). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- only stops the click; the checkbox inside is the keyboard control -->\n <label class=\"lc-table__select-hit\" (click)=\"$event.stopPropagation()\">\n <input\n type=\"checkbox\"\n class=\"lc-table__checkbox\"\n [checked]=\"isRowSelected(dr.row)\"\n (change)=\"toggleRowSelect(dr.row)\"\n (click)=\"$event.stopPropagation()\"\n [attr.aria-label]=\"selectRowAriaLabel() + ' ' + (dr.absIndex + 1)\"\n />\n </label>\n </td>\n }\n @for (column of columns(); track column.key) {\n <td\n [class]=\"getCellClasses(dr.row, column, dr.absIndex)\"\n [ngStyle]=\"getCellStyles(dr.row, column, dr.absIndex)\"\n [attr.role]=\"treeMode() ? 'gridcell' : null\"\n (dblclick)=\"editable() ? startEdit(dr.row, column.key, getCellValue(dr.row, column.key)) : null\"\n >\n @if (isTreeColumn(column.key)) {\n <span class=\"lc-table__tree-cell\">\n @for (lvl of indentLevels(dr.depth); track lvl) {\n <span class=\"lc-table__tree-indent\" [style.width.px]=\"indentSize()\"></span>\n }\n <span class=\"lc-table__tree-chevron\" [style.width.px]=\"indentSize()\">\n @if (dr.hasChildren) {\n <button\n type=\"button\"\n class=\"lc-table__chevron-btn\"\n [class.lc-table__chevron-btn--expanded]=\"dr.expanded\"\n [attr.aria-label]=\"(dr.expanded ? collapseRowAriaLabel() : expandRowAriaLabel()) + ' ' + treeCellLabel(dr.row)\"\n [attr.aria-expanded]=\"dr.expanded\"\n (click)=\"onChevronClick(dr, $event)\"\n >\n <lc-icon name=\"chevron-right\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </span>\n <span class=\"lc-table__tree-content\">\n <ng-container\n *ngTemplateOutlet=\"cellContent; context: { row: dr.row, column: column, absIndex: dr.absIndex }\"\n ></ng-container>\n </span>\n </span>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"cellContent; context: { row: dr.row, column: column, absIndex: dr.absIndex }\"\n ></ng-container>\n }\n </td>\n }\n @if (hasActions()) {\n <td\n class=\"lc-table__actions-cell\"\n [class]=\"'lc-table__actions-cell--' + actionsAlign()\"\n [attr.role]=\"treeMode() ? 'gridcell' : null\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"lc-table__actions\">\n @for (action of actions(); track action.key) {\n @if (!isActionHidden(action, dr.row, dr.absIndex)) {\n <lc-button\n [variant]=\"action.variant ?? 'ghost'\"\n size=\"xs\"\n [iconOnly]=\"!action.label\"\n [disabled]=\"isActionDisabled(action, dr.row, dr.absIndex)\"\n [ariaLabel]=\"action.tooltip ?? action.label ?? action.key\"\n (clicked)=\"onActionClick(action, dr.row, dr.absIndex)\"\n >\n @if (action.icon) {\n <lc-icon [name]=\"action.icon\" size=\"sm\" [decorative]=\"true\" />\n }\n @if (action.label) {\n {{ action.label }}\n }\n </lc-button>\n }\n }\n </div>\n </td>\n }\n </tr>\n }\n }\n </tbody>\n </table>\n</div>\n\n<!-- Shared cell content (edit input / custom template / formatted value) -->\n<ng-template #cellContent let-row=\"row\" let-column=\"column\" let-absIndex=\"absIndex\">\n @if (isEditing(row, column.key)) {\n <input\n #editInput\n type=\"text\"\n class=\"lc-table__edit-input\"\n [value]=\"editValue()\"\n (input)=\"editValue.set(getInputValue($event))\"\n (blur)=\"commitEdit(row, column.key)\"\n (keydown)=\"onEditKeydown($event, row, column.key)\"\n />\n } @else if (hasCustomTemplate(column.key)) {\n <ng-container *ngTemplateOutlet=\"getCellTemplate(column.key)!.template; context: { $implicit: row }\"></ng-container>\n } @else {\n {{ getFormattedCellValue(row, column, absIndex) }}\n }\n</ng-template>\n\n<!-- Pagination -->\n@if (paginate()) {\n <div [class]=\"'lc-table-pagination lc-table-pagination--' + paginationSize()\">\n <div class=\"lc-table-pagination__info\">\n {{ paginationStart }}–{{ paginationEnd }} {{ rangeOfLabel() }} {{ totalRows() }}\n </div>\n <div class=\"lc-table-pagination__controls\">\n <lc-select\n class=\"lc-table-pagination__size\"\n [size]=\"paginationSize()\"\n [options]=\"pageSizeSelectOptions()\"\n [ngModel]=\"internalPageSize()\"\n [ariaLabel]=\"rowsPerPageAriaLabel()\"\n (ngModelChange)=\"onPageSizeModelChange($event)\"\n />\n <div class=\"lc-table-pagination__pager\">\n <button\n type=\"button\"\n class=\"lc-table-pagination__btn\"\n [disabled]=\"currentPage() === 0\"\n (click)=\"goToPage(currentPage() - 1)\"\n [attr.aria-label]=\"previousPageAriaLabel()\"\n >‹</button>\n <span class=\"lc-table-pagination__page\">\n {{ currentPage() + 1 }} / {{ totalPages() }}\n </span>\n <button\n type=\"button\"\n class=\"lc-table-pagination__btn\"\n [disabled]=\"currentPage() >= totalPages() - 1\"\n (click)=\"goToPage(currentPage() + 1)\"\n [attr.aria-label]=\"nextPageAriaLabel()\"\n >›</button>\n </div>\n </div>\n </div>\n}\n"],"mappings":";;;;;;;;;;AAkBA,IAAa,qBAAb,MAAa,mBAAkB;CAEpB,YAAY,MAAM,IAAE;EAAA,GAAA,YAAA,EAAA,WAAA,YAAA,+BAAA,CAAA;EAAI,OA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../libs/angular-ui-kit/src/lib/table/table-cell.directive.ts","../../../../libs/angular-ui-kit/src/lib/table/table.component.ts","../../../../libs/angular-ui-kit/src/lib/table/table.component.html"],"sourcesContent":["import { Directive, input, TemplateRef, inject } from '@angular/core';\n\n/**\n * Directive for defining custom cell templates in the Table component.\n *\n * @example\n * ```html\n * <lc-table [columns]=\"columns\" [data]=\"data\">\n * <ng-template lcTableCell=\"status\" let-row>\n * <lc-badge [variant]=\"row.status\">{{ row.status }}</lc-badge>\n * </ng-template>\n * </lc-table>\n * ```\n */\n@Directive({\n selector: '[lcTableCell]',\n standalone: true,\n})\nexport class TableCellDirective {\n /** The column key this template applies to */\n readonly columnKey = input('', { alias: 'lcTableCell' });\n\n public template = inject(TemplateRef<{ $implicit: Record<string, unknown> }>);\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n ElementRef,\n input,\n output,\n computed,\n signal,\n linkedSignal,\n viewChild,\n viewChildren,\n afterRenderEffect,\n ContentChildren,\n QueryList,\n} from '@angular/core';\nimport { NgStyle, NgTemplateOutlet } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { TableCellDirective } from './table-cell.directive';\nimport { InputComponent } from '@lifecorner/angular-ui-kit/input';\nimport { SelectComponent } from '@lifecorner/angular-ui-kit/select';\nimport { ButtonComponent, ButtonVariant } from '@lifecorner/angular-ui-kit/button';\nimport { IconComponent, ɵprovideKitIcons } from '@lifecorner/angular-ui-kit/icon';\nimport { ICON_CHEVRON_RIGHT } from '@lifecorner/angular-ui-kit/icons';\n\ntype TableCellClass = string | ((\n value: unknown,\n row: Record<string, unknown>,\n column: TableColumn,\n rowIndex: number\n) => string);\n\ntype TableCellStyle = Record<string, string> | ((\n value: unknown,\n row: Record<string, unknown>,\n column: TableColumn,\n rowIndex: number\n) => Record<string, string>);\n\nexport interface TableColumn {\n key: string;\n label: string;\n sortable?: boolean;\n filterable?: boolean;\n editable?: boolean;\n width?: string;\n /** Optional CSS class(es) applied to both th and td cells */\n cssClass?: string;\n /**\n * Optional CSS class(es) for td cells only (string or resolver callback).\n * Since 3.19 a class colour or font size wins over the kit's cell defaults;\n * `cellStyle` still wins over the class.\n */\n cellClass?: TableCellClass;\n /** Optional inline styles for td cells only (object or resolver callback) */\n cellStyle?: TableCellStyle;\n /** Optional tooltip shown on hover over the column header */\n tooltip?: string;\n /** Optional formatter for cell output when no custom template is used */\n formatter?: (\n value: unknown,\n row: Record<string, unknown>,\n column: TableColumn,\n rowIndex: number\n ) => unknown;\n /** Input type for inline editing (default: text) */\n editType?: 'text' | 'number' | 'select';\n /** Options for select edit type */\n editOptions?: string[];\n /**\n * Horizontal alignment of the column's header and cells. `end` aligns both\n * at the end edge (right in LTR) and sets `font-variant-numeric:\n * tabular-nums`, for amounts, counts and percentages. A sort arrow then sits\n * before the label, so the label stays flush with the figures. Adds\n * `lc-table__cell--end` to the `th` and every `td`. It wins over a\n * `cellClass` that sets `text-align`; use `cellStyle` to override it. A\n * custom `lcTableCell` template inherits the alignment, but a flex or block\n * child needs its own `justify-content: flex-end`. (3.17)\n * @default 'start'\n */\n align?: TableColumnAlign;\n}\n\n/** Horizontal alignment of a table column (3.17). */\nexport type TableColumnAlign = 'start' | 'end';\n\n/**\n * A row-level action rendered in the table's actions column (e.g. Freigeben, Ablehnen).\n * Action button clicks never trigger the row's `rowClick` output.\n */\nexport interface TableAction {\n /** Unique identifier emitted with the {@link ActionClickEvent} */\n key: string;\n /** Visible button label (omit for icon-only buttons when an `icon` is set) */\n label?: string;\n /** Optional icon name rendered before the label */\n icon?: string;\n /** Button variant (default: 'ghost') */\n variant?: ButtonVariant;\n /** Optional tooltip / aria-label, useful for icon-only actions */\n tooltip?: string;\n /** Hide this action for specific rows */\n hidden?: (row: Record<string, unknown>, rowIndex: number) => boolean;\n /** Disable this action for specific rows */\n disabled?: (row: Record<string, unknown>, rowIndex: number) => boolean;\n}\n\nexport type TableActionsAlign = 'start' | 'center' | 'end';\n\nexport interface ActionClickEvent {\n action: string;\n row: Record<string, unknown>;\n rowIndex: number;\n}\n\nexport interface SortEvent {\n column: string;\n direction: 'asc' | 'desc';\n}\n\nexport interface CellEditEvent {\n row: Record<string, unknown>;\n column: string;\n oldValue: unknown;\n newValue: unknown;\n /** Index of `row` in the `data` input (not its position on screen). */\n rowIndex: number;\n}\n\nexport interface SelectionChangeEvent {\n selected: Record<string, unknown>[];\n allSelected: boolean;\n}\n\n/** Emitted when a parent (group) row is expanded or collapsed in tree mode. */\nexport interface RowToggleEvent {\n id: string;\n expanded: boolean;\n row: Record<string, unknown>;\n}\n\n/**\n * Configuration that enables hierarchical (tree / grouped) rows. Mirrors the\n * discrete `idKey` / `parentKey` / `treeColumn` inputs and is exported for\n * consumers that prefer to pass a single config object around.\n */\nexport interface TableTreeConfig {\n idKey: string;\n parentKey: string;\n treeColumn?: string;\n}\n\nexport type TableVariant = 'default' | 'striped' | 'bordered';\nexport type TableSize = 'sm' | 'md' | 'lg';\n\n/**\n * Internal, render-ready view-model for a single visible table row. In flat\n * mode every row is depth 0 with no tree adornments; in tree mode it carries\n * the disclosure / indentation / aria metadata for the row.\n */\ninterface DisplayRow {\n /** The underlying data object. */\n row: Record<string, unknown>;\n /**\n * The row's index into `data()` — in both modes. It is what action, class,\n * style and formatter callbacks receive as `rowIndex`, and what identifies\n * the row in `CellEditEvent`. (It used to be the *positional* index in flat\n * mode — page offset plus row position — which, once a sort or filter was\n * active, pointed at a different row of `data()` than the one on screen.)\n */\n absIndex: number;\n /**\n * What selection and inline editing are keyed by: the row's `idKey` value\n * when the table has one, otherwise the row object itself. Either survives a\n * re-sort, a filter and a page change; an id also survives the parent\n * replacing its data array with fresh objects.\n */\n key: unknown;\n /** Row id (tree mode only; `null` in flat mode). */\n id: string | null;\n /** Tree depth — 0 for roots and for every row in flat mode. */\n depth: number;\n /** 1-based depth, surfaced as `aria-level` in tree mode. */\n level: number;\n /** Whether this row has visible children (renders a chevron). */\n hasChildren: boolean;\n /** Whether this parent row is currently expanded. */\n expanded: boolean;\n /** 1-based position within its sibling group (`aria-posinset`). */\n posInSet: number;\n /** Size of its sibling group (`aria-setsize`). */\n setSize: number;\n}\n\n/**\n * Controls inside a clickable row whose clicks are their own (3.16, BA-3).\n * The role values are unquoted identifiers, so the kit's icon-name scan\n * (`kit-icons.spec.ts`) does not read `link` as a glyph.\n */\nconst NESTED_CONTROL =\n 'a[href], button, input, select, textarea, summary, label, [contenteditable], ' +\n '[tabindex]:not([tabindex=\"-1\"]), [role=button], [role=link], [role=switch], ' +\n '[role=checkbox], [role=menuitem], [role=tab], [role=option]';\n\n/** Whether a row event started on a control inside the row (not on the row itself). */\nfunction isFromNestedControl(event: Event): boolean {\n const row = event.currentTarget as Element | null;\n const target = event.target as Element | null;\n if (!row || !target || typeof target.closest !== 'function') return false;\n const hit = target.closest(NESTED_CONTROL);\n return !!hit && hit !== row && row.contains(hit);\n}\n\n/**\n * Table component for displaying structured data in rows and columns.\n *\n * Features:\n * - Column-based sorting with sort direction indicators\n * - Variant styles (default, striped, bordered)\n * - Size presets (sm, md, lg)\n * - Hoverable row highlighting\n * - Per-column formatter callbacks for display values\n * - Per-cell class/style callbacks for conditional styling\n * - Custom cell templates via content projection\n * - Composed cells (e.g. avatar + badge + actions)\n * - Hierarchical \"tree\" rows (grouped / expandable) via `idKey` + `parentKey`\n * - Responsive horizontal scrolling\n * - `clickable` rows: tab stops, Enter/Space emit `rowClick` (3.16)\n * - `caption` as the table's `<caption>`, visible or for screen readers only\n * (`showCaption`, 3.16)\n * - Empty state text for no data\n * - Accessible with proper table semantics\n *\n * @example\n * ```html\n * <lc-table [columns]=\"columns\" [data]=\"data\" variant=\"striped\" [hoverable]=\"true\"\n * (sort)=\"onSort($event)\" (rowClick)=\"onRowClick($event)\" />\n * ```\n *\n * @example\n * ```ts\n * columns: TableColumn[] = [\n * {\n * key: 'amount',\n * label: 'Amount',\n * formatter: (value) => new Intl.NumberFormat('de-DE', {\n * style: 'currency',\n * currency: 'EUR',\n * }).format(Number(value ?? 0)),\n * },\n * ];\n * ```\n */\n@Component({\n selector: 'lc-table',\n standalone: true,\n imports: [NgTemplateOutlet, NgStyle, FormsModule, SelectComponent, InputComponent, ButtonComponent, IconComponent],\n viewProviders: [ɵprovideKitIcons([ICON_CHEVRON_RIGHT])],\n templateUrl: './table.component.html',\n styleUrl: './table.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableComponent {\n /** Custom cell templates */\n @ContentChildren(TableCellDirective) cellTemplates!: QueryList<TableCellDirective>;\n\n /** Array of column definitions */\n columns = input<TableColumn[]>([]);\n\n /** Array of data objects to display */\n data = input<Record<string, unknown>[]>([]);\n\n /** Visual variant of the table */\n variant = input<TableVariant>('default');\n\n /** Size of the table */\n size = input<TableSize>('md');\n\n /** Whether rows should highlight on hover */\n hoverable = input<boolean>(false);\n\n /**\n * Rows are interactive (3.16, BA-3): each data row is a tab stop, Enter and\n * Space emit `rowClick` (Space does not scroll the page), pointer and hover\n * as `hoverable`. Clicks and keys on controls inside a row (buttons, links,\n * inputs, switches) stay theirs and emit no `rowClick`. Set it whenever you\n * handle `rowClick`. Tree mode keeps its roving tab stop. A focused row is\n * read by its cells, not as \"clickable\": let the row open something that\n * announces itself (a dialog, a page).\n * @default false\n */\n clickable = input<boolean>(false);\n\n /**\n * Title of the table, rendered as its `<caption>` (3.16, BA-3), so it also\n * names the table for screen readers. Empty renders no caption.\n * @default ''\n */\n caption = input<string>('');\n\n /**\n * Show the caption above the table (16 px semibold, 12 px above the table);\n * `false` keeps it for screen readers only.\n * @default true\n */\n showCaption = input<boolean>(true);\n\n /** Whether table should be responsive (horizontal scroll on mobile) */\n responsive = input<boolean>(true);\n\n /** Text shown when data is empty */\n emptyText = input<string>('No data available');\n\n /** Placeholder prefix of the column filters, followed by the column label (`filterable`). */\n filterPlaceholderLabel = input('Filter');\n\n /** Accessible name of the select-all checkbox (`selectable`). */\n selectAllAriaLabel = input('Select all rows');\n\n /** Accessible name of a row checkbox, followed by the row number. */\n selectRowAriaLabel = input('Select row');\n\n /** Screen-reader state of a column sorted ascending. */\n sortedAscendingLabel = input('sorted ascending');\n\n /** Screen-reader state of a column sorted descending. */\n sortedDescendingLabel = input('sorted descending');\n\n /** Tree mode: accessible name prefix of the expand toggle, followed by the row label. */\n expandRowAriaLabel = input('Aufklappen:');\n\n /** Tree mode: accessible name prefix of the collapse toggle, followed by the row label. */\n collapseRowAriaLabel = input('Einklappen:');\n\n /** Pagination: word between the shown range and the total (`1–10 of 42`). */\n rangeOfLabel = input('of');\n\n /** Accessible name of the page-size select. */\n rowsPerPageAriaLabel = input('Rows per page');\n\n /** Accessible name of the previous-page button. */\n previousPageAriaLabel = input('Previous page');\n\n /** Accessible name of the next-page button. */\n nextPageAriaLabel = input('Next page');\n\n // -- Pagination --\n /** Enable pagination */\n paginate = input<boolean>(false);\n\n /** Rows per page */\n pageSize = input<number>(10);\n\n /** Available page size options */\n pageSizeOptions = input<number[]>([5, 10, 25, 50]);\n\n /**\n * Pagination: the text after the number in each page-size option\n * (`10 / page`). German: `'/ Seite'`. (3.19)\n * @default '/ page'\n */\n pageSizeLabel = input('/ page');\n\n // -- Selection --\n /** Enable row selection checkboxes */\n selectable = input<boolean>(false);\n\n // -- Column Filters --\n /** Enable per-column text filters */\n filterable = input<boolean>(false);\n\n // -- Inline Editing --\n /** Enable inline cell editing on double-click */\n editable = input<boolean>(false);\n\n // -- Row Actions --\n /**\n * Row-level actions rendered in a trailing actions column (e.g. Freigeben / Ablehnen).\n * Clicking an action button does NOT trigger the row's `rowClick` output.\n */\n actions = input<TableAction[]>([]);\n\n /** Header label for the actions column */\n actionsLabel = input<string>('');\n\n /** Width of the actions column (e.g. '120px') */\n actionsWidth = input<string | undefined>(undefined);\n\n /** Horizontal alignment of the action buttons (and header label) within the cell */\n actionsAlign = input<TableActionsAlign>('start');\n\n // -- Tree / grouped rows --\n /**\n * Row field holding the unique id. Required (together with {@link parentKey})\n * to enable hierarchical \"tree mode\". Absent ⇒ today's flat table.\n */\n idKey = input<string | undefined>(undefined);\n\n /**\n * Row field referencing the parent row's id. Presence of both `idKey` and\n * `parentKey` enables tree mode. Rows with an absent/empty or unknown parent\n * id are treated as roots.\n */\n parentKey = input<string | undefined>(undefined);\n\n /** Column key the chevron + indentation attach to. Default: first column. */\n treeColumn = input<string | undefined>(undefined);\n\n /** Initial expand state for all parent rows when uncontrolled. Default: true. */\n defaultExpanded = input<boolean>(true);\n\n /**\n * Controlled set of expanded parent ids. When provided, the table renders\n * exactly these as expanded; combine with {@link expandedIdsChange} for\n * `[(expandedIds)]`. When omitted, expansion is uncontrolled and seeded by\n * {@link defaultExpanded}.\n */\n expandedIds = input<string[] | undefined>(undefined);\n\n /** Indentation per depth level, in px. Default: 20. */\n indentSize = input<number>(20);\n\n /** Accessible name prefix of a column filter, followed by the column label. */\n filterAriaLabel = input('Filter by');\n\n /** Emitted when a sortable column header is clicked */\n readonly sort = output<SortEvent>();\n\n /** Emitted when a row is clicked */\n readonly rowClick = output<Record<string, unknown>>();\n\n /** Emitted when a cell is edited */\n readonly cellEdit = output<CellEditEvent>();\n\n /** Emitted when row selection changes */\n readonly selectionChange = output<SelectionChangeEvent>();\n\n /** Emitted when a row action button is clicked */\n readonly actionClick = output<ActionClickEvent>();\n\n /** Emitted when a parent row is expanded/collapsed (tree mode). */\n readonly rowToggle = output<RowToggleEvent>();\n\n /** Emitted with the full list of expanded parent ids; enables `[(expandedIds)]`. */\n readonly expandedIdsChange = output<string[]>();\n\n // -- Internal state --\n protected currentSort = signal<{ column: string; direction: 'asc' | 'desc' } | null>(null);\n /**\n * Effective page size. Seeded from the `pageSize` input (resetting if it\n * changes) and overridable by the user via the page-size dropdown.\n */\n protected internalPageSize = linkedSignal(() => this.pageSize());\n /**\n * Current page, kept within range: when the data shrinks or the page size\n * grows so that the page no longer exists, it moves back to the last one\n * (rather than showing an empty page captioned \"31–30 of 30\").\n */\n protected currentPage = linkedSignal<number, number>({\n source: () => this.totalPages(),\n computation: (total, previous) => Math.min(previous?.value ?? 0, total - 1),\n });\n /**\n * Selected row keys (see `DisplayRow.key`). Pruned when `data` changes, so\n * a key whose row is gone doesn't linger and count towards \"all selected\".\n */\n protected selectedRows = linkedSignal<Set<unknown>, Set<unknown>>({\n source: () => this.rowKeys(),\n computation: (keys, previous) => {\n if (!previous) return new Set<unknown>();\n const kept = new Set([...previous.value].filter((k) => keys.has(k)));\n return kept.size === previous.value.size ? previous.value : kept;\n },\n });\n protected columnFilters = signal<Record<string, string>>({});\n protected editingCell = signal<{ key: unknown; column: string } | null>(null);\n protected editValue = signal<string>('');\n\n /** The inline-edit input while a cell is being edited. */\n private readonly editInput = viewChild<ElementRef<HTMLInputElement>>('editInput');\n private focusedEditInput: HTMLInputElement | null = null;\n\n constructor() {\n // The edit input is inserted on double-click. `autofocus` is only honoured\n // for elements present when the page loads, so the input never received\n // focus (and Enter/Escape/blur never reached it); focus it once it renders.\n afterRenderEffect(() => {\n const el = this.editInput()?.nativeElement ?? null;\n if (el && el !== this.focusedEditInput) {\n el.focus();\n }\n this.focusedEditInput = el;\n });\n }\n\n /** The key of every row currently in `data()`. */\n private readonly rowKeys = computed(() => new Set(this.data().map((row) => this.rowKey(row))));\n\n /** See `DisplayRow.key`. */\n private rowKey(row: Record<string, unknown>): unknown {\n const idKey = this.idKey();\n return idKey ? String(row[idKey] ?? '') : row;\n }\n /** User expand/collapse overrides keyed by row id (uncontrolled mode). */\n private readonly expandOverrides = signal<Map<string, boolean>>(new Map());\n\n /**\n * Filtered data (applies column filters)\n */\n protected readonly filteredData = computed(() => {\n let items = this.data();\n const filters = this.columnFilters();\n\n if (this.filterable()) {\n for (const [key, value] of Object.entries(filters)) {\n if (value.trim()) {\n items = items.filter(row =>\n String(row[key] ?? '').toLowerCase().includes(value.toLowerCase())\n );\n }\n }\n }\n\n return items;\n });\n\n /** Comparator for the active sort, shared by flat sorting and tree sibling sorting. */\n private rowComparator(sortState: { column: string; direction: 'asc' | 'desc' }) {\n return (a: Record<string, unknown>, b: Record<string, unknown>): number => {\n const aVal = a[sortState.column];\n const bVal = b[sortState.column];\n let cmp = 0;\n if (aVal == null && bVal == null) cmp = 0;\n else if (aVal == null) cmp = -1;\n else if (bVal == null) cmp = 1;\n else if (typeof aVal === 'number' && typeof bVal === 'number') cmp = aVal - bVal;\n else cmp = String(aVal).localeCompare(String(bVal));\n return sortState.direction === 'asc' ? cmp : -cmp;\n };\n }\n\n /**\n * Sorted data\n */\n protected readonly sortedData = computed(() => {\n const items = [...this.filteredData()];\n const sortState = this.currentSort();\n if (!sortState) return items;\n return items.sort(this.rowComparator(sortState));\n });\n\n /**\n * Paginated data (or all if pagination disabled). Flat mode only.\n */\n protected readonly displayData = computed(() => {\n const items = this.sortedData();\n if (!this.paginate()) return items;\n const ps = this.internalPageSize();\n const start = this.currentPage() * ps;\n return items.slice(start, start + ps);\n });\n\n // -- Tree / grouped rows -----------------------------------------------------\n\n /** Whether hierarchical tree mode is active. */\n protected readonly treeMode = computed(() => !!this.idKey() && !!this.parentKey());\n\n /** Column the chevron + indentation attach to (defaults to the first column). */\n protected readonly effectiveTreeColumn = computed(\n () => this.treeColumn() || this.columns()[0]?.key\n );\n\n /** Stable map of row object → its index in `data()` (row identity for tree mode). */\n private readonly dataIndexMap = computed(() => {\n const map = new Map<Record<string, unknown>, number>();\n this.data().forEach((row, i) => map.set(row, i));\n return map;\n });\n\n /** Parent → ordered children index built from `idKey`/`parentKey`. */\n private readonly treeBuild = computed(() => {\n const idKey = this.idKey();\n const parentKey = this.parentKey();\n const byId = new Map<string, Record<string, unknown>>();\n const childrenOf = new Map<string, Record<string, unknown>[]>();\n const roots: Record<string, unknown>[] = [];\n if (!idKey || !parentKey) return { byId, childrenOf, roots };\n\n const rows = this.data();\n for (const row of rows) {\n const id = String(row[idKey] ?? '');\n if (id) byId.set(id, row);\n }\n for (const row of rows) {\n const parentRaw = row[parentKey];\n const parentId = parentRaw == null ? '' : String(parentRaw);\n if (parentId && byId.has(parentId)) {\n const siblings = childrenOf.get(parentId) ?? [];\n siblings.push(row);\n childrenOf.set(parentId, siblings);\n } else {\n // No parent, empty parent, or orphaned (unknown parent) ⇒ root.\n roots.push(row);\n }\n }\n return { byId, childrenOf, roots };\n });\n\n /**\n * Tree restricted to rows that match the active filters together with their\n * ancestor chain (so the path to a match stays visible).\n */\n private readonly treeFiltered = computed(() => {\n const { byId, childrenOf, roots } = this.treeBuild();\n const parentKey = this.parentKey();\n const filters = this.columnFilters();\n const active =\n this.filterable() && parentKey && Object.values(filters).some((v) => v.trim());\n if (!active) return { childrenOf, roots };\n\n const matches = (row: Record<string, unknown>): boolean =>\n Object.entries(filters).every(\n ([key, value]) =>\n !value.trim() ||\n String(row[key] ?? '').toLowerCase().includes(value.toLowerCase())\n );\n\n // Visible = every matching row plus all of its ancestors.\n const visible = new Set<Record<string, unknown>>();\n for (const row of this.data()) {\n if (!matches(row)) continue;\n let current: Record<string, unknown> | undefined = row;\n while (current && !visible.has(current)) {\n visible.add(current);\n const parentRaw: unknown = current[parentKey];\n const parentId = parentRaw == null ? '' : String(parentRaw);\n current = parentId ? byId.get(parentId) : undefined;\n }\n }\n\n const visibleChildrenOf = new Map<string, Record<string, unknown>[]>();\n const visibleRoots: Record<string, unknown>[] = [];\n for (const row of this.data()) {\n if (!visible.has(row)) continue;\n const parentRaw = row[parentKey];\n const parentId = parentRaw == null ? '' : String(parentRaw);\n const parent = parentId ? byId.get(parentId) : undefined;\n if (parent && visible.has(parent)) {\n const siblings = visibleChildrenOf.get(parentId) ?? [];\n siblings.push(row);\n visibleChildrenOf.set(parentId, siblings);\n } else {\n visibleRoots.push(row);\n }\n }\n return { childrenOf: visibleChildrenOf, roots: visibleRoots };\n });\n\n /** Tree with each sibling group sorted by the active sort (structure kept intact). */\n private readonly treeSorted = computed(() => {\n const { childrenOf, roots } = this.treeFiltered();\n const sortState = this.currentSort();\n if (!sortState) return { childrenOf, roots };\n const cmp = this.rowComparator(sortState);\n const sortedChildrenOf = new Map<string, Record<string, unknown>[]>();\n for (const [parentId, siblings] of childrenOf) {\n sortedChildrenOf.set(parentId, [...siblings].sort(cmp));\n }\n return { childrenOf: sortedChildrenOf, roots: [...roots].sort(cmp) };\n });\n\n /** Root rows after filter/sort — the unit of pagination in tree mode. */\n private readonly treeRoots = computed(() => this.treeSorted().roots);\n\n /**\n * Render-ready rows. In flat mode this wraps the existing paginated data; in\n * tree mode it paginates roots and flattens each visible (expanded) subtree.\n */\n protected readonly displayRows = computed<DisplayRow[]>(() => {\n const dataIndex = this.dataIndexMap();\n if (!this.treeMode()) {\n return this.displayData().map((row) => ({\n row,\n absIndex: dataIndex.get(row) ?? -1,\n key: this.rowKey(row),\n id: null,\n depth: 0,\n level: 0,\n hasChildren: false,\n expanded: false,\n posInSet: 0,\n setSize: 0,\n }));\n }\n\n const idKey = this.idKey() as string;\n const { childrenOf } = this.treeSorted();\n let roots = this.treeRoots();\n if (this.paginate()) {\n const ps = this.internalPageSize();\n const start = this.currentPage() * ps;\n roots = roots.slice(start, start + ps);\n }\n\n const out: DisplayRow[] = [];\n const walk = (group: Record<string, unknown>[], depth: number): void => {\n group.forEach((row, idx) => {\n const id = String(row[idKey] ?? '');\n const children = childrenOf.get(id) ?? [];\n const hasChildren = children.length > 0;\n const expanded = hasChildren && this.isExpanded(id);\n out.push({\n row,\n absIndex: dataIndex.get(row) ?? -1,\n key: this.rowKey(row),\n id,\n depth,\n level: depth + 1,\n hasChildren,\n expanded,\n posInSet: idx + 1,\n setSize: group.length,\n });\n if (expanded) walk(children, depth + 1);\n });\n };\n walk(roots, 0);\n return out;\n });\n\n /** Total pages */\n protected readonly totalPages = computed(() => {\n if (!this.paginate()) return 1;\n const total = this.treeMode() ? this.treeRoots().length : this.filteredData().length;\n return Math.max(1, Math.ceil(total / this.internalPageSize()));\n });\n\n /**\n * Pagination row count. Tree mode counts root rows (the paginated unit); flat\n * mode counts filtered rows.\n */\n protected readonly totalRows = computed(() =>\n this.treeMode() ? this.treeRoots().length : this.filteredData().length\n );\n\n /** Whether all visible rows are selected */\n protected readonly allSelected = computed(() => {\n const rows = this.displayRows();\n if (rows.length === 0) return false;\n const selected = this.selectedRows();\n return rows.every((r) => selected.has(r.key));\n });\n\n /** Whether some, but not all, visible rows are selected — the header box's mixed state. */\n protected readonly someSelected = computed(() => {\n const selected = this.selectedRows();\n return !this.allSelected() && this.displayRows().some((r) => selected.has(r.key));\n });\n\n protected readonly pageSizeSelectOptions = computed(() => {\n const label = this.pageSizeLabel();\n return this.pageSizeOptions().map((opt) => ({\n value: opt,\n label: `${opt} ${label}`.trim(),\n }));\n });\n\n /**\n * Size of the pagination controls: the page-size select's `size` and the\n * `lc-table-pagination--<size>` class that sizes prev/next to match it.\n */\n protected readonly paginationSize = computed<TableSize>(() => {\n const size = this.size();\n return size === 'sm' ? 'sm' : size === 'lg' ? 'lg' : 'md';\n });\n\n /**\n * Computed CSS classes for the table element\n */\n tableClasses = computed(() => {\n const classes = ['lc-table'];\n classes.push(`lc-table--${this.variant()}`);\n classes.push(`lc-table--${this.size()}`);\n if (this.hoverable()) classes.push('lc-table--hoverable');\n if (this.clickable()) classes.push('lc-table--clickable');\n return classes.join(' ');\n });\n\n /**\n * Computed CSS classes for the wrapper element\n */\n wrapperClasses = computed(() => {\n const classes = ['lc-table-wrapper'];\n if (this.responsive()) classes.push('lc-table-wrapper--responsive');\n return classes.join(' ');\n });\n\n // -- Sort --\n handleSort(columnKey: string): void {\n const column = this.columns().find((col) => col.key === columnKey);\n if (!column || !column.sortable) return;\n\n const current = this.currentSort();\n let direction: 'asc' | 'desc' = 'asc';\n if (current && current.column === columnKey) {\n direction = current.direction === 'asc' ? 'desc' : 'asc';\n }\n\n this.currentSort.set({ column: columnKey, direction });\n this.sort.emit({ column: columnKey, direction });\n }\n\n getSortState(columnKey: string): 'asc' | 'desc' | null {\n const current = this.currentSort();\n if (current && current.column === columnKey) return current.direction;\n return null;\n }\n\n getAriaSort(columnKey: string): string | null {\n const sortState = this.getSortState(columnKey);\n if (sortState === 'asc') return 'ascending';\n if (sortState === 'desc') return 'descending';\n return null;\n }\n\n getHeaderClasses(column: TableColumn): string {\n const classes: string[] = [];\n if (column.sortable) classes.push('sortable');\n const sortState = this.getSortState(column.key);\n if (sortState) classes.push(`sorted-${sortState}`);\n if (column.align === 'end') classes.push('lc-table__cell--end');\n return classes.join(' ');\n }\n\n getCellValue(row: Record<string, unknown>, columnKey: string): unknown {\n return row[columnKey];\n }\n\n getFormattedCellValue(\n row: Record<string, unknown>,\n column: TableColumn,\n rowIndex: number\n ): unknown {\n const value = this.getCellValue(row, column.key);\n if (!column.formatter) return value;\n\n return column.formatter(value, row, column, rowIndex);\n }\n\n getCellClasses(\n row: Record<string, unknown>,\n column: TableColumn,\n rowIndex: number\n ): string {\n const classes: string[] = [];\n if (column.cssClass) classes.push(column.cssClass);\n if (column.align === 'end') classes.push('lc-table__cell--end');\n\n if (typeof column.cellClass === 'string') {\n classes.push(column.cellClass);\n } else if (typeof column.cellClass === 'function') {\n const resolved = column.cellClass(\n this.getCellValue(row, column.key),\n row,\n column,\n rowIndex\n );\n if (resolved) classes.push(resolved);\n }\n\n return classes.join(' ').trim();\n }\n\n getCellStyles(\n row: Record<string, unknown>,\n column: TableColumn,\n rowIndex: number\n ): Record<string, string> | null {\n if (!column.cellStyle) return null;\n\n if (typeof column.cellStyle === 'function') {\n return column.cellStyle(\n this.getCellValue(row, column.key),\n row,\n column,\n rowIndex\n );\n }\n\n return column.cellStyle;\n }\n\n /** Whether the given column is the disclosure/indent column in tree mode. */\n protected isTreeColumn(columnKey: string): boolean {\n return this.treeMode() && columnKey === this.effectiveTreeColumn();\n }\n\n /** Indent levels to render before a row's chevron (one guide per ancestor depth). */\n protected indentLevels(depth: number): number[] {\n return Array.from({ length: depth }, (_, i) => i);\n }\n\n /** Accessible name for a row's disclosure button (the tree column's value). */\n protected treeCellLabel(row: Record<string, unknown>): string {\n const col = this.effectiveTreeColumn();\n return col ? String(row[col] ?? '') : '';\n }\n\n getCellTemplate(columnKey: string): TableCellDirective | undefined {\n return this.cellTemplates?.find((template) => template.columnKey() === columnKey);\n }\n\n hasCustomTemplate(columnKey: string): boolean {\n return !!this.getCellTemplate(columnKey);\n }\n\n onRowClick(row: Record<string, unknown>, event?: Event): void {\n // Clickable rows (3.16): a click on a control inside the row is the\n // control's own. Without `clickable` every click reaches `rowClick` (3.15).\n if (this.clickable() && event && isFromNestedControl(event)) return;\n this.rowClick.emit(row);\n }\n\n // -- Row Actions --\n /** Whether the trailing actions column should be rendered */\n protected readonly hasActions = computed(() => this.actions().length > 0);\n\n protected isActionHidden(\n action: TableAction,\n row: Record<string, unknown>,\n rowIndex: number\n ): boolean {\n return action.hidden ? action.hidden(row, rowIndex) : false;\n }\n\n protected isActionDisabled(\n action: TableAction,\n row: Record<string, unknown>,\n rowIndex: number\n ): boolean {\n return action.disabled ? action.disabled(row, rowIndex) : false;\n }\n\n /**\n * Handles an action button click. The DOM click is stopped from propagating\n * (see template `$event.stopPropagation()`), so the row's `rowClick` never fires.\n */\n protected onActionClick(\n action: TableAction,\n row: Record<string, unknown>,\n rowIndex: number\n ): void {\n this.actionClick.emit({\n action: action.key,\n row,\n rowIndex,\n });\n }\n\n // -- Tree keyboard model -----------------------------------------------------\n // `role=\"treegrid\"` promises a composite widget: one tab stop, arrows to move\n // between rows, Right/Left to open/close a group or step into/out of it. The\n // rows carry a roving tabindex; the focused row is remembered by key so it\n // survives re-renders, and falls back to the first row when it is gone.\n\n private readonly rowEls = viewChildren<ElementRef<HTMLTableRowElement>>('dataRow');\n private readonly focusedRowKey = signal<unknown>(null);\n\n /** Key of the row that holds the tab stop. */\n private readonly effectiveFocusedKey = computed(() => {\n const rows = this.displayRows();\n const key = this.focusedRowKey();\n return rows.some((r) => r.key === key) ? key : rows[0]?.key;\n });\n\n protected rowTabindex(dr: DisplayRow): number | null {\n // Flat mode: a tab stop per data row only with `clickable` (3.16).\n if (!this.treeMode()) return this.clickable() ? 0 : null;\n return dr.key === this.effectiveFocusedKey() ? 0 : -1;\n }\n\n protected onRowFocus(dr: DisplayRow): void {\n if (this.treeMode()) this.focusedRowKey.set(dr.key);\n }\n\n protected onRowKeydown(event: KeyboardEvent, dr: DisplayRow): void {\n if (!this.treeMode()) {\n // Clickable flat rows (3.16): Enter and Space on the row itself. Keys of\n // a nested control (a button, a link, a switch) stay the control's.\n if (!this.clickable() || event.target !== event.currentTarget) return;\n if (event.key !== 'Enter' && event.key !== ' ') return;\n event.preventDefault(); // Space would scroll the page\n this.rowClick.emit(dr.row);\n return;\n }\n // Keys typed into an inline editor or the row's own controls are theirs.\n if ((event.target as HTMLElement).tagName === 'INPUT') return;\n const rows = this.displayRows();\n const index = rows.findIndex((r) => r.key === dr.key);\n if (index < 0) return;\n\n switch (event.key) {\n case 'ArrowDown':\n this.focusRow(index + 1);\n break;\n case 'ArrowUp':\n this.focusRow(index - 1);\n break;\n case 'Home':\n this.focusRow(0);\n break;\n case 'End':\n this.focusRow(rows.length - 1);\n break;\n case 'ArrowRight':\n if (!dr.hasChildren) return;\n if (dr.expanded) this.focusRow(index + 1); // first child\n else if (dr.id) this.toggleRow(dr.id, dr.row);\n break;\n case 'ArrowLeft':\n if (dr.hasChildren && dr.expanded && dr.id) {\n this.toggleRow(dr.id, dr.row);\n } else if (dr.depth > 0) {\n // Step out to the parent: the nearest row above with a smaller depth.\n for (let i = index - 1; i >= 0; i--) {\n if (rows[i].depth < dr.depth) {\n this.focusRow(i);\n break;\n }\n }\n } else {\n return;\n }\n break;\n case 'Enter':\n this.rowClick.emit(dr.row);\n break;\n case ' ':\n if (!this.selectable()) return;\n this.toggleRowSelect(dr.row);\n break;\n default:\n return;\n }\n event.preventDefault();\n }\n\n private focusRow(index: number): void {\n const rows = this.displayRows();\n if (index < 0 || index >= rows.length) return;\n this.focusedRowKey.set(rows[index].key);\n this.rowEls()[index]?.nativeElement.focus();\n }\n\n // -- Tree expand / collapse --------------------------------------------------\n\n /** Whether the parent row with the given id is currently expanded. */\n protected isExpanded(id: string): boolean {\n const controlled = this.expandedIds();\n if (controlled !== undefined) return controlled.includes(id);\n const override = this.expandOverrides().get(id);\n if (override !== undefined) return override;\n return this.defaultExpanded();\n }\n\n /** Chevron click: toggle expand state without triggering the row click. */\n protected onChevronClick(displayRow: DisplayRow, event: Event): void {\n event.stopPropagation();\n if (displayRow.id) this.toggleRow(displayRow.id, displayRow.row);\n }\n\n private toggleRow(id: string, row: Record<string, unknown>): void {\n const expanded = !this.isExpanded(id);\n this.expandOverrides.update((map) => {\n const next = new Map(map);\n next.set(id, expanded);\n return next;\n });\n this.rowToggle.emit({ id, expanded, row });\n this.expandedIdsChange.emit(this.nextExpandedIds(id, expanded));\n }\n\n /** The full list of expanded parent ids after applying a single toggle. */\n private nextExpandedIds(changedId: string, changedExpanded: boolean): string[] {\n const controlled = this.expandedIds();\n const overrides = this.expandOverrides();\n const parentIds = Array.from(this.treeBuild().childrenOf.keys());\n return parentIds.filter((pid) => {\n if (pid === changedId) return changedExpanded;\n if (controlled !== undefined) return controlled.includes(pid);\n const override = overrides.get(pid);\n return override !== undefined ? override : this.defaultExpanded();\n });\n }\n\n // -- Pagination --\n protected goToPage(page: number): void {\n if (page >= 0 && page < this.totalPages()) {\n this.currentPage.set(page);\n }\n }\n\n protected onPageSizeChange(event: Event): void {\n const newSize = Number((event.target as HTMLSelectElement).value);\n this.internalPageSize.set(newSize);\n this.currentPage.set(0);\n }\n\n protected onPageSizeModelChange(value: string | number | null): void {\n if (value == null) {\n return;\n }\n const parsed = typeof value === 'number' ? value : Number(value);\n if (!Number.isFinite(parsed)) {\n return;\n }\n this.internalPageSize.set(parsed);\n this.currentPage.set(0);\n }\n\n protected get paginationStart(): number {\n if (this.totalRows() === 0) return 0;\n return this.currentPage() * this.internalPageSize() + 1;\n }\n\n protected get paginationEnd(): number {\n return Math.min((this.currentPage() + 1) * this.internalPageSize(), this.totalRows());\n }\n\n // -- Selection --\n // Keyed by row identity (see `DisplayRow.key`), never by position: a sort or\n // filter changes where a row is shown, not which row it is.\n protected toggleSelectAll(): void {\n const selected = new Set(this.selectedRows());\n const rows = this.displayRows();\n const allSelected = this.allSelected();\n\n rows.forEach((r) => {\n if (allSelected) selected.delete(r.key);\n else selected.add(r.key);\n });\n\n this.selectedRows.set(selected);\n this.emitSelectionChange();\n }\n\n protected toggleRowSelect(row: Record<string, unknown>): void {\n const key = this.rowKey(row);\n const selected = new Set(this.selectedRows());\n if (selected.has(key)) selected.delete(key);\n else selected.add(key);\n this.selectedRows.set(selected);\n this.emitSelectionChange();\n }\n\n protected isRowSelected(row: Record<string, unknown>): boolean {\n return this.selectedRows().has(this.rowKey(row));\n }\n\n private emitSelectionChange(): void {\n const keys = this.selectedRows();\n // In data order, so the consumer gets a stable list whatever the sort.\n const selected = this.data().filter((row) => keys.has(this.rowKey(row)));\n this.selectionChange.emit({ selected, allSelected: this.allSelected() });\n }\n\n // -- Column Filters --\n protected onFilterChange(columnKey: string, value: string): void {\n const filters = { ...this.columnFilters(), [columnKey]: value };\n this.columnFilters.set(filters);\n this.currentPage.set(0);\n }\n\n protected getFilterValue(columnKey: string): string {\n return this.columnFilters()[columnKey] || '';\n }\n\n // -- Inline Editing --\n // Keyed by row identity too — the edited cell is the one the user clicked,\n // whichever position sorting put it in.\n protected startEdit(row: Record<string, unknown>, column: string, currentValue: unknown): void {\n if (!this.editable()) return;\n const col = this.columns().find(c => c.key === column);\n if (col && col.editable === false) return;\n this.editingCell.set({ key: this.rowKey(row), column });\n this.editValue.set(String(currentValue ?? ''));\n }\n\n protected isEditing(row: Record<string, unknown>, column: string): boolean {\n const cell = this.editingCell();\n return cell !== null && cell.key === this.rowKey(row) && cell.column === column;\n }\n\n protected commitEdit(row: Record<string, unknown>, column: string): void {\n // Only the cell being edited commits: the input's blur arrives after Enter\n // or Escape already ended the edit, and must not commit (or re-commit).\n if (!this.isEditing(row, column)) return;\n const oldValue = row[column];\n const newValue = this.editValue();\n this.editingCell.set(null);\n this.editValue.set('');\n if (String(oldValue ?? '') !== newValue) {\n const rowIndex = this.dataIndexMap().get(row) ?? -1;\n this.cellEdit.emit({ row, column, oldValue, newValue, rowIndex });\n }\n }\n\n protected cancelEdit(): void {\n this.editingCell.set(null);\n this.editValue.set('');\n }\n\n protected onEditKeydown(event: KeyboardEvent, row: Record<string, unknown>, column: string): void {\n if (event.key === 'Enter') {\n this.commitEdit(row, column);\n } else if (event.key === 'Escape') {\n this.cancelEdit();\n }\n }\n\n /** Enter/Space on a focused sortable header sorts, like a click does. */\n protected onHeaderKeydown(event: KeyboardEvent, columnKey: string): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.handleSort(columnKey);\n }\n }\n\n protected getInputValue(event: Event): string {\n return (event.target as HTMLInputElement).value;\n }\n}\n","<div [class]=\"wrapperClasses()\">\n <table [class]=\"tableClasses()\" [attr.role]=\"treeMode() ? 'treegrid' : 'table'\">\n @if (caption()) {\n <!-- First child of the table, so it names the table (and the treegrid). -->\n <caption class=\"lc-table__caption\" [class.lc-table__caption--hidden]=\"!showCaption()\">{{ caption() }}</caption>\n }\n <thead>\n <!-- Filter row -->\n @if (filterable()) {\n <tr class=\"lc-table__filter-row\">\n @if (selectable()) {\n <th class=\"lc-table__select-cell\"></th>\n }\n @for (column of columns(); track column.key) {\n <th>\n @if (column.filterable !== false) {\n <lc-input\n class=\"lc-table__filter-input\"\n size=\"xs\"\n [placeholder]=\"filterPlaceholderLabel() + ' ' + column.label\"\n [ariaLabel]=\"filterAriaLabel() + ' ' + column.label\"\n [ngModel]=\"getFilterValue(column.key)\"\n (ngModelChange)=\"onFilterChange(column.key, $event)\"\n />\n }\n </th>\n }\n @if (hasActions()) {\n <th class=\"lc-table__actions-cell\"></th>\n }\n </tr>\n }\n <!-- Header row -->\n <tr>\n @if (selectable()) {\n <th class=\"lc-table__select-cell\" scope=\"col\">\n <!-- The label's ::before covers the cell: a 44 px hit area (request 043). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- only stops the click; the checkbox inside is the keyboard control -->\n <label class=\"lc-table__select-hit\" (click)=\"$event.stopPropagation()\">\n <input\n type=\"checkbox\"\n class=\"lc-table__checkbox\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (change)=\"toggleSelectAll()\"\n [attr.aria-label]=\"selectAllAriaLabel()\"\n />\n </label>\n </th>\n }\n @for (column of columns(); track column.key) {\n <!-- A sortable header is a keyboard stop too: Enter/Space sort like a click. -->\n <th\n scope=\"col\"\n [class]=\"getHeaderClasses(column) + (column.cssClass ? ' ' + column.cssClass : '')\"\n [attr.aria-sort]=\"getAriaSort(column.key)\"\n [attr.tabindex]=\"column.sortable ? 0 : null\"\n [style.width]=\"column.width\"\n [title]=\"column.tooltip || ''\"\n (click)=\"handleSort(column.key)\"\n (keydown)=\"column.sortable ? onHeaderKeydown($event, column.key) : null\">\n @if (column.align === 'end') {\n <!-- 3.17: the arrow is placed before the label (CSS), so the label stays\n flush with the figures; in the DOM it still follows the label. No\n whitespace between the label and the arrow. -->\n <span class=\"lc-table__sort-label\">{{ column.label }}@if (column.sortable && getSortState(column.key)) {<span class=\"sort-indicator\" [attr.aria-label]=\"getSortState(column.key) === 'asc' ? sortedAscendingLabel() : sortedDescendingLabel()\">\n @if (getSortState(column.key) === 'asc') {\n ↑\n } @else {\n ↓\n }\n </span>}</span>\n } @else {\n {{ column.label }}\n @if (column.sortable && getSortState(column.key)) {\n <span class=\"sort-indicator\" [attr.aria-label]=\"getSortState(column.key) === 'asc' ? sortedAscendingLabel() : sortedDescendingLabel()\">\n @if (getSortState(column.key) === 'asc') {\n ↑\n } @else {\n ↓\n }\n </span>\n }\n }\n </th>\n }\n @if (hasActions()) {\n <th\n scope=\"col\"\n class=\"lc-table__actions-cell\"\n [class]=\"'lc-table__actions-cell--' + actionsAlign()\"\n [style.width]=\"actionsWidth()\"\n >\n {{ actionsLabel() }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @if (displayRows().length === 0) {\n <tr>\n <td [attr.colspan]=\"columns().length + (selectable() ? 1 : 0) + (hasActions() ? 1 : 0)\" class=\"lc-table__empty\">\n {{ emptyText() }}\n </td>\n </tr>\n } @else {\n @for (dr of displayRows(); track dr.key) {\n <!-- In tree mode the rows form the treegrid's keyboard model: a roving\n tab stop plus Arrow/Home/End/Enter/Space handling (see the\n component). Flat mode keeps plain table rows. -->\n <tr\n #dataRow\n [class.lc-table__row--selected]=\"selectable() && isRowSelected(dr.row)\"\n [class.lc-table__row--group]=\"dr.hasChildren\"\n [attr.role]=\"treeMode() ? 'row' : null\"\n [attr.tabindex]=\"rowTabindex(dr)\"\n [attr.aria-level]=\"treeMode() ? dr.level : null\"\n [attr.aria-expanded]=\"treeMode() && dr.hasChildren ? dr.expanded : null\"\n [attr.aria-posinset]=\"treeMode() ? dr.posInSet : null\"\n [attr.aria-setsize]=\"treeMode() ? dr.setSize : null\"\n [attr.aria-selected]=\"treeMode() && selectable() ? isRowSelected(dr.row) : null\"\n (click)=\"onRowClick(dr.row, $event)\"\n (focus)=\"onRowFocus(dr)\"\n (keydown)=\"onRowKeydown($event, dr)\"\n >\n @if (selectable()) {\n <td class=\"lc-table__select-cell\" [attr.role]=\"treeMode() ? 'gridcell' : null\">\n <!-- A click in the cell toggles the box, never the row (request 043). -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- only stops the click; the checkbox inside is the keyboard control -->\n <label class=\"lc-table__select-hit\" (click)=\"$event.stopPropagation()\">\n <input\n type=\"checkbox\"\n class=\"lc-table__checkbox\"\n [checked]=\"isRowSelected(dr.row)\"\n (change)=\"toggleRowSelect(dr.row)\"\n (click)=\"$event.stopPropagation()\"\n [attr.aria-label]=\"selectRowAriaLabel() + ' ' + (dr.absIndex + 1)\"\n />\n </label>\n </td>\n }\n @for (column of columns(); track column.key) {\n <td\n [class]=\"getCellClasses(dr.row, column, dr.absIndex)\"\n [ngStyle]=\"getCellStyles(dr.row, column, dr.absIndex)\"\n [attr.role]=\"treeMode() ? 'gridcell' : null\"\n (dblclick)=\"editable() ? startEdit(dr.row, column.key, getCellValue(dr.row, column.key)) : null\"\n >\n @if (isTreeColumn(column.key)) {\n <span class=\"lc-table__tree-cell\">\n @for (lvl of indentLevels(dr.depth); track lvl) {\n <span class=\"lc-table__tree-indent\" [style.width.px]=\"indentSize()\"></span>\n }\n <span class=\"lc-table__tree-chevron\" [style.width.px]=\"indentSize()\">\n @if (dr.hasChildren) {\n <button\n type=\"button\"\n class=\"lc-table__chevron-btn\"\n [class.lc-table__chevron-btn--expanded]=\"dr.expanded\"\n [attr.aria-label]=\"(dr.expanded ? collapseRowAriaLabel() : expandRowAriaLabel()) + ' ' + treeCellLabel(dr.row)\"\n [attr.aria-expanded]=\"dr.expanded\"\n (click)=\"onChevronClick(dr, $event)\"\n >\n <lc-icon name=\"chevron-right\" size=\"xs\" [decorative]=\"true\" />\n </button>\n }\n </span>\n <span class=\"lc-table__tree-content\">\n <ng-container\n *ngTemplateOutlet=\"cellContent; context: { row: dr.row, column: column, absIndex: dr.absIndex }\"\n ></ng-container>\n </span>\n </span>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"cellContent; context: { row: dr.row, column: column, absIndex: dr.absIndex }\"\n ></ng-container>\n }\n </td>\n }\n @if (hasActions()) {\n <td\n class=\"lc-table__actions-cell\"\n [class]=\"'lc-table__actions-cell--' + actionsAlign()\"\n [attr.role]=\"treeMode() ? 'gridcell' : null\"\n (click)=\"$event.stopPropagation()\"\n >\n <div class=\"lc-table__actions\">\n @for (action of actions(); track action.key) {\n @if (!isActionHidden(action, dr.row, dr.absIndex)) {\n <lc-button\n [variant]=\"action.variant ?? 'ghost'\"\n size=\"xs\"\n [iconOnly]=\"!action.label\"\n [disabled]=\"isActionDisabled(action, dr.row, dr.absIndex)\"\n [ariaLabel]=\"action.tooltip ?? action.label ?? action.key\"\n (clicked)=\"onActionClick(action, dr.row, dr.absIndex)\"\n >\n @if (action.icon) {\n <lc-icon [name]=\"action.icon\" size=\"sm\" [decorative]=\"true\" />\n }\n @if (action.label) {\n {{ action.label }}\n }\n </lc-button>\n }\n }\n </div>\n </td>\n }\n </tr>\n }\n }\n </tbody>\n </table>\n</div>\n\n<!-- Shared cell content (edit input / custom template / formatted value) -->\n<ng-template #cellContent let-row=\"row\" let-column=\"column\" let-absIndex=\"absIndex\">\n @if (isEditing(row, column.key)) {\n <input\n #editInput\n type=\"text\"\n class=\"lc-table__edit-input\"\n [value]=\"editValue()\"\n (input)=\"editValue.set(getInputValue($event))\"\n (blur)=\"commitEdit(row, column.key)\"\n (keydown)=\"onEditKeydown($event, row, column.key)\"\n />\n } @else if (hasCustomTemplate(column.key)) {\n <ng-container *ngTemplateOutlet=\"getCellTemplate(column.key)!.template; context: { $implicit: row }\"></ng-container>\n } @else {\n {{ getFormattedCellValue(row, column, absIndex) }}\n }\n</ng-template>\n\n<!-- Pagination -->\n@if (paginate()) {\n <div [class]=\"'lc-table-pagination lc-table-pagination--' + paginationSize()\">\n <div class=\"lc-table-pagination__info\">\n {{ paginationStart }}–{{ paginationEnd }} {{ rangeOfLabel() }} {{ totalRows() }}\n </div>\n <div class=\"lc-table-pagination__controls\">\n <lc-select\n class=\"lc-table-pagination__size\"\n [size]=\"paginationSize()\"\n [options]=\"pageSizeSelectOptions()\"\n [ngModel]=\"internalPageSize()\"\n [ariaLabel]=\"rowsPerPageAriaLabel()\"\n (ngModelChange)=\"onPageSizeModelChange($event)\"\n />\n <div class=\"lc-table-pagination__pager\">\n <button\n type=\"button\"\n class=\"lc-table-pagination__btn\"\n [disabled]=\"currentPage() === 0\"\n (click)=\"goToPage(currentPage() - 1)\"\n [attr.aria-label]=\"previousPageAriaLabel()\"\n >‹</button>\n <span class=\"lc-table-pagination__page\">\n {{ currentPage() + 1 }} / {{ totalPages() }}\n </span>\n <button\n type=\"button\"\n class=\"lc-table-pagination__btn\"\n [disabled]=\"currentPage() >= totalPages() - 1\"\n (click)=\"goToPage(currentPage() + 1)\"\n [attr.aria-label]=\"nextPageAriaLabel()\"\n >›</button>\n </div>\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,MAAA,GAAA;GAAA,MAAA,CAseR,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -248,7 +248,7 @@ var TagInputComponent = class TagInputComponent {
|
|
|
248
248
|
}],
|
|
249
249
|
ngImport: i0,
|
|
250
250
|
template: "@if (label()) {\n <label class=\"lc-tag-input__label\" [for]=\"inputId\">{{ label() }}</label>\n}\n\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- container click only forwards focus to the input, which is focusable itself -->\n<div\n class=\"lc-tag-input__container\"\n [class.lc-tag-input__container--focused]=\"focused()\"\n [class.lc-tag-input__container--disabled]=\"isDisabled()\"\n (click)=\"focusInput()\"\n>\n @for (tag of tags(); track $index) {\n <span class=\"lc-tag-input__tag\">\n <span class=\"lc-tag-input__tag-text\">{{ tag }}</span>\n @if (removable() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"lc-tag-input__tag-remove\"\n (click)=\"removeTag($index); $event.stopPropagation()\"\n [attr.aria-label]=\"removeTagAriaLabel() + ' ' + tag\"\n >×</button>\n }\n </span>\n }\n\n <input\n #inputEl\n type=\"text\"\n [id]=\"inputId\"\n class=\"lc-tag-input__input\"\n [attr.role]=\"hasSuggestions() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"hasSuggestions() ? 'list' : null\"\n [attr.aria-expanded]=\"hasSuggestions() ? showSuggestions() : null\"\n [attr.aria-controls]=\"showSuggestions() ? listboxId : null\"\n [attr.aria-activedescendant]=\"showSuggestions() && activeIndex() >= 0 ? optionId(activeIndex()) : null\"\n [placeholder]=\"inputPlaceholder()\"\n [value]=\"inputValue()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"!canAdd()\"\n [attr.aria-readonly]=\"!canAdd() ? true : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n</div>\n\n@if (showSuggestions()) {\n <ul class=\"lc-tag-input__suggestions\" role=\"listbox\" [id]=\"listboxId\" [attr.aria-label]=\"label() || suggestionsAriaLabel()\">\n @for (sug of filteredSuggestions(); track sug; let i = $index) {\n <li\n class=\"lc-tag-input__suggestion\"\n [class.lc-tag-input__suggestion--active]=\"i === activeIndex()\"\n role=\"option\"\n [id]=\"optionId(i)\"\n [attr.aria-selected]=\"i === activeIndex()\"\n (mouseenter)=\"activeIndex.set(i)\"\n (mousedown)=\"selectSuggestion(sug); $event.preventDefault()\"\n >{{ sug }}</li>\n }\n </ul>\n}\n",
|
|
251
|
-
styles: [":host{display:block;position:relative}.lc-tag-input__label{display:block;margin-bottom:4px;font-size:var(--typography-font-size-sm, .875rem);font-weight:500;color:var(--color-text-secondary)}.lc-tag-input__container{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:6px 8px;min-height:40px;border:1px solid var(--color-field-border);border-radius:var(--border-radius-md);background:var(--color-surface-2);cursor:text;transition:border-color .15s,box-shadow .15s}.lc-tag-input__container:hover:not(.lc-tag-input__container--focused){border-color:var(--color-text-secondary)}.lc-tag-input__container--focused{border-color:var(--color-primary-500);box-shadow:0 0 0 2px #20849740}.lc-tag-input__container--disabled{opacity:.6;background:var(--color-surface-muted);cursor:default}.lc-tag-input__tag{display:inline-flex;align-items:center;gap:2px;padding:2px 8px;border-radius:var(--border-radius-full);background:#20849729;border:1px solid var(--color-border-strong);color:var(--color-on-primary-subtle);font-size:var(--typography-font-size-sm, .875rem);line-height:1.4;-webkit-user-select:none;user-select:none}.lc-tag-input__tag-text{max-width:150px;overflow:hidden;
|
|
251
|
+
styles: [":host{display:block;position:relative}.lc-tag-input__label{display:block;margin-bottom:4px;font-size:var(--typography-font-size-sm, .875rem);font-weight:500;color:var(--color-text-secondary)}.lc-tag-input__container{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:6px 8px;min-height:40px;border:1px solid var(--color-field-border);border-radius:var(--border-radius-md);background:var(--color-surface-2);cursor:text;transition:border-color .15s,box-shadow .15s}.lc-tag-input__container:hover:not(.lc-tag-input__container--focused){border-color:var(--color-text-secondary)}.lc-tag-input__container--focused{border-color:var(--color-primary-500);box-shadow:0 0 0 2px #20849740}.lc-tag-input__container--disabled{opacity:.6;background:var(--color-surface-muted);cursor:default}.lc-tag-input__tag{display:inline-flex;align-items:center;gap:2px;padding:2px 8px;border-radius:var(--border-radius-full);border-radius:calc(.5lh + 3px);background:#20849729;border:1px solid var(--color-border-strong);color:var(--color-on-primary-subtle);font-size:var(--typography-font-size-sm, .875rem);line-height:1.4;-webkit-user-select:none;user-select:none}.lc-tag-input__tag-text{max-width:150px;overflow:hidden;white-space:normal;overflow-wrap:break-word;hyphens:auto;hyphenate-limit-chars:12 4 3}.lc-tag-input__tag-remove{position:relative;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border:none;border-radius:50%;background:transparent;color:currentColor;cursor:pointer;font-size:14px;line-height:1;padding:0;opacity:.7;transition:opacity .1s,background .1s}.lc-tag-input__tag-remove:before{content:\"\";position:absolute;inset:-.25rem}.lc-tag-input__tag-remove:hover{opacity:1;background:#20849733}.lc-tag-input__tag-remove:focus-visible{opacity:1;outline:2px solid var(--color-primary-500);outline-offset:2px}@media(forced-colors:active){.lc-tag-input__tag-remove:focus-visible{outline-color:Highlight}}.lc-tag-input__input{flex:1;min-width:60px;border:none;outline:none;background:transparent;font-size:var(--typography-font-size-sm, .875rem);color:var(--color-text-primary);padding:2px 0}.lc-tag-input__input::placeholder{color:var(--color-text-tertiary)}.lc-tag-input__input:read-only{cursor:default}.lc-tag-input__suggestions{position:absolute;z-index:50;top:100%;left:0;right:0;margin:4px 0 0;padding:4px 0;list-style:none;border:1px solid var(--color-border-strong);border-radius:var(--border-radius-md);background-color:var(--color-surface);background-image:var(--gradient-surface);box-shadow:var(--elevation-4);max-height:180px;overflow-y:auto}.lc-tag-input__suggestion{padding:6px 12px;font-size:var(--typography-font-size-sm, .875rem);cursor:pointer;color:var(--color-text-secondary)}.lc-tag-input__suggestion:hover,.lc-tag-input__suggestion--active{background:var(--color-surface-hover);color:var(--color-text-primary)}\n"],
|
|
252
252
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
253
253
|
});
|
|
254
254
|
};
|
|
@@ -269,7 +269,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
269
269
|
multi: true
|
|
270
270
|
}],
|
|
271
271
|
template: "@if (label()) {\n <label class=\"lc-tag-input__label\" [for]=\"inputId\">{{ label() }}</label>\n}\n\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- container click only forwards focus to the input, which is focusable itself -->\n<div\n class=\"lc-tag-input__container\"\n [class.lc-tag-input__container--focused]=\"focused()\"\n [class.lc-tag-input__container--disabled]=\"isDisabled()\"\n (click)=\"focusInput()\"\n>\n @for (tag of tags(); track $index) {\n <span class=\"lc-tag-input__tag\">\n <span class=\"lc-tag-input__tag-text\">{{ tag }}</span>\n @if (removable() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"lc-tag-input__tag-remove\"\n (click)=\"removeTag($index); $event.stopPropagation()\"\n [attr.aria-label]=\"removeTagAriaLabel() + ' ' + tag\"\n >×</button>\n }\n </span>\n }\n\n <input\n #inputEl\n type=\"text\"\n [id]=\"inputId\"\n class=\"lc-tag-input__input\"\n [attr.role]=\"hasSuggestions() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"hasSuggestions() ? 'list' : null\"\n [attr.aria-expanded]=\"hasSuggestions() ? showSuggestions() : null\"\n [attr.aria-controls]=\"showSuggestions() ? listboxId : null\"\n [attr.aria-activedescendant]=\"showSuggestions() && activeIndex() >= 0 ? optionId(activeIndex()) : null\"\n [placeholder]=\"inputPlaceholder()\"\n [value]=\"inputValue()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"!canAdd()\"\n [attr.aria-readonly]=\"!canAdd() ? true : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n</div>\n\n@if (showSuggestions()) {\n <ul class=\"lc-tag-input__suggestions\" role=\"listbox\" [id]=\"listboxId\" [attr.aria-label]=\"label() || suggestionsAriaLabel()\">\n @for (sug of filteredSuggestions(); track sug; let i = $index) {\n <li\n class=\"lc-tag-input__suggestion\"\n [class.lc-tag-input__suggestion--active]=\"i === activeIndex()\"\n role=\"option\"\n [id]=\"optionId(i)\"\n [attr.aria-selected]=\"i === activeIndex()\"\n (mouseenter)=\"activeIndex.set(i)\"\n (mousedown)=\"selectSuggestion(sug); $event.preventDefault()\"\n >{{ sug }}</li>\n }\n </ul>\n}\n",
|
|
272
|
-
styles: [":host{display:block;position:relative}.lc-tag-input__label{display:block;margin-bottom:4px;font-size:var(--typography-font-size-sm, .875rem);font-weight:500;color:var(--color-text-secondary)}.lc-tag-input__container{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:6px 8px;min-height:40px;border:1px solid var(--color-field-border);border-radius:var(--border-radius-md);background:var(--color-surface-2);cursor:text;transition:border-color .15s,box-shadow .15s}.lc-tag-input__container:hover:not(.lc-tag-input__container--focused){border-color:var(--color-text-secondary)}.lc-tag-input__container--focused{border-color:var(--color-primary-500);box-shadow:0 0 0 2px #20849740}.lc-tag-input__container--disabled{opacity:.6;background:var(--color-surface-muted);cursor:default}.lc-tag-input__tag{display:inline-flex;align-items:center;gap:2px;padding:2px 8px;border-radius:var(--border-radius-full);background:#20849729;border:1px solid var(--color-border-strong);color:var(--color-on-primary-subtle);font-size:var(--typography-font-size-sm, .875rem);line-height:1.4;-webkit-user-select:none;user-select:none}.lc-tag-input__tag-text{max-width:150px;overflow:hidden;
|
|
272
|
+
styles: [":host{display:block;position:relative}.lc-tag-input__label{display:block;margin-bottom:4px;font-size:var(--typography-font-size-sm, .875rem);font-weight:500;color:var(--color-text-secondary)}.lc-tag-input__container{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:6px 8px;min-height:40px;border:1px solid var(--color-field-border);border-radius:var(--border-radius-md);background:var(--color-surface-2);cursor:text;transition:border-color .15s,box-shadow .15s}.lc-tag-input__container:hover:not(.lc-tag-input__container--focused){border-color:var(--color-text-secondary)}.lc-tag-input__container--focused{border-color:var(--color-primary-500);box-shadow:0 0 0 2px #20849740}.lc-tag-input__container--disabled{opacity:.6;background:var(--color-surface-muted);cursor:default}.lc-tag-input__tag{display:inline-flex;align-items:center;gap:2px;padding:2px 8px;border-radius:var(--border-radius-full);border-radius:calc(.5lh + 3px);background:#20849729;border:1px solid var(--color-border-strong);color:var(--color-on-primary-subtle);font-size:var(--typography-font-size-sm, .875rem);line-height:1.4;-webkit-user-select:none;user-select:none}.lc-tag-input__tag-text{max-width:150px;overflow:hidden;white-space:normal;overflow-wrap:break-word;hyphens:auto;hyphenate-limit-chars:12 4 3}.lc-tag-input__tag-remove{position:relative;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border:none;border-radius:50%;background:transparent;color:currentColor;cursor:pointer;font-size:14px;line-height:1;padding:0;opacity:.7;transition:opacity .1s,background .1s}.lc-tag-input__tag-remove:before{content:\"\";position:absolute;inset:-.25rem}.lc-tag-input__tag-remove:hover{opacity:1;background:#20849733}.lc-tag-input__tag-remove:focus-visible{opacity:1;outline:2px solid var(--color-primary-500);outline-offset:2px}@media(forced-colors:active){.lc-tag-input__tag-remove:focus-visible{outline-color:Highlight}}.lc-tag-input__input{flex:1;min-width:60px;border:none;outline:none;background:transparent;font-size:var(--typography-font-size-sm, .875rem);color:var(--color-text-primary);padding:2px 0}.lc-tag-input__input::placeholder{color:var(--color-text-tertiary)}.lc-tag-input__input:read-only{cursor:default}.lc-tag-input__suggestions{position:absolute;z-index:50;top:100%;left:0;right:0;margin:4px 0 0;padding:4px 0;list-style:none;border:1px solid var(--color-border-strong);border-radius:var(--border-radius-md);background-color:var(--color-surface);background-image:var(--gradient-surface);box-shadow:var(--elevation-4);max-height:180px;overflow-y:auto}.lc-tag-input__suggestion{padding:6px 12px;font-size:var(--typography-font-size-sm, .875rem);cursor:pointer;color:var(--color-text-secondary)}.lc-tag-input__suggestion:hover,.lc-tag-input__suggestion--active{background:var(--color-surface-hover);color:var(--color-text-primary)}\n"]
|
|
273
273
|
}]
|
|
274
274
|
}],
|
|
275
275
|
propDecorators: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecorner-angular-ui-kit-tag-input.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/tag-input/tag-input.component.ts","../../../../libs/angular-ui-kit/src/lib/tag-input/tag-input.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n input,\n signal,\n computed,\n output,\n forwardRef,\n ElementRef,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\n\n@Component({\n selector: 'lc-tag-input',\n standalone: true,\n templateUrl: './tag-input.component.html',\n styleUrls: ['./tag-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TagInputComponent),\n multi: true,\n },\n ],\n})\nexport class TagInputComponent implements ControlValueAccessor {\n private static nextId = 0;\n\n readonly placeholder = input('Add tag…');\n readonly maxTags = input(Infinity);\n readonly allowDuplicates = input(false);\n readonly removable = input(true);\n readonly disabled = input(false);\n readonly separator = input<'enter' | 'comma' | 'both'>('both');\n readonly suggestions = input<string[]>([]);\n readonly label = input('');\n\n /** Placeholder once `maxTags` is reached; `{max}` is replaced by the limit. */\n readonly maxTagsReachedLabel = input('Maximum of {max} tags reached');\n\n /** Accessible name prefix of a tag's remove button, followed by the tag. */\n readonly removeTagAriaLabel = input('Remove');\n\n /** Accessible name of the suggestion list when no `label` is set. */\n readonly suggestionsAriaLabel = input('Suggestions');\n\n readonly tagAdded = output<string>();\n readonly tagRemoved = output<string>();\n\n /** Per-instance id wiring the label, the suggestion listbox and its options to the input. */\n readonly inputId = `lc-tag-input-${++TagInputComponent.nextId}`;\n protected readonly listboxId = `${this.inputId}-listbox`;\n\n protected tags = signal<string[]>([]);\n protected inputValue = signal('');\n protected focused = signal(false);\n\n /** Index of the keyboard-highlighted suggestion; -1 = none. */\n protected activeIndex = signal(-1);\n\n /** Set by Escape; hides the list until the text changes again. */\n private readonly suggestionsDismissed = signal(false);\n\n /** Disabled through the form control (`setDisabledState`), as opposed to the input. */\n private readonly formDisabled = signal(false);\n\n /** Disabled by either route — the one flag the template consults. */\n protected readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n\n protected readonly inputEl = viewChild<ElementRef<HTMLInputElement>>('inputEl');\n\n protected readonly filteredSuggestions = computed(() => {\n const val = this.inputValue().toLowerCase().trim();\n if (!val) return [];\n return this.suggestions().filter(\n s => s.toLowerCase().includes(val) && (this.allowDuplicates() || !this.tags().includes(s))\n );\n });\n\n /** Combobox semantics only make sense when there is a list to open. */\n protected readonly hasSuggestions = computed(() => this.suggestions().length > 0);\n\n protected readonly showSuggestions = computed(\n () => this.focused() && !this.suggestionsDismissed() && this.filteredSuggestions().length > 0\n );\n\n protected readonly canAdd = computed(() => this.tags().length < this.maxTags());\n\n /**\n * The input stays mounted when the limit is reached (removing it would drop\n * focus to `<body>`); it becomes read-only and says why.\n */\n protected readonly inputPlaceholder = computed(() => {\n if (!this.canAdd()) return this.maxTagsReachedLabel().replace('{max}', String(this.maxTags()));\n return this.tags().length ? '' : this.placeholder();\n });\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChange: (val: string[]) => void = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouched: () => void = () => {};\n\n writeValue(value: string[] | null): void {\n this.tags.set(value ?? []);\n }\n\n registerOnChange(fn: (val: string[]) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n\n protected optionId(index: number): string {\n return `${this.listboxId}-option-${index}`;\n }\n\n protected addTag(value: string): void {\n const tag = value.trim();\n if (!tag || !this.canAdd()) return;\n if (!this.allowDuplicates() && this.tags().includes(tag)) return;\n\n this.tags.update(t => [...t, tag]);\n this.inputValue.set('');\n this.activeIndex.set(-1);\n this.onChange(this.tags());\n this.tagAdded.emit(tag);\n }\n\n protected removeTag(index: number): void {\n const removed = this.tags()[index];\n this.tags.update(t => t.filter((_, i) => i !== index));\n this.onChange(this.tags());\n this.tagRemoved.emit(removed);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const sep = this.separator();\n const val = this.inputValue();\n const listOpen = this.showSuggestions();\n\n switch (event.key) {\n case 'ArrowDown':\n case 'ArrowUp': {\n const count = this.filteredSuggestions().length;\n if (!count) return;\n event.preventDefault();\n this.suggestionsDismissed.set(false);\n const delta = event.key === 'ArrowDown' ? 1 : -1;\n const next = (this.activeIndex() + delta + count) % count;\n this.activeIndex.set(next);\n document.getElementById(this.optionId(next))?.scrollIntoView?.({ block: 'nearest' });\n return;\n }\n case 'Escape':\n if (listOpen) {\n event.preventDefault();\n this.suggestionsDismissed.set(true);\n this.activeIndex.set(-1);\n }\n return;\n case 'Enter':\n if (listOpen && this.activeIndex() >= 0) {\n event.preventDefault();\n this.addTag(this.filteredSuggestions()[this.activeIndex()]);\n } else if (sep === 'enter' || sep === 'both') {\n event.preventDefault();\n this.addTag(val);\n }\n return;\n case ',':\n if (sep === 'comma' || sep === 'both') {\n event.preventDefault();\n this.addTag(val);\n }\n return;\n case 'Backspace':\n if (!val && this.removable() && this.tags().length > 0) {\n this.removeTag(this.tags().length - 1);\n }\n return;\n }\n }\n\n protected onInput(event: Event): void {\n this.inputValue.set((event.target as HTMLInputElement).value);\n this.activeIndex.set(-1);\n this.suggestionsDismissed.set(false);\n }\n\n protected onFocus(): void {\n this.focused.set(true);\n }\n\n protected onBlur(): void {\n this.focused.set(false);\n this.activeIndex.set(-1);\n this.onTouched();\n const val = this.inputValue();\n if (val.trim()) this.addTag(val);\n }\n\n protected selectSuggestion(value: string): void {\n this.addTag(value);\n this.inputEl()?.nativeElement.focus();\n }\n\n protected focusInput(): void {\n this.inputEl()?.nativeElement.focus();\n }\n}\n","@if (label()) {\n <label class=\"lc-tag-input__label\" [for]=\"inputId\">{{ label() }}</label>\n}\n\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- container click only forwards focus to the input, which is focusable itself -->\n<div\n class=\"lc-tag-input__container\"\n [class.lc-tag-input__container--focused]=\"focused()\"\n [class.lc-tag-input__container--disabled]=\"isDisabled()\"\n (click)=\"focusInput()\"\n>\n @for (tag of tags(); track $index) {\n <span class=\"lc-tag-input__tag\">\n <span class=\"lc-tag-input__tag-text\">{{ tag }}</span>\n @if (removable() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"lc-tag-input__tag-remove\"\n (click)=\"removeTag($index); $event.stopPropagation()\"\n [attr.aria-label]=\"removeTagAriaLabel() + ' ' + tag\"\n >×</button>\n }\n </span>\n }\n\n <input\n #inputEl\n type=\"text\"\n [id]=\"inputId\"\n class=\"lc-tag-input__input\"\n [attr.role]=\"hasSuggestions() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"hasSuggestions() ? 'list' : null\"\n [attr.aria-expanded]=\"hasSuggestions() ? showSuggestions() : null\"\n [attr.aria-controls]=\"showSuggestions() ? listboxId : null\"\n [attr.aria-activedescendant]=\"showSuggestions() && activeIndex() >= 0 ? optionId(activeIndex()) : null\"\n [placeholder]=\"inputPlaceholder()\"\n [value]=\"inputValue()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"!canAdd()\"\n [attr.aria-readonly]=\"!canAdd() ? true : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n</div>\n\n@if (showSuggestions()) {\n <ul class=\"lc-tag-input__suggestions\" role=\"listbox\" [id]=\"listboxId\" [attr.aria-label]=\"label() || suggestionsAriaLabel()\">\n @for (sug of filteredSuggestions(); track sug; let i = $index) {\n <li\n class=\"lc-tag-input__suggestion\"\n [class.lc-tag-input__suggestion--active]=\"i === activeIndex()\"\n role=\"option\"\n [id]=\"optionId(i)\"\n [attr.aria-selected]=\"i === activeIndex()\"\n (mouseenter)=\"activeIndex.set(i)\"\n (mousedown)=\"selectSuggestion(sug); $event.preventDefault()\"\n >{{ sug }}</li>\n }\n </ul>\n}\n"],"mappings":";;;AA2BA,IAAa,oBAAb,MAAa,kBAAiB;CACpB,OAAO,SAAS;CAEf,cAAc,MAAM,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,UAAU,MAAM,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACzB,kBAAkB,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,kBAAA,CAAA,+BAAA,CAAA,CAAA;CAC9B,YAAY,MAAM,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACvB,WAAW,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CACvB,YAAY,MAAkC,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACrD,cAAc,MAAgB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CACjC,QAAQ,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAGjB,sBAAsB,MAAM,iCAAgC,GAAA,YAAA,CAAA,EAAA,WAAA,sBAAA,CAAA,+BAAA,CAAA,CAAA;CAG5D,qBAAqB,MAAM,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,qBAAA,CAAA,+BAAA,CAAA,CAAA;CAGpC,uBAAuB,MAAM,eAAc,GAAA,Y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A;EAAA,sBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,YAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAS,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"lifecorner-angular-ui-kit-tag-input.mjs","names":[],"sources":["../../../../libs/angular-ui-kit/src/lib/tag-input/tag-input.component.ts","../../../../libs/angular-ui-kit/src/lib/tag-input/tag-input.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n input,\n signal,\n computed,\n output,\n forwardRef,\n ElementRef,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\n\n@Component({\n selector: 'lc-tag-input',\n standalone: true,\n templateUrl: './tag-input.component.html',\n styleUrls: ['./tag-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TagInputComponent),\n multi: true,\n },\n ],\n})\nexport class TagInputComponent implements ControlValueAccessor {\n private static nextId = 0;\n\n readonly placeholder = input('Add tag…');\n readonly maxTags = input(Infinity);\n readonly allowDuplicates = input(false);\n readonly removable = input(true);\n readonly disabled = input(false);\n readonly separator = input<'enter' | 'comma' | 'both'>('both');\n readonly suggestions = input<string[]>([]);\n readonly label = input('');\n\n /** Placeholder once `maxTags` is reached; `{max}` is replaced by the limit. */\n readonly maxTagsReachedLabel = input('Maximum of {max} tags reached');\n\n /** Accessible name prefix of a tag's remove button, followed by the tag. */\n readonly removeTagAriaLabel = input('Remove');\n\n /** Accessible name of the suggestion list when no `label` is set. */\n readonly suggestionsAriaLabel = input('Suggestions');\n\n readonly tagAdded = output<string>();\n readonly tagRemoved = output<string>();\n\n /** Per-instance id wiring the label, the suggestion listbox and its options to the input. */\n readonly inputId = `lc-tag-input-${++TagInputComponent.nextId}`;\n protected readonly listboxId = `${this.inputId}-listbox`;\n\n protected tags = signal<string[]>([]);\n protected inputValue = signal('');\n protected focused = signal(false);\n\n /** Index of the keyboard-highlighted suggestion; -1 = none. */\n protected activeIndex = signal(-1);\n\n /** Set by Escape; hides the list until the text changes again. */\n private readonly suggestionsDismissed = signal(false);\n\n /** Disabled through the form control (`setDisabledState`), as opposed to the input. */\n private readonly formDisabled = signal(false);\n\n /** Disabled by either route — the one flag the template consults. */\n protected readonly isDisabled = computed(() => this.disabled() || this.formDisabled());\n\n protected readonly inputEl = viewChild<ElementRef<HTMLInputElement>>('inputEl');\n\n protected readonly filteredSuggestions = computed(() => {\n const val = this.inputValue().toLowerCase().trim();\n if (!val) return [];\n return this.suggestions().filter(\n s => s.toLowerCase().includes(val) && (this.allowDuplicates() || !this.tags().includes(s))\n );\n });\n\n /** Combobox semantics only make sense when there is a list to open. */\n protected readonly hasSuggestions = computed(() => this.suggestions().length > 0);\n\n protected readonly showSuggestions = computed(\n () => this.focused() && !this.suggestionsDismissed() && this.filteredSuggestions().length > 0\n );\n\n protected readonly canAdd = computed(() => this.tags().length < this.maxTags());\n\n /**\n * The input stays mounted when the limit is reached (removing it would drop\n * focus to `<body>`); it becomes read-only and says why.\n */\n protected readonly inputPlaceholder = computed(() => {\n if (!this.canAdd()) return this.maxTagsReachedLabel().replace('{max}', String(this.maxTags()));\n return this.tags().length ? '' : this.placeholder();\n });\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onChange: (val: string[]) => void = () => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private onTouched: () => void = () => {};\n\n writeValue(value: string[] | null): void {\n this.tags.set(value ?? []);\n }\n\n registerOnChange(fn: (val: string[]) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n\n protected optionId(index: number): string {\n return `${this.listboxId}-option-${index}`;\n }\n\n protected addTag(value: string): void {\n const tag = value.trim();\n if (!tag || !this.canAdd()) return;\n if (!this.allowDuplicates() && this.tags().includes(tag)) return;\n\n this.tags.update(t => [...t, tag]);\n this.inputValue.set('');\n this.activeIndex.set(-1);\n this.onChange(this.tags());\n this.tagAdded.emit(tag);\n }\n\n protected removeTag(index: number): void {\n const removed = this.tags()[index];\n this.tags.update(t => t.filter((_, i) => i !== index));\n this.onChange(this.tags());\n this.tagRemoved.emit(removed);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const sep = this.separator();\n const val = this.inputValue();\n const listOpen = this.showSuggestions();\n\n switch (event.key) {\n case 'ArrowDown':\n case 'ArrowUp': {\n const count = this.filteredSuggestions().length;\n if (!count) return;\n event.preventDefault();\n this.suggestionsDismissed.set(false);\n const delta = event.key === 'ArrowDown' ? 1 : -1;\n const next = (this.activeIndex() + delta + count) % count;\n this.activeIndex.set(next);\n document.getElementById(this.optionId(next))?.scrollIntoView?.({ block: 'nearest' });\n return;\n }\n case 'Escape':\n if (listOpen) {\n event.preventDefault();\n this.suggestionsDismissed.set(true);\n this.activeIndex.set(-1);\n }\n return;\n case 'Enter':\n if (listOpen && this.activeIndex() >= 0) {\n event.preventDefault();\n this.addTag(this.filteredSuggestions()[this.activeIndex()]);\n } else if (sep === 'enter' || sep === 'both') {\n event.preventDefault();\n this.addTag(val);\n }\n return;\n case ',':\n if (sep === 'comma' || sep === 'both') {\n event.preventDefault();\n this.addTag(val);\n }\n return;\n case 'Backspace':\n if (!val && this.removable() && this.tags().length > 0) {\n this.removeTag(this.tags().length - 1);\n }\n return;\n }\n }\n\n protected onInput(event: Event): void {\n this.inputValue.set((event.target as HTMLInputElement).value);\n this.activeIndex.set(-1);\n this.suggestionsDismissed.set(false);\n }\n\n protected onFocus(): void {\n this.focused.set(true);\n }\n\n protected onBlur(): void {\n this.focused.set(false);\n this.activeIndex.set(-1);\n this.onTouched();\n const val = this.inputValue();\n if (val.trim()) this.addTag(val);\n }\n\n protected selectSuggestion(value: string): void {\n this.addTag(value);\n this.inputEl()?.nativeElement.focus();\n }\n\n protected focusInput(): void {\n this.inputEl()?.nativeElement.focus();\n }\n}\n","@if (label()) {\n <label class=\"lc-tag-input__label\" [for]=\"inputId\">{{ label() }}</label>\n}\n\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- container click only forwards focus to the input, which is focusable itself -->\n<div\n class=\"lc-tag-input__container\"\n [class.lc-tag-input__container--focused]=\"focused()\"\n [class.lc-tag-input__container--disabled]=\"isDisabled()\"\n (click)=\"focusInput()\"\n>\n @for (tag of tags(); track $index) {\n <span class=\"lc-tag-input__tag\">\n <span class=\"lc-tag-input__tag-text\">{{ tag }}</span>\n @if (removable() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"lc-tag-input__tag-remove\"\n (click)=\"removeTag($index); $event.stopPropagation()\"\n [attr.aria-label]=\"removeTagAriaLabel() + ' ' + tag\"\n >×</button>\n }\n </span>\n }\n\n <input\n #inputEl\n type=\"text\"\n [id]=\"inputId\"\n class=\"lc-tag-input__input\"\n [attr.role]=\"hasSuggestions() ? 'combobox' : null\"\n [attr.aria-autocomplete]=\"hasSuggestions() ? 'list' : null\"\n [attr.aria-expanded]=\"hasSuggestions() ? showSuggestions() : null\"\n [attr.aria-controls]=\"showSuggestions() ? listboxId : null\"\n [attr.aria-activedescendant]=\"showSuggestions() && activeIndex() >= 0 ? optionId(activeIndex()) : null\"\n [placeholder]=\"inputPlaceholder()\"\n [value]=\"inputValue()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"!canAdd()\"\n [attr.aria-readonly]=\"!canAdd() ? true : null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n</div>\n\n@if (showSuggestions()) {\n <ul class=\"lc-tag-input__suggestions\" role=\"listbox\" [id]=\"listboxId\" [attr.aria-label]=\"label() || suggestionsAriaLabel()\">\n @for (sug of filteredSuggestions(); track sug; let i = $index) {\n <li\n class=\"lc-tag-input__suggestion\"\n [class.lc-tag-input__suggestion--active]=\"i === activeIndex()\"\n role=\"option\"\n [id]=\"optionId(i)\"\n [attr.aria-selected]=\"i === activeIndex()\"\n (mouseenter)=\"activeIndex.set(i)\"\n (mousedown)=\"selectSuggestion(sug); $event.preventDefault()\"\n >{{ sug }}</li>\n }\n </ul>\n}\n"],"mappings":";;;AA2BA,IAAa,oBAAb,MAAa,kBAAiB;CACpB,OAAO,SAAS;CAEf,cAAc,MAAM,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,UAAU,MAAM,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACzB,kBAAkB,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,kBAAA,CAAA,+BAAA,CAAA,CAAA;CAC9B,YAAY,MAAM,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACvB,WAAW,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CACvB,YAAY,MAAkC,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACrD,cAAc,MAAgB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CACjC,QAAQ,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAGjB,sBAAsB,MAAM,iCAAg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