ngx-com 0.1.3 → 0.1.4
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.
|
@@ -680,7 +680,7 @@ class ComRowClick {
|
|
|
680
680
|
transform: booleanAttribute });
|
|
681
681
|
// ─── Outputs ───
|
|
682
682
|
/** Emits the row data object when a non-excluded cell is clicked or activated via keyboard. */
|
|
683
|
-
comRowClick = output(
|
|
683
|
+
comRowClick = output();
|
|
684
684
|
// ─── Public (consumed by ComTable via COM_ROW_CLICK token) ───
|
|
685
685
|
/** Whether row-click behavior is currently active. */
|
|
686
686
|
isActive = computed(() => !this.comRowClickDisabled(), ...(ngDevMode ? [{ debugName: "isActive" }] : []));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-com-components-table.mjs","sources":["../../../projects/com/components/table/table-header-cell-def.directive.ts","../../../projects/com/components/table/table-cell-def.directive.ts","../../../projects/com/components/table/table-footer-cell-def.directive.ts","../../../projects/com/components/table/table-column-def.directive.ts","../../../projects/com/components/table/table-header-row-def.directive.ts","../../../projects/com/components/table/table-row-def.directive.ts","../../../projects/com/components/table/table-footer-row-def.directive.ts","../../../projects/com/components/table/table-no-data-row.directive.ts","../../../projects/com/components/table/table-data-source.ts","../../../projects/com/components/table/table-row-click.types.ts","../../../projects/com/components/table/table.variants.ts","../../../projects/com/components/table/table.component.ts","../../../projects/com/components/table/table-row-click.directive.ts","../../../projects/com/components/table/index.ts","../../../projects/com/components/table/ngx-com-components-table.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural directive that captures the template for a header cell.\n *\n * Use with the star syntax inside a `comColumnDef` container.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comHeaderCellDef]',\n})\nexport class ComHeaderCellDef {\n readonly templateRef: TemplateRef<void> = inject(TemplateRef<void>);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport type { CellDefContext } from './table.types';\n\n/**\n * Structural directive that captures the template for a body cell.\n *\n * Use with the star syntax inside a `comColumnDef` container.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comCellDef]',\n})\nexport class ComCellDef<T = unknown> {\n readonly templateRef: TemplateRef<CellDefContext<T>> = inject(TemplateRef<CellDefContext<T>>);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural directive that captures the template for a footer cell.\n *\n * Use with the star syntax inside a `comColumnDef` container.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"amount\">\n * <th *comHeaderCellDef>Amount</th>\n * <td *comCellDef=\"let row\">{{ row.amount | currency }}</td>\n * <td *comFooterCellDef>{{ total() | currency }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comFooterCellDef]',\n})\nexport class ComFooterCellDef {\n readonly templateRef: TemplateRef<void> = inject(TemplateRef<void>);\n}\n","import { contentChild, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { ComHeaderCellDef } from './table-header-cell-def.directive';\nimport { ComCellDef } from './table-cell-def.directive';\nimport { ComFooterCellDef } from './table-footer-cell-def.directive';\n\n/**\n * Defines a single column in a `com-table`.\n *\n * Contains a header cell template, a body cell template, and an optional footer cell template.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comColumnDef]',\n exportAs: 'comColumnDef',\n})\nexport class ComColumnDef {\n /** The column name — used to match header/row column lists. */\n readonly name: InputSignal<string> = input.required<string>({ alias: 'comColumnDef' });\n\n /** @internal Header cell template for this column. */\n readonly headerCellDef: Signal<ComHeaderCellDef | undefined> =\n contentChild<ComHeaderCellDef>(ComHeaderCellDef);\n\n /** @internal Body cell template for this column. */\n readonly cellDef: Signal<ComCellDef | undefined> = contentChild<ComCellDef>(ComCellDef);\n\n /** @internal Optional footer cell template for this column. */\n readonly footerCellDef: Signal<ComFooterCellDef | undefined> =\n contentChild<ComFooterCellDef>(ComFooterCellDef);\n}\n","import { booleanAttribute, Directive, input } from '@angular/core';\nimport type { InputSignal, InputSignalWithTransform } from '@angular/core';\n\n/**\n * Defines which columns appear in the header row and their order.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <tr comHeaderRowDef=\"['name', 'email', 'role']\"></tr>\n * ```\n *\n * @example Sticky header row\n * ```html\n * <tr comHeaderRowDef=\"['name', 'email']\" comHeaderRowDefSticky></tr>\n * ```\n */\n@Directive({\n selector: '[comHeaderRowDef]',\n})\nexport class ComHeaderRowDef {\n /** Ordered list of column names to display. */\n readonly columns: InputSignal<string[]> = input.required<string[]>({ alias: 'comHeaderRowDef' });\n\n /** Makes this header row sticky (alternative to table-level `stickyHeader`). */\n readonly sticky: InputSignalWithTransform<boolean, unknown> = input(false, {\n alias: 'comHeaderRowDefSticky',\n transform: booleanAttribute,\n });\n}\n","import { Directive, input } from '@angular/core';\nimport type { InputSignal } from '@angular/core';\n\n/**\n * Defines which columns appear in each body row and their order.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <tr comRowDef [comRowDefColumns]=\"['name', 'email', 'role']\"></tr>\n * ```\n */\n@Directive({\n selector: '[comRowDef]',\n})\nexport class ComRowDef {\n /** Ordered list of column names to display per body row. */\n readonly columns: InputSignal<string[]> = input.required<string[]>({\n alias: 'comRowDefColumns',\n });\n}\n","import { Directive, input } from '@angular/core';\nimport type { InputSignal } from '@angular/core';\n\n/**\n * Defines which columns appear in the footer row and their order.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <tr comFooterRowDef=\"['description', 'amount']\"></tr>\n * ```\n */\n@Directive({\n selector: '[comFooterRowDef]',\n})\nexport class ComFooterRowDef {\n /** Ordered list of column names in the footer. */\n readonly columns: InputSignal<string[]> = input.required<string[]>({\n alias: 'comFooterRowDef',\n });\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural directive for the empty-state row shown when the data source is empty.\n *\n * Place inside `com-table`. The template receives the column count for colspan.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <com-table [dataSource]=\"data()\">\n * <!-- column defs... -->\n *\n * <ng-template comNoDataRow>\n * <td [attr.colspan]=\"displayedColumns().length\" class=\"text-center py-8\">\n * No results found.\n * </td>\n * </ng-template>\n * </com-table>\n * ```\n */\n@Directive({\n selector: '[comNoDataRow]',\n})\nexport class ComNoDataRow {\n readonly templateRef: TemplateRef<void> = inject(TemplateRef<void>);\n}\n","import type { Signal } from '@angular/core';\nimport { signal } from '@angular/core';\n\n/**\n * Abstract data source for ComTable.\n *\n * Implement `connect()` to provide a signal of data, and `disconnect()` to clean up.\n * The table calls `connect()` on init and `disconnect()` on destroy.\n *\n * @example Signal-based data source\n * ```typescript\n * class MyDataSource extends ComDataSource<User> {\n * private readonly data = signal<User[]>([]);\n *\n * connect(): Signal<readonly User[]> {\n * return this.data.asReadonly();\n * }\n *\n * disconnect(): void {\n * // cleanup if needed\n * }\n *\n * setData(users: User[]): void {\n * this.data.set(users);\n * }\n * }\n * ```\n */\nexport abstract class ComDataSource<T> {\n /** Returns a signal of the current data set. Called once when the table initializes. */\n abstract connect(): Signal<readonly T[]>;\n\n /** Cleanup resources. Called when the table is destroyed. */\n abstract disconnect(): void;\n}\n\n/**\n * Simple array-backed data source.\n *\n * Wraps a plain array in a writable signal so it can be used with ComTable's DataSource API.\n */\nexport class ComArrayDataSource<T> extends ComDataSource<T> {\n private readonly data = signal<readonly T[]>([]);\n\n constructor(initialData: T[] = []) {\n super();\n this.data.set(initialData);\n }\n\n connect(): Signal<readonly T[]> {\n return this.data.asReadonly();\n }\n\n disconnect(): void {\n // No cleanup needed for a simple array\n }\n\n /** Replace the entire data set. */\n setData(data: T[]): void {\n this.data.set(data);\n }\n}\n\n/**\n * Type guard to check if a value is a ComDataSource instance.\n */\nexport function isDataSource<T>(value: unknown): value is ComDataSource<T> {\n return value instanceof ComDataSource;\n}\n\n/** The types that ComTable accepts for its dataSource input. */\nexport type ComTableDataSourceInput<T> = T[] | ComDataSource<T>;\n","import { InjectionToken } from '@angular/core';\nimport type { Signal } from '@angular/core';\n\n/** Data context that ComTable pushes to ComRowClick to avoid circular DI. */\nexport interface ComRowClickContext<T = unknown> {\n readonly renderData: Signal<readonly T[]>;\n readonly bodyColumns: Signal<string[]>;\n}\n\n/** Minimal interface that ComTable reads to detect an active row-click directive. */\nexport interface ComRowClickRef<T = unknown> {\n /** Whether row-click behavior is currently active (exists and not disabled). */\n readonly isActive: Signal<boolean>;\n\n /** Called by ComTable to provide data context — avoids circular injection. */\n _setContext(ctx: ComRowClickContext<T>): void;\n}\n\n/**\n * Injection token used by ComTable to optionally detect a ComRowClick directive.\n * Breaks the circular dependency between ComTable and ComRowClick.\n */\nexport const COM_ROW_CLICK: InjectionToken<ComRowClickRef> =\n new InjectionToken<ComRowClickRef>('COM_ROW_CLICK');\n","import { cva, type VariantProps } from 'class-variance-authority';\n\n// Table variant types\nexport type TableVariant = 'default' | 'striped';\nexport type TableDensity = 'compact' | 'default' | 'comfortable';\n\n/**\n * CVA variants for the table container wrapper.\n */\nexport const tableContainerVariants: (props?: Record<string, never>) => string = cva(\n 'relative overflow-x-auto'\n);\n\nexport type TableContainerVariants = VariantProps<typeof tableContainerVariants>;\n\n/**\n * CVA variants for the `<table>` element.\n *\n * @tokens `--color-foreground`\n */\nexport const tableVariants: (props?: Record<string, never>) => string = cva(\n 'w-full caption-bottom text-sm text-foreground'\n);\n\nexport type TableVariants = VariantProps<typeof tableVariants>;\n\n/**\n * CVA variants for the `<thead>` element.\n *\n * @tokens `--color-background`\n */\nexport const tableHeaderVariants: (props?: {\n sticky?: boolean;\n}) => string = cva('', {\n variants: {\n sticky: {\n true: 'sticky top-0 z-10 bg-background',\n false: '',\n },\n },\n defaultVariants: {\n sticky: false,\n },\n});\n\nexport type TableHeaderVariants = VariantProps<typeof tableHeaderVariants>;\n\n/**\n * CVA variants for the header `<tr>` — applies base styles to child `<th>` cells via child selectors.\n *\n * @tokens `--color-muted-foreground`\n */\nexport const tableHeaderRowVariants: (props?: {\n density?: TableDensity;\n}) => string = cva(\n '[&>th]:text-left [&>th]:align-middle [&>th]:font-medium [&>th]:text-muted-foreground [&>th:has([comSortHeader])]:cursor-pointer',\n {\n variants: {\n density: {\n compact: '[&>th]:h-8 [&>th]:px-3 [&>th]:text-xs',\n default: '[&>th]:h-10 [&>th]:px-4 [&>th]:text-xs',\n comfortable: '[&>th]:h-12 [&>th]:px-5 [&>th]:text-sm',\n },\n },\n defaultVariants: {\n density: 'default',\n },\n }\n);\n\nexport type TableHeaderRowVariants = VariantProps<typeof tableHeaderRowVariants>;\n\n/**\n * CVA variants for `<tbody> <tr>` rows — includes row-level styles and child `<td>` cell styles.\n *\n * @tokens `--color-border-subtle`, `--color-muted`, `--color-muted-hover`\n */\nexport const tableRowVariants: (props?: {\n variant?: TableVariant;\n density?: TableDensity;\n}) => string = cva(\n 'transition-colors hover:bg-muted-hover [&>td]:align-middle [&>td:has(com-checkbox)]:w-px',\n {\n variants: {\n variant: {\n default: 'border-b border-border-subtle',\n striped: 'border-b border-border-subtle even:bg-muted-stripe',\n },\n density: {\n compact: '[&>td]:px-3 [&>td]:py-1.5',\n default: '[&>td]:px-4 [&>td]:py-2.5',\n comfortable: '[&>td]:px-5 [&>td]:py-3.5',\n },\n },\n defaultVariants: {\n variant: 'default',\n density: 'default',\n },\n }\n);\n\nexport type TableRowVariants = VariantProps<typeof tableRowVariants>;\n\n/**\n * CVA variants for the footer `<tr>` — applies base styles to child `<td>` cells via child selectors.\n *\n * @tokens `--color-foreground`, `--color-border`\n */\nexport const tableFooterRowVariants: (props?: {\n density?: TableDensity;\n}) => string = cva(\n '[&>td]:align-middle [&>td]:font-medium [&>td]:text-foreground [&>td]:border-t [&>td]:border-border',\n {\n variants: {\n density: {\n compact: '[&>td]:h-8 [&>td]:px-3 [&>td]:text-xs',\n default: '[&>td]:h-10 [&>td]:px-4 [&>td]:text-sm',\n comfortable: '[&>td]:h-12 [&>td]:px-5 [&>td]:text-sm',\n },\n },\n defaultVariants: {\n density: 'default',\n },\n }\n);\n\nexport type TableFooterRowVariants = VariantProps<typeof tableFooterRowVariants>;\n\n// ─── Deprecated aliases (remove in next major) ───\n\n/** @deprecated Use `tableHeaderRowVariants` instead. */\nexport const tableHeaderCellVariants: typeof tableHeaderRowVariants = tableHeaderRowVariants;\n/** @deprecated Use `tableHeaderRowVariants` instead. */\nexport type TableHeaderCellVariants = TableHeaderRowVariants;\n\n/** @deprecated Body cell styles are now part of `tableRowVariants`. */\nexport const tableBodyCellVariants: typeof tableRowVariants = tableRowVariants;\n/** @deprecated Body cell styles are now part of `tableRowVariants`. */\nexport type TableBodyCellVariants = TableRowVariants;\n\n/** @deprecated Use `tableFooterRowVariants` instead. */\nexport const tableFooterCellVariants: typeof tableFooterRowVariants = tableFooterRowVariants;\n/** @deprecated Use `tableFooterRowVariants` instead. */\nexport type TableFooterCellVariants = TableFooterRowVariants;\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n DestroyRef,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport type {\n InputSignal,\n InputSignalWithTransform,\n Signal,\n TrackByFunction,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ComSpinner } from 'ngx-com/components/spinner';\nimport { ComColumnDef } from './table-column-def.directive';\nimport { ComHeaderRowDef } from './table-header-row-def.directive';\nimport { ComRowDef } from './table-row-def.directive';\nimport { ComFooterRowDef } from './table-footer-row-def.directive';\nimport { ComNoDataRow } from './table-no-data-row.directive';\nimport { isDataSource } from './table-data-source';\nimport type { ComTableDataSourceInput } from './table-data-source';\nimport { COM_ROW_CLICK } from './table-row-click.types';\nimport type { TableVariant, TableDensity } from './table.variants';\nimport {\n tableContainerVariants,\n tableVariants,\n tableHeaderVariants,\n tableHeaderRowVariants,\n tableRowVariants,\n tableFooterRowVariants,\n} from './table.variants';\n\n/**\n * Declarative data table component using native HTML `<table>` semantics.\n *\n * Define columns via `comColumnDef` with `*comHeaderCellDef` and `*comCellDef`,\n * then declare row structure via `comHeaderRowDef` and `comRowDef`.\n *\n * Accepts either a plain `T[]` or a `ComDataSource<T>` for the data source.\n *\n * @tokens `--color-background`, `--color-foreground`, `--color-muted`, `--color-muted-foreground`,\n * `--color-muted-hover`, `--color-border`, `--color-border-subtle`\n *\n * @example Basic table\n * ```html\n * <com-table [dataSource]=\"users()\">\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n *\n * <ng-container comColumnDef=\"email\">\n * <th *comHeaderCellDef>Email</th>\n * <td *comCellDef=\"let row\">{{ row.email }}</td>\n * </ng-container>\n *\n * <tr comHeaderRowDef=\"['name', 'email']\"></tr>\n * <tr comRowDef [comRowDefColumns]=\"['name', 'email']\"></tr>\n * </com-table>\n * ```\n *\n * @example With DataSource\n * ```typescript\n * class UserDataSource extends ComDataSource<User> {\n * private data = signal<User[]>([]);\n * connect() { return this.data.asReadonly(); }\n * disconnect() {}\n * setData(users: User[]) { this.data.set(users); }\n * }\n * ```\n * ```html\n * <com-table [dataSource]=\"userDataSource\">\n * ...\n * </com-table>\n * ```\n */\n@Component({\n selector: 'com-table',\n exportAs: 'comTable',\n template: `\n <div [class]=\"containerClasses()\">\n <table [class]=\"tableClasses()\" [attr.aria-label]=\"ariaLabel()\" [attr.aria-busy]=\"loading() || null\">\n <thead [class]=\"theadClasses()\">\n <tr [class]=\"headerTrClasses()\">\n @for (colName of headerColumns(); track colName) {\n @let colDef = columnDefMap().get(colName);\n @if (colDef?.headerCellDef(); as headerDef) {\n <ng-container [ngTemplateOutlet]=\"headerDef.templateRef\" />\n }\n }\n </tr>\n </thead>\n\n <tbody>\n @if (!loading() && renderData().length === 0 && noDataRow()) {\n <tr>\n <ng-container [ngTemplateOutlet]=\"noDataRow()!.templateRef\" />\n </tr>\n } @else {\n @for (row of renderData(); track trackByFn()($index, row); let idx = $index) {\n <tr [class]=\"trClasses()\" [attr.tabindex]=\"isRowClickable() ? 0 : null\">\n @for (colName of bodyColumns(); track colName) {\n @let colDef = columnDefMap().get(colName);\n @if (colDef?.cellDef(); as cellDef) {\n <ng-container\n [ngTemplateOutlet]=\"cellDef.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: idx }\"\n />\n }\n }\n </tr>\n }\n }\n </tbody>\n\n @if (footerRowDef()) {\n <tfoot>\n <tr [class]=\"footerTrClasses()\">\n @for (colName of footerColumns(); track colName) {\n @let colDef = columnDefMap().get(colName);\n @if (colDef?.footerCellDef(); as footerDef) {\n <ng-container [ngTemplateOutlet]=\"footerDef.templateRef\" />\n }\n }\n </tr>\n </tfoot>\n }\n </table>\n\n @if (loading()) {\n <div class=\"absolute inset-0 flex items-center justify-center bg-overlay\" aria-live=\"polite\">\n <com-spinner size=\"lg\" color=\"primary\" label=\"Loading...\" />\n </div>\n }\n </div>\n `,\n imports: [NgTemplateOutlet, ComSpinner],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'block',\n },\n})\nexport class ComTable<T> {\n private readonly destroyRef: DestroyRef = inject(DestroyRef);\n private readonly rowClickRef = inject(COM_ROW_CLICK, { optional: true, self: true });\n\n // ─── Inputs ───\n\n /** The data to render — accepts a plain array or a ComDataSource. */\n readonly dataSource: InputSignal<ComTableDataSourceInput<T>> = input<ComTableDataSourceInput<T>>(\n [] as T[]\n );\n\n /** Track function for `@for`. Defaults to tracking by index. */\n readonly trackByFn: InputSignal<TrackByFunction<T>> = input<TrackByFunction<T>>(\n (index: number, _item: T) => index\n );\n\n /** Visual treatment of body rows. */\n readonly variant: InputSignal<TableVariant> = input<TableVariant>('default');\n\n /** Row height / cell padding. */\n readonly density: InputSignal<TableDensity> = input<TableDensity>('default');\n\n /** Whether the header row sticks on scroll. */\n readonly stickyHeader: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n /** Shows a loading overlay with spinner. */\n readonly loading: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n /** Accessible label for the table element. */\n readonly ariaLabel: InputSignal<string | undefined> = input<string | undefined>(undefined);\n\n // ─── Content Queries ───\n\n /** @internal All column definitions projected into the table. */\n readonly columnDefs: Signal<readonly ComColumnDef[]> = contentChildren<ComColumnDef>(ComColumnDef);\n\n /** @internal Header row definition. */\n readonly headerRowDef: Signal<ComHeaderRowDef | undefined> =\n contentChild<ComHeaderRowDef>(ComHeaderRowDef);\n\n /** @internal Body row definition. */\n readonly rowDef: Signal<ComRowDef | undefined> = contentChild<ComRowDef>(ComRowDef);\n\n /** @internal Optional footer row definition. */\n readonly footerRowDef: Signal<ComFooterRowDef | undefined> =\n contentChild<ComFooterRowDef>(ComFooterRowDef);\n\n /** @internal Optional no-data row template. */\n readonly noDataRow: Signal<ComNoDataRow | undefined> =\n contentChild<ComNoDataRow>(ComNoDataRow);\n\n // ─── Derived State ───\n\n /** @internal Map of column name → column definition for O(1) lookup. */\n protected readonly columnDefMap: Signal<Map<string, ComColumnDef>> = computed(() => {\n const map = new Map<string, ComColumnDef>();\n for (const col of this.columnDefs()) {\n map.set(col.name(), col);\n }\n return map;\n });\n\n /** @internal Resolved render data — handles both array and DataSource inputs. */\n readonly renderData: Signal<readonly T[]> = computed(() => {\n const ds = this.dataSource();\n if (isDataSource<T>(ds)) {\n return ds.connect()();\n }\n return ds;\n });\n\n /** @internal Header column names. */\n protected readonly headerColumns: Signal<string[]> = computed(\n () => this.headerRowDef()?.columns() ?? []\n );\n\n /** @internal Body column names — public for ComRowClick event delegation. */\n readonly bodyColumns: Signal<string[]> = computed(\n () => this.rowDef()?.columns() ?? this.headerColumns()\n );\n\n /** @internal Footer column names. */\n protected readonly footerColumns: Signal<string[]> = computed(\n () => this.footerRowDef()?.columns() ?? []\n );\n\n /** @internal Whether the header should be sticky. */\n private readonly isSticky: Signal<boolean> = computed(\n () => this.stickyHeader() || (this.headerRowDef()?.sticky() ?? false)\n );\n\n /** @internal Whether body rows are clickable (ComRowClick directive is active). */\n protected readonly isRowClickable: Signal<boolean> = computed(\n () => this.rowClickRef?.isActive() ?? false\n );\n\n // ─── CVA Classes ───\n\n protected readonly containerClasses: Signal<string> = computed(() => tableContainerVariants());\n\n protected readonly tableClasses: Signal<string> = computed(() => tableVariants());\n\n protected readonly theadClasses: Signal<string> = computed(() =>\n tableHeaderVariants({ sticky: this.isSticky() })\n );\n\n protected readonly headerTrClasses: Signal<string> = computed(() =>\n tableHeaderRowVariants({ density: this.density() })\n );\n\n protected readonly trClasses: Signal<string> = computed(() => {\n const base = tableRowVariants({ variant: this.variant(), density: this.density() });\n if (this.isRowClickable()) {\n return `${base} cursor-pointer outline-none focus-visible:outline-[1px] focus-visible:outline-offset-[-1px] focus-visible:outline-[--color-ring]`;\n }\n return base;\n });\n\n protected readonly footerTrClasses: Signal<string> = computed(() =>\n tableFooterRowVariants({ density: this.density() })\n );\n\n constructor() {\n // Push data context to the row-click directive (avoids circular DI)\n this.rowClickRef?._setContext({\n renderData: this.renderData,\n bodyColumns: this.bodyColumns,\n });\n\n // Disconnect DataSource on destroy\n this.destroyRef.onDestroy(() => {\n const ds = this.dataSource();\n if (isDataSource<T>(ds)) {\n ds.disconnect();\n }\n });\n }\n}\n","import {\n afterNextRender,\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n forwardRef,\n inject,\n input,\n output,\n Renderer2,\n} from '@angular/core';\nimport type {\n InputSignal,\n InputSignalWithTransform,\n OutputEmitterRef,\n Signal,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { COM_ROW_CLICK } from './table-row-click.types';\nimport type { ComRowClickContext, ComRowClickRef } from './table-row-click.types';\n\n/**\n * Attribute directive that enables click-to-act on `<com-table>` body rows.\n *\n * Uses event delegation — a single click/keydown listener on the `<table>` element —\n * rather than per-row bindings. When a user clicks or presses Enter/Space on a body row,\n * the directive resolves the row data and emits it, unless the click originated from an\n * excluded column's cell.\n *\n * @tokens `--color-ring`\n *\n * @example Basic\n * ```html\n * <com-table [dataSource]=\"users()\" comRowClick (comRowClick)=\"openDetail($event)\">\n * ...\n * </com-table>\n * ```\n *\n * @example With column exclusion\n * ```html\n * <com-table [dataSource]=\"users()\" comRowClick\n * [comRowClickExclude]=\"['select', 'actions']\"\n * (comRowClick)=\"openDetail($event)\">\n * ...\n * </com-table>\n * ```\n */\n@Directive({\n selector: 'com-table[comRowClick]',\n exportAs: 'comRowClick',\n providers: [{ provide: COM_ROW_CLICK, useExisting: forwardRef(() => ComRowClick) }],\n})\nexport class ComRowClick<T = unknown> implements ComRowClickRef<T> {\n private readonly elementRef: ElementRef<HTMLElement> = inject(ElementRef<HTMLElement>);\n private readonly renderer: Renderer2 = inject(Renderer2);\n private readonly destroyRef: DestroyRef = inject(DestroyRef);\n private readonly document: Document = inject(DOCUMENT);\n\n /** @internal Context pushed by ComTable — avoids circular DI. */\n private context: ComRowClickContext<T> | null = null;\n\n // ─── Inputs ───\n\n /** Column names whose cells do NOT trigger the row click output. */\n readonly comRowClickExclude: InputSignal<string[]> = input<string[]>([], {\n alias: 'comRowClickExclude',\n });\n\n /** Disables all row click behavior — removes cursor, tabindex, and event handling. */\n readonly comRowClickDisabled: InputSignalWithTransform<boolean, unknown> = input(false, {\n alias: 'comRowClickDisabled',\n transform: booleanAttribute,\n });\n\n // ─── Outputs ───\n\n /** Emits the row data object when a non-excluded cell is clicked or activated via keyboard. */\n readonly comRowClick: OutputEmitterRef<T> = output<T>({ alias: 'comRowClick' });\n\n // ─── Public (consumed by ComTable via COM_ROW_CLICK token) ───\n\n /** Whether row-click behavior is currently active. */\n readonly isActive: Signal<boolean> = computed(() => !this.comRowClickDisabled());\n\n /** @internal Called by ComTable to provide data context. */\n _setContext(ctx: ComRowClickContext<T>): void {\n this.context = ctx;\n }\n\n constructor() {\n // SSR-safe: event delegation setup only runs in the browser after render\n afterNextRender(() => {\n const hostEl = this.elementRef.nativeElement;\n const tableEl = hostEl.querySelector('table');\n if (!tableEl) return;\n\n const unlistenClick = this.renderer.listen(tableEl, 'click', (event: MouseEvent) => {\n this.handleEvent(event);\n });\n\n const unlistenKeydown = this.renderer.listen(\n tableEl,\n 'keydown',\n (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n this.handleEvent(event);\n if (event.key === ' ') {\n event.preventDefault(); // Prevent page scroll\n }\n }\n }\n );\n\n this.destroyRef.onDestroy(() => {\n unlistenClick();\n unlistenKeydown();\n });\n });\n }\n\n // ─── Private ───\n\n private handleEvent(event: Event): void {\n if (this.comRowClickDisabled() || !this.context) return;\n\n const target = event.target;\n if (!(target instanceof this.document.defaultView!.HTMLElement)) return;\n\n const tr = target.closest('tbody tr') as HTMLTableRowElement | null;\n if (!tr) return;\n\n // Keyboard events fire on the focused <tr> directly — no cell exclusion needed\n if (event instanceof KeyboardEvent) {\n if (target !== tr) return;\n return this.emitRow(tr);\n }\n\n // Click events — resolve the cell (direct child of <tr>) that contains the target\n const cell = target.closest('td, th') as HTMLTableCellElement | null;\n if (!cell || cell.parentElement !== tr) return;\n\n // Map cell index to column name for exclusion check\n const columnName = this.context.bodyColumns()[cell.cellIndex];\n if (!columnName || this.comRowClickExclude().includes(columnName)) return;\n\n this.emitRow(tr);\n }\n\n private emitRow(tr: HTMLTableRowElement): void {\n if (!this.context) return;\n const rowIndex = tr.sectionRowIndex;\n const data = this.context.renderData();\n if (rowIndex < 0 || rowIndex >= data.length) return;\n this.comRowClick.emit(data[rowIndex] as T);\n }\n}\n","// Public API for the table component system\n\n// Main component\nexport { ComTable } from './table.component';\n\n// Data source\nexport { ComDataSource, ComArrayDataSource, isDataSource } from './table-data-source';\nexport type { ComTableDataSourceInput } from './table-data-source';\n\n// Column directives\nexport { ComColumnDef } from './table-column-def.directive';\nexport { ComHeaderCellDef } from './table-header-cell-def.directive';\nexport { ComCellDef } from './table-cell-def.directive';\nexport { ComFooterCellDef } from './table-footer-cell-def.directive';\n\n// Row directives\nexport { ComHeaderRowDef } from './table-header-row-def.directive';\nexport { ComRowDef } from './table-row-def.directive';\nexport { ComFooterRowDef } from './table-footer-row-def.directive';\nexport { ComNoDataRow } from './table-no-data-row.directive';\n\n// Row click\nexport { ComRowClick } from './table-row-click.directive';\nexport { COM_ROW_CLICK } from './table-row-click.types';\nexport type { ComRowClickRef } from './table-row-click.types';\n\n// Types\nexport type { CellDefContext } from './table.types';\n\n// Variants\nexport {\n tableContainerVariants,\n tableVariants,\n tableHeaderVariants,\n tableHeaderRowVariants,\n tableRowVariants,\n tableFooterRowVariants,\n // Deprecated aliases\n tableHeaderCellVariants,\n tableBodyCellVariants,\n tableFooterCellVariants,\n} from './table.variants';\n\nexport type {\n TableVariant,\n TableDensity,\n TableContainerVariants,\n TableVariants,\n TableHeaderVariants,\n TableHeaderRowVariants,\n TableRowVariants,\n TableFooterRowVariants,\n // Deprecated aliases\n TableHeaderCellVariants,\n TableBodyCellVariants,\n TableFooterCellVariants,\n} from './table.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEA;;;;;;;;;;;;;;AAcG;MAIU,gBAAgB,CAAA;AAClB,IAAA,WAAW,GAAsB,MAAM,EAAC,WAAiB,EAAC;uGADxD,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBA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A,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,MAAK,WAAY,CAAC,EAAE,CAAC;AACpF,iBAAA;;;ACrDD;AAEA;;ACFA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-com-components-table.mjs","sources":["../../../projects/com/components/table/table-header-cell-def.directive.ts","../../../projects/com/components/table/table-cell-def.directive.ts","../../../projects/com/components/table/table-footer-cell-def.directive.ts","../../../projects/com/components/table/table-column-def.directive.ts","../../../projects/com/components/table/table-header-row-def.directive.ts","../../../projects/com/components/table/table-row-def.directive.ts","../../../projects/com/components/table/table-footer-row-def.directive.ts","../../../projects/com/components/table/table-no-data-row.directive.ts","../../../projects/com/components/table/table-data-source.ts","../../../projects/com/components/table/table-row-click.types.ts","../../../projects/com/components/table/table.variants.ts","../../../projects/com/components/table/table.component.ts","../../../projects/com/components/table/table-row-click.directive.ts","../../../projects/com/components/table/index.ts","../../../projects/com/components/table/ngx-com-components-table.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural directive that captures the template for a header cell.\n *\n * Use with the star syntax inside a `comColumnDef` container.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comHeaderCellDef]',\n})\nexport class ComHeaderCellDef {\n readonly templateRef: TemplateRef<void> = inject(TemplateRef<void>);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport type { CellDefContext } from './table.types';\n\n/**\n * Structural directive that captures the template for a body cell.\n *\n * Use with the star syntax inside a `comColumnDef` container.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comCellDef]',\n})\nexport class ComCellDef<T = unknown> {\n readonly templateRef: TemplateRef<CellDefContext<T>> = inject(TemplateRef<CellDefContext<T>>);\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural directive that captures the template for a footer cell.\n *\n * Use with the star syntax inside a `comColumnDef` container.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"amount\">\n * <th *comHeaderCellDef>Amount</th>\n * <td *comCellDef=\"let row\">{{ row.amount | currency }}</td>\n * <td *comFooterCellDef>{{ total() | currency }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comFooterCellDef]',\n})\nexport class ComFooterCellDef {\n readonly templateRef: TemplateRef<void> = inject(TemplateRef<void>);\n}\n","import { contentChild, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { ComHeaderCellDef } from './table-header-cell-def.directive';\nimport { ComCellDef } from './table-cell-def.directive';\nimport { ComFooterCellDef } from './table-footer-cell-def.directive';\n\n/**\n * Defines a single column in a `com-table`.\n *\n * Contains a header cell template, a body cell template, and an optional footer cell template.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n * ```\n */\n@Directive({\n selector: '[comColumnDef]',\n exportAs: 'comColumnDef',\n})\nexport class ComColumnDef {\n /** The column name — used to match header/row column lists. */\n readonly name: InputSignal<string> = input.required<string>({ alias: 'comColumnDef' });\n\n /** @internal Header cell template for this column. */\n readonly headerCellDef: Signal<ComHeaderCellDef | undefined> =\n contentChild<ComHeaderCellDef>(ComHeaderCellDef);\n\n /** @internal Body cell template for this column. */\n readonly cellDef: Signal<ComCellDef | undefined> = contentChild<ComCellDef>(ComCellDef);\n\n /** @internal Optional footer cell template for this column. */\n readonly footerCellDef: Signal<ComFooterCellDef | undefined> =\n contentChild<ComFooterCellDef>(ComFooterCellDef);\n}\n","import { booleanAttribute, Directive, input } from '@angular/core';\nimport type { InputSignal, InputSignalWithTransform } from '@angular/core';\n\n/**\n * Defines which columns appear in the header row and their order.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <tr comHeaderRowDef=\"['name', 'email', 'role']\"></tr>\n * ```\n *\n * @example Sticky header row\n * ```html\n * <tr comHeaderRowDef=\"['name', 'email']\" comHeaderRowDefSticky></tr>\n * ```\n */\n@Directive({\n selector: '[comHeaderRowDef]',\n})\nexport class ComHeaderRowDef {\n /** Ordered list of column names to display. */\n readonly columns: InputSignal<string[]> = input.required<string[]>({ alias: 'comHeaderRowDef' });\n\n /** Makes this header row sticky (alternative to table-level `stickyHeader`). */\n readonly sticky: InputSignalWithTransform<boolean, unknown> = input(false, {\n alias: 'comHeaderRowDefSticky',\n transform: booleanAttribute,\n });\n}\n","import { Directive, input } from '@angular/core';\nimport type { InputSignal } from '@angular/core';\n\n/**\n * Defines which columns appear in each body row and their order.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <tr comRowDef [comRowDefColumns]=\"['name', 'email', 'role']\"></tr>\n * ```\n */\n@Directive({\n selector: '[comRowDef]',\n})\nexport class ComRowDef {\n /** Ordered list of column names to display per body row. */\n readonly columns: InputSignal<string[]> = input.required<string[]>({\n alias: 'comRowDefColumns',\n });\n}\n","import { Directive, input } from '@angular/core';\nimport type { InputSignal } from '@angular/core';\n\n/**\n * Defines which columns appear in the footer row and their order.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <tr comFooterRowDef=\"['description', 'amount']\"></tr>\n * ```\n */\n@Directive({\n selector: '[comFooterRowDef]',\n})\nexport class ComFooterRowDef {\n /** Ordered list of column names in the footer. */\n readonly columns: InputSignal<string[]> = input.required<string[]>({\n alias: 'comFooterRowDef',\n });\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Structural directive for the empty-state row shown when the data source is empty.\n *\n * Place inside `com-table`. The template receives the column count for colspan.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <com-table [dataSource]=\"data()\">\n * <!-- column defs... -->\n *\n * <ng-template comNoDataRow>\n * <td [attr.colspan]=\"displayedColumns().length\" class=\"text-center py-8\">\n * No results found.\n * </td>\n * </ng-template>\n * </com-table>\n * ```\n */\n@Directive({\n selector: '[comNoDataRow]',\n})\nexport class ComNoDataRow {\n readonly templateRef: TemplateRef<void> = inject(TemplateRef<void>);\n}\n","import type { Signal } from '@angular/core';\nimport { signal } from '@angular/core';\n\n/**\n * Abstract data source for ComTable.\n *\n * Implement `connect()` to provide a signal of data, and `disconnect()` to clean up.\n * The table calls `connect()` on init and `disconnect()` on destroy.\n *\n * @example Signal-based data source\n * ```typescript\n * class MyDataSource extends ComDataSource<User> {\n * private readonly data = signal<User[]>([]);\n *\n * connect(): Signal<readonly User[]> {\n * return this.data.asReadonly();\n * }\n *\n * disconnect(): void {\n * // cleanup if needed\n * }\n *\n * setData(users: User[]): void {\n * this.data.set(users);\n * }\n * }\n * ```\n */\nexport abstract class ComDataSource<T> {\n /** Returns a signal of the current data set. Called once when the table initializes. */\n abstract connect(): Signal<readonly T[]>;\n\n /** Cleanup resources. Called when the table is destroyed. */\n abstract disconnect(): void;\n}\n\n/**\n * Simple array-backed data source.\n *\n * Wraps a plain array in a writable signal so it can be used with ComTable's DataSource API.\n */\nexport class ComArrayDataSource<T> extends ComDataSource<T> {\n private readonly data = signal<readonly T[]>([]);\n\n constructor(initialData: T[] = []) {\n super();\n this.data.set(initialData);\n }\n\n connect(): Signal<readonly T[]> {\n return this.data.asReadonly();\n }\n\n disconnect(): void {\n // No cleanup needed for a simple array\n }\n\n /** Replace the entire data set. */\n setData(data: T[]): void {\n this.data.set(data);\n }\n}\n\n/**\n * Type guard to check if a value is a ComDataSource instance.\n */\nexport function isDataSource<T>(value: unknown): value is ComDataSource<T> {\n return value instanceof ComDataSource;\n}\n\n/** The types that ComTable accepts for its dataSource input. */\nexport type ComTableDataSourceInput<T> = T[] | ComDataSource<T>;\n","import { InjectionToken } from '@angular/core';\nimport type { Signal } from '@angular/core';\n\n/** Data context that ComTable pushes to ComRowClick to avoid circular DI. */\nexport interface ComRowClickContext<T = unknown> {\n readonly renderData: Signal<readonly T[]>;\n readonly bodyColumns: Signal<string[]>;\n}\n\n/** Minimal interface that ComTable reads to detect an active row-click directive. */\nexport interface ComRowClickRef<T = unknown> {\n /** Whether row-click behavior is currently active (exists and not disabled). */\n readonly isActive: Signal<boolean>;\n\n /** Called by ComTable to provide data context — avoids circular injection. */\n _setContext(ctx: ComRowClickContext<T>): void;\n}\n\n/**\n * Injection token used by ComTable to optionally detect a ComRowClick directive.\n * Breaks the circular dependency between ComTable and ComRowClick.\n */\nexport const COM_ROW_CLICK: InjectionToken<ComRowClickRef> =\n new InjectionToken<ComRowClickRef>('COM_ROW_CLICK');\n","import { cva, type VariantProps } from 'class-variance-authority';\n\n// Table variant types\nexport type TableVariant = 'default' | 'striped';\nexport type TableDensity = 'compact' | 'default' | 'comfortable';\n\n/**\n * CVA variants for the table container wrapper.\n */\nexport const tableContainerVariants: (props?: Record<string, never>) => string = cva(\n 'relative overflow-x-auto'\n);\n\nexport type TableContainerVariants = VariantProps<typeof tableContainerVariants>;\n\n/**\n * CVA variants for the `<table>` element.\n *\n * @tokens `--color-foreground`\n */\nexport const tableVariants: (props?: Record<string, never>) => string = cva(\n 'w-full caption-bottom text-sm text-foreground'\n);\n\nexport type TableVariants = VariantProps<typeof tableVariants>;\n\n/**\n * CVA variants for the `<thead>` element.\n *\n * @tokens `--color-background`\n */\nexport const tableHeaderVariants: (props?: {\n sticky?: boolean;\n}) => string = cva('', {\n variants: {\n sticky: {\n true: 'sticky top-0 z-10 bg-background',\n false: '',\n },\n },\n defaultVariants: {\n sticky: false,\n },\n});\n\nexport type TableHeaderVariants = VariantProps<typeof tableHeaderVariants>;\n\n/**\n * CVA variants for the header `<tr>` — applies base styles to child `<th>` cells via child selectors.\n *\n * @tokens `--color-muted-foreground`\n */\nexport const tableHeaderRowVariants: (props?: {\n density?: TableDensity;\n}) => string = cva(\n '[&>th]:text-left [&>th]:align-middle [&>th]:font-medium [&>th]:text-muted-foreground [&>th:has([comSortHeader])]:cursor-pointer',\n {\n variants: {\n density: {\n compact: '[&>th]:h-8 [&>th]:px-3 [&>th]:text-xs',\n default: '[&>th]:h-10 [&>th]:px-4 [&>th]:text-xs',\n comfortable: '[&>th]:h-12 [&>th]:px-5 [&>th]:text-sm',\n },\n },\n defaultVariants: {\n density: 'default',\n },\n }\n);\n\nexport type TableHeaderRowVariants = VariantProps<typeof tableHeaderRowVariants>;\n\n/**\n * CVA variants for `<tbody> <tr>` rows — includes row-level styles and child `<td>` cell styles.\n *\n * @tokens `--color-border-subtle`, `--color-muted`, `--color-muted-hover`\n */\nexport const tableRowVariants: (props?: {\n variant?: TableVariant;\n density?: TableDensity;\n}) => string = cva(\n 'transition-colors hover:bg-muted-hover [&>td]:align-middle [&>td:has(com-checkbox)]:w-px',\n {\n variants: {\n variant: {\n default: 'border-b border-border-subtle',\n striped: 'border-b border-border-subtle even:bg-muted-stripe',\n },\n density: {\n compact: '[&>td]:px-3 [&>td]:py-1.5',\n default: '[&>td]:px-4 [&>td]:py-2.5',\n comfortable: '[&>td]:px-5 [&>td]:py-3.5',\n },\n },\n defaultVariants: {\n variant: 'default',\n density: 'default',\n },\n }\n);\n\nexport type TableRowVariants = VariantProps<typeof tableRowVariants>;\n\n/**\n * CVA variants for the footer `<tr>` — applies base styles to child `<td>` cells via child selectors.\n *\n * @tokens `--color-foreground`, `--color-border`\n */\nexport const tableFooterRowVariants: (props?: {\n density?: TableDensity;\n}) => string = cva(\n '[&>td]:align-middle [&>td]:font-medium [&>td]:text-foreground [&>td]:border-t [&>td]:border-border',\n {\n variants: {\n density: {\n compact: '[&>td]:h-8 [&>td]:px-3 [&>td]:text-xs',\n default: '[&>td]:h-10 [&>td]:px-4 [&>td]:text-sm',\n comfortable: '[&>td]:h-12 [&>td]:px-5 [&>td]:text-sm',\n },\n },\n defaultVariants: {\n density: 'default',\n },\n }\n);\n\nexport type TableFooterRowVariants = VariantProps<typeof tableFooterRowVariants>;\n\n// ─── Deprecated aliases (remove in next major) ───\n\n/** @deprecated Use `tableHeaderRowVariants` instead. */\nexport const tableHeaderCellVariants: typeof tableHeaderRowVariants = tableHeaderRowVariants;\n/** @deprecated Use `tableHeaderRowVariants` instead. */\nexport type TableHeaderCellVariants = TableHeaderRowVariants;\n\n/** @deprecated Body cell styles are now part of `tableRowVariants`. */\nexport const tableBodyCellVariants: typeof tableRowVariants = tableRowVariants;\n/** @deprecated Body cell styles are now part of `tableRowVariants`. */\nexport type TableBodyCellVariants = TableRowVariants;\n\n/** @deprecated Use `tableFooterRowVariants` instead. */\nexport const tableFooterCellVariants: typeof tableFooterRowVariants = tableFooterRowVariants;\n/** @deprecated Use `tableFooterRowVariants` instead. */\nexport type TableFooterCellVariants = TableFooterRowVariants;\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n DestroyRef,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport type {\n InputSignal,\n InputSignalWithTransform,\n Signal,\n TrackByFunction,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ComSpinner } from 'ngx-com/components/spinner';\nimport { ComColumnDef } from './table-column-def.directive';\nimport { ComHeaderRowDef } from './table-header-row-def.directive';\nimport { ComRowDef } from './table-row-def.directive';\nimport { ComFooterRowDef } from './table-footer-row-def.directive';\nimport { ComNoDataRow } from './table-no-data-row.directive';\nimport { isDataSource } from './table-data-source';\nimport type { ComTableDataSourceInput } from './table-data-source';\nimport { COM_ROW_CLICK } from './table-row-click.types';\nimport type { TableVariant, TableDensity } from './table.variants';\nimport {\n tableContainerVariants,\n tableVariants,\n tableHeaderVariants,\n tableHeaderRowVariants,\n tableRowVariants,\n tableFooterRowVariants,\n} from './table.variants';\n\n/**\n * Declarative data table component using native HTML `<table>` semantics.\n *\n * Define columns via `comColumnDef` with `*comHeaderCellDef` and `*comCellDef`,\n * then declare row structure via `comHeaderRowDef` and `comRowDef`.\n *\n * Accepts either a plain `T[]` or a `ComDataSource<T>` for the data source.\n *\n * @tokens `--color-background`, `--color-foreground`, `--color-muted`, `--color-muted-foreground`,\n * `--color-muted-hover`, `--color-border`, `--color-border-subtle`\n *\n * @example Basic table\n * ```html\n * <com-table [dataSource]=\"users()\">\n * <ng-container comColumnDef=\"name\">\n * <th *comHeaderCellDef>Name</th>\n * <td *comCellDef=\"let row\">{{ row.name }}</td>\n * </ng-container>\n *\n * <ng-container comColumnDef=\"email\">\n * <th *comHeaderCellDef>Email</th>\n * <td *comCellDef=\"let row\">{{ row.email }}</td>\n * </ng-container>\n *\n * <tr comHeaderRowDef=\"['name', 'email']\"></tr>\n * <tr comRowDef [comRowDefColumns]=\"['name', 'email']\"></tr>\n * </com-table>\n * ```\n *\n * @example With DataSource\n * ```typescript\n * class UserDataSource extends ComDataSource<User> {\n * private data = signal<User[]>([]);\n * connect() { return this.data.asReadonly(); }\n * disconnect() {}\n * setData(users: User[]) { this.data.set(users); }\n * }\n * ```\n * ```html\n * <com-table [dataSource]=\"userDataSource\">\n * ...\n * </com-table>\n * ```\n */\n@Component({\n selector: 'com-table',\n exportAs: 'comTable',\n template: `\n <div [class]=\"containerClasses()\">\n <table [class]=\"tableClasses()\" [attr.aria-label]=\"ariaLabel()\" [attr.aria-busy]=\"loading() || null\">\n <thead [class]=\"theadClasses()\">\n <tr [class]=\"headerTrClasses()\">\n @for (colName of headerColumns(); track colName) {\n @let colDef = columnDefMap().get(colName);\n @if (colDef?.headerCellDef(); as headerDef) {\n <ng-container [ngTemplateOutlet]=\"headerDef.templateRef\" />\n }\n }\n </tr>\n </thead>\n\n <tbody>\n @if (!loading() && renderData().length === 0 && noDataRow()) {\n <tr>\n <ng-container [ngTemplateOutlet]=\"noDataRow()!.templateRef\" />\n </tr>\n } @else {\n @for (row of renderData(); track trackByFn()($index, row); let idx = $index) {\n <tr [class]=\"trClasses()\" [attr.tabindex]=\"isRowClickable() ? 0 : null\">\n @for (colName of bodyColumns(); track colName) {\n @let colDef = columnDefMap().get(colName);\n @if (colDef?.cellDef(); as cellDef) {\n <ng-container\n [ngTemplateOutlet]=\"cellDef.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: idx }\"\n />\n }\n }\n </tr>\n }\n }\n </tbody>\n\n @if (footerRowDef()) {\n <tfoot>\n <tr [class]=\"footerTrClasses()\">\n @for (colName of footerColumns(); track colName) {\n @let colDef = columnDefMap().get(colName);\n @if (colDef?.footerCellDef(); as footerDef) {\n <ng-container [ngTemplateOutlet]=\"footerDef.templateRef\" />\n }\n }\n </tr>\n </tfoot>\n }\n </table>\n\n @if (loading()) {\n <div class=\"absolute inset-0 flex items-center justify-center bg-overlay\" aria-live=\"polite\">\n <com-spinner size=\"lg\" color=\"primary\" label=\"Loading...\" />\n </div>\n }\n </div>\n `,\n imports: [NgTemplateOutlet, ComSpinner],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'block',\n },\n})\nexport class ComTable<T> {\n private readonly destroyRef: DestroyRef = inject(DestroyRef);\n private readonly rowClickRef = inject(COM_ROW_CLICK, { optional: true, self: true });\n\n // ─── Inputs ───\n\n /** The data to render — accepts a plain array or a ComDataSource. */\n readonly dataSource: InputSignal<ComTableDataSourceInput<T>> = input<ComTableDataSourceInput<T>>(\n [] as T[]\n );\n\n /** Track function for `@for`. Defaults to tracking by index. */\n readonly trackByFn: InputSignal<TrackByFunction<T>> = input<TrackByFunction<T>>(\n (index: number, _item: T) => index\n );\n\n /** Visual treatment of body rows. */\n readonly variant: InputSignal<TableVariant> = input<TableVariant>('default');\n\n /** Row height / cell padding. */\n readonly density: InputSignal<TableDensity> = input<TableDensity>('default');\n\n /** Whether the header row sticks on scroll. */\n readonly stickyHeader: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n /** Shows a loading overlay with spinner. */\n readonly loading: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n /** Accessible label for the table element. */\n readonly ariaLabel: InputSignal<string | undefined> = input<string | undefined>(undefined);\n\n // ─── Content Queries ───\n\n /** @internal All column definitions projected into the table. */\n readonly columnDefs: Signal<readonly ComColumnDef[]> = contentChildren<ComColumnDef>(ComColumnDef);\n\n /** @internal Header row definition. */\n readonly headerRowDef: Signal<ComHeaderRowDef | undefined> =\n contentChild<ComHeaderRowDef>(ComHeaderRowDef);\n\n /** @internal Body row definition. */\n readonly rowDef: Signal<ComRowDef | undefined> = contentChild<ComRowDef>(ComRowDef);\n\n /** @internal Optional footer row definition. */\n readonly footerRowDef: Signal<ComFooterRowDef | undefined> =\n contentChild<ComFooterRowDef>(ComFooterRowDef);\n\n /** @internal Optional no-data row template. */\n readonly noDataRow: Signal<ComNoDataRow | undefined> =\n contentChild<ComNoDataRow>(ComNoDataRow);\n\n // ─── Derived State ───\n\n /** @internal Map of column name → column definition for O(1) lookup. */\n protected readonly columnDefMap: Signal<Map<string, ComColumnDef>> = computed(() => {\n const map = new Map<string, ComColumnDef>();\n for (const col of this.columnDefs()) {\n map.set(col.name(), col);\n }\n return map;\n });\n\n /** @internal Resolved render data — handles both array and DataSource inputs. */\n readonly renderData: Signal<readonly T[]> = computed(() => {\n const ds = this.dataSource();\n if (isDataSource<T>(ds)) {\n return ds.connect()();\n }\n return ds;\n });\n\n /** @internal Header column names. */\n protected readonly headerColumns: Signal<string[]> = computed(\n () => this.headerRowDef()?.columns() ?? []\n );\n\n /** @internal Body column names — public for ComRowClick event delegation. */\n readonly bodyColumns: Signal<string[]> = computed(\n () => this.rowDef()?.columns() ?? this.headerColumns()\n );\n\n /** @internal Footer column names. */\n protected readonly footerColumns: Signal<string[]> = computed(\n () => this.footerRowDef()?.columns() ?? []\n );\n\n /** @internal Whether the header should be sticky. */\n private readonly isSticky: Signal<boolean> = computed(\n () => this.stickyHeader() || (this.headerRowDef()?.sticky() ?? false)\n );\n\n /** @internal Whether body rows are clickable (ComRowClick directive is active). */\n protected readonly isRowClickable: Signal<boolean> = computed(\n () => this.rowClickRef?.isActive() ?? false\n );\n\n // ─── CVA Classes ───\n\n protected readonly containerClasses: Signal<string> = computed(() => tableContainerVariants());\n\n protected readonly tableClasses: Signal<string> = computed(() => tableVariants());\n\n protected readonly theadClasses: Signal<string> = computed(() =>\n tableHeaderVariants({ sticky: this.isSticky() })\n );\n\n protected readonly headerTrClasses: Signal<string> = computed(() =>\n tableHeaderRowVariants({ density: this.density() })\n );\n\n protected readonly trClasses: Signal<string> = computed(() => {\n const base = tableRowVariants({ variant: this.variant(), density: this.density() });\n if (this.isRowClickable()) {\n return `${base} cursor-pointer outline-none focus-visible:outline-[1px] focus-visible:outline-offset-[-1px] focus-visible:outline-[--color-ring]`;\n }\n return base;\n });\n\n protected readonly footerTrClasses: Signal<string> = computed(() =>\n tableFooterRowVariants({ density: this.density() })\n );\n\n constructor() {\n // Push data context to the row-click directive (avoids circular DI)\n this.rowClickRef?._setContext({\n renderData: this.renderData,\n bodyColumns: this.bodyColumns,\n });\n\n // Disconnect DataSource on destroy\n this.destroyRef.onDestroy(() => {\n const ds = this.dataSource();\n if (isDataSource<T>(ds)) {\n ds.disconnect();\n }\n });\n }\n}\n","import {\n afterNextRender,\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n forwardRef,\n inject,\n input,\n output,\n Renderer2,\n} from '@angular/core';\nimport type {\n InputSignal,\n InputSignalWithTransform,\n OutputEmitterRef,\n Signal,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { COM_ROW_CLICK } from './table-row-click.types';\nimport type { ComRowClickContext, ComRowClickRef } from './table-row-click.types';\n\n/**\n * Attribute directive that enables click-to-act on `<com-table>` body rows.\n *\n * Uses event delegation — a single click/keydown listener on the `<table>` element —\n * rather than per-row bindings. When a user clicks or presses Enter/Space on a body row,\n * the directive resolves the row data and emits it, unless the click originated from an\n * excluded column's cell.\n *\n * @tokens `--color-ring`\n *\n * @example Basic\n * ```html\n * <com-table [dataSource]=\"users()\" comRowClick (comRowClick)=\"openDetail($event)\">\n * ...\n * </com-table>\n * ```\n *\n * @example With column exclusion\n * ```html\n * <com-table [dataSource]=\"users()\" comRowClick\n * [comRowClickExclude]=\"['select', 'actions']\"\n * (comRowClick)=\"openDetail($event)\">\n * ...\n * </com-table>\n * ```\n */\n@Directive({\n selector: 'com-table[comRowClick]',\n exportAs: 'comRowClick',\n providers: [{ provide: COM_ROW_CLICK, useExisting: forwardRef(() => ComRowClick) }],\n})\nexport class ComRowClick<T = unknown> implements ComRowClickRef<T> {\n private readonly elementRef: ElementRef<HTMLElement> = inject(ElementRef<HTMLElement>);\n private readonly renderer: Renderer2 = inject(Renderer2);\n private readonly destroyRef: DestroyRef = inject(DestroyRef);\n private readonly document: Document = inject(DOCUMENT);\n\n /** @internal Context pushed by ComTable — avoids circular DI. */\n private context: ComRowClickContext<T> | null = null;\n\n // ─── Inputs ───\n\n /** Column names whose cells do NOT trigger the row click output. */\n readonly comRowClickExclude: InputSignal<string[]> = input<string[]>([], {\n alias: 'comRowClickExclude',\n });\n\n /** Disables all row click behavior — removes cursor, tabindex, and event handling. */\n readonly comRowClickDisabled: InputSignalWithTransform<boolean, unknown> = input(false, {\n alias: 'comRowClickDisabled',\n transform: booleanAttribute,\n });\n\n // ─── Outputs ───\n\n /** Emits the row data object when a non-excluded cell is clicked or activated via keyboard. */\n readonly comRowClick: OutputEmitterRef<T> = output<T>();\n\n // ─── Public (consumed by ComTable via COM_ROW_CLICK token) ───\n\n /** Whether row-click behavior is currently active. */\n readonly isActive: Signal<boolean> = computed(() => !this.comRowClickDisabled());\n\n /** @internal Called by ComTable to provide data context. */\n _setContext(ctx: ComRowClickContext<T>): void {\n this.context = ctx;\n }\n\n constructor() {\n // SSR-safe: event delegation setup only runs in the browser after render\n afterNextRender(() => {\n const hostEl = this.elementRef.nativeElement;\n const tableEl = hostEl.querySelector('table');\n if (!tableEl) return;\n\n const unlistenClick = this.renderer.listen(tableEl, 'click', (event: MouseEvent) => {\n this.handleEvent(event);\n });\n\n const unlistenKeydown = this.renderer.listen(\n tableEl,\n 'keydown',\n (event: KeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n this.handleEvent(event);\n if (event.key === ' ') {\n event.preventDefault(); // Prevent page scroll\n }\n }\n }\n );\n\n this.destroyRef.onDestroy(() => {\n unlistenClick();\n unlistenKeydown();\n });\n });\n }\n\n // ─── Private ───\n\n private handleEvent(event: Event): void {\n if (this.comRowClickDisabled() || !this.context) return;\n\n const target = event.target;\n if (!(target instanceof this.document.defaultView!.HTMLElement)) return;\n\n const tr = target.closest('tbody tr') as HTMLTableRowElement | null;\n if (!tr) return;\n\n // Keyboard events fire on the focused <tr> directly — no cell exclusion needed\n if (event instanceof KeyboardEvent) {\n if (target !== tr) return;\n return this.emitRow(tr);\n }\n\n // Click events — resolve the cell (direct child of <tr>) that contains the target\n const cell = target.closest('td, th') as HTMLTableCellElement | null;\n if (!cell || cell.parentElement !== tr) return;\n\n // Map cell index to column name for exclusion check\n const columnName = this.context.bodyColumns()[cell.cellIndex];\n if (!columnName || this.comRowClickExclude().includes(columnName)) return;\n\n this.emitRow(tr);\n }\n\n private emitRow(tr: HTMLTableRowElement): void {\n if (!this.context) return;\n const rowIndex = tr.sectionRowIndex;\n const data = this.context.renderData();\n if (rowIndex < 0 || rowIndex >= data.length) return;\n this.comRowClick.emit(data[rowIndex] as T);\n }\n}\n","// Public API for the table component system\n\n// Main component\nexport { ComTable } from './table.component';\n\n// Data source\nexport { ComDataSource, ComArrayDataSource, isDataSource } from './table-data-source';\nexport type { ComTableDataSourceInput } from './table-data-source';\n\n// Column directives\nexport { ComColumnDef } from './table-column-def.directive';\nexport { ComHeaderCellDef } from './table-header-cell-def.directive';\nexport { ComCellDef } from './table-cell-def.directive';\nexport { ComFooterCellDef } from './table-footer-cell-def.directive';\n\n// Row directives\nexport { ComHeaderRowDef } from './table-header-row-def.directive';\nexport { ComRowDef } from './table-row-def.directive';\nexport { ComFooterRowDef } from './table-footer-row-def.directive';\nexport { ComNoDataRow } from './table-no-data-row.directive';\n\n// Row click\nexport { ComRowClick } from './table-row-click.directive';\nexport { COM_ROW_CLICK } from './table-row-click.types';\nexport type { ComRowClickRef } from './table-row-click.types';\n\n// Types\nexport type { CellDefContext } from './table.types';\n\n// Variants\nexport {\n tableContainerVariants,\n tableVariants,\n tableHeaderVariants,\n tableHeaderRowVariants,\n tableRowVariants,\n tableFooterRowVariants,\n // Deprecated aliases\n tableHeaderCellVariants,\n tableBodyCellVariants,\n tableFooterCellVariants,\n} from './table.variants';\n\nexport type {\n TableVariant,\n TableDensity,\n TableContainerVariants,\n TableVariants,\n TableHeaderVariants,\n TableHeaderRowVariants,\n TableRowVariants,\n TableFooterRowVariants,\n // Deprecated aliases\n TableHeaderCellVariants,\n TableBodyCellVariants,\n TableFooterCellVariants,\n} from './table.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEA;;;;;;;;;;;;;;AAcG;MAIU,gBAAgB,CAAA;AAClB,IAAA,WAAW,GAAsB,MAAM,EAAC,WAAiB,EAAC;uGADxD,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC/B,iBAAA;;;AChBD;;;;;;;;;;;;;;AAcG;MAIU,UAAU,CAAA;AACZ,IAAA,WAAW,GAAmC,MAAM,EAAC,WAA8B,EAAC;uGADlF,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAA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