@gilav21/shadcn-angular-data-table 0.3.3 → 0.3.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.
@@ -1,7 +1,7 @@
1
1
  import { clsx } from 'clsx';
2
2
  import { twMerge } from 'tailwind-merge';
3
3
  import * as i0 from '@angular/core';
4
- import { signal, inject, ElementRef, Renderer2, input, Directive, viewChild, computed, ChangeDetectionStrategy, Component, output, InjectionToken, Injector, Injectable, effect, untracked, DestroyRef, model, forwardRef, afterNextRender, contentChild, afterRenderEffect, ApplicationRef, EnvironmentInjector, createComponent, HostListener, ViewChild, ViewContainerRef, viewChildren, booleanAttribute, ErrorHandler } from '@angular/core';
4
+ import { signal, inject, ElementRef, Renderer2, input, Directive, viewChild, computed, ChangeDetectionStrategy, Component, output, InjectionToken, Injector, Injectable, effect, untracked, DestroyRef, model, forwardRef, afterNextRender, contentChild, afterRenderEffect, ApplicationRef, EnvironmentInjector, createComponent, HostListener, ViewChild, ChangeDetectorRef, ViewContainerRef, viewChildren, booleanAttribute, ErrorHandler } from '@angular/core';
5
5
  import * as i1$1 from '@angular/common';
6
6
  import { DOCUMENT, CommonModule, NgTemplateOutlet } from '@angular/common';
7
7
  import { cva } from 'class-variance-authority';
@@ -269,10 +269,22 @@ function computeVariableRowRangeLinear(scrollTop, viewportHeight, getRowHeight,
269
269
  paddingBottom,
270
270
  };
271
271
  }
272
+ /**
273
+ * Nests a flat list by parent id. Every row appears exactly once: a row whose
274
+ * parent id names no row surfaces at the root (list order), and a parent cycle
275
+ * (including a row that is its own parent) is broken at its first row in list
276
+ * order. The input rows are not mutated.
277
+ */
272
278
  function buildTreeFromFlat(rows, getId, getParentId, setChildren) {
279
+ const ids = new Set(rows.map(getId));
280
+ const roots = [];
273
281
  const childrenMap = new Map();
274
282
  for (const row of rows) {
275
283
  const parentId = getParentId(row);
284
+ if (parentId === null || !ids.has(parentId)) {
285
+ roots.push(row);
286
+ continue;
287
+ }
276
288
  const siblings = childrenMap.get(parentId);
277
289
  if (siblings) {
278
290
  siblings.push(row);
@@ -281,16 +293,20 @@ function buildTreeFromFlat(rows, getId, getParentId, setChildren) {
281
293
  childrenMap.set(parentId, [row]);
282
294
  }
283
295
  }
296
+ const placed = new Set();
284
297
  function attachChildren(row) {
285
298
  const id = getId(row);
286
- const children = childrenMap.get(id);
287
- if (!children || children.length === 0) {
288
- return row;
289
- }
290
- return setChildren(row, children.map(attachChildren));
299
+ placed.add(id);
300
+ const children = (childrenMap.get(id) ?? []).filter((child) => !placed.has(getId(child)));
301
+ return children.length > 0 ? setChildren(row, children.map(attachChildren)) : row;
302
+ }
303
+ const tree = roots.map(attachChildren);
304
+ // Whatever is still unplaced hangs off a cycle and has no root of its own.
305
+ for (const row of rows) {
306
+ if (!placed.has(getId(row)))
307
+ tree.push(attachChildren(row));
291
308
  }
292
- const roots = childrenMap.get(null) ?? [];
293
- return roots.map(attachChildren);
309
+ return tree;
294
310
  }
295
311
  function toNumberSeries(source) {
296
312
  const nums = [];
@@ -536,59 +552,108 @@ function buildFillValues(source, count) {
536
552
  return fillTrailingNumbers(trailing, count);
537
553
  return cycleValues(source, count);
538
554
  }
539
- function parseCsvLine(line) {
540
- const cells = [];
541
- let current = '';
542
- let inQuotes = false;
555
+ /** A closing quote must be the last character of its cell; anything after it means the field was never quoted. */
556
+ function endsCell(text, index, delimiter) {
557
+ return index >= text.length || text[index] === delimiter || text[index] === '\n';
558
+ }
559
+ /**
560
+ * Splits clipboard text into rows of cells with one quote-aware pass. A cell
561
+ * that STARTS with a quote may hold the delimiter, doubled quotes and line
562
+ * breaks (how Excel and Sheets write them); a quote anywhere else is literal.
563
+ * Line endings are already normalised to LF. Returns `null` when a quote opens
564
+ * and never closes properly (a lone `"5 inch`, or `"quoted" text`): that text
565
+ * did not come from a quoting writer, and honouring the quote would swallow
566
+ * the rest.
567
+ */
568
+ function parseDelimited(text, delimiter) {
569
+ const rows = [];
570
+ let row = [];
571
+ let cell = '';
572
+ let quoted = false;
543
573
  let i = 0;
544
- while (i < line.length) {
545
- const ch = line[i];
546
- if (ch === '"') {
547
- if (inQuotes && line[i + 1] === '"') {
548
- current += '"';
574
+ while (i < text.length) {
575
+ const ch = text[i];
576
+ if (quoted) {
577
+ if (ch !== '"') {
578
+ cell += ch;
579
+ }
580
+ else if (text[i + 1] === '"') {
581
+ cell += '"';
549
582
  i++;
550
583
  }
584
+ else if (endsCell(text, i + 1, delimiter)) {
585
+ quoted = false;
586
+ }
551
587
  else {
552
- inQuotes = !inQuotes;
588
+ return null;
553
589
  }
554
590
  }
555
- else if (ch === ',' && !inQuotes) {
556
- cells.push(current);
557
- current = '';
591
+ else if (ch === '"' && cell === '') {
592
+ quoted = true;
593
+ }
594
+ else if (ch === delimiter) {
595
+ row.push(cell);
596
+ cell = '';
597
+ }
598
+ else if (ch === '\n') {
599
+ row.push(cell);
600
+ rows.push(row);
601
+ row = [];
602
+ cell = '';
558
603
  }
559
604
  else {
560
- current += ch;
605
+ cell += ch;
561
606
  }
562
607
  i++;
563
608
  }
564
- cells.push(current);
565
- return cells;
609
+ if (quoted)
610
+ return null;
611
+ row.push(cell);
612
+ rows.push(row);
613
+ return rows;
614
+ }
615
+ function splitPlain(text, delimiter) {
616
+ return text.split('\n').map((line) => line.split(delimiter));
566
617
  }
567
618
  /**
568
- * Parse clipboard text into a grid of cell strings. Tab-separated when any tab
569
- * is present (Excel / the table's own copy-out), otherwise comma-separated with
570
- * quoted-cell support. A single trailing newline is dropped.
619
+ * Parse clipboard text into a grid of cell strings. Tab-separated when that
620
+ * yields more than one column (Excel / the table's own copy-out), otherwise
621
+ * comma-separated. Quoted cells may contain the delimiter, `""` and line
622
+ * breaks. A single trailing newline is dropped.
571
623
  */
572
624
  function parseClipboardGrid(text) {
573
625
  if (text === '')
574
626
  return [];
575
627
  const normalized = text.replaceAll(/\r\n?/g, '\n');
576
628
  const body = normalized.endsWith('\n') ? normalized.slice(0, -1) : normalized;
577
- const lines = body.split('\n');
578
- if (lines.some((line) => line.includes('\t'))) {
579
- return lines.map((line) => line.split('\t'));
580
- }
581
- return lines.map(parseCsvLine);
629
+ const tabs = parseDelimited(body, '\t') ?? splitPlain(body, '\t');
630
+ if (tabs.some((cells) => cells.length > 1))
631
+ return tabs;
632
+ return parseDelimited(body, ',') ?? splitPlain(body, ',');
633
+ }
634
+ /**
635
+ * The cell value as a number, or `null` when it holds none. `Number()` alone
636
+ * turns `null`, `''`, whitespace and `false` into `0`, which would let an empty
637
+ * cell pass for a zero.
638
+ */
639
+ function toAggregatableNumber$1(value) {
640
+ if (typeof value === 'number')
641
+ return Number.isFinite(value) ? value : null;
642
+ if (typeof value !== 'string' || value.trim() === '')
643
+ return null;
644
+ const n = Number(value);
645
+ return Number.isFinite(n) ? n : null;
582
646
  }
583
647
  /**
584
648
  * Reduce a list of cell values to a single aggregate string. Shared by column
585
649
  * footers and the range-selection readout so both compute identically.
586
- * `count` counts all values; the numeric aggregates ignore non-finite values.
650
+ * `count` counts all values; the numeric aggregates ignore values holding no
651
+ * number (`null`, `undefined`, blank strings, text).
587
652
  */
588
653
  function computeAggregateValue(values, fn) {
589
654
  if (typeof fn === 'function')
590
655
  return fn(values);
591
- const nums = values.map(Number).filter(Number.isFinite);
656
+ const nums = values.map(toAggregatableNumber$1).filter((n) => n !== null);
592
657
  if (nums.length === 0 && fn !== 'count')
593
658
  return '';
594
659
  switch (fn) {
@@ -646,29 +711,41 @@ function renumberDataRows(rows) {
646
711
  });
647
712
  }
648
713
  // ── Advanced filter evaluation (A5) ──
649
- function asString(value) {
714
+ /**
715
+ * A cell as text for matching. `stringifyValue` would JSON-quote a Date
716
+ * (`"2024-03-05T..."`), so `startsWith` and `equals` could never match one.
717
+ */
718
+ function cellText(value) {
719
+ if (value instanceof Date)
720
+ return Number.isNaN(value.getTime()) ? '' : value.toISOString();
650
721
  return stringifyValue(value);
651
722
  }
723
+ /** An empty cell is no number, so it never satisfies a numeric comparison (only `isEmpty` selects blanks). */
724
+ function compareNumbers(cell, value, test) {
725
+ const a = toAggregatableNumber$1(cell);
726
+ const b = toAggregatableNumber$1(value);
727
+ return a !== null && b !== null && test(a, b);
728
+ }
652
729
  function looseEquals(cell, value) {
653
- const a = Number(cell);
654
- const b = Number(value);
655
- if (Number.isFinite(a) && Number.isFinite(b))
730
+ const a = toAggregatableNumber$1(cell);
731
+ const b = toAggregatableNumber$1(value);
732
+ if (a !== null && b !== null)
656
733
  return a === b;
657
- return asString(cell).toLowerCase() === asString(value).toLowerCase();
734
+ return cellText(cell).toLowerCase() === cellText(value).toLowerCase();
658
735
  }
659
736
  const FILTER_OPS = {
660
- isEmpty: (cell) => asString(cell).trim() === '',
661
- isNotEmpty: (cell) => asString(cell).trim() !== '',
737
+ isEmpty: (cell) => cellText(cell).trim() === '',
738
+ isNotEmpty: (cell) => cellText(cell).trim() !== '',
662
739
  equals: (cell, value) => looseEquals(cell, value),
663
740
  notEquals: (cell, value) => !looseEquals(cell, value),
664
- contains: (cell, value) => asString(cell).toLowerCase().includes(asString(value).toLowerCase()),
665
- notContains: (cell, value) => !asString(cell).toLowerCase().includes(asString(value).toLowerCase()),
666
- startsWith: (cell, value) => asString(cell).toLowerCase().startsWith(asString(value).toLowerCase()),
667
- endsWith: (cell, value) => asString(cell).toLowerCase().endsWith(asString(value).toLowerCase()),
668
- gt: (cell, value) => Number(cell) > Number(value),
669
- gte: (cell, value) => Number(cell) >= Number(value),
670
- lt: (cell, value) => Number(cell) < Number(value),
671
- lte: (cell, value) => Number(cell) <= Number(value),
741
+ contains: (cell, value) => cellText(cell).toLowerCase().includes(cellText(value).toLowerCase()),
742
+ notContains: (cell, value) => !cellText(cell).toLowerCase().includes(cellText(value).toLowerCase()),
743
+ startsWith: (cell, value) => cellText(cell).toLowerCase().startsWith(cellText(value).toLowerCase()),
744
+ endsWith: (cell, value) => cellText(cell).toLowerCase().endsWith(cellText(value).toLowerCase()),
745
+ gt: (cell, value) => compareNumbers(cell, value, (a, b) => a > b),
746
+ gte: (cell, value) => compareNumbers(cell, value, (a, b) => a >= b),
747
+ lt: (cell, value) => compareNumbers(cell, value, (a, b) => a < b),
748
+ lte: (cell, value) => compareNumbers(cell, value, (a, b) => a <= b),
672
749
  };
673
750
  /** Test a single cell value against an advanced-filter operator. */
674
751
  function matchesCondition(cell, operator, value) {
@@ -1155,8 +1232,10 @@ class UiRippleDirective {
1155
1232
  return;
1156
1233
  const host = this.el.nativeElement;
1157
1234
  const rect = host.getBoundingClientRect();
1158
- const x = event.clientX - rect.left;
1159
- const y = event.clientY - rect.top;
1235
+ // A keyboard-initiated click has no pointer position (detail 0, coords 0,0).
1236
+ const noPointer = event.detail === 0 && event.clientX === 0 && event.clientY === 0;
1237
+ const x = noPointer ? rect.width / 2 : event.clientX - rect.left;
1238
+ const y = noPointer ? rect.height / 2 : event.clientY - rect.top;
1160
1239
  const diameter = Math.max(rect.width, rect.height) * 2;
1161
1240
  const ripple = this.renderer.createElement('span');
1162
1241
  this.renderer.setStyle(ripple, 'position', 'absolute');
@@ -1273,6 +1352,8 @@ class SpinnerComponent {
1273
1352
  * rendered instead.
1274
1353
  */
1275
1354
  this.variant = input('ring', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
1355
+ /** Accessible name announced by assistive technology (applies to every variant). Set it to say what is loading, or to localize it. */
1356
+ this.label = input('Loading', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
1276
1357
  this.contentWrapper = viewChild('contentWrapper', ...(ngDevMode ? [{ debugName: "contentWrapper" }] : /* istanbul ignore next */ []));
1277
1358
  this._hasCustomContent = signal(false, ...(ngDevMode ? [{ debugName: "_hasCustomContent" }] : /* istanbul ignore next */ []));
1278
1359
  this.hasCustomContent = this._hasCustomContent.asReadonly();
@@ -1300,12 +1381,12 @@ class SpinnerComponent {
1300
1381
  this._hasCustomContent.set((this.contentWrapper()?.nativeElement?.children?.length ?? 0) > 0);
1301
1382
  }
1302
1383
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1303
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SpinnerComponent, isStandalone: true, selector: "ui-spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, customSize: { classPropertyName: "customSize", publicName: "customSize", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #contentWrapper>\n <ng-content />\n</div>\n@if (!hasCustomContent()) {\n @if (variant() === 'ring') {\n <output class=\"inline-flex\" aria-label=\"Loading\" [attr.data-slot]=\"'spinner'\">\n <svg\n [class]=\"classes()\"\n [style]=\"customStyles()\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>\n </svg>\n </output>\n } @else if (variant() === 'dots') {\n <output class=\"flex items-center gap-1\" aria-label=\"Loading\" [attr.data-slot]=\"'spinner'\">\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.3s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.15s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce')\"></div>\n </output>\n } @else if (variant() === 'bars') {\n <output class=\"flex items-center gap-0.5\" aria-label=\"Loading\" [attr.data-slot]=\"'spinner'\">\n @for (delay of barDelays; track delay) {\n <div\n [class]=\"cn(barClass(), 'bg-current rounded-sm animate-pulse')\"\n [style.animation-delay]=\"delay\"\n ></div>\n }\n </output>\n } @else if (variant() === 'pulse') {\n <output\n [class]=\"cn(pulseClass(), 'block rounded-full bg-current animate-pulse')\"\n aria-label=\"Loading\"\n [attr.data-slot]=\"'spinner'\"\n ></output>\n }\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1384
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SpinnerComponent, isStandalone: true, selector: "ui-spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, customSize: { classPropertyName: "customSize", publicName: "customSize", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["contentWrapper"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #contentWrapper>\n <ng-content />\n</div>\n@if (!hasCustomContent()) {\n @if (variant() === 'ring') {\n <output class=\"inline-flex\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n <svg\n [class]=\"classes()\"\n [style]=\"customStyles()\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>\n </svg>\n </output>\n } @else if (variant() === 'dots') {\n <output class=\"flex items-center gap-1\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.3s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.15s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce')\"></div>\n </output>\n } @else if (variant() === 'bars') {\n <output class=\"flex items-center gap-0.5\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n @for (delay of barDelays; track delay) {\n <div\n [class]=\"cn(barClass(), 'bg-current rounded-sm animate-pulse')\"\n [style.animation-delay]=\"delay\"\n ></div>\n }\n </output>\n } @else if (variant() === 'pulse') {\n <output\n [class]=\"cn(pulseClass(), 'block rounded-full bg-current animate-pulse')\"\n [attr.aria-label]=\"label()\"\n [attr.data-slot]=\"'spinner'\"\n ></output>\n }\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1304
1385
  }
1305
1386
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SpinnerComponent, decorators: [{
1306
1387
  type: Component,
1307
- args: [{ selector: 'ui-spinner', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'contents' }, template: "<div #contentWrapper>\n <ng-content />\n</div>\n@if (!hasCustomContent()) {\n @if (variant() === 'ring') {\n <output class=\"inline-flex\" aria-label=\"Loading\" [attr.data-slot]=\"'spinner'\">\n <svg\n [class]=\"classes()\"\n [style]=\"customStyles()\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>\n </svg>\n </output>\n } @else if (variant() === 'dots') {\n <output class=\"flex items-center gap-1\" aria-label=\"Loading\" [attr.data-slot]=\"'spinner'\">\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.3s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.15s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce')\"></div>\n </output>\n } @else if (variant() === 'bars') {\n <output class=\"flex items-center gap-0.5\" aria-label=\"Loading\" [attr.data-slot]=\"'spinner'\">\n @for (delay of barDelays; track delay) {\n <div\n [class]=\"cn(barClass(), 'bg-current rounded-sm animate-pulse')\"\n [style.animation-delay]=\"delay\"\n ></div>\n }\n </output>\n } @else if (variant() === 'pulse') {\n <output\n [class]=\"cn(pulseClass(), 'block rounded-full bg-current animate-pulse')\"\n aria-label=\"Loading\"\n [attr.data-slot]=\"'spinner'\"\n ></output>\n }\n}\n" }]
1308
- }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], customSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "customSize", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], contentWrapper: [{ type: i0.ViewChild, args: ['contentWrapper', { isSignal: true }] }] } });
1388
+ args: [{ selector: 'ui-spinner', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'contents' }, template: "<div #contentWrapper>\n <ng-content />\n</div>\n@if (!hasCustomContent()) {\n @if (variant() === 'ring') {\n <output class=\"inline-flex\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n <svg\n [class]=\"classes()\"\n [style]=\"customStyles()\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>\n </svg>\n </output>\n } @else if (variant() === 'dots') {\n <output class=\"flex items-center gap-1\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.3s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce [animation-delay:-0.15s]')\"></div>\n <div [class]=\"cn(dotClass(), 'rounded-full bg-current animate-bounce')\"></div>\n </output>\n } @else if (variant() === 'bars') {\n <output class=\"flex items-center gap-0.5\" [attr.aria-label]=\"label()\" [attr.data-slot]=\"'spinner'\">\n @for (delay of barDelays; track delay) {\n <div\n [class]=\"cn(barClass(), 'bg-current rounded-sm animate-pulse')\"\n [style.animation-delay]=\"delay\"\n ></div>\n }\n </output>\n } @else if (variant() === 'pulse') {\n <output\n [class]=\"cn(pulseClass(), 'block rounded-full bg-current animate-pulse')\"\n [attr.aria-label]=\"label()\"\n [attr.data-slot]=\"'spinner'\"\n ></output>\n }\n}\n" }]
1389
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], customSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "customSize", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], contentWrapper: [{ type: i0.ViewChild, args: ['contentWrapper', { isSignal: true }] }] } });
1309
1390
 
1310
1391
  /**
1311
1392
  * PageSpinner - Full page loading overlay
@@ -1327,7 +1408,7 @@ class PageSpinnerComponent {
1327
1408
  this.classes = computed(() => cn('fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
1328
1409
  }
1329
1410
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PageSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1330
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PageSpinnerComponent, isStandalone: true, selector: "ui-page-spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "<div [class]=\"classes()\" [attr.data-slot]=\"'page-spinner'\">\n <div class=\"flex flex-col items-center gap-4\">\n <ui-spinner size=\"page\" />\n @if (message()) {\n <p class=\"text-sm text-muted-foreground animate-pulse motion-reduce:animate-none\">{{ message() }}</p>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1411
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: PageSpinnerComponent, isStandalone: true, selector: "ui-page-spinner", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "<div [class]=\"classes()\" [attr.data-slot]=\"'page-spinner'\">\n <div class=\"flex flex-col items-center gap-4\">\n <ui-spinner size=\"page\" />\n @if (message()) {\n <p class=\"text-sm text-muted-foreground animate-pulse motion-reduce:animate-none\">{{ message() }}</p>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant", "label"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1331
1412
  }
1332
1413
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PageSpinnerComponent, decorators: [{
1333
1414
  type: Component,
@@ -1349,7 +1430,7 @@ class SkeletonComponent {
1349
1430
  * entirely under `prefers-reduced-motion: reduce`.
1350
1431
  */
1351
1432
  this.variant = input('pulse', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
1352
- this.classes = computed(() => cn('rounded-md', this.variant() === 'pulse' && 'animate-pulse bg-primary/10', this.variant() === 'shimmer' && 'animate-shimmer', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
1433
+ this.classes = computed(() => cn('block rounded-md', this.variant() === 'pulse' && 'animate-pulse bg-primary/10', this.variant() === 'shimmer' && 'animate-shimmer', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
1353
1434
  }
1354
1435
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1355
1436
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: SkeletonComponent, isStandalone: true, selector: "ui-skeleton", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"skeleton\"" } }, ngImport: i0, template: ``, isInline: true, styles: [":host.animate-shimmer{background:#f6f7f8;background:linear-gradient(to right,#f6f7f8 8%,#edeef1 18%,#f6f7f8 33%);background-size:800px 104px;animation:shimmer 2s linear infinite forwards}.dark .animate-shimmer{background:#1e293b;background:linear-gradient(to right,#1e293b 8%,#0f172a 18%,#1e293b 33%);background-size:800px 104px}@keyframes shimmer{0%{background-position:-800px 0}to{background-position:800px 0}}@media(prefers-reduced-motion:reduce){:host.animate-shimmer,.animate-shimmer{animation:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -1456,7 +1537,7 @@ class ButtonComponent {
1456
1537
  this.classes = computed(() => cn(buttonVariants({ variant: this.variant(), size: this.size() }), this.loading() && 'relative', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
1457
1538
  }
1458
1539
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1459
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ButtonComponent, isStandalone: true, selector: "ui-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "aria-expanded", isSignal: true, isRequired: false, transformFunction: null }, ariaPressed: { classPropertyName: "ariaPressed", publicName: "aria-pressed", isSignal: true, isRequired: false, transformFunction: null }, ariaHaspopup: { classPropertyName: "ariaHaspopup", publicName: "aria-haspopup", isSignal: true, isRequired: false, transformFunction: null }, ariaControls: { classPropertyName: "ariaControls", publicName: "aria-controls", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, rippleColor: { classPropertyName: "rippleColor", publicName: "rippleColor", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, host: { properties: { "class": "\"contents\"", "attr.data-size": "size()", "attr.aria-label": "null", "attr.aria-expanded": "null", "attr.aria-pressed": "null", "attr.aria-controls": "null", "attr.aria-haspopup": "null" } }, ngImport: i0, template: "@if (skeleton()) {\n <ui-skeleton class=\"h-9 w-24 rounded-md\" />\n} @else {\n <button\n uiRipple\n [uiRippleDisabled]=\"!ripple()\"\n [uiRippleColor]=\"rippleColor()\"\n [class]=\"classes()\"\n [disabled]=\"disabled() || loading()\"\n [type]=\"type()\"\n [attr.data-slot]=\"'button'\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-expanded]=\"ariaExpanded() ?? null\"\n [attr.aria-pressed]=\"ariaPressed() ?? null\"\n [attr.aria-controls]=\"ariaControls() || null\"\n [attr.aria-haspopup]=\"ariaHaspopup() ?? null\"\n (click)=\"clicked.emit($event)\"\n >\n @if (loading()) {\n <div class=\"absolute inset-0 flex items-center justify-center\" aria-hidden=\"true\">\n <ui-spinner size=\"xs\" />\n </div>\n }\n @if (label()) {\n {{ label() }}\n } @else {\n <ng-content />\n }\n </button>\n}\n", styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=button]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d))}:host([data-size=\"sm\"]) [data-slot=button]{height:calc(2rem * var(--_d));padding-inline:calc(.75rem * var(--_d))}:host([data-size=\"lg\"]) [data-slot=button]{height:calc(2.5rem * var(--_d));padding-inline:calc(2rem * var(--_d))}:host([data-size=\"icon\"]) [data-slot=button]{height:calc(2.25rem * var(--_d));width:calc(2.25rem * var(--_d));padding:0}:host([data-size=\"icon-sm\"]) [data-slot=button]{height:calc(2rem * var(--_d));width:calc(2rem * var(--_d));padding:0}:host([data-size=\"icon-lg\"]) [data-slot=button]{height:calc(2.5rem * var(--_d));width:calc(2.5rem * var(--_d));padding:0}}\n"], dependencies: [{ kind: "directive", type: UiRippleDirective, selector: "[uiRipple]", inputs: ["uiRippleColor", "uiRippleDuration", "uiRippleDisabled"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1540
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ButtonComponent, isStandalone: true, selector: "ui-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "aria-expanded", isSignal: true, isRequired: false, transformFunction: null }, ariaPressed: { classPropertyName: "ariaPressed", publicName: "aria-pressed", isSignal: true, isRequired: false, transformFunction: null }, ariaHaspopup: { classPropertyName: "ariaHaspopup", publicName: "aria-haspopup", isSignal: true, isRequired: false, transformFunction: null }, ariaControls: { classPropertyName: "ariaControls", publicName: "aria-controls", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, rippleColor: { classPropertyName: "rippleColor", publicName: "rippleColor", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, host: { properties: { "class": "\"contents\"", "attr.data-size": "size()", "attr.aria-label": "null", "attr.aria-expanded": "null", "attr.aria-pressed": "null", "attr.aria-controls": "null", "attr.aria-haspopup": "null" } }, ngImport: i0, template: "@if (skeleton()) {\n <ui-skeleton class=\"h-9 w-24 rounded-md\" />\n} @else {\n <button\n uiRipple\n [uiRippleDisabled]=\"!ripple()\"\n [uiRippleColor]=\"rippleColor()\"\n [class]=\"classes()\"\n [disabled]=\"disabled() || loading()\"\n [type]=\"type()\"\n [attr.data-slot]=\"'button'\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-expanded]=\"ariaExpanded() ?? null\"\n [attr.aria-pressed]=\"ariaPressed() ?? null\"\n [attr.aria-controls]=\"ariaControls() || null\"\n [attr.aria-haspopup]=\"ariaHaspopup() ?? null\"\n (click)=\"clicked.emit($event)\"\n >\n @if (loading()) {\n <div class=\"absolute inset-0 flex items-center justify-center\" aria-hidden=\"true\">\n <ui-spinner size=\"xs\" />\n </div>\n }\n @if (label()) {\n {{ label() }}\n } @else {\n <ng-content />\n }\n </button>\n}\n", styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=button]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d))}:host([data-size=\"sm\"]) [data-slot=button]{height:calc(2rem * var(--_d));padding-inline:calc(.75rem * var(--_d))}:host([data-size=\"lg\"]) [data-slot=button]{height:calc(2.5rem * var(--_d));padding-inline:calc(2rem * var(--_d))}:host([data-size=\"icon\"]) [data-slot=button]{height:calc(2.25rem * var(--_d));width:calc(2.25rem * var(--_d));padding:0}:host([data-size=\"icon-sm\"]) [data-slot=button]{height:calc(2rem * var(--_d));width:calc(2rem * var(--_d));padding:0}:host([data-size=\"icon-lg\"]) [data-slot=button]{height:calc(2.5rem * var(--_d));width:calc(2.5rem * var(--_d));padding:0}}\n"], dependencies: [{ kind: "directive", type: UiRippleDirective, selector: "[uiRipple]", inputs: ["uiRippleColor", "uiRippleDuration", "uiRippleDisabled"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant", "label"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1460
1541
  }
1461
1542
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ButtonComponent, decorators: [{
1462
1543
  type: Component,
@@ -2591,7 +2672,7 @@ class AlertDialogContentComponent {
2591
2672
  this.actionClick = output();
2592
2673
  /** The cancel button was pressed. Same simple-mode-only rules as {@link actionClick}. */
2593
2674
  this.cancelClick = output();
2594
- this.classes = computed(() => cn('fixed z-50 grid w-full max-w-[calc(100vw-2rem)] sm:max-w-lg gap-3 sm:gap-4 border bg-background p-4 sm:p-6 shadow-lg duration-200 sm:rounded-lg', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
2675
+ this.classes = computed(() => cn('fixed z-50 grid w-full max-w-[calc(100vw-2rem)] sm:max-w-lg border bg-background shadow-lg duration-200 sm:rounded-lg', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
2595
2676
  /**
2596
2677
  * The two places a title can come from: the one this component renders for the `title` input, and one the
2597
2678
  * author projects. Read by the naming effect so it runs again when either appears, which a title rendered
@@ -2682,22 +2763,18 @@ class AlertDialogContentComponent {
2682
2763
  </div>
2683
2764
  </div>
2684
2765
  }
2685
- `, isInline: true, dependencies: [{ kind: "component", type: AlertDialogHeaderComponent, selector: "ui-alert-dialog-header", inputs: ["class"] }, { kind: "component", type: AlertDialogTitleComponent, selector: "ui-alert-dialog-title", inputs: ["class"] }, { kind: "component", type: AlertDialogDescriptionComponent, selector: "ui-alert-dialog-description", inputs: ["class"] }, { kind: "component", type: AlertDialogFooterComponent, selector: "ui-alert-dialog-footer", inputs: ["class"] }, { kind: "component", type: AlertDialogActionComponent, selector: "ui-alert-dialog-action", inputs: ["class"] }, { kind: "component", type: AlertDialogCancelComponent, selector: "ui-alert-dialog-cancel", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2766
+ `, isInline: true, styles: [":host{--_d: var(--density-alert-dialog, var(--density, 1))}@layer components{[data-slot=alert-dialog-content]{gap:calc(.75rem * var(--_d));padding:calc(1rem * var(--_d))}@media(min-width:640px){[data-slot=alert-dialog-content]{gap:calc(1rem * var(--_d));padding:calc(1.5rem * var(--_d))}}}\n"], dependencies: [{ kind: "component", type: AlertDialogHeaderComponent, selector: "ui-alert-dialog-header", inputs: ["class"] }, { kind: "component", type: AlertDialogTitleComponent, selector: "ui-alert-dialog-title", inputs: ["class"] }, { kind: "component", type: AlertDialogDescriptionComponent, selector: "ui-alert-dialog-description", inputs: ["class"] }, { kind: "component", type: AlertDialogFooterComponent, selector: "ui-alert-dialog-footer", inputs: ["class"] }, { kind: "component", type: AlertDialogActionComponent, selector: "ui-alert-dialog-action", inputs: ["class"] }, { kind: "component", type: AlertDialogCancelComponent, selector: "ui-alert-dialog-cancel", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2686
2767
  }
2687
2768
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogContentComponent, decorators: [{
2688
2769
  type: Component,
2689
- args: [{
2690
- selector: 'ui-alert-dialog-content',
2691
- changeDetection: ChangeDetectionStrategy.OnPush,
2692
- imports: [
2770
+ args: [{ selector: 'ui-alert-dialog-content', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
2693
2771
  AlertDialogHeaderComponent,
2694
2772
  AlertDialogTitleComponent,
2695
2773
  AlertDialogDescriptionComponent,
2696
2774
  AlertDialogFooterComponent,
2697
2775
  AlertDialogActionComponent,
2698
2776
  AlertDialogCancelComponent,
2699
- ],
2700
- template: `
2777
+ ], template: `
2701
2778
  @if (alertDialog?.open()) {
2702
2779
  <div
2703
2780
  class="fixed inset-0 z-50 flex items-center justify-center"
@@ -2734,9 +2811,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
2734
2811
  </div>
2735
2812
  </div>
2736
2813
  }
2737
- `,
2738
- host: { class: 'contents' },
2739
- }]
2814
+ `, host: { class: 'contents' }, styles: [":host{--_d: var(--density-alert-dialog, var(--density, 1))}@layer components{[data-slot=alert-dialog-content]{gap:calc(.75rem * var(--_d));padding:calc(1rem * var(--_d))}@media(min-width:640px){[data-slot=alert-dialog-content]{gap:calc(1rem * var(--_d));padding:calc(1.5rem * var(--_d))}}}\n"] }]
2740
2815
  }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], actionText: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionText", required: false }] }], cancelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelText", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }], cancelClick: [{ type: i0.Output, args: ["cancelClick"] }], ownTitle: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AlertDialogTitleComponent), { isSignal: true }] }], projectedTitle: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AlertDialogTitleComponent), { isSignal: true }] }] } });
2741
2816
 
2742
2817
  class ConfirmDialogComponent {
@@ -4692,6 +4767,8 @@ class SelectComponent {
4692
4767
  }
4693
4768
  break;
4694
4769
  case 'Tab':
4770
+ // Same contract as the projected panel: focus the trigger, close, let the Tab walk on from it.
4771
+ this.restoreFocusFromPanel();
4695
4772
  this.close();
4696
4773
  break;
4697
4774
  }
@@ -4947,7 +5024,7 @@ class SelectTriggerComponent {
4947
5024
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SelectTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4948
5025
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SelectTriggerComponent, isStandalone: true, selector: "ui-select-trigger", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
4949
5026
  @if (skeleton()) {
4950
- <ui-skeleton class="h-9 w-full rounded-md" />
5027
+ <ui-skeleton class="h-9 w-full min-w-32 rounded-md" />
4951
5028
  } @else {
4952
5029
  <button
4953
5030
  type="button"
@@ -4978,13 +5055,13 @@ class SelectTriggerComponent {
4978
5055
  }
4979
5056
  </button>
4980
5057
  }
4981
- `, isInline: true, styles: [":host{--_d: var(--density-select, var(--density, 1))}@layer components{[data-slot=select-trigger]{height:calc(var(--ui-select-trigger-h, 2.25rem) * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d));gap:calc(.5rem * var(--_d))}}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5058
+ `, isInline: true, styles: [":host{--_d: var(--density-select, var(--density, 1))}@layer components{[data-slot=select-trigger]{height:calc(var(--ui-select-trigger-h, 2.25rem) * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d));gap:calc(.5rem * var(--_d))}}\n"], dependencies: [{ kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant", "label"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4982
5059
  }
4983
5060
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SelectTriggerComponent, decorators: [{
4984
5061
  type: Component,
4985
5062
  args: [{ selector: 'ui-select-trigger', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SpinnerComponent, SkeletonComponent], template: `
4986
5063
  @if (skeleton()) {
4987
- <ui-skeleton class="h-9 w-full rounded-md" />
5064
+ <ui-skeleton class="h-9 w-full min-w-32 rounded-md" />
4988
5065
  } @else {
4989
5066
  <button
4990
5067
  type="button"
@@ -5215,11 +5292,19 @@ class SelectContentComponent {
5215
5292
  /**
5216
5293
  * Roving-focus key handler over the projected `<ui-select-item>` elements:
5217
5294
  * arrows move focus and wrap around the ends, Enter/Space click the focused
5218
- * item. Items marked `data-disabled` are excluded from the ring.
5295
+ * item, Tab closes and returns focus to the trigger. Items marked `data-disabled` are excluded from the ring.
5219
5296
  */
5220
5297
  onKeydown(event) {
5221
5298
  if (!this.contentEl?.nativeElement)
5222
5299
  return;
5300
+ if (event.key === 'Tab') {
5301
+ // The panel unmounts on close, so the Tab must not start from an item about to
5302
+ // disappear. Focus goes to the trigger first and the default Tab then walks on from it:
5303
+ // one press leaves the select, and nothing is committed (only Enter/Space select, as in data-driven mode).
5304
+ this.select?.getTriggerElement()?.focus();
5305
+ this.select?.close();
5306
+ return;
5307
+ }
5223
5308
  const items = Array.from(this.contentEl.nativeElement.querySelectorAll('[data-slot="select-item"]:not([data-disabled])'));
5224
5309
  if (!items.length)
5225
5310
  return;
@@ -5387,7 +5472,7 @@ class SelectLabelComponent {
5387
5472
  constructor() {
5388
5473
  /** Extra classes merged onto the element this component renders, after its built-in styling. */
5389
5474
  this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
5390
- this.classes = computed(() => cn('text-muted-foreground px-2 py-1.5 text-xs', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5475
+ this.classes = computed(() => cn('block text-muted-foreground px-2 py-1.5 text-xs', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5391
5476
  }
5392
5477
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SelectLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5393
5478
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: SelectLabelComponent, isStandalone: true, selector: "ui-select-label", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"select-label\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -5409,7 +5494,7 @@ class SelectSeparatorComponent {
5409
5494
  constructor() {
5410
5495
  /** Extra classes merged onto the element this component renders, after its built-in styling. */
5411
5496
  this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
5412
- this.classes = computed(() => cn('bg-border pointer-events-none -mx-1 my-1 h-px', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5497
+ this.classes = computed(() => cn('block bg-border pointer-events-none -mx-1 my-1 h-px', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5413
5498
  }
5414
5499
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SelectSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5415
5500
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: SelectSeparatorComponent, isStandalone: true, selector: "ui-select-separator", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"select-separator\"" } }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -5540,8 +5625,8 @@ class PaginationComponent {
5540
5625
  this.t = this.i18n.t;
5541
5626
  this.dir = this.i18n.dir;
5542
5627
  this.classes = computed(() => cn('mx-auto flex w-full justify-center', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5543
- this.navButtonClasses = computed(() => cn('inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 cursor-pointer', 'hover:bg-accent hover:text-accent-foreground transition-colors', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50'), ...(ngDevMode ? [{ debugName: "navButtonClasses" }] : /* istanbul ignore next */ []));
5544
- this.pageLinkClasses = (isActive) => cn('inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors cursor-pointer h-9 w-9', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', isActive
5628
+ this.navButtonClasses = computed(() => cn('inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer', 'hover:bg-accent hover:text-accent-foreground transition-colors', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50'), ...(ngDevMode ? [{ debugName: "navButtonClasses" }] : /* istanbul ignore next */ []));
5629
+ this.pageLinkClasses = (isActive) => cn('inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors cursor-pointer', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', isActive
5545
5630
  ? 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground'
5546
5631
  : 'hover:bg-accent hover:text-accent-foreground');
5547
5632
  /**
@@ -5653,15 +5738,11 @@ class PaginationComponent {
5653
5738
  <ng-content />
5654
5739
  }
5655
5740
  </nav>
5656
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5741
+ `, isInline: true, styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=pagination-previous],[data-slot=pagination-next]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d));padding-block:calc(.5rem * var(--_d))}[data-slot=pagination-link]{height:calc(2.25rem * var(--_d));width:calc(2.25rem * var(--_d))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5657
5742
  }
5658
5743
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PaginationComponent, decorators: [{
5659
5744
  type: Component,
5660
- args: [{
5661
- selector: 'ui-pagination',
5662
- providers: [provideComponentLocale(() => PaginationComponent)],
5663
- changeDetection: ChangeDetectionStrategy.OnPush,
5664
- template: `
5745
+ args: [{ selector: 'ui-pagination', providers: [provideComponentLocale(() => PaginationComponent)], changeDetection: ChangeDetectionStrategy.OnPush, template: `
5665
5746
  <nav
5666
5747
  role="navigation"
5667
5748
  [attr.aria-label]="t().pagination"
@@ -5731,9 +5812,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
5731
5812
  <ng-content />
5732
5813
  }
5733
5814
  </nav>
5734
- `,
5735
- host: { class: 'contents' },
5736
- }]
5815
+ `, host: { class: 'contents' }, styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=pagination-previous],[data-slot=pagination-next]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d));padding-block:calc(.5rem * var(--_d))}[data-slot=pagination-link]{height:calc(2.25rem * var(--_d));width:calc(2.25rem * var(--_d))}}\n"] }]
5737
5816
  }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }], totalPages: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalPages", required: false }] }], siblingCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "siblingCount", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }] } });
5738
5817
 
5739
5818
  class PaginationContentComponent {
@@ -5841,7 +5920,7 @@ class PaginationPreviousComponent {
5841
5920
  /** Locale dictionary or registry key. Falls back to `UI_LOCALE_ID` when not set. */
5842
5921
  this.locale = input(...(ngDevMode ? [undefined, { debugName: "locale" }] : /* istanbul ignore next */ []));
5843
5922
  this.t = createLocaleSelector(this.locale, PAGINATION_LOCALES);
5844
- this.classes = computed(() => cn('inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 cursor-pointer', 'hover:bg-accent hover:text-accent-foreground transition-colors', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5923
+ this.classes = computed(() => cn('inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer', 'hover:bg-accent hover:text-accent-foreground transition-colors', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5845
5924
  }
5846
5925
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PaginationPreviousComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5847
5926
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: PaginationPreviousComponent, isStandalone: true, selector: "ui-pagination-previous", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
@@ -5851,23 +5930,18 @@ class PaginationPreviousComponent {
5851
5930
  </svg>
5852
5931
  <span>{{ t().previous }}</span>
5853
5932
  </button>
5854
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5933
+ `, isInline: true, styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=pagination-previous]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d));padding-block:calc(.5rem * var(--_d))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5855
5934
  }
5856
5935
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PaginationPreviousComponent, decorators: [{
5857
5936
  type: Component,
5858
- args: [{
5859
- selector: 'ui-pagination-previous',
5860
- changeDetection: ChangeDetectionStrategy.OnPush,
5861
- template: `
5937
+ args: [{ selector: 'ui-pagination-previous', changeDetection: ChangeDetectionStrategy.OnPush, template: `
5862
5938
  <button type="button" [class]="classes()" [attr.data-slot]="'pagination-previous'" [disabled]="disabled()">
5863
5939
  <svg class="h-4 w-4 rtl:rotate-180" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
5864
5940
  <path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" />
5865
5941
  </svg>
5866
5942
  <span>{{ t().previous }}</span>
5867
5943
  </button>
5868
- `,
5869
- host: { class: 'contents' },
5870
- }]
5944
+ `, host: { class: 'contents' }, styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=pagination-previous]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d));padding-block:calc(.5rem * var(--_d))}}\n"] }]
5871
5945
  }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }] } });
5872
5946
 
5873
5947
  class PaginationNextComponent {
@@ -5879,7 +5953,7 @@ class PaginationNextComponent {
5879
5953
  /** Locale dictionary or registry key. Falls back to `UI_LOCALE_ID` when not set. */
5880
5954
  this.locale = input(...(ngDevMode ? [undefined, { debugName: "locale" }] : /* istanbul ignore next */ []));
5881
5955
  this.t = createLocaleSelector(this.locale, PAGINATION_LOCALES);
5882
- this.classes = computed(() => cn('inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium h-9 px-4 py-2 cursor-pointer', 'hover:bg-accent hover:text-accent-foreground transition-colors', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5956
+ this.classes = computed(() => cn('inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer', 'hover:bg-accent hover:text-accent-foreground transition-colors', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5883
5957
  }
5884
5958
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PaginationNextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5885
5959
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: PaginationNextComponent, isStandalone: true, selector: "ui-pagination-next", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
@@ -5889,23 +5963,18 @@ class PaginationNextComponent {
5889
5963
  <path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" />
5890
5964
  </svg>
5891
5965
  </button>
5892
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5966
+ `, isInline: true, styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=pagination-next]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d));padding-block:calc(.5rem * var(--_d))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5893
5967
  }
5894
5968
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PaginationNextComponent, decorators: [{
5895
5969
  type: Component,
5896
- args: [{
5897
- selector: 'ui-pagination-next',
5898
- changeDetection: ChangeDetectionStrategy.OnPush,
5899
- template: `
5970
+ args: [{ selector: 'ui-pagination-next', changeDetection: ChangeDetectionStrategy.OnPush, template: `
5900
5971
  <button type="button" [class]="classes()" [attr.data-slot]="'pagination-next'" [disabled]="disabled()">
5901
5972
  <span>{{ t().next }}</span>
5902
5973
  <svg class="h-4 w-4 rtl:rotate-180" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
5903
5974
  <path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" />
5904
5975
  </svg>
5905
5976
  </button>
5906
- `,
5907
- host: { class: 'contents' },
5908
- }]
5977
+ `, host: { class: 'contents' }, styles: [":host{--_d: var(--density-button, var(--density, 1))}@layer components{[data-slot=pagination-next]{height:calc(2.25rem * var(--_d));padding-inline:calc(1rem * var(--_d));padding-block:calc(.5rem * var(--_d))}}\n"] }]
5909
5978
  }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }] } });
5910
5979
 
5911
5980
  class PaginationEllipsisComponent {
@@ -6881,6 +6950,18 @@ const inputVariants = cva('border-input aria-invalid:ring-destructive/20 dark:ar
6881
6950
  variant: 'outline',
6882
6951
  },
6883
6952
  });
6953
+ const containerVariants = cva('relative flex w-full items-center bg-transparent transition-[color,border-color,box-shadow]', {
6954
+ variants: {
6955
+ variant: {
6956
+ outline: 'rounded-lg border border-input shadow-xs dark:bg-input/30 has-[input:focus-visible]:border-ring has-[input:focus-visible]:ring-[3px] has-[input:focus-visible]:ring-ring/50',
6957
+ underline: 'rounded-none border-b border-input has-[input:focus-visible]:border-ring',
6958
+ ghost: '',
6959
+ },
6960
+ },
6961
+ defaultVariants: {
6962
+ variant: 'outline',
6963
+ },
6964
+ });
6884
6965
  let nextInputId = 0;
6885
6966
  class InputComponent {
6886
6967
  constructor() {
@@ -7003,8 +7084,29 @@ class InputComponent {
7003
7084
  this.isFloating = computed(() => this.floating() && !!this.label(), ...(ngDevMode ? [{ debugName: "isFloating" }] : /* istanbul ignore next */ []));
7004
7085
  this.labelIsActive = computed(() => this.isFocused() || !!this.value(), ...(ngDevMode ? [{ debugName: "labelIsActive" }] : /* istanbul ignore next */ []));
7005
7086
  this.classes = computed(() => cn(inputVariants({ variant: this.effectiveVariant() }), this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
7006
- this.containerClasses = computed(() => cn('relative flex w-full items-center rounded-lg border border-input shadow-xs', 'transition-[color,box-shadow]', 'has-[input:focus-visible]:border-ring has-[input:focus-visible]:ring-[3px] has-[input:focus-visible]:ring-ring/50', 'dark:bg-input/30 bg-transparent', this.isDisabled() && 'opacity-50 pointer-events-none cursor-not-allowed', this.class()), ...(ngDevMode ? [{ debugName: "containerClasses" }] : /* istanbul ignore next */ []));
7007
- this.innerClasses = computed(() => cn(inputVariants({ variant: 'ghost' }), 'flex-1 h-full'), ...(ngDevMode ? [{ debugName: "innerClasses" }] : /* istanbul ignore next */ []));
7087
+ /**
7088
+ * The container's frame follows the same effective variant as a plain input, so
7089
+ * inside a group (variant `ghost`) it draws nothing and the group owns the one border.
7090
+ */
7091
+ this.containerClasses = computed(() => cn(containerVariants({ variant: this.effectiveVariant() }), this.isDisabled() && 'opacity-50 pointer-events-none cursor-not-allowed', this.class()), ...(ngDevMode ? [{ debugName: "containerClasses" }] : /* istanbul ignore next */ []));
7092
+ /**
7093
+ * Whether a frame sits on the container's start and end edges: its own outline
7094
+ * frame or, inside a group, the group's, which only an `outline` group draws. Text
7095
+ * and affixes are inset from a frame; with none (a standalone ghost/underline, or a
7096
+ * ghost/underline group) the container stays flush like a plain input.
7097
+ */
7098
+ this.framed = computed(() => {
7099
+ if (this.group !== null)
7100
+ return (this.group.variant() ?? 'outline') === 'outline';
7101
+ return this.effectiveVariant() === 'outline';
7102
+ }, ...(ngDevMode ? [{ debugName: "framed" }] : /* istanbul ignore next */ []));
7103
+ this.innerClasses = computed(() => cn(inputVariants({ variant: 'ghost' }), 'flex-1 h-full',
7104
+ // Ghost is flush (px-0); without a prefix the text would sit on the frame (see `framed`). `\_` keeps Tailwind from reading `_` as a space, and String.raw keeps the single backslash its class scanner needs in source.
7105
+ !this.prefix() && this.framed() && String.raw `ps-[calc(0.75rem*var(--\_d))]`), ...(ngDevMode ? [{ debugName: "innerClasses" }] : /* istanbul ignore next */ []));
7106
+ this.prefixClasses = computed(() => cn('text-muted-foreground flex shrink-0 items-center pe-1 text-sm select-none', this.framed() && 'ps-3'), ...(ngDevMode ? [{ debugName: "prefixClasses" }] : /* istanbul ignore next */ []));
7107
+ this.suffixClasses = computed(() => cn('text-muted-foreground flex shrink-0 items-center ps-1 text-sm select-none', this.framed() && 'pe-3'), ...(ngDevMode ? [{ debugName: "suffixClasses" }] : /* istanbul ignore next */ []));
7108
+ this.clearButtonClasses = computed(() => cn('flex shrink-0 items-center justify-center text-muted-foreground hover:text-foreground', this.framed() && 'pe-2'), ...(ngDevMode ? [{ debugName: "clearButtonClasses" }] : /* istanbul ignore next */ []));
7109
+ this.spinnerClasses = computed(() => cn('flex shrink-0 items-center pointer-events-none', this.framed() && 'pe-2'), ...(ngDevMode ? [{ debugName: "spinnerClasses" }] : /* istanbul ignore next */ []));
7008
7110
  this.floatingLabelClasses = computed(() => cn('pointer-events-none absolute select-none text-muted-foreground transition-all duration-150',
7009
7111
  // Resting = uniform placeholder; on float it transforms to the (optionally
7010
7112
  // dev-customized via labelClass) heading font.
@@ -7066,7 +7168,7 @@ class InputComponent {
7066
7168
  useExisting: forwardRef(() => InputComponent),
7067
7169
  multi: true,
7068
7170
  },
7069
- ], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (skeleton()) {\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n} @else if (isFloating()) {\n <div class=\"relative\" [attr.data-slot]=\"'input-floating'\" [attr.data-variant]=\"effectiveVariant()\">\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"labelIsActive() ? placeholder() : ''\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n <label [for]=\"resolvedId()\" [class]=\"floatingLabelClasses()\" [attr.data-active]=\"labelIsActive() ? '' : null\">{{ label() }}</label>\n </div>\n} @else if (needsContainer()) {\n <div [class]=\"containerClasses()\" [attr.data-slot]=\"'input-container'\">\n @if (prefix()) {\n <span class=\"text-muted-foreground flex shrink-0 items-center ps-3 pe-1 text-sm select-none\">{{ prefix() }}</span>\n }\n <input\n [class]=\"innerClasses()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n @if (clearable() && value()) {\n <button\n type=\"button\"\n (click)=\"clearValue()\"\n tabindex=\"-1\"\n class=\"flex shrink-0 items-center justify-center pe-2 text-muted-foreground hover:text-foreground\"\n aria-label=\"Clear\"\n >\n <ui-icon name=\"x\" class=\"size-3.5\" />\n </button>\n }\n @if (loading()) {\n <div class=\"flex shrink-0 items-center pe-2 pointer-events-none\">\n <ui-spinner size=\"xs\" />\n </div>\n }\n @if (suffix() && !loading()) {\n <span class=\"text-muted-foreground flex shrink-0 items-center ps-1 pe-3 text-sm select-none\">{{ suffix() }}</span>\n }\n </div>\n} @else {\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n}\n", styles: [":host{--_d: var(--density-input, var(--density, 1))}@layer components{[data-slot=input]{height:calc(2.25rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.25rem * var(--_d))}[data-slot=input-container]{height:calc(2.25rem * var(--_d))}[data-slot=input-floating]{padding-top:calc(1.5rem * var(--_d))}[data-slot=input-floating]>label{inset-inline-start:calc(.75rem * var(--_d));top:calc(2.625rem * var(--_d));transform:translateY(-50%)}[data-slot=input-floating][data-variant=underline]>label,[data-slot=input-floating][data-variant=ghost]>label{inset-inline-start:0}[data-slot=input-floating]>label[data-active]{inset-inline-start:0;top:calc(1.125rem * var(--_d));transform:translateY(-100%)}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7171
+ ], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (skeleton()) {\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n} @else if (isFloating()) {\n <div class=\"relative\" [attr.data-slot]=\"'input-floating'\" [attr.data-variant]=\"effectiveVariant()\">\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"labelIsActive() ? placeholder() : ''\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n <label [for]=\"resolvedId()\" [class]=\"floatingLabelClasses()\" [attr.data-active]=\"labelIsActive() ? '' : null\">{{ label() }}</label>\n </div>\n} @else if (needsContainer()) {\n <div [class]=\"containerClasses()\" [attr.data-slot]=\"'input-container'\">\n @if (prefix()) {\n <span [class]=\"prefixClasses()\">{{ prefix() }}</span>\n }\n <input\n [class]=\"innerClasses()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n @if (clearable() && value()) {\n <button\n type=\"button\"\n (click)=\"clearValue()\"\n tabindex=\"-1\"\n [class]=\"clearButtonClasses()\"\n aria-label=\"Clear\"\n >\n <ui-icon name=\"x\" class=\"size-3.5\" />\n </button>\n }\n @if (loading()) {\n <div [class]=\"spinnerClasses()\">\n <ui-spinner size=\"xs\" />\n </div>\n }\n @if (suffix() && !loading()) {\n <span [class]=\"suffixClasses()\">{{ suffix() }}</span>\n }\n </div>\n} @else {\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n}\n", styles: [":host{--_d: var(--density-input, var(--density, 1))}@layer components{[data-slot=input]{height:calc(2.25rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.25rem * var(--_d))}[data-slot=input-container]{height:calc(2.25rem * var(--_d))}[data-slot=input-floating]{padding-top:calc(1.5rem * var(--_d))}[data-slot=input-floating]>label{inset-inline-start:calc(.75rem * var(--_d));top:calc(2.625rem * var(--_d));transform:translateY(-50%)}[data-slot=input-floating][data-variant=underline]>label,[data-slot=input-floating][data-variant=ghost]>label{inset-inline-start:0}[data-slot=input-floating]>label[data-active]{inset-inline-start:0;top:calc(1.125rem * var(--_d));transform:translateY(-100%)}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["class", "size", "customSize", "variant", "label"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7070
7172
  }
7071
7173
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: InputComponent, decorators: [{
7072
7174
  type: Component,
@@ -7079,7 +7181,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
7079
7181
  ], host: {
7080
7182
  '[class]': '"contents"',
7081
7183
  '[attr.id]': 'null',
7082
- }, template: "@if (skeleton()) {\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n} @else if (isFloating()) {\n <div class=\"relative\" [attr.data-slot]=\"'input-floating'\" [attr.data-variant]=\"effectiveVariant()\">\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"labelIsActive() ? placeholder() : ''\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n <label [for]=\"resolvedId()\" [class]=\"floatingLabelClasses()\" [attr.data-active]=\"labelIsActive() ? '' : null\">{{ label() }}</label>\n </div>\n} @else if (needsContainer()) {\n <div [class]=\"containerClasses()\" [attr.data-slot]=\"'input-container'\">\n @if (prefix()) {\n <span class=\"text-muted-foreground flex shrink-0 items-center ps-3 pe-1 text-sm select-none\">{{ prefix() }}</span>\n }\n <input\n [class]=\"innerClasses()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n @if (clearable() && value()) {\n <button\n type=\"button\"\n (click)=\"clearValue()\"\n tabindex=\"-1\"\n class=\"flex shrink-0 items-center justify-center pe-2 text-muted-foreground hover:text-foreground\"\n aria-label=\"Clear\"\n >\n <ui-icon name=\"x\" class=\"size-3.5\" />\n </button>\n }\n @if (loading()) {\n <div class=\"flex shrink-0 items-center pe-2 pointer-events-none\">\n <ui-spinner size=\"xs\" />\n </div>\n }\n @if (suffix() && !loading()) {\n <span class=\"text-muted-foreground flex shrink-0 items-center ps-1 pe-3 text-sm select-none\">{{ suffix() }}</span>\n }\n </div>\n} @else {\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n}\n", styles: [":host{--_d: var(--density-input, var(--density, 1))}@layer components{[data-slot=input]{height:calc(2.25rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.25rem * var(--_d))}[data-slot=input-container]{height:calc(2.25rem * var(--_d))}[data-slot=input-floating]{padding-top:calc(1.5rem * var(--_d))}[data-slot=input-floating]>label{inset-inline-start:calc(.75rem * var(--_d));top:calc(2.625rem * var(--_d));transform:translateY(-50%)}[data-slot=input-floating][data-variant=underline]>label,[data-slot=input-floating][data-variant=ghost]>label{inset-inline-start:0}[data-slot=input-floating]>label[data-active]{inset-inline-start:0;top:calc(1.125rem * var(--_d));transform:translateY(-100%)}}\n"] }]
7184
+ }, template: "@if (skeleton()) {\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n} @else if (isFloating()) {\n <div class=\"relative\" [attr.data-slot]=\"'input-floating'\" [attr.data-variant]=\"effectiveVariant()\">\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"labelIsActive() ? placeholder() : ''\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n <label [for]=\"resolvedId()\" [class]=\"floatingLabelClasses()\" [attr.data-active]=\"labelIsActive() ? '' : null\">{{ label() }}</label>\n </div>\n} @else if (needsContainer()) {\n <div [class]=\"containerClasses()\" [attr.data-slot]=\"'input-container'\">\n @if (prefix()) {\n <span [class]=\"prefixClasses()\">{{ prefix() }}</span>\n }\n <input\n [class]=\"innerClasses()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n @if (clearable() && value()) {\n <button\n type=\"button\"\n (click)=\"clearValue()\"\n tabindex=\"-1\"\n [class]=\"clearButtonClasses()\"\n aria-label=\"Clear\"\n >\n <ui-icon name=\"x\" class=\"size-3.5\" />\n </button>\n }\n @if (loading()) {\n <div [class]=\"spinnerClasses()\">\n <ui-spinner size=\"xs\" />\n </div>\n }\n @if (suffix() && !loading()) {\n <span [class]=\"suffixClasses()\">{{ suffix() }}</span>\n }\n </div>\n} @else {\n <input\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"placeholder()\"\n [attr.id]=\"resolvedId()\"\n [attr.name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.inputmode]=\"inputMode()\"\n [attr.lang]=\"lang()\"\n [attr.data-slot]=\"'input'\"\n #inputRef\n [ngModel]=\"value()\"\n (ngModelChange)=\"onValueChange($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n}\n", styles: [":host{--_d: var(--density-input, var(--density, 1))}@layer components{[data-slot=input]{height:calc(2.25rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.25rem * var(--_d))}[data-slot=input-container]{height:calc(2.25rem * var(--_d))}[data-slot=input-floating]{padding-top:calc(1.5rem * var(--_d))}[data-slot=input-floating]>label{inset-inline-start:calc(.75rem * var(--_d));top:calc(2.625rem * var(--_d));transform:translateY(-50%)}[data-slot=input-floating][data-variant=underline]>label,[data-slot=input-floating][data-variant=ghost]>label{inset-inline-start:0}[data-slot=input-floating]>label[data-active]{inset-inline-start:0;top:calc(1.125rem * var(--_d));transform:translateY(-100%)}}\n"] }]
7083
7185
  }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], elementId: [{ type: i0.Input, args: [{ isSignal: true, alias: "elementId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedby", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], skeleton: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeleton", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], floating: [{ type: i0.Input, args: [{ isSignal: true, alias: "floating", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelClass", required: false }] }], inputMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputMode", required: false }] }], lang: [{ type: i0.Input, args: [{ isSignal: true, alias: "lang", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], inputRef: [{ type: i0.ViewChild, args: ['inputRef', { isSignal: true }] }] } });
7084
7186
 
7085
7187
  class CheckboxComponent {
@@ -8598,6 +8700,7 @@ class PopoverContentComponent {
8598
8700
  this.popover = inject(POPOVER, { optional: true });
8599
8701
  this.document = inject(DOCUMENT);
8600
8702
  this.hostEl = inject(ElementRef);
8703
+ this.cdr = inject(ChangeDetectorRef);
8601
8704
  /** Extra classes merged onto the panel. Keep a width constraint viewport-aware (`max-w-[calc(100vw-2rem)]`), since the panel is positioned, not laid out by its parent. */
8602
8705
  this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
8603
8706
  /** Alignment along the chosen {@link side}'s edge: `'start'`, `'center'` or `'end'`. May be flipped at runtime when {@link avoidCollisions} is on. */
@@ -8638,15 +8741,24 @@ class PopoverContentComponent {
8638
8741
  */
8639
8742
  this.triggerRectSig = signal(null, ...(ngDevMode ? [{ debugName: "triggerRectSig" }] : /* istanbul ignore next */ []));
8640
8743
  this.adjustedPosition = signal({ side: 'bottom', align: 'center', offsetX: 0, offsetY: 0 }, ...(ngDevMode ? [{ debugName: "adjustedPosition" }] : /* istanbul ignore next */ []));
8744
+ /**
8745
+ * Width of the trigger, exposed to the content as `--trigger-width` so a
8746
+ * panel can match it (`class="w-(--trigger-width)"`). Re-read on every
8747
+ * open, as the trigger can resize between opens.
8748
+ */
8749
+ this.triggerWidth = computed(() => {
8750
+ if (!this.popover?.open())
8751
+ return null;
8752
+ const rect = this.triggerRectSig() ?? this.popover.getTriggerRect();
8753
+ return rect ? `${rect.width}px` : null;
8754
+ }, ...(ngDevMode ? [{ debugName: "triggerWidth" }] : /* istanbul ignore next */ []));
8641
8755
  this.positionStyles = computed(() => {
8642
8756
  const pos = this.adjustedPosition();
8643
8757
  if (this.strategy() === 'fixed') {
8644
8758
  return this.computeFixedStyles(pos);
8645
8759
  }
8646
- if (pos.offsetX !== 0) {
8647
- return `transform: translateX(${pos.offsetX}px);`;
8648
- }
8649
- return '';
8760
+ const offset = `--popover-offset:${this.sideOffset()}px;`;
8761
+ return pos.offsetX === 0 ? offset : `${offset}transform: translateX(${pos.offsetX}px);`;
8650
8762
  }, ...(ngDevMode ? [{ debugName: "positionStyles" }] : /* istanbul ignore next */ []));
8651
8763
  this.classes = computed(() => {
8652
8764
  const pos = this.adjustedPosition();
@@ -8658,10 +8770,10 @@ class PopoverContentComponent {
8658
8770
  end: 'right-0',
8659
8771
  };
8660
8772
  const sideClasses = {
8661
- top: 'bottom-full mb-1',
8662
- bottom: 'top-full mt-1',
8663
- left: 'right-full me-1 top-0',
8664
- right: 'left-full ms-1 top-0',
8773
+ top: 'bottom-full mb-[var(--popover-offset,4px)]',
8774
+ bottom: 'top-full mt-[var(--popover-offset,4px)]',
8775
+ left: 'right-full me-[var(--popover-offset,4px)] top-0',
8776
+ right: 'left-full ms-[var(--popover-offset,4px)] top-0',
8665
8777
  };
8666
8778
  const isFixed = this.strategy() === 'fixed';
8667
8779
  return cn(isFixed ? 'z-50 w-72 max-w-[calc(100vw-16px)] rounded-md border bg-popover text-popover-foreground shadow-md outline-none' :
@@ -8862,21 +8974,48 @@ class PopoverContentComponent {
8862
8974
  }
8863
8975
  this.adjustCollisionPosition(this.contentEl.nativeElement);
8864
8976
  }
8977
+ /**
8978
+ * Invariant: with `avoidCollisions` on, a fixed top/bottom panel never sits over its trigger
8979
+ * when the opposite side has more room. The absolute strategy flips through
8980
+ * `adjustCollisionPosition`; here the clamp below would otherwise pin an overflowing panel to
8981
+ * the viewport edge on top of the trigger. Flips when the opposite side fits the panel, or —
8982
+ * when neither fits — when it is simply the roomier one; the clamp then trims what is left.
8983
+ * Returns whether the side changed (the styles are re-rendered, so the caller re-measures).
8984
+ */
8985
+ flipFixedSide(rect, vh) {
8986
+ const side = this.adjustedPosition().side;
8987
+ if (!this.avoidCollisions() || (side !== 'top' && side !== 'bottom'))
8988
+ return false;
8989
+ const overflows = side === 'top' ? rect.top < 0 : rect.bottom > vh;
8990
+ const triggerRect = this.popover?.getTriggerRect();
8991
+ if (!overflows || !triggerRect)
8992
+ return false;
8993
+ const boundary = { top: 0, bottom: vh };
8994
+ const opposite = side === 'top' ? 'bottom' : 'top';
8995
+ const roomThere = this.getAvailableSpace(opposite, triggerRect, boundary);
8996
+ const roomHere = this.getAvailableSpace(side, triggerRect, boundary);
8997
+ if (roomThere < rect.height + this.sideOffset() && roomThere <= roomHere)
8998
+ return false;
8999
+ this.adjustedPosition.update(pos => ({ ...pos, side: opposite }));
9000
+ this.cdr.detectChanges();
9001
+ return true;
9002
+ }
8865
9003
  adjustFixedPosition(el) {
8866
- const rect = el.getBoundingClientRect();
9004
+ let rect = el.getBoundingClientRect();
8867
9005
  const vw = globalThis.window.innerWidth;
8868
9006
  const vh = globalThis.window.innerHeight;
9007
+ if (this.flipFixedSide(rect, vh))
9008
+ rect = el.getBoundingClientRect();
8869
9009
  const needsHorizontalFix = rect.right > vw || rect.left < 0;
8870
9010
  const needsVerticalFix = rect.bottom > vh || rect.top < 0;
8871
- if (needsHorizontalFix) {
8872
- const clampedLeft = Math.max(8, Math.min(rect.left, vw - rect.width - 8));
8873
- el.style.left = `${clampedLeft}px`;
8874
- el.style.transform = 'none';
8875
- }
8876
- if (needsVerticalFix) {
8877
- const clampedTop = Math.max(8, Math.min(rect.top, vh - rect.height - 8));
8878
- el.style.top = `${clampedTop}px`;
8879
- }
9011
+ if (!needsHorizontalFix && !needsVerticalFix)
9012
+ return;
9013
+ // The measured rect already includes the placement transform (translateX/Y(-50%|-100%)),
9014
+ // so pin both axes from it and drop the transform; fixing one axis alone would leave the
9015
+ // other shifted by the transform that is being removed.
9016
+ el.style.left = `${Math.max(8, Math.min(rect.left, vw - rect.width - 8))}px`;
9017
+ el.style.top = `${Math.max(8, Math.min(rect.top, vh - rect.height - 8))}px`;
9018
+ el.style.transform = 'none';
8880
9019
  }
8881
9020
  adjustCollisionPosition(content) {
8882
9021
  const contentRect = content.getBoundingClientRect();
@@ -8935,21 +9074,37 @@ class PopoverContentComponent {
8935
9074
  return '';
8936
9075
  const currentSide = this.avoidCollisions() ? pos.side : this.side();
8937
9076
  const currentAlign = this.avoidCollisions() ? pos.align : this.align();
8938
- const top = currentSide === 'bottom' ? triggerRect.bottom + 4 : triggerRect.top - 4;
8939
- let left = this.computeFixedLeft(currentAlign, triggerRect);
8940
- left = Math.max(8, Math.min(left, globalThis.window.innerWidth - 8));
9077
+ const { top, left, transform } = this.computeFixedAnchor(currentSide, currentAlign, triggerRect);
9078
+ const clampedLeft = Math.max(8, Math.min(left, globalThis.window.innerWidth - 8));
8941
9079
  const clampedTop = Math.max(8, Math.min(top, globalThis.window.innerHeight - 8));
8942
9080
  // `inset:auto;margin:0;overflow:visible` neutralize the UA `[popover]`
8943
9081
  // defaults (centered via inset:0 + margin:auto, overflow:auto) so our
8944
9082
  // own fixed coordinates and layout apply when promoted to the top layer.
8945
- let styles = `position:fixed;inset:auto;margin:0;overflow:visible;top:${clampedTop}px;left:${left}px;`;
8946
- if (currentAlign === 'center') {
8947
- styles += 'transform:translateX(-50%);';
8948
- }
8949
- else if (currentAlign === 'end') {
8950
- styles += 'transform:translateX(-100%);';
9083
+ return `position:fixed;inset:auto;margin:0;overflow:visible;top:${clampedTop}px;left:${clampedLeft}px;transform:${transform};`;
9084
+ }
9085
+ /**
9086
+ * The panel's anchor point and the transform that pulls the panel's matching edge onto it.
9087
+ * The transform is what lets the panel sit *before* the anchor (above or left of it) without
9088
+ * knowing its own size: `top` places the panel's bottom edge on the point, `left` its right edge.
9089
+ */
9090
+ computeFixedAnchor(side, align, triggerRect) {
9091
+ const offset = this.sideOffset();
9092
+ const shift = { start: 0, center: -50, end: -100 }[align];
9093
+ if (side === 'top' || side === 'bottom') {
9094
+ const top = side === 'bottom' ? triggerRect.bottom + offset : triggerRect.top - offset;
9095
+ return {
9096
+ top,
9097
+ left: this.computeFixedLeft(align, triggerRect),
9098
+ transform: `translate(${shift}%, ${side === 'top' ? -100 : 0}%)`,
9099
+ };
8951
9100
  }
8952
- return styles;
9101
+ const crossAxis = { start: triggerRect.top, center: triggerRect.top + triggerRect.height / 2, end: triggerRect.bottom }[align];
9102
+ const isLeft = side === 'left';
9103
+ return {
9104
+ top: crossAxis,
9105
+ left: isLeft ? triggerRect.left - offset : triggerRect.right + offset,
9106
+ transform: `translate(${isLeft ? -100 : 0}%, ${shift}%)`,
9107
+ };
8953
9108
  }
8954
9109
  computeFixedLeft(align, triggerRect) {
8955
9110
  if (align === 'start')
@@ -8965,6 +9120,7 @@ class PopoverContentComponent {
8965
9120
  #contentEl
8966
9121
  [class]="classes()"
8967
9122
  [style]="positionStyles()"
9123
+ [style.--trigger-width]="triggerWidth()"
8968
9124
  [style.visibility]="strategy() === 'fixed' && !portalReady() ? 'hidden' : null"
8969
9125
  [attr.data-state]="popover?.open() ? 'open' : 'closed'"
8970
9126
  [attr.data-slot]="'popover-content'"
@@ -8982,6 +9138,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
8982
9138
  #contentEl
8983
9139
  [class]="classes()"
8984
9140
  [style]="positionStyles()"
9141
+ [style.--trigger-width]="triggerWidth()"
8985
9142
  [style.visibility]="strategy() === 'fixed' && !portalReady() ? 'hidden' : null"
8986
9143
  [attr.data-state]="popover?.open() ? 'open' : 'closed'"
8987
9144
  [attr.data-slot]="'popover-content'"
@@ -9593,20 +9750,102 @@ function runAiTask(provider, request) {
9593
9750
  const EMPTY_RECORD = Object.freeze({});
9594
9751
  /** Per-instance counter for unique element ids (e.g. inline edit-error links). */
9595
9752
  let dataTableUid = 0;
9753
+ /** Ids for rows that have no `id` and cannot be serialised (circular, BigInt-holding). Stable per row object. */
9754
+ const identityRowIds = new WeakMap();
9755
+ let identityRowIdSeq = 0;
9756
+ /** A row without an `id` is identified by its content; it must never throw, whatever the row holds. */
9757
+ function contentRowId(row) {
9758
+ try {
9759
+ return JSON.stringify(row, (...[, value]) => (typeof value === "bigint" ? value.toString() : value)) ?? "";
9760
+ }
9761
+ catch {
9762
+ // Circular structure: JSON cannot describe it, so fall back to the row's identity.
9763
+ if (typeof row !== "object" || row === null)
9764
+ return String(row);
9765
+ let id = identityRowIds.get(row);
9766
+ if (id === undefined) {
9767
+ id = `row-identity-${identityRowIdSeq++}`;
9768
+ identityRowIds.set(row, id);
9769
+ }
9770
+ return id;
9771
+ }
9772
+ }
9596
9773
  const DEFAULT_GET_ROW_ID = (row) => {
9597
9774
  const rec = row;
9598
- const id = rec['id'];
9775
+ const id = rec["id"];
9599
9776
  if (id == null)
9600
- return JSON.stringify(row);
9777
+ return contentRowId(row);
9601
9778
  return stringifyValue(id);
9602
9779
  };
9780
+ /** A select option's value that has a string form to match against (data from JSON stores 1 as '1'). */
9781
+ function isScalarOptionValue(value) {
9782
+ return ['string', 'number', 'boolean', 'bigint'].includes(typeof value);
9783
+ }
9784
+ /** Inputs whose keys are not the control's own: a checkbox or button has no arrows, caret or undo (a range and a radio do). */
9785
+ const NON_TEXT_INPUT_TYPES = new Set(['checkbox', 'button', 'submit', 'reset', 'image', 'file', 'color', 'hidden']);
9786
+ /** The columns the grid draws itself (selection, expander, actions), as opposed to data columns. */
9787
+ function isGridColumnKey(key) {
9788
+ return key === '_selection' || key === '_expander' || key === '_actions';
9789
+ }
9790
+ /** Widget roles whose keys (arrows, Home/End, Enter, type-ahead, Escape) belong to the widget. The grid's own roles are not here. */
9791
+ const KEY_OWNING_ROLES = [
9792
+ 'textbox', 'combobox', 'searchbox', 'spinbutton', 'slider', 'listbox', 'option', 'menu', 'menuitem',
9793
+ 'menuitemcheckbox', 'menuitemradio', 'menubar', 'radiogroup', 'radio', 'tablist', 'tab', 'tree', 'treeitem',
9794
+ 'scrollbar', 'dialog', 'application', 'toolbar',
9795
+ ].map((role) => `[role="${role}"]`).join(', ');
9796
+ /**
9797
+ * Whether a key comes from a control that owns its keys: caret movement, the arrows of a slider, radio group, list,
9798
+ * menu or tree, Enter, its own undo and copy, type-ahead, Escape. `path` is the event's composed path, origin
9799
+ * first, so a control inside a shadow root is seen and the role search stops at `boundary`: a grid embedded in a
9800
+ * textbox or combobox of the host page is not itself one.
9801
+ */
9802
+ function ownsItsKeys(path, boundary) {
9803
+ const origin = path[0];
9804
+ if (origin instanceof HTMLTextAreaElement || origin instanceof HTMLSelectElement)
9805
+ return true;
9806
+ if (origin instanceof HTMLInputElement && !NON_TEXT_INPUT_TYPES.has(origin.type))
9807
+ return true;
9808
+ for (const node of path) {
9809
+ if (node === boundary)
9810
+ break;
9811
+ if (!(node instanceof Element))
9812
+ continue;
9813
+ // isContentEditable is inherited from outside the grid too, so the attribute is read on the way up.
9814
+ const editable = node instanceof HTMLElement && (node.contentEditable === 'true' || node.contentEditable === 'plaintext-only');
9815
+ if (editable || node.matches(KEY_OWNING_ROLES))
9816
+ return true;
9817
+ }
9818
+ return false;
9819
+ }
9820
+ /** Mirrors a data row's selection to assistive tech, and clears it when the grid stops being selectable. */
9821
+ function stampRowSelection(row, selectable) {
9822
+ if (!(row instanceof HTMLElement) || row.dataset['rowIndex'] === undefined)
9823
+ return;
9824
+ if (selectable)
9825
+ row.setAttribute('aria-selected', String(row.dataset['state'] === 'selected'));
9826
+ else
9827
+ row.removeAttribute('aria-selected');
9828
+ }
9829
+ /**
9830
+ * Quotes a cell holding a tab, line break or quote the way Excel does, so
9831
+ * parseClipboardGrid reads our own copy back into the same cells.
9832
+ */
9833
+ function toClipboardCell(cell, quotedChars) {
9834
+ const guarded = guardSpreadsheetFormula(cell);
9835
+ return quotedChars.test(guarded) ? `"${guarded.replaceAll('"', '""')}"` : guarded;
9836
+ }
9837
+ // A one-column copy has no tab for parseClipboardGrid to find, so it reads the text as CSV: a comma in a
9838
+ // cell must be quoted there or the paste splits that cell in two.
9839
+ const QUOTED_IN_TSV = /[\t\r\n"]/;
9840
+ const QUOTED_IN_SINGLE_COLUMN = /[\t\r\n",]/;
9603
9841
  /**
9604
9842
  * Serialises a grid as the TSV every copy path writes: one line per row, cells
9605
9843
  * formula-guarded so pasting into a spreadsheet never runs a cell as a formula.
9606
9844
  * The paste path undoes the guard with `restoreSpreadsheetText`.
9607
9845
  */
9608
9846
  function toClipboardText(grid) {
9609
- return grid.map((cells) => cells.map(guardSpreadsheetFormula).join("\t")).join("\n");
9847
+ const quotedChars = grid.every((cells) => cells.length === 1) ? QUOTED_IN_SINGLE_COLUMN : QUOTED_IN_TSV;
9848
+ return grid.map((cells) => cells.map((cell) => toClipboardCell(cell, quotedChars)).join("\t")).join("\n");
9610
9849
  }
9611
9850
  /**
9612
9851
  * Whether two requests describe the same page of data.
@@ -9673,7 +9912,7 @@ function resolveColumnMinWidth(col) {
9673
9912
  if (col.minWidth)
9674
9913
  return col.minWidth;
9675
9914
  const key = col.accessorKey;
9676
- const isSpecial = key === "_selection" || key === "_expander" || key === "_actions";
9915
+ const isSpecial = isGridColumnKey(key);
9677
9916
  return isSpecial ? "0px" : DEFAULT_COLUMN_MIN_WIDTH;
9678
9917
  }
9679
9918
  /** The pixel floor resize and auto-fit clamp to — `minWidth` is read as pixels. */
@@ -9748,9 +9987,7 @@ class DataTableComponent {
9748
9987
  }));
9749
9988
  }
9750
9989
  applyGlobalFilterToData(data, globalFilterValue) {
9751
- const columns = this.enhancedColumns().filter((col) => col.accessorKey !== "_selection" &&
9752
- col.accessorKey !== "_expander" &&
9753
- col.accessorKey !== "_actions");
9990
+ const columns = this.enhancedColumns().filter((col) => !isGridColumnKey(col.accessorKey));
9754
9991
  const globalFilterFn = this.globalFilterFn();
9755
9992
  if (globalFilterFn) {
9756
9993
  return data.filter((row) => globalFilterFn(row, globalFilterValue, columns));
@@ -9758,7 +9995,7 @@ class DataTableComponent {
9758
9995
  const globallyFilterableColumns = columns.filter((col) => col.enableGlobalFilter !== false);
9759
9996
  return data.filter((row) => globallyFilterableColumns.some((col) => {
9760
9997
  const value = this.getCellValue(row, col.accessorKey, col);
9761
- return String(value).toLowerCase().includes(globalFilterValue);
9998
+ return cellText(value).toLowerCase().includes(globalFilterValue);
9762
9999
  }));
9763
10000
  }
9764
10001
  applyColumnFiltersToData(data) {
@@ -9826,7 +10063,7 @@ class DataTableComponent {
9826
10063
  const globallyFilterable = columns.filter((col) => col.enableGlobalFilter !== false);
9827
10064
  return globallyFilterable.some((col) => {
9828
10065
  const value = this.getCellValue(row, col.accessorKey, col);
9829
- return String(value).toLowerCase().includes(globalFilterValue);
10066
+ return cellText(value).toLowerCase().includes(globalFilterValue);
9830
10067
  });
9831
10068
  }
9832
10069
  filteredTree_matchesColumns(row, colFilters, columns) {
@@ -10039,7 +10276,7 @@ class DataTableComponent {
10039
10276
  this.EMPTY_RECORD = EMPTY_RECORD;
10040
10277
  this._document = inject(DOCUMENT);
10041
10278
  this._el = inject(ElementRef);
10042
- this._isRtlResize = false;
10279
+ this._resizeGrowthSign = 1;
10043
10280
  /**
10044
10281
  * The row array. A `model`, and the table *does* write back to it: inline
10045
10282
  * edits committed through a column `valueSetter`, fill-handle, paste and
@@ -10213,6 +10450,12 @@ class DataTableComponent {
10213
10450
  this.editError = output();
10214
10451
  this.editingCell = signal(null, ...(ngDevMode ? [{ debugName: "editingCell" }] : /* istanbul ignore next */ []));
10215
10452
  this.editValue = signal(null, ...(ngDevMode ? [{ debugName: "editValue" }] : /* istanbul ignore next */ []));
10453
+ /**
10454
+ * The text a number input shows: what it started with, then the text of each valid keystroke. The input is bound
10455
+ * to this, not to {@link editValue}: typing "-0" parses to -0, and writing that back would turn the field into
10456
+ * "0" and lose the minus sign. It stays in step with {@link editValue}, so a re-created input shows what commits.
10457
+ */
10458
+ this.editText = signal('', ...(ngDevMode ? [{ debugName: "editText" }] : /* istanbul ignore next */ []));
10216
10459
  this.cellEditError = signal(null, ...(ngDevMode ? [{ debugName: "cellEditError" }] : /* istanbul ignore next */ []));
10217
10460
  /** Stable id for the inline edit-error message, linked via `aria-describedby`. */
10218
10461
  this.cellEditErrorId = `ui-data-table-cell-edit-error-${dataTableUid++}`;
@@ -10814,9 +11057,7 @@ class DataTableComponent {
10814
11057
  return this.data();
10815
11058
  const globalFilterValue = this.globalFilter().toLowerCase();
10816
11059
  const colFilters = this.columnFilters();
10817
- const columns = this.enhancedColumns().filter((col) => col.accessorKey !== "_selection" &&
10818
- col.accessorKey !== "_expander" &&
10819
- col.accessorKey !== "_actions");
11060
+ const columns = this.enhancedColumns().filter((col) => !isGridColumnKey(col.accessorKey));
10820
11061
  const hasGlobalFilter = !!globalFilterValue;
10821
11062
  const hasColumnFilters = Object.keys(colFilters).some((k) => !this.isFilterValueEmpty(colFilters[k]));
10822
11063
  if (!hasGlobalFilter && !hasColumnFilters)
@@ -11033,6 +11274,16 @@ class DataTableComponent {
11033
11274
  }
11034
11275
  return map;
11035
11276
  }, ...(ngDevMode ? [{ debugName: "_sortLookup" }] : /* istanbul ignore next */ []));
11277
+ /** Every column the table was given, hidden ones included, by accessor key (the first wins a duplicate). */
11278
+ this.columnsByKey = computed(() => {
11279
+ const byKey = new Map();
11280
+ for (const col of this.columns()) {
11281
+ const key = String(col.accessorKey);
11282
+ if (!byKey.has(key))
11283
+ byKey.set(key, col);
11284
+ }
11285
+ return byKey;
11286
+ }, ...(ngDevMode ? [{ debugName: "columnsByKey" }] : /* istanbul ignore next */ []));
11036
11287
  this.enhancedColumns = computed(() => {
11037
11288
  const cols = this.columns();
11038
11289
  const widths = this.columnWidths();
@@ -11165,9 +11416,20 @@ class DataTableComponent {
11165
11416
  this.processedData();
11166
11417
  this.enhancedColumns();
11167
11418
  this.virtualTotalRows();
11419
+ this.rowSelection();
11420
+ this.enableRowSelection();
11168
11421
  this.stampGridSemantics();
11169
11422
  });
11170
11423
  // protected, not private: nothing reads this handle; the field only creates the effect in field order.
11424
+ this._focusedCellDomEffect = afterRenderEffect(() => {
11425
+ this.focusedCell();
11426
+ this.virtualRowRange();
11427
+ this.processedData();
11428
+ this.enhancedColumns();
11429
+ this.editingCell();
11430
+ this.syncFocusedCellDom();
11431
+ });
11432
+ // protected, not private: nothing reads this handle; the field only creates the effect in field order.
11171
11433
  this._renderedRowsEffect = effect(() => {
11172
11434
  const rows = this.processedData();
11173
11435
  untracked(() => this.reconcileIndexedState(rows));
@@ -11247,10 +11509,7 @@ class DataTableComponent {
11247
11509
  }
11248
11510
  return map;
11249
11511
  }, ...(ngDevMode ? [{ debugName: "footerValues" }] : /* istanbul ignore next */ []));
11250
- this._baseCellClass = computed(() => ({
11251
- normal: cn("whitespace-nowrap overflow-hidden text-ellipsis", "bg-background", this.showRowBorders() && "border-b", this.showColumnBorders() && "border-r"),
11252
- tree: cn("whitespace-nowrap overflow-hidden text-ellipsis", this.showRowBorders() && "border-b", this.showColumnBorders() && "border-r"),
11253
- }), ...(ngDevMode ? [{ debugName: "_baseCellClass" }] : /* istanbul ignore next */ []));
11512
+ this._baseCellClass = computed(() => cn("whitespace-nowrap overflow-hidden text-ellipsis", this.showRowBorders() && "border-b", this.showColumnBorders() && "border-r"), ...(ngDevMode ? [{ debugName: "_baseCellClass" }] : /* istanbul ignore next */ []));
11254
11513
  // `pointer-coarse:h-auto`: a header cell grows to hold its 44px touch controls
11255
11514
  // instead of clipping them at the fixed desktop header height.
11256
11515
  this._headerClassMap = computed(() => {
@@ -11379,9 +11638,7 @@ class DataTableComponent {
11379
11638
  this._lastTapColumnKey = "";
11380
11639
  this.navigableColumnKeys = computed(() => {
11381
11640
  return this.enhancedColumns()
11382
- .filter((c) => c.accessorKey !== "_selection" &&
11383
- c.accessorKey !== "_expander" &&
11384
- c.accessorKey !== "_actions")
11641
+ .filter((c) => !isGridColumnKey(c.accessorKey))
11385
11642
  .map((c) => String(c.accessorKey));
11386
11643
  }, ...(ngDevMode ? [{ debugName: "navigableColumnKeys" }] : /* istanbul ignore next */ []));
11387
11644
  this.totalVisibleRows = computed(() => {
@@ -11800,8 +12057,7 @@ class DataTableComponent {
11800
12057
  /** ARIA `aria-sort` value for a header cell — `null` for non-sortable columns. */
11801
12058
  getAriaSort(col) {
11802
12059
  const key = String(col.accessorKey);
11803
- const isSpecialColumn = key === "_selection" || key === "_actions" || key === "_expander";
11804
- if (isSpecialColumn || col.enableSorting === false) {
12060
+ if (isGridColumnKey(key) || col.enableSorting === false) {
11805
12061
  return null;
11806
12062
  }
11807
12063
  const direction = this.getSortDirection(col.accessorKey);
@@ -11927,7 +12183,7 @@ class DataTableComponent {
11927
12183
  const hasUserTreeExpander = allCols.some(c => c.treeExpander);
11928
12184
  const targetIdx = hasUserTreeExpander
11929
12185
  ? cols.findIndex(c => c.treeExpander)
11930
- : cols.findIndex(c => c.accessorKey !== '_selection' && c.accessorKey !== '_expander' && c.accessorKey !== '_actions');
12186
+ : cols.findIndex(c => !isGridColumnKey(c.accessorKey));
11931
12187
  if (targetIdx !== -1) {
11932
12188
  cols[targetIdx] = { ...cols[targetIdx], _isTreeExpanderHost: true };
11933
12189
  }
@@ -11986,9 +12242,7 @@ class DataTableComponent {
11986
12242
  hasFloatingFilter(col) {
11987
12243
  if (col.floatingFilter === false)
11988
12244
  return false;
11989
- if (col.accessorKey === '_selection' ||
11990
- col.accessorKey === '_expander' ||
11991
- col.accessorKey === '_actions') {
12245
+ if (isGridColumnKey(col.accessorKey)) {
11992
12246
  return false;
11993
12247
  }
11994
12248
  if (col.floatingFilterComponent)
@@ -12235,12 +12489,19 @@ class DataTableComponent {
12235
12489
  * `aria-colindex` is a gap; a wrong one sends the user to the wrong column.
12236
12490
  */
12237
12491
  const columnsWindowed = this.virtualVisibleMiddleColumns().length < this.scrollableColumns().length;
12492
+ // Selection state is already drawn as data-state on every data-row branch; mirror it for assistive tech.
12493
+ const selectable = this.enableRowSelection();
12494
+ if (selectable)
12495
+ grid.setAttribute('aria-multiselectable', 'true');
12496
+ else
12497
+ grid.removeAttribute('aria-multiselectable');
12238
12498
  let dataRow = 0;
12239
12499
  for (const [position, row] of rows.entries()) {
12240
12500
  const index = isHeaderRow(row)
12241
12501
  ? position + 1
12242
12502
  : headerRows + offset + ++dataRow;
12243
12503
  row.setAttribute('aria-rowindex', String(index));
12504
+ stampRowSelection(row, selectable);
12244
12505
  if (columnsWindowed)
12245
12506
  continue;
12246
12507
  const cells = Array.from(row.children).filter(cell => !isDecorative(cell));
@@ -12254,6 +12515,49 @@ class DataTableComponent {
12254
12515
  grid.setAttribute('aria-rowcount', String(headerRows + dataRows));
12255
12516
  grid.setAttribute('aria-colcount', String(this.enhancedColumns().length));
12256
12517
  }
12518
+ /**
12519
+ * Roving tabindex: the focused cell is the one tab stop inside the grid and
12520
+ * holds real DOM focus, so assistive tech announces it and the context-menu
12521
+ * key targets it. Done on the rendered DOM for the same reason as
12522
+ * {@link stampGridSemantics}: rows come from many template branches.
12523
+ *
12524
+ * DOM focus only follows when focus is already on the scroller or a data
12525
+ * row, so a programmatic `focusedCell` change never steals it from a filter
12526
+ * input, an editor or the rest of the page. The scroller stays the tab stop
12527
+ * while no focused cell is rendered (none picked yet, or scrolled out of the
12528
+ * virtual window), so the grid is never unreachable.
12529
+ */
12530
+ syncFocusedCellDom() {
12531
+ const container = this.scrollContainerRef()?.nativeElement;
12532
+ if (!container)
12533
+ return;
12534
+ // Read before stripping tabindex: removing it from the focused cell blurs it.
12535
+ const active = this._document.activeElement;
12536
+ for (const stale of Array.from(container.querySelectorAll('[data-row-index] [data-column][tabindex]'))) {
12537
+ stale.removeAttribute('tabindex');
12538
+ }
12539
+ const focused = this.focusedCell();
12540
+ const cell = focused === null ? undefined : this.renderedCell(container, focused);
12541
+ container.tabIndex = cell ? -1 : 0;
12542
+ if (!cell)
12543
+ return;
12544
+ cell.tabIndex = 0;
12545
+ const focusIsInGrid = active === container || (active !== null && active !== cell && container.contains(active) && active.closest('[data-row-index]') !== null);
12546
+ if (focusIsInGrid && this.editingCell() === null && !active?.closest('input,textarea,select,[contenteditable]')) {
12547
+ cell.focus({ preventScroll: true });
12548
+ }
12549
+ }
12550
+ renderedCell(container, target) {
12551
+ for (const row of Array.from(container.querySelectorAll('[data-row-index]'))) {
12552
+ if (row.dataset['rowIndex'] !== String(target.rowIndex))
12553
+ continue;
12554
+ for (const cell of Array.from(row.querySelectorAll('[data-column]'))) {
12555
+ if (cell.dataset['column'] === target.columnKey)
12556
+ return cell;
12557
+ }
12558
+ }
12559
+ return undefined;
12560
+ }
12257
12561
  /**
12258
12562
  * Rendered indexes move when rows are collapsed, paged away, sorted or
12259
12563
  * replaced. The editor holds a pending draft for one row, so it follows that
@@ -12362,9 +12666,11 @@ class DataTableComponent {
12362
12666
  * the depth indent itself comes from {@link getTreeCellStyle}.
12363
12667
  */
12364
12668
  getCellClass(col, rowIndex, treeDepth) {
12365
- const base = treeDepth === undefined
12366
- ? this._baseCellClass().normal
12367
- : this._baseCellClass().tree;
12669
+ // A cell paints over its row, so a plain cell stays transparent or the row's hover and selected tint would
12670
+ // never show. A pinned cell must be opaque so scrolled columns do not show through; its row tint is layered
12671
+ // on by data-table.component.css (.pinned-cell).
12672
+ const pinnedClass = col.sticky || col._pin ? " bg-background pinned-cell" : "";
12673
+ const base = treeDepth === undefined ? this._baseCellClass() + pinnedClass : this._baseCellClass();
12368
12674
  const key = String(col.accessorKey);
12369
12675
  const focused = this.focusedCell();
12370
12676
  if (rowIndex !== undefined &&
@@ -12993,8 +13299,10 @@ class DataTableComponent {
12993
13299
  * the first null/undefined link rather than throwing.
12994
13300
  */
12995
13301
  getCellValue(row, key, column) {
12996
- if (column?.accessorFn) {
12997
- return column.accessorFn(row);
13302
+ // An addon (the pivot) asks by key alone; the column's accessorFn is still the cell's value, hidden or not.
13303
+ const resolved = column ?? this.columnsByKey().get(String(key));
13304
+ if (resolved?.accessorFn) {
13305
+ return resolved.accessorFn(row);
12998
13306
  }
12999
13307
  if (typeof key === "string" && key.includes(".")) {
13000
13308
  return key.split(".").reduce((value, segment) => {
@@ -13142,12 +13450,8 @@ class DataTableComponent {
13142
13450
  const onlyVisible = options?.onlyVisible !== false;
13143
13451
  const onlyFiltered = options?.onlyFiltered !== false;
13144
13452
  const columns = onlyVisible
13145
- ? this.enhancedColumns().filter((col) => col.accessorKey !== "_selection" &&
13146
- col.accessorKey !== "_expander" &&
13147
- col.accessorKey !== "_actions")
13148
- : this.columns().filter((col) => col.accessorKey !== "_selection" &&
13149
- col.accessorKey !== "_expander" &&
13150
- col.accessorKey !== "_actions");
13453
+ ? this.enhancedColumns().filter((col) => !isGridColumnKey(col.accessorKey))
13454
+ : this.columns().filter((col) => !isGridColumnKey(col.accessorKey));
13151
13455
  const rows = customRows ?? (onlyFiltered ? this.sortedData() : this.data());
13152
13456
  const result = [];
13153
13457
  if (includeHeaders) {
@@ -13226,9 +13530,7 @@ class DataTableComponent {
13226
13530
  async copyRowToClipboard(row) {
13227
13531
  if (!this.enableCopy())
13228
13532
  return;
13229
- const columns = this.enhancedColumns().filter((col) => col.accessorKey !== "_selection" &&
13230
- col.accessorKey !== "_expander" &&
13231
- col.accessorKey !== "_actions");
13533
+ const columns = this.enhancedColumns().filter((col) => !isGridColumnKey(col.accessorKey));
13232
13534
  const values = columns.map((col) => this.getCellStringValue(row, col));
13233
13535
  await navigator.clipboard.writeText(toClipboardText([values]));
13234
13536
  }
@@ -13240,9 +13542,7 @@ class DataTableComponent {
13240
13542
  async copySelectedToClipboard() {
13241
13543
  if (!this.enableCopy())
13242
13544
  return;
13243
- const columns = this.enhancedColumns().filter((col) => col.accessorKey !== "_selection" &&
13244
- col.accessorKey !== "_expander" &&
13245
- col.accessorKey !== "_actions");
13545
+ const columns = this.enhancedColumns().filter((col) => !isGridColumnKey(col.accessorKey));
13246
13546
  const selectedIds = this.rowSelection();
13247
13547
  // Grouping reorders the rows on screen; the copy follows the screen, collapsed groups included.
13248
13548
  const inDrawnOrder = this.groupingActive()
@@ -13280,9 +13580,13 @@ class DataTableComponent {
13280
13580
  */
13281
13581
  onCellClick(rowIndex, col, event) {
13282
13582
  const key = String(col.accessorKey);
13283
- if (key === "_selection" || key === "_expander" || key === "_actions")
13583
+ if (isGridColumnKey(key))
13284
13584
  return;
13285
- event.stopPropagation();
13585
+ // A click must not reach onTableClick (it clears the focus), and a key from a control inside the cell stays
13586
+ // with that control. Only Enter on the cell itself goes on to onTableKeydown, where it opens the editor.
13587
+ const passesToGrid = 'key' in event && event.key === 'Enter' && event.target === event.currentTarget;
13588
+ if (!passesToGrid)
13589
+ event.stopPropagation();
13286
13590
  // When range selection is on, focus + range are managed by the pointer-drag
13287
13591
  // handler (onTableMouseDown); a plain click just focuses here for keyboard.
13288
13592
  this.focusedCell.set({ rowIndex, columnKey: key });
@@ -13299,7 +13603,7 @@ class DataTableComponent {
13299
13603
  const rowIndex = Number(rawRow);
13300
13604
  if (!Number.isFinite(rowIndex))
13301
13605
  return null;
13302
- const special = columnKey === "_selection" || columnKey === "_expander" || columnKey === "_actions";
13606
+ const special = isGridColumnKey(columnKey);
13303
13607
  return special ? null : { rowIndex, columnKey };
13304
13608
  }
13305
13609
  /** Delegated mousedown — starts a click-drag range selection (left button only). */
@@ -13367,7 +13671,7 @@ class DataTableComponent {
13367
13671
  */
13368
13672
  onCellDblClick(rowIndex, col, event) {
13369
13673
  const key = String(col.accessorKey);
13370
- if (key === "_selection" || key === "_expander" || key === "_actions")
13674
+ if (isGridColumnKey(key))
13371
13675
  return;
13372
13676
  event.stopPropagation();
13373
13677
  this.startEditing(rowIndex, key);
@@ -13379,7 +13683,7 @@ class DataTableComponent {
13379
13683
  */
13380
13684
  onCellTouchEnd(event, rowIndex, col) {
13381
13685
  const key = String(col.accessorKey);
13382
- if (key === "_selection" || key === "_expander" || key === "_actions")
13686
+ if (isGridColumnKey(key))
13383
13687
  return;
13384
13688
  const now = Date.now();
13385
13689
  const isSameCell = this._lastTapRowIndex === rowIndex && this._lastTapColumnKey === key;
@@ -13433,8 +13737,25 @@ class DataTableComponent {
13433
13737
  * (`Ctrl/Cmd+V`), undo/redo (`Ctrl/Cmd+Z`/`Y`), then arrow/Home/End/Enter cell
13434
13738
  * navigation. Each stage is gated by its feature input, and the first one to
13435
13739
  * handle the event stops the chain.
13740
+ *
13741
+ * A control inside the grid that owns its keys (see `ownsItsKeys`: text
13742
+ * inputs, selects, contenteditable, slider / list / menu / tab / tree
13743
+ * roles, in a shadow root too) is left alone, as is anything that already
13744
+ * called `preventDefault` below the grid (a nested grid, a consumer's
13745
+ * control): the grid does not act on those. Known limit: a grid nested in a
13746
+ * cell leaves unhandled keys (arrows past its last row) to this one.
13747
+ *
13748
+ * Enter and F2 open the editor only when they come from the scroller or a
13749
+ * data cell and are not a held-key repeat; an Enter / F2 that opened an
13750
+ * editor does not propagate further.
13436
13751
  */
13437
13752
  onTableKeydown(event) {
13753
+ // composedPath() starts at the real origin: `target` is retargeted to the host when the key comes from a shadow root.
13754
+ const path = event.composedPath();
13755
+ const fallback = event.target === null ? [] : [event.target];
13756
+ const origin = path.length > 0 ? path : fallback;
13757
+ if (event.defaultPrevented || ownsItsKeys(origin, this._el.nativeElement))
13758
+ return;
13438
13759
  if (this.handleCopyKeydown(event))
13439
13760
  return;
13440
13761
  if (this.handlePasteKeydown(event))
@@ -13508,9 +13829,11 @@ class DataTableComponent {
13508
13829
  case 'ArrowDown':
13509
13830
  return { row: this.findNextEnabledRow(rowIndex, 1, totalRows), col: nextCol };
13510
13831
  case 'ArrowLeft':
13511
- return { row: nextRow, col: Math.max(0, nextCol - 1) };
13512
- case 'ArrowRight':
13513
- return { row: nextRow, col: Math.min(colKeys.length - 1, nextCol + 1) };
13832
+ case 'ArrowRight': {
13833
+ // Arrows are visual; columns render right-to-left in RTL, so they swap.
13834
+ const step = (key === 'ArrowRight') === this.isRtl() ? -1 : 1;
13835
+ return { row: nextRow, col: Math.min(colKeys.length - 1, Math.max(0, nextCol + step)) };
13836
+ }
13514
13837
  case 'Tab':
13515
13838
  return this.computeTabTarget(shiftKey, rowIndex, colIndex, colKeys, totalRows);
13516
13839
  case 'Home':
@@ -13539,10 +13862,42 @@ class DataTableComponent {
13539
13862
  return { row: rowIndex + 1, col: 0 };
13540
13863
  return { row: rowIndex, col: colIndex };
13541
13864
  }
13865
+ isTabAtGridEdge(shiftKey, rowIndex, colIndex, colKeys, totalRows) {
13866
+ const target = this.computeTabTarget(shiftKey, rowIndex, colIndex, colKeys, totalRows);
13867
+ return target.row === rowIndex && target.col === colIndex;
13868
+ }
13542
13869
  getPageSize() {
13543
13870
  const container = this.scrollContainerRef()?.nativeElement;
13544
13871
  return container ? Math.floor(container.clientHeight / this.effectiveRowHeight()) : 10;
13545
13872
  }
13873
+ /** Enter / F2 open the editor only from the scroller or a data cell, not from a header or cell control that keeps its own Enter. */
13874
+ isEditKeyTarget(target) {
13875
+ if (target === null)
13876
+ return true;
13877
+ if (!(target instanceof HTMLElement))
13878
+ return false;
13879
+ if (target === this.scrollContainerRef()?.nativeElement)
13880
+ return true;
13881
+ const column = target.dataset['column'];
13882
+ return column !== undefined && !isGridColumnKey(column);
13883
+ }
13884
+ editFromKey(event) {
13885
+ const focused = this.focusedCell();
13886
+ if (!focused || !this.isEditKeyTarget(event.target))
13887
+ return;
13888
+ // A held key repeats past the commit that just returned focus here: it must not reopen the editor, and
13889
+ // it is claimed so an ancestor's Enter handler (a dialog's submit) does not fire on every repeat.
13890
+ if (event.repeat) {
13891
+ event.stopPropagation();
13892
+ return;
13893
+ }
13894
+ this.startEditing(focused.rowIndex, focused.columnKey);
13895
+ // Only an edit that opened has handled the key; otherwise an ancestor's Enter (a dialog's submit) still fires.
13896
+ if (this.editingCell() !== null) {
13897
+ event.preventDefault();
13898
+ event.stopPropagation();
13899
+ }
13900
+ }
13546
13901
  handleNavigationKeydown(event) {
13547
13902
  if (this.editingCell())
13548
13903
  return;
@@ -13552,11 +13907,7 @@ class DataTableComponent {
13552
13907
  return;
13553
13908
  }
13554
13909
  if (event.key === 'Enter' || event.key === 'F2') {
13555
- const focused = this.focusedCell();
13556
- if (focused) {
13557
- event.preventDefault();
13558
- this.startEditing(focused.rowIndex, focused.columnKey);
13559
- }
13910
+ this.editFromKey(event);
13560
13911
  return;
13561
13912
  }
13562
13913
  const navKeys = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Tab', 'Home', 'End', 'PageUp', 'PageDown'];
@@ -13575,9 +13926,16 @@ class DataTableComponent {
13575
13926
  }
13576
13927
  return;
13577
13928
  }
13578
- event.preventDefault();
13929
+ this.navigateFrom(event, focused, colKeys, totalRows);
13930
+ }
13931
+ navigateFrom(event, focused, colKeys, totalRows) {
13579
13932
  const colIndex = colKeys.indexOf(focused.columnKey);
13580
13933
  const safeColIndex = colIndex === -1 ? 0 : colIndex;
13934
+ // A Tab that cannot move the focused cell must reach the browser, or
13935
+ // keyboard users are trapped in the grid (WCAG 2.1.2).
13936
+ if (event.key === 'Tab' && this.isTabAtGridEdge(event.shiftKey, focused.rowIndex, safeColIndex, colKeys, totalRows))
13937
+ return;
13938
+ event.preventDefault();
13581
13939
  const next = this.computeNextCell(event.key, event.shiftKey, event.ctrlKey || event.metaKey, focused.rowIndex, safeColIndex, colKeys, totalRows);
13582
13940
  this.focusedCell.set({ rowIndex: next.row, columnKey: colKeys[next.col] });
13583
13941
  this.ensureFocusedCellVisible();
@@ -13627,6 +13985,7 @@ class DataTableComponent {
13627
13985
  const currentValue = this.getCellValue(row, col.accessorKey, col);
13628
13986
  this.cellEditError.set(null);
13629
13987
  this.editValue.set(currentValue);
13988
+ this.editText.set(typeof currentValue === 'number' || typeof currentValue === 'string' ? String(currentValue) : '');
13630
13989
  this.editingRowId = this.getRowId()(row);
13631
13990
  this.editingCell.set({ rowIndex, columnKey });
13632
13991
  this.focusEditInput();
@@ -13658,6 +14017,15 @@ class DataTableComponent {
13658
14017
  const editing = this.editingCell();
13659
14018
  if (!editing)
13660
14019
  return;
14020
+ if (this.editorHoldsPartialNumber()) {
14021
+ this.cellEditError.set({
14022
+ rowIndex: editing.rowIndex,
14023
+ columnKey: editing.columnKey,
14024
+ value: this.editValue(),
14025
+ message: 'Enter a valid number',
14026
+ });
14027
+ return;
14028
+ }
13661
14029
  const col = this.enhancedColumns().find((c) => String(c.accessorKey) === editing.columnKey);
13662
14030
  const row = this.processedData()[editing.rowIndex];
13663
14031
  if (!col || !row) {
@@ -13875,9 +14243,62 @@ class DataTableComponent {
13875
14243
  }
13876
14244
  refocusTable() {
13877
14245
  requestAnimationFrame(() => {
13878
- this.scrollContainerRef()?.nativeElement?.focus();
14246
+ const container = this.scrollContainerRef()?.nativeElement;
14247
+ const focused = this.focusedCell();
14248
+ const cell = container && focused ? this.renderedCell(container, focused) : undefined;
14249
+ (cell ?? container)?.focus({ preventScroll: true });
13879
14250
  });
13880
14251
  }
14252
+ /**
14253
+ * Whether the open number editor holds text that is not a number. Read from the field itself: it is the one place
14254
+ * that knows, and it stays right if the input is re-created while the editor is open.
14255
+ */
14256
+ editorHoldsPartialNumber() {
14257
+ const input = this._el.nativeElement.querySelector('input[data-edit-input]');
14258
+ return input?.validity.badInput ?? false;
14259
+ }
14260
+ /**
14261
+ * Stores what a text or number editor holds: a number (null when cleared) for `editType: 'number'`, else the
14262
+ * text. A half-typed number ("-", "1e") is not a value: while the field holds one, Enter, Tab and blur refuse
14263
+ * to commit and show "Enter a valid number" inline, and the cell keeps its value however the text got there (after
14264
+ * clearing the field or after selecting the digits). Like a validator rejection the editor stays open so the text
14265
+ * can be fixed; unlike one it emits no editError, since no validator was involved.
14266
+ */
14267
+ onEditInput(input, col) {
14268
+ if (col.editType !== 'number') {
14269
+ this.onEditValueChange(input.value);
14270
+ return;
14271
+ }
14272
+ if (input.validity.badInput) {
14273
+ // The text changed, so a message about the previous value no longer describes it.
14274
+ this.cellEditError.set(null);
14275
+ return;
14276
+ }
14277
+ this.editText.set(input.value);
14278
+ this.onEditValueChange(input.value === '' ? null : input.valueAsNumber);
14279
+ }
14280
+ /**
14281
+ * Which option the select shows as current: the one whose value is the edit value, else the first whose scalar
14282
+ * has its string form (as data from JSON does); -1 when no option stands for it, and the select then shows blank.
14283
+ */
14284
+ editOptionIndex(col) {
14285
+ const options = col.editOptions ?? [];
14286
+ const value = this.editValue();
14287
+ const exact = options.findIndex((option) => option.value === value);
14288
+ if (exact !== -1)
14289
+ return exact;
14290
+ if (!isScalarOptionValue(value))
14291
+ return -1;
14292
+ return options.findIndex((option) => isScalarOptionValue(option.value) && String(option.value) === String(value));
14293
+ }
14294
+ /** Commits the chosen option's own value, not its string form, so numbers and booleans keep their type. */
14295
+ onEditSelect(select, col) {
14296
+ const option = select.value === '' ? undefined : col.editOptions?.[Number(select.value)];
14297
+ if (!option)
14298
+ return;
14299
+ this.onEditValueChange(option.value);
14300
+ this.commitEdit();
14301
+ }
13881
14302
  /**
13882
14303
  * Stores the editor's in-progress value and clears any visible validation
13883
14304
  * message, so the error disappears as soon as the user types. Nothing is
@@ -13894,6 +14315,10 @@ class DataTableComponent {
13894
14315
  * All three stop propagation so the grid's own navigation does not also run.
13895
14316
  */
13896
14317
  onEditKeydown(event) {
14318
+ // The Enter / Escape that confirms an IME composition belongs to the IME, not to the editor. (Safari sends that
14319
+ // key after compositionend with isComposing already false; only keyCode 229 tells, and it is deprecated.)
14320
+ if (event.isComposing)
14321
+ return;
13897
14322
  if (event.key === 'Escape') {
13898
14323
  event.preventDefault();
13899
14324
  event.stopPropagation();
@@ -13903,16 +14328,40 @@ class DataTableComponent {
13903
14328
  if (event.key === 'Enter') {
13904
14329
  event.preventDefault();
13905
14330
  event.stopPropagation();
13906
- this.commitEdit();
14331
+ // The Enter that opened this editor repeats while held and would commit it at once.
14332
+ if (!event.repeat)
14333
+ this.commitEdit();
13907
14334
  return;
13908
14335
  }
13909
14336
  if (event.key === 'Tab') {
13910
- event.preventDefault();
13911
14337
  event.stopPropagation();
13912
- this.commitEdit();
13913
- this.advanceEditToNextCell(event.shiftKey);
14338
+ this.onEditTab(event);
13914
14339
  }
13915
14340
  }
14341
+ /**
14342
+ * Tab commits, then moves on. A refused commit (a validator rejection, a half-typed number) keeps the editor and
14343
+ * its text where they are: moving on would drop them without a word.
14344
+ */
14345
+ onEditTab(event) {
14346
+ const leavesGrid = this.isEditTabAtGridEdge(event.shiftKey);
14347
+ this.commitEdit();
14348
+ if (this.editingCell() !== null) {
14349
+ event.preventDefault();
14350
+ return;
14351
+ }
14352
+ // At the grid edge the browser moves focus out of the grid on its own.
14353
+ if (leavesGrid)
14354
+ return;
14355
+ event.preventDefault();
14356
+ this.advanceEditToNextCell(event.shiftKey);
14357
+ }
14358
+ isEditTabAtGridEdge(shiftKey) {
14359
+ const editing = this.focusedCell();
14360
+ if (!editing)
14361
+ return false;
14362
+ const colKeys = this.navigableColumnKeys();
14363
+ return this.isTabAtGridEdge(shiftKey, editing.rowIndex, colKeys.indexOf(editing.columnKey), colKeys, this.totalVisibleRows());
14364
+ }
13916
14365
  advanceEditToNextCell(shiftKey) {
13917
14366
  const colKeys = this.navigableColumnKeys();
13918
14367
  const editing = this.focusedCell();
@@ -13973,7 +14422,8 @@ class DataTableComponent {
13973
14422
  }
13974
14423
  /**
13975
14424
  * Expands every node with children, or only those above `toDepth` (0-based,
13976
- * exclusive) when given. Walks the *unfiltered* {@link data} and **replaces**
14425
+ * exclusive) when given; the deeper nodes are pinned closed, like
14426
+ * {@link collapseAllSubRows}. Walks the *unfiltered* {@link data} and **replaces**
13977
14427
  * {@link subRowExpandedRows} wholesale, discarding any node you had explicitly
13978
14428
  * collapsed.
13979
14429
  */
@@ -13986,9 +14436,9 @@ class DataTableComponent {
13986
14436
  for (const row of rows) {
13987
14437
  const children = getChildrenFn(row);
13988
14438
  if (children && children.length > 0) {
13989
- if (targetDepth === -1 || depth < targetDepth) {
13990
- next[getId(row)] = true;
13991
- }
14439
+ // Pin the deeper nodes closed too: unpinned they would fall back to subRowDefaultExpanded
14440
+ // (-1 opens every level) and `toDepth` would open the whole tree.
14441
+ next[getId(row)] = targetDepth === -1 || depth < targetDepth;
13992
14442
  walk(children, depth + 1);
13993
14443
  }
13994
14444
  }
@@ -14322,7 +14772,7 @@ class DataTableComponent {
14322
14772
  }
14323
14773
  isColumnReorderable(col) {
14324
14774
  const key = String(col.accessorKey);
14325
- if (key === "_selection" || key === "_expander" || key === "_actions") {
14775
+ if (isGridColumnKey(key)) {
14326
14776
  return false;
14327
14777
  }
14328
14778
  return col.enableReordering !== false;
@@ -14553,34 +15003,70 @@ class DataTableComponent {
14553
15003
  if (draggedTreeRow && targetTreeRow && draggedTreeRow.depth !== targetTreeRow.depth) {
14554
15004
  if (event.dataTransfer)
14555
15005
  event.dataTransfer.dropEffect = 'none';
14556
- this.dragOverIndex.set(-1);
15006
+ this.dragOverIndex.set(null);
14557
15007
  return { blocked: true, position };
14558
15008
  }
14559
15009
  return { blocked: false, position: position === 'on' ? 'below' : position };
14560
15010
  }
15011
+ /**
15012
+ * Whether dropping the dragged tree node at `row` would move it into its own subtree: onto a descendant, or
15013
+ * "on" itself. Such a drop would lose the subtree (or make the node its own parent), so it is refused.
15014
+ */
15015
+ refusesOwnSubtree(draggedId, row, position) {
15016
+ if (!row || !this.enableSubRows())
15017
+ return false;
15018
+ const getId = this.getRowId();
15019
+ const dragged = this.processedData().find(r => getId(r) === draggedId);
15020
+ if (!dragged)
15021
+ return false;
15022
+ if (getId(dragged) === getId(row))
15023
+ return position === 'on';
15024
+ return this.subtreeContains(dragged, getId(row), getId, this.getChildren());
15025
+ }
15026
+ /**
15027
+ * Refuses the row under the pointer as a drop target. Not just "no preventDefault": the container's dragover
15028
+ * would still accept the drop and `onRowDrop` would use the row hovered before, so the target is cleared and
15029
+ * the event stopped. Edge auto-scroll keeps working, or a tall refused subtree could not be scrolled past.
15030
+ */
15031
+ refuseDrop(event) {
15032
+ if (event.dataTransfer)
15033
+ event.dataTransfer.dropEffect = 'none';
15034
+ this.dragOverIndex.set(null);
15035
+ event.stopPropagation();
15036
+ this.handleDragAutoScroll(event.clientY);
15037
+ }
14561
15038
  /**
14562
15039
  * Tracks the hovered row during a row drag and decides the drop position from
14563
15040
  * the pointer's position within the row: above/below at the halves in `"flat"`
14564
15041
  * mode, above/on/below at the quarters in `"tree"` mode. Rejects the target
14565
- * when the row is disabled, when a flat drag would cross tree depths, or when
14566
- * {@link rowDragAllowDrop} vetoes it, and auto-scrolls near the edges.
15042
+ * when the row is disabled, when a flat drag would cross tree depths, when a
15043
+ * tree drag would land in its own subtree (on a descendant, or "on" itself),
15044
+ * or when {@link rowDragAllowDrop} vetoes it, and auto-scrolls near the edges.
14567
15045
  */
14568
15046
  onRowDragOver(event, index) {
14569
15047
  const draggedId = this.draggedRowId();
14570
15048
  if (!this.enableRowDrag() || !draggedId)
14571
15049
  return;
14572
15050
  const row = this.processedData()[index];
14573
- if (row && this.isDisabled(row))
15051
+ if (row && this.isDisabled(row)) {
15052
+ this.refuseDrop(event);
14574
15053
  return;
15054
+ }
14575
15055
  const getId = this.getRowId();
14576
15056
  const rawPosition = this.computeDragPosition(event);
14577
15057
  const { blocked, position } = this.checkFlatTreeDragCompatibility(event, index, draggedId, getId, rawPosition);
14578
15058
  if (blocked)
14579
15059
  return;
15060
+ if (this.refusesOwnSubtree(draggedId, row, position)) {
15061
+ this.refuseDrop(event);
15062
+ return;
15063
+ }
14580
15064
  const draggedRow = this.processedData().find(r => getId(r) === draggedId);
14581
15065
  const allowDropFn = this.rowDragAllowDrop();
14582
- if (draggedRow && row && allowDropFn && !allowDropFn(draggedRow, row, position))
15066
+ if (draggedRow && row && allowDropFn && !allowDropFn(draggedRow, row, position)) {
15067
+ this.refuseDrop(event);
14583
15068
  return;
15069
+ }
14584
15070
  event.preventDefault();
14585
15071
  event.stopPropagation();
14586
15072
  this.dragOverIndex.set(index);
@@ -14611,7 +15097,8 @@ class DataTableComponent {
14611
15097
  const lastRow = rows[rows.length - 1];
14612
15098
  const lastRowRect = lastRow.getBoundingClientRect();
14613
15099
  if (event.clientY > lastRowRect.bottom) {
14614
- this.dragOverIndex.set(lastIndex);
15100
+ const refused = this.refusesOwnSubtree(this.draggedRowId() ?? '', this.processedData()[lastIndex], 'below');
15101
+ this.dragOverIndex.set(refused ? null : lastIndex);
14615
15102
  this.dragOverPosition.set('below');
14616
15103
  }
14617
15104
  this.handleDragAutoScroll(event.clientY);
@@ -14709,8 +15196,17 @@ class DataTableComponent {
14709
15196
  const { remaining, removed } = this.removeFromTree(data, rowId, getId, getChildrenFn, setChildrenFn);
14710
15197
  if (!removed)
14711
15198
  return data;
15199
+ // A node cannot move into itself or its own subtree: the target left the tree with it, so
15200
+ // inserting would never match and the moved subtree would be dropped from the data.
15201
+ if (this.subtreeContains(removed, targetId, getId, getChildrenFn))
15202
+ return data;
14712
15203
  return this.insertIntoTree(remaining, removed, targetId, event.position, getId, getChildrenFn, setChildrenFn);
14713
15204
  }
15205
+ subtreeContains(node, id, getId, getChildrenFn) {
15206
+ if (getId(node) === id)
15207
+ return true;
15208
+ return (getChildrenFn(node) ?? []).some(child => this.subtreeContains(child, id, getId, getChildrenFn));
15209
+ }
14714
15210
  removeFromTree(nodes, rowId, getId, getChildrenFn, setChildrenFn) {
14715
15211
  const idx = nodes.findIndex(n => getId(n) === rowId);
14716
15212
  if (idx !== -1) {
@@ -14836,9 +15332,10 @@ class DataTableComponent {
14836
15332
  }
14837
15333
  /**
14838
15334
  * Begins a mouse column resize from the header's drag handle, capturing the
14839
- * start width and attaching document move/up listeners. The RTL delta is
14840
- * inverted from the host's live direction, so the handle drags the way the
14841
- * column visually grows.
15335
+ * start width and attaching document move/up listeners. The drag delta is
15336
+ * signed by which way the column's edge actually moves (`resizeGrowthSign`):
15337
+ * flow direction (RTL-aware), reversed for a pinned column stuck to the
15338
+ * viewport edge.
14842
15339
  */
14843
15340
  onResizeStart(event, col) {
14844
15341
  event.preventDefault();
@@ -14870,6 +15367,32 @@ class DataTableComponent {
14870
15367
  }
14871
15368
  return `${base} bg-transparent group-hover/resize:bg-primary/50`;
14872
15369
  }
15370
+ /**
15371
+ * Which way a drag moves the column's far edge: +1 grows the column toward the right, -1 toward the left.
15372
+ * A pinned column that is actually stuck to its viewport edge is held there by its `left`/`right` offset, so a
15373
+ * right-pinned one grows leftwards and a left-pinned one rightwards. Everything else, including a pinned column
15374
+ * sitting at its natural position because the table does not overflow, flows with the writing direction.
15375
+ * Whether it is stuck is measured: the pin setting alone cannot tell.
15376
+ */
15377
+ resizeGrowthSign(col) {
15378
+ const flow = this.isRtl() ? -1 : 1;
15379
+ if (!this.scrollsHorizontally())
15380
+ return flow;
15381
+ if (col._pin === "right")
15382
+ return -1;
15383
+ if (col._pin === "left" || col.sticky)
15384
+ return 1;
15385
+ return flow;
15386
+ }
15387
+ /**
15388
+ * With horizontal overflow a pinned column is always held at its edge (stuck, or already at the end of the row);
15389
+ * without it the column keeps its natural position. Comparing the cell's rect with the viewport is fragile
15390
+ * (scrollbar, padding), so the overflow itself is the test. Unmeasurable: assume overflow.
15391
+ */
15392
+ scrollsHorizontally() {
15393
+ const container = this.scrollContainerRef()?.nativeElement;
15394
+ return !container || container.scrollWidth > container.clientWidth + 1;
15395
+ }
14873
15396
  startResize(clientX, col) {
14874
15397
  const key = String(col.accessorKey);
14875
15398
  this._resizingColumn.set(col);
@@ -14877,7 +15400,7 @@ class DataTableComponent {
14877
15400
  const actualWidth = this.getColumnActualWidth(key);
14878
15401
  this.resizeStartWidth = Number.parseInt(col._width, 10) || actualWidth || 150;
14879
15402
  this.resizeOldWidth = this.columnWidths()[key] ?? col._width ?? "auto";
14880
- this._isRtlResize = this.isRtl();
15403
+ this._resizeGrowthSign = this.resizeGrowthSign(col);
14881
15404
  const onMouseMove = (e) => this.onResizeMove(e.clientX);
14882
15405
  const onTouchMove = (e) => {
14883
15406
  if (e.touches.length === 1) {
@@ -14906,8 +15429,7 @@ class DataTableComponent {
14906
15429
  if (!resizing)
14907
15430
  return;
14908
15431
  const delta = clientX - this.resizeStartX;
14909
- const effectiveDelta = this._isRtlResize ? -delta : delta;
14910
- const newWidth = Math.max(columnMinWidthPx(resizing), this.resizeStartWidth + effectiveDelta);
15432
+ const newWidth = Math.max(columnMinWidthPx(resizing), this.resizeStartWidth + delta * this._resizeGrowthSign);
14911
15433
  const key = String(resizing.accessorKey);
14912
15434
  this.columnWidths.update((widths) => ({
14913
15435
  ...widths,
@@ -15072,7 +15594,7 @@ class DataTableComponent {
15072
15594
  ComponentPoolService,
15073
15595
  provideComponentLocale(() => DataTableComponent),
15074
15596
  { provide: DataTableAddonHost, useExisting: forwardRef(() => DataTableComponent) },
15075
- ], viewQueries: [{ propertyName: "scrollContainerRef", first: true, predicate: ["scrollContainer"], descendants: true, isSignal: true }, { propertyName: "virtualRowElements", predicate: ["virtualRow"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "resizeHandles", predicate: ["resizeHandle"], descendants: true, isSignal: true }], ngImport: i0, template: " <!-- Reusable: cell content rendering (component/template/cell/default) -->\n <ng-template\n #cellContentTpl\n let-col\n let-row=\"row\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.component) {\n <div\n [uiComponentOutlet]=\"col.component\"\n [inputs]=\"\n treeRow\n ? getSubRowComponentInputs(col, treeRow)\n : col.componentInputs\n ? col.componentInputs(row)\n : EMPTY_RECORD\n \"\n [outputs]=\"\n col.componentOutputs ? col.componentOutputs(row) : EMPTY_RECORD\n \"\n [recycle]=\"recycle\"\n ></div>\n } @else if (col.template) {\n @if (treeRow) {\n <ng-container\n *ngTemplateOutlet=\"\n col.template;\n context: {\n $implicit: row,\n depth: treeRow.depth,\n parentRow: treeRow.parentRow,\n parentId: treeRow.parentId,\n path: treeRow.path,\n isLeaf: treeRow.isLeaf,\n childCount: treeRow.childCount,\n }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"col.template; context: { $implicit: row }\"\n ></ng-container>\n }\n } @else {\n @let fmt = getCellFormatting(col, row);\n @if (fmt) {\n <span\n data-slot=\"cell-formatted\"\n class=\"relative flex w-full items-center gap-1.5 {{ fmt.class }}\"\n [style]=\"fmt.style\"\n >\n @if (fmt.dataBar) {\n @if (fmt.dataBar.track; as track) {\n <span\n data-slot=\"cell-data-bar-track\"\n class=\"pointer-events-none absolute inset-x-0 inset-y-0.5 rounded-sm\"\n [style.background-color]=\"track\"\n ></span>\n }\n <span\n data-slot=\"cell-data-bar\"\n class=\"pointer-events-none absolute inset-y-0.5 start-0 rounded-sm\"\n [style.width]=\"fmt.dataBar.width\"\n [style.background-color]=\"fmt.dataBar.color\"\n ></span>\n }\n @if (fmt.icon) {\n @if (fmt.icon.name) {\n <ui-icon\n data-slot=\"cell-icon\"\n [name]=\"fmt.icon.name\"\n size=\"xs\"\n class=\"relative shrink-0 {{ fmt.icon.class }}\"\n />\n } @else if (fmt.icon.glyph) {\n <span data-slot=\"cell-icon\" class=\"relative shrink-0 {{ fmt.icon.class }}\">{{ fmt.icon.glyph }}</span>\n }\n }\n <span class=\"relative min-w-0 truncate\">\n @if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n </span>\n </span>\n } @else if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n }\n </ng-template>\n\n <!-- Reusable: full cell rendering (special columns + content) -->\n <ng-template\n #cellTpl\n let-col\n let-row=\"row\"\n let-rowIndex=\"rowIndex\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isRowSelected(row)\"\n [disabled]=\"isDisabled(row)\"\n [indeterminate]=\"\n treeRow ? isSubRowSelectionIndeterminate(row) : false\n \"\n (checkedChange)=\"treeRow ? toggleRowWithCascade(row) : toggleRow(row)\"\n ariaLabel=\"Select row\"\n />\n } @else if (col._isTreeExpanderHost && treeRow) {\n <div\n class=\"flex items-center gap-1 min-w-0\"\n [style.padding-inline-start.px]=\"treeRow.depth * subRowIndentSize()\"\n >\n @if (!treeRow.isLeaf) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n treeRow.isExpanded ? 'Collapse sub-rows' : 'Expand sub-rows'\n \"\n (click)=\"toggleSubRowExpanded(treeRow.row, $event)\"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"treeRow.isExpanded && !isRtl()\"\n [class.-rotate-90]=\"treeRow.isExpanded && isRtl()\"\n />\n </button>\n } @else {\n <span class=\"inline-block h-6 w-6 shrink-0\"></span>\n }\n <span class=\"truncate\">\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n </span>\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"isRowExpanded(row) ? 'Collapse row' : 'Expand row'\"\n [attr.aria-expanded]=\"isRowExpanded(row)\"\n (click)=\"toggleRowExpanded(row, $event)\"\n >\n @if (isRowExpanded(row)) {\n <ui-icon name=\"chevron-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevron-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n @if (!isDisabled(row)) {\n @for (slot of cellActionSlots(); track slot.id) {\n <ui-button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-8 w-8 pointer-coarse:size-11\"\n [ariaLabel]=\"slot.ariaLabel ?? 'Row actions'\"\n (click)=\"slot.onClick($event, getRowContext(row, rowIndex))\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"sm\" />\n </ui-button>\n }\n }\n } @else if (\n col.editable && isEditing(rowIndex, String(col.accessorKey))\n ) {\n <ng-container\n *ngTemplateOutlet=\"\n cellEditTpl;\n context: { $implicit: col, row: row, rowIndex: rowIndex }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n }\n </ng-template>\n\n <!-- Reusable: cell edit mode -->\n <ng-template #cellEditTpl let-col let-row=\"row\" let-rowIndex=\"rowIndex\">\n @let editErr = editErrorFor(rowIndex, col);\n @if (col.editComponent) {\n <div\n [uiComponentOutlet]=\"col.editComponent\"\n [inputs]=\"{ value: editValue(), row: row, column: col }\"\n [outputs]=\"{\n valueChange: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\"\n ></div>\n } @else if (col.editTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.editTemplate;\n context: {\n $implicit: editValue(),\n row: row,\n column: col,\n setValue: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\n \"\n ></ng-container>\n } @else if (col.editType === \"checkbox\") {\n <ui-checkbox\n [checked]=\"!!editValue()\"\n [ariaInvalid]=\"editErr ? true : undefined\"\n [ariaDescribedby]=\"editErr ? cellEditErrorId : undefined\"\n (checkedChange)=\"onEditValueChange($event); commitEdit()\"\n />\n } @else if (col.editType === \"date\") {\n <ui-date-picker\n class=\"w-full\"\n [date]=\"editDateValue()\"\n (dateChange)=\"onEditDateChange($event)\"\n />\n } @else if (col.editType === \"select\" && col.editOptions) {\n <select\n data-edit-input\n class=\"w-full h-full bg-background border-0 outline-none text-sm px-1\"\n [class.ring-1]=\"editErr\"\n [class.ring-inset]=\"editErr\"\n [class.ring-destructive]=\"editErr\"\n [attr.aria-invalid]=\"editErr ? true : null\"\n [attr.aria-describedby]=\"editErr ? cellEditErrorId : null\"\n [value]=\"editValue()\"\n (change)=\"onEditValueChange($any($event.target).value); commitEdit()\"\n (keydown)=\"onEditKeydown($event)\"\n >\n @for (opt of col.editOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n } @else {\n <input\n data-edit-input\n [type]=\"col.editType === 'number' ? 'number' : 'text'\"\n class=\"w-full h-full bg-background border-0 outline-none text-sm px-1 select-text\"\n [class.ring-1]=\"editErr\"\n [class.ring-inset]=\"editErr\"\n [class.ring-destructive]=\"editErr\"\n [attr.aria-invalid]=\"editErr ? true : null\"\n [attr.aria-describedby]=\"editErr ? cellEditErrorId : null\"\n [value]=\"editValue()\"\n (input)=\"onEditValueChange($any($event.target).value)\"\n (keydown)=\"onEditKeydown($event)\"\n (blur)=\"editingCell() ? commitEdit() : null\"\n />\n }\n @if (editErr) {\n <p\n [id]=\"cellEditErrorId\"\n class=\"mt-0.5 px-1 text-xs text-destructive\"\n role=\"alert\"\n data-slot=\"cell-edit-error\"\n >\n {{ editErr }}\n </p>\n }\n </ng-template>\n\n <!-- Reusable: row detail/expansion panel -->\n <ng-template #rowDetailTpl let-row>\n @if (rowDetailTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTemplate();\n context: { $implicit: row, row: row }\n \"\n ></ng-container>\n } @else if (rowDetailComponent()) {\n <div\n [uiComponentOutlet]=\"rowDetailComponent()!\"\n [inputs]=\"getRowDetailComponentInputs(row)\"\n ></div>\n } @else {\n <pre class=\"text-xs text-muted-foreground whitespace-pre-wrap\">{{\n row | json\n }}</pre>\n }\n </ng-template>\n\n <!-- Reusable: empty state -->\n <ng-template #emptyStateTpl>\n <ui-table-row class=\"hover:bg-transparent justify-center w-full\">\n <ui-table-cell\n class=\"h-48 sm:h-96 text-center w-full p-0 border-none justify-center\"\n >\n @if (emptyStateComponent()) {\n <ng-container\n [uiComponentOutlet]=\"emptyStateComponent()!\"\n [inputs]=\"emptyStateComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex h-full flex-col items-center justify-center py-10 text-center text-muted-foreground w-full\"\n >\n <ui-icon name=\"circle-off\" size=\"xl\" class=\"mb-4 opacity-20\" />\n <p>{{ noResultsLabel() }}</p>\n </div>\n }\n </ui-table-cell>\n </ui-table-row>\n </ng-template>\n\n @if (skeleton()) {\n <div class=\"flex flex-col w-full space-y-3\" data-slot=\"data-table-skeleton\">\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n @for (row of skeletonRowsArray(); track $index) {\n <ui-skeleton class=\"h-12 w-full rounded-md\" />\n }\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n </div>\n } @else {\n <!-- `relative`: the sr-only announcer and the sr-only cell labels below are\n position:absolute. Without a positioned ancestor their containing block\n is <html>, so they escape this table's scroll container entirely and\n stretch the document to their static position \u2014 which on a page with a\n virtual-scroll table adds a second, page-length scrollbar. -->\n <div class=\"relative flex flex-col w-full h-full space-y-4\">\n <output\n class=\"sr-only\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n data-slot=\"data-table-announcer\"\n >\n {{ srAnnouncement() }}\n </output>\n @if (showToolbar()) {\n <div class=\"flex flex-wrap items-center justify-between gap-2 flex-none\">\n <div class=\"flex flex-1 flex-wrap items-center gap-2\">\n <ui-input\n [placeholder]=\"filterPlaceholder()\"\n [ngModel]=\"globalFilter()\"\n (ngModelChange)=\"onFilterChange($event)\"\n class=\"h-8 w-full sm:w-[150px] lg:w-[250px]\"\n />\n @if (hasAi() && enableNlFilter()) {\n <div class=\"flex items-center gap-1\" data-slot=\"table-nl-filter\">\n <span aria-hidden=\"true\" class=\"text-sm\">\u2728</span>\n <ui-input\n [placeholder]=\"nlFilterPlaceholder()\"\n [ngModel]=\"aiFilterQuery()\"\n (ngModelChange)=\"aiFilterQuery.set($event)\"\n [disabled]=\"aiFilterRunning()\"\n (keydown.enter)=\"runAiFilter()\"\n class=\"h-8 w-full sm:w-[200px]\"\n />\n </div>\n }\n @if (enableAdvancedFilter()) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n data-slot=\"advanced-filter-trigger\"\n class=\"inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 pointer-coarse:h-11 pointer-coarse:min-w-11 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-icon name=\"filter\" size=\"xs\" />\n <span class=\"hidden sm:inline\">{{ filterBuilderLabels().filterButton }}</span>\n @if (advancedFilterCount() > 0) {\n <span class=\"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-xs text-primary-foreground\">{{ advancedFilterCount() }}</span>\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-[min(420px,calc(100vw-2rem))] p-2\">\n <div class=\"space-y-2\">\n <ui-data-table-filter-builder\n [group]=\"advancedFilterGroup()\"\n [columns]=\"filterBuilderColumns()\"\n [labels]=\"filterBuilderLabels()\"\n (groupChange)=\"onAdvancedFilterChange($event)\"\n />\n @if (advancedFilterCount() > 0) {\n <button\n type=\"button\"\n class=\"text-xs text-muted-foreground hover:text-destructive\"\n (click)=\"clearAdvancedFilter()\"\n >{{ filterBuilderLabels().clearFilters }}</button>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n @if (showColumnVisibilityToggle() && hideableColumns().length > 0) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n class=\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n [attr.aria-label]=\"toggleColumnsLabel()\"\n >\n {{ columnsLabel() }}\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-56 p-2\">\n <div class=\"space-y-1\">\n @for (col of hideableColumns(); track col.accessorKey) {\n <div\n class=\"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-checkbox\n [checked]=\"isColumnVisible(col.accessorKey)\"\n (checkedChange)=\"\n setColumnVisibility(col.accessorKey, $event)\n \"\n [ariaLabel]=\"toggleColumnAriaLabel(col.header)\"\n />\n <span>{{ col.header }}</span>\n </div>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n\n <div\n #scrollContainer\n class=\"rounded-md border relative flex-1 min-h-0 overflow-auto w-full\"\n [class.contain-strict]=\"isVirtualScrollActive()\"\n [class.will-change-scroll]=\"isVirtualScrollActive()\"\n [class.select-none]=\"enableCellRangeSelection()\"\n (keydown)=\"onTableKeydown($event)\"\n (click)=\"onTableClick()\"\n (mousedown)=\"onTableMouseDown($event)\"\n (scroll)=\"isVirtualScrollActive() ? onVirtualScroll($event) : null\"\n (dragover)=\"onContainerDragOver($event)\"\n (drop)=\"onRowDrop($event)\"\n tabindex=\"0\"\n >\n @if (isLoaderVisible()) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n @if (loaderTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n loaderTemplate();\n context: {\n $implicit: loadingTrigger(),\n trigger: loadingTrigger(),\n }\n \"\n ></ng-container>\n } @else if (loaderComponent()) {\n <ng-container\n [uiComponentOutlet]=\"loaderComponent()!\"\n [inputs]=\"resolvedLoaderComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>Loading...</span>\n </div>\n }\n </div>\n }\n @if (busyLabel(); as label) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>{{ label }}</span>\n </div>\n </div>\n }\n <!-- #scrollContainer scrolls both axes. If ui-table kept its own\n overflow-x box (which forces overflow-y to auto too), the sticky\n header would stick inside it and scroll away, and its horizontal\n scrollbar would sit under the last row. -->\n <ui-table\n class=\"overflow-visible\"\n [role]=\"enableSubRows() ? 'treegrid' : 'grid'\"\n >\n <ui-table-header class=\"bg-background\">\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [class]=\"getHeaderClass(col)\"\n class=\"group/head\"\n [class.cursor-grab]=\"isColumnDraggable(col)\"\n [class.cursor-grabbing]=\"isDraggingColumn(col)\"\n [class.opacity-70]=\"isDraggingColumn(col)\"\n [class.relative]=\"isDropTargetColumn(col)\"\n [attr.data-column-id]=\"String(col.accessorKey)\"\n [attr.aria-sort]=\"getAriaSort(col)\"\n [attr.draggable]=\"isColumnDraggable(col) ? 'true' : null\"\n [style]=\"getHeaderCellStyle(col)\"\n (dragstart)=\"onColumnDragStart($event, col)\"\n (dragover)=\"onColumnDragOver($event, col)\"\n (drop)=\"onColumnDrop($event, col)\"\n (dragend)=\"onColumnDragEnd()\"\n >\n @if (isDropTargetColumn(col)) {\n <div\n class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/70 bg-primary/10\"\n ></div>\n }\n <div class=\"flex items-center w-full h-full\">\n <div class=\"flex-1 min-w-0\">\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isIndeterminate()\"\n (checkedChange)=\"toggleAll()\"\n ariaLabel=\"Select all\"\n />\n } @else if (col._isTreeExpanderHost) {\n <!-- gap-2 offsets the sort button's -ms-2, which would otherwise pull it over the expand-all button -->\n <div class=\"flex items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllSubRowsExpanded()\n ? 'Collapse all sub-rows'\n : 'Expand all sub-rows'\n \"\n (click)=\"\n isAllSubRowsExpanded()\n ? collapseAllSubRows()\n : expandAllSubRows(-1)\n \"\n >\n @if (isAllSubRowsExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n @if (col.enableSorting !== false) {\n <ui-data-table-column-header\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n } @else {\n <span>{{ col.header }}</span>\n }\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllExpanded()\n ? 'Collapse all rows'\n : 'Expand all rows'\n \"\n (click)=\"toggleAllExpanded()\"\n >\n @if (isAllExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n <span class=\"sr-only\">Actions</span>\n } @else if (col.headerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.headerTemplate;\n context: { $implicit: col }\n \"\n ></ng-container>\n } @else if (col.enableSorting !== false) {\n <div class=\"flex items-center gap-2\">\n <!-- min-w-0: a narrow column truncates its title instead of sliding it under the filter and menu buttons -->\n <ui-data-table-column-header\n class=\"min-w-0\"\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover [closeOnScroll]=\"true\">\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n } @else {\n <div class=\"flex items-center gap-2\">\n <span>{{ col.header }}</span>\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n </div>\n @if (\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @for (slot of headerActionSlots(); track slot.id) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md opacity-0 group-hover/head:opacity-100 touch-visible pointer-coarse:size-11 hover:bg-accent hover:text-accent-foreground transition-opacity\"\n [attr.aria-label]=\"'Column menu for ' + col.header\"\n (click)=\"slot.onClick($event, col)\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"xs\" />\n </button>\n }\n }\n </div>\n @if (\n enableColumnResize() &&\n col.accessorKey !== \"_selection\"\n ) {\n <div\n #resizeHandle\n class=\"group/resize absolute top-0 w-4 h-full cursor-col-resize touch-none z-40 select-none\"\n [class.right-0]=\"!isRtl()\"\n [class.translate-x-1/2]=\"!isRtl()\"\n [class.left-0]=\"isRtl()\"\n [class.-translate-x-1/2]=\"isRtl()\"\n (mousedown)=\"onResizeStart($event, col)\"\n (touchstart)=\"onResizeTouchStart($event, col)\"\n (dblclick)=\"onResizeDoubleClick($event, col)\"\n role=\"separator\"\n [attr.aria-label]=\"'Resize ' + col.header + ' column (double-click or double-tap to auto-fit)'\"\n >\n <div\n [class]=\"resizeLineClass(col)\"\n aria-hidden=\"true\"\n ></div>\n </div>\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none\"\n [class]=\"getHeaderClass({ _width: 'auto' })\"\n ></ui-table-head>\n }\n </ui-table-row>\n @if (enableFloatingFilters() && hasAnyFloatingFilter()) {\n <ui-table-row class=\"border-0\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [role]=\"hasFloatingFilter(col) ? 'columnheader' : 'presentation'\"\n [style]=\"getHeaderCellStyle(col)\"\n class=\"sticky top-[var(--header-height,41px)] z-20 bg-muted/50 py-1 px-1 overflow-hidden pointer-coarse:h-auto\"\n >\n @if (\n col.floatingFilter !== false &&\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @if (col.floatingFilterComponent) {\n <div\n [uiComponentOutlet]=\"col.floatingFilterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n } @else if (col.floatingFilterTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.floatingFilterTemplate;\n context: {\n $implicit: col,\n value: columnFilters()[String(col.accessorKey)],\n change: getFloatingFilterChange(col),\n }\n \"\n ></ng-container>\n } @else if (col.enableFiltering) {\n <ui-input\n class=\"h-7 text-xs\"\n [placeholder]=\"col.header\"\n [ngModel]=\"\n columnFilters()[String(col.accessorKey)] || ''\n \"\n (ngModelChange)=\"\n onColumnFilterChange(col.accessorKey, $event)\n \"\n />\n }\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none sticky top-[var(--header-height,41px)] z-20 bg-muted/50\"\n ></ui-table-head>\n }\n </ui-table-row>\n }\n </ui-table-header>\n <ui-table-body>\n @if (isVirtualScrollActive()) {\n <div\n [style.height.px]=\"virtualPaddingTop()\"\n class=\"flex-shrink-0\"\n ></div>\n @if (enableSubRows()) {\n @for (\n treeRow of virtualVisibleTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [attr.data-state]=\"\n isRowSelected(treeRow.row) ? 'selected' : null\n \"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"\n treeRow.isLeaf ? null : treeRow.isExpanded\n \"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0\"\n >\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n }\n } @else {\n @for (\n row of virtualVisibleRows();\n track getRowId()(row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [attr.data-state]=\"isRowSelected(row) ? 'selected' : null\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, getVirtualRowIndex(i))\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(getVirtualRowIndex(i))) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n @if (virtualTotalRows() === 0) {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <div\n [style.height.px]=\"virtualPaddingBottom()\"\n class=\"flex-shrink-0\"\n ></div>\n } @else if (enableSubRows()) {\n @if (processedTreeRows().length > 0) {\n @for (\n treeRow of processedTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n [attr.data-state]=\"isRowSelected(treeRow.row) ? 'selected' : null\"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [class.opacity-30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-2]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-inset]=\"isRowBeingDragged(treeRow.row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(treeRow.row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"treeRow.isLeaf ? null : treeRow.isExpanded\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(treeRow.row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, treeRow.row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(i)) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, i, treeRow.depth)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"onCellClick(i, col, $event)\"\n (keydown.enter)=\"onCellClick(i, col, $event)\"\n (keydown.space)=\"onCellClick(i, col, $event)\"\n (dblclick)=\"onCellDblClick(i, col, $event)\"\n (touchend)=\"onCellTouchEnd($event, i, col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: i,\n treeRow: treeRow,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(treeRow.row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: treeRow.row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (groupingActive()) {\n @if (pagedGroupedDisplayRows().length > 0) {\n @for (\n displayRow of pagedGroupedDisplayRows();\n track groupTrackBy(displayRow)\n ) {\n @if (isGroupRow(displayRow)) {\n <ui-table-row\n class=\"border-0 bg-muted/40 cursor-pointer select-none\"\n data-slot=\"table-group-row\"\n [attr.data-group-key]=\"displayRow.groupKey\"\n [attr.aria-expanded]=\"!displayRow.collapsed\"\n (click)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.enter)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.space)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n >\n <ui-table-cell\n class=\"flex-1 border-b font-medium\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <div class=\"flex flex-wrap items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n displayRow.collapsed ? 'Expand group' : 'Collapse group'\n \"\n (click)=\"\n $event.stopPropagation();\n toggleGroupCollapsed(displayRow.groupKey)\n \"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"!displayRow.collapsed && !isRtl()\"\n [class.-rotate-90]=\"!displayRow.collapsed && isRtl()\"\n />\n </button>\n <span class=\"truncate\">{{ groupRowValueLabel(displayRow) }}</span>\n <span class=\"text-xs text-muted-foreground\">({{ displayRow.count }})</span>\n @if (groupAggregates()) {\n @for (entry of displayRow.aggregates | keyvalue: keepGroupAggregateOrder; track entry.key) {\n <span class=\"text-xs text-muted-foreground\">\n {{ groupAggregateLabel(entry.key) }}: {{ entry.value }}\n </span>\n }\n }\n </div>\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [attr.data-state]=\"isRowSelected(displayRow.row) ? 'selected' : null\"\n [attr.data-disabled]=\"isDisabled(displayRow.row) || null\"\n [class.opacity-50]=\"isDisabled(displayRow.row)\"\n [attr.data-row-index]=\"displayRow.index\"\n [attr.data-row-id]=\"getRowId()(displayRow.row)\"\n data-slot=\"table-group-data-row\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, displayRow.index)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: displayRow.row,\n rowIndex: displayRow.index,\n treeRow: null,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (processedData().length > 0) {\n @for (\n row of (dragPreviewData() ?? processedData());\n track getRowId()(row);\n let i = $index\n ) {\n @if (isFullWidthRow(row)) {\n <ui-table-row\n [attr.data-state]=\"isRowSelected(row) ? 'selected' : null\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n class=\"border-0\"\n >\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n @if (fullWidthRowTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n fullWidthRowTemplate();\n context: { $implicit: row, index: i }\n \"\n ></ng-container>\n } @else if (fullWidthRowComponent()) {\n <div\n [uiComponentOutlet]=\"fullWidthRowComponent()!\"\n [inputs]=\"{ row: row, index: i }\"\n ></div>\n }\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [attr.data-state]=\"isRowSelected(row) ? 'selected' : null\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [class.ring-2]=\"isRowBeingDragged(row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(row)\"\n [class.ring-inset]=\"isRowBeingDragged(row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell [class]=\"getCellClass(col, i)\" [attr.data-column]=\"String(col.accessorKey)\" [style]=\"getCellStyle(col)\" (click)=\"onCellClick(i, col, $event)\" (keydown.enter)=\"onCellClick(i, col, $event)\" (keydown.space)=\"onCellClick(i, col, $event)\" (dblclick)=\"onCellDblClick(i, col, $event)\" (touchend)=\"onCellTouchEnd($event, i, col)\">\n <ng-container *ngTemplateOutlet=\"cellTpl; context: { $implicit: col, row: row, rowIndex: i, treeRow: null, recycle: false }\"></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell class=\"flex-1 pointer-events-none\" [class]=\"getCellClass({ _width: 'auto' })\"></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell class=\"flex-1 border-b\" style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\">\n <ng-container *ngTemplateOutlet=\"rowDetailTpl; context: { $implicit: row }\"></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <!-- A spacer that stretches the body to fill the container. It holds\n no data and cannot be reached, so it is hidden from assistive\n tech rather than counted as a row of the grid. -->\n <ui-table-row class=\"h-full\" aria-hidden=\"true\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col)\"\n [style]=\"getCellStyle(col)\"\n class=\"bg-background border-0 p-0\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </ui-table-body>\n @if (hasFooter()) {\n <div\n class=\"sticky bottom-0 z-20 bg-background border-t\"\n data-slot=\"table-footer\"\n >\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [style]=\"getCellStyle(col)\"\n class=\"whitespace-nowrap overflow-hidden text-ellipsis text-sm font-medium text-muted-foreground\"\n >\n @if (col.footerComponent) {\n <div\n [uiComponentOutlet]=\"col.footerComponent\"\n [inputs]=\"{\n column: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\"\n ></div>\n } @else if (col.footerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.footerTemplate;\n context: {\n $implicit: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\n \"\n ></ng-container>\n } @else {\n {{ footerValues().get(String(col.accessorKey)) || \"\" }}\n }\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </div>\n }\n </ui-table>\n\n @if (enableFillHandle() && fillHandlePosition(); as pos) {\n <span\n data-slot=\"fill-handle\"\n class=\"absolute z-20 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 cursor-crosshair rounded-[2px] border border-background bg-primary\"\n style=\"touch-action: none;\"\n aria-hidden=\"true\"\n [style.top.px]=\"pos.top\"\n [style.left.px]=\"pos.left\"\n (mousedown)=\"onFillHandleStart($event)\"\n (touchstart)=\"onFillHandleStart($event)\"\n ></span>\n }\n\n @if (enableRangeActions() && rangeSelectionStats(); as stats) {\n <div\n data-slot=\"range-actions\"\n class=\"sticky bottom-0 z-20 flex max-w-[calc(100vw-2rem)] flex-wrap items-center gap-x-4 gap-y-1 border-t bg-background/95 px-3 py-1.5 text-xs backdrop-blur-sm\"\n >\n <span class=\"text-muted-foreground\">{{ rangeLabels().count }}: <span class=\"text-foreground font-medium\">{{ stats.count }}</span></span>\n @if (stats.numericCount > 0) {\n <span class=\"text-muted-foreground\">{{ rangeLabels().sum }}: <span class=\"text-foreground font-medium\">{{ stats.sum }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().avg }}: <span class=\"text-foreground font-medium\">{{ stats.avg }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().min }}: <span class=\"text-foreground font-medium\">{{ stats.min }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().max }}: <span class=\"text-foreground font-medium\">{{ stats.max }}</span></span>\n @if (rangeChartPayload()) {\n <ui-button\n size=\"sm\"\n variant=\"outline\"\n class=\"ms-auto h-6 px-2 pointer-coarse:h-11\"\n [ariaLabel]=\"rangeLabels().chart\"\n (click)=\"openRangeChart()\"\n >\n <ui-icon name=\"bar-chart-3\" size=\"xs\" class=\"me-1\" />{{ rangeLabels().chart }}\n </ui-button>\n }\n }\n </div>\n }\n </div>\n\n @if (showPagination()) {\n <ui-data-table-pagination\n class=\"flex-none\"\n [total]=\"activeTotalItems()\"\n [state]=\"paginationState()\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [showPageSizeSelector]=\"showPageSizeSelector()\"\n [rowsPerPageLabel]=\"rowsPerPageLabel()\"\n [pageLabel]=\"pageLabel()\"\n [ofLabel]=\"ofLabel()\"\n (paginationChange)=\"onPaginationChange($event)\"\n />\n }\n </div>\n } <!-- end @else skeleton -->\n", styles: [":host([data-ui-theme=\"neutral\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=neutral]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"zinc\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=zinc]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"slate\"]){--primary: oklch(.208 .042 265.755);--primary-foreground: oklch(.984 .003 247.858);--ring: oklch(.704 .04 256.788)}:host-context(.dark)[data-ui-theme=slate]{--primary: oklch(.929 .013 255.508);--primary-foreground: oklch(.208 .042 265.755);--ring: oklch(.704 .04 256.788)}:host([data-ui-theme=\"stone\"]){--primary: oklch(.216 .006 56.043);--primary-foreground: oklch(.985 .001 106.423);--ring: oklch(.709 .01 56.259)}:host-context(.dark)[data-ui-theme=stone]{--primary: oklch(.923 .003 48.717);--primary-foreground: oklch(.216 .006 56.043);--ring: oklch(.553 .013 58.071)}:host([data-ui-theme=\"gray\"]){--primary: oklch(.21 .028 264.532);--primary-foreground: oklch(.985 .002 247.839);--ring: oklch(.707 .022 264.436)}:host-context(.dark)[data-ui-theme=gray]{--primary: oklch(.928 .006 264.531);--primary-foreground: oklch(.21 .028 264.532);--ring: oklch(.551 .027 264.364)}:host([data-ui-theme=\"red\"]){--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host-context(.dark)[data-ui-theme=red]{--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host([data-ui-theme=\"rose\"]){--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host-context(.dark)[data-ui-theme=rose]{--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host([data-ui-theme=\"orange\"]){--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host-context(.dark)[data-ui-theme=orange]{--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host([data-ui-theme=\"green\"]){--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host-context(.dark)[data-ui-theme=green]{--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host([data-ui-theme=\"blue\"]){--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host-context(.dark)[data-ui-theme=blue]{--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host([data-ui-theme=\"yellow\"]){--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host-context(.dark)[data-ui-theme=yellow]{--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host([data-ui-theme=\"violet\"]){--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host-context(.dark)[data-ui-theme=violet]{--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host([data-ui-theme=\"amber\"]){--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}:host-context(.dark)[data-ui-theme=amber]{--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TableComponent, selector: "ui-table", inputs: ["class", "role"] }, { kind: "component", type: TableHeaderComponent, selector: "ui-table-header", inputs: ["class"] }, { kind: "component", type: TableBodyComponent, selector: "ui-table-body", inputs: ["class", "skeleton", "skeletonRows"] }, { kind: "component", type: TableRowComponent, selector: "ui-table-row", inputs: ["class", "selected"] }, { kind: "component", type: TableHeadComponent, selector: "ui-table-head", inputs: ["class", "role"] }, { kind: "component", type: TableCellComponent, selector: "ui-table-cell", inputs: ["class"] }, { kind: "component", type: InputComponent, selector: "ui-input", inputs: ["type", "placeholder", "disabled", "class", "elementId", "name", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "variant", "loading", "skeleton", "autofocus", "clearable", "floating", "label", "labelClass", "inputMode", "lang", "prefix", "suffix", "value"], outputs: ["valueChange"] }, { kind: "component", type: CheckboxComponent, selector: "ui-checkbox", inputs: ["disabled", "class", "skeleton", "elementId", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "ariaInvalid", "checked", "indeterminate", "label"], outputs: ["checkedChange"] }, { kind: "component", type: DatePickerComponent, selector: "ui-date-picker", inputs: ["class", "placeholder", "disabled", "showTime", "locale", "date"], outputs: ["dateChange"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: DataTableColumnHeaderComponent, selector: "ui-data-table-column-header", inputs: ["title", "column", "direction", "enableSorting", "class", "sortIndex"], outputs: ["sort", "sortMeta"] }, { kind: "component", type: DataTablePaginationComponent, selector: "ui-data-table-pagination", inputs: ["class", "total", "state", "pageSizeOptions", "showPageSizeSelector", "rowsPerPageLabel", "pageLabel", "ofLabel"], outputs: ["paginationChange"] }, { kind: "component", type: DataTableFilterBuilderComponent, selector: "ui-data-table-filter-builder", inputs: ["class", "group", "columns", "labels"], outputs: ["groupChange"] }, { kind: "directive", type: UiComponentOutletDirective, selector: "[uiComponentOutlet]", inputs: ["uiComponentOutlet", "inputs", "outputs", "recycle"], outputs: ["initialized"] }, { kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }, { kind: "pipe", type: i1$1.JsonPipe, name: "json" }, { kind: "pipe", type: i1$1.KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
15597
+ ], viewQueries: [{ propertyName: "scrollContainerRef", first: true, predicate: ["scrollContainer"], descendants: true, isSignal: true }, { propertyName: "virtualRowElements", predicate: ["virtualRow"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "resizeHandles", predicate: ["resizeHandle"], descendants: true, isSignal: true }], ngImport: i0, template: " <!-- Reusable: cell content rendering (component/template/cell/default) -->\n <ng-template\n #cellContentTpl\n let-col\n let-row=\"row\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.component) {\n <div\n [uiComponentOutlet]=\"col.component\"\n [inputs]=\"\n treeRow\n ? getSubRowComponentInputs(col, treeRow)\n : col.componentInputs\n ? col.componentInputs(row)\n : EMPTY_RECORD\n \"\n [outputs]=\"\n col.componentOutputs ? col.componentOutputs(row) : EMPTY_RECORD\n \"\n [recycle]=\"recycle\"\n ></div>\n } @else if (col.template) {\n @if (treeRow) {\n <ng-container\n *ngTemplateOutlet=\"\n col.template;\n context: {\n $implicit: row,\n depth: treeRow.depth,\n parentRow: treeRow.parentRow,\n parentId: treeRow.parentId,\n path: treeRow.path,\n isLeaf: treeRow.isLeaf,\n childCount: treeRow.childCount,\n }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"col.template; context: { $implicit: row }\"\n ></ng-container>\n }\n } @else {\n @let fmt = getCellFormatting(col, row);\n @if (fmt) {\n <span\n data-slot=\"cell-formatted\"\n class=\"relative flex w-full items-center gap-1.5 {{ fmt.class }}\"\n [style]=\"fmt.style\"\n >\n @if (fmt.dataBar) {\n @if (fmt.dataBar.track; as track) {\n <span\n data-slot=\"cell-data-bar-track\"\n class=\"pointer-events-none absolute inset-x-0 inset-y-0.5 rounded-sm\"\n [style.background-color]=\"track\"\n ></span>\n }\n <span\n data-slot=\"cell-data-bar\"\n class=\"pointer-events-none absolute inset-y-0.5 start-0 rounded-sm\"\n [style.width]=\"fmt.dataBar.width\"\n [style.background-color]=\"fmt.dataBar.color\"\n ></span>\n }\n @if (fmt.icon) {\n @if (fmt.icon.name) {\n <ui-icon\n data-slot=\"cell-icon\"\n [name]=\"fmt.icon.name\"\n size=\"xs\"\n class=\"relative shrink-0 {{ fmt.icon.class }}\"\n />\n } @else if (fmt.icon.glyph) {\n <span data-slot=\"cell-icon\" class=\"relative shrink-0 {{ fmt.icon.class }}\">{{ fmt.icon.glyph }}</span>\n }\n }\n <span class=\"relative min-w-0 truncate\">\n @if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n </span>\n </span>\n } @else if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n }\n </ng-template>\n\n <!-- Reusable: full cell rendering (special columns + content) -->\n <ng-template\n #cellTpl\n let-col\n let-row=\"row\"\n let-rowIndex=\"rowIndex\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isRowSelected(row)\"\n [disabled]=\"isDisabled(row)\"\n [indeterminate]=\"\n treeRow ? isSubRowSelectionIndeterminate(row) : false\n \"\n (checkedChange)=\"treeRow ? toggleRowWithCascade(row) : toggleRow(row)\"\n ariaLabel=\"Select row\"\n />\n } @else if (col._isTreeExpanderHost && treeRow) {\n <div\n class=\"flex items-center gap-1 min-w-0\"\n [style.padding-inline-start.px]=\"treeRow.depth * subRowIndentSize()\"\n >\n @if (!treeRow.isLeaf) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n treeRow.isExpanded ? 'Collapse sub-rows' : 'Expand sub-rows'\n \"\n (click)=\"toggleSubRowExpanded(treeRow.row, $event)\"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"treeRow.isExpanded && !isRtl()\"\n [class.-rotate-90]=\"treeRow.isExpanded && isRtl()\"\n />\n </button>\n } @else {\n <span class=\"inline-block h-6 w-6 shrink-0\"></span>\n }\n <span class=\"truncate\">\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n </span>\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"isRowExpanded(row) ? 'Collapse row' : 'Expand row'\"\n [attr.aria-expanded]=\"isRowExpanded(row)\"\n (click)=\"toggleRowExpanded(row, $event)\"\n >\n @if (isRowExpanded(row)) {\n <ui-icon name=\"chevron-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevron-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n @if (!isDisabled(row)) {\n @for (slot of cellActionSlots(); track slot.id) {\n <ui-button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-8 w-8 pointer-coarse:size-11\"\n [ariaLabel]=\"slot.ariaLabel ?? 'Row actions'\"\n (click)=\"slot.onClick($event, getRowContext(row, rowIndex))\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"sm\" />\n </ui-button>\n }\n }\n } @else if (\n col.editable && isEditing(rowIndex, String(col.accessorKey))\n ) {\n <ng-container\n *ngTemplateOutlet=\"\n cellEditTpl;\n context: { $implicit: col, row: row, rowIndex: rowIndex }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n }\n </ng-template>\n\n <!-- Reusable: cell edit mode -->\n <ng-template #cellEditTpl let-col let-row=\"row\" let-rowIndex=\"rowIndex\">\n @let editErr = editErrorFor(rowIndex, col);\n @if (col.editComponent) {\n <div\n [uiComponentOutlet]=\"col.editComponent\"\n [inputs]=\"{ value: editValue(), row: row, column: col }\"\n [outputs]=\"{\n valueChange: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\"\n ></div>\n } @else if (col.editTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.editTemplate;\n context: {\n $implicit: editValue(),\n row: row,\n column: col,\n setValue: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\n \"\n ></ng-container>\n } @else if (col.editType === \"checkbox\") {\n <ui-checkbox\n [checked]=\"!!editValue()\"\n [ariaInvalid]=\"editErr ? true : undefined\"\n [ariaDescribedby]=\"editErr ? cellEditErrorId : undefined\"\n (checkedChange)=\"onEditValueChange($event); commitEdit()\"\n />\n } @else if (col.editType === \"date\") {\n <ui-date-picker\n class=\"w-full\"\n [date]=\"editDateValue()\"\n (dateChange)=\"onEditDateChange($event)\"\n />\n } @else if (col.editType === \"select\" && col.editOptions) {\n <select\n data-edit-input\n class=\"w-full h-full bg-background border-0 outline-none text-sm px-1\"\n [class.ring-1]=\"editErr\"\n [class.ring-inset]=\"editErr\"\n [class.ring-destructive]=\"editErr\"\n [attr.aria-invalid]=\"editErr ? true : null\"\n [attr.aria-describedby]=\"editErr ? cellEditErrorId : null\"\n (change)=\"onEditSelect($any($event.target), col)\"\n (keydown)=\"onEditKeydown($event)\"\n >\n @let chosen = editOptionIndex(col);\n @if (chosen === -1) {\n <option value=\"\" selected disabled hidden></option>\n }\n @for (opt of col.editOptions; track $index; let i = $index) {\n <option [value]=\"i\" [selected]=\"i === chosen\">{{ opt.label }}</option>\n }\n </select>\n } @else {\n <input\n data-edit-input\n [type]=\"col.editType === 'number' ? 'number' : 'text'\"\n class=\"w-full h-full bg-background border-0 outline-none text-sm px-1 select-text\"\n [class.ring-1]=\"editErr\"\n [class.ring-inset]=\"editErr\"\n [class.ring-destructive]=\"editErr\"\n [attr.aria-invalid]=\"editErr ? true : null\"\n [attr.aria-describedby]=\"editErr ? cellEditErrorId : null\"\n [value]=\"col.editType === 'number' ? editText() : editValue()\"\n (input)=\"onEditInput($any($event.target), col)\"\n (keydown)=\"onEditKeydown($event)\"\n (blur)=\"editingCell() ? commitEdit() : null\"\n />\n }\n @if (editErr) {\n <p\n [id]=\"cellEditErrorId\"\n class=\"mt-0.5 px-1 text-xs text-destructive\"\n role=\"alert\"\n data-slot=\"cell-edit-error\"\n >\n {{ editErr }}\n </p>\n }\n </ng-template>\n\n <!-- Reusable: row detail/expansion panel -->\n <ng-template #rowDetailTpl let-row>\n @if (rowDetailTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTemplate();\n context: { $implicit: row, row: row }\n \"\n ></ng-container>\n } @else if (rowDetailComponent()) {\n <div\n [uiComponentOutlet]=\"rowDetailComponent()!\"\n [inputs]=\"getRowDetailComponentInputs(row)\"\n ></div>\n } @else {\n <pre class=\"text-xs text-muted-foreground whitespace-pre-wrap\">{{\n row | json\n }}</pre>\n }\n </ng-template>\n\n <!-- Reusable: empty state -->\n <ng-template #emptyStateTpl>\n <ui-table-row class=\"hover:bg-transparent justify-center w-full\">\n <ui-table-cell\n class=\"h-48 sm:h-96 text-center w-full p-0 border-none justify-center\"\n >\n @if (emptyStateComponent()) {\n <ng-container\n [uiComponentOutlet]=\"emptyStateComponent()!\"\n [inputs]=\"emptyStateComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex h-full flex-col items-center justify-center py-10 text-center text-muted-foreground w-full\"\n >\n <ui-icon name=\"circle-off\" size=\"xl\" class=\"mb-4 opacity-20\" />\n <p>{{ noResultsLabel() }}</p>\n </div>\n }\n </ui-table-cell>\n </ui-table-row>\n </ng-template>\n\n @if (skeleton()) {\n <div class=\"flex flex-col w-full space-y-3\" data-slot=\"data-table-skeleton\">\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n @for (row of skeletonRowsArray(); track $index) {\n <ui-skeleton class=\"h-12 w-full rounded-md\" />\n }\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n </div>\n } @else {\n <!-- `relative`: the sr-only announcer and the sr-only cell labels below are\n position:absolute. Without a positioned ancestor their containing block\n is <html>, so they escape this table's scroll container entirely and\n stretch the document to their static position \u2014 which on a page with a\n virtual-scroll table adds a second, page-length scrollbar. -->\n <div class=\"relative flex flex-col w-full h-full space-y-4\">\n <output\n class=\"sr-only\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n data-slot=\"data-table-announcer\"\n >\n {{ srAnnouncement() }}\n </output>\n @if (showToolbar()) {\n <div class=\"flex flex-wrap items-center justify-between gap-2 flex-none\">\n <div class=\"flex flex-1 flex-wrap items-center gap-2\">\n <ui-input\n [placeholder]=\"filterPlaceholder()\"\n [ngModel]=\"globalFilter()\"\n (ngModelChange)=\"onFilterChange($event)\"\n class=\"h-8 w-full sm:w-[150px] lg:w-[250px]\"\n />\n @if (hasAi() && enableNlFilter()) {\n <div class=\"flex items-center gap-1\" data-slot=\"table-nl-filter\">\n <span aria-hidden=\"true\" class=\"text-sm\">\u2728</span>\n <ui-input\n [placeholder]=\"nlFilterPlaceholder()\"\n [ngModel]=\"aiFilterQuery()\"\n (ngModelChange)=\"aiFilterQuery.set($event)\"\n [disabled]=\"aiFilterRunning()\"\n (keydown.enter)=\"runAiFilter()\"\n class=\"h-8 w-full sm:w-[200px]\"\n />\n </div>\n }\n @if (enableAdvancedFilter()) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n data-slot=\"advanced-filter-trigger\"\n class=\"inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 pointer-coarse:h-11 pointer-coarse:min-w-11 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-icon name=\"filter\" size=\"xs\" />\n <span class=\"hidden sm:inline\">{{ filterBuilderLabels().filterButton }}</span>\n @if (advancedFilterCount() > 0) {\n <span class=\"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-xs text-primary-foreground\">{{ advancedFilterCount() }}</span>\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-[min(420px,calc(100vw-2rem))] p-2\">\n <div class=\"space-y-2\">\n <ui-data-table-filter-builder\n [group]=\"advancedFilterGroup()\"\n [columns]=\"filterBuilderColumns()\"\n [labels]=\"filterBuilderLabels()\"\n (groupChange)=\"onAdvancedFilterChange($event)\"\n />\n @if (advancedFilterCount() > 0) {\n <button\n type=\"button\"\n class=\"text-xs text-muted-foreground hover:text-destructive\"\n (click)=\"clearAdvancedFilter()\"\n >{{ filterBuilderLabels().clearFilters }}</button>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n @if (showColumnVisibilityToggle() && hideableColumns().length > 0) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n class=\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n [attr.aria-label]=\"toggleColumnsLabel()\"\n >\n {{ columnsLabel() }}\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-56 p-2\">\n <div class=\"space-y-1\">\n @for (col of hideableColumns(); track col.accessorKey) {\n <div\n class=\"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-checkbox\n [checked]=\"isColumnVisible(col.accessorKey)\"\n (checkedChange)=\"\n setColumnVisibility(col.accessorKey, $event)\n \"\n [ariaLabel]=\"toggleColumnAriaLabel(col.header)\"\n />\n <span>{{ col.header }}</span>\n </div>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n\n <div\n #scrollContainer\n class=\"rounded-md border relative flex-1 min-h-0 overflow-auto w-full\"\n [class.contain-strict]=\"isVirtualScrollActive()\"\n [class.will-change-scroll]=\"isVirtualScrollActive()\"\n [class.select-none]=\"enableCellRangeSelection()\"\n (keydown)=\"onTableKeydown($event)\"\n (click)=\"onTableClick()\"\n (mousedown)=\"onTableMouseDown($event)\"\n (scroll)=\"isVirtualScrollActive() ? onVirtualScroll($event) : null\"\n (dragover)=\"onContainerDragOver($event)\"\n (drop)=\"onRowDrop($event)\"\n tabindex=\"0\"\n >\n @if (isLoaderVisible()) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n @if (loaderTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n loaderTemplate();\n context: {\n $implicit: loadingTrigger(),\n trigger: loadingTrigger(),\n }\n \"\n ></ng-container>\n } @else if (loaderComponent()) {\n <ng-container\n [uiComponentOutlet]=\"loaderComponent()!\"\n [inputs]=\"resolvedLoaderComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>Loading...</span>\n </div>\n }\n </div>\n }\n @if (busyLabel(); as label) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>{{ label }}</span>\n </div>\n </div>\n }\n <!-- #scrollContainer scrolls both axes. If ui-table kept its own\n overflow-x box (which forces overflow-y to auto too), the sticky\n header would stick inside it and scroll away, and its horizontal\n scrollbar would sit under the last row. -->\n <ui-table\n class=\"overflow-visible\"\n [role]=\"enableSubRows() || groupingActive() ? 'treegrid' : 'grid'\"\n >\n <ui-table-header class=\"bg-background\">\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [class]=\"getHeaderClass(col)\"\n class=\"group/head\"\n [class.cursor-grab]=\"isColumnDraggable(col)\"\n [class.cursor-grabbing]=\"isDraggingColumn(col)\"\n [class.opacity-70]=\"isDraggingColumn(col)\"\n [class.relative]=\"isDropTargetColumn(col)\"\n [attr.data-column-id]=\"String(col.accessorKey)\"\n [attr.aria-sort]=\"getAriaSort(col)\"\n [attr.draggable]=\"isColumnDraggable(col) ? 'true' : null\"\n [style]=\"getHeaderCellStyle(col)\"\n (dragstart)=\"onColumnDragStart($event, col)\"\n (dragover)=\"onColumnDragOver($event, col)\"\n (drop)=\"onColumnDrop($event, col)\"\n (dragend)=\"onColumnDragEnd()\"\n >\n @if (isDropTargetColumn(col)) {\n <div\n class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/70 bg-primary/10\"\n ></div>\n }\n <div class=\"flex items-center w-full h-full\">\n <div class=\"flex-1 min-w-0\">\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isIndeterminate()\"\n (checkedChange)=\"toggleAll()\"\n ariaLabel=\"Select all\"\n />\n } @else if (col._isTreeExpanderHost) {\n <!-- gap-2 offsets the sort button's -ms-2, which would otherwise pull it over the expand-all button -->\n <div class=\"flex items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllSubRowsExpanded()\n ? 'Collapse all sub-rows'\n : 'Expand all sub-rows'\n \"\n (click)=\"\n isAllSubRowsExpanded()\n ? collapseAllSubRows()\n : expandAllSubRows(-1)\n \"\n >\n @if (isAllSubRowsExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n @if (col.enableSorting !== false) {\n <ui-data-table-column-header\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n } @else {\n <span>{{ col.header }}</span>\n }\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllExpanded()\n ? 'Collapse all rows'\n : 'Expand all rows'\n \"\n (click)=\"toggleAllExpanded()\"\n >\n @if (isAllExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n <span class=\"sr-only\">Actions</span>\n } @else if (col.headerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.headerTemplate;\n context: { $implicit: col }\n \"\n ></ng-container>\n } @else if (col.enableSorting !== false) {\n <div class=\"flex items-center gap-2\">\n <!-- min-w-0: a narrow column truncates its title instead of sliding it under the filter and menu buttons -->\n <ui-data-table-column-header\n class=\"min-w-0\"\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover [closeOnScroll]=\"true\">\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n } @else {\n <div class=\"flex items-center gap-2\">\n <span>{{ col.header }}</span>\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n </div>\n @if (\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @for (slot of headerActionSlots(); track slot.id) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md opacity-0 group-hover/head:opacity-100 touch-visible pointer-coarse:size-11 hover:bg-accent hover:text-accent-foreground transition-opacity\"\n [attr.aria-label]=\"'Column menu for ' + col.header\"\n (click)=\"slot.onClick($event, col)\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"xs\" />\n </button>\n }\n }\n </div>\n @if (\n enableColumnResize() &&\n col.accessorKey !== \"_selection\"\n ) {\n <div\n #resizeHandle\n class=\"group/resize absolute top-0 w-4 h-full cursor-col-resize touch-none z-40 select-none\"\n [class.right-0]=\"!isRtl()\"\n [class.translate-x-1/2]=\"!isRtl()\"\n [class.left-0]=\"isRtl()\"\n [class.-translate-x-1/2]=\"isRtl()\"\n (mousedown)=\"onResizeStart($event, col)\"\n (touchstart)=\"onResizeTouchStart($event, col)\"\n (dblclick)=\"onResizeDoubleClick($event, col)\"\n role=\"separator\"\n [attr.aria-label]=\"'Resize ' + col.header + ' column (double-click or double-tap to auto-fit)'\"\n >\n <div\n [class]=\"resizeLineClass(col)\"\n aria-hidden=\"true\"\n ></div>\n </div>\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none\"\n [class]=\"getHeaderClass({ _width: 'auto' })\"\n ></ui-table-head>\n }\n </ui-table-row>\n @if (enableFloatingFilters() && hasAnyFloatingFilter()) {\n <ui-table-row class=\"border-0\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [role]=\"hasFloatingFilter(col) ? 'columnheader' : 'presentation'\"\n [style]=\"getHeaderCellStyle(col)\"\n class=\"sticky top-[var(--header-height,41px)] z-20 bg-muted/50 py-1 px-1 overflow-hidden pointer-coarse:h-auto\"\n >\n @if (\n col.floatingFilter !== false &&\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @if (col.floatingFilterComponent) {\n <div\n [uiComponentOutlet]=\"col.floatingFilterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n } @else if (col.floatingFilterTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.floatingFilterTemplate;\n context: {\n $implicit: col,\n value: columnFilters()[String(col.accessorKey)],\n change: getFloatingFilterChange(col),\n }\n \"\n ></ng-container>\n } @else if (col.enableFiltering) {\n <ui-input\n class=\"h-7 text-xs\"\n [placeholder]=\"col.header\"\n [ngModel]=\"\n columnFilters()[String(col.accessorKey)] || ''\n \"\n (ngModelChange)=\"\n onColumnFilterChange(col.accessorKey, $event)\n \"\n />\n }\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none sticky top-[var(--header-height,41px)] z-20 bg-muted/50\"\n ></ui-table-head>\n }\n </ui-table-row>\n }\n </ui-table-header>\n <ui-table-body>\n @if (isVirtualScrollActive()) {\n <div\n [style.height.px]=\"virtualPaddingTop()\"\n class=\"flex-shrink-0\"\n ></div>\n @if (enableSubRows()) {\n @for (\n treeRow of virtualVisibleTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [selected]=\"isRowSelected(treeRow.row)\"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"\n treeRow.isLeaf ? null : treeRow.isExpanded\n \"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0\"\n >\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n }\n } @else {\n @for (\n row of virtualVisibleRows();\n track getRowId()(row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, getVirtualRowIndex(i))\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(getVirtualRowIndex(i))) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n @if (virtualTotalRows() === 0) {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <div\n [style.height.px]=\"virtualPaddingBottom()\"\n class=\"flex-shrink-0\"\n ></div>\n } @else if (enableSubRows()) {\n @if (processedTreeRows().length > 0) {\n @for (\n treeRow of processedTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n [selected]=\"isRowSelected(treeRow.row)\"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [class.opacity-30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-2]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-inset]=\"isRowBeingDragged(treeRow.row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(treeRow.row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"treeRow.isLeaf ? null : treeRow.isExpanded\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(treeRow.row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, treeRow.row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(i)) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, i, treeRow.depth)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"onCellClick(i, col, $event)\"\n (keydown.enter)=\"onCellClick(i, col, $event)\"\n (keydown.space)=\"onCellClick(i, col, $event)\"\n (dblclick)=\"onCellDblClick(i, col, $event)\"\n (touchend)=\"onCellTouchEnd($event, i, col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: i,\n treeRow: treeRow,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(treeRow.row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: treeRow.row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (groupingActive()) {\n @if (pagedGroupedDisplayRows().length > 0) {\n @for (\n displayRow of pagedGroupedDisplayRows();\n track groupTrackBy(displayRow)\n ) {\n @if (isGroupRow(displayRow)) {\n <ui-table-row\n class=\"border-0 bg-muted/40 cursor-pointer select-none\"\n data-slot=\"table-group-row\"\n [attr.data-group-key]=\"displayRow.groupKey\"\n [attr.aria-expanded]=\"!displayRow.collapsed\"\n (click)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.enter)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.space)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n >\n <ui-table-cell\n class=\"flex-1 border-b font-medium\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <div class=\"flex flex-wrap items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n displayRow.collapsed ? 'Expand group' : 'Collapse group'\n \"\n (click)=\"\n $event.stopPropagation();\n toggleGroupCollapsed(displayRow.groupKey)\n \"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"!displayRow.collapsed && !isRtl()\"\n [class.-rotate-90]=\"!displayRow.collapsed && isRtl()\"\n />\n </button>\n <span class=\"truncate\">{{ groupRowValueLabel(displayRow) }}</span>\n <span class=\"text-xs text-muted-foreground\">({{ displayRow.count }})</span>\n @if (groupAggregates()) {\n @for (entry of displayRow.aggregates | keyvalue: keepGroupAggregateOrder; track entry.key) {\n <span class=\"text-xs text-muted-foreground\">\n {{ groupAggregateLabel(entry.key) }}: {{ entry.value }}\n </span>\n }\n }\n </div>\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [selected]=\"isRowSelected(displayRow.row)\"\n [attr.data-disabled]=\"isDisabled(displayRow.row) || null\"\n [class.opacity-50]=\"isDisabled(displayRow.row)\"\n [attr.data-row-index]=\"displayRow.index\"\n [attr.data-row-id]=\"getRowId()(displayRow.row)\"\n data-slot=\"table-group-data-row\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, displayRow.index)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: displayRow.row,\n rowIndex: displayRow.index,\n treeRow: null,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (processedData().length > 0) {\n @for (\n row of (dragPreviewData() ?? processedData());\n track getRowId()(row);\n let i = $index\n ) {\n @if (isFullWidthRow(row)) {\n <ui-table-row\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n class=\"border-0\"\n >\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n @if (fullWidthRowTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n fullWidthRowTemplate();\n context: { $implicit: row, index: i }\n \"\n ></ng-container>\n } @else if (fullWidthRowComponent()) {\n <div\n [uiComponentOutlet]=\"fullWidthRowComponent()!\"\n [inputs]=\"{ row: row, index: i }\"\n ></div>\n }\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [class.ring-2]=\"isRowBeingDragged(row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(row)\"\n [class.ring-inset]=\"isRowBeingDragged(row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell [class]=\"getCellClass(col, i)\" [attr.data-column]=\"String(col.accessorKey)\" [style]=\"getCellStyle(col)\" (click)=\"onCellClick(i, col, $event)\" (keydown.enter)=\"onCellClick(i, col, $event)\" (keydown.space)=\"onCellClick(i, col, $event)\" (dblclick)=\"onCellDblClick(i, col, $event)\" (touchend)=\"onCellTouchEnd($event, i, col)\">\n <ng-container *ngTemplateOutlet=\"cellTpl; context: { $implicit: col, row: row, rowIndex: i, treeRow: null, recycle: false }\"></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell class=\"flex-1 pointer-events-none\" [class]=\"getCellClass({ _width: 'auto' })\"></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell class=\"flex-1 border-b\" style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\">\n <ng-container *ngTemplateOutlet=\"rowDetailTpl; context: { $implicit: row }\"></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <!-- A spacer that stretches the body to fill the container. It holds\n no data and cannot be reached, so it is hidden from assistive\n tech rather than counted as a row of the grid. -->\n <ui-table-row class=\"h-full\" aria-hidden=\"true\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col)\"\n [style]=\"getCellStyle(col)\"\n class=\"bg-background border-0 p-0\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </ui-table-body>\n @if (hasFooter()) {\n <div\n class=\"sticky bottom-0 z-20 bg-background border-t\"\n data-slot=\"table-footer\"\n >\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [style]=\"getCellStyle(col)\"\n class=\"whitespace-nowrap overflow-hidden text-ellipsis text-sm font-medium text-muted-foreground\"\n >\n @if (col.footerComponent) {\n <div\n [uiComponentOutlet]=\"col.footerComponent\"\n [inputs]=\"{\n column: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\"\n ></div>\n } @else if (col.footerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.footerTemplate;\n context: {\n $implicit: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\n \"\n ></ng-container>\n } @else {\n {{ footerValues().get(String(col.accessorKey)) || \"\" }}\n }\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </div>\n }\n </ui-table>\n\n @if (enableFillHandle() && fillHandlePosition(); as pos) {\n <span\n data-slot=\"fill-handle\"\n class=\"absolute z-20 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 cursor-crosshair rounded-[2px] border border-background bg-primary\"\n style=\"touch-action: none;\"\n aria-hidden=\"true\"\n [style.top.px]=\"pos.top\"\n [style.left.px]=\"pos.left\"\n (mousedown)=\"onFillHandleStart($event)\"\n (touchstart)=\"onFillHandleStart($event)\"\n ></span>\n }\n\n @if (enableRangeActions() && rangeSelectionStats(); as stats) {\n <div\n data-slot=\"range-actions\"\n class=\"sticky bottom-0 z-20 flex max-w-[calc(100vw-2rem)] flex-wrap items-center gap-x-4 gap-y-1 border-t bg-background/95 px-3 py-1.5 text-xs backdrop-blur-sm\"\n >\n <span class=\"text-muted-foreground\">{{ rangeLabels().count }}: <span class=\"text-foreground font-medium\">{{ stats.count }}</span></span>\n @if (stats.numericCount > 0) {\n <span class=\"text-muted-foreground\">{{ rangeLabels().sum }}: <span class=\"text-foreground font-medium\">{{ stats.sum }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().avg }}: <span class=\"text-foreground font-medium\">{{ stats.avg }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().min }}: <span class=\"text-foreground font-medium\">{{ stats.min }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().max }}: <span class=\"text-foreground font-medium\">{{ stats.max }}</span></span>\n @if (rangeChartPayload()) {\n <ui-button\n size=\"sm\"\n variant=\"outline\"\n class=\"ms-auto h-6 px-2 pointer-coarse:h-11\"\n [ariaLabel]=\"rangeLabels().chart\"\n (click)=\"openRangeChart()\"\n >\n <ui-icon name=\"bar-chart-3\" size=\"xs\" class=\"me-1\" />{{ rangeLabels().chart }}\n </ui-button>\n }\n }\n </div>\n }\n </div>\n\n @if (showPagination()) {\n <ui-data-table-pagination\n class=\"flex-none\"\n [total]=\"activeTotalItems()\"\n [state]=\"paginationState()\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [showPageSizeSelector]=\"showPageSizeSelector()\"\n [rowsPerPageLabel]=\"rowsPerPageLabel()\"\n [pageLabel]=\"pageLabel()\"\n [ofLabel]=\"ofLabel()\"\n (paginationChange)=\"onPaginationChange($event)\"\n />\n }\n </div>\n } <!-- end @else skeleton -->\n", styles: [":host([data-ui-theme=\"neutral\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=neutral]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"zinc\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=zinc]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"slate\"]){--primary: oklch(.208 .042 265.755);--primary-foreground: oklch(.984 .003 247.858);--ring: oklch(.704 .04 256.788)}:host-context(.dark)[data-ui-theme=slate]{--primary: oklch(.929 .013 255.508);--primary-foreground: oklch(.208 .042 265.755);--ring: oklch(.704 .04 256.788)}:host([data-ui-theme=\"stone\"]){--primary: oklch(.216 .006 56.043);--primary-foreground: oklch(.985 .001 106.423);--ring: oklch(.709 .01 56.259)}:host-context(.dark)[data-ui-theme=stone]{--primary: oklch(.923 .003 48.717);--primary-foreground: oklch(.216 .006 56.043);--ring: oklch(.553 .013 58.071)}:host([data-ui-theme=\"gray\"]){--primary: oklch(.21 .028 264.532);--primary-foreground: oklch(.985 .002 247.839);--ring: oklch(.707 .022 264.436)}:host-context(.dark)[data-ui-theme=gray]{--primary: oklch(.928 .006 264.531);--primary-foreground: oklch(.21 .028 264.532);--ring: oklch(.551 .027 264.364)}:host([data-ui-theme=\"red\"]){--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host-context(.dark)[data-ui-theme=red]{--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host([data-ui-theme=\"rose\"]){--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host-context(.dark)[data-ui-theme=rose]{--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host([data-ui-theme=\"orange\"]){--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host-context(.dark)[data-ui-theme=orange]{--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host([data-ui-theme=\"green\"]){--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host-context(.dark)[data-ui-theme=green]{--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host([data-ui-theme=\"blue\"]){--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host-context(.dark)[data-ui-theme=blue]{--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host([data-ui-theme=\"yellow\"]){--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host-context(.dark)[data-ui-theme=yellow]{--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host([data-ui-theme=\"violet\"]){--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host-context(.dark)[data-ui-theme=violet]{--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host([data-ui-theme=\"amber\"]){--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}:host-context(.dark)[data-ui-theme=amber]{--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}@layer components{@media(hover:hover){[data-slot=table-row]:hover>.pinned-cell{background-image:linear-gradient(color-mix(in oklab,var(--muted) 50%,transparent),color-mix(in oklab,var(--muted) 50%,transparent))}}[data-slot=table-row][data-state=selected]>.pinned-cell{background-image:linear-gradient(var(--muted),var(--muted))}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TableComponent, selector: "ui-table", inputs: ["class", "role"] }, { kind: "component", type: TableHeaderComponent, selector: "ui-table-header", inputs: ["class"] }, { kind: "component", type: TableBodyComponent, selector: "ui-table-body", inputs: ["class", "skeleton", "skeletonRows"] }, { kind: "component", type: TableRowComponent, selector: "ui-table-row", inputs: ["class", "selected"] }, { kind: "component", type: TableHeadComponent, selector: "ui-table-head", inputs: ["class", "role"] }, { kind: "component", type: TableCellComponent, selector: "ui-table-cell", inputs: ["class"] }, { kind: "component", type: InputComponent, selector: "ui-input", inputs: ["type", "placeholder", "disabled", "class", "elementId", "name", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "variant", "loading", "skeleton", "autofocus", "clearable", "floating", "label", "labelClass", "inputMode", "lang", "prefix", "suffix", "value"], outputs: ["valueChange"] }, { kind: "component", type: CheckboxComponent, selector: "ui-checkbox", inputs: ["disabled", "class", "skeleton", "elementId", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "ariaInvalid", "checked", "indeterminate", "label"], outputs: ["checkedChange"] }, { kind: "component", type: DatePickerComponent, selector: "ui-date-picker", inputs: ["class", "placeholder", "disabled", "showTime", "locale", "date"], outputs: ["dateChange"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: DataTableColumnHeaderComponent, selector: "ui-data-table-column-header", inputs: ["title", "column", "direction", "enableSorting", "class", "sortIndex"], outputs: ["sort", "sortMeta"] }, { kind: "component", type: DataTablePaginationComponent, selector: "ui-data-table-pagination", inputs: ["class", "total", "state", "pageSizeOptions", "showPageSizeSelector", "rowsPerPageLabel", "pageLabel", "ofLabel"], outputs: ["paginationChange"] }, { kind: "component", type: DataTableFilterBuilderComponent, selector: "ui-data-table-filter-builder", inputs: ["class", "group", "columns", "labels"], outputs: ["groupChange"] }, { kind: "directive", type: UiComponentOutletDirective, selector: "[uiComponentOutlet]", inputs: ["uiComponentOutlet", "inputs", "outputs", "recycle"], outputs: ["initialized"] }, { kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }, { kind: "pipe", type: i1$1.JsonPipe, name: "json" }, { kind: "pipe", type: i1$1.KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
15076
15598
  }
15077
15599
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DataTableComponent, decorators: [{
15078
15600
  type: Component,
@@ -15106,7 +15628,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15106
15628
  '[class]': 'hostClasses()',
15107
15629
  '[attr.dir]': 'dir()',
15108
15630
  '[attr.data-ui-theme]': 'theme()',
15109
- }, template: " <!-- Reusable: cell content rendering (component/template/cell/default) -->\n <ng-template\n #cellContentTpl\n let-col\n let-row=\"row\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.component) {\n <div\n [uiComponentOutlet]=\"col.component\"\n [inputs]=\"\n treeRow\n ? getSubRowComponentInputs(col, treeRow)\n : col.componentInputs\n ? col.componentInputs(row)\n : EMPTY_RECORD\n \"\n [outputs]=\"\n col.componentOutputs ? col.componentOutputs(row) : EMPTY_RECORD\n \"\n [recycle]=\"recycle\"\n ></div>\n } @else if (col.template) {\n @if (treeRow) {\n <ng-container\n *ngTemplateOutlet=\"\n col.template;\n context: {\n $implicit: row,\n depth: treeRow.depth,\n parentRow: treeRow.parentRow,\n parentId: treeRow.parentId,\n path: treeRow.path,\n isLeaf: treeRow.isLeaf,\n childCount: treeRow.childCount,\n }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"col.template; context: { $implicit: row }\"\n ></ng-container>\n }\n } @else {\n @let fmt = getCellFormatting(col, row);\n @if (fmt) {\n <span\n data-slot=\"cell-formatted\"\n class=\"relative flex w-full items-center gap-1.5 {{ fmt.class }}\"\n [style]=\"fmt.style\"\n >\n @if (fmt.dataBar) {\n @if (fmt.dataBar.track; as track) {\n <span\n data-slot=\"cell-data-bar-track\"\n class=\"pointer-events-none absolute inset-x-0 inset-y-0.5 rounded-sm\"\n [style.background-color]=\"track\"\n ></span>\n }\n <span\n data-slot=\"cell-data-bar\"\n class=\"pointer-events-none absolute inset-y-0.5 start-0 rounded-sm\"\n [style.width]=\"fmt.dataBar.width\"\n [style.background-color]=\"fmt.dataBar.color\"\n ></span>\n }\n @if (fmt.icon) {\n @if (fmt.icon.name) {\n <ui-icon\n data-slot=\"cell-icon\"\n [name]=\"fmt.icon.name\"\n size=\"xs\"\n class=\"relative shrink-0 {{ fmt.icon.class }}\"\n />\n } @else if (fmt.icon.glyph) {\n <span data-slot=\"cell-icon\" class=\"relative shrink-0 {{ fmt.icon.class }}\">{{ fmt.icon.glyph }}</span>\n }\n }\n <span class=\"relative min-w-0 truncate\">\n @if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n </span>\n </span>\n } @else if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n }\n </ng-template>\n\n <!-- Reusable: full cell rendering (special columns + content) -->\n <ng-template\n #cellTpl\n let-col\n let-row=\"row\"\n let-rowIndex=\"rowIndex\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isRowSelected(row)\"\n [disabled]=\"isDisabled(row)\"\n [indeterminate]=\"\n treeRow ? isSubRowSelectionIndeterminate(row) : false\n \"\n (checkedChange)=\"treeRow ? toggleRowWithCascade(row) : toggleRow(row)\"\n ariaLabel=\"Select row\"\n />\n } @else if (col._isTreeExpanderHost && treeRow) {\n <div\n class=\"flex items-center gap-1 min-w-0\"\n [style.padding-inline-start.px]=\"treeRow.depth * subRowIndentSize()\"\n >\n @if (!treeRow.isLeaf) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n treeRow.isExpanded ? 'Collapse sub-rows' : 'Expand sub-rows'\n \"\n (click)=\"toggleSubRowExpanded(treeRow.row, $event)\"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"treeRow.isExpanded && !isRtl()\"\n [class.-rotate-90]=\"treeRow.isExpanded && isRtl()\"\n />\n </button>\n } @else {\n <span class=\"inline-block h-6 w-6 shrink-0\"></span>\n }\n <span class=\"truncate\">\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n </span>\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"isRowExpanded(row) ? 'Collapse row' : 'Expand row'\"\n [attr.aria-expanded]=\"isRowExpanded(row)\"\n (click)=\"toggleRowExpanded(row, $event)\"\n >\n @if (isRowExpanded(row)) {\n <ui-icon name=\"chevron-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevron-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n @if (!isDisabled(row)) {\n @for (slot of cellActionSlots(); track slot.id) {\n <ui-button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-8 w-8 pointer-coarse:size-11\"\n [ariaLabel]=\"slot.ariaLabel ?? 'Row actions'\"\n (click)=\"slot.onClick($event, getRowContext(row, rowIndex))\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"sm\" />\n </ui-button>\n }\n }\n } @else if (\n col.editable && isEditing(rowIndex, String(col.accessorKey))\n ) {\n <ng-container\n *ngTemplateOutlet=\"\n cellEditTpl;\n context: { $implicit: col, row: row, rowIndex: rowIndex }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n }\n </ng-template>\n\n <!-- Reusable: cell edit mode -->\n <ng-template #cellEditTpl let-col let-row=\"row\" let-rowIndex=\"rowIndex\">\n @let editErr = editErrorFor(rowIndex, col);\n @if (col.editComponent) {\n <div\n [uiComponentOutlet]=\"col.editComponent\"\n [inputs]=\"{ value: editValue(), row: row, column: col }\"\n [outputs]=\"{\n valueChange: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\"\n ></div>\n } @else if (col.editTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.editTemplate;\n context: {\n $implicit: editValue(),\n row: row,\n column: col,\n setValue: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\n \"\n ></ng-container>\n } @else if (col.editType === \"checkbox\") {\n <ui-checkbox\n [checked]=\"!!editValue()\"\n [ariaInvalid]=\"editErr ? true : undefined\"\n [ariaDescribedby]=\"editErr ? cellEditErrorId : undefined\"\n (checkedChange)=\"onEditValueChange($event); commitEdit()\"\n />\n } @else if (col.editType === \"date\") {\n <ui-date-picker\n class=\"w-full\"\n [date]=\"editDateValue()\"\n (dateChange)=\"onEditDateChange($event)\"\n />\n } @else if (col.editType === \"select\" && col.editOptions) {\n <select\n data-edit-input\n class=\"w-full h-full bg-background border-0 outline-none text-sm px-1\"\n [class.ring-1]=\"editErr\"\n [class.ring-inset]=\"editErr\"\n [class.ring-destructive]=\"editErr\"\n [attr.aria-invalid]=\"editErr ? true : null\"\n [attr.aria-describedby]=\"editErr ? cellEditErrorId : null\"\n [value]=\"editValue()\"\n (change)=\"onEditValueChange($any($event.target).value); commitEdit()\"\n (keydown)=\"onEditKeydown($event)\"\n >\n @for (opt of col.editOptions; track opt.value) {\n <option [value]=\"opt.value\">{{ opt.label }}</option>\n }\n </select>\n } @else {\n <input\n data-edit-input\n [type]=\"col.editType === 'number' ? 'number' : 'text'\"\n class=\"w-full h-full bg-background border-0 outline-none text-sm px-1 select-text\"\n [class.ring-1]=\"editErr\"\n [class.ring-inset]=\"editErr\"\n [class.ring-destructive]=\"editErr\"\n [attr.aria-invalid]=\"editErr ? true : null\"\n [attr.aria-describedby]=\"editErr ? cellEditErrorId : null\"\n [value]=\"editValue()\"\n (input)=\"onEditValueChange($any($event.target).value)\"\n (keydown)=\"onEditKeydown($event)\"\n (blur)=\"editingCell() ? commitEdit() : null\"\n />\n }\n @if (editErr) {\n <p\n [id]=\"cellEditErrorId\"\n class=\"mt-0.5 px-1 text-xs text-destructive\"\n role=\"alert\"\n data-slot=\"cell-edit-error\"\n >\n {{ editErr }}\n </p>\n }\n </ng-template>\n\n <!-- Reusable: row detail/expansion panel -->\n <ng-template #rowDetailTpl let-row>\n @if (rowDetailTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTemplate();\n context: { $implicit: row, row: row }\n \"\n ></ng-container>\n } @else if (rowDetailComponent()) {\n <div\n [uiComponentOutlet]=\"rowDetailComponent()!\"\n [inputs]=\"getRowDetailComponentInputs(row)\"\n ></div>\n } @else {\n <pre class=\"text-xs text-muted-foreground whitespace-pre-wrap\">{{\n row | json\n }}</pre>\n }\n </ng-template>\n\n <!-- Reusable: empty state -->\n <ng-template #emptyStateTpl>\n <ui-table-row class=\"hover:bg-transparent justify-center w-full\">\n <ui-table-cell\n class=\"h-48 sm:h-96 text-center w-full p-0 border-none justify-center\"\n >\n @if (emptyStateComponent()) {\n <ng-container\n [uiComponentOutlet]=\"emptyStateComponent()!\"\n [inputs]=\"emptyStateComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex h-full flex-col items-center justify-center py-10 text-center text-muted-foreground w-full\"\n >\n <ui-icon name=\"circle-off\" size=\"xl\" class=\"mb-4 opacity-20\" />\n <p>{{ noResultsLabel() }}</p>\n </div>\n }\n </ui-table-cell>\n </ui-table-row>\n </ng-template>\n\n @if (skeleton()) {\n <div class=\"flex flex-col w-full space-y-3\" data-slot=\"data-table-skeleton\">\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n @for (row of skeletonRowsArray(); track $index) {\n <ui-skeleton class=\"h-12 w-full rounded-md\" />\n }\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n </div>\n } @else {\n <!-- `relative`: the sr-only announcer and the sr-only cell labels below are\n position:absolute. Without a positioned ancestor their containing block\n is <html>, so they escape this table's scroll container entirely and\n stretch the document to their static position \u2014 which on a page with a\n virtual-scroll table adds a second, page-length scrollbar. -->\n <div class=\"relative flex flex-col w-full h-full space-y-4\">\n <output\n class=\"sr-only\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n data-slot=\"data-table-announcer\"\n >\n {{ srAnnouncement() }}\n </output>\n @if (showToolbar()) {\n <div class=\"flex flex-wrap items-center justify-between gap-2 flex-none\">\n <div class=\"flex flex-1 flex-wrap items-center gap-2\">\n <ui-input\n [placeholder]=\"filterPlaceholder()\"\n [ngModel]=\"globalFilter()\"\n (ngModelChange)=\"onFilterChange($event)\"\n class=\"h-8 w-full sm:w-[150px] lg:w-[250px]\"\n />\n @if (hasAi() && enableNlFilter()) {\n <div class=\"flex items-center gap-1\" data-slot=\"table-nl-filter\">\n <span aria-hidden=\"true\" class=\"text-sm\">\u2728</span>\n <ui-input\n [placeholder]=\"nlFilterPlaceholder()\"\n [ngModel]=\"aiFilterQuery()\"\n (ngModelChange)=\"aiFilterQuery.set($event)\"\n [disabled]=\"aiFilterRunning()\"\n (keydown.enter)=\"runAiFilter()\"\n class=\"h-8 w-full sm:w-[200px]\"\n />\n </div>\n }\n @if (enableAdvancedFilter()) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n data-slot=\"advanced-filter-trigger\"\n class=\"inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 pointer-coarse:h-11 pointer-coarse:min-w-11 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-icon name=\"filter\" size=\"xs\" />\n <span class=\"hidden sm:inline\">{{ filterBuilderLabels().filterButton }}</span>\n @if (advancedFilterCount() > 0) {\n <span class=\"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-xs text-primary-foreground\">{{ advancedFilterCount() }}</span>\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-[min(420px,calc(100vw-2rem))] p-2\">\n <div class=\"space-y-2\">\n <ui-data-table-filter-builder\n [group]=\"advancedFilterGroup()\"\n [columns]=\"filterBuilderColumns()\"\n [labels]=\"filterBuilderLabels()\"\n (groupChange)=\"onAdvancedFilterChange($event)\"\n />\n @if (advancedFilterCount() > 0) {\n <button\n type=\"button\"\n class=\"text-xs text-muted-foreground hover:text-destructive\"\n (click)=\"clearAdvancedFilter()\"\n >{{ filterBuilderLabels().clearFilters }}</button>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n @if (showColumnVisibilityToggle() && hideableColumns().length > 0) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n class=\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n [attr.aria-label]=\"toggleColumnsLabel()\"\n >\n {{ columnsLabel() }}\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-56 p-2\">\n <div class=\"space-y-1\">\n @for (col of hideableColumns(); track col.accessorKey) {\n <div\n class=\"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-checkbox\n [checked]=\"isColumnVisible(col.accessorKey)\"\n (checkedChange)=\"\n setColumnVisibility(col.accessorKey, $event)\n \"\n [ariaLabel]=\"toggleColumnAriaLabel(col.header)\"\n />\n <span>{{ col.header }}</span>\n </div>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n\n <div\n #scrollContainer\n class=\"rounded-md border relative flex-1 min-h-0 overflow-auto w-full\"\n [class.contain-strict]=\"isVirtualScrollActive()\"\n [class.will-change-scroll]=\"isVirtualScrollActive()\"\n [class.select-none]=\"enableCellRangeSelection()\"\n (keydown)=\"onTableKeydown($event)\"\n (click)=\"onTableClick()\"\n (mousedown)=\"onTableMouseDown($event)\"\n (scroll)=\"isVirtualScrollActive() ? onVirtualScroll($event) : null\"\n (dragover)=\"onContainerDragOver($event)\"\n (drop)=\"onRowDrop($event)\"\n tabindex=\"0\"\n >\n @if (isLoaderVisible()) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n @if (loaderTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n loaderTemplate();\n context: {\n $implicit: loadingTrigger(),\n trigger: loadingTrigger(),\n }\n \"\n ></ng-container>\n } @else if (loaderComponent()) {\n <ng-container\n [uiComponentOutlet]=\"loaderComponent()!\"\n [inputs]=\"resolvedLoaderComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>Loading...</span>\n </div>\n }\n </div>\n }\n @if (busyLabel(); as label) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>{{ label }}</span>\n </div>\n </div>\n }\n <!-- #scrollContainer scrolls both axes. If ui-table kept its own\n overflow-x box (which forces overflow-y to auto too), the sticky\n header would stick inside it and scroll away, and its horizontal\n scrollbar would sit under the last row. -->\n <ui-table\n class=\"overflow-visible\"\n [role]=\"enableSubRows() ? 'treegrid' : 'grid'\"\n >\n <ui-table-header class=\"bg-background\">\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [class]=\"getHeaderClass(col)\"\n class=\"group/head\"\n [class.cursor-grab]=\"isColumnDraggable(col)\"\n [class.cursor-grabbing]=\"isDraggingColumn(col)\"\n [class.opacity-70]=\"isDraggingColumn(col)\"\n [class.relative]=\"isDropTargetColumn(col)\"\n [attr.data-column-id]=\"String(col.accessorKey)\"\n [attr.aria-sort]=\"getAriaSort(col)\"\n [attr.draggable]=\"isColumnDraggable(col) ? 'true' : null\"\n [style]=\"getHeaderCellStyle(col)\"\n (dragstart)=\"onColumnDragStart($event, col)\"\n (dragover)=\"onColumnDragOver($event, col)\"\n (drop)=\"onColumnDrop($event, col)\"\n (dragend)=\"onColumnDragEnd()\"\n >\n @if (isDropTargetColumn(col)) {\n <div\n class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/70 bg-primary/10\"\n ></div>\n }\n <div class=\"flex items-center w-full h-full\">\n <div class=\"flex-1 min-w-0\">\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isIndeterminate()\"\n (checkedChange)=\"toggleAll()\"\n ariaLabel=\"Select all\"\n />\n } @else if (col._isTreeExpanderHost) {\n <!-- gap-2 offsets the sort button's -ms-2, which would otherwise pull it over the expand-all button -->\n <div class=\"flex items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllSubRowsExpanded()\n ? 'Collapse all sub-rows'\n : 'Expand all sub-rows'\n \"\n (click)=\"\n isAllSubRowsExpanded()\n ? collapseAllSubRows()\n : expandAllSubRows(-1)\n \"\n >\n @if (isAllSubRowsExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n @if (col.enableSorting !== false) {\n <ui-data-table-column-header\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n } @else {\n <span>{{ col.header }}</span>\n }\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllExpanded()\n ? 'Collapse all rows'\n : 'Expand all rows'\n \"\n (click)=\"toggleAllExpanded()\"\n >\n @if (isAllExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n <span class=\"sr-only\">Actions</span>\n } @else if (col.headerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.headerTemplate;\n context: { $implicit: col }\n \"\n ></ng-container>\n } @else if (col.enableSorting !== false) {\n <div class=\"flex items-center gap-2\">\n <!-- min-w-0: a narrow column truncates its title instead of sliding it under the filter and menu buttons -->\n <ui-data-table-column-header\n class=\"min-w-0\"\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover [closeOnScroll]=\"true\">\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n } @else {\n <div class=\"flex items-center gap-2\">\n <span>{{ col.header }}</span>\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n </div>\n @if (\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @for (slot of headerActionSlots(); track slot.id) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md opacity-0 group-hover/head:opacity-100 touch-visible pointer-coarse:size-11 hover:bg-accent hover:text-accent-foreground transition-opacity\"\n [attr.aria-label]=\"'Column menu for ' + col.header\"\n (click)=\"slot.onClick($event, col)\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"xs\" />\n </button>\n }\n }\n </div>\n @if (\n enableColumnResize() &&\n col.accessorKey !== \"_selection\"\n ) {\n <div\n #resizeHandle\n class=\"group/resize absolute top-0 w-4 h-full cursor-col-resize touch-none z-40 select-none\"\n [class.right-0]=\"!isRtl()\"\n [class.translate-x-1/2]=\"!isRtl()\"\n [class.left-0]=\"isRtl()\"\n [class.-translate-x-1/2]=\"isRtl()\"\n (mousedown)=\"onResizeStart($event, col)\"\n (touchstart)=\"onResizeTouchStart($event, col)\"\n (dblclick)=\"onResizeDoubleClick($event, col)\"\n role=\"separator\"\n [attr.aria-label]=\"'Resize ' + col.header + ' column (double-click or double-tap to auto-fit)'\"\n >\n <div\n [class]=\"resizeLineClass(col)\"\n aria-hidden=\"true\"\n ></div>\n </div>\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none\"\n [class]=\"getHeaderClass({ _width: 'auto' })\"\n ></ui-table-head>\n }\n </ui-table-row>\n @if (enableFloatingFilters() && hasAnyFloatingFilter()) {\n <ui-table-row class=\"border-0\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [role]=\"hasFloatingFilter(col) ? 'columnheader' : 'presentation'\"\n [style]=\"getHeaderCellStyle(col)\"\n class=\"sticky top-[var(--header-height,41px)] z-20 bg-muted/50 py-1 px-1 overflow-hidden pointer-coarse:h-auto\"\n >\n @if (\n col.floatingFilter !== false &&\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @if (col.floatingFilterComponent) {\n <div\n [uiComponentOutlet]=\"col.floatingFilterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n } @else if (col.floatingFilterTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.floatingFilterTemplate;\n context: {\n $implicit: col,\n value: columnFilters()[String(col.accessorKey)],\n change: getFloatingFilterChange(col),\n }\n \"\n ></ng-container>\n } @else if (col.enableFiltering) {\n <ui-input\n class=\"h-7 text-xs\"\n [placeholder]=\"col.header\"\n [ngModel]=\"\n columnFilters()[String(col.accessorKey)] || ''\n \"\n (ngModelChange)=\"\n onColumnFilterChange(col.accessorKey, $event)\n \"\n />\n }\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none sticky top-[var(--header-height,41px)] z-20 bg-muted/50\"\n ></ui-table-head>\n }\n </ui-table-row>\n }\n </ui-table-header>\n <ui-table-body>\n @if (isVirtualScrollActive()) {\n <div\n [style.height.px]=\"virtualPaddingTop()\"\n class=\"flex-shrink-0\"\n ></div>\n @if (enableSubRows()) {\n @for (\n treeRow of virtualVisibleTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [attr.data-state]=\"\n isRowSelected(treeRow.row) ? 'selected' : null\n \"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"\n treeRow.isLeaf ? null : treeRow.isExpanded\n \"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0\"\n >\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n }\n } @else {\n @for (\n row of virtualVisibleRows();\n track getRowId()(row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [attr.data-state]=\"isRowSelected(row) ? 'selected' : null\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, getVirtualRowIndex(i))\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(getVirtualRowIndex(i))) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n @if (virtualTotalRows() === 0) {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <div\n [style.height.px]=\"virtualPaddingBottom()\"\n class=\"flex-shrink-0\"\n ></div>\n } @else if (enableSubRows()) {\n @if (processedTreeRows().length > 0) {\n @for (\n treeRow of processedTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n [attr.data-state]=\"isRowSelected(treeRow.row) ? 'selected' : null\"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [class.opacity-30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-2]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-inset]=\"isRowBeingDragged(treeRow.row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(treeRow.row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"treeRow.isLeaf ? null : treeRow.isExpanded\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(treeRow.row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, treeRow.row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(i)) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, i, treeRow.depth)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"onCellClick(i, col, $event)\"\n (keydown.enter)=\"onCellClick(i, col, $event)\"\n (keydown.space)=\"onCellClick(i, col, $event)\"\n (dblclick)=\"onCellDblClick(i, col, $event)\"\n (touchend)=\"onCellTouchEnd($event, i, col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: i,\n treeRow: treeRow,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(treeRow.row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: treeRow.row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (groupingActive()) {\n @if (pagedGroupedDisplayRows().length > 0) {\n @for (\n displayRow of pagedGroupedDisplayRows();\n track groupTrackBy(displayRow)\n ) {\n @if (isGroupRow(displayRow)) {\n <ui-table-row\n class=\"border-0 bg-muted/40 cursor-pointer select-none\"\n data-slot=\"table-group-row\"\n [attr.data-group-key]=\"displayRow.groupKey\"\n [attr.aria-expanded]=\"!displayRow.collapsed\"\n (click)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.enter)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.space)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n >\n <ui-table-cell\n class=\"flex-1 border-b font-medium\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <div class=\"flex flex-wrap items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n displayRow.collapsed ? 'Expand group' : 'Collapse group'\n \"\n (click)=\"\n $event.stopPropagation();\n toggleGroupCollapsed(displayRow.groupKey)\n \"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"!displayRow.collapsed && !isRtl()\"\n [class.-rotate-90]=\"!displayRow.collapsed && isRtl()\"\n />\n </button>\n <span class=\"truncate\">{{ groupRowValueLabel(displayRow) }}</span>\n <span class=\"text-xs text-muted-foreground\">({{ displayRow.count }})</span>\n @if (groupAggregates()) {\n @for (entry of displayRow.aggregates | keyvalue: keepGroupAggregateOrder; track entry.key) {\n <span class=\"text-xs text-muted-foreground\">\n {{ groupAggregateLabel(entry.key) }}: {{ entry.value }}\n </span>\n }\n }\n </div>\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [attr.data-state]=\"isRowSelected(displayRow.row) ? 'selected' : null\"\n [attr.data-disabled]=\"isDisabled(displayRow.row) || null\"\n [class.opacity-50]=\"isDisabled(displayRow.row)\"\n [attr.data-row-index]=\"displayRow.index\"\n [attr.data-row-id]=\"getRowId()(displayRow.row)\"\n data-slot=\"table-group-data-row\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, displayRow.index)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: displayRow.row,\n rowIndex: displayRow.index,\n treeRow: null,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (processedData().length > 0) {\n @for (\n row of (dragPreviewData() ?? processedData());\n track getRowId()(row);\n let i = $index\n ) {\n @if (isFullWidthRow(row)) {\n <ui-table-row\n [attr.data-state]=\"isRowSelected(row) ? 'selected' : null\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n class=\"border-0\"\n >\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n @if (fullWidthRowTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n fullWidthRowTemplate();\n context: { $implicit: row, index: i }\n \"\n ></ng-container>\n } @else if (fullWidthRowComponent()) {\n <div\n [uiComponentOutlet]=\"fullWidthRowComponent()!\"\n [inputs]=\"{ row: row, index: i }\"\n ></div>\n }\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [attr.data-state]=\"isRowSelected(row) ? 'selected' : null\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [class.ring-2]=\"isRowBeingDragged(row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(row)\"\n [class.ring-inset]=\"isRowBeingDragged(row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell [class]=\"getCellClass(col, i)\" [attr.data-column]=\"String(col.accessorKey)\" [style]=\"getCellStyle(col)\" (click)=\"onCellClick(i, col, $event)\" (keydown.enter)=\"onCellClick(i, col, $event)\" (keydown.space)=\"onCellClick(i, col, $event)\" (dblclick)=\"onCellDblClick(i, col, $event)\" (touchend)=\"onCellTouchEnd($event, i, col)\">\n <ng-container *ngTemplateOutlet=\"cellTpl; context: { $implicit: col, row: row, rowIndex: i, treeRow: null, recycle: false }\"></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell class=\"flex-1 pointer-events-none\" [class]=\"getCellClass({ _width: 'auto' })\"></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell class=\"flex-1 border-b\" style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\">\n <ng-container *ngTemplateOutlet=\"rowDetailTpl; context: { $implicit: row }\"></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <!-- A spacer that stretches the body to fill the container. It holds\n no data and cannot be reached, so it is hidden from assistive\n tech rather than counted as a row of the grid. -->\n <ui-table-row class=\"h-full\" aria-hidden=\"true\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col)\"\n [style]=\"getCellStyle(col)\"\n class=\"bg-background border-0 p-0\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </ui-table-body>\n @if (hasFooter()) {\n <div\n class=\"sticky bottom-0 z-20 bg-background border-t\"\n data-slot=\"table-footer\"\n >\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [style]=\"getCellStyle(col)\"\n class=\"whitespace-nowrap overflow-hidden text-ellipsis text-sm font-medium text-muted-foreground\"\n >\n @if (col.footerComponent) {\n <div\n [uiComponentOutlet]=\"col.footerComponent\"\n [inputs]=\"{\n column: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\"\n ></div>\n } @else if (col.footerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.footerTemplate;\n context: {\n $implicit: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\n \"\n ></ng-container>\n } @else {\n {{ footerValues().get(String(col.accessorKey)) || \"\" }}\n }\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </div>\n }\n </ui-table>\n\n @if (enableFillHandle() && fillHandlePosition(); as pos) {\n <span\n data-slot=\"fill-handle\"\n class=\"absolute z-20 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 cursor-crosshair rounded-[2px] border border-background bg-primary\"\n style=\"touch-action: none;\"\n aria-hidden=\"true\"\n [style.top.px]=\"pos.top\"\n [style.left.px]=\"pos.left\"\n (mousedown)=\"onFillHandleStart($event)\"\n (touchstart)=\"onFillHandleStart($event)\"\n ></span>\n }\n\n @if (enableRangeActions() && rangeSelectionStats(); as stats) {\n <div\n data-slot=\"range-actions\"\n class=\"sticky bottom-0 z-20 flex max-w-[calc(100vw-2rem)] flex-wrap items-center gap-x-4 gap-y-1 border-t bg-background/95 px-3 py-1.5 text-xs backdrop-blur-sm\"\n >\n <span class=\"text-muted-foreground\">{{ rangeLabels().count }}: <span class=\"text-foreground font-medium\">{{ stats.count }}</span></span>\n @if (stats.numericCount > 0) {\n <span class=\"text-muted-foreground\">{{ rangeLabels().sum }}: <span class=\"text-foreground font-medium\">{{ stats.sum }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().avg }}: <span class=\"text-foreground font-medium\">{{ stats.avg }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().min }}: <span class=\"text-foreground font-medium\">{{ stats.min }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().max }}: <span class=\"text-foreground font-medium\">{{ stats.max }}</span></span>\n @if (rangeChartPayload()) {\n <ui-button\n size=\"sm\"\n variant=\"outline\"\n class=\"ms-auto h-6 px-2 pointer-coarse:h-11\"\n [ariaLabel]=\"rangeLabels().chart\"\n (click)=\"openRangeChart()\"\n >\n <ui-icon name=\"bar-chart-3\" size=\"xs\" class=\"me-1\" />{{ rangeLabels().chart }}\n </ui-button>\n }\n }\n </div>\n }\n </div>\n\n @if (showPagination()) {\n <ui-data-table-pagination\n class=\"flex-none\"\n [total]=\"activeTotalItems()\"\n [state]=\"paginationState()\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [showPageSizeSelector]=\"showPageSizeSelector()\"\n [rowsPerPageLabel]=\"rowsPerPageLabel()\"\n [pageLabel]=\"pageLabel()\"\n [ofLabel]=\"ofLabel()\"\n (paginationChange)=\"onPaginationChange($event)\"\n />\n }\n </div>\n } <!-- end @else skeleton -->\n", styles: [":host([data-ui-theme=\"neutral\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=neutral]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"zinc\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=zinc]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"slate\"]){--primary: oklch(.208 .042 265.755);--primary-foreground: oklch(.984 .003 247.858);--ring: oklch(.704 .04 256.788)}:host-context(.dark)[data-ui-theme=slate]{--primary: oklch(.929 .013 255.508);--primary-foreground: oklch(.208 .042 265.755);--ring: oklch(.704 .04 256.788)}:host([data-ui-theme=\"stone\"]){--primary: oklch(.216 .006 56.043);--primary-foreground: oklch(.985 .001 106.423);--ring: oklch(.709 .01 56.259)}:host-context(.dark)[data-ui-theme=stone]{--primary: oklch(.923 .003 48.717);--primary-foreground: oklch(.216 .006 56.043);--ring: oklch(.553 .013 58.071)}:host([data-ui-theme=\"gray\"]){--primary: oklch(.21 .028 264.532);--primary-foreground: oklch(.985 .002 247.839);--ring: oklch(.707 .022 264.436)}:host-context(.dark)[data-ui-theme=gray]{--primary: oklch(.928 .006 264.531);--primary-foreground: oklch(.21 .028 264.532);--ring: oklch(.551 .027 264.364)}:host([data-ui-theme=\"red\"]){--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host-context(.dark)[data-ui-theme=red]{--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host([data-ui-theme=\"rose\"]){--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host-context(.dark)[data-ui-theme=rose]{--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host([data-ui-theme=\"orange\"]){--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host-context(.dark)[data-ui-theme=orange]{--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host([data-ui-theme=\"green\"]){--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host-context(.dark)[data-ui-theme=green]{--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host([data-ui-theme=\"blue\"]){--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host-context(.dark)[data-ui-theme=blue]{--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host([data-ui-theme=\"yellow\"]){--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host-context(.dark)[data-ui-theme=yellow]{--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host([data-ui-theme=\"violet\"]){--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host-context(.dark)[data-ui-theme=violet]{--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host([data-ui-theme=\"amber\"]){--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}:host-context(.dark)[data-ui-theme=amber]{--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}\n"] }]
15631
+ }, template: " <!-- Reusable: cell content rendering (component/template/cell/default) -->\n <ng-template\n #cellContentTpl\n let-col\n let-row=\"row\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.component) {\n <div\n [uiComponentOutlet]=\"col.component\"\n [inputs]=\"\n treeRow\n ? getSubRowComponentInputs(col, treeRow)\n : col.componentInputs\n ? col.componentInputs(row)\n : EMPTY_RECORD\n \"\n [outputs]=\"\n col.componentOutputs ? col.componentOutputs(row) : EMPTY_RECORD\n \"\n [recycle]=\"recycle\"\n ></div>\n } @else if (col.template) {\n @if (treeRow) {\n <ng-container\n *ngTemplateOutlet=\"\n col.template;\n context: {\n $implicit: row,\n depth: treeRow.depth,\n parentRow: treeRow.parentRow,\n parentId: treeRow.parentId,\n path: treeRow.path,\n isLeaf: treeRow.isLeaf,\n childCount: treeRow.childCount,\n }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"col.template; context: { $implicit: row }\"\n ></ng-container>\n }\n } @else {\n @let fmt = getCellFormatting(col, row);\n @if (fmt) {\n <span\n data-slot=\"cell-formatted\"\n class=\"relative flex w-full items-center gap-1.5 {{ fmt.class }}\"\n [style]=\"fmt.style\"\n >\n @if (fmt.dataBar) {\n @if (fmt.dataBar.track; as track) {\n <span\n data-slot=\"cell-data-bar-track\"\n class=\"pointer-events-none absolute inset-x-0 inset-y-0.5 rounded-sm\"\n [style.background-color]=\"track\"\n ></span>\n }\n <span\n data-slot=\"cell-data-bar\"\n class=\"pointer-events-none absolute inset-y-0.5 start-0 rounded-sm\"\n [style.width]=\"fmt.dataBar.width\"\n [style.background-color]=\"fmt.dataBar.color\"\n ></span>\n }\n @if (fmt.icon) {\n @if (fmt.icon.name) {\n <ui-icon\n data-slot=\"cell-icon\"\n [name]=\"fmt.icon.name\"\n size=\"xs\"\n class=\"relative shrink-0 {{ fmt.icon.class }}\"\n />\n } @else if (fmt.icon.glyph) {\n <span data-slot=\"cell-icon\" class=\"relative shrink-0 {{ fmt.icon.class }}\">{{ fmt.icon.glyph }}</span>\n }\n }\n <span class=\"relative min-w-0 truncate\">\n @if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n </span>\n </span>\n } @else if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n }\n </ng-template>\n\n <!-- Reusable: full cell rendering (special columns + content) -->\n <ng-template\n #cellTpl\n let-col\n let-row=\"row\"\n let-rowIndex=\"rowIndex\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isRowSelected(row)\"\n [disabled]=\"isDisabled(row)\"\n [indeterminate]=\"\n treeRow ? isSubRowSelectionIndeterminate(row) : false\n \"\n (checkedChange)=\"treeRow ? toggleRowWithCascade(row) : toggleRow(row)\"\n ariaLabel=\"Select row\"\n />\n } @else if (col._isTreeExpanderHost && treeRow) {\n <div\n class=\"flex items-center gap-1 min-w-0\"\n [style.padding-inline-start.px]=\"treeRow.depth * subRowIndentSize()\"\n >\n @if (!treeRow.isLeaf) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n treeRow.isExpanded ? 'Collapse sub-rows' : 'Expand sub-rows'\n \"\n (click)=\"toggleSubRowExpanded(treeRow.row, $event)\"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"treeRow.isExpanded && !isRtl()\"\n [class.-rotate-90]=\"treeRow.isExpanded && isRtl()\"\n />\n </button>\n } @else {\n <span class=\"inline-block h-6 w-6 shrink-0\"></span>\n }\n <span class=\"truncate\">\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n </span>\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"isRowExpanded(row) ? 'Collapse row' : 'Expand row'\"\n [attr.aria-expanded]=\"isRowExpanded(row)\"\n (click)=\"toggleRowExpanded(row, $event)\"\n >\n @if (isRowExpanded(row)) {\n <ui-icon name=\"chevron-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevron-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n @if (!isDisabled(row)) {\n @for (slot of cellActionSlots(); track slot.id) {\n <ui-button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-8 w-8 pointer-coarse:size-11\"\n [ariaLabel]=\"slot.ariaLabel ?? 'Row actions'\"\n (click)=\"slot.onClick($event, getRowContext(row, rowIndex))\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"sm\" />\n </ui-button>\n }\n }\n } @else if (\n col.editable && isEditing(rowIndex, String(col.accessorKey))\n ) {\n <ng-container\n *ngTemplateOutlet=\"\n cellEditTpl;\n context: { $implicit: col, row: row, rowIndex: rowIndex }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n }\n </ng-template>\n\n <!-- Reusable: cell edit mode -->\n <ng-template #cellEditTpl let-col let-row=\"row\" let-rowIndex=\"rowIndex\">\n @let editErr = editErrorFor(rowIndex, col);\n @if (col.editComponent) {\n <div\n [uiComponentOutlet]=\"col.editComponent\"\n [inputs]=\"{ value: editValue(), row: row, column: col }\"\n [outputs]=\"{\n valueChange: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\"\n ></div>\n } @else if (col.editTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.editTemplate;\n context: {\n $implicit: editValue(),\n row: row,\n column: col,\n setValue: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\n \"\n ></ng-container>\n } @else if (col.editType === \"checkbox\") {\n <ui-checkbox\n [checked]=\"!!editValue()\"\n [ariaInvalid]=\"editErr ? true : undefined\"\n [ariaDescribedby]=\"editErr ? cellEditErrorId : undefined\"\n (checkedChange)=\"onEditValueChange($event); commitEdit()\"\n />\n } @else if (col.editType === \"date\") {\n <ui-date-picker\n class=\"w-full\"\n [date]=\"editDateValue()\"\n (dateChange)=\"onEditDateChange($event)\"\n />\n } @else if (col.editType === \"select\" && col.editOptions) {\n <select\n data-edit-input\n class=\"w-full h-full bg-background border-0 outline-none text-sm px-1\"\n [class.ring-1]=\"editErr\"\n [class.ring-inset]=\"editErr\"\n [class.ring-destructive]=\"editErr\"\n [attr.aria-invalid]=\"editErr ? true : null\"\n [attr.aria-describedby]=\"editErr ? cellEditErrorId : null\"\n (change)=\"onEditSelect($any($event.target), col)\"\n (keydown)=\"onEditKeydown($event)\"\n >\n @let chosen = editOptionIndex(col);\n @if (chosen === -1) {\n <option value=\"\" selected disabled hidden></option>\n }\n @for (opt of col.editOptions; track $index; let i = $index) {\n <option [value]=\"i\" [selected]=\"i === chosen\">{{ opt.label }}</option>\n }\n </select>\n } @else {\n <input\n data-edit-input\n [type]=\"col.editType === 'number' ? 'number' : 'text'\"\n class=\"w-full h-full bg-background border-0 outline-none text-sm px-1 select-text\"\n [class.ring-1]=\"editErr\"\n [class.ring-inset]=\"editErr\"\n [class.ring-destructive]=\"editErr\"\n [attr.aria-invalid]=\"editErr ? true : null\"\n [attr.aria-describedby]=\"editErr ? cellEditErrorId : null\"\n [value]=\"col.editType === 'number' ? editText() : editValue()\"\n (input)=\"onEditInput($any($event.target), col)\"\n (keydown)=\"onEditKeydown($event)\"\n (blur)=\"editingCell() ? commitEdit() : null\"\n />\n }\n @if (editErr) {\n <p\n [id]=\"cellEditErrorId\"\n class=\"mt-0.5 px-1 text-xs text-destructive\"\n role=\"alert\"\n data-slot=\"cell-edit-error\"\n >\n {{ editErr }}\n </p>\n }\n </ng-template>\n\n <!-- Reusable: row detail/expansion panel -->\n <ng-template #rowDetailTpl let-row>\n @if (rowDetailTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTemplate();\n context: { $implicit: row, row: row }\n \"\n ></ng-container>\n } @else if (rowDetailComponent()) {\n <div\n [uiComponentOutlet]=\"rowDetailComponent()!\"\n [inputs]=\"getRowDetailComponentInputs(row)\"\n ></div>\n } @else {\n <pre class=\"text-xs text-muted-foreground whitespace-pre-wrap\">{{\n row | json\n }}</pre>\n }\n </ng-template>\n\n <!-- Reusable: empty state -->\n <ng-template #emptyStateTpl>\n <ui-table-row class=\"hover:bg-transparent justify-center w-full\">\n <ui-table-cell\n class=\"h-48 sm:h-96 text-center w-full p-0 border-none justify-center\"\n >\n @if (emptyStateComponent()) {\n <ng-container\n [uiComponentOutlet]=\"emptyStateComponent()!\"\n [inputs]=\"emptyStateComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex h-full flex-col items-center justify-center py-10 text-center text-muted-foreground w-full\"\n >\n <ui-icon name=\"circle-off\" size=\"xl\" class=\"mb-4 opacity-20\" />\n <p>{{ noResultsLabel() }}</p>\n </div>\n }\n </ui-table-cell>\n </ui-table-row>\n </ng-template>\n\n @if (skeleton()) {\n <div class=\"flex flex-col w-full space-y-3\" data-slot=\"data-table-skeleton\">\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n @for (row of skeletonRowsArray(); track $index) {\n <ui-skeleton class=\"h-12 w-full rounded-md\" />\n }\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n </div>\n } @else {\n <!-- `relative`: the sr-only announcer and the sr-only cell labels below are\n position:absolute. Without a positioned ancestor their containing block\n is <html>, so they escape this table's scroll container entirely and\n stretch the document to their static position \u2014 which on a page with a\n virtual-scroll table adds a second, page-length scrollbar. -->\n <div class=\"relative flex flex-col w-full h-full space-y-4\">\n <output\n class=\"sr-only\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n data-slot=\"data-table-announcer\"\n >\n {{ srAnnouncement() }}\n </output>\n @if (showToolbar()) {\n <div class=\"flex flex-wrap items-center justify-between gap-2 flex-none\">\n <div class=\"flex flex-1 flex-wrap items-center gap-2\">\n <ui-input\n [placeholder]=\"filterPlaceholder()\"\n [ngModel]=\"globalFilter()\"\n (ngModelChange)=\"onFilterChange($event)\"\n class=\"h-8 w-full sm:w-[150px] lg:w-[250px]\"\n />\n @if (hasAi() && enableNlFilter()) {\n <div class=\"flex items-center gap-1\" data-slot=\"table-nl-filter\">\n <span aria-hidden=\"true\" class=\"text-sm\">\u2728</span>\n <ui-input\n [placeholder]=\"nlFilterPlaceholder()\"\n [ngModel]=\"aiFilterQuery()\"\n (ngModelChange)=\"aiFilterQuery.set($event)\"\n [disabled]=\"aiFilterRunning()\"\n (keydown.enter)=\"runAiFilter()\"\n class=\"h-8 w-full sm:w-[200px]\"\n />\n </div>\n }\n @if (enableAdvancedFilter()) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n data-slot=\"advanced-filter-trigger\"\n class=\"inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 pointer-coarse:h-11 pointer-coarse:min-w-11 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-icon name=\"filter\" size=\"xs\" />\n <span class=\"hidden sm:inline\">{{ filterBuilderLabels().filterButton }}</span>\n @if (advancedFilterCount() > 0) {\n <span class=\"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-xs text-primary-foreground\">{{ advancedFilterCount() }}</span>\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-[min(420px,calc(100vw-2rem))] p-2\">\n <div class=\"space-y-2\">\n <ui-data-table-filter-builder\n [group]=\"advancedFilterGroup()\"\n [columns]=\"filterBuilderColumns()\"\n [labels]=\"filterBuilderLabels()\"\n (groupChange)=\"onAdvancedFilterChange($event)\"\n />\n @if (advancedFilterCount() > 0) {\n <button\n type=\"button\"\n class=\"text-xs text-muted-foreground hover:text-destructive\"\n (click)=\"clearAdvancedFilter()\"\n >{{ filterBuilderLabels().clearFilters }}</button>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n @if (showColumnVisibilityToggle() && hideableColumns().length > 0) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n class=\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n [attr.aria-label]=\"toggleColumnsLabel()\"\n >\n {{ columnsLabel() }}\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-56 p-2\">\n <div class=\"space-y-1\">\n @for (col of hideableColumns(); track col.accessorKey) {\n <div\n class=\"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-checkbox\n [checked]=\"isColumnVisible(col.accessorKey)\"\n (checkedChange)=\"\n setColumnVisibility(col.accessorKey, $event)\n \"\n [ariaLabel]=\"toggleColumnAriaLabel(col.header)\"\n />\n <span>{{ col.header }}</span>\n </div>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n\n <div\n #scrollContainer\n class=\"rounded-md border relative flex-1 min-h-0 overflow-auto w-full\"\n [class.contain-strict]=\"isVirtualScrollActive()\"\n [class.will-change-scroll]=\"isVirtualScrollActive()\"\n [class.select-none]=\"enableCellRangeSelection()\"\n (keydown)=\"onTableKeydown($event)\"\n (click)=\"onTableClick()\"\n (mousedown)=\"onTableMouseDown($event)\"\n (scroll)=\"isVirtualScrollActive() ? onVirtualScroll($event) : null\"\n (dragover)=\"onContainerDragOver($event)\"\n (drop)=\"onRowDrop($event)\"\n tabindex=\"0\"\n >\n @if (isLoaderVisible()) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n @if (loaderTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n loaderTemplate();\n context: {\n $implicit: loadingTrigger(),\n trigger: loadingTrigger(),\n }\n \"\n ></ng-container>\n } @else if (loaderComponent()) {\n <ng-container\n [uiComponentOutlet]=\"loaderComponent()!\"\n [inputs]=\"resolvedLoaderComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>Loading...</span>\n </div>\n }\n </div>\n }\n @if (busyLabel(); as label) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>{{ label }}</span>\n </div>\n </div>\n }\n <!-- #scrollContainer scrolls both axes. If ui-table kept its own\n overflow-x box (which forces overflow-y to auto too), the sticky\n header would stick inside it and scroll away, and its horizontal\n scrollbar would sit under the last row. -->\n <ui-table\n class=\"overflow-visible\"\n [role]=\"enableSubRows() || groupingActive() ? 'treegrid' : 'grid'\"\n >\n <ui-table-header class=\"bg-background\">\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [class]=\"getHeaderClass(col)\"\n class=\"group/head\"\n [class.cursor-grab]=\"isColumnDraggable(col)\"\n [class.cursor-grabbing]=\"isDraggingColumn(col)\"\n [class.opacity-70]=\"isDraggingColumn(col)\"\n [class.relative]=\"isDropTargetColumn(col)\"\n [attr.data-column-id]=\"String(col.accessorKey)\"\n [attr.aria-sort]=\"getAriaSort(col)\"\n [attr.draggable]=\"isColumnDraggable(col) ? 'true' : null\"\n [style]=\"getHeaderCellStyle(col)\"\n (dragstart)=\"onColumnDragStart($event, col)\"\n (dragover)=\"onColumnDragOver($event, col)\"\n (drop)=\"onColumnDrop($event, col)\"\n (dragend)=\"onColumnDragEnd()\"\n >\n @if (isDropTargetColumn(col)) {\n <div\n class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/70 bg-primary/10\"\n ></div>\n }\n <div class=\"flex items-center w-full h-full\">\n <div class=\"flex-1 min-w-0\">\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isIndeterminate()\"\n (checkedChange)=\"toggleAll()\"\n ariaLabel=\"Select all\"\n />\n } @else if (col._isTreeExpanderHost) {\n <!-- gap-2 offsets the sort button's -ms-2, which would otherwise pull it over the expand-all button -->\n <div class=\"flex items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllSubRowsExpanded()\n ? 'Collapse all sub-rows'\n : 'Expand all sub-rows'\n \"\n (click)=\"\n isAllSubRowsExpanded()\n ? collapseAllSubRows()\n : expandAllSubRows(-1)\n \"\n >\n @if (isAllSubRowsExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n @if (col.enableSorting !== false) {\n <ui-data-table-column-header\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n } @else {\n <span>{{ col.header }}</span>\n }\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllExpanded()\n ? 'Collapse all rows'\n : 'Expand all rows'\n \"\n (click)=\"toggleAllExpanded()\"\n >\n @if (isAllExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n <span class=\"sr-only\">Actions</span>\n } @else if (col.headerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.headerTemplate;\n context: { $implicit: col }\n \"\n ></ng-container>\n } @else if (col.enableSorting !== false) {\n <div class=\"flex items-center gap-2\">\n <!-- min-w-0: a narrow column truncates its title instead of sliding it under the filter and menu buttons -->\n <ui-data-table-column-header\n class=\"min-w-0\"\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover [closeOnScroll]=\"true\">\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n } @else {\n <div class=\"flex items-center gap-2\">\n <span>{{ col.header }}</span>\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n </div>\n @if (\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @for (slot of headerActionSlots(); track slot.id) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md opacity-0 group-hover/head:opacity-100 touch-visible pointer-coarse:size-11 hover:bg-accent hover:text-accent-foreground transition-opacity\"\n [attr.aria-label]=\"'Column menu for ' + col.header\"\n (click)=\"slot.onClick($event, col)\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"xs\" />\n </button>\n }\n }\n </div>\n @if (\n enableColumnResize() &&\n col.accessorKey !== \"_selection\"\n ) {\n <div\n #resizeHandle\n class=\"group/resize absolute top-0 w-4 h-full cursor-col-resize touch-none z-40 select-none\"\n [class.right-0]=\"!isRtl()\"\n [class.translate-x-1/2]=\"!isRtl()\"\n [class.left-0]=\"isRtl()\"\n [class.-translate-x-1/2]=\"isRtl()\"\n (mousedown)=\"onResizeStart($event, col)\"\n (touchstart)=\"onResizeTouchStart($event, col)\"\n (dblclick)=\"onResizeDoubleClick($event, col)\"\n role=\"separator\"\n [attr.aria-label]=\"'Resize ' + col.header + ' column (double-click or double-tap to auto-fit)'\"\n >\n <div\n [class]=\"resizeLineClass(col)\"\n aria-hidden=\"true\"\n ></div>\n </div>\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none\"\n [class]=\"getHeaderClass({ _width: 'auto' })\"\n ></ui-table-head>\n }\n </ui-table-row>\n @if (enableFloatingFilters() && hasAnyFloatingFilter()) {\n <ui-table-row class=\"border-0\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [role]=\"hasFloatingFilter(col) ? 'columnheader' : 'presentation'\"\n [style]=\"getHeaderCellStyle(col)\"\n class=\"sticky top-[var(--header-height,41px)] z-20 bg-muted/50 py-1 px-1 overflow-hidden pointer-coarse:h-auto\"\n >\n @if (\n col.floatingFilter !== false &&\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @if (col.floatingFilterComponent) {\n <div\n [uiComponentOutlet]=\"col.floatingFilterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n } @else if (col.floatingFilterTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.floatingFilterTemplate;\n context: {\n $implicit: col,\n value: columnFilters()[String(col.accessorKey)],\n change: getFloatingFilterChange(col),\n }\n \"\n ></ng-container>\n } @else if (col.enableFiltering) {\n <ui-input\n class=\"h-7 text-xs\"\n [placeholder]=\"col.header\"\n [ngModel]=\"\n columnFilters()[String(col.accessorKey)] || ''\n \"\n (ngModelChange)=\"\n onColumnFilterChange(col.accessorKey, $event)\n \"\n />\n }\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none sticky top-[var(--header-height,41px)] z-20 bg-muted/50\"\n ></ui-table-head>\n }\n </ui-table-row>\n }\n </ui-table-header>\n <ui-table-body>\n @if (isVirtualScrollActive()) {\n <div\n [style.height.px]=\"virtualPaddingTop()\"\n class=\"flex-shrink-0\"\n ></div>\n @if (enableSubRows()) {\n @for (\n treeRow of virtualVisibleTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [selected]=\"isRowSelected(treeRow.row)\"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"\n treeRow.isLeaf ? null : treeRow.isExpanded\n \"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0\"\n >\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n }\n } @else {\n @for (\n row of virtualVisibleRows();\n track getRowId()(row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, getVirtualRowIndex(i))\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(getVirtualRowIndex(i))) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n @if (virtualTotalRows() === 0) {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <div\n [style.height.px]=\"virtualPaddingBottom()\"\n class=\"flex-shrink-0\"\n ></div>\n } @else if (enableSubRows()) {\n @if (processedTreeRows().length > 0) {\n @for (\n treeRow of processedTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n [selected]=\"isRowSelected(treeRow.row)\"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [class.opacity-30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-2]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-inset]=\"isRowBeingDragged(treeRow.row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(treeRow.row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"treeRow.isLeaf ? null : treeRow.isExpanded\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(treeRow.row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, treeRow.row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(i)) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, i, treeRow.depth)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"onCellClick(i, col, $event)\"\n (keydown.enter)=\"onCellClick(i, col, $event)\"\n (keydown.space)=\"onCellClick(i, col, $event)\"\n (dblclick)=\"onCellDblClick(i, col, $event)\"\n (touchend)=\"onCellTouchEnd($event, i, col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: i,\n treeRow: treeRow,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(treeRow.row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: treeRow.row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (groupingActive()) {\n @if (pagedGroupedDisplayRows().length > 0) {\n @for (\n displayRow of pagedGroupedDisplayRows();\n track groupTrackBy(displayRow)\n ) {\n @if (isGroupRow(displayRow)) {\n <ui-table-row\n class=\"border-0 bg-muted/40 cursor-pointer select-none\"\n data-slot=\"table-group-row\"\n [attr.data-group-key]=\"displayRow.groupKey\"\n [attr.aria-expanded]=\"!displayRow.collapsed\"\n (click)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.enter)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.space)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n >\n <ui-table-cell\n class=\"flex-1 border-b font-medium\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <div class=\"flex flex-wrap items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n displayRow.collapsed ? 'Expand group' : 'Collapse group'\n \"\n (click)=\"\n $event.stopPropagation();\n toggleGroupCollapsed(displayRow.groupKey)\n \"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"!displayRow.collapsed && !isRtl()\"\n [class.-rotate-90]=\"!displayRow.collapsed && isRtl()\"\n />\n </button>\n <span class=\"truncate\">{{ groupRowValueLabel(displayRow) }}</span>\n <span class=\"text-xs text-muted-foreground\">({{ displayRow.count }})</span>\n @if (groupAggregates()) {\n @for (entry of displayRow.aggregates | keyvalue: keepGroupAggregateOrder; track entry.key) {\n <span class=\"text-xs text-muted-foreground\">\n {{ groupAggregateLabel(entry.key) }}: {{ entry.value }}\n </span>\n }\n }\n </div>\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [selected]=\"isRowSelected(displayRow.row)\"\n [attr.data-disabled]=\"isDisabled(displayRow.row) || null\"\n [class.opacity-50]=\"isDisabled(displayRow.row)\"\n [attr.data-row-index]=\"displayRow.index\"\n [attr.data-row-id]=\"getRowId()(displayRow.row)\"\n data-slot=\"table-group-data-row\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, displayRow.index)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: displayRow.row,\n rowIndex: displayRow.index,\n treeRow: null,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (processedData().length > 0) {\n @for (\n row of (dragPreviewData() ?? processedData());\n track getRowId()(row);\n let i = $index\n ) {\n @if (isFullWidthRow(row)) {\n <ui-table-row\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n class=\"border-0\"\n >\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n @if (fullWidthRowTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n fullWidthRowTemplate();\n context: { $implicit: row, index: i }\n \"\n ></ng-container>\n } @else if (fullWidthRowComponent()) {\n <div\n [uiComponentOutlet]=\"fullWidthRowComponent()!\"\n [inputs]=\"{ row: row, index: i }\"\n ></div>\n }\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [class.ring-2]=\"isRowBeingDragged(row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(row)\"\n [class.ring-inset]=\"isRowBeingDragged(row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell [class]=\"getCellClass(col, i)\" [attr.data-column]=\"String(col.accessorKey)\" [style]=\"getCellStyle(col)\" (click)=\"onCellClick(i, col, $event)\" (keydown.enter)=\"onCellClick(i, col, $event)\" (keydown.space)=\"onCellClick(i, col, $event)\" (dblclick)=\"onCellDblClick(i, col, $event)\" (touchend)=\"onCellTouchEnd($event, i, col)\">\n <ng-container *ngTemplateOutlet=\"cellTpl; context: { $implicit: col, row: row, rowIndex: i, treeRow: null, recycle: false }\"></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell class=\"flex-1 pointer-events-none\" [class]=\"getCellClass({ _width: 'auto' })\"></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell class=\"flex-1 border-b\" style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\">\n <ng-container *ngTemplateOutlet=\"rowDetailTpl; context: { $implicit: row }\"></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <!-- A spacer that stretches the body to fill the container. It holds\n no data and cannot be reached, so it is hidden from assistive\n tech rather than counted as a row of the grid. -->\n <ui-table-row class=\"h-full\" aria-hidden=\"true\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col)\"\n [style]=\"getCellStyle(col)\"\n class=\"bg-background border-0 p-0\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </ui-table-body>\n @if (hasFooter()) {\n <div\n class=\"sticky bottom-0 z-20 bg-background border-t\"\n data-slot=\"table-footer\"\n >\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [style]=\"getCellStyle(col)\"\n class=\"whitespace-nowrap overflow-hidden text-ellipsis text-sm font-medium text-muted-foreground\"\n >\n @if (col.footerComponent) {\n <div\n [uiComponentOutlet]=\"col.footerComponent\"\n [inputs]=\"{\n column: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\"\n ></div>\n } @else if (col.footerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.footerTemplate;\n context: {\n $implicit: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\n \"\n ></ng-container>\n } @else {\n {{ footerValues().get(String(col.accessorKey)) || \"\" }}\n }\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </div>\n }\n </ui-table>\n\n @if (enableFillHandle() && fillHandlePosition(); as pos) {\n <span\n data-slot=\"fill-handle\"\n class=\"absolute z-20 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 cursor-crosshair rounded-[2px] border border-background bg-primary\"\n style=\"touch-action: none;\"\n aria-hidden=\"true\"\n [style.top.px]=\"pos.top\"\n [style.left.px]=\"pos.left\"\n (mousedown)=\"onFillHandleStart($event)\"\n (touchstart)=\"onFillHandleStart($event)\"\n ></span>\n }\n\n @if (enableRangeActions() && rangeSelectionStats(); as stats) {\n <div\n data-slot=\"range-actions\"\n class=\"sticky bottom-0 z-20 flex max-w-[calc(100vw-2rem)] flex-wrap items-center gap-x-4 gap-y-1 border-t bg-background/95 px-3 py-1.5 text-xs backdrop-blur-sm\"\n >\n <span class=\"text-muted-foreground\">{{ rangeLabels().count }}: <span class=\"text-foreground font-medium\">{{ stats.count }}</span></span>\n @if (stats.numericCount > 0) {\n <span class=\"text-muted-foreground\">{{ rangeLabels().sum }}: <span class=\"text-foreground font-medium\">{{ stats.sum }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().avg }}: <span class=\"text-foreground font-medium\">{{ stats.avg }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().min }}: <span class=\"text-foreground font-medium\">{{ stats.min }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().max }}: <span class=\"text-foreground font-medium\">{{ stats.max }}</span></span>\n @if (rangeChartPayload()) {\n <ui-button\n size=\"sm\"\n variant=\"outline\"\n class=\"ms-auto h-6 px-2 pointer-coarse:h-11\"\n [ariaLabel]=\"rangeLabels().chart\"\n (click)=\"openRangeChart()\"\n >\n <ui-icon name=\"bar-chart-3\" size=\"xs\" class=\"me-1\" />{{ rangeLabels().chart }}\n </ui-button>\n }\n }\n </div>\n }\n </div>\n\n @if (showPagination()) {\n <ui-data-table-pagination\n class=\"flex-none\"\n [total]=\"activeTotalItems()\"\n [state]=\"paginationState()\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [showPageSizeSelector]=\"showPageSizeSelector()\"\n [rowsPerPageLabel]=\"rowsPerPageLabel()\"\n [pageLabel]=\"pageLabel()\"\n [ofLabel]=\"ofLabel()\"\n (paginationChange)=\"onPaginationChange($event)\"\n />\n }\n </div>\n } <!-- end @else skeleton -->\n", styles: [":host([data-ui-theme=\"neutral\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=neutral]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"zinc\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=zinc]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"slate\"]){--primary: oklch(.208 .042 265.755);--primary-foreground: oklch(.984 .003 247.858);--ring: oklch(.704 .04 256.788)}:host-context(.dark)[data-ui-theme=slate]{--primary: oklch(.929 .013 255.508);--primary-foreground: oklch(.208 .042 265.755);--ring: oklch(.704 .04 256.788)}:host([data-ui-theme=\"stone\"]){--primary: oklch(.216 .006 56.043);--primary-foreground: oklch(.985 .001 106.423);--ring: oklch(.709 .01 56.259)}:host-context(.dark)[data-ui-theme=stone]{--primary: oklch(.923 .003 48.717);--primary-foreground: oklch(.216 .006 56.043);--ring: oklch(.553 .013 58.071)}:host([data-ui-theme=\"gray\"]){--primary: oklch(.21 .028 264.532);--primary-foreground: oklch(.985 .002 247.839);--ring: oklch(.707 .022 264.436)}:host-context(.dark)[data-ui-theme=gray]{--primary: oklch(.928 .006 264.531);--primary-foreground: oklch(.21 .028 264.532);--ring: oklch(.551 .027 264.364)}:host([data-ui-theme=\"red\"]){--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host-context(.dark)[data-ui-theme=red]{--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host([data-ui-theme=\"rose\"]){--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host-context(.dark)[data-ui-theme=rose]{--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host([data-ui-theme=\"orange\"]){--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host-context(.dark)[data-ui-theme=orange]{--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host([data-ui-theme=\"green\"]){--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host-context(.dark)[data-ui-theme=green]{--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host([data-ui-theme=\"blue\"]){--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host-context(.dark)[data-ui-theme=blue]{--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host([data-ui-theme=\"yellow\"]){--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host-context(.dark)[data-ui-theme=yellow]{--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host([data-ui-theme=\"violet\"]){--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host-context(.dark)[data-ui-theme=violet]{--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host([data-ui-theme=\"amber\"]){--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}:host-context(.dark)[data-ui-theme=amber]{--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}@layer components{@media(hover:hover){[data-slot=table-row]:hover>.pinned-cell{background-image:linear-gradient(color-mix(in oklab,var(--muted) 50%,transparent),color-mix(in oklab,var(--muted) 50%,transparent))}}[data-slot=table-row][data-state=selected]>.pinned-cell{background-image:linear-gradient(var(--muted),var(--muted))}}\n"] }]
15110
15632
  }], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }, { type: i0.Output, args: ["dataChange"] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], showToolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToolbar", required: false }] }], showColumnVisibilityToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showColumnVisibilityToggle", required: false }] }], showPagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPagination", required: false }] }], showRowBorders: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRowBorders", required: false }] }], showColumnBorders: [{ type: i0.Input, args: [{ isSignal: true, alias: "showColumnBorders", required: false }] }], localSorting: [{ type: i0.Input, args: [{ isSignal: true, alias: "localSorting", required: false }] }], localPagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "localPagination", required: false }] }], localFiltering: [{ type: i0.Input, args: [{ isSignal: true, alias: "localFiltering", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], skeleton: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeleton", required: false }] }], skeletonRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonRows", required: false }] }], loadingVisibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingVisibility", required: false }] }], loaderTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "loaderTemplate", required: false }] }], loaderComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "loaderComponent", required: false }] }], loaderComponentInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "loaderComponentInputs", required: false }] }], globalFilterFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "globalFilterFn", required: false }] }], enableMultiSort: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableMultiSort", required: false }] }], maxMultiSortColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxMultiSortColumns", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], multiSortChange: [{ type: i0.Output, args: ["multiSortChange"] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], query: [{ type: i0.Output, args: ["query"] }], cellEdit: [{ type: i0.Output, args: ["cellEdit"] }], editError: [{ type: i0.Output, args: ["editError"] }], enableRowSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableRowSelection", required: false }] }], rowSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowSelection", required: false }] }, { type: i0.Output, args: ["rowSelectionChange"] }], getRowId: [{ type: i0.Input, args: [{ isSignal: true, alias: "getRowId", required: false }] }], enableCopy: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableCopy", required: false }] }], isRowDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isRowDisabled", required: false }] }], disabledRowIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledRowIds", required: false }] }], enableRowExpansion: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableRowExpansion", required: false }] }], expandedRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedRows", required: false }] }, { type: i0.Output, args: ["expandedRowsChange"] }], rowDetailTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowDetailTemplate", required: false }] }], rowDetailComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowDetailComponent", required: false }] }], rowDetailComponentInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowDetailComponentInputs", required: false }] }], enableSubRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableSubRows", required: false }] }], getChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "getChildren", required: false }] }], setChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "setChildren", required: false }] }], subRowDefaultExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "subRowDefaultExpanded", required: false }] }], subRowSelectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "subRowSelectionMode", required: false }] }], subRowFilterMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "subRowFilterMode", required: false }] }], enableSubRowSorting: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableSubRowSorting", required: false }] }], subRowIndentSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "subRowIndentSize", required: false }] }], subRowsPaginated: [{ type: i0.Input, args: [{ isSignal: true, alias: "subRowsPaginated", required: false }] }], subRowExpandedRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "subRowExpandedRows", required: false }] }, { type: i0.Output, args: ["subRowExpandedRowsChange"] }], groupBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupBy", required: false }] }], collapsedGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedGroups", required: false }] }, { type: i0.Output, args: ["collapsedGroupsChange"] }], groupAggregates: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupAggregates", required: false }] }], enableColumnResize: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableColumnResize", required: false }] }], enableColumnReorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableColumnReorder", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], enableFloatingFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableFloatingFilters", required: false }] }], enableRowDrag: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableRowDrag", required: false }] }], localReorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "localReorder", required: false }] }], rowDragMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowDragMode", required: false }] }], rowDragAllowDrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowDragAllowDrop", required: false }] }], rowReorder: [{ type: i0.Output, args: ["rowReorder"] }], enableCellFlash: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableCellFlash", required: false }] }], cellFlashDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellFlashDuration", required: false }] }], enableCellRangeSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableCellRangeSelection", required: false }] }], enableRangeActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableRangeActions", required: false }] }], rangeChartOpen: [{ type: i0.Output, args: ["rangeChartOpen"] }], enableFillHandle: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableFillHandle", required: false }] }], fillSeries: [{ type: i0.Output, args: ["fillSeries"] }], enableClipboardPaste: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableClipboardPaste", required: false }] }], cellsPaste: [{ type: i0.Output, args: ["cellsPaste"] }], enableEditHistory: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableEditHistory", required: false }] }], editUndo: [{ type: i0.Output, args: ["editUndo"] }], editRedo: [{ type: i0.Output, args: ["editRedo"] }], columnResize: [{ type: i0.Output, args: ["columnResize"] }], emptyStateComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyStateComponent", required: false }] }], emptyStateComponentInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyStateComponentInputs", required: false }] }], fullWidthRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidthRow", required: false }] }], fullWidthRowTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidthRowTemplate", required: false }] }], fullWidthRowComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidthRowComponent", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], filterDebounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterDebounce", required: false }] }], enableVirtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableVirtualScroll", required: false }] }], virtualRowHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualRowHeight", required: false }] }], virtualRowBuffer: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualRowBuffer", required: false }] }], virtualColumnBuffer: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualColumnBuffer", required: false }] }], virtualVariableRowHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualVariableRowHeight", required: false }] }], virtualRecycleComponents: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualRecycleComponents", required: false }] }], virtualAutoThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualAutoThreshold", required: false }] }], virtualAutoColumnWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualAutoColumnWidth", required: false }] }], scrollContainerRef: [{ type: i0.ViewChild, args: ["scrollContainer", { isSignal: true }] }], virtualRowElements: [{ type: i0.ViewChildren, args: ["virtualRow", { ...{
15111
15633
  read: ElementRef,
15112
15634
  }, isSignal: true }] }], globalFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "globalFilter", required: false }] }, { type: i0.Output, args: ["globalFilterChange"] }], columnFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnFilters", required: false }] }, { type: i0.Output, args: ["columnFiltersChange"] }], aiProvider: [{ type: i0.Input, args: [{ isSignal: true, alias: "aiProvider", required: false }] }], nlFilter: [{ type: i0.Output, args: ["nlFilter"] }], aiFillComplete: [{ type: i0.Output, args: ["aiFillComplete"] }], enableNlFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableNlFilter", required: false }] }], advancedFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "advancedFilter", required: false }] }, { type: i0.Output, args: ["advancedFilterChange"] }], enableAdvancedFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableAdvancedFilter", required: false }] }], sortState: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortState", required: false }] }, { type: i0.Output, args: ["sortStateChange"] }], multiSortState: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiSortState", required: false }] }, { type: i0.Output, args: ["multiSortStateChange"] }], paginationState: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginationState", required: false }] }, { type: i0.Output, args: ["paginationStateChange"] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], showPageSizeSelector: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPageSizeSelector", required: false }] }], columnWidths: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnWidths", required: false }] }, { type: i0.Output, args: ["columnWidthsChange"] }], columnVisibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnVisibility", required: false }] }, { type: i0.Output, args: ["columnVisibilityChange"] }], columnOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnOrder", required: false }] }, { type: i0.Output, args: ["columnOrderChange"] }], resizeHandles: [{ type: i0.ViewChildren, args: ["resizeHandle", { isSignal: true }] }] } });
@@ -17935,7 +18457,7 @@ class ContextMenuLabelComponent {
17935
18457
  this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
17936
18458
  /** Adds `ps-8` start padding so the heading aligns with inset items below it; also reflected as `data-inset`. */
17937
18459
  this.inset = input(false, ...(ngDevMode ? [{ debugName: "inset" }] : /* istanbul ignore next */ []));
17938
- this.classes = computed(() => cn('px-2 py-1.5 text-sm font-semibold text-foreground', this.inset() && 'ps-8', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
18460
+ this.classes = computed(() => cn('block px-2 py-1.5 text-sm font-semibold text-foreground', this.inset() && 'ps-8', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
17939
18461
  }
17940
18462
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17941
18463
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: ContextMenuLabelComponent, isStandalone: true, selector: "ui-context-menu-label", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"context-menu-label\"", "attr.data-inset": "inset()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -17958,7 +18480,7 @@ class ContextMenuSeparatorComponent {
17958
18480
  constructor() {
17959
18481
  /** Extra classes merged onto the element this component renders, after its built-in styling. */
17960
18482
  this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
17961
- this.classes = computed(() => cn('-mx-1 my-1 h-px bg-border', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
18483
+ this.classes = computed(() => cn('block -mx-1 my-1 h-px bg-border', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
17962
18484
  }
17963
18485
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17964
18486
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: ContextMenuSeparatorComponent, isStandalone: true, selector: "ui-context-menu-separator", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"context-menu-separator\"" } }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -17983,8 +18505,19 @@ class ContextMenuSubComponent {
17983
18505
  this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
17984
18506
  this.classes = computed(() => cn('relative block w-full', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
17985
18507
  this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
18508
+ this.contextMenu = inject(CONTEXT_MENU, { optional: true });
17986
18509
  this.trigger = null;
17987
18510
  this.content = null;
18511
+ // The flyout is portalled to <body>, so closing the root menu (an item
18512
+ // click, Escape, an outside click) does not tear it down with the root.
18513
+ effect(() => {
18514
+ if (this.contextMenu && !this.contextMenu.open()) {
18515
+ untracked(() => {
18516
+ clearTimeout(this.timeoutId);
18517
+ this.isOpen.set(false);
18518
+ });
18519
+ }
18520
+ });
17988
18521
  }
17989
18522
  /** Cancels a close still pending from {@link leave}, so a sub destroyed inside the grace period leaves no timer behind. */
17990
18523
  ngOnDestroy() {
@@ -18062,7 +18595,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
18062
18595
  '[attr.data-slot]': '"context-menu-sub"',
18063
18596
  },
18064
18597
  }]
18065
- }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
18598
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
18066
18599
 
18067
18600
  class ContextMenuSubTriggerComponent {
18068
18601
  constructor() {
@@ -19589,5 +20122,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
19589
20122
  * Generated bundle index. Do not edit.
19590
20123
  */
19591
20124
 
19592
- export { AddonSlotRegistry, ComponentPoolService, DATA_TABLE_EXPORT_LOCALES, DATA_TABLE_LOCALES, DATA_TABLE_VIEW_STATE_VERSION, DEFAULT_FILTER_BUILDER_LABELS, DataTableAddonHost, DataTableColumnHeaderComponent, DataTableComponent, DataTableContextMenuDirective, DataTableDateFilterComponent, DataTableDateRangeFilterComponent, DataTableExportDirective, DataTableFilterBuilderComponent, DataTableMultiselectFilterComponent, DataTablePaginationComponent, DataTablePivotDirective, asEditableDate, buildFillValues, buildPrefixSums, buildTreeFromFlat, columnHelper, computeAggregateValue, computeColumnRange, computePivot, computeRowRange, computeVariableRowRange, dateFilterFn, dateRangeFilterFn, evaluateAdvancedFilter, guardSpreadsheetFormula, matchesCondition, multiselectFilterFn, parseClipboardGrid, parseNlFilterSpec, partitionIntoGroups, renumberDataRows, restoreSpreadsheetText, toEditedDateValue, toLocalDateString };
20125
+ export { AddonSlotRegistry, ComponentPoolService, DATA_TABLE_EXPORT_LOCALES, DATA_TABLE_LOCALES, DATA_TABLE_VIEW_STATE_VERSION, DEFAULT_FILTER_BUILDER_LABELS, DataTableAddonHost, DataTableColumnHeaderComponent, DataTableComponent, DataTableContextMenuDirective, DataTableDateFilterComponent, DataTableDateRangeFilterComponent, DataTableExportDirective, DataTableFilterBuilderComponent, DataTableMultiselectFilterComponent, DataTablePaginationComponent, DataTablePivotDirective, asEditableDate, buildFillValues, buildPrefixSums, buildTreeFromFlat, cellText, columnHelper, computeAggregateValue, computeColumnRange, computePivot, computeRowRange, computeVariableRowRange, dateFilterFn, dateRangeFilterFn, evaluateAdvancedFilter, guardSpreadsheetFormula, matchesCondition, multiselectFilterFn, parseClipboardGrid, parseNlFilterSpec, partitionIntoGroups, renumberDataRows, restoreSpreadsheetText, toAggregatableNumber$1 as toAggregatableNumber, toEditedDateValue, toLocalDateString };
19593
20126
  //# sourceMappingURL=gilav21-shadcn-angular-data-table.mjs.map