ngx-com 0.1.3 → 0.1.5
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/README.md
CHANGED
|
@@ -158,7 +158,7 @@ import { ComDropdown, ComDropdownOption } from 'ngx-com/components/dropdown';
|
|
|
158
158
|
| Sort | `ngx-com/components/sort` | Column sort header for tables |
|
|
159
159
|
| Spinner | `ngx-com/components/spinner` | Loading indicator |
|
|
160
160
|
| Switch | `ngx-com/components/switch` | Toggle switch control |
|
|
161
|
-
| Table | `ngx-com/components/table` | Data table with sorting
|
|
161
|
+
| Table | `ngx-com/components/table` | Data table with sorting and class customization |
|
|
162
162
|
| Tabs | `ngx-com/components/tabs` | Tabbed navigation |
|
|
163
163
|
| Timepicker | `ngx-com/components/timepicker` | Time input control |
|
|
164
164
|
| Toast | `ngx-com/components/toast` | Toast notification service |
|
|
@@ -2,6 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { inject, TemplateRef, Directive, input, contentChild, booleanAttribute, signal, InjectionToken, DestroyRef, contentChildren, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, ElementRef, Renderer2, output, afterNextRender, forwardRef } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet, DOCUMENT } from '@angular/common';
|
|
4
4
|
import { ComSpinner } from 'ngx-com/components/spinner';
|
|
5
|
+
import { mergeClasses } from 'ngx-com/utils';
|
|
5
6
|
import { cva } from 'class-variance-authority';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -135,6 +136,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
135
136
|
* ```html
|
|
136
137
|
* <tr comHeaderRowDef="['name', 'email']" comHeaderRowDefSticky></tr>
|
|
137
138
|
* ```
|
|
139
|
+
*
|
|
140
|
+
* @example Custom class on header row
|
|
141
|
+
* ```html
|
|
142
|
+
* <tr [comHeaderRowDef]="['name', 'email']" comHeaderRowDefClass="uppercase"></tr>
|
|
143
|
+
* ```
|
|
138
144
|
*/
|
|
139
145
|
class ComHeaderRowDef {
|
|
140
146
|
/** Ordered list of column names to display. */
|
|
@@ -142,15 +148,17 @@ class ComHeaderRowDef {
|
|
|
142
148
|
/** Makes this header row sticky (alternative to table-level `stickyHeader`). */
|
|
143
149
|
sticky = input(false, { ...(ngDevMode ? { debugName: "sticky" } : {}), alias: 'comHeaderRowDefSticky',
|
|
144
150
|
transform: booleanAttribute });
|
|
151
|
+
/** Additional CSS classes to merge onto the header `<tr>`. */
|
|
152
|
+
headerRowClass = input('', { ...(ngDevMode ? { debugName: "headerRowClass" } : {}), alias: 'comHeaderRowDefClass' });
|
|
145
153
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComHeaderRowDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
146
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComHeaderRowDef, isStandalone: true, selector: "[comHeaderRowDef]", inputs: { columns: { classPropertyName: "columns", publicName: "comHeaderRowDef", isSignal: true, isRequired: true, transformFunction: null }, sticky: { classPropertyName: "sticky", publicName: "comHeaderRowDefSticky", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
154
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComHeaderRowDef, isStandalone: true, selector: "[comHeaderRowDef]", inputs: { columns: { classPropertyName: "columns", publicName: "comHeaderRowDef", isSignal: true, isRequired: true, transformFunction: null }, sticky: { classPropertyName: "sticky", publicName: "comHeaderRowDefSticky", isSignal: true, isRequired: false, transformFunction: null }, headerRowClass: { classPropertyName: "headerRowClass", publicName: "comHeaderRowDefClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
147
155
|
}
|
|
148
156
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComHeaderRowDef, decorators: [{
|
|
149
157
|
type: Directive,
|
|
150
158
|
args: [{
|
|
151
159
|
selector: '[comHeaderRowDef]',
|
|
152
160
|
}]
|
|
153
|
-
}], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "comHeaderRowDef", required: true }] }], sticky: [{ type: i0.Input, args: [{ isSignal: true, alias: "comHeaderRowDefSticky", required: false }] }] } });
|
|
161
|
+
}], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "comHeaderRowDef", required: true }] }], sticky: [{ type: i0.Input, args: [{ isSignal: true, alias: "comHeaderRowDefSticky", required: false }] }], headerRowClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "comHeaderRowDefClass", required: false }] }] } });
|
|
154
162
|
|
|
155
163
|
/**
|
|
156
164
|
* Defines which columns appear in each body row and their order.
|
|
@@ -161,19 +169,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
161
169
|
* ```html
|
|
162
170
|
* <tr comRowDef [comRowDefColumns]="['name', 'email', 'role']"></tr>
|
|
163
171
|
* ```
|
|
172
|
+
*
|
|
173
|
+
* @example Custom class on body rows
|
|
174
|
+
* ```html
|
|
175
|
+
* <tr comRowDef [comRowDefColumns]="['name', 'email']" comRowDefClass="even:bg-blue-50"></tr>
|
|
176
|
+
* ```
|
|
164
177
|
*/
|
|
165
178
|
class ComRowDef {
|
|
166
179
|
/** Ordered list of column names to display per body row. */
|
|
167
180
|
columns = input.required({ ...(ngDevMode ? { debugName: "columns" } : {}), alias: 'comRowDefColumns' });
|
|
181
|
+
/** Additional CSS classes to merge onto each body `<tr>`. */
|
|
182
|
+
rowClass = input('', { ...(ngDevMode ? { debugName: "rowClass" } : {}), alias: 'comRowDefClass' });
|
|
168
183
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComRowDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
169
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComRowDef, isStandalone: true, selector: "[comRowDef]", inputs: { columns: { classPropertyName: "columns", publicName: "comRowDefColumns", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
184
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComRowDef, isStandalone: true, selector: "[comRowDef]", inputs: { columns: { classPropertyName: "columns", publicName: "comRowDefColumns", isSignal: true, isRequired: true, transformFunction: null }, rowClass: { classPropertyName: "rowClass", publicName: "comRowDefClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
170
185
|
}
|
|
171
186
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComRowDef, decorators: [{
|
|
172
187
|
type: Directive,
|
|
173
188
|
args: [{
|
|
174
189
|
selector: '[comRowDef]',
|
|
175
190
|
}]
|
|
176
|
-
}], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "comRowDefColumns", required: true }] }] } });
|
|
191
|
+
}], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "comRowDefColumns", required: true }] }], rowClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "comRowDefClass", required: false }] }] } });
|
|
177
192
|
|
|
178
193
|
/**
|
|
179
194
|
* Defines which columns appear in the footer row and their order.
|
|
@@ -184,19 +199,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
184
199
|
* ```html
|
|
185
200
|
* <tr comFooterRowDef="['description', 'amount']"></tr>
|
|
186
201
|
* ```
|
|
202
|
+
*
|
|
203
|
+
* @example Custom class on footer row
|
|
204
|
+
* ```html
|
|
205
|
+
* <tr comFooterRowDef="['description', 'amount']" comFooterRowDefClass="font-bold"></tr>
|
|
206
|
+
* ```
|
|
187
207
|
*/
|
|
188
208
|
class ComFooterRowDef {
|
|
189
209
|
/** Ordered list of column names in the footer. */
|
|
190
210
|
columns = input.required({ ...(ngDevMode ? { debugName: "columns" } : {}), alias: 'comFooterRowDef' });
|
|
211
|
+
/** Additional CSS classes to merge onto the footer `<tr>`. */
|
|
212
|
+
footerRowClass = input('', { ...(ngDevMode ? { debugName: "footerRowClass" } : {}), alias: 'comFooterRowDefClass' });
|
|
191
213
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComFooterRowDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
192
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComFooterRowDef, isStandalone: true, selector: "[comFooterRowDef]", inputs: { columns: { classPropertyName: "columns", publicName: "comFooterRowDef", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
214
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComFooterRowDef, isStandalone: true, selector: "[comFooterRowDef]", inputs: { columns: { classPropertyName: "columns", publicName: "comFooterRowDef", isSignal: true, isRequired: true, transformFunction: null }, footerRowClass: { classPropertyName: "footerRowClass", publicName: "comFooterRowDefClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
193
215
|
}
|
|
194
216
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComFooterRowDef, decorators: [{
|
|
195
217
|
type: Directive,
|
|
196
218
|
args: [{
|
|
197
219
|
selector: '[comFooterRowDef]',
|
|
198
220
|
}]
|
|
199
|
-
}], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "comFooterRowDef", required: true }] }] } });
|
|
221
|
+
}], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "comFooterRowDef", required: true }] }], footerRowClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "comFooterRowDefClass", required: false }] }] } });
|
|
200
222
|
|
|
201
223
|
/**
|
|
202
224
|
* Structural directive for the empty-state row shown when the data source is empty.
|
|
@@ -305,7 +327,7 @@ const tableVariants = cva('w-full caption-bottom text-sm text-foreground');
|
|
|
305
327
|
/**
|
|
306
328
|
* CVA variants for the `<thead>` element.
|
|
307
329
|
*
|
|
308
|
-
* @tokens `--color-background`
|
|
330
|
+
* @tokens `--color-background`, `--color-muted`, `--color-muted-foreground`, `--color-border`
|
|
309
331
|
*/
|
|
310
332
|
const tableHeaderVariants = cva('', {
|
|
311
333
|
variants: {
|
|
@@ -313,9 +335,21 @@ const tableHeaderVariants = cva('', {
|
|
|
313
335
|
true: 'sticky top-0 z-10 bg-background',
|
|
314
336
|
false: '',
|
|
315
337
|
},
|
|
338
|
+
headerVariant: {
|
|
339
|
+
default: '',
|
|
340
|
+
muted: 'bg-muted text-muted-foreground border-b border-border',
|
|
341
|
+
},
|
|
316
342
|
},
|
|
343
|
+
compoundVariants: [
|
|
344
|
+
{
|
|
345
|
+
sticky: true,
|
|
346
|
+
headerVariant: 'muted',
|
|
347
|
+
class: 'sticky top-0 z-10 bg-muted text-muted-foreground border-b border-border',
|
|
348
|
+
},
|
|
349
|
+
],
|
|
317
350
|
defaultVariants: {
|
|
318
351
|
sticky: false,
|
|
352
|
+
headerVariant: 'default',
|
|
319
353
|
},
|
|
320
354
|
});
|
|
321
355
|
/**
|
|
@@ -340,7 +374,7 @@ const tableHeaderRowVariants = cva('[&>th]:text-left [&>th]:align-middle [&>th]:
|
|
|
340
374
|
*
|
|
341
375
|
* @tokens `--color-border-subtle`, `--color-muted`, `--color-muted-hover`
|
|
342
376
|
*/
|
|
343
|
-
const tableRowVariants = cva('transition-colors hover:bg-muted-hover [&>td]:align-middle [&>td:has(com-checkbox)]:w-px', {
|
|
377
|
+
const tableRowVariants = cva('transition-colors hover:bg-muted-hover last:border-b-0 [&>td]:align-middle [&>td:has(com-checkbox)]:w-px', {
|
|
344
378
|
variants: {
|
|
345
379
|
variant: {
|
|
346
380
|
default: 'border-b border-border-subtle',
|
|
@@ -444,6 +478,16 @@ class ComTable {
|
|
|
444
478
|
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : {}), transform: booleanAttribute });
|
|
445
479
|
/** Accessible label for the table element. */
|
|
446
480
|
ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
481
|
+
/** Additional CSS classes to merge onto the host element. */
|
|
482
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : {}), alias: 'class' });
|
|
483
|
+
/** Additional CSS classes to merge onto the container `<div>`. */
|
|
484
|
+
containerClass = input('', ...(ngDevMode ? [{ debugName: "containerClass" }] : []));
|
|
485
|
+
/** Additional CSS classes to merge onto the `<table>` element. */
|
|
486
|
+
tableClass = input('', ...(ngDevMode ? [{ debugName: "tableClass" }] : []));
|
|
487
|
+
/** Additional CSS classes to merge onto the `<thead>` element. */
|
|
488
|
+
theadClass = input('', ...(ngDevMode ? [{ debugName: "theadClass" }] : []));
|
|
489
|
+
/** Visual treatment of the header — `'muted'` adds a filled background. */
|
|
490
|
+
headerVariant = input('default', ...(ngDevMode ? [{ debugName: "headerVariant" }] : []));
|
|
447
491
|
// ─── Content Queries ───
|
|
448
492
|
/** @internal All column definitions projected into the table. */
|
|
449
493
|
columnDefs = contentChildren(ComColumnDef, ...(ngDevMode ? [{ debugName: "columnDefs" }] : []));
|
|
@@ -483,18 +527,19 @@ class ComTable {
|
|
|
483
527
|
/** @internal Whether body rows are clickable (ComRowClick directive is active). */
|
|
484
528
|
isRowClickable = computed(() => this.rowClickRef?.isActive() ?? false, ...(ngDevMode ? [{ debugName: "isRowClickable" }] : []));
|
|
485
529
|
// ─── CVA Classes ───
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
530
|
+
hostClass = computed(() => mergeClasses('block', this.userClass()), ...(ngDevMode ? [{ debugName: "hostClass" }] : []));
|
|
531
|
+
containerClasses = computed(() => mergeClasses(tableContainerVariants(), this.containerClass()), ...(ngDevMode ? [{ debugName: "containerClasses" }] : []));
|
|
532
|
+
tableClasses = computed(() => mergeClasses(tableVariants(), this.tableClass()), ...(ngDevMode ? [{ debugName: "tableClasses" }] : []));
|
|
533
|
+
theadClasses = computed(() => mergeClasses(tableHeaderVariants({ sticky: this.isSticky(), headerVariant: this.headerVariant() }), this.theadClass()), ...(ngDevMode ? [{ debugName: "theadClasses" }] : []));
|
|
534
|
+
headerTrClasses = computed(() => mergeClasses(tableHeaderRowVariants({ density: this.density() }), this.headerRowDef()?.headerRowClass() ?? ''), ...(ngDevMode ? [{ debugName: "headerTrClasses" }] : []));
|
|
490
535
|
trClasses = computed(() => {
|
|
491
536
|
const base = tableRowVariants({ variant: this.variant(), density: this.density() });
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
return base;
|
|
537
|
+
const clickable = this.isRowClickable()
|
|
538
|
+
? 'cursor-pointer outline-none focus-visible:outline-[1px] focus-visible:outline-offset-[-1px] focus-visible:outline-[--color-ring]'
|
|
539
|
+
: '';
|
|
540
|
+
return mergeClasses(base, clickable, this.rowDef()?.rowClass() ?? '');
|
|
496
541
|
}, ...(ngDevMode ? [{ debugName: "trClasses" }] : []));
|
|
497
|
-
footerTrClasses = computed(() => tableFooterRowVariants({ density: this.density() }), ...(ngDevMode ? [{ debugName: "footerTrClasses" }] : []));
|
|
542
|
+
footerTrClasses = computed(() => mergeClasses(tableFooterRowVariants({ density: this.density() }), this.footerRowDef()?.footerRowClass() ?? ''), ...(ngDevMode ? [{ debugName: "footerTrClasses" }] : []));
|
|
498
543
|
constructor() {
|
|
499
544
|
// Push data context to the row-click directive (avoids circular DI)
|
|
500
545
|
this.rowClickRef?._setContext({
|
|
@@ -510,7 +555,7 @@ class ComTable {
|
|
|
510
555
|
});
|
|
511
556
|
}
|
|
512
557
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
513
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: ComTable, isStandalone: true, selector: "com-table", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, trackByFn: { classPropertyName: "trackByFn", publicName: "trackByFn", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: {
|
|
558
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: ComTable, isStandalone: true, selector: "com-table", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, trackByFn: { classPropertyName: "trackByFn", publicName: "trackByFn", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, containerClass: { classPropertyName: "containerClass", publicName: "containerClass", isSignal: true, isRequired: false, transformFunction: null }, tableClass: { classPropertyName: "tableClass", publicName: "tableClass", isSignal: true, isRequired: false, transformFunction: null }, theadClass: { classPropertyName: "theadClass", publicName: "theadClass", isSignal: true, isRequired: false, transformFunction: null }, headerVariant: { classPropertyName: "headerVariant", publicName: "headerVariant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClass()" } }, queries: [{ propertyName: "columnDefs", predicate: ComColumnDef, isSignal: true }, { propertyName: "headerRowDef", first: true, predicate: ComHeaderRowDef, descendants: true, isSignal: true }, { propertyName: "rowDef", first: true, predicate: ComRowDef, descendants: true, isSignal: true }, { propertyName: "footerRowDef", first: true, predicate: ComFooterRowDef, descendants: true, isSignal: true }, { propertyName: "noDataRow", first: true, predicate: ComNoDataRow, descendants: true, isSignal: true }], exportAs: ["comTable"], ngImport: i0, template: `
|
|
514
559
|
<div [class]="containerClasses()">
|
|
515
560
|
<table [class]="tableClasses()" [attr.aria-label]="ariaLabel()" [attr.aria-busy]="loading() || null">
|
|
516
561
|
<thead [class]="theadClasses()">
|
|
@@ -634,10 +679,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
634
679
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
635
680
|
encapsulation: ViewEncapsulation.None,
|
|
636
681
|
host: {
|
|
637
|
-
class: '
|
|
682
|
+
'[class]': 'hostClass()',
|
|
638
683
|
},
|
|
639
684
|
}]
|
|
640
|
-
}], ctorParameters: () => [], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }], trackByFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackByFn", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], columnDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ComColumnDef), { isSignal: true }] }], headerRowDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ComHeaderRowDef), { isSignal: true }] }], rowDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ComRowDef), { isSignal: true }] }], footerRowDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ComFooterRowDef), { isSignal: true }] }], noDataRow: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ComNoDataRow), { isSignal: true }] }] } });
|
|
685
|
+
}], ctorParameters: () => [], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }], trackByFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackByFn", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], containerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "containerClass", required: false }] }], tableClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableClass", required: false }] }], theadClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "theadClass", required: false }] }], headerVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerVariant", required: false }] }], columnDefs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ComColumnDef), { isSignal: true }] }], headerRowDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ComHeaderRowDef), { isSignal: true }] }], rowDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ComRowDef), { isSignal: true }] }], footerRowDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ComFooterRowDef), { isSignal: true }] }], noDataRow: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ComNoDataRow), { isSignal: true }] }] } });
|
|
641
686
|
|
|
642
687
|
/**
|
|
643
688
|
* Attribute directive that enables click-to-act on `<com-table>` body rows.
|
|
@@ -680,7 +725,7 @@ class ComRowClick {
|
|
|
680
725
|
transform: booleanAttribute });
|
|
681
726
|
// ─── Outputs ───
|
|
682
727
|
/** Emits the row data object when a non-excluded cell is clicked or activated via keyboard. */
|
|
683
|
-
comRowClick = output(
|
|
728
|
+
comRowClick = output();
|
|
684
729
|
// ─── Public (consumed by ComTable via COM_ROW_CLICK token) ───
|
|
685
730
|
/** Whether row-click behavior is currently active. */
|
|
686
731
|
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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AA;kBALvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,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 * @example Custom class on header row\n * ```html\n * <tr [comHeaderRowDef]=\"['name', 'email']\" comHeaderRowDefClass=\"uppercase\"></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 /** Additional CSS classes to merge onto the header `<tr>`. */\n readonly headerRowClass: InputSignal<string> = input<string>('', { alias: 'comHeaderRowDefClass' });\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 * @example Custom class on body rows\n * ```html\n * <tr comRowDef [comRowDefColumns]=\"['name', 'email']\" comRowDefClass=\"even:bg-blue-50\"></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 /** Additional CSS classes to merge onto each body `<tr>`. */\n readonly rowClass: InputSignal<string> = input<string>('', { alias: 'comRowDefClass' });\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 * @example Custom class on footer row\n * ```html\n * <tr comFooterRowDef=\"['description', 'amount']\" comFooterRowDefClass=\"font-bold\"></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 /** Additional CSS classes to merge onto the footer `<tr>`. */\n readonly footerRowClass: InputSignal<string> = input<string>('', { alias: 'comFooterRowDefClass' });\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';\nexport type HeaderVariant = 'default' | 'muted';\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`, `--color-muted`, `--color-muted-foreground`, `--color-border`\n */\nexport const tableHeaderVariants: (props?: {\n sticky?: boolean;\n headerVariant?: HeaderVariant;\n}) => string = cva('', {\n variants: {\n sticky: {\n true: 'sticky top-0 z-10 bg-background',\n false: '',\n },\n headerVariant: {\n default: '',\n muted: 'bg-muted text-muted-foreground border-b border-border',\n },\n },\n compoundVariants: [\n {\n sticky: true,\n headerVariant: 'muted',\n class: 'sticky top-0 z-10 bg-muted text-muted-foreground border-b border-border',\n },\n ],\n defaultVariants: {\n sticky: false,\n headerVariant: 'default',\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 last:border-b-0 [&>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 { mergeClasses } from './table.utils';\nimport type { HeaderVariant, 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]': 'hostClass()',\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 /** Additional CSS classes to merge onto the host element. */\n readonly userClass: InputSignal<string> = input<string>('', { alias: 'class' });\n\n /** Additional CSS classes to merge onto the container `<div>`. */\n readonly containerClass: InputSignal<string> = input<string>('');\n\n /** Additional CSS classes to merge onto the `<table>` element. */\n readonly tableClass: InputSignal<string> = input<string>('');\n\n /** Additional CSS classes to merge onto the `<thead>` element. */\n readonly theadClass: InputSignal<string> = input<string>('');\n\n /** Visual treatment of the header — `'muted'` adds a filled background. */\n readonly headerVariant: InputSignal<HeaderVariant> = input<HeaderVariant>('default');\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 hostClass: Signal<string> = computed(() =>\n mergeClasses('block', this.userClass())\n );\n\n protected readonly containerClasses: Signal<string> = computed(() =>\n mergeClasses(tableContainerVariants(), this.containerClass())\n );\n\n protected readonly tableClasses: Signal<string> = computed(() =>\n mergeClasses(tableVariants(), this.tableClass())\n );\n\n protected readonly theadClasses: Signal<string> = computed(() =>\n mergeClasses(\n tableHeaderVariants({ sticky: this.isSticky(), headerVariant: this.headerVariant() }),\n this.theadClass()\n )\n );\n\n protected readonly headerTrClasses: Signal<string> = computed(() =>\n mergeClasses(tableHeaderRowVariants({ density: this.density() }), this.headerRowDef()?.headerRowClass() ?? '')\n );\n\n protected readonly trClasses: Signal<string> = computed(() => {\n const base = tableRowVariants({ variant: this.variant(), density: this.density() });\n const clickable = this.isRowClickable()\n ? 'cursor-pointer outline-none focus-visible:outline-[1px] focus-visible:outline-offset-[-1px] focus-visible:outline-[--color-ring]'\n : '';\n return mergeClasses(base, clickable, this.rowDef()?.rowClass() ?? '');\n });\n\n protected readonly footerTrClasses: Signal<string> = computed(() =>\n mergeClasses(tableFooterRowVariants({ density: this.density() }), this.footerRowDef()?.footerRowClass() ?? '')\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 HeaderVariant,\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,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AE;AACnB,QAAA,MAAM,QAAQ,GAAG,EAAE,CAAC,eAAe;QACnC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;QACtC,IAAI,QAAQ,GAAG,CAAC,IAAI,QAAQ,IAAI,IAAI,CAAC,MAAM;YAAE;QAC7C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAM,CAAC;IAC5C;uGAtGW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,WAAW,2bAFX,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAExE,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,MAAK,WAAY,CAAC,EAAE,CAAC;AACpF,iBAAA;;;ACrDD;AAEA;;ACFA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -114,14 +114,21 @@ declare class ComColumnDef {
|
|
|
114
114
|
* ```html
|
|
115
115
|
* <tr comHeaderRowDef="['name', 'email']" comHeaderRowDefSticky></tr>
|
|
116
116
|
* ```
|
|
117
|
+
*
|
|
118
|
+
* @example Custom class on header row
|
|
119
|
+
* ```html
|
|
120
|
+
* <tr [comHeaderRowDef]="['name', 'email']" comHeaderRowDefClass="uppercase"></tr>
|
|
121
|
+
* ```
|
|
117
122
|
*/
|
|
118
123
|
declare class ComHeaderRowDef {
|
|
119
124
|
/** Ordered list of column names to display. */
|
|
120
125
|
readonly columns: InputSignal<string[]>;
|
|
121
126
|
/** Makes this header row sticky (alternative to table-level `stickyHeader`). */
|
|
122
127
|
readonly sticky: InputSignalWithTransform<boolean, unknown>;
|
|
128
|
+
/** Additional CSS classes to merge onto the header `<tr>`. */
|
|
129
|
+
readonly headerRowClass: InputSignal<string>;
|
|
123
130
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComHeaderRowDef, never>;
|
|
124
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ComHeaderRowDef, "[comHeaderRowDef]", never, { "columns": { "alias": "comHeaderRowDef"; "required": true; "isSignal": true; }; "sticky": { "alias": "comHeaderRowDefSticky"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
131
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComHeaderRowDef, "[comHeaderRowDef]", never, { "columns": { "alias": "comHeaderRowDef"; "required": true; "isSignal": true; }; "sticky": { "alias": "comHeaderRowDefSticky"; "required": false; "isSignal": true; }; "headerRowClass": { "alias": "comHeaderRowDefClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
125
132
|
}
|
|
126
133
|
|
|
127
134
|
/**
|
|
@@ -133,12 +140,19 @@ declare class ComHeaderRowDef {
|
|
|
133
140
|
* ```html
|
|
134
141
|
* <tr comRowDef [comRowDefColumns]="['name', 'email', 'role']"></tr>
|
|
135
142
|
* ```
|
|
143
|
+
*
|
|
144
|
+
* @example Custom class on body rows
|
|
145
|
+
* ```html
|
|
146
|
+
* <tr comRowDef [comRowDefColumns]="['name', 'email']" comRowDefClass="even:bg-blue-50"></tr>
|
|
147
|
+
* ```
|
|
136
148
|
*/
|
|
137
149
|
declare class ComRowDef {
|
|
138
150
|
/** Ordered list of column names to display per body row. */
|
|
139
151
|
readonly columns: InputSignal<string[]>;
|
|
152
|
+
/** Additional CSS classes to merge onto each body `<tr>`. */
|
|
153
|
+
readonly rowClass: InputSignal<string>;
|
|
140
154
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComRowDef, never>;
|
|
141
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ComRowDef, "[comRowDef]", never, { "columns": { "alias": "comRowDefColumns"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
155
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComRowDef, "[comRowDef]", never, { "columns": { "alias": "comRowDefColumns"; "required": true; "isSignal": true; }; "rowClass": { "alias": "comRowDefClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
142
156
|
}
|
|
143
157
|
|
|
144
158
|
/**
|
|
@@ -150,12 +164,19 @@ declare class ComRowDef {
|
|
|
150
164
|
* ```html
|
|
151
165
|
* <tr comFooterRowDef="['description', 'amount']"></tr>
|
|
152
166
|
* ```
|
|
167
|
+
*
|
|
168
|
+
* @example Custom class on footer row
|
|
169
|
+
* ```html
|
|
170
|
+
* <tr comFooterRowDef="['description', 'amount']" comFooterRowDefClass="font-bold"></tr>
|
|
171
|
+
* ```
|
|
153
172
|
*/
|
|
154
173
|
declare class ComFooterRowDef {
|
|
155
174
|
/** Ordered list of column names in the footer. */
|
|
156
175
|
readonly columns: InputSignal<string[]>;
|
|
176
|
+
/** Additional CSS classes to merge onto the footer `<tr>`. */
|
|
177
|
+
readonly footerRowClass: InputSignal<string>;
|
|
157
178
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComFooterRowDef, never>;
|
|
158
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ComFooterRowDef, "[comFooterRowDef]", never, { "columns": { "alias": "comFooterRowDef"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
179
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComFooterRowDef, "[comFooterRowDef]", never, { "columns": { "alias": "comFooterRowDef"; "required": true; "isSignal": true; }; "footerRowClass": { "alias": "comFooterRowDefClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
159
180
|
}
|
|
160
181
|
|
|
161
182
|
/**
|
|
@@ -237,6 +258,7 @@ type ComTableDataSourceInput<T> = T[] | ComDataSource<T>;
|
|
|
237
258
|
|
|
238
259
|
type TableVariant = 'default' | 'striped';
|
|
239
260
|
type TableDensity = 'compact' | 'default' | 'comfortable';
|
|
261
|
+
type HeaderVariant = 'default' | 'muted';
|
|
240
262
|
/**
|
|
241
263
|
* CVA variants for the table container wrapper.
|
|
242
264
|
*/
|
|
@@ -252,10 +274,11 @@ type TableVariants = VariantProps<typeof tableVariants>;
|
|
|
252
274
|
/**
|
|
253
275
|
* CVA variants for the `<thead>` element.
|
|
254
276
|
*
|
|
255
|
-
* @tokens `--color-background`
|
|
277
|
+
* @tokens `--color-background`, `--color-muted`, `--color-muted-foreground`, `--color-border`
|
|
256
278
|
*/
|
|
257
279
|
declare const tableHeaderVariants: (props?: {
|
|
258
280
|
sticky?: boolean;
|
|
281
|
+
headerVariant?: HeaderVariant;
|
|
259
282
|
}) => string;
|
|
260
283
|
type TableHeaderVariants = VariantProps<typeof tableHeaderVariants>;
|
|
261
284
|
/**
|
|
@@ -360,6 +383,16 @@ declare class ComTable<T> {
|
|
|
360
383
|
readonly loading: InputSignalWithTransform<boolean, unknown>;
|
|
361
384
|
/** Accessible label for the table element. */
|
|
362
385
|
readonly ariaLabel: InputSignal<string | undefined>;
|
|
386
|
+
/** Additional CSS classes to merge onto the host element. */
|
|
387
|
+
readonly userClass: InputSignal<string>;
|
|
388
|
+
/** Additional CSS classes to merge onto the container `<div>`. */
|
|
389
|
+
readonly containerClass: InputSignal<string>;
|
|
390
|
+
/** Additional CSS classes to merge onto the `<table>` element. */
|
|
391
|
+
readonly tableClass: InputSignal<string>;
|
|
392
|
+
/** Additional CSS classes to merge onto the `<thead>` element. */
|
|
393
|
+
readonly theadClass: InputSignal<string>;
|
|
394
|
+
/** Visual treatment of the header — `'muted'` adds a filled background. */
|
|
395
|
+
readonly headerVariant: InputSignal<HeaderVariant>;
|
|
363
396
|
/** @internal All column definitions projected into the table. */
|
|
364
397
|
readonly columnDefs: Signal<readonly ComColumnDef[]>;
|
|
365
398
|
/** @internal Header row definition. */
|
|
@@ -384,6 +417,7 @@ declare class ComTable<T> {
|
|
|
384
417
|
private readonly isSticky;
|
|
385
418
|
/** @internal Whether body rows are clickable (ComRowClick directive is active). */
|
|
386
419
|
protected readonly isRowClickable: Signal<boolean>;
|
|
420
|
+
protected readonly hostClass: Signal<string>;
|
|
387
421
|
protected readonly containerClasses: Signal<string>;
|
|
388
422
|
protected readonly tableClasses: Signal<string>;
|
|
389
423
|
protected readonly theadClasses: Signal<string>;
|
|
@@ -392,7 +426,7 @@ declare class ComTable<T> {
|
|
|
392
426
|
protected readonly footerTrClasses: Signal<string>;
|
|
393
427
|
constructor();
|
|
394
428
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComTable<any>, never>;
|
|
395
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ComTable<any>, "com-table", ["comTable"], { "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "trackByFn": { "alias": "trackByFn"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, ["columnDefs", "headerRowDef", "rowDef", "footerRowDef", "noDataRow"], never, true, never>;
|
|
429
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComTable<any>, "com-table", ["comTable"], { "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "trackByFn": { "alias": "trackByFn"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "containerClass": { "alias": "containerClass"; "required": false; "isSignal": true; }; "tableClass": { "alias": "tableClass"; "required": false; "isSignal": true; }; "theadClass": { "alias": "theadClass"; "required": false; "isSignal": true; }; "headerVariant": { "alias": "headerVariant"; "required": false; "isSignal": true; }; }, {}, ["columnDefs", "headerRowDef", "rowDef", "footerRowDef", "noDataRow"], never, true, never>;
|
|
396
430
|
}
|
|
397
431
|
|
|
398
432
|
/** Data context that ComTable pushes to ComRowClick to avoid circular DI. */
|
|
@@ -464,4 +498,4 @@ declare class ComRowClick<T = unknown> implements ComRowClickRef<T> {
|
|
|
464
498
|
}
|
|
465
499
|
|
|
466
500
|
export { COM_ROW_CLICK, ComArrayDataSource, ComCellDef, ComColumnDef, ComDataSource, ComFooterCellDef, ComFooterRowDef, ComHeaderCellDef, ComHeaderRowDef, ComNoDataRow, ComRowClick, ComRowDef, ComTable, isDataSource, tableBodyCellVariants, tableContainerVariants, tableFooterCellVariants, tableFooterRowVariants, tableHeaderCellVariants, tableHeaderRowVariants, tableHeaderVariants, tableRowVariants, tableVariants };
|
|
467
|
-
export type { CellDefContext, ComRowClickRef, ComTableDataSourceInput, TableBodyCellVariants, TableContainerVariants, TableDensity, TableFooterCellVariants, TableFooterRowVariants, TableHeaderCellVariants, TableHeaderRowVariants, TableHeaderVariants, TableRowVariants, TableVariant, TableVariants };
|
|
501
|
+
export type { CellDefContext, ComRowClickRef, ComTableDataSourceInput, HeaderVariant, TableBodyCellVariants, TableContainerVariants, TableDensity, TableFooterCellVariants, TableFooterRowVariants, TableHeaderCellVariants, TableHeaderRowVariants, TableHeaderVariants, TableRowVariants, TableVariant, TableVariants };
|