@gilav21/shadcn-angular-data-table 0.3.1 → 0.3.3

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, afterRenderEffect, ApplicationRef, EnvironmentInjector, createComponent, HostListener, ViewChild, ViewContainerRef, viewChildren, contentChild, booleanAttribute } 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';
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';
@@ -305,7 +305,7 @@ function fillNumericSeries(nums, count) {
305
305
  const last = nums.at(-1) ?? 0;
306
306
  const prev = nums.at(-2) ?? last;
307
307
  const step = nums.length >= 2 ? last - prev : 0;
308
- return Array.from({ length: count }, (_, i) => last + step * (i + 1));
308
+ return Array.from({ length: count }, (...[, i]) => last + step * (i + 1));
309
309
  }
310
310
  function splitTrailingDigits(v) {
311
311
  let end = v.length;
@@ -345,10 +345,10 @@ function fillTrailingNumbers(info, count) {
345
345
  return [];
346
346
  const prev = numbers.at(-2) ?? last;
347
347
  const step = numbers.length >= 2 ? last.value - prev.value : 1;
348
- return Array.from({ length: count }, (_, i) => prefix + padNumber(last.value + step * (i + 1), last.width));
348
+ return Array.from({ length: count }, (...[, i]) => prefix + padNumber(last.value + step * (i + 1), last.width));
349
349
  }
350
350
  function cycleValues(source, count) {
351
- return Array.from({ length: count }, (_, i) => source[i % source.length]);
351
+ return Array.from({ length: count }, (...[, i]) => source[i % source.length]);
352
352
  }
353
353
  const MS_PER_DAY = 86_400_000;
354
354
  function mod(n, m) {
@@ -434,9 +434,9 @@ function nextYmd(series, i) {
434
434
  }
435
435
  function fillDateSeries(series, count) {
436
436
  if (series.kind === 'date') {
437
- return Array.from({ length: count }, (_, i) => ymdToDate(nextYmd(series, i)));
437
+ return Array.from({ length: count }, (...[, i]) => ymdToDate(nextYmd(series, i)));
438
438
  }
439
- return Array.from({ length: count }, (_, i) => ymdToIso(nextYmd(series, i)));
439
+ return Array.from({ length: count }, (...[, i]) => ymdToIso(nextYmd(series, i)));
440
440
  }
441
441
  const WEEKDAY_NAMES = {
442
442
  full: ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'],
@@ -501,7 +501,7 @@ function applyCasing(base, casing) {
501
501
  }
502
502
  function fillNameSeries(series, count) {
503
503
  const len = series.table.full.length;
504
- return Array.from({ length: count }, (_, i) => {
504
+ return Array.from({ length: count }, (...[, i]) => {
505
505
  const index = mod(series.lastIndex + series.step * (i + 1), len);
506
506
  const base = series.form === 'abbr' ? series.table.abbr[index] : series.table.full[index];
507
507
  return applyCasing(base, series.casing);
@@ -630,6 +630,21 @@ function partitionIntoGroups(rows, getGroupValue) {
630
630
  rows: value.rows,
631
631
  }));
632
632
  }
633
+ /**
634
+ * Numbers the data rows of a grouped display list from 0, leaving group headers
635
+ * unnumbered. A page slice keeps the global index its rows were given before
636
+ * paging, so this restarts the count to match the rows the page actually draws.
637
+ */
638
+ function renumberDataRows(rows) {
639
+ let index = 0;
640
+ return rows.map((row) => {
641
+ if (row.kind === 'group')
642
+ return row;
643
+ const numbered = { ...row, index };
644
+ index += 1;
645
+ return numbered;
646
+ });
647
+ }
633
648
  // ── Advanced filter evaluation (A5) ──
634
649
  function asString(value) {
635
650
  return stringifyValue(value);
@@ -1670,7 +1685,7 @@ function formatRelativeTime(value, unit, locale, options) {
1670
1685
  */
1671
1686
  function localeDigits(locale) {
1672
1687
  const formatter = new Intl.NumberFormat(locale, { useGrouping: false });
1673
- return Array.from({ length: 10 }, (_, digit) => formatter.format(digit));
1688
+ return Array.from({ length: 10 }, (...[, digit]) => formatter.format(digit));
1674
1689
  }
1675
1690
  /**
1676
1691
  * Rewrite a locale's digits as ASCII so the result can be parsed as a number.
@@ -2128,7 +2143,7 @@ class AlertDialogComponent {
2128
2143
  this.open.update(v => !v);
2129
2144
  }
2130
2145
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2131
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AlertDialogComponent, isStandalone: true, selector: "ui-alert-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { classAttribute: "contents" }, providers: [{ provide: ALERT_DIALOG, useExisting: forwardRef(() => AlertDialogComponent) }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2146
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AlertDialogComponent, isStandalone: true, selector: "ui-alert-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { properties: { "attr.data-slot": "\"alert-dialog\"" }, classAttribute: "contents" }, providers: [{ provide: ALERT_DIALOG, useExisting: forwardRef(() => AlertDialogComponent) }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2132
2147
  }
2133
2148
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogComponent, decorators: [{
2134
2149
  type: Component,
@@ -2137,7 +2152,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
2137
2152
  changeDetection: ChangeDetectionStrategy.OnPush,
2138
2153
  providers: [{ provide: ALERT_DIALOG, useExisting: forwardRef(() => AlertDialogComponent) }],
2139
2154
  template: `<ng-content />`,
2140
- host: { class: 'contents' },
2155
+ host: { class: 'contents', '[attr.data-slot]': '"alert-dialog"' },
2141
2156
  }]
2142
2157
  }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] } });
2143
2158
 
@@ -2291,6 +2306,8 @@ function focusFirstTabbable(container) {
2291
2306
 
2292
2307
  class AlertDialogTriggerComponent {
2293
2308
  constructor() {
2309
+ /** Extra classes for the element that wraps the projected trigger. */
2310
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
2294
2311
  this.alertDialog = inject(ALERT_DIALOG, { optional: true });
2295
2312
  this.host = inject(ElementRef);
2296
2313
  /** See `lib/a11y.ts` — stays transparent when the projected content is already a control. */
@@ -2316,8 +2333,9 @@ class AlertDialogTriggerComponent {
2316
2333
  this.onClick();
2317
2334
  }
2318
2335
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2319
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: AlertDialogTriggerComponent, isStandalone: true, selector: "ui-alert-dialog-trigger", host: { classAttribute: "contents" }, ngImport: i0, template: `
2336
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AlertDialogTriggerComponent, isStandalone: true, selector: "ui-alert-dialog-trigger", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
2320
2337
  <span
2338
+ [class]="class()"
2321
2339
  (click)="onClick()"
2322
2340
  (keydown.enter)="onKeydown($event)"
2323
2341
  (keydown.space)="onKeydown($event)"
@@ -2336,6 +2354,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
2336
2354
  changeDetection: ChangeDetectionStrategy.OnPush,
2337
2355
  template: `
2338
2356
  <span
2357
+ [class]="class()"
2339
2358
  (click)="onClick()"
2340
2359
  (keydown.enter)="onKeydown($event)"
2341
2360
  (keydown.space)="onKeydown($event)"
@@ -2348,11 +2367,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
2348
2367
  `,
2349
2368
  host: { class: 'contents' },
2350
2369
  }]
2351
- }], ctorParameters: () => [] });
2370
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
2352
2371
 
2353
2372
  class AlertDialogHeaderComponent {
2373
+ constructor() {
2374
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
2375
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
2376
+ this.classes = computed(() => cn('flex flex-col space-y-2 text-center sm:text-left rtl:text-right', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
2377
+ }
2354
2378
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2355
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: AlertDialogHeaderComponent, isStandalone: true, selector: "ui-alert-dialog-header", host: { properties: { "attr.data-slot": "\"alert-dialog-header\"" }, classAttribute: "flex flex-col space-y-2 text-center sm:text-left rtl:text-right" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2379
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AlertDialogHeaderComponent, isStandalone: true, selector: "ui-alert-dialog-header", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"alert-dialog-header\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2356
2380
  }
2357
2381
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogHeaderComponent, decorators: [{
2358
2382
  type: Component,
@@ -2361,15 +2385,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
2361
2385
  changeDetection: ChangeDetectionStrategy.OnPush,
2362
2386
  template: `<ng-content />`,
2363
2387
  host: {
2364
- class: 'flex flex-col space-y-2 text-center sm:text-left rtl:text-right',
2388
+ '[class]': 'classes()',
2365
2389
  '[attr.data-slot]': '"alert-dialog-header"',
2366
2390
  },
2367
2391
  }]
2368
- }] });
2392
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
2369
2393
 
2370
2394
  class AlertDialogTitleComponent {
2395
+ constructor() {
2396
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
2397
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
2398
+ this.classes = computed(() => cn('text-lg font-semibold', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
2399
+ }
2371
2400
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2372
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: AlertDialogTitleComponent, isStandalone: true, selector: "ui-alert-dialog-title", host: { properties: { "attr.data-slot": "\"alert-dialog-title\"" }, classAttribute: "text-lg font-semibold" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2401
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AlertDialogTitleComponent, isStandalone: true, selector: "ui-alert-dialog-title", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"alert-dialog-title\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2373
2402
  }
2374
2403
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogTitleComponent, decorators: [{
2375
2404
  type: Component,
@@ -2378,15 +2407,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
2378
2407
  changeDetection: ChangeDetectionStrategy.OnPush,
2379
2408
  template: `<ng-content />`,
2380
2409
  host: {
2381
- class: 'text-lg font-semibold',
2410
+ '[class]': 'classes()',
2382
2411
  '[attr.data-slot]': '"alert-dialog-title"',
2383
2412
  },
2384
2413
  }]
2385
- }] });
2414
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
2386
2415
 
2387
2416
  class AlertDialogDescriptionComponent {
2417
+ constructor() {
2418
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
2419
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
2420
+ this.classes = computed(() => cn('text-sm text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
2421
+ }
2388
2422
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2389
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: AlertDialogDescriptionComponent, isStandalone: true, selector: "ui-alert-dialog-description", host: { properties: { "attr.data-slot": "\"alert-dialog-description\"" }, classAttribute: "text-sm text-muted-foreground" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2423
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AlertDialogDescriptionComponent, isStandalone: true, selector: "ui-alert-dialog-description", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"alert-dialog-description\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2390
2424
  }
2391
2425
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogDescriptionComponent, decorators: [{
2392
2426
  type: Component,
@@ -2395,15 +2429,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
2395
2429
  changeDetection: ChangeDetectionStrategy.OnPush,
2396
2430
  template: `<ng-content />`,
2397
2431
  host: {
2398
- class: 'text-sm text-muted-foreground',
2432
+ '[class]': 'classes()',
2399
2433
  '[attr.data-slot]': '"alert-dialog-description"',
2400
2434
  },
2401
2435
  }]
2402
- }] });
2436
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
2403
2437
 
2404
2438
  class AlertDialogFooterComponent {
2439
+ constructor() {
2440
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
2441
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
2442
+ this.classes = computed(() => cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 gap-[10px]', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
2443
+ }
2405
2444
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2406
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: AlertDialogFooterComponent, isStandalone: true, selector: "ui-alert-dialog-footer", host: { properties: { "attr.data-slot": "\"alert-dialog-footer\"" }, classAttribute: "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 gap-[10px]" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2445
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AlertDialogFooterComponent, isStandalone: true, selector: "ui-alert-dialog-footer", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"alert-dialog-footer\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2407
2446
  }
2408
2447
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogFooterComponent, decorators: [{
2409
2448
  type: Component,
@@ -2412,11 +2451,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
2412
2451
  changeDetection: ChangeDetectionStrategy.OnPush,
2413
2452
  template: `<ng-content />`,
2414
2453
  host: {
2415
- class: 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 gap-[10px]',
2454
+ '[class]': 'classes()',
2416
2455
  '[attr.data-slot]': '"alert-dialog-footer"',
2417
2456
  },
2418
2457
  }]
2419
- }] });
2458
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
2420
2459
 
2421
2460
  class AlertDialogActionComponent {
2422
2461
  constructor() {
@@ -2553,6 +2592,13 @@ class AlertDialogContentComponent {
2553
2592
  /** The cancel button was pressed. Same simple-mode-only rules as {@link actionClick}. */
2554
2593
  this.cancelClick = output();
2555
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 */ []));
2595
+ /**
2596
+ * The two places a title can come from: the one this component renders for the `title` input, and one the
2597
+ * author projects. Read by the naming effect so it runs again when either appears, which a title rendered
2598
+ * after the dialog opened (behind an `@if`, say) otherwise never triggers.
2599
+ */
2600
+ this.ownTitle = viewChild(AlertDialogTitleComponent, ...(ngDevMode ? [{ debugName: "ownTitle" }] : /* istanbul ignore next */ []));
2601
+ this.projectedTitle = contentChild(AlertDialogTitleComponent, ...(ngDevMode ? [{ debugName: "projectedTitle" }] : /* istanbul ignore next */ []));
2556
2602
  effect(() => {
2557
2603
  if (this.alertDialog?.open()) {
2558
2604
  this.previousActiveElement = this.document.activeElement;
@@ -2565,6 +2611,8 @@ class AlertDialogContentComponent {
2565
2611
  afterRenderEffect(() => {
2566
2612
  if (!this.alertDialog?.open())
2567
2613
  return;
2614
+ this.ownTitle();
2615
+ this.projectedTitle();
2568
2616
  const host = this.el.nativeElement;
2569
2617
  const titleEl = host.querySelector('[data-slot="alert-dialog-title"]');
2570
2618
  if (!titleEl)
@@ -2597,7 +2645,7 @@ class AlertDialogContentComponent {
2597
2645
  trapTabKey(event, this.contentEl);
2598
2646
  }
2599
2647
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2600
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: AlertDialogContentComponent, isStandalone: true, selector: "ui-alert-dialog-content", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, actionText: { classPropertyName: "actionText", publicName: "actionText", isSignal: true, isRequired: false, transformFunction: null }, cancelText: { classPropertyName: "cancelText", publicName: "cancelText", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionClick: "actionClick", cancelClick: "cancelClick" }, host: { classAttribute: "contents" }, ngImport: i0, template: `
2648
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: AlertDialogContentComponent, isStandalone: true, selector: "ui-alert-dialog-content", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, actionText: { classPropertyName: "actionText", publicName: "actionText", isSignal: true, isRequired: false, transformFunction: null }, cancelText: { classPropertyName: "cancelText", publicName: "cancelText", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionClick: "actionClick", cancelClick: "cancelClick" }, host: { classAttribute: "contents" }, queries: [{ propertyName: "projectedTitle", first: true, predicate: AlertDialogTitleComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "ownTitle", first: true, predicate: AlertDialogTitleComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
2601
2649
  @if (alertDialog?.open()) {
2602
2650
  <div
2603
2651
  class="fixed inset-0 z-50 flex items-center justify-center"
@@ -2634,7 +2682,7 @@ class AlertDialogContentComponent {
2634
2682
  </div>
2635
2683
  </div>
2636
2684
  }
2637
- `, isInline: true, dependencies: [{ kind: "component", type: AlertDialogHeaderComponent, selector: "ui-alert-dialog-header" }, { kind: "component", type: AlertDialogTitleComponent, selector: "ui-alert-dialog-title" }, { kind: "component", type: AlertDialogDescriptionComponent, selector: "ui-alert-dialog-description" }, { kind: "component", type: AlertDialogFooterComponent, selector: "ui-alert-dialog-footer" }, { 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 }); }
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 }); }
2638
2686
  }
2639
2687
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AlertDialogContentComponent, decorators: [{
2640
2688
  type: Component,
@@ -2689,7 +2737,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
2689
2737
  `,
2690
2738
  host: { class: 'contents' },
2691
2739
  }]
2692
- }], 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"] }] } });
2740
+ }], 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 }] }] } });
2693
2741
 
2694
2742
  class ConfirmDialogComponent {
2695
2743
  /**
@@ -2700,6 +2748,8 @@ class ConfirmDialogComponent {
2700
2748
  * they never double-emit through this path.
2701
2749
  */
2702
2750
  constructor() {
2751
+ /** Extra classes merged onto the dialog panel, e.g. a width utility. */
2752
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
2703
2753
  this.open = signal(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
2704
2754
  this.title = signal('Confirm', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
2705
2755
  this.description = signal('Are you sure?', ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
@@ -2743,9 +2793,10 @@ class ConfirmDialogComponent {
2743
2793
  this.cancelled.emit();
2744
2794
  }
2745
2795
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ConfirmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2746
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: ConfirmDialogComponent, isStandalone: true, selector: "ui-confirm-dialog", outputs: { confirmed: "confirmed", cancelled: "cancelled" }, ngImport: i0, template: `
2796
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: ConfirmDialogComponent, isStandalone: true, selector: "ui-confirm-dialog", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirmed: "confirmed", cancelled: "cancelled" }, host: { properties: { "attr.data-slot": "\"confirm-dialog\"" }, classAttribute: "contents" }, ngImport: i0, template: `
2747
2797
  <ui-alert-dialog [open]="open()">
2748
2798
  <ui-alert-dialog-content
2799
+ [class]="class()"
2749
2800
  [title]="title()"
2750
2801
  [description]="description()"
2751
2802
  [actionText]="confirmLabel()"
@@ -2765,6 +2816,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
2765
2816
  template: `
2766
2817
  <ui-alert-dialog [open]="open()">
2767
2818
  <ui-alert-dialog-content
2819
+ [class]="class()"
2768
2820
  [title]="title()"
2769
2821
  [description]="description()"
2770
2822
  [actionText]="confirmLabel()"
@@ -2774,8 +2826,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
2774
2826
  />
2775
2827
  </ui-alert-dialog>
2776
2828
  `,
2829
+ host: { class: 'contents', '[attr.data-slot]': '"confirm-dialog"' },
2777
2830
  }]
2778
- }], ctorParameters: () => [], propDecorators: { confirmed: [{ type: i0.Output, args: ["confirmed"] }], cancelled: [{ type: i0.Output, args: ["cancelled"] }] } });
2831
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], confirmed: [{ type: i0.Output, args: ["confirmed"] }], cancelled: [{ type: i0.Output, args: ["cancelled"] }] } });
2779
2832
 
2780
2833
  class ConfirmDirective {
2781
2834
  constructor() {
@@ -4183,7 +4236,7 @@ class DataTableColumnHeaderComponent {
4183
4236
  }
4184
4237
  }
4185
4238
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DataTableColumnHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4186
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DataTableColumnHeaderComponent, isStandalone: true, selector: "ui-data-table-column-header", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, enableSorting: { classPropertyName: "enableSorting", publicName: "enableSorting", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, sortIndex: { classPropertyName: "sortIndex", publicName: "sortIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sort: "sort", sortMeta: "sortMeta" }, ngImport: i0, template: "<div [class]=\"containerClasses()\">\n @if (!enableSorting()) {\n <div>{{ title() }}</div>\n } @else {\n <ui-button\n variant=\"ghost\"\n size=\"sm\"\n class=\"-ms-2 h-8 pointer-coarse:h-11 min-w-0 pointer-coarse:min-w-11 shrink data-[state=open]:bg-accent\"\n [ariaLabel]=\"sortAriaLabel()\"\n (click)=\"toggleSort($event)\"\n >\n <span class=\"truncate\">{{ title() }}</span>\n @if (direction() === 'desc') {\n <ui-icon name=\"arrow-down\" class=\"ms-2 h-4 w-4\" />\n } @else if (direction() === 'asc') {\n <ui-icon name=\"arrow-up\" class=\"ms-2 h-4 w-4\" />\n } @else {\n <ui-icon name=\"chevrons-up-down\" class=\"ms-2 h-4 w-4\" />\n }\n @if (sortIndex() !== null) {\n <span\n class=\"ms-1 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-muted px-1 text-[10px] leading-none\"\n aria-hidden=\"true\"\n >\n {{ (sortIndex() ?? 0) + 1 }}\n </span>\n }\n </ui-button>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4239
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DataTableColumnHeaderComponent, isStandalone: true, selector: "ui-data-table-column-header", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, enableSorting: { classPropertyName: "enableSorting", publicName: "enableSorting", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, sortIndex: { classPropertyName: "sortIndex", publicName: "sortIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sort: "sort", sortMeta: "sortMeta" }, ngImport: i0, template: "<div [class]=\"containerClasses()\" [attr.data-slot]=\"'data-table-column-header'\">\n @if (!enableSorting()) {\n <div>{{ title() }}</div>\n } @else {\n <ui-button\n variant=\"ghost\"\n size=\"sm\"\n class=\"-ms-2 h-8 pointer-coarse:h-11 min-w-0 pointer-coarse:min-w-11 shrink data-[state=open]:bg-accent\"\n [ariaLabel]=\"sortAriaLabel()\"\n (click)=\"toggleSort($event)\"\n >\n <span class=\"truncate\">{{ title() }}</span>\n @if (direction() === 'desc') {\n <ui-icon name=\"arrow-down\" class=\"ms-2 h-4 w-4\" />\n } @else if (direction() === 'asc') {\n <ui-icon name=\"arrow-up\" class=\"ms-2 h-4 w-4\" />\n } @else {\n <ui-icon name=\"chevrons-up-down\" class=\"ms-2 h-4 w-4\" />\n }\n @if (sortIndex() !== null) {\n <span\n class=\"ms-1 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-muted px-1 text-[10px] leading-none\"\n aria-hidden=\"true\"\n >\n {{ (sortIndex() ?? 0) + 1 }}\n </span>\n }\n </ui-button>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4187
4240
  }
4188
4241
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DataTableColumnHeaderComponent, decorators: [{
4189
4242
  type: Component,
@@ -4191,7 +4244,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
4191
4244
  CommonModule,
4192
4245
  ButtonComponent,
4193
4246
  IconComponent,
4194
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"containerClasses()\">\n @if (!enableSorting()) {\n <div>{{ title() }}</div>\n } @else {\n <ui-button\n variant=\"ghost\"\n size=\"sm\"\n class=\"-ms-2 h-8 pointer-coarse:h-11 min-w-0 pointer-coarse:min-w-11 shrink data-[state=open]:bg-accent\"\n [ariaLabel]=\"sortAriaLabel()\"\n (click)=\"toggleSort($event)\"\n >\n <span class=\"truncate\">{{ title() }}</span>\n @if (direction() === 'desc') {\n <ui-icon name=\"arrow-down\" class=\"ms-2 h-4 w-4\" />\n } @else if (direction() === 'asc') {\n <ui-icon name=\"arrow-up\" class=\"ms-2 h-4 w-4\" />\n } @else {\n <ui-icon name=\"chevrons-up-down\" class=\"ms-2 h-4 w-4\" />\n }\n @if (sortIndex() !== null) {\n <span\n class=\"ms-1 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-muted px-1 text-[10px] leading-none\"\n aria-hidden=\"true\"\n >\n {{ (sortIndex() ?? 0) + 1 }}\n </span>\n }\n </ui-button>\n }\n</div>\n" }]
4247
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"containerClasses()\" [attr.data-slot]=\"'data-table-column-header'\">\n @if (!enableSorting()) {\n <div>{{ title() }}</div>\n } @else {\n <ui-button\n variant=\"ghost\"\n size=\"sm\"\n class=\"-ms-2 h-8 pointer-coarse:h-11 min-w-0 pointer-coarse:min-w-11 shrink data-[state=open]:bg-accent\"\n [ariaLabel]=\"sortAriaLabel()\"\n (click)=\"toggleSort($event)\"\n >\n <span class=\"truncate\">{{ title() }}</span>\n @if (direction() === 'desc') {\n <ui-icon name=\"arrow-down\" class=\"ms-2 h-4 w-4\" />\n } @else if (direction() === 'asc') {\n <ui-icon name=\"arrow-up\" class=\"ms-2 h-4 w-4\" />\n } @else {\n <ui-icon name=\"chevrons-up-down\" class=\"ms-2 h-4 w-4\" />\n }\n @if (sortIndex() !== null) {\n <span\n class=\"ms-1 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-muted px-1 text-[10px] leading-none\"\n aria-hidden=\"true\"\n >\n {{ (sortIndex() ?? 0) + 1 }}\n </span>\n }\n </ui-button>\n }\n</div>\n" }]
4195
4248
  }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], enableSorting: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableSorting", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], sortIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortIndex", required: false }] }], sort: [{ type: i0.Output, args: ["sort"] }], sortMeta: [{ type: i0.Output, args: ["sortMeta"] }] } });
4196
4249
 
4197
4250
  const SELECT = new InjectionToken('SELECT');
@@ -4210,6 +4263,9 @@ function revealSelectOption(list, option) {
4210
4263
  class SelectComponent {
4211
4264
  static { this.nextId = 0; }
4212
4265
  constructor() {
4266
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
4267
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
4268
+ this.classes = computed(() => cn('relative inline-block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
4213
4269
  this.el = inject(ElementRef);
4214
4270
  this.document = inject(DOCUMENT);
4215
4271
  /**
@@ -4664,7 +4720,7 @@ class SelectComponent {
4664
4720
  this._disabled.set(isDisabled);
4665
4721
  }
4666
4722
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4667
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SelectComponent, isStandalone: true, selector: "ui-select", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, displayWith: { classPropertyName: "displayWith", publicName: "displayWith", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, valueAttribute: { classPropertyName: "valueAttribute", publicName: "valueAttribute", isSignal: true, isRequired: false, transformFunction: null }, disabledWith: { classPropertyName: "disabledWith", publicName: "disabledWith", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "attr.dir": "dir()" }, classAttribute: "relative inline-block" }, providers: [
4723
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SelectComponent, isStandalone: true, selector: "ui-select", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, displayWith: { classPropertyName: "displayWith", publicName: "displayWith", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, valueAttribute: { classPropertyName: "valueAttribute", publicName: "valueAttribute", isSignal: true, isRequired: false, transformFunction: null }, disabledWith: { classPropertyName: "disabledWith", publicName: "disabledWith", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "data-slot": "select" }, properties: { "class": "classes()", "attr.dir": "dir()" } }, providers: [
4668
4724
  { provide: SELECT, useExisting: forwardRef(() => SelectComponent) },
4669
4725
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SelectComponent), multi: true }
4670
4726
  ], viewQueries: [{ propertyName: "contentEl", first: true, predicate: ["contentEl"], descendants: true }], ngImport: i0, template: `
@@ -4821,11 +4877,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
4821
4877
  } @else {
4822
4878
  <ng-content />
4823
4879
  }
4824
- `, host: { class: 'relative inline-block', '[attr.dir]': 'dir()' }, providers: [
4880
+ `, host: { '[class]': 'classes()', '[attr.dir]': 'dir()', 'data-slot': 'select' }, providers: [
4825
4881
  { provide: SELECT, useExisting: forwardRef(() => SelectComponent) },
4826
4882
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SelectComponent), multi: true }
4827
4883
  ], styles: [":host{--_d: var(--density-select, var(--density, 1))}@layer components{[data-slot=select-trigger]{height:calc(2.25rem * var(--_d));padding-inline:calc(.75rem * var(--_d));padding-block:calc(.5rem * var(--_d));gap:calc(.5rem * var(--_d))}}@layer components{[data-slot=select-option]{min-height:calc(2rem * var(--_d))}@media(pointer:coarse){[data-slot=select-option]{min-height:max(2.75rem,calc(2rem * var(--_d)))}}}\n"] }]
4828
- }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], displayWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayWith", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], valueAttribute: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueAttribute", required: false }] }], disabledWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledWith", required: false }] }], contentEl: [{
4884
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], displayWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayWith", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], valueAttribute: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueAttribute", required: false }] }], disabledWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledWith", required: false }] }], contentEl: [{
4829
4885
  type: ViewChild,
4830
4886
  args: ['contentEl']
4831
4887
  }] } });
@@ -4990,10 +5046,12 @@ class SelectValueComponent {
4990
5046
  return '';
4991
5047
  return stringifyValue(val);
4992
5048
  }, ...(ngDevMode ? [{ debugName: "shownValue" }] : /* istanbul ignore next */ []));
4993
- this.hostClasses = computed(() => cn('flex-1 truncate ltr:text-left rtl:text-right'), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
5049
+ /** Extra classes merged onto the value text, after the truncating default. */
5050
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
5051
+ this.hostClasses = computed(() => cn('flex-1 truncate ltr:text-left rtl:text-right', this.class()), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
4994
5052
  }
4995
5053
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SelectValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4996
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SelectValueComponent, isStandalone: true, selector: "ui-select-value", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, displayValue: { classPropertyName: "displayValue", publicName: "displayValue", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()", "attr.data-slot": "\"select-value\"" } }, ngImport: i0, template: `
5054
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: SelectValueComponent, isStandalone: true, selector: "ui-select-value", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, displayValue: { classPropertyName: "displayValue", publicName: "displayValue", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()", "attr.data-slot": "\"select-value\"" } }, ngImport: i0, template: `
4997
5055
  @if (hasValue()) {
4998
5056
  <span class="truncate">{{ shownValue() }}</span>
4999
5057
  } @else {
@@ -5018,12 +5076,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
5018
5076
  '[attr.data-slot]': '"select-value"'
5019
5077
  },
5020
5078
  }]
5021
- }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], displayValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayValue", required: false }] }] } });
5079
+ }], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], displayValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayValue", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
5022
5080
 
5023
5081
  class SelectContentComponent {
5024
5082
  constructor() {
5025
5083
  this.select = inject(SELECT, { optional: true });
5026
- this.el = inject(ElementRef);
5027
5084
  this.document = inject(DOCUMENT);
5028
5085
  /** Extra classes merged onto the popup panel, after the positioning classes so they can override them. */
5029
5086
  this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
@@ -5327,8 +5384,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
5327
5384
  }] });
5328
5385
 
5329
5386
  class SelectLabelComponent {
5387
+ constructor() {
5388
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
5389
+ 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 */ []));
5391
+ }
5330
5392
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SelectLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5331
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: SelectLabelComponent, isStandalone: true, selector: "ui-select-label", host: { properties: { "attr.data-slot": "\"select-label\"" }, classAttribute: "text-muted-foreground px-2 py-1.5 text-xs" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5393
+ 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 }); }
5332
5394
  }
5333
5395
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SelectLabelComponent, decorators: [{
5334
5396
  type: Component,
@@ -5337,15 +5399,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
5337
5399
  changeDetection: ChangeDetectionStrategy.OnPush,
5338
5400
  template: `<ng-content />`,
5339
5401
  host: {
5340
- class: 'text-muted-foreground px-2 py-1.5 text-xs',
5402
+ '[class]': 'classes()',
5341
5403
  '[attr.data-slot]': '"select-label"',
5342
5404
  },
5343
5405
  }]
5344
- }] });
5406
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
5345
5407
 
5346
5408
  class SelectSeparatorComponent {
5409
+ constructor() {
5410
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
5411
+ 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 */ []));
5413
+ }
5347
5414
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SelectSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5348
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: SelectSeparatorComponent, isStandalone: true, selector: "ui-select-separator", host: { properties: { "attr.data-slot": "\"select-separator\"" }, classAttribute: "bg-border pointer-events-none -mx-1 my-1 h-px" }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5415
+ 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 }); }
5349
5416
  }
5350
5417
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: SelectSeparatorComponent, decorators: [{
5351
5418
  type: Component,
@@ -5354,11 +5421,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
5354
5421
  changeDetection: ChangeDetectionStrategy.OnPush,
5355
5422
  template: ``,
5356
5423
  host: {
5357
- class: 'bg-border pointer-events-none -mx-1 my-1 h-px',
5424
+ '[class]': 'classes()',
5358
5425
  '[attr.data-slot]': '"select-separator"',
5359
5426
  },
5360
5427
  }]
5361
- }] });
5428
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
5362
5429
 
5363
5430
  const PAGINATION_LOCALES = {
5364
5431
  en: {
@@ -5489,7 +5556,7 @@ class PaginationComponent {
5489
5556
  const siblings = this.siblingCount();
5490
5557
  if (total <= 0)
5491
5558
  return [];
5492
- const range = (start, end) => Array.from({ length: end - start + 1 }, (_, i) => start + i);
5559
+ const range = (start, end) => Array.from({ length: end - start + 1 }, (...[, i]) => start + i);
5493
5560
  const totalPageNumbers = siblings * 2 + 5; // siblings + first + last + current + 2 ellipsis
5494
5561
  if (total <= totalPageNumbers) {
5495
5562
  return range(1, total);
@@ -5884,6 +5951,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
5884
5951
  class DataTablePaginationComponent {
5885
5952
  constructor() {
5886
5953
  this._el = inject(ElementRef);
5954
+ /** Extra classes merged onto the pagination bar, after the wrapping flex row. */
5955
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
5956
+ this.classes = computed(() => cn('flex flex-wrap items-center justify-between gap-y-2 px-2', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
5887
5957
  /**
5888
5958
  * Total row count across all pages (not the current page's length). Drives the
5889
5959
  * page count and therefore the next/last disabled state; leave it at 0 and the
@@ -5970,7 +6040,7 @@ class DataTablePaginationComponent {
5970
6040
  });
5971
6041
  }
5972
6042
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DataTablePaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5973
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DataTablePaginationComponent, isStandalone: true, selector: "ui-data-table-pagination", inputs: { total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showPageSizeSelector: { classPropertyName: "showPageSizeSelector", publicName: "showPageSizeSelector", isSignal: true, isRequired: false, transformFunction: null }, rowsPerPageLabel: { classPropertyName: "rowsPerPageLabel", publicName: "rowsPerPageLabel", isSignal: true, isRequired: false, transformFunction: null }, pageLabel: { classPropertyName: "pageLabel", publicName: "pageLabel", isSignal: true, isRequired: false, transformFunction: null }, ofLabel: { classPropertyName: "ofLabel", publicName: "ofLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { paginationChange: "paginationChange" }, ngImport: i0, template: "<div class=\"flex flex-wrap items-center justify-between gap-y-2 px-2\">\n <div class=\"flex-1 text-sm text-muted-foreground\">\n </div>\n <div class=\"flex items-center space-x-2 sm:space-x-6 lg:space-x-8\">\n @if (showPageSizeSelector()) {\n <div class=\"flex items-center space-x-2\">\n <p class=\"hidden sm:inline text-sm font-medium\">{{ rowsPerPageLabel() }}</p>\n <ui-select\n [ngModel]=\"pageSizeString()\"\n (ngModelChange)=\"onPageSizeChange($event)\">\n <ui-select-trigger class=\"h-8 w-[70px]\">\n <ui-select-value [placeholder]=\"pageSizeString()\" />\n </ui-select-trigger>\n <ui-select-content side=\"top\">\n @for (size of pageSizeOptions(); track size) {\n <ui-select-item [value]=\"size.toString()\">\n {{ size }}\n </ui-select-item>\n }\n </ui-select-content>\n </ui-select>\n </div>\n }\n <div class=\"flex items-center space-x-2\">\n <ui-pagination [class]=\"'mx-0 w-auto'\">\n <ui-pagination-content>\n <ui-pagination-item>\n <ui-pagination-link\n class=\"hidden lg:flex border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canPrevious()\"\n (click)=\"onFirstPage()\"\n >\n <span class=\"sr-only\">Go to first page</span>\n <ui-icon [name]=\"isRtl() ? 'chevrons-right' : 'chevrons-left'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n <ui-pagination-item>\n <ui-pagination-link\n class=\"border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canPrevious()\"\n (click)=\"onPreviousPage()\"\n >\n <span class=\"sr-only\">Go to previous page</span>\n <ui-icon [name]=\"isRtl() ? 'chevron-right' : 'chevron-left'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n \n <div class=\"flex w-auto min-w-[80px] sm:min-w-[100px] items-center justify-center text-sm font-medium\">\n {{ pageLabel() }} {{ currentPage() }} {{ ofLabel() }} {{ totalPages() }}\n </div>\n\n <ui-pagination-item>\n <ui-pagination-link\n class=\"border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canNext()\"\n (click)=\"onNextPage()\"\n >\n <span class=\"sr-only\">Go to next page</span>\n <ui-icon [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n <ui-pagination-item>\n <ui-pagination-link\n class=\"hidden lg:flex border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canNext()\"\n (click)=\"onLastPage()\"\n >\n <span class=\"sr-only\">Go to last page</span>\n <ui-icon [name]=\"isRtl() ? 'chevrons-left' : 'chevrons-right'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n </ui-pagination-content>\n </ui-pagination>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { 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: SelectComponent, selector: "ui-select", inputs: ["disabled", "placeholder", "ariaLabel", "ariaLabelledby", "defaultValue", "locale", "position", "options", "displayWith", "value", "valueAttribute", "disabledWith"], outputs: ["valueChange"] }, { kind: "component", type: SelectTriggerComponent, selector: "ui-select-trigger", inputs: ["class", "ariaLabel", "loading", "skeleton"] }, { kind: "component", type: SelectValueComponent, selector: "ui-select-value", inputs: ["placeholder", "displayValue"] }, { kind: "component", type: SelectContentComponent, selector: "ui-select-content", inputs: ["class", "position", "side"] }, { kind: "component", type: SelectItemComponent, selector: "ui-select-item", inputs: ["value", "disabled", "class"] }, { kind: "component", type: PaginationComponent, selector: "ui-pagination", inputs: ["class", "currentPage", "totalPages", "siblingCount", "locale"], outputs: ["pageChange"] }, { kind: "component", type: PaginationContentComponent, selector: "ui-pagination-content", inputs: ["class"] }, { kind: "component", type: PaginationItemComponent, selector: "ui-pagination-item", inputs: ["class"] }, { kind: "component", type: PaginationLinkComponent, selector: "ui-pagination-link", inputs: ["isActive", "size", "class", "disabled"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6043
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DataTablePaginationComponent, isStandalone: true, selector: "ui-data-table-pagination", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showPageSizeSelector: { classPropertyName: "showPageSizeSelector", publicName: "showPageSizeSelector", isSignal: true, isRequired: false, transformFunction: null }, rowsPerPageLabel: { classPropertyName: "rowsPerPageLabel", publicName: "rowsPerPageLabel", isSignal: true, isRequired: false, transformFunction: null }, pageLabel: { classPropertyName: "pageLabel", publicName: "pageLabel", isSignal: true, isRequired: false, transformFunction: null }, ofLabel: { classPropertyName: "ofLabel", publicName: "ofLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { paginationChange: "paginationChange" }, ngImport: i0, template: "<div [class]=\"classes()\" [attr.data-slot]=\"'data-table-pagination'\">\n <div class=\"flex-1 text-sm text-muted-foreground\">\n </div>\n <div class=\"flex items-center space-x-2 sm:space-x-6 lg:space-x-8\">\n @if (showPageSizeSelector()) {\n <div class=\"flex items-center space-x-2\">\n <p class=\"hidden sm:inline text-sm font-medium\">{{ rowsPerPageLabel() }}</p>\n <ui-select\n [ngModel]=\"pageSizeString()\"\n (ngModelChange)=\"onPageSizeChange($event)\">\n <ui-select-trigger class=\"h-8 w-[70px]\">\n <ui-select-value [placeholder]=\"pageSizeString()\" />\n </ui-select-trigger>\n <ui-select-content side=\"top\">\n @for (size of pageSizeOptions(); track size) {\n <ui-select-item [value]=\"size.toString()\">\n {{ size }}\n </ui-select-item>\n }\n </ui-select-content>\n </ui-select>\n </div>\n }\n <div class=\"flex items-center space-x-2\">\n <ui-pagination [class]=\"'mx-0 w-auto'\">\n <ui-pagination-content>\n <ui-pagination-item>\n <ui-pagination-link\n class=\"hidden lg:flex border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canPrevious()\"\n (click)=\"onFirstPage()\"\n >\n <span class=\"sr-only\">Go to first page</span>\n <ui-icon [name]=\"isRtl() ? 'chevrons-right' : 'chevrons-left'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n <ui-pagination-item>\n <ui-pagination-link\n class=\"border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canPrevious()\"\n (click)=\"onPreviousPage()\"\n >\n <span class=\"sr-only\">Go to previous page</span>\n <ui-icon [name]=\"isRtl() ? 'chevron-right' : 'chevron-left'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n \n <div class=\"flex w-auto min-w-[80px] sm:min-w-[100px] items-center justify-center text-sm font-medium\">\n {{ pageLabel() }} {{ currentPage() }} {{ ofLabel() }} {{ totalPages() }}\n </div>\n\n <ui-pagination-item>\n <ui-pagination-link\n class=\"border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canNext()\"\n (click)=\"onNextPage()\"\n >\n <span class=\"sr-only\">Go to next page</span>\n <ui-icon [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n <ui-pagination-item>\n <ui-pagination-link\n class=\"hidden lg:flex border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canNext()\"\n (click)=\"onLastPage()\"\n >\n <span class=\"sr-only\">Go to last page</span>\n <ui-icon [name]=\"isRtl() ? 'chevrons-left' : 'chevrons-right'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n </ui-pagination-content>\n </ui-pagination>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { 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: SelectComponent, selector: "ui-select", inputs: ["class", "disabled", "placeholder", "ariaLabel", "ariaLabelledby", "defaultValue", "locale", "position", "options", "displayWith", "value", "valueAttribute", "disabledWith"], outputs: ["valueChange"] }, { kind: "component", type: SelectTriggerComponent, selector: "ui-select-trigger", inputs: ["class", "ariaLabel", "loading", "skeleton"] }, { kind: "component", type: SelectValueComponent, selector: "ui-select-value", inputs: ["placeholder", "displayValue", "class"] }, { kind: "component", type: SelectContentComponent, selector: "ui-select-content", inputs: ["class", "position", "side"] }, { kind: "component", type: SelectItemComponent, selector: "ui-select-item", inputs: ["value", "disabled", "class"] }, { kind: "component", type: PaginationComponent, selector: "ui-pagination", inputs: ["class", "currentPage", "totalPages", "siblingCount", "locale"], outputs: ["pageChange"] }, { kind: "component", type: PaginationContentComponent, selector: "ui-pagination-content", inputs: ["class"] }, { kind: "component", type: PaginationItemComponent, selector: "ui-pagination-item", inputs: ["class"] }, { kind: "component", type: PaginationLinkComponent, selector: "ui-pagination-link", inputs: ["isActive", "size", "class", "disabled"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5974
6044
  }
5975
6045
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DataTablePaginationComponent, decorators: [{
5976
6046
  type: Component,
@@ -5987,8 +6057,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
5987
6057
  PaginationItemComponent,
5988
6058
  PaginationLinkComponent,
5989
6059
  IconComponent,
5990
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-wrap items-center justify-between gap-y-2 px-2\">\n <div class=\"flex-1 text-sm text-muted-foreground\">\n </div>\n <div class=\"flex items-center space-x-2 sm:space-x-6 lg:space-x-8\">\n @if (showPageSizeSelector()) {\n <div class=\"flex items-center space-x-2\">\n <p class=\"hidden sm:inline text-sm font-medium\">{{ rowsPerPageLabel() }}</p>\n <ui-select\n [ngModel]=\"pageSizeString()\"\n (ngModelChange)=\"onPageSizeChange($event)\">\n <ui-select-trigger class=\"h-8 w-[70px]\">\n <ui-select-value [placeholder]=\"pageSizeString()\" />\n </ui-select-trigger>\n <ui-select-content side=\"top\">\n @for (size of pageSizeOptions(); track size) {\n <ui-select-item [value]=\"size.toString()\">\n {{ size }}\n </ui-select-item>\n }\n </ui-select-content>\n </ui-select>\n </div>\n }\n <div class=\"flex items-center space-x-2\">\n <ui-pagination [class]=\"'mx-0 w-auto'\">\n <ui-pagination-content>\n <ui-pagination-item>\n <ui-pagination-link\n class=\"hidden lg:flex border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canPrevious()\"\n (click)=\"onFirstPage()\"\n >\n <span class=\"sr-only\">Go to first page</span>\n <ui-icon [name]=\"isRtl() ? 'chevrons-right' : 'chevrons-left'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n <ui-pagination-item>\n <ui-pagination-link\n class=\"border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canPrevious()\"\n (click)=\"onPreviousPage()\"\n >\n <span class=\"sr-only\">Go to previous page</span>\n <ui-icon [name]=\"isRtl() ? 'chevron-right' : 'chevron-left'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n \n <div class=\"flex w-auto min-w-[80px] sm:min-w-[100px] items-center justify-center text-sm font-medium\">\n {{ pageLabel() }} {{ currentPage() }} {{ ofLabel() }} {{ totalPages() }}\n </div>\n\n <ui-pagination-item>\n <ui-pagination-link\n class=\"border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canNext()\"\n (click)=\"onNextPage()\"\n >\n <span class=\"sr-only\">Go to next page</span>\n <ui-icon [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n <ui-pagination-item>\n <ui-pagination-link\n class=\"hidden lg:flex border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canNext()\"\n (click)=\"onLastPage()\"\n >\n <span class=\"sr-only\">Go to last page</span>\n <ui-icon [name]=\"isRtl() ? 'chevrons-left' : 'chevrons-right'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n </ui-pagination-content>\n </ui-pagination>\n </div>\n </div>\n</div>\n" }]
5991
- }], propDecorators: { total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: true }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], showPageSizeSelector: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPageSizeSelector", required: false }] }], rowsPerPageLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowsPerPageLabel", required: false }] }], pageLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageLabel", required: false }] }], ofLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ofLabel", required: false }] }], paginationChange: [{ type: i0.Output, args: ["paginationChange"] }] } });
6060
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"classes()\" [attr.data-slot]=\"'data-table-pagination'\">\n <div class=\"flex-1 text-sm text-muted-foreground\">\n </div>\n <div class=\"flex items-center space-x-2 sm:space-x-6 lg:space-x-8\">\n @if (showPageSizeSelector()) {\n <div class=\"flex items-center space-x-2\">\n <p class=\"hidden sm:inline text-sm font-medium\">{{ rowsPerPageLabel() }}</p>\n <ui-select\n [ngModel]=\"pageSizeString()\"\n (ngModelChange)=\"onPageSizeChange($event)\">\n <ui-select-trigger class=\"h-8 w-[70px]\">\n <ui-select-value [placeholder]=\"pageSizeString()\" />\n </ui-select-trigger>\n <ui-select-content side=\"top\">\n @for (size of pageSizeOptions(); track size) {\n <ui-select-item [value]=\"size.toString()\">\n {{ size }}\n </ui-select-item>\n }\n </ui-select-content>\n </ui-select>\n </div>\n }\n <div class=\"flex items-center space-x-2\">\n <ui-pagination [class]=\"'mx-0 w-auto'\">\n <ui-pagination-content>\n <ui-pagination-item>\n <ui-pagination-link\n class=\"hidden lg:flex border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canPrevious()\"\n (click)=\"onFirstPage()\"\n >\n <span class=\"sr-only\">Go to first page</span>\n <ui-icon [name]=\"isRtl() ? 'chevrons-right' : 'chevrons-left'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n <ui-pagination-item>\n <ui-pagination-link\n class=\"border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canPrevious()\"\n (click)=\"onPreviousPage()\"\n >\n <span class=\"sr-only\">Go to previous page</span>\n <ui-icon [name]=\"isRtl() ? 'chevron-right' : 'chevron-left'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n \n <div class=\"flex w-auto min-w-[80px] sm:min-w-[100px] items-center justify-center text-sm font-medium\">\n {{ pageLabel() }} {{ currentPage() }} {{ ofLabel() }} {{ totalPages() }}\n </div>\n\n <ui-pagination-item>\n <ui-pagination-link\n class=\"border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canNext()\"\n (click)=\"onNextPage()\"\n >\n <span class=\"sr-only\">Go to next page</span>\n <ui-icon [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n <ui-pagination-item>\n <ui-pagination-link\n class=\"hidden lg:flex border border-input rounded-md bg-background shadow-sm\"\n size=\"icon\"\n [disabled]=\"!canNext()\"\n (click)=\"onLastPage()\"\n >\n <span class=\"sr-only\">Go to last page</span>\n <ui-icon [name]=\"isRtl() ? 'chevrons-left' : 'chevrons-right'\" class=\"h-4 w-4\" />\n </ui-pagination-link>\n </ui-pagination-item>\n </ui-pagination-content>\n </ui-pagination>\n </div>\n </div>\n</div>\n" }]
6061
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: true }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], showPageSizeSelector: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPageSizeSelector", required: false }] }], rowsPerPageLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowsPerPageLabel", required: false }] }], pageLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageLabel", required: false }] }], ofLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ofLabel", required: false }] }], paginationChange: [{ type: i0.Output, args: ["paginationChange"] }] } });
5992
6062
 
5993
6063
  /**
5994
6064
  * Touch device detection and gesture utilities.
@@ -6674,7 +6744,7 @@ class TableBodyComponent {
6674
6744
  this.skeleton = input(false, ...(ngDevMode ? [{ debugName: "skeleton" }] : /* istanbul ignore next */ []));
6675
6745
  /** How many placeholder rows the skeleton shows — match your usual page size so the table does not resize when the data lands. */
6676
6746
  this.skeletonRows = input(5, ...(ngDevMode ? [{ debugName: "skeletonRows" }] : /* istanbul ignore next */ []));
6677
- this.skeletonRowItems = computed(() => Array.from({ length: this.skeletonRows() }, (_, i) => i), ...(ngDevMode ? [{ debugName: "skeletonRowItems" }] : /* istanbul ignore next */ []));
6747
+ this.skeletonRowItems = computed(() => Array.from({ length: this.skeletonRows() }, (...[, i]) => i), ...(ngDevMode ? [{ debugName: "skeletonRowItems" }] : /* istanbul ignore next */ []));
6678
6748
  this.classes = computed(() => cn('', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
6679
6749
  }
6680
6750
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TableBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -7856,7 +7926,7 @@ class CalendarComponent {
7856
7926
  this.viewDate.set(new Date(yearNum, current.getMonth(), 1));
7857
7927
  }
7858
7928
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7859
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: CalendarComponent, isStandalone: true, selector: "ui-calendar", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, showMonthSelect: { classPropertyName: "showMonthSelect", publicName: "showMonthSelect", isSignal: true, isRequired: false, transformFunction: null }, showYearSelect: { classPropertyName: "showYearSelect", publicName: "showYearSelect", isSignal: true, isRequired: false, transformFunction: null }, showTimeSelect: { classPropertyName: "showTimeSelect", publicName: "showTimeSelect", isSignal: true, isRequired: false, transformFunction: null }, timeMode: { classPropertyName: "timeMode", publicName: "timeMode", isSignal: true, isRequired: false, transformFunction: null }, weekStartsOn: { classPropertyName: "weekStartsOn", publicName: "weekStartsOn", isSignal: true, isRequired: false, transformFunction: null }, rtl: { classPropertyName: "rtl", publicName: "rtl", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, selectedTimeRange: { classPropertyName: "selectedTimeRange", publicName: "selectedTimeRange", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rtl: "rtlChange", selected: "selectedChange", selectedTimeRange: "selectedTimeRangeChange" }, host: { classAttribute: "contents" }, ngImport: i0, template: "<div [class]=\"classes()\" [attr.data-slot]=\"'calendar'\" [attr.dir]=\"dir()\">\n <!-- Header -->\n <div class=\"flex items-center justify-between px-1 relative mb-4\">\n <ui-button\n variant=\"outline\"\n size=\"icon-sm\"\n (click)=\"previousMonth()\"\n (keydown.enter)=\"previousMonth()\"\n (keydown.space)=\"previousMonth()\"\n [ariaLabel]=\"prevMonthLabel()\"\n >\n <svg class=\"h-4 w-4\" [class.rotate-180]=\"rtl()\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15 19l-7-7 7-7\" />\n </svg>\n </ui-button>\n\n <div class=\"flex items-center gap-1 font-medium text-sm\">\n @if (showMonthSelect()) {\n <ui-select\n [defaultValue]=\"currentMonth().toString()\"\n position=\"popper\"\n (valueChange)=\"onMonthChange($event)\"\n >\n <ui-select-trigger class=\"h-7 w-[110px]\" ariaLabel=\"Month\">\n <ui-select-value [placeholder]=\"currentMonthName()\" [displayValue]=\"currentMonthName()\" />\n </ui-select-trigger>\n <ui-select-content>\n @for (month of monthNames(); track $index) {\n <ui-select-item [value]=\"$index.toString()\">{{ month }}</ui-select-item>\n }\n </ui-select-content>\n </ui-select>\n } @else {\n <span>{{ currentMonthName() }}</span>\n }\n\n @if (showYearSelect()) {\n <ui-select\n [defaultValue]=\"currentYear().toString()\"\n position=\"popper\"\n (valueChange)=\"onYearChange($event)\"\n >\n <ui-select-trigger class=\"h-7 w-[80px]\" ariaLabel=\"Year\">\n <ui-select-value [placeholder]=\"currentYear().toString()\" />\n </ui-select-trigger>\n <ui-select-content class=\"max-h-60\">\n @for (year of years(); track year) {\n <ui-select-item [value]=\"year.toString()\">{{ year }}</ui-select-item>\n }\n </ui-select-content>\n </ui-select>\n } @else {\n <span>{{ currentYear() }}</span>\n }\n </div>\n\n <ui-button\n variant=\"outline\"\n size=\"icon-sm\"\n (click)=\"nextMonth()\"\n (keydown.enter)=\"nextMonth()\"\n (keydown.space)=\"nextMonth()\"\n [ariaLabel]=\"nextMonthLabel()\"\n >\n <svg class=\"h-4 w-4\" [class.rotate-180]=\"rtl()\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5l7 7-7 7\" />\n </svg>\n </ui-button>\n </div>\n\n <!-- Day names -->\n <div class=\"mt-4 grid grid-cols-7 text-center text-xs text-muted-foreground\">\n @for (day of orderedDayNames(); track day) {\n <div class=\"py-2\">{{ day }}</div>\n }\n </div>\n\n <!-- Days grid -->\n <div class=\"grid grid-cols-7 gap-1\">\n @for (day of calendarDays(); track $index) {\n @if (day) {\n <ui-button\n [class]=\"getDayClasses(day)\"\n (click)=\"selectDay(day)\"\n (keydown.enter)=\"selectDay(day)\"\n (keydown.space)=\"selectDay(day)\"\n [disabled]=\"day.getMonth() !== currentMonth()\"\n [variant]=\"'ghost'\"\n [ariaLabel]=\"day.getDate().toString()\"\n >\n {{ day.getDate() }}\n </ui-button>\n } @else {\n <div data-slot=\"calendar-filler\"></div>\n }\n }\n </div>\n\n @if (showTimeSelect()) {\n <div class=\"mt-4 border-t pt-4\">\n @if (timeMode() === 'range') {\n <div class=\"grid grid-cols-2 gap-3\">\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium\" for=\"start-time\">{{ startTimeLabel() }}</label>\n <div class=\"flex items-center rounded-md border border-input focus-within:ring-1 focus-within:ring-ring\">\n <input\n type=\"time\"\n [attr.dir]=\"dir()\"\n class=\"flex-1 w-full bg-transparent px-3 py-1 text-sm outline-none placeholder:text-muted-foreground rtl:pr-0 [&::-webkit-calendar-picker-indicator]:hidden flex rtl:justify-end\"\n [value]=\"startTimeString()\"\n (change)=\"updateStartTime($event)\"\n id=\"start-time\"\n />\n <div class=\"flex items-center justify-center px-3 py-2 ltr:border-l rtl:border-r border-input bg-muted/50 text-muted-foreground\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><polyline points=\"12 6 12 12 16 14\"/></svg>\n </div>\n </div>\n </div>\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium\" for=\"end-time\">{{ endTimeLabel() }}</label>\n <div class=\"flex items-center rounded-md border border-input focus-within:ring-1 focus-within:ring-ring\">\n <input\n type=\"time\"\n [attr.dir]=\"dir()\"\n class=\"flex-1 w-full bg-transparent px-3 py-1 text-sm outline-none placeholder:text-muted-foreground rtl:pr-0 [&::-webkit-calendar-picker-indicator]:hidden flex rtl:justify-end\"\n [value]=\"endTimeString()\"\n (change)=\"updateEndTime($event)\"\n id=\"end-time\"\n />\n <div class=\"flex items-center justify-center px-3 py-2 ltr:border-l rtl:border-r border-input bg-muted/50 text-muted-foreground\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><polyline points=\"12 6 12 12 16 14\"/></svg>\n </div>\n </div>\n </div>\n </div>\n } @else {\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium\" for=\"time\">{{ timeLabel() }}</label>\n <div class=\"flex items-center rounded-md border border-input focus-within:ring-1 focus-within:ring-ring\">\n <input\n type=\"time\"\n [attr.dir]=\"dir()\"\n class=\"flex-1 w-full bg-transparent px-3 py-1 text-sm outline-none placeholder:text-muted-foreground rtl:pr-0 [&::-webkit-calendar-picker-indicator]:hidden flex rtl:justify-end\"\n [value]=\"selectedTimeString()\"\n (change)=\"updateTime($event)\"\n id=\"time\"\n />\n <div class=\"flex items-center justify-center px-3 py-2 ltr:border-l rtl:border-r border-input bg-muted/50 text-muted-foreground\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><polyline points=\"12 6 12 12 16 14\"/></svg>\n </div>\n </div>\n </div>\n }\n </div>\n }\n</div>\n", styles: [":host{--_d: var(--density-picker, var(--density, 1));--density-button: var(--_d);--density-select: var(--_d)}@layer components{ui-select-trigger{--ui-select-trigger-h: 1.75rem}[data-slot=calendar-filler]{height:calc(2.25rem * var(--_d));width:calc(2.25rem * var(--_d))}}\n"], dependencies: [{ 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: SelectComponent, selector: "ui-select", inputs: ["disabled", "placeholder", "ariaLabel", "ariaLabelledby", "defaultValue", "locale", "position", "options", "displayWith", "value", "valueAttribute", "disabledWith"], outputs: ["valueChange"] }, { kind: "component", type: SelectTriggerComponent, selector: "ui-select-trigger", inputs: ["class", "ariaLabel", "loading", "skeleton"] }, { kind: "component", type: SelectValueComponent, selector: "ui-select-value", inputs: ["placeholder", "displayValue"] }, { kind: "component", type: SelectContentComponent, selector: "ui-select-content", inputs: ["class", "position", "side"] }, { kind: "component", type: SelectItemComponent, selector: "ui-select-item", inputs: ["value", "disabled", "class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7929
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: CalendarComponent, isStandalone: true, selector: "ui-calendar", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, showMonthSelect: { classPropertyName: "showMonthSelect", publicName: "showMonthSelect", isSignal: true, isRequired: false, transformFunction: null }, showYearSelect: { classPropertyName: "showYearSelect", publicName: "showYearSelect", isSignal: true, isRequired: false, transformFunction: null }, showTimeSelect: { classPropertyName: "showTimeSelect", publicName: "showTimeSelect", isSignal: true, isRequired: false, transformFunction: null }, timeMode: { classPropertyName: "timeMode", publicName: "timeMode", isSignal: true, isRequired: false, transformFunction: null }, weekStartsOn: { classPropertyName: "weekStartsOn", publicName: "weekStartsOn", isSignal: true, isRequired: false, transformFunction: null }, rtl: { classPropertyName: "rtl", publicName: "rtl", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, selectedTimeRange: { classPropertyName: "selectedTimeRange", publicName: "selectedTimeRange", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rtl: "rtlChange", selected: "selectedChange", selectedTimeRange: "selectedTimeRangeChange" }, host: { classAttribute: "contents" }, ngImport: i0, template: "<div [class]=\"classes()\" [attr.data-slot]=\"'calendar'\" [attr.dir]=\"dir()\">\n <!-- Header -->\n <div class=\"flex items-center justify-between px-1 relative mb-4\">\n <ui-button\n variant=\"outline\"\n size=\"icon-sm\"\n (click)=\"previousMonth()\"\n (keydown.enter)=\"previousMonth()\"\n (keydown.space)=\"previousMonth()\"\n [ariaLabel]=\"prevMonthLabel()\"\n >\n <svg class=\"h-4 w-4\" [class.rotate-180]=\"rtl()\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15 19l-7-7 7-7\" />\n </svg>\n </ui-button>\n\n <div class=\"flex items-center gap-1 font-medium text-sm\">\n @if (showMonthSelect()) {\n <ui-select\n [defaultValue]=\"currentMonth().toString()\"\n position=\"popper\"\n (valueChange)=\"onMonthChange($event)\"\n >\n <ui-select-trigger class=\"h-7 w-[110px]\" ariaLabel=\"Month\">\n <ui-select-value [placeholder]=\"currentMonthName()\" [displayValue]=\"currentMonthName()\" />\n </ui-select-trigger>\n <ui-select-content>\n @for (month of monthNames(); track $index) {\n <ui-select-item [value]=\"$index.toString()\">{{ month }}</ui-select-item>\n }\n </ui-select-content>\n </ui-select>\n } @else {\n <span>{{ currentMonthName() }}</span>\n }\n\n @if (showYearSelect()) {\n <ui-select\n [defaultValue]=\"currentYear().toString()\"\n position=\"popper\"\n (valueChange)=\"onYearChange($event)\"\n >\n <ui-select-trigger class=\"h-7 w-[80px]\" ariaLabel=\"Year\">\n <ui-select-value [placeholder]=\"currentYear().toString()\" />\n </ui-select-trigger>\n <ui-select-content class=\"max-h-60\">\n @for (year of years(); track year) {\n <ui-select-item [value]=\"year.toString()\">{{ year }}</ui-select-item>\n }\n </ui-select-content>\n </ui-select>\n } @else {\n <span>{{ currentYear() }}</span>\n }\n </div>\n\n <ui-button\n variant=\"outline\"\n size=\"icon-sm\"\n (click)=\"nextMonth()\"\n (keydown.enter)=\"nextMonth()\"\n (keydown.space)=\"nextMonth()\"\n [ariaLabel]=\"nextMonthLabel()\"\n >\n <svg class=\"h-4 w-4\" [class.rotate-180]=\"rtl()\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5l7 7-7 7\" />\n </svg>\n </ui-button>\n </div>\n\n <!-- Day names -->\n <div class=\"mt-4 grid grid-cols-7 text-center text-xs text-muted-foreground\">\n @for (day of orderedDayNames(); track day) {\n <div class=\"py-2\">{{ day }}</div>\n }\n </div>\n\n <!-- Days grid -->\n <div class=\"grid grid-cols-7 gap-1\">\n @for (day of calendarDays(); track $index) {\n @if (day) {\n <ui-button\n [class]=\"getDayClasses(day)\"\n (click)=\"selectDay(day)\"\n (keydown.enter)=\"selectDay(day)\"\n (keydown.space)=\"selectDay(day)\"\n [disabled]=\"day.getMonth() !== currentMonth()\"\n [variant]=\"'ghost'\"\n [ariaLabel]=\"day.getDate().toString()\"\n >\n {{ day.getDate() }}\n </ui-button>\n } @else {\n <div data-slot=\"calendar-filler\"></div>\n }\n }\n </div>\n\n @if (showTimeSelect()) {\n <div class=\"mt-4 border-t pt-4\">\n @if (timeMode() === 'range') {\n <div class=\"grid grid-cols-2 gap-3\">\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium\" for=\"start-time\">{{ startTimeLabel() }}</label>\n <div class=\"flex items-center rounded-md border border-input focus-within:ring-1 focus-within:ring-ring\">\n <input\n type=\"time\"\n [attr.dir]=\"dir()\"\n class=\"flex-1 w-full bg-transparent px-3 py-1 text-sm outline-none placeholder:text-muted-foreground rtl:pr-0 [&::-webkit-calendar-picker-indicator]:hidden flex rtl:justify-end\"\n [value]=\"startTimeString()\"\n (change)=\"updateStartTime($event)\"\n id=\"start-time\"\n />\n <div class=\"flex items-center justify-center px-3 py-2 ltr:border-l rtl:border-r border-input bg-muted/50 text-muted-foreground\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><polyline points=\"12 6 12 12 16 14\"/></svg>\n </div>\n </div>\n </div>\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium\" for=\"end-time\">{{ endTimeLabel() }}</label>\n <div class=\"flex items-center rounded-md border border-input focus-within:ring-1 focus-within:ring-ring\">\n <input\n type=\"time\"\n [attr.dir]=\"dir()\"\n class=\"flex-1 w-full bg-transparent px-3 py-1 text-sm outline-none placeholder:text-muted-foreground rtl:pr-0 [&::-webkit-calendar-picker-indicator]:hidden flex rtl:justify-end\"\n [value]=\"endTimeString()\"\n (change)=\"updateEndTime($event)\"\n id=\"end-time\"\n />\n <div class=\"flex items-center justify-center px-3 py-2 ltr:border-l rtl:border-r border-input bg-muted/50 text-muted-foreground\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><polyline points=\"12 6 12 12 16 14\"/></svg>\n </div>\n </div>\n </div>\n </div>\n } @else {\n <div class=\"flex flex-col gap-2\">\n <label class=\"text-sm font-medium\" for=\"time\">{{ timeLabel() }}</label>\n <div class=\"flex items-center rounded-md border border-input focus-within:ring-1 focus-within:ring-ring\">\n <input\n type=\"time\"\n [attr.dir]=\"dir()\"\n class=\"flex-1 w-full bg-transparent px-3 py-1 text-sm outline-none placeholder:text-muted-foreground rtl:pr-0 [&::-webkit-calendar-picker-indicator]:hidden flex rtl:justify-end\"\n [value]=\"selectedTimeString()\"\n (change)=\"updateTime($event)\"\n id=\"time\"\n />\n <div class=\"flex items-center justify-center px-3 py-2 ltr:border-l rtl:border-r border-input bg-muted/50 text-muted-foreground\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"h-4 w-4\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><polyline points=\"12 6 12 12 16 14\"/></svg>\n </div>\n </div>\n </div>\n }\n </div>\n }\n</div>\n", styles: [":host{--_d: var(--density-picker, var(--density, 1));--density-button: var(--_d);--density-select: var(--_d)}@layer components{ui-select-trigger{--ui-select-trigger-h: 1.75rem}[data-slot=calendar-filler]{height:calc(2.25rem * var(--_d));width:calc(2.25rem * var(--_d))}}\n"], dependencies: [{ 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: SelectComponent, selector: "ui-select", inputs: ["class", "disabled", "placeholder", "ariaLabel", "ariaLabelledby", "defaultValue", "locale", "position", "options", "displayWith", "value", "valueAttribute", "disabledWith"], outputs: ["valueChange"] }, { kind: "component", type: SelectTriggerComponent, selector: "ui-select-trigger", inputs: ["class", "ariaLabel", "loading", "skeleton"] }, { kind: "component", type: SelectValueComponent, selector: "ui-select-value", inputs: ["placeholder", "displayValue", "class"] }, { kind: "component", type: SelectContentComponent, selector: "ui-select-content", inputs: ["class", "position", "side"] }, { kind: "component", type: SelectItemComponent, selector: "ui-select-item", inputs: ["value", "disabled", "class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7860
7930
  }
7861
7931
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CalendarComponent, decorators: [{
7862
7932
  type: Component,
@@ -8037,7 +8107,7 @@ class DateRangePickerComponent {
8037
8107
  this.onTouched = fn;
8038
8108
  }
8039
8109
  /** `ControlValueAccessor` no-op — bind the {@link disabled} input instead; `control.disable()` alone will not disable the trigger. */
8040
- setDisabledState(_isDisabled) {
8110
+ setDisabledState() {
8041
8111
  // Disabled state is managed via the disabled input binding
8042
8112
  }
8043
8113
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DateRangePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -8290,7 +8360,7 @@ class DatePickerComponent {
8290
8360
  this.onTouched = fn;
8291
8361
  }
8292
8362
  /** `ControlValueAccessor` no-op — bind the {@link disabled} input instead; `control.disable()` alone will not disable the trigger. */
8293
- setDisabledState(_isDisabled) {
8363
+ setDisabledState() {
8294
8364
  // Disabled state is managed via the disabled input binding
8295
8365
  }
8296
8366
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -8334,6 +8404,9 @@ class PopoverComponent {
8334
8404
  this.portalEl = el;
8335
8405
  }
8336
8406
  constructor() {
8407
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
8408
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
8409
+ this.classes = computed(() => cn('relative inline-block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
8337
8410
  this.el = inject(ElementRef);
8338
8411
  this.document = inject(DOCUMENT);
8339
8412
  this.destroyRef = inject(DestroyRef);
@@ -8435,7 +8508,7 @@ class PopoverComponent {
8435
8508
  return this.el.nativeElement.querySelector('[data-slot="popover-trigger"]');
8436
8509
  }
8437
8510
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8438
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: PopoverComponent, isStandalone: true, selector: "ui-popover", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, closeOnScroll: { classPropertyName: "closeOnScroll", publicName: "closeOnScroll", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { classAttribute: "relative inline-block" }, providers: [{ provide: POPOVER, useExisting: forwardRef(() => PopoverComponent) }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8511
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: PopoverComponent, isStandalone: true, selector: "ui-popover", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, closeOnScroll: { classPropertyName: "closeOnScroll", publicName: "closeOnScroll", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { attributes: { "data-slot": "popover" }, properties: { "class": "classes()" } }, providers: [{ provide: POPOVER, useExisting: forwardRef(() => PopoverComponent) }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8439
8512
  }
8440
8513
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PopoverComponent, decorators: [{
8441
8514
  type: Component,
@@ -8444,12 +8517,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
8444
8517
  changeDetection: ChangeDetectionStrategy.OnPush,
8445
8518
  providers: [{ provide: POPOVER, useExisting: forwardRef(() => PopoverComponent) }],
8446
8519
  template: `<ng-content />`,
8447
- host: { class: 'relative inline-block' },
8520
+ // Static, not bound: a template `data-slot` (tree-select sets its own on this host) must win.
8521
+ host: { '[class]': 'classes()', 'data-slot': 'popover' },
8448
8522
  }]
8449
- }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], closeOnScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnScroll", required: false }] }] } });
8523
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], closeOnScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnScroll", required: false }] }] } });
8450
8524
 
8451
8525
  class PopoverTriggerComponent {
8452
8526
  constructor() {
8527
+ /** Extra classes for the element that wraps the projected trigger. */
8528
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
8453
8529
  this.popover = inject(POPOVER, { optional: true });
8454
8530
  this.host = inject(ElementRef);
8455
8531
  /**
@@ -8481,8 +8557,9 @@ class PopoverTriggerComponent {
8481
8557
  this.popover?.toggle();
8482
8558
  }
8483
8559
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PopoverTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8484
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: PopoverTriggerComponent, isStandalone: true, selector: "ui-popover-trigger", host: { classAttribute: "contents" }, ngImport: i0, template: `
8560
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: PopoverTriggerComponent, isStandalone: true, selector: "ui-popover-trigger", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
8485
8561
  <span
8562
+ [class]="class()"
8486
8563
  [attr.role]="wrapsInteractive() ? null : 'button'"
8487
8564
  [attr.tabindex]="wrapsInteractive() ? null : 0"
8488
8565
  (click)="onClick($event)"
@@ -8501,6 +8578,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
8501
8578
  changeDetection: ChangeDetectionStrategy.OnPush,
8502
8579
  template: `
8503
8580
  <span
8581
+ [class]="class()"
8504
8582
  [attr.role]="wrapsInteractive() ? null : 'button'"
8505
8583
  [attr.tabindex]="wrapsInteractive() ? null : 0"
8506
8584
  (click)="onClick($event)"
@@ -8513,7 +8591,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
8513
8591
  `,
8514
8592
  host: { class: 'contents' },
8515
8593
  }]
8516
- }], ctorParameters: () => [] });
8594
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
8517
8595
 
8518
8596
  class PopoverContentComponent {
8519
8597
  constructor() {
@@ -8550,6 +8628,7 @@ class PopoverContentComponent {
8550
8628
  this.portalHost = null;
8551
8629
  this.usedPopoverApi = false;
8552
8630
  this.wasOpen = false;
8631
+ this.destroyed = false;
8553
8632
  this.portalReady = signal(false, ...(ngDevMode ? [{ debugName: "portalReady" }] : /* istanbul ignore next */ []));
8554
8633
  /**
8555
8634
  * Trigger geometry captured on a settled frame. `positionStyles` reads this
@@ -8638,7 +8717,7 @@ class PopoverContentComponent {
8638
8717
  this.calculatePosition();
8639
8718
  }
8640
8719
  portalAndPosition(attempt) {
8641
- if (!this.popover?.open())
8720
+ if (this.destroyed || !this.popover?.open())
8642
8721
  return;
8643
8722
  const placed = this.placeContent();
8644
8723
  if (!placed && this.strategy() === 'fixed' && attempt < 10) {
@@ -8663,11 +8742,11 @@ class PopoverContentComponent {
8663
8742
  * adjustment runs and the content is revealed.
8664
8743
  */
8665
8744
  finalizeFixedPosition() {
8666
- if (!this.popover?.open())
8745
+ if (this.destroyed || !this.popover?.open())
8667
8746
  return;
8668
8747
  this.triggerRectSig.set(this.popover.getTriggerRect());
8669
8748
  requestAnimationFrame(() => {
8670
- if (!this.popover?.open())
8749
+ if (this.destroyed || !this.popover?.open())
8671
8750
  return;
8672
8751
  this.triggerRectSig.set(this.popover.getTriggerRect());
8673
8752
  const el = this.contentEl?.nativeElement;
@@ -8677,6 +8756,9 @@ class PopoverContentComponent {
8677
8756
  });
8678
8757
  }
8679
8758
  ngOnDestroy() {
8759
+ // Destroying the content does not close the popover, so `open()` is still true when a frame
8760
+ // scheduled at open fires; without this flag that frame portals the detached panel into <body>.
8761
+ this.destroyed = true;
8680
8762
  this.removeContent();
8681
8763
  }
8682
8764
  /**
@@ -8915,6 +8997,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
8915
8997
 
8916
8998
  class PopoverCloseComponent {
8917
8999
  constructor() {
9000
+ /** Extra classes for the element that wraps the projected trigger. */
9001
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
8918
9002
  this.popover = inject(POPOVER, { optional: true });
8919
9003
  this.host = inject(ElementRef);
8920
9004
  /** See `lib/a11y.ts` — stays transparent when the projected content is already a control. */
@@ -8939,8 +9023,9 @@ class PopoverCloseComponent {
8939
9023
  this.onClick();
8940
9024
  }
8941
9025
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: PopoverCloseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8942
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: PopoverCloseComponent, isStandalone: true, selector: "ui-popover-close", host: { classAttribute: "contents" }, ngImport: i0, template: `
9026
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: PopoverCloseComponent, isStandalone: true, selector: "ui-popover-close", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
8943
9027
  <span
9028
+ [class]="class()"
8944
9029
  [attr.role]="wrapsInteractive() ? null : 'button'"
8945
9030
  [attr.tabindex]="wrapsInteractive() ? null : 0"
8946
9031
  (click)="onClick()"
@@ -8959,6 +9044,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
8959
9044
  changeDetection: ChangeDetectionStrategy.OnPush,
8960
9045
  template: `
8961
9046
  <span
9047
+ [class]="class()"
8962
9048
  [attr.role]="wrapsInteractive() ? null : 'button'"
8963
9049
  [attr.tabindex]="wrapsInteractive() ? null : 0"
8964
9050
  (click)="onClick()"
@@ -8971,7 +9057,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
8971
9057
  `,
8972
9058
  host: { class: 'contents' },
8973
9059
  }]
8974
- }], ctorParameters: () => [] });
9060
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
8975
9061
 
8976
9062
  const DEFAULT_FILTER_BUILDER_LABELS = {
8977
9063
  and: 'AND',
@@ -9011,6 +9097,9 @@ const VALUELESS = new Set(['isEmpty', 'isNotEmpty']);
9011
9097
  */
9012
9098
  class DataTableFilterBuilderComponent {
9013
9099
  constructor() {
9100
+ /** Extra classes merged onto the host, after `block`. Applies to the outermost group only — nested groups render their own host. */
9101
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
9102
+ this.classes = computed(() => cn('block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
9014
9103
  /**
9015
9104
  * The filter tree to render. Fully controlled: every edit emits a brand-new
9016
9105
  * tree on {@link groupChange} and mutates nothing here, so the builder shows
@@ -9087,7 +9176,7 @@ class DataTableFilterBuilderComponent {
9087
9176
  * (`track $index`), so an out-of-range index is a no-op replacement.
9088
9177
  */
9089
9178
  removeRule(index) {
9090
- this.emit(this.group().rules.filter((_, i) => i !== index));
9179
+ this.emit(this.group().rules.filter((...[, i]) => i !== index));
9091
9180
  }
9092
9181
  /**
9093
9182
  * Replaces the rule at `index` wholesale and emits the new tree. Also the
@@ -9120,7 +9209,7 @@ class DataTableFilterBuilderComponent {
9120
9209
  }
9121
9210
  }
9122
9211
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DataTableFilterBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9123
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DataTableFilterBuilderComponent, isStandalone: true, selector: "ui-data-table-filter-builder", inputs: { group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { groupChange: "groupChange" }, host: { classAttribute: "block" }, ngImport: i0, template: `
9212
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DataTableFilterBuilderComponent, isStandalone: true, selector: "ui-data-table-filter-builder", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { groupChange: "groupChange" }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `
9124
9213
  <div class="space-y-2 rounded-md border bg-background p-2" data-slot="filter-group">
9125
9214
  <div class="flex items-center gap-2">
9126
9215
  <div class="inline-flex shrink-0 overflow-hidden rounded-md border text-xs">
@@ -9174,7 +9263,7 @@ class DataTableFilterBuilderComponent {
9174
9263
  <ui-button size="sm" variant="ghost" class="pointer-coarse:h-11" (click)="addGroup()">{{ labels().addGroup }}</ui-button>
9175
9264
  </div>
9176
9265
  </div>
9177
- `, isInline: true, dependencies: [{ kind: "component", type: DataTableFilterBuilderComponent, selector: "ui-data-table-filter-builder", inputs: ["group", "columns", "labels"], outputs: ["groupChange"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9266
+ `, isInline: true, dependencies: [{ kind: "component", type: DataTableFilterBuilderComponent, selector: "ui-data-table-filter-builder", inputs: ["class", "group", "columns", "labels"], outputs: ["groupChange"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9178
9267
  }
9179
9268
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DataTableFilterBuilderComponent, decorators: [{
9180
9269
  type: Component,
@@ -9237,9 +9326,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
9237
9326
  </div>
9238
9327
  </div>
9239
9328
  `,
9240
- host: { class: 'block' },
9329
+ host: { '[class]': 'classes()' },
9241
9330
  }]
9242
- }], propDecorators: { group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], groupChange: [{ type: i0.Output, args: ["groupChange"] }] } });
9331
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], groupChange: [{ type: i0.Output, args: ["groupChange"] }] } });
9243
9332
 
9244
9333
  class ComponentPoolService {
9245
9334
  constructor() {
@@ -9966,6 +10055,9 @@ class DataTableComponent {
9966
10055
  * accepts. Unset, the table follows the app's global tokens.
9967
10056
  */
9968
10057
  this.theme = input(...(ngDevMode ? [undefined, { debugName: "theme" }] : /* istanbul ignore next */ []));
10058
+ /** Extra classes merged onto the host, after `block h-full w-full` — e.g. `h-[400px]` to give the table a fixed height. */
10059
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
10060
+ this.hostClasses = computed(() => cn('block h-full w-full', this.class()), ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
9969
10061
  /** Hides the whole toolbar row (global filter, advanced filter, columns menu) when false. */
9970
10062
  this.showToolbar = input(true, ...(ngDevMode ? [{ debugName: "showToolbar" }] : /* istanbul ignore next */ []));
9971
10063
  /** Hides the columns popover in the toolbar; only shown when at least one column is hideable. */
@@ -10788,6 +10880,9 @@ class DataTableComponent {
10788
10880
  */
10789
10881
  this.pagesLocally = computed(() => this.localPagination() && this.showPagination() && !this.isVirtualScrollActive(), ...(ngDevMode ? [{ debugName: "pagesLocally" }] : /* istanbul ignore next */ []));
10790
10882
  this.processedData = computed(() => {
10883
+ // Grouping reorders the rows on screen, so the drawn order is the rendered order.
10884
+ if (this.groupingActive())
10885
+ return this.groupedDataRows();
10791
10886
  if (this.enableSubRows()) {
10792
10887
  const visible = this.visibleTreeRows();
10793
10888
  if (!this.pagesLocally())
@@ -10848,26 +10943,34 @@ class DataTableComponent {
10848
10943
  * grouping is not active.
10849
10944
  */
10850
10945
  this.groupedDisplayRows = computed(() => {
10851
- if (!this.groupingActive())
10852
- return [];
10853
- const key = this.groupBy();
10854
- if (!key)
10855
- return [];
10856
- const column = this.groupByColumn();
10857
10946
  const collapsedMap = this.collapsedGroups();
10858
- const groups = partitionIntoGroups(this.sortedData(), (row) => this.getCellValue(row, key, column));
10947
+ const groups = this.rowGroups();
10859
10948
  const result = [];
10949
+ let index = 0;
10860
10950
  for (const group of groups) {
10861
10951
  const collapsed = collapsedMap[group.groupKey] === true;
10862
10952
  result.push(this.buildGroupRow(group.groupKey, group.groupValue, group.rows, collapsed));
10863
10953
  if (!collapsed) {
10864
10954
  for (const row of group.rows) {
10865
- result.push({ kind: 'data', row });
10955
+ result.push({ kind: 'data', row, index });
10956
+ index += 1;
10866
10957
  }
10867
10958
  }
10868
10959
  }
10869
10960
  return result;
10870
10961
  }, ...(ngDevMode ? [{ debugName: "groupedDisplayRows" }] : /* istanbul ignore next */ []));
10962
+ /**
10963
+ * Every row of the sorted data partitioned by the group column, in the order
10964
+ * the groups are drawn, collapsed groups included. Empty when grouping is not
10965
+ * active.
10966
+ */
10967
+ this.rowGroups = computed(() => {
10968
+ const key = this.groupBy();
10969
+ if (!this.groupingActive() || !key)
10970
+ return [];
10971
+ const column = this.groupByColumn();
10972
+ return partitionIntoGroups(this.sortedData(), (row) => this.getCellValue(row, key, column));
10973
+ }, ...(ngDevMode ? [{ debugName: "rowGroups" }] : /* istanbul ignore next */ []));
10871
10974
  /**
10872
10975
  * `keyvalue` pipe comparator that preserves the Map's insertion order.
10873
10976
  * The group aggregates Map is built in `enhancedColumns()` order, so this
@@ -10883,8 +10986,10 @@ class DataTableComponent {
10883
10986
  const rows = this.groupedDisplayRows();
10884
10987
  if (!this.pagesLocally())
10885
10988
  return rows;
10886
- return this.slicePage(rows);
10989
+ return renumberDataRows(this.slicePage(rows));
10887
10990
  }, ...(ngDevMode ? [{ debugName: "pagedGroupedDisplayRows" }] : /* istanbul ignore next */ []));
10991
+ /** The data rows of {@link pagedGroupedDisplayRows}, in the order they are drawn. */
10992
+ this.groupedDataRows = computed(() => this.pagedGroupedDisplayRows().flatMap((displayRow) => displayRow.kind === 'data' ? [displayRow.row] : []), ...(ngDevMode ? [{ debugName: "groupedDataRows" }] : /* istanbul ignore next */ []));
10888
10993
  this.filteredRowIds = computed(() => {
10889
10994
  if (this.enableSubRows()) {
10890
10995
  return this.visibleTreeRows().map((tr) => this.getRowId()(tr.row));
@@ -11053,6 +11158,7 @@ class DataTableComponent {
11053
11158
  }, ...(ngDevMode ? [{ debugName: "fillHandleCell" }] : /* istanbul ignore next */ []));
11054
11159
  /** Pixel position of the fill handle within the scroll container's content, or null when hidden. */
11055
11160
  this.fillHandlePosition = signal(null, ...(ngDevMode ? [{ debugName: "fillHandlePosition" }] : /* istanbul ignore next */ []));
11161
+ // protected, not private: nothing reads this handle; the field only creates the effect in field order.
11056
11162
  this._gridSemanticsEffect = afterRenderEffect(() => {
11057
11163
  // Re-stamp whenever the rendered window, the data or the columns move.
11058
11164
  this.virtualRowRange();
@@ -11061,6 +11167,12 @@ class DataTableComponent {
11061
11167
  this.virtualTotalRows();
11062
11168
  this.stampGridSemantics();
11063
11169
  });
11170
+ // protected, not private: nothing reads this handle; the field only creates the effect in field order.
11171
+ this._renderedRowsEffect = effect(() => {
11172
+ const rows = this.processedData();
11173
+ untracked(() => this.reconcileIndexedState(rows));
11174
+ }, ...(ngDevMode ? [{ debugName: "_renderedRowsEffect" }] : /* istanbul ignore next */ []));
11175
+ // protected, not private: nothing reads this handle; the field only creates the effect in field order.
11064
11176
  this._fillHandlePositionEffect = afterRenderEffect(() => {
11065
11177
  this.fillHandleCell();
11066
11178
  this.data();
@@ -11250,6 +11362,7 @@ class DataTableComponent {
11250
11362
  * The first run is the initial state, so there is nothing to report yet; see
11251
11363
  * {@link currentQuery}.
11252
11364
  */
11365
+ // protected, not private: nothing reads this handle; the field only creates the effect in field order.
11253
11366
  this._queryEmitter = effect(() => {
11254
11367
  const next = this.currentQuery();
11255
11368
  const previous = this._lastEmittedQuery;
@@ -11379,6 +11492,7 @@ class DataTableComponent {
11379
11492
  * because `onDoubleTap` cancels the second `touchend` of whatever it listens
11380
11493
  * on and must not swallow the second click of a double-tap on a cell.
11381
11494
  */
11495
+ // protected, not private: nothing reads this handle; the field only creates the effect in field order.
11382
11496
  this.registerResizeDoubleTap = effect((onCleanup) => {
11383
11497
  const stops = this.resizeHandles().map((handle) => onDoubleTap(handle.nativeElement, () => {
11384
11498
  const key = handle.nativeElement.closest("[data-column-id]")?.dataset["columnId"];
@@ -11447,6 +11561,10 @@ class DataTableComponent {
11447
11561
  const cell = this.cellFromElement(this._document.elementFromPoint(touch.clientX, touch.clientY));
11448
11562
  if (!cell)
11449
11563
  return;
11564
+ // A hold on what is already selected belongs to its context menu (its directive reads the same
11565
+ // selection at touchstart); starting a fresh range here would erase what the menu is about.
11566
+ if (this.isCellSelected(cell.rowIndex, cell.columnKey))
11567
+ return;
11450
11568
  this.startRangeDrag(cell, false);
11451
11569
  });
11452
11570
  }
@@ -11914,7 +12032,7 @@ class DataTableComponent {
11914
12032
  if (labelValues) {
11915
12033
  return labelValues.map((v) => stringifyValue(v));
11916
12034
  }
11917
- return Array.from({ length: rowCount }, (_, i) => `Row ${i + 1}`);
12035
+ return Array.from({ length: rowCount }, (...[, i]) => `Row ${i + 1}`);
11918
12036
  }
11919
12037
  /** Emit the chart payload for the selected range. No-op when it has no numeric data. */
11920
12038
  openRangeChart() {
@@ -12136,6 +12254,63 @@ class DataTableComponent {
12136
12254
  grid.setAttribute('aria-rowcount', String(headerRows + dataRows));
12137
12255
  grid.setAttribute('aria-colcount', String(this.enhancedColumns().length));
12138
12256
  }
12257
+ /**
12258
+ * Rendered indexes move when rows are collapsed, paged away, sorted or
12259
+ * replaced. The editor holds a pending draft for one row, so it follows that
12260
+ * row (or is dropped when the row is no longer drawn) instead of committing
12261
+ * into whichever row now sits at the old index. Focus and range are drawn by
12262
+ * index, so they stay where they are on screen; they only must not point past
12263
+ * the last row.
12264
+ */
12265
+ reconcileIndexedState(rows) {
12266
+ // An empty list is the loading or filtered-out state: nothing is drawn, so nothing is stale, and a
12267
+ // server-paged table that blanks while fetching must not lose its focus, range or open editor.
12268
+ if (rows.length === 0)
12269
+ return;
12270
+ this.keepEditorOnItsRow(rows);
12271
+ this.keepSelectionWithin(rows.length);
12272
+ }
12273
+ keepEditorOnItsRow(rows) {
12274
+ const editing = this.editingCell();
12275
+ if (editing === null || this.editingRowId === undefined)
12276
+ return;
12277
+ const getId = this.getRowId();
12278
+ const drawn = rows[editing.rowIndex];
12279
+ if (drawn !== undefined && getId(drawn) === this.editingRowId)
12280
+ return;
12281
+ const moved = rows.findIndex((row) => getId(row) === this.editingRowId);
12282
+ if (moved === -1) {
12283
+ // Not cancelEdit(): handing focus to the grid would steal it from wherever the user is now.
12284
+ this.dropEdit();
12285
+ return;
12286
+ }
12287
+ this.editingCell.set({ ...editing, rowIndex: moved });
12288
+ // Tab continues from the focused cell, which is the edited cell unless the user has focused another.
12289
+ const focused = this.focusedCell();
12290
+ if (focused?.rowIndex === editing.rowIndex && focused.columnKey === editing.columnKey) {
12291
+ this.focusedCell.set({ ...focused, rowIndex: moved });
12292
+ }
12293
+ this.cellEditError.update((error) => error?.rowIndex === editing.rowIndex ? { ...error, rowIndex: moved } : error);
12294
+ }
12295
+ keepSelectionWithin(rowCount) {
12296
+ const focused = this.focusedCell();
12297
+ if (focused !== null && focused.rowIndex >= rowCount)
12298
+ this.focusedCell.set(null);
12299
+ const range = this.cellRange();
12300
+ if (range === null)
12301
+ return;
12302
+ const last = rowCount - 1;
12303
+ if (Math.min(range.startRow, range.endRow) > last) {
12304
+ this.cellRange.set(null);
12305
+ }
12306
+ else if (Math.max(range.startRow, range.endRow) > last) {
12307
+ this.cellRange.set({
12308
+ ...range,
12309
+ startRow: Math.min(range.startRow, last),
12310
+ endRow: Math.min(range.endRow, last),
12311
+ });
12312
+ }
12313
+ }
12139
12314
  /**
12140
12315
  * Whether a cell is in the dashed preview band below the source range during
12141
12316
  * a fill-handle drag. Only rows *after* the source are ever previewed —
@@ -13069,7 +13244,11 @@ class DataTableComponent {
13069
13244
  col.accessorKey !== "_expander" &&
13070
13245
  col.accessorKey !== "_actions");
13071
13246
  const selectedIds = this.rowSelection();
13072
- const rows = this.sortedData().filter((row) => selectedIds[this.getRowId()(row)]);
13247
+ // Grouping reorders the rows on screen; the copy follows the screen, collapsed groups included.
13248
+ const inDrawnOrder = this.groupingActive()
13249
+ ? this.rowGroups().flatMap((group) => group.rows)
13250
+ : this.sortedData();
13251
+ const rows = inDrawnOrder.filter((row) => selectedIds[this.getRowId()(row)]);
13073
13252
  if (rows.length === 0)
13074
13253
  return;
13075
13254
  const header = columns.map((col) => col.header);
@@ -13448,6 +13627,7 @@ class DataTableComponent {
13448
13627
  const currentValue = this.getCellValue(row, col.accessorKey, col);
13449
13628
  this.cellEditError.set(null);
13450
13629
  this.editValue.set(currentValue);
13630
+ this.editingRowId = this.getRowId()(row);
13451
13631
  this.editingCell.set({ rowIndex, columnKey });
13452
13632
  this.focusEditInput();
13453
13633
  }
@@ -13464,9 +13644,17 @@ class DataTableComponent {
13464
13644
  * message and emits {@link editError} instead. On success {@link cellEdit} is
13465
13645
  * emitted and the column's `valueSetter` writes a new row into {@link data} —
13466
13646
  * a column without a `valueSetter` emits the event but changes nothing.
13467
- * Recorded as one undo command when {@link enableEditHistory} is on.
13647
+ * Recorded as one undo command when {@link enableEditHistory} is on. If the
13648
+ * rows moved since the editor opened, the edit follows its row; if that row is
13649
+ * no longer drawn the draft is discarded without an event rather than written
13650
+ * into another row.
13468
13651
  */
13469
13652
  commitEdit() {
13653
+ // The reconciling effect only runs on the next change-detection pass; rows may have moved since. With no
13654
+ // rows drawn there is nothing to commit into, and the commit below cancels the edit as it always did.
13655
+ const rows = this.processedData();
13656
+ if (rows.length > 0)
13657
+ this.keepEditorOnItsRow(rows);
13470
13658
  const editing = this.editingCell();
13471
13659
  if (!editing)
13472
13660
  return;
@@ -13667,10 +13855,14 @@ class DataTableComponent {
13667
13855
  * value and no output is emitted.
13668
13856
  */
13669
13857
  cancelEdit() {
13858
+ this.dropEdit();
13859
+ this.refocusTable();
13860
+ }
13861
+ dropEdit() {
13670
13862
  this.editingCell.set(null);
13863
+ this.editingRowId = undefined;
13671
13864
  this.editValue.set(null);
13672
13865
  this.cellEditError.set(null);
13673
- this.refocusTable();
13674
13866
  }
13675
13867
  /** Returns the inline validation message for a cell, or `null` if valid. */
13676
13868
  editErrorFor(rowIndex, col) {
@@ -14208,6 +14400,31 @@ class DataTableComponent {
14208
14400
  getRenderedTreeRowAt(index) {
14209
14401
  return this.processedTreeRows()[index];
14210
14402
  }
14403
+ /** Moves the keyboard focus to a cell, the anchor for keyboard nav, copy and the fill handle. */
14404
+ focusCell(rowIndex, columnKey) {
14405
+ this.focusedCell.set({ rowIndex, columnKey });
14406
+ }
14407
+ /** Whether {@link enableCellRangeSelection} is on. */
14408
+ isCellRangeSelectionEnabled() {
14409
+ return this.enableCellRangeSelection();
14410
+ }
14411
+ /**
14412
+ * Whether a cell is selected: inside the current range, or the focused cell
14413
+ * when there is no range. A one-cell range collapses to a plain focus when the
14414
+ * finger lifts ({@link onRangeDragEnd}), so after a lone tap or hold the
14415
+ * focused cell is the whole selection. With a range, a focus outside it does
14416
+ * not count.
14417
+ */
14418
+ isCellSelected(rowIndex, columnKey) {
14419
+ if (this.cellRange())
14420
+ return this.isCellInRange(rowIndex, columnKey);
14421
+ const focused = this.focusedCell();
14422
+ return focused?.rowIndex === rowIndex && focused.columnKey === columnKey;
14423
+ }
14424
+ /** Whether a cell is open in the inline editor. */
14425
+ isEditingCell() {
14426
+ return this.editingCell() !== null;
14427
+ }
14211
14428
  buildRowActionContext(row, index) {
14212
14429
  const selected = !!this.rowSelection()[this.getRowId()(row)];
14213
14430
  const context = { row, index, selected };
@@ -14851,11 +15068,11 @@ class DataTableComponent {
14851
15068
  this.scrollToColumn(columnKey);
14852
15069
  }
14853
15070
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DataTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
14854
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DataTableComponent, isStandalone: true, selector: "ui-data-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, showToolbar: { classPropertyName: "showToolbar", publicName: "showToolbar", isSignal: true, isRequired: false, transformFunction: null }, showColumnVisibilityToggle: { classPropertyName: "showColumnVisibilityToggle", publicName: "showColumnVisibilityToggle", isSignal: true, isRequired: false, transformFunction: null }, showPagination: { classPropertyName: "showPagination", publicName: "showPagination", isSignal: true, isRequired: false, transformFunction: null }, showRowBorders: { classPropertyName: "showRowBorders", publicName: "showRowBorders", isSignal: true, isRequired: false, transformFunction: null }, showColumnBorders: { classPropertyName: "showColumnBorders", publicName: "showColumnBorders", isSignal: true, isRequired: false, transformFunction: null }, localSorting: { classPropertyName: "localSorting", publicName: "localSorting", isSignal: true, isRequired: false, transformFunction: null }, localPagination: { classPropertyName: "localPagination", publicName: "localPagination", isSignal: true, isRequired: false, transformFunction: null }, localFiltering: { classPropertyName: "localFiltering", publicName: "localFiltering", 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 }, skeletonRows: { classPropertyName: "skeletonRows", publicName: "skeletonRows", isSignal: true, isRequired: false, transformFunction: null }, loadingVisibility: { classPropertyName: "loadingVisibility", publicName: "loadingVisibility", isSignal: true, isRequired: false, transformFunction: null }, loaderTemplate: { classPropertyName: "loaderTemplate", publicName: "loaderTemplate", isSignal: true, isRequired: false, transformFunction: null }, loaderComponent: { classPropertyName: "loaderComponent", publicName: "loaderComponent", isSignal: true, isRequired: false, transformFunction: null }, loaderComponentInputs: { classPropertyName: "loaderComponentInputs", publicName: "loaderComponentInputs", isSignal: true, isRequired: false, transformFunction: null }, globalFilterFn: { classPropertyName: "globalFilterFn", publicName: "globalFilterFn", isSignal: true, isRequired: false, transformFunction: null }, enableMultiSort: { classPropertyName: "enableMultiSort", publicName: "enableMultiSort", isSignal: true, isRequired: false, transformFunction: null }, maxMultiSortColumns: { classPropertyName: "maxMultiSortColumns", publicName: "maxMultiSortColumns", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, enableRowSelection: { classPropertyName: "enableRowSelection", publicName: "enableRowSelection", isSignal: true, isRequired: false, transformFunction: null }, rowSelection: { classPropertyName: "rowSelection", publicName: "rowSelection", isSignal: true, isRequired: false, transformFunction: null }, getRowId: { classPropertyName: "getRowId", publicName: "getRowId", isSignal: true, isRequired: false, transformFunction: null }, enableCopy: { classPropertyName: "enableCopy", publicName: "enableCopy", isSignal: true, isRequired: false, transformFunction: null }, isRowDisabled: { classPropertyName: "isRowDisabled", publicName: "isRowDisabled", isSignal: true, isRequired: false, transformFunction: null }, disabledRowIds: { classPropertyName: "disabledRowIds", publicName: "disabledRowIds", isSignal: true, isRequired: false, transformFunction: null }, enableRowExpansion: { classPropertyName: "enableRowExpansion", publicName: "enableRowExpansion", isSignal: true, isRequired: false, transformFunction: null }, expandedRows: { classPropertyName: "expandedRows", publicName: "expandedRows", isSignal: true, isRequired: false, transformFunction: null }, rowDetailTemplate: { classPropertyName: "rowDetailTemplate", publicName: "rowDetailTemplate", isSignal: true, isRequired: false, transformFunction: null }, rowDetailComponent: { classPropertyName: "rowDetailComponent", publicName: "rowDetailComponent", isSignal: true, isRequired: false, transformFunction: null }, rowDetailComponentInputs: { classPropertyName: "rowDetailComponentInputs", publicName: "rowDetailComponentInputs", isSignal: true, isRequired: false, transformFunction: null }, enableSubRows: { classPropertyName: "enableSubRows", publicName: "enableSubRows", isSignal: true, isRequired: false, transformFunction: null }, getChildren: { classPropertyName: "getChildren", publicName: "getChildren", isSignal: true, isRequired: false, transformFunction: null }, setChildren: { classPropertyName: "setChildren", publicName: "setChildren", isSignal: true, isRequired: false, transformFunction: null }, subRowDefaultExpanded: { classPropertyName: "subRowDefaultExpanded", publicName: "subRowDefaultExpanded", isSignal: true, isRequired: false, transformFunction: null }, subRowSelectionMode: { classPropertyName: "subRowSelectionMode", publicName: "subRowSelectionMode", isSignal: true, isRequired: false, transformFunction: null }, subRowFilterMode: { classPropertyName: "subRowFilterMode", publicName: "subRowFilterMode", isSignal: true, isRequired: false, transformFunction: null }, enableSubRowSorting: { classPropertyName: "enableSubRowSorting", publicName: "enableSubRowSorting", isSignal: true, isRequired: false, transformFunction: null }, subRowIndentSize: { classPropertyName: "subRowIndentSize", publicName: "subRowIndentSize", isSignal: true, isRequired: false, transformFunction: null }, subRowsPaginated: { classPropertyName: "subRowsPaginated", publicName: "subRowsPaginated", isSignal: true, isRequired: false, transformFunction: null }, subRowExpandedRows: { classPropertyName: "subRowExpandedRows", publicName: "subRowExpandedRows", isSignal: true, isRequired: false, transformFunction: null }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, collapsedGroups: { classPropertyName: "collapsedGroups", publicName: "collapsedGroups", isSignal: true, isRequired: false, transformFunction: null }, groupAggregates: { classPropertyName: "groupAggregates", publicName: "groupAggregates", isSignal: true, isRequired: false, transformFunction: null }, enableColumnResize: { classPropertyName: "enableColumnResize", publicName: "enableColumnResize", isSignal: true, isRequired: false, transformFunction: null }, enableColumnReorder: { classPropertyName: "enableColumnReorder", publicName: "enableColumnReorder", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, enableFloatingFilters: { classPropertyName: "enableFloatingFilters", publicName: "enableFloatingFilters", isSignal: true, isRequired: false, transformFunction: null }, enableRowDrag: { classPropertyName: "enableRowDrag", publicName: "enableRowDrag", isSignal: true, isRequired: false, transformFunction: null }, localReorder: { classPropertyName: "localReorder", publicName: "localReorder", isSignal: true, isRequired: false, transformFunction: null }, rowDragMode: { classPropertyName: "rowDragMode", publicName: "rowDragMode", isSignal: true, isRequired: false, transformFunction: null }, rowDragAllowDrop: { classPropertyName: "rowDragAllowDrop", publicName: "rowDragAllowDrop", isSignal: true, isRequired: false, transformFunction: null }, enableCellFlash: { classPropertyName: "enableCellFlash", publicName: "enableCellFlash", isSignal: true, isRequired: false, transformFunction: null }, cellFlashDuration: { classPropertyName: "cellFlashDuration", publicName: "cellFlashDuration", isSignal: true, isRequired: false, transformFunction: null }, enableCellRangeSelection: { classPropertyName: "enableCellRangeSelection", publicName: "enableCellRangeSelection", isSignal: true, isRequired: false, transformFunction: null }, enableRangeActions: { classPropertyName: "enableRangeActions", publicName: "enableRangeActions", isSignal: true, isRequired: false, transformFunction: null }, enableFillHandle: { classPropertyName: "enableFillHandle", publicName: "enableFillHandle", isSignal: true, isRequired: false, transformFunction: null }, enableClipboardPaste: { classPropertyName: "enableClipboardPaste", publicName: "enableClipboardPaste", isSignal: true, isRequired: false, transformFunction: null }, enableEditHistory: { classPropertyName: "enableEditHistory", publicName: "enableEditHistory", isSignal: true, isRequired: false, transformFunction: null }, emptyStateComponent: { classPropertyName: "emptyStateComponent", publicName: "emptyStateComponent", isSignal: true, isRequired: false, transformFunction: null }, emptyStateComponentInputs: { classPropertyName: "emptyStateComponentInputs", publicName: "emptyStateComponentInputs", isSignal: true, isRequired: false, transformFunction: null }, fullWidthRow: { classPropertyName: "fullWidthRow", publicName: "fullWidthRow", isSignal: true, isRequired: false, transformFunction: null }, fullWidthRowTemplate: { classPropertyName: "fullWidthRowTemplate", publicName: "fullWidthRowTemplate", isSignal: true, isRequired: false, transformFunction: null }, fullWidthRowComponent: { classPropertyName: "fullWidthRowComponent", publicName: "fullWidthRowComponent", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, filterDebounce: { classPropertyName: "filterDebounce", publicName: "filterDebounce", isSignal: true, isRequired: false, transformFunction: null }, enableVirtualScroll: { classPropertyName: "enableVirtualScroll", publicName: "enableVirtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualRowHeight: { classPropertyName: "virtualRowHeight", publicName: "virtualRowHeight", isSignal: true, isRequired: false, transformFunction: null }, virtualRowBuffer: { classPropertyName: "virtualRowBuffer", publicName: "virtualRowBuffer", isSignal: true, isRequired: false, transformFunction: null }, virtualColumnBuffer: { classPropertyName: "virtualColumnBuffer", publicName: "virtualColumnBuffer", isSignal: true, isRequired: false, transformFunction: null }, virtualVariableRowHeight: { classPropertyName: "virtualVariableRowHeight", publicName: "virtualVariableRowHeight", isSignal: true, isRequired: false, transformFunction: null }, virtualRecycleComponents: { classPropertyName: "virtualRecycleComponents", publicName: "virtualRecycleComponents", isSignal: true, isRequired: false, transformFunction: null }, virtualAutoThreshold: { classPropertyName: "virtualAutoThreshold", publicName: "virtualAutoThreshold", isSignal: true, isRequired: false, transformFunction: null }, virtualAutoColumnWidth: { classPropertyName: "virtualAutoColumnWidth", publicName: "virtualAutoColumnWidth", isSignal: true, isRequired: false, transformFunction: null }, globalFilter: { classPropertyName: "globalFilter", publicName: "globalFilter", isSignal: true, isRequired: false, transformFunction: null }, columnFilters: { classPropertyName: "columnFilters", publicName: "columnFilters", isSignal: true, isRequired: false, transformFunction: null }, aiProvider: { classPropertyName: "aiProvider", publicName: "aiProvider", isSignal: true, isRequired: false, transformFunction: null }, enableNlFilter: { classPropertyName: "enableNlFilter", publicName: "enableNlFilter", isSignal: true, isRequired: false, transformFunction: null }, advancedFilter: { classPropertyName: "advancedFilter", publicName: "advancedFilter", isSignal: true, isRequired: false, transformFunction: null }, enableAdvancedFilter: { classPropertyName: "enableAdvancedFilter", publicName: "enableAdvancedFilter", isSignal: true, isRequired: false, transformFunction: null }, sortState: { classPropertyName: "sortState", publicName: "sortState", isSignal: true, isRequired: false, transformFunction: null }, multiSortState: { classPropertyName: "multiSortState", publicName: "multiSortState", isSignal: true, isRequired: false, transformFunction: null }, paginationState: { classPropertyName: "paginationState", publicName: "paginationState", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showPageSizeSelector: { classPropertyName: "showPageSizeSelector", publicName: "showPageSizeSelector", isSignal: true, isRequired: false, transformFunction: null }, columnWidths: { classPropertyName: "columnWidths", publicName: "columnWidths", isSignal: true, isRequired: false, transformFunction: null }, columnVisibility: { classPropertyName: "columnVisibility", publicName: "columnVisibility", isSignal: true, isRequired: false, transformFunction: null }, columnOrder: { classPropertyName: "columnOrder", publicName: "columnOrder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { data: "dataChange", sortChange: "sortChange", multiSortChange: "multiSortChange", pageChange: "pageChange", filterChange: "filterChange", query: "query", cellEdit: "cellEdit", editError: "editError", rowSelection: "rowSelectionChange", expandedRows: "expandedRowsChange", subRowExpandedRows: "subRowExpandedRowsChange", collapsedGroups: "collapsedGroupsChange", rowReorder: "rowReorder", rangeChartOpen: "rangeChartOpen", fillSeries: "fillSeries", cellsPaste: "cellsPaste", editUndo: "editUndo", editRedo: "editRedo", columnResize: "columnResize", globalFilter: "globalFilterChange", columnFilters: "columnFiltersChange", nlFilter: "nlFilter", aiFillComplete: "aiFillComplete", advancedFilter: "advancedFilterChange", sortState: "sortStateChange", multiSortState: "multiSortStateChange", paginationState: "paginationStateChange", columnWidths: "columnWidthsChange", columnVisibility: "columnVisibilityChange", columnOrder: "columnOrderChange" }, host: { properties: { "attr.dir": "dir()", "attr.data-ui-theme": "theme()" }, classAttribute: "block h-full w-full" }, providers: [
15071
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DataTableComponent, isStandalone: true, selector: "ui-data-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, showToolbar: { classPropertyName: "showToolbar", publicName: "showToolbar", isSignal: true, isRequired: false, transformFunction: null }, showColumnVisibilityToggle: { classPropertyName: "showColumnVisibilityToggle", publicName: "showColumnVisibilityToggle", isSignal: true, isRequired: false, transformFunction: null }, showPagination: { classPropertyName: "showPagination", publicName: "showPagination", isSignal: true, isRequired: false, transformFunction: null }, showRowBorders: { classPropertyName: "showRowBorders", publicName: "showRowBorders", isSignal: true, isRequired: false, transformFunction: null }, showColumnBorders: { classPropertyName: "showColumnBorders", publicName: "showColumnBorders", isSignal: true, isRequired: false, transformFunction: null }, localSorting: { classPropertyName: "localSorting", publicName: "localSorting", isSignal: true, isRequired: false, transformFunction: null }, localPagination: { classPropertyName: "localPagination", publicName: "localPagination", isSignal: true, isRequired: false, transformFunction: null }, localFiltering: { classPropertyName: "localFiltering", publicName: "localFiltering", 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 }, skeletonRows: { classPropertyName: "skeletonRows", publicName: "skeletonRows", isSignal: true, isRequired: false, transformFunction: null }, loadingVisibility: { classPropertyName: "loadingVisibility", publicName: "loadingVisibility", isSignal: true, isRequired: false, transformFunction: null }, loaderTemplate: { classPropertyName: "loaderTemplate", publicName: "loaderTemplate", isSignal: true, isRequired: false, transformFunction: null }, loaderComponent: { classPropertyName: "loaderComponent", publicName: "loaderComponent", isSignal: true, isRequired: false, transformFunction: null }, loaderComponentInputs: { classPropertyName: "loaderComponentInputs", publicName: "loaderComponentInputs", isSignal: true, isRequired: false, transformFunction: null }, globalFilterFn: { classPropertyName: "globalFilterFn", publicName: "globalFilterFn", isSignal: true, isRequired: false, transformFunction: null }, enableMultiSort: { classPropertyName: "enableMultiSort", publicName: "enableMultiSort", isSignal: true, isRequired: false, transformFunction: null }, maxMultiSortColumns: { classPropertyName: "maxMultiSortColumns", publicName: "maxMultiSortColumns", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, enableRowSelection: { classPropertyName: "enableRowSelection", publicName: "enableRowSelection", isSignal: true, isRequired: false, transformFunction: null }, rowSelection: { classPropertyName: "rowSelection", publicName: "rowSelection", isSignal: true, isRequired: false, transformFunction: null }, getRowId: { classPropertyName: "getRowId", publicName: "getRowId", isSignal: true, isRequired: false, transformFunction: null }, enableCopy: { classPropertyName: "enableCopy", publicName: "enableCopy", isSignal: true, isRequired: false, transformFunction: null }, isRowDisabled: { classPropertyName: "isRowDisabled", publicName: "isRowDisabled", isSignal: true, isRequired: false, transformFunction: null }, disabledRowIds: { classPropertyName: "disabledRowIds", publicName: "disabledRowIds", isSignal: true, isRequired: false, transformFunction: null }, enableRowExpansion: { classPropertyName: "enableRowExpansion", publicName: "enableRowExpansion", isSignal: true, isRequired: false, transformFunction: null }, expandedRows: { classPropertyName: "expandedRows", publicName: "expandedRows", isSignal: true, isRequired: false, transformFunction: null }, rowDetailTemplate: { classPropertyName: "rowDetailTemplate", publicName: "rowDetailTemplate", isSignal: true, isRequired: false, transformFunction: null }, rowDetailComponent: { classPropertyName: "rowDetailComponent", publicName: "rowDetailComponent", isSignal: true, isRequired: false, transformFunction: null }, rowDetailComponentInputs: { classPropertyName: "rowDetailComponentInputs", publicName: "rowDetailComponentInputs", isSignal: true, isRequired: false, transformFunction: null }, enableSubRows: { classPropertyName: "enableSubRows", publicName: "enableSubRows", isSignal: true, isRequired: false, transformFunction: null }, getChildren: { classPropertyName: "getChildren", publicName: "getChildren", isSignal: true, isRequired: false, transformFunction: null }, setChildren: { classPropertyName: "setChildren", publicName: "setChildren", isSignal: true, isRequired: false, transformFunction: null }, subRowDefaultExpanded: { classPropertyName: "subRowDefaultExpanded", publicName: "subRowDefaultExpanded", isSignal: true, isRequired: false, transformFunction: null }, subRowSelectionMode: { classPropertyName: "subRowSelectionMode", publicName: "subRowSelectionMode", isSignal: true, isRequired: false, transformFunction: null }, subRowFilterMode: { classPropertyName: "subRowFilterMode", publicName: "subRowFilterMode", isSignal: true, isRequired: false, transformFunction: null }, enableSubRowSorting: { classPropertyName: "enableSubRowSorting", publicName: "enableSubRowSorting", isSignal: true, isRequired: false, transformFunction: null }, subRowIndentSize: { classPropertyName: "subRowIndentSize", publicName: "subRowIndentSize", isSignal: true, isRequired: false, transformFunction: null }, subRowsPaginated: { classPropertyName: "subRowsPaginated", publicName: "subRowsPaginated", isSignal: true, isRequired: false, transformFunction: null }, subRowExpandedRows: { classPropertyName: "subRowExpandedRows", publicName: "subRowExpandedRows", isSignal: true, isRequired: false, transformFunction: null }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, collapsedGroups: { classPropertyName: "collapsedGroups", publicName: "collapsedGroups", isSignal: true, isRequired: false, transformFunction: null }, groupAggregates: { classPropertyName: "groupAggregates", publicName: "groupAggregates", isSignal: true, isRequired: false, transformFunction: null }, enableColumnResize: { classPropertyName: "enableColumnResize", publicName: "enableColumnResize", isSignal: true, isRequired: false, transformFunction: null }, enableColumnReorder: { classPropertyName: "enableColumnReorder", publicName: "enableColumnReorder", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, enableFloatingFilters: { classPropertyName: "enableFloatingFilters", publicName: "enableFloatingFilters", isSignal: true, isRequired: false, transformFunction: null }, enableRowDrag: { classPropertyName: "enableRowDrag", publicName: "enableRowDrag", isSignal: true, isRequired: false, transformFunction: null }, localReorder: { classPropertyName: "localReorder", publicName: "localReorder", isSignal: true, isRequired: false, transformFunction: null }, rowDragMode: { classPropertyName: "rowDragMode", publicName: "rowDragMode", isSignal: true, isRequired: false, transformFunction: null }, rowDragAllowDrop: { classPropertyName: "rowDragAllowDrop", publicName: "rowDragAllowDrop", isSignal: true, isRequired: false, transformFunction: null }, enableCellFlash: { classPropertyName: "enableCellFlash", publicName: "enableCellFlash", isSignal: true, isRequired: false, transformFunction: null }, cellFlashDuration: { classPropertyName: "cellFlashDuration", publicName: "cellFlashDuration", isSignal: true, isRequired: false, transformFunction: null }, enableCellRangeSelection: { classPropertyName: "enableCellRangeSelection", publicName: "enableCellRangeSelection", isSignal: true, isRequired: false, transformFunction: null }, enableRangeActions: { classPropertyName: "enableRangeActions", publicName: "enableRangeActions", isSignal: true, isRequired: false, transformFunction: null }, enableFillHandle: { classPropertyName: "enableFillHandle", publicName: "enableFillHandle", isSignal: true, isRequired: false, transformFunction: null }, enableClipboardPaste: { classPropertyName: "enableClipboardPaste", publicName: "enableClipboardPaste", isSignal: true, isRequired: false, transformFunction: null }, enableEditHistory: { classPropertyName: "enableEditHistory", publicName: "enableEditHistory", isSignal: true, isRequired: false, transformFunction: null }, emptyStateComponent: { classPropertyName: "emptyStateComponent", publicName: "emptyStateComponent", isSignal: true, isRequired: false, transformFunction: null }, emptyStateComponentInputs: { classPropertyName: "emptyStateComponentInputs", publicName: "emptyStateComponentInputs", isSignal: true, isRequired: false, transformFunction: null }, fullWidthRow: { classPropertyName: "fullWidthRow", publicName: "fullWidthRow", isSignal: true, isRequired: false, transformFunction: null }, fullWidthRowTemplate: { classPropertyName: "fullWidthRowTemplate", publicName: "fullWidthRowTemplate", isSignal: true, isRequired: false, transformFunction: null }, fullWidthRowComponent: { classPropertyName: "fullWidthRowComponent", publicName: "fullWidthRowComponent", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, filterDebounce: { classPropertyName: "filterDebounce", publicName: "filterDebounce", isSignal: true, isRequired: false, transformFunction: null }, enableVirtualScroll: { classPropertyName: "enableVirtualScroll", publicName: "enableVirtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualRowHeight: { classPropertyName: "virtualRowHeight", publicName: "virtualRowHeight", isSignal: true, isRequired: false, transformFunction: null }, virtualRowBuffer: { classPropertyName: "virtualRowBuffer", publicName: "virtualRowBuffer", isSignal: true, isRequired: false, transformFunction: null }, virtualColumnBuffer: { classPropertyName: "virtualColumnBuffer", publicName: "virtualColumnBuffer", isSignal: true, isRequired: false, transformFunction: null }, virtualVariableRowHeight: { classPropertyName: "virtualVariableRowHeight", publicName: "virtualVariableRowHeight", isSignal: true, isRequired: false, transformFunction: null }, virtualRecycleComponents: { classPropertyName: "virtualRecycleComponents", publicName: "virtualRecycleComponents", isSignal: true, isRequired: false, transformFunction: null }, virtualAutoThreshold: { classPropertyName: "virtualAutoThreshold", publicName: "virtualAutoThreshold", isSignal: true, isRequired: false, transformFunction: null }, virtualAutoColumnWidth: { classPropertyName: "virtualAutoColumnWidth", publicName: "virtualAutoColumnWidth", isSignal: true, isRequired: false, transformFunction: null }, globalFilter: { classPropertyName: "globalFilter", publicName: "globalFilter", isSignal: true, isRequired: false, transformFunction: null }, columnFilters: { classPropertyName: "columnFilters", publicName: "columnFilters", isSignal: true, isRequired: false, transformFunction: null }, aiProvider: { classPropertyName: "aiProvider", publicName: "aiProvider", isSignal: true, isRequired: false, transformFunction: null }, enableNlFilter: { classPropertyName: "enableNlFilter", publicName: "enableNlFilter", isSignal: true, isRequired: false, transformFunction: null }, advancedFilter: { classPropertyName: "advancedFilter", publicName: "advancedFilter", isSignal: true, isRequired: false, transformFunction: null }, enableAdvancedFilter: { classPropertyName: "enableAdvancedFilter", publicName: "enableAdvancedFilter", isSignal: true, isRequired: false, transformFunction: null }, sortState: { classPropertyName: "sortState", publicName: "sortState", isSignal: true, isRequired: false, transformFunction: null }, multiSortState: { classPropertyName: "multiSortState", publicName: "multiSortState", isSignal: true, isRequired: false, transformFunction: null }, paginationState: { classPropertyName: "paginationState", publicName: "paginationState", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showPageSizeSelector: { classPropertyName: "showPageSizeSelector", publicName: "showPageSizeSelector", isSignal: true, isRequired: false, transformFunction: null }, columnWidths: { classPropertyName: "columnWidths", publicName: "columnWidths", isSignal: true, isRequired: false, transformFunction: null }, columnVisibility: { classPropertyName: "columnVisibility", publicName: "columnVisibility", isSignal: true, isRequired: false, transformFunction: null }, columnOrder: { classPropertyName: "columnOrder", publicName: "columnOrder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { data: "dataChange", sortChange: "sortChange", multiSortChange: "multiSortChange", pageChange: "pageChange", filterChange: "filterChange", query: "query", cellEdit: "cellEdit", editError: "editError", rowSelection: "rowSelectionChange", expandedRows: "expandedRowsChange", subRowExpandedRows: "subRowExpandedRowsChange", collapsedGroups: "collapsedGroupsChange", rowReorder: "rowReorder", rangeChartOpen: "rangeChartOpen", fillSeries: "fillSeries", cellsPaste: "cellsPaste", editUndo: "editUndo", editRedo: "editRedo", columnResize: "columnResize", globalFilter: "globalFilterChange", columnFilters: "columnFiltersChange", nlFilter: "nlFilter", aiFillComplete: "aiFillComplete", advancedFilter: "advancedFilterChange", sortState: "sortStateChange", multiSortState: "multiSortStateChange", paginationState: "paginationStateChange", columnWidths: "columnWidthsChange", columnVisibility: "columnVisibilityChange", columnOrder: "columnOrderChange" }, host: { properties: { "class": "hostClasses()", "attr.dir": "dir()", "attr.data-ui-theme": "theme()" } }, providers: [
14855
15072
  ComponentPoolService,
14856
15073
  provideComponentLocale(() => DataTableComponent),
14857
15074
  { provide: DataTableAddonHost, useExisting: forwardRef(() => DataTableComponent) },
14858
- ], 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 let i = $index\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-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, i)\"\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: i,\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: ["open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger" }, { 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: ["total", "state", "pageSizeOptions", "showPageSizeSelector", "rowsPerPageLabel", "pageLabel", "ofLabel"], outputs: ["paginationChange"] }, { kind: "component", type: DataTableFilterBuilderComponent, selector: "ui-data-table-filter-builder", inputs: ["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 }); }
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 }); }
14859
15076
  }
14860
15077
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DataTableComponent, decorators: [{
14861
15078
  type: Component,
@@ -14886,11 +15103,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
14886
15103
  provideComponentLocale(() => DataTableComponent),
14887
15104
  { provide: DataTableAddonHost, useExisting: forwardRef(() => DataTableComponent) },
14888
15105
  ], host: {
14889
- class: "block h-full w-full",
15106
+ '[class]': 'hostClasses()',
14890
15107
  '[attr.dir]': 'dir()',
14891
15108
  '[attr.data-ui-theme]': 'theme()',
14892
- }, 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 let i = $index\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-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, i)\"\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: i,\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"] }]
14893
- }], 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 }] }], 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", { ...{
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"] }]
15110
+ }], 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", { ...{
14894
15111
  read: ElementRef,
14895
15112
  }, 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 }] }] } });
14896
15113
 
@@ -15359,6 +15576,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15359
15576
  class CommandInputComponent {
15360
15577
  constructor() {
15361
15578
  this.cmdService = inject(CommandService);
15579
+ /** Extra classes merged onto the search row (icon + field), after the bordered default — the `<input>` itself is not reachable from here. */
15580
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
15581
+ this.classes = computed(() => cn('flex items-center border-b px-3', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
15362
15582
  /** Override for the placeholder. Falls back to the locale's `searchPlaceholder`. */
15363
15583
  this.placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
15364
15584
  /** Override for the aria-label. Falls back to the locale's `search`. */
@@ -15441,8 +15661,8 @@ class CommandInputComponent {
15441
15661
  this.inputEl?.nativeElement?.focus();
15442
15662
  }
15443
15663
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CommandInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15444
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: CommandInputComponent, isStandalone: true, selector: "ui-command-input", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true }], ngImport: i0, template: `
15445
- <div class="flex items-center border-b px-3" [attr.data-slot]="'command-input'" [attr.dir]="dir()">
15664
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: CommandInputComponent, isStandalone: true, selector: "ui-command-input", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["inputEl"], descendants: true }], ngImport: i0, template: `
15665
+ <div [class]="classes()" [attr.data-slot]="'command-input'" [attr.dir]="dir()">
15446
15666
  <svg class="h-4 w-4 shrink-0 opacity-50 ltr:mr-2 rtl:ml-2" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
15447
15667
  <path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
15448
15668
  </svg>
@@ -15464,7 +15684,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15464
15684
  selector: 'ui-command-input',
15465
15685
  changeDetection: ChangeDetectionStrategy.OnPush,
15466
15686
  template: `
15467
- <div class="flex items-center border-b px-3" [attr.data-slot]="'command-input'" [attr.dir]="dir()">
15687
+ <div [class]="classes()" [attr.data-slot]="'command-input'" [attr.dir]="dir()">
15468
15688
  <svg class="h-4 w-4 shrink-0 opacity-50 ltr:mr-2 rtl:ml-2" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
15469
15689
  <path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
15470
15690
  </svg>
@@ -15484,7 +15704,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15484
15704
  }], propDecorators: { inputEl: [{
15485
15705
  type: ViewChild,
15486
15706
  args: ['inputEl']
15487
- }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }] } });
15707
+ }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }] } });
15488
15708
 
15489
15709
  class CommandListComponent {
15490
15710
  constructor() {
@@ -15529,14 +15749,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15529
15749
  class CommandEmptyComponent {
15530
15750
  constructor() {
15531
15751
  this.cmdService = inject(CommandService);
15752
+ /** Extra classes merged onto the empty-state message, after the centred muted default. */
15753
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
15754
+ this.classes = computed(() => cn('py-6 text-center text-sm text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
15532
15755
  this.isVisible = computed(() => {
15533
15756
  return this.cmdService.filteredItemIds().size === 0;
15534
15757
  }, ...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
15535
15758
  }
15536
15759
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CommandEmptyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15537
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: CommandEmptyComponent, isStandalone: true, selector: "ui-command-empty", host: { classAttribute: "contents" }, ngImport: i0, template: `
15760
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: CommandEmptyComponent, isStandalone: true, selector: "ui-command-empty", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
15538
15761
  @if (isVisible()) {
15539
- <div class="py-6 text-center text-sm text-muted-foreground" [attr.data-slot]="'command-empty'">
15762
+ <div [class]="classes()" [attr.data-slot]="'command-empty'">
15540
15763
  <ng-content />
15541
15764
  </div>
15542
15765
  }
@@ -15549,14 +15772,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15549
15772
  changeDetection: ChangeDetectionStrategy.OnPush,
15550
15773
  template: `
15551
15774
  @if (isVisible()) {
15552
- <div class="py-6 text-center text-sm text-muted-foreground" [attr.data-slot]="'command-empty'">
15775
+ <div [class]="classes()" [attr.data-slot]="'command-empty'">
15553
15776
  <ng-content />
15554
15777
  </div>
15555
15778
  }
15556
15779
  `,
15557
15780
  host: { class: 'contents' },
15558
15781
  }]
15559
- }] });
15782
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
15560
15783
 
15561
15784
  const COMMAND_GROUP = new InjectionToken('COMMAND_GROUP');
15562
15785
  class CommandGroupComponent {
@@ -15740,9 +15963,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15740
15963
  }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], shortcut: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcut", required: false }] }], selectItem: [{ type: i0.Output, args: ["selectItem"] }], row: [{ type: i0.ViewChild, args: ['row', { isSignal: true }] }] } });
15741
15964
 
15742
15965
  class CommandSeparatorComponent {
15966
+ constructor() {
15967
+ /** Extra classes merged onto the rule, after `-mx-1 h-px bg-border`. */
15968
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
15969
+ this.classes = computed(() => cn('-mx-1 h-px bg-border', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
15970
+ }
15743
15971
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CommandSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15744
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: CommandSeparatorComponent, isStandalone: true, selector: "ui-command-separator", host: { classAttribute: "contents" }, ngImport: i0, template: `
15745
- <div class="-mx-1 h-px bg-border" [attr.data-slot]="'command-separator'"></div>
15972
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: CommandSeparatorComponent, isStandalone: true, selector: "ui-command-separator", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
15973
+ <div [class]="classes()" [attr.data-slot]="'command-separator'"></div>
15746
15974
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
15747
15975
  }
15748
15976
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CommandSeparatorComponent, decorators: [{
@@ -15751,16 +15979,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15751
15979
  selector: 'ui-command-separator',
15752
15980
  changeDetection: ChangeDetectionStrategy.OnPush,
15753
15981
  template: `
15754
- <div class="-mx-1 h-px bg-border" [attr.data-slot]="'command-separator'"></div>
15982
+ <div [class]="classes()" [attr.data-slot]="'command-separator'"></div>
15755
15983
  `,
15756
15984
  host: { class: 'contents' },
15757
15985
  }]
15758
- }] });
15986
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
15759
15987
 
15760
15988
  class CommandShortcutComponent {
15989
+ constructor() {
15990
+ /** Extra classes merged onto the hint, after the muted `text-xs` default — so a `text-*` here wins. */
15991
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
15992
+ this.classes = computed(() => cn('text-xs tracking-widest text-muted-foreground ltr:ml-auto rtl:mr-auto', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
15993
+ }
15761
15994
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CommandShortcutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15762
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: CommandShortcutComponent, isStandalone: true, selector: "ui-command-shortcut", host: { classAttribute: "contents" }, ngImport: i0, template: `
15763
- <span class="text-xs tracking-widest text-muted-foreground ltr:ml-auto rtl:mr-auto" [attr.data-slot]="'command-shortcut'">
15995
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: CommandShortcutComponent, isStandalone: true, selector: "ui-command-shortcut", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
15996
+ <span [class]="classes()" [attr.data-slot]="'command-shortcut'">
15764
15997
  <ng-content />
15765
15998
  </span>
15766
15999
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -15771,13 +16004,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15771
16004
  selector: 'ui-command-shortcut',
15772
16005
  changeDetection: ChangeDetectionStrategy.OnPush,
15773
16006
  template: `
15774
- <span class="text-xs tracking-widest text-muted-foreground ltr:ml-auto rtl:mr-auto" [attr.data-slot]="'command-shortcut'">
16007
+ <span [class]="classes()" [attr.data-slot]="'command-shortcut'">
15775
16008
  <ng-content />
15776
16009
  </span>
15777
16010
  `,
15778
16011
  host: { class: 'contents' },
15779
16012
  }]
15780
- }] });
16013
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
15781
16014
 
15782
16015
  const DIALOG = new InjectionToken('DIALOG');
15783
16016
  class DialogComponent {
@@ -15809,7 +16042,7 @@ class DialogComponent {
15809
16042
  this.open.update(v => !v);
15810
16043
  }
15811
16044
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15812
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: DialogComponent, isStandalone: true, selector: "ui-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { classAttribute: "contents" }, providers: [{ provide: DIALOG, useExisting: forwardRef(() => DialogComponent) }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16045
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: DialogComponent, isStandalone: true, selector: "ui-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { properties: { "attr.data-slot": "\"dialog\"" }, classAttribute: "contents" }, providers: [{ provide: DIALOG, useExisting: forwardRef(() => DialogComponent) }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
15813
16046
  }
15814
16047
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogComponent, decorators: [{
15815
16048
  type: Component,
@@ -15818,12 +16051,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15818
16051
  changeDetection: ChangeDetectionStrategy.OnPush,
15819
16052
  providers: [{ provide: DIALOG, useExisting: forwardRef(() => DialogComponent) }],
15820
16053
  template: `<ng-content />`,
15821
- host: { class: 'contents' },
16054
+ host: { class: 'contents', '[attr.data-slot]': '"dialog"' },
15822
16055
  }]
15823
16056
  }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }] } });
15824
16057
 
15825
16058
  class DialogTriggerComponent {
15826
16059
  constructor() {
16060
+ /** Extra classes for the element that wraps the projected trigger. */
16061
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
15827
16062
  this.dialog = inject(DIALOG, { optional: true });
15828
16063
  this.host = inject(ElementRef);
15829
16064
  /** See `lib/a11y.ts` — stays transparent when the projected content is already a control. */
@@ -15849,8 +16084,9 @@ class DialogTriggerComponent {
15849
16084
  this.onClick();
15850
16085
  }
15851
16086
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15852
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: DialogTriggerComponent, isStandalone: true, selector: "ui-dialog-trigger", host: { classAttribute: "contents" }, ngImport: i0, template: `
16087
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: DialogTriggerComponent, isStandalone: true, selector: "ui-dialog-trigger", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
15853
16088
  <span
16089
+ [class]="class()"
15854
16090
  [attr.tabindex]="wrapsInteractive() ? null : 0"
15855
16091
  [attr.role]="wrapsInteractive() ? null : 'button'"
15856
16092
  [attr.data-slot]="'dialog-trigger'"
@@ -15869,6 +16105,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15869
16105
  changeDetection: ChangeDetectionStrategy.OnPush,
15870
16106
  template: `
15871
16107
  <span
16108
+ [class]="class()"
15872
16109
  [attr.tabindex]="wrapsInteractive() ? null : 0"
15873
16110
  [attr.role]="wrapsInteractive() ? null : 'button'"
15874
16111
  [attr.data-slot]="'dialog-trigger'"
@@ -15881,23 +16118,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15881
16118
  `,
15882
16119
  host: { class: 'contents' },
15883
16120
  }]
15884
- }], ctorParameters: () => [] });
16121
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
15885
16122
 
15886
16123
  class DialogHeaderComponent {
16124
+ constructor() {
16125
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
16126
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
16127
+ this.classes = computed(() => cn('flex flex-col text-center sm:text-left', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
16128
+ }
15887
16129
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15888
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: DialogHeaderComponent, isStandalone: true, selector: "ui-dialog-header", host: { properties: { "attr.data-slot": "\"dialog-header\"" }, classAttribute: "flex flex-col text-center sm:text-left" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{:host([data-slot=\"dialog-header\"]){gap:calc(.375rem * var(--_d))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16130
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: DialogHeaderComponent, isStandalone: true, selector: "ui-dialog-header", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"dialog-header\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{:host([data-slot=\"dialog-header\"]){gap:calc(.375rem * var(--_d))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
15889
16131
  }
15890
16132
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogHeaderComponent, decorators: [{
15891
16133
  type: Component,
15892
16134
  args: [{ selector: 'ui-dialog-header', changeDetection: ChangeDetectionStrategy.OnPush, template: `<ng-content />`, host: {
15893
- class: 'flex flex-col text-center sm:text-left',
16135
+ '[class]': 'classes()',
15894
16136
  '[attr.data-slot]': '"dialog-header"',
15895
16137
  }, styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{:host([data-slot=\"dialog-header\"]){gap:calc(.375rem * var(--_d))}}\n"] }]
15896
- }] });
16138
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
15897
16139
 
15898
16140
  class DialogTitleComponent {
16141
+ constructor() {
16142
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
16143
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
16144
+ this.classes = computed(() => cn('text-lg font-semibold leading-none tracking-tight flex justify-start', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
16145
+ }
15899
16146
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15900
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: DialogTitleComponent, isStandalone: true, selector: "ui-dialog-title", host: { properties: { "attr.data-slot": "\"dialog-title\"" }, classAttribute: "text-lg font-semibold leading-none tracking-tight flex justify-start" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16147
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: DialogTitleComponent, isStandalone: true, selector: "ui-dialog-title", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"dialog-title\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
15901
16148
  }
15902
16149
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogTitleComponent, decorators: [{
15903
16150
  type: Component,
@@ -15906,15 +16153,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15906
16153
  changeDetection: ChangeDetectionStrategy.OnPush,
15907
16154
  template: `<ng-content />`,
15908
16155
  host: {
15909
- class: 'text-lg font-semibold leading-none tracking-tight flex justify-start',
16156
+ '[class]': 'classes()',
15910
16157
  '[attr.data-slot]': '"dialog-title"',
15911
16158
  },
15912
16159
  }]
15913
- }] });
16160
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
15914
16161
 
15915
16162
  class DialogDescriptionComponent {
16163
+ constructor() {
16164
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
16165
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
16166
+ this.classes = computed(() => cn('text-sm text-muted-foreground flex justify-start', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
16167
+ }
15916
16168
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15917
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: DialogDescriptionComponent, isStandalone: true, selector: "ui-dialog-description", host: { properties: { "attr.data-slot": "\"dialog-description\"" }, classAttribute: "text-sm text-muted-foreground flex justify-start" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16169
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: DialogDescriptionComponent, isStandalone: true, selector: "ui-dialog-description", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"dialog-description\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
15918
16170
  }
15919
16171
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogDescriptionComponent, decorators: [{
15920
16172
  type: Component,
@@ -15923,13 +16175,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15923
16175
  changeDetection: ChangeDetectionStrategy.OnPush,
15924
16176
  template: `<ng-content />`,
15925
16177
  host: {
15926
- class: 'text-sm text-muted-foreground flex justify-start',
16178
+ '[class]': 'classes()',
15927
16179
  '[attr.data-slot]': '"dialog-description"',
15928
16180
  },
15929
16181
  }]
15930
- }] });
16182
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
15931
16183
 
15932
16184
  class DialogContentComponent {
16185
+ static { this.idSeq = 0; }
15933
16186
  constructor() {
15934
16187
  this.dialog = inject(DIALOG, { optional: true });
15935
16188
  this.el = inject(ElementRef);
@@ -15954,6 +16207,14 @@ class DialogContentComponent {
15954
16207
  this.t = this.i18n.t;
15955
16208
  this.dir = this.i18n.dir;
15956
16209
  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 */ []));
16210
+ /**
16211
+ * `id` of this panel's own title, for `aria-labelledby`; null while it has none. The title is rendered
16212
+ * either from the `title` input or projected as a `<ui-dialog-title>`, so it is found in the DOM after
16213
+ * render and given an id, which covers both modes.
16214
+ */
16215
+ this.titleId = signal(null, ...(ngDevMode ? [{ debugName: "titleId" }] : /* istanbul ignore next */ []));
16216
+ /** `id` of this panel's own description, for `aria-describedby`; null while it has none. */
16217
+ this.descriptionId = signal(null, ...(ngDevMode ? [{ debugName: "descriptionId" }] : /* istanbul ignore next */ []));
15957
16218
  effect(() => {
15958
16219
  if (this.dialog?.open()) {
15959
16220
  this.previousActiveElement = this.document.activeElement;
@@ -15963,6 +16224,30 @@ class DialogContentComponent {
15963
16224
  this.previousActiveElement.focus();
15964
16225
  }
15965
16226
  });
16227
+ afterRenderEffect(() => {
16228
+ // The inputs are read so a title or description set after the dialog opened is picked up too.
16229
+ this.title();
16230
+ this.description();
16231
+ if (!this.dialog?.open())
16232
+ return;
16233
+ const panel = this.el.nativeElement.querySelector('[data-slot="dialog-content"]');
16234
+ this.titleId.set(panel ? this.ownId(panel, 'dialog-title') : null);
16235
+ this.descriptionId.set(panel ? this.ownId(panel, 'dialog-description') : null);
16236
+ });
16237
+ }
16238
+ /**
16239
+ * The id of the `slot` element that belongs to `panel` itself, giving it one if it has none. A dialog
16240
+ * nested inside this one has a title of its own that this panel must never take as its name, so only
16241
+ * elements whose nearest panel is this one count.
16242
+ */
16243
+ ownId(panel, slot) {
16244
+ // Array.from, not a spread: a consumer's `lib` may omit dom.iterable (Storybook's does), and a
16245
+ // NodeList is only iterable with it.
16246
+ const own = Array.from(panel.querySelectorAll(`[data-slot="${slot}"]`)).find(el => el.closest('[data-slot="dialog-content"]') === panel);
16247
+ if (!own)
16248
+ return null;
16249
+ own.id ||= `${slot}-${++DialogContentComponent.idSeq}`;
16250
+ return own.id;
15966
16251
  }
15967
16252
  ngAfterViewInit() {
15968
16253
  if (this.dialog?.open()) {
@@ -16002,7 +16287,7 @@ class DialogContentComponent {
16002
16287
  trapTabKey(event, this.contentEl);
16003
16288
  }
16004
16289
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
16005
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DialogContentComponent, isStandalone: true, selector: "ui-dialog-content", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "@if (dialog?.open()) {\n <div class=\"fixed inset-0 z-50 flex items-center justify-center\" [attr.dir]=\"dir()\">\n <!-- Overlay -->\n <button\n type=\"button\"\n class=\"fixed inset-0 bg-black/80 animate-in fade-in-0\"\n [attr.data-slot]=\"'dialog-overlay'\"\n [attr.aria-label]=\"t().close\"\n (click)=\"onOverlayClick()\"\n ></button>\n <!-- Content -->\n <div\n #contentEl\n [class]=\"classes()\"\n [attr.data-slot]=\"'dialog-content'\"\n (keydown)=\"onKeydown($event)\"\n tabindex=\"-1\"\n >\n @if (title()) {\n <ui-dialog-header>\n <ui-dialog-title>{{ title() }}</ui-dialog-title>\n @if (description()) {\n <ui-dialog-description>{{ description() }}</ui-dialog-description>\n }\n </ui-dialog-header>\n }\n <ng-content />\n <!-- Close button -->\n <button\n type=\"button\"\n class=\"absolute end-4 top-4 inline-flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none pointer-coarse:end-0.5 pointer-coarse:top-0.5 pointer-coarse:size-11\"\n [attr.aria-label]=\"t().close\"\n (click)=\"close()\"\n >\n <svg class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n <span class=\"sr-only\">{{ t().close }}</span>\n </button>\n </div>\n </div>\n}\n", styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{[data-slot=dialog-content]{gap:calc(.75rem * var(--_d));padding:calc(1rem * var(--_d))}@media(min-width:640px){[data-slot=dialog-content]{gap:calc(1rem * var(--_d));padding:calc(1.5rem * var(--_d))}}}\n"], dependencies: [{ kind: "component", type: DialogHeaderComponent, selector: "ui-dialog-header" }, { kind: "component", type: DialogTitleComponent, selector: "ui-dialog-title" }, { kind: "component", type: DialogDescriptionComponent, selector: "ui-dialog-description" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16290
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DialogContentComponent, isStandalone: true, selector: "ui-dialog-content", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: "@if (dialog?.open()) {\n <div class=\"fixed inset-0 z-50 flex items-center justify-center\" [attr.dir]=\"dir()\">\n <!-- Overlay -->\n <button\n type=\"button\"\n class=\"fixed inset-0 bg-black/80 animate-in fade-in-0\"\n [attr.data-slot]=\"'dialog-overlay'\"\n [attr.aria-label]=\"t().close\"\n (click)=\"onOverlayClick()\"\n ></button>\n <!-- Content -->\n <div\n #contentEl\n [class]=\"classes()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"titleId()\"\n [attr.aria-describedby]=\"descriptionId()\"\n [attr.data-slot]=\"'dialog-content'\"\n (keydown)=\"onKeydown($event)\"\n tabindex=\"-1\"\n >\n @if (title()) {\n <ui-dialog-header>\n <ui-dialog-title>{{ title() }}</ui-dialog-title>\n @if (description()) {\n <ui-dialog-description>{{ description() }}</ui-dialog-description>\n }\n </ui-dialog-header>\n }\n <ng-content />\n <!-- Close button -->\n <button\n type=\"button\"\n class=\"absolute end-4 top-4 inline-flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none pointer-coarse:end-0.5 pointer-coarse:top-0.5 pointer-coarse:size-11\"\n [attr.aria-label]=\"t().close\"\n (click)=\"close()\"\n >\n <svg class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n <span class=\"sr-only\">{{ t().close }}</span>\n </button>\n </div>\n </div>\n}\n", styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{[data-slot=dialog-content]{gap:calc(.75rem * var(--_d));padding:calc(1rem * var(--_d))}@media(min-width:640px){[data-slot=dialog-content]{gap:calc(1rem * var(--_d));padding:calc(1.5rem * var(--_d))}}}\n"], dependencies: [{ kind: "component", type: DialogHeaderComponent, selector: "ui-dialog-header", inputs: ["class"] }, { kind: "component", type: DialogTitleComponent, selector: "ui-dialog-title", inputs: ["class"] }, { kind: "component", type: DialogDescriptionComponent, selector: "ui-dialog-description", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16006
16291
  }
16007
16292
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogContentComponent, decorators: [{
16008
16293
  type: Component,
@@ -16010,20 +16295,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
16010
16295
  DialogHeaderComponent,
16011
16296
  DialogTitleComponent,
16012
16297
  DialogDescriptionComponent,
16013
- ], host: { class: 'contents' }, template: "@if (dialog?.open()) {\n <div class=\"fixed inset-0 z-50 flex items-center justify-center\" [attr.dir]=\"dir()\">\n <!-- Overlay -->\n <button\n type=\"button\"\n class=\"fixed inset-0 bg-black/80 animate-in fade-in-0\"\n [attr.data-slot]=\"'dialog-overlay'\"\n [attr.aria-label]=\"t().close\"\n (click)=\"onOverlayClick()\"\n ></button>\n <!-- Content -->\n <div\n #contentEl\n [class]=\"classes()\"\n [attr.data-slot]=\"'dialog-content'\"\n (keydown)=\"onKeydown($event)\"\n tabindex=\"-1\"\n >\n @if (title()) {\n <ui-dialog-header>\n <ui-dialog-title>{{ title() }}</ui-dialog-title>\n @if (description()) {\n <ui-dialog-description>{{ description() }}</ui-dialog-description>\n }\n </ui-dialog-header>\n }\n <ng-content />\n <!-- Close button -->\n <button\n type=\"button\"\n class=\"absolute end-4 top-4 inline-flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none pointer-coarse:end-0.5 pointer-coarse:top-0.5 pointer-coarse:size-11\"\n [attr.aria-label]=\"t().close\"\n (click)=\"close()\"\n >\n <svg class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n <span class=\"sr-only\">{{ t().close }}</span>\n </button>\n </div>\n </div>\n}\n", styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{[data-slot=dialog-content]{gap:calc(.75rem * var(--_d));padding:calc(1rem * var(--_d))}@media(min-width:640px){[data-slot=dialog-content]{gap:calc(1rem * var(--_d));padding:calc(1.5rem * var(--_d))}}}\n"] }]
16298
+ ], host: { class: 'contents' }, template: "@if (dialog?.open()) {\n <div class=\"fixed inset-0 z-50 flex items-center justify-center\" [attr.dir]=\"dir()\">\n <!-- Overlay -->\n <button\n type=\"button\"\n class=\"fixed inset-0 bg-black/80 animate-in fade-in-0\"\n [attr.data-slot]=\"'dialog-overlay'\"\n [attr.aria-label]=\"t().close\"\n (click)=\"onOverlayClick()\"\n ></button>\n <!-- Content -->\n <div\n #contentEl\n [class]=\"classes()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"titleId()\"\n [attr.aria-describedby]=\"descriptionId()\"\n [attr.data-slot]=\"'dialog-content'\"\n (keydown)=\"onKeydown($event)\"\n tabindex=\"-1\"\n >\n @if (title()) {\n <ui-dialog-header>\n <ui-dialog-title>{{ title() }}</ui-dialog-title>\n @if (description()) {\n <ui-dialog-description>{{ description() }}</ui-dialog-description>\n }\n </ui-dialog-header>\n }\n <ng-content />\n <!-- Close button -->\n <button\n type=\"button\"\n class=\"absolute end-4 top-4 inline-flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none pointer-coarse:end-0.5 pointer-coarse:top-0.5 pointer-coarse:size-11\"\n [attr.aria-label]=\"t().close\"\n (click)=\"close()\"\n >\n <svg class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n <span class=\"sr-only\">{{ t().close }}</span>\n </button>\n </div>\n </div>\n}\n", styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{[data-slot=dialog-content]{gap:calc(.75rem * var(--_d));padding:calc(1rem * var(--_d))}@media(min-width:640px){[data-slot=dialog-content]{gap:calc(1rem * var(--_d));padding:calc(1.5rem * var(--_d))}}}\n"] }]
16014
16299
  }], 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 }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }] } });
16015
16300
 
16016
16301
  class DialogFooterComponent {
16302
+ constructor() {
16303
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
16304
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
16305
+ this.classes = computed(() => cn('flex flex-col-reverse sm:flex-row sm:justify-end', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
16306
+ }
16017
16307
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
16018
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: DialogFooterComponent, isStandalone: true, selector: "ui-dialog-footer", host: { properties: { "attr.data-slot": "\"dialog-footer\"" }, classAttribute: "flex flex-col-reverse sm:flex-row sm:justify-end" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{:host([data-slot=\"dialog-footer\"]){gap:calc(.5rem * var(--_d))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16308
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: DialogFooterComponent, isStandalone: true, selector: "ui-dialog-footer", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"dialog-footer\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{:host([data-slot=\"dialog-footer\"]){gap:calc(.5rem * var(--_d))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16019
16309
  }
16020
16310
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DialogFooterComponent, decorators: [{
16021
16311
  type: Component,
16022
16312
  args: [{ selector: 'ui-dialog-footer', changeDetection: ChangeDetectionStrategy.OnPush, template: `<ng-content />`, host: {
16023
- class: 'flex flex-col-reverse sm:flex-row sm:justify-end',
16313
+ '[class]': 'classes()',
16024
16314
  '[attr.data-slot]': '"dialog-footer"',
16025
16315
  }, styles: [":host{--_d: var(--density-dialog, var(--density, 1))}@layer components{:host([data-slot=\"dialog-footer\"]){gap:calc(.5rem * var(--_d))}}\n"] }]
16026
- }] });
16316
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
16027
16317
 
16028
16318
  const STORAGE_KEY = 'ui-shortcut-binding-overrides';
16029
16319
  class ShortcutBindingService {
@@ -16726,6 +17016,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
16726
17016
 
16727
17017
  class CommandDialogComponent {
16728
17018
  constructor() {
17019
+ /** Extra classes merged onto the dialog panel, after `overflow-hidden p-0 shadow-lg` — e.g. a width utility. */
17020
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
17021
+ this.classes = computed(() => cn('overflow-hidden p-0 shadow-lg', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
16729
17022
  /**
16730
17023
  * Two-way open state of the underlying `ui-dialog`. Toggled by the global
16731
17024
  * {@link shortcut}, and each transition to open focuses the projected
@@ -16795,9 +17088,9 @@ class CommandDialogComponent {
16795
17088
  this.shortcutHandle = null;
16796
17089
  }
16797
17090
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CommandDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
16798
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.22", type: CommandDialogComponent, isStandalone: true, selector: "ui-command-dialog", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, shortcutEnabled: { classPropertyName: "shortcutEnabled", publicName: "shortcutEnabled", isSignal: true, isRequired: false, transformFunction: null }, shortcut: { classPropertyName: "shortcut", publicName: "shortcut", isSignal: true, isRequired: false, transformFunction: null }, shortcutActionId: { classPropertyName: "shortcutActionId", publicName: "shortcutActionId", isSignal: true, isRequired: false, transformFunction: null }, shortcutCategory: { classPropertyName: "shortcutCategory", publicName: "shortcutCategory", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { classAttribute: "contents" }, queries: [{ propertyName: "commandInput", first: true, predicate: CommandInputComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
17091
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.22", type: CommandDialogComponent, isStandalone: true, selector: "ui-command-dialog", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, shortcutEnabled: { classPropertyName: "shortcutEnabled", publicName: "shortcutEnabled", isSignal: true, isRequired: false, transformFunction: null }, shortcut: { classPropertyName: "shortcut", publicName: "shortcut", isSignal: true, isRequired: false, transformFunction: null }, shortcutActionId: { classPropertyName: "shortcutActionId", publicName: "shortcutActionId", isSignal: true, isRequired: false, transformFunction: null }, shortcutCategory: { classPropertyName: "shortcutCategory", publicName: "shortcutCategory", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, host: { properties: { "attr.data-slot": "\"command-dialog\"" }, classAttribute: "contents" }, queries: [{ propertyName: "commandInput", first: true, predicate: CommandInputComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
16799
17092
  <ui-dialog [(open)]="open">
16800
- <ui-dialog-content class="overflow-hidden p-0 shadow-lg">
17093
+ <ui-dialog-content [class]="classes()">
16801
17094
  <ui-command class="**:data-[slot=command-group]:px-2 **:data-[slot=command-group]:font-medium **:data-[slot=command-group]:text-muted-foreground **:data-[slot=command-item]:px-2 **:data-[slot=command-item]:py-3 [&_[data-slot=command-item]_svg]:h-5 [&_[data-slot=command-item]_svg]:w-5">
16802
17095
  <ng-content />
16803
17096
  </ui-command>
@@ -16813,16 +17106,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
16813
17106
  imports: [DialogComponent, DialogContentComponent, CommandComponent],
16814
17107
  template: `
16815
17108
  <ui-dialog [(open)]="open">
16816
- <ui-dialog-content class="overflow-hidden p-0 shadow-lg">
17109
+ <ui-dialog-content [class]="classes()">
16817
17110
  <ui-command class="**:data-[slot=command-group]:px-2 **:data-[slot=command-group]:font-medium **:data-[slot=command-group]:text-muted-foreground **:data-[slot=command-item]:px-2 **:data-[slot=command-item]:py-3 [&_[data-slot=command-item]_svg]:h-5 [&_[data-slot=command-item]_svg]:w-5">
16818
17111
  <ng-content />
16819
17112
  </ui-command>
16820
17113
  </ui-dialog-content>
16821
17114
  </ui-dialog>
16822
17115
  `,
16823
- host: { class: 'contents' },
17116
+ host: { class: 'contents', '[attr.data-slot]': '"command-dialog"' },
16824
17117
  }]
16825
- }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], shortcutEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcutEnabled", required: false }] }], shortcut: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcut", required: false }] }], shortcutActionId: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcutActionId", required: false }] }], shortcutCategory: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcutCategory", required: false }] }], commandInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CommandInputComponent), { isSignal: true }] }] } });
17118
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], shortcutEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcutEnabled", required: false }] }], shortcut: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcut", required: false }] }], shortcutActionId: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcutActionId", required: false }] }], shortcutCategory: [{ type: i0.Input, args: [{ isSignal: true, alias: "shortcutCategory", required: false }] }], commandInput: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CommandInputComponent), { isSignal: true }] }] } });
16826
17119
 
16827
17120
  const badgeVariants = cva('inline-flex items-center rounded-md border text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', {
16828
17121
  variants: {
@@ -16991,7 +17284,7 @@ class DataTableMultiselectFilterComponent {
16991
17284
  this.filterChange.emit([...selected]);
16992
17285
  }
16993
17286
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DataTableMultiselectFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
16994
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DataTableMultiselectFilterComponent, isStandalone: true, selector: "ui-data-table-multiselect-filter", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, displayWith: { classPropertyName: "displayWith", publicName: "displayWith", isSignal: true, isRequired: false, transformFunction: null }, valueWith: { classPropertyName: "valueWith", publicName: "valueWith", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChange: "filterChange" }, host: { classAttribute: "contents" }, ngImport: i0, template: "<div [class]=\"classes()\" [attr.data-slot]=\"'multiselect-filter'\">\n @if (title()) {\n <div class=\"flex items-center justify-between px-2 pb-2\">\n <span class=\"text-sm font-medium\">{{ title() }}</span>\n @if (selectedCount() > 0) {\n <ui-badge variant=\"secondary\" [label]=\"String(selectedCount())\" class=\"text-xs\" />\n }\n </div>\n }\n <ui-command [shouldFilter]=\"true\" [attr.dir]=\"dir()\">\n <ui-command-input [placeholder]=\"resolvedPlaceholder()\" />\n <div class=\"flex items-center gap-1 px-2 py-1.5\">\n <ui-button variant=\"ghost\" size=\"sm\" class=\"h-7 pointer-coarse:h-11 text-xs\" (clicked)=\"selectAll()\">\n {{ selectAllLabel() }}\n </ui-button>\n <ui-button variant=\"ghost\" size=\"sm\" class=\"h-7 pointer-coarse:h-11 text-xs\" (clicked)=\"clearAll()\">\n {{ clearAllLabel() }}\n </ui-button>\n </div>\n <ui-command-separator />\n <ui-command-list class=\"max-h-64\">\n <ui-command-empty>{{ noResultsLabel() }}</ui-command-empty>\n @for (option of options(); track trackOption(option)) {\n <ui-command-item\n [value]=\"getDisplayLabel(option)\"\n (selectItem)=\"toggleOption(option)\"\n class=\"gap-2\"\n >\n <ui-checkbox\n [checked]=\"isSelected(option)\"\n [ariaLabel]=\"getDisplayLabel(option)\"\n />\n <span>{{ getDisplayLabel(option) }}</span>\n </ui-command-item>\n }\n </ui-command-list>\n </ui-command>\n</div>\n", dependencies: [{ kind: "component", type: CommandComponent, selector: "ui-command", inputs: ["class", "shouldFilter", "search", "source", "debounce", "recentKey", "recentLimit"] }, { kind: "component", type: CommandInputComponent, selector: "ui-command-input", inputs: ["placeholder", "ariaLabel", "value", "locale"] }, { kind: "component", type: CommandListComponent, selector: "ui-command-list", inputs: ["class", "ariaLabel"] }, { kind: "component", type: CommandEmptyComponent, selector: "ui-command-empty" }, { kind: "component", type: CommandItemComponent, selector: "ui-command-item", inputs: ["class", "disabled", "selected", "value", "shortcut"], outputs: ["selectItem"] }, { kind: "component", type: CommandSeparatorComponent, selector: "ui-command-separator" }, { kind: "component", type: CheckboxComponent, selector: "ui-checkbox", inputs: ["disabled", "class", "skeleton", "elementId", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "ariaInvalid", "checked", "indeterminate", "label"], outputs: ["checkedChange"] }, { kind: "component", type: BadgeComponent, selector: "ui-badge", inputs: ["variant", "label", "class", "skeleton"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17287
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: DataTableMultiselectFilterComponent, isStandalone: true, selector: "ui-data-table-multiselect-filter", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, displayWith: { classPropertyName: "displayWith", publicName: "displayWith", isSignal: true, isRequired: false, transformFunction: null }, valueWith: { classPropertyName: "valueWith", publicName: "valueWith", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChange: "filterChange" }, host: { classAttribute: "contents" }, ngImport: i0, template: "<div [class]=\"classes()\" [attr.data-slot]=\"'multiselect-filter'\">\n @if (title()) {\n <div class=\"flex items-center justify-between px-2 pb-2\">\n <span class=\"text-sm font-medium\">{{ title() }}</span>\n @if (selectedCount() > 0) {\n <ui-badge variant=\"secondary\" [label]=\"String(selectedCount())\" class=\"text-xs\" />\n }\n </div>\n }\n <ui-command [shouldFilter]=\"true\" [attr.dir]=\"dir()\">\n <ui-command-input [placeholder]=\"resolvedPlaceholder()\" />\n <div class=\"flex items-center gap-1 px-2 py-1.5\">\n <ui-button variant=\"ghost\" size=\"sm\" class=\"h-7 pointer-coarse:h-11 text-xs\" (clicked)=\"selectAll()\">\n {{ selectAllLabel() }}\n </ui-button>\n <ui-button variant=\"ghost\" size=\"sm\" class=\"h-7 pointer-coarse:h-11 text-xs\" (clicked)=\"clearAll()\">\n {{ clearAllLabel() }}\n </ui-button>\n </div>\n <ui-command-separator />\n <ui-command-list class=\"max-h-64\">\n <ui-command-empty>{{ noResultsLabel() }}</ui-command-empty>\n @for (option of options(); track trackOption(option)) {\n <ui-command-item\n [value]=\"getDisplayLabel(option)\"\n (selectItem)=\"toggleOption(option)\"\n class=\"gap-2\"\n >\n <ui-checkbox\n [checked]=\"isSelected(option)\"\n [ariaLabel]=\"getDisplayLabel(option)\"\n />\n <span>{{ getDisplayLabel(option) }}</span>\n </ui-command-item>\n }\n </ui-command-list>\n </ui-command>\n</div>\n", dependencies: [{ kind: "component", type: CommandComponent, selector: "ui-command", inputs: ["class", "shouldFilter", "search", "source", "debounce", "recentKey", "recentLimit"] }, { kind: "component", type: CommandInputComponent, selector: "ui-command-input", inputs: ["class", "placeholder", "ariaLabel", "value", "locale"] }, { kind: "component", type: CommandListComponent, selector: "ui-command-list", inputs: ["class", "ariaLabel"] }, { kind: "component", type: CommandEmptyComponent, selector: "ui-command-empty", inputs: ["class"] }, { kind: "component", type: CommandItemComponent, selector: "ui-command-item", inputs: ["class", "disabled", "selected", "value", "shortcut"], outputs: ["selectItem"] }, { kind: "component", type: CommandSeparatorComponent, selector: "ui-command-separator", inputs: ["class"] }, { kind: "component", type: CheckboxComponent, selector: "ui-checkbox", inputs: ["disabled", "class", "skeleton", "elementId", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "ariaInvalid", "checked", "indeterminate", "label"], outputs: ["checkedChange"] }, { kind: "component", type: BadgeComponent, selector: "ui-badge", inputs: ["variant", "label", "class", "skeleton"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16995
17288
  }
16996
17289
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DataTableMultiselectFilterComponent, decorators: [{
16997
17290
  type: Component,
@@ -17389,7 +17682,10 @@ class ContextMenuContentComponent {
17389
17682
  }
17390
17683
  /** Opening a menu moves focus to its first enabled item, or to the panel when every item is disabled. */
17391
17684
  focusInitial(panel) {
17392
- if (panel.contains(this.document.activeElement))
17685
+ // This runs two frames after opening. A flyout is portalled outside the panel, so a user who already
17686
+ // arrowed into one is inside the menu too; stealing their focus would send their next key to the root.
17687
+ const active = this.activeElement();
17688
+ if (panel.contains(active) || active?.closest('[data-context-menu-sub-portal]'))
17393
17689
  return;
17394
17690
  (this.ringItems(panel)[0] ?? panel).focus({ preventScroll: true });
17395
17691
  }
@@ -17659,8 +17955,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
17659
17955
  }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }] } });
17660
17956
 
17661
17957
  class ContextMenuSeparatorComponent {
17958
+ constructor() {
17959
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
17960
+ 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 */ []));
17962
+ }
17662
17963
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17663
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: ContextMenuSeparatorComponent, isStandalone: true, selector: "ui-context-menu-separator", host: { properties: { "attr.data-slot": "\"context-menu-separator\"" }, classAttribute: "-mx-1 my-1 h-px bg-border" }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17964
+ 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 }); }
17664
17965
  }
17665
17966
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuSeparatorComponent, decorators: [{
17666
17967
  type: Component,
@@ -17669,15 +17970,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
17669
17970
  changeDetection: ChangeDetectionStrategy.OnPush,
17670
17971
  template: ``,
17671
17972
  host: {
17672
- class: '-mx-1 my-1 h-px bg-border',
17973
+ '[class]': 'classes()',
17673
17974
  '[attr.data-slot]': '"context-menu-separator"',
17674
17975
  },
17675
17976
  }]
17676
- }] });
17977
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
17677
17978
 
17678
17979
  const CONTEXT_MENU_SUB = new InjectionToken('CONTEXT_MENU_SUB');
17679
17980
  class ContextMenuSubComponent {
17680
17981
  constructor() {
17982
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
17983
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
17984
+ this.classes = computed(() => cn('relative block w-full', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
17681
17985
  this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
17682
17986
  this.trigger = null;
17683
17987
  this.content = null;
@@ -17744,7 +18048,7 @@ class ContextMenuSubComponent {
17744
18048
  }, 0);
17745
18049
  }
17746
18050
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuSubComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17747
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: ContextMenuSubComponent, isStandalone: true, selector: "ui-context-menu-sub", host: { properties: { "attr.data-slot": "\"context-menu-sub\"" }, classAttribute: "relative block w-full" }, providers: [{ provide: CONTEXT_MENU_SUB, useExisting: forwardRef(() => ContextMenuSubComponent) }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18051
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: ContextMenuSubComponent, isStandalone: true, selector: "ui-context-menu-sub", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"context-menu-sub\"" } }, providers: [{ provide: CONTEXT_MENU_SUB, useExisting: forwardRef(() => ContextMenuSubComponent) }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17748
18052
  }
17749
18053
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuSubComponent, decorators: [{
17750
18054
  type: Component,
@@ -17754,11 +18058,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
17754
18058
  providers: [{ provide: CONTEXT_MENU_SUB, useExisting: forwardRef(() => ContextMenuSubComponent) }],
17755
18059
  template: `<ng-content />`,
17756
18060
  host: {
17757
- class: 'relative block w-full',
18061
+ '[class]': 'classes()',
17758
18062
  '[attr.data-slot]': '"context-menu-sub"',
17759
18063
  },
17760
18064
  }]
17761
- }] });
18065
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
17762
18066
 
17763
18067
  class ContextMenuSubTriggerComponent {
17764
18068
  constructor() {
@@ -18166,6 +18470,12 @@ class ContextMenuComponent {
18166
18470
  * {@link ContextMenuItem}.
18167
18471
  */
18168
18472
  this.items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
18473
+ /**
18474
+ * Extra classes for the menu panel the component renders from {@link items}. The host is
18475
+ * `display: contents`, so with hand-authored content put the class on your own
18476
+ * `<ui-context-menu-content>` instead.
18477
+ */
18478
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
18169
18479
  this.open = signal(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
18170
18480
  this.position = signal({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
18171
18481
  this.data = signal(undefined, ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
@@ -18220,10 +18530,10 @@ class ContextMenuComponent {
18220
18530
  return isRtl(this.el.nativeElement);
18221
18531
  }
18222
18532
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
18223
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ContextMenuComponent, isStandalone: true, selector: "ui-context-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-slot": "\"context-menu\"" }, classAttribute: "contents" }, providers: [{ provide: CONTEXT_MENU, useExisting: forwardRef(() => ContextMenuComponent) }], ngImport: i0, template: `
18533
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ContextMenuComponent, isStandalone: true, selector: "ui-context-menu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-slot": "\"context-menu\"" }, classAttribute: "contents" }, providers: [{ provide: CONTEXT_MENU, useExisting: forwardRef(() => ContextMenuComponent) }], ngImport: i0, template: `
18224
18534
  <ng-content />
18225
18535
  @if (items().length > 0) {
18226
- <ui-context-menu-content>
18536
+ <ui-context-menu-content [class]="class()">
18227
18537
  <ng-container *ngTemplateOutlet="menuItemsTpl; context: { $implicit: items() }"></ng-container>
18228
18538
  </ui-context-menu-content>
18229
18539
  }
@@ -18254,7 +18564,7 @@ class ContextMenuComponent {
18254
18564
  }
18255
18565
  }
18256
18566
  </ng-template>
18257
- `, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => ContextMenuContentComponent), selector: "ui-context-menu-content", inputs: ["class"] }, { kind: "component", type: i0.forwardRef(() => ContextMenuItemComponent), selector: "ui-context-menu-item", inputs: ["class", "inset", "variant", "disabled", "shortcut"] }, { kind: "component", type: i0.forwardRef(() => ContextMenuLabelComponent), selector: "ui-context-menu-label", inputs: ["class", "inset"] }, { kind: "component", type: i0.forwardRef(() => ContextMenuSeparatorComponent), selector: "ui-context-menu-separator" }, { kind: "component", type: i0.forwardRef(() => ContextMenuSubComponent), selector: "ui-context-menu-sub" }, { kind: "component", type: i0.forwardRef(() => ContextMenuSubTriggerComponent), selector: "ui-context-menu-sub-trigger", inputs: ["class", "disabled", "inset"] }, { kind: "component", type: i0.forwardRef(() => ContextMenuSubContentComponent), selector: "ui-context-menu-sub-content", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18567
+ `, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i0.forwardRef(() => ContextMenuContentComponent), selector: "ui-context-menu-content", inputs: ["class"] }, { kind: "component", type: i0.forwardRef(() => ContextMenuItemComponent), selector: "ui-context-menu-item", inputs: ["class", "inset", "variant", "disabled", "shortcut"] }, { kind: "component", type: i0.forwardRef(() => ContextMenuLabelComponent), selector: "ui-context-menu-label", inputs: ["class", "inset"] }, { kind: "component", type: i0.forwardRef(() => ContextMenuSeparatorComponent), selector: "ui-context-menu-separator", inputs: ["class"] }, { kind: "component", type: i0.forwardRef(() => ContextMenuSubComponent), selector: "ui-context-menu-sub", inputs: ["class"] }, { kind: "component", type: i0.forwardRef(() => ContextMenuSubTriggerComponent), selector: "ui-context-menu-sub-trigger", inputs: ["class", "disabled", "inset"] }, { kind: "component", type: i0.forwardRef(() => ContextMenuSubContentComponent), selector: "ui-context-menu-sub-content", inputs: ["class"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18258
18568
  }
18259
18569
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuComponent, decorators: [{
18260
18570
  type: Component,
@@ -18274,7 +18584,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
18274
18584
  template: `
18275
18585
  <ng-content />
18276
18586
  @if (items().length > 0) {
18277
- <ui-context-menu-content>
18587
+ <ui-context-menu-content [class]="class()">
18278
18588
  <ng-container *ngTemplateOutlet="menuItemsTpl; context: { $implicit: items() }"></ng-container>
18279
18589
  </ui-context-menu-content>
18280
18590
  }
@@ -18312,10 +18622,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
18312
18622
  },
18313
18623
  providers: [{ provide: CONTEXT_MENU, useExisting: forwardRef(() => ContextMenuComponent) }],
18314
18624
  }]
18315
- }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }] } });
18625
+ }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
18316
18626
 
18317
18627
  class ContextMenuTriggerComponent {
18318
18628
  constructor() {
18629
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
18630
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
18631
+ this.classes = computed(() => cn('contents', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
18319
18632
  this.contextMenu = inject(CONTEXT_MENU, { optional: true });
18320
18633
  this.cleanupLongPress = null;
18321
18634
  }
@@ -18345,10 +18658,10 @@ class ContextMenuTriggerComponent {
18345
18658
  this.contextMenu?.show(event.clientX, event.clientY);
18346
18659
  }
18347
18660
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
18348
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: ContextMenuTriggerComponent, isStandalone: true, selector: "ui-context-menu-trigger", host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "triggerSpan", first: true, predicate: ["triggerSpan"], descendants: true, static: true }], ngImport: i0, template: `
18661
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: ContextMenuTriggerComponent, isStandalone: true, selector: "ui-context-menu-trigger", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, viewQueries: [{ propertyName: "triggerSpan", first: true, predicate: ["triggerSpan"], descendants: true, static: true }], ngImport: i0, template: `
18349
18662
  <span
18350
18663
  #triggerSpan
18351
- class="contents"
18664
+ [class]="classes()"
18352
18665
  (contextmenu)="onContextMenu($event)"
18353
18666
  [attr.data-slot]="'context-menu-trigger'"
18354
18667
  >
@@ -18364,7 +18677,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
18364
18677
  template: `
18365
18678
  <span
18366
18679
  #triggerSpan
18367
- class="contents"
18680
+ [class]="classes()"
18368
18681
  (contextmenu)="onContextMenu($event)"
18369
18682
  [attr.data-slot]="'context-menu-trigger'"
18370
18683
  >
@@ -18373,14 +18686,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
18373
18686
  `,
18374
18687
  host: { class: 'contents' },
18375
18688
  }]
18376
- }], propDecorators: { triggerSpan: [{
18689
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], triggerSpan: [{
18377
18690
  type: ViewChild,
18378
18691
  args: ['triggerSpan', { static: true }]
18379
18692
  }] } });
18380
18693
 
18381
18694
  class ContextMenuShortcutComponent {
18695
+ constructor() {
18696
+ /** Extra classes merged onto the element this component renders, after its built-in styling. */
18697
+ this.class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
18698
+ this.classes = computed(() => cn('ltr:ml-auto rtl:mr-auto text-xs tracking-widest text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
18699
+ }
18382
18700
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuShortcutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
18383
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: ContextMenuShortcutComponent, isStandalone: true, selector: "ui-context-menu-shortcut", host: { properties: { "attr.data-slot": "\"context-menu-shortcut\"" }, classAttribute: "ltr:ml-auto rtl:mr-auto text-xs tracking-widest text-muted-foreground" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18701
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: ContextMenuShortcutComponent, isStandalone: true, selector: "ui-context-menu-shortcut", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"context-menu-shortcut\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18384
18702
  }
18385
18703
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuShortcutComponent, decorators: [{
18386
18704
  type: Component,
@@ -18389,11 +18707,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
18389
18707
  changeDetection: ChangeDetectionStrategy.OnPush,
18390
18708
  template: `<ng-content />`,
18391
18709
  host: {
18392
- class: 'ltr:ml-auto rtl:mr-auto text-xs tracking-widest text-muted-foreground',
18710
+ '[class]': 'classes()',
18393
18711
  '[attr.data-slot]': '"context-menu-shortcut"',
18394
18712
  },
18395
18713
  }]
18396
- }] });
18714
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
18397
18715
 
18398
18716
  /**
18399
18717
  * ContextMenuTriggerDirective - Directive version for use on any element
@@ -18461,14 +18779,14 @@ class ContextMenuTriggerDirective {
18461
18779
  * listener is prevented from firing. The event is otherwise untouched — it
18462
18780
  * still bubbles and any other `(click)` handler on the element runs.
18463
18781
  */
18464
- onClick(_event) {
18782
+ onClick() {
18465
18783
  const contextMenu = this.uiContextMenuTrigger();
18466
18784
  if (contextMenu?.open()) {
18467
18785
  contextMenu.close();
18468
18786
  }
18469
18787
  }
18470
18788
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
18471
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: ContextMenuTriggerDirective, isStandalone: true, selector: "[uiContextMenuTrigger]", inputs: { uiContextMenuTrigger: { classPropertyName: "uiContextMenuTrigger", publicName: "uiContextMenuTrigger", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "contextmenu": "onContextMenu($event)", "click": "onClick($event)" } }, ngImport: i0 }); }
18789
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: ContextMenuTriggerDirective, isStandalone: true, selector: "[uiContextMenuTrigger]", inputs: { uiContextMenuTrigger: { classPropertyName: "uiContextMenuTrigger", publicName: "uiContextMenuTrigger", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "contextmenu": "onContextMenu($event)", "click": "onClick()" } }, ngImport: i0 }); }
18472
18790
  }
18473
18791
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ContextMenuTriggerDirective, decorators: [{
18474
18792
  type: Directive,
@@ -18476,35 +18794,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
18476
18794
  selector: '[uiContextMenuTrigger]',
18477
18795
  host: {
18478
18796
  '(contextmenu)': 'onContextMenu($event)',
18479
- '(click)': 'onClick($event)',
18797
+ '(click)': 'onClick()',
18480
18798
  },
18481
18799
  }]
18482
18800
  }], propDecorators: { uiContextMenuTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "uiContextMenuTrigger", required: true }] }] } });
18483
18801
 
18484
18802
  const SLOT_ID = 'context-menu';
18803
+ /** Columns the table adds itself; a gesture on one of them does not move the grid focus. */
18804
+ const TABLE_OWNED_COLUMNS = new Set(['_selection', '_expander', '_actions']);
18805
+ /**
18806
+ * What custom mode reads from the host. The CLI only checks that the base file exists before it applies
18807
+ * an addon, so a newer addon can sit next to an older table whose host lacks these.
18808
+ */
18809
+ const CUSTOM_MODE_HOST_MEMBERS = [
18810
+ 'getRenderedTreeRowAt',
18811
+ 'focusCell',
18812
+ 'isCellRangeSelectionEnabled',
18813
+ 'isCellSelected',
18814
+ 'isEditingCell',
18815
+ ];
18816
+ const ROW_SELECTOR = '[data-row-index]';
18817
+ const HEADER_SELECTOR = '[data-slot="table-head"], [data-slot="data-table-header"], th';
18485
18818
  /**
18486
18819
  * Opt-in context-menu addon for `<ui-data-table>`. Attaches via DI to the
18487
18820
  * `DataTableAddonHost` the base provides, contributes the ⋮ row/header buttons
18488
- * through the host's generic slot registries, and renders menus itself
18489
- * (imperative `ContextMenuComponent`) — the base ships no context-menu code or
18490
- * dependency. Reachable by mouse (`contextmenu`), keyboard (the context-menu key), touch
18491
- * (long-press), and the ⋮ buttons. A long-press that the browser also reports
18492
- * as a `contextmenu` (Android) opens the menu, and emits, once.
18821
+ * through the host's generic slot registries — the base ships no context-menu code
18822
+ * or dependency. Reachable by mouse (`contextmenu`), keyboard (the context-menu
18823
+ * key), touch (long-press), and the ⋮ buttons. A long-press that the browser also
18824
+ * reports as a `contextmenu` (Android) opens the menu, and emits, once.
18825
+ *
18826
+ * Two modes, chosen by what you bind:
18827
+ *
18828
+ * - **Simple** — `[rowActions]` (and `[enableColumnMenu]`): the addon builds the
18829
+ * menus itself and adds the ⋮ buttons. Emits {@link rowMenuOpen} / {@link columnMenuOpen}.
18830
+ * - **Custom** — `[contextMenu]`: the gestures open *your* `<ui-context-menu>`, with
18831
+ * the row (or, with `[contextMenuRowsOnly]="false"`, the header) as its data. Emits
18832
+ * {@link rowContextMenu} / {@link headerContextMenu}.
18833
+ *
18834
+ * With both bound, the gestures open your menu and the ⋮ buttons still open the
18835
+ * built one. With neither, the directive takes no gesture.
18836
+ *
18837
+ * While `enableCellRangeSelection` is on, a touch long-press opens your menu only on a
18838
+ * cell that is already selected (inside the range, or the focused cell with no range);
18839
+ * anywhere else the same hold starts a range, as it always did.
18493
18840
  */
18494
18841
  class DataTableContextMenuDirective {
18495
18842
  constructor() {
18496
18843
  this.host = inject(DataTableAddonHost);
18497
18844
  this.el = inject(ElementRef);
18498
18845
  this.vcr = inject(ViewContainerRef);
18846
+ this.errors = inject(ErrorHandler);
18499
18847
  /** Consumer callback returning the menu items for a row. */
18500
18848
  this.rowActions = input(undefined, ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
18501
18849
  /** Enable the per-column header menu (sort / pin / hide). */
18502
18850
  this.enableColumnMenu = input(false, ...(ngDevMode ? [{ debugName: "enableColumnMenu" }] : /* istanbul ignore next */ []));
18851
+ /**
18852
+ * Your own menu (custom mode). A right-click, the context-menu key or a long-press on a
18853
+ * row opens it at the pointer with the row as its data (the flattened tree row, with the
18854
+ * row merged in, when the table renders sub-rows).
18855
+ */
18856
+ this.contextMenu = input(undefined, ...(ngDevMode ? [{ debugName: "contextMenu" }] : /* istanbul ignore next */ []));
18857
+ /** Hands every context gesture on the table back to the browser. The ⋮ buttons are unaffected. */
18858
+ this.contextMenuDisabled = input(false, ...(ngDevMode ? [{ debugName: "contextMenuDisabled" }] : /* istanbul ignore next */ []));
18859
+ /** Custom mode: leave the header alone. Set to `false` to open `contextMenu` on a column header too. */
18860
+ this.contextMenuRowsOnly = input(true, ...(ngDevMode ? [{ debugName: "contextMenuRowsOnly" }] : /* istanbul ignore next */ []));
18503
18861
  /** Emitted when a row menu opens (with its context). */
18504
18862
  this.rowMenuOpen = output();
18505
18863
  /** Emitted when a column menu opens (with its column). */
18506
18864
  this.columnMenuOpen = output();
18865
+ /** Custom mode: the row a gesture opened `contextMenu` on. */
18866
+ this.rowContextMenu = output();
18867
+ /** Custom mode: the header a gesture opened `contextMenu` on (needs `contextMenuRowsOnly` false). */
18868
+ this.headerContextMenu = output();
18869
+ /**
18870
+ * Whether the table's range handler will take the hold that began with the last finger: it
18871
+ * only takes a hold on a data cell that was not selected. Decided when the finger goes down and
18872
+ * read when the hold fires, because that handler may already have re-anchored the range onto the
18873
+ * pressed cell by then, and the answer must not depend on which of the two ran first.
18874
+ */
18875
+ this.rangeSelectionTakesHold = false;
18876
+ /** False once a bound menu met a table whose host lacks what custom mode reads (see {@link requireCustomModeHost}). */
18877
+ this.hostSupportsCustomMode = true;
18507
18878
  const destroyRef = inject(DestroyRef);
18879
+ effect(() => {
18880
+ if (this.contextMenu())
18881
+ this.requireCustomModeHost();
18882
+ });
18508
18883
  effect((onCleanup) => {
18509
18884
  if (!this.rowActions())
18510
18885
  return;
@@ -18526,8 +18901,17 @@ class DataTableContextMenuDirective {
18526
18901
  }));
18527
18902
  });
18528
18903
  afterNextRender(() => {
18529
- const teardown = onContextGesture(this.el.nativeElement, (gesture) => this.openRowMenuFromGesture(gesture));
18530
- destroyRef.onDestroy(teardown);
18904
+ const element = this.el.nativeElement;
18905
+ const onPress = (event) => {
18906
+ // Simple mode never asks the host about selection, so an older table keeps working there.
18907
+ this.rangeSelectionTakesHold = this.customMenu() !== undefined && this.rangeSelectionWillTake(event.target);
18908
+ };
18909
+ const stopGestures = onContextGesture(element, (gesture) => this.openFromGesture(gesture));
18910
+ element.addEventListener('touchstart', onPress, { passive: true });
18911
+ destroyRef.onDestroy(() => {
18912
+ stopGestures();
18913
+ element.removeEventListener('touchstart', onPress);
18914
+ });
18531
18915
  });
18532
18916
  destroyRef.onDestroy(() => {
18533
18917
  this.rowMenu?.destroy();
@@ -18551,23 +18935,93 @@ class DataTableContextMenuDirective {
18551
18935
  ...this.visibilityItems(key, col, t),
18552
18936
  ];
18553
18937
  }
18554
- /** Whether the gesture landed on a rendered row of a table with `rowActions` and was taken. */
18555
- openRowMenuFromGesture(gesture) {
18938
+ /** The bound menu, unless the table is too old for custom mode (then the built menu, if any, answers). */
18939
+ customMenu() {
18940
+ return this.hostSupportsCustomMode ? (this.contextMenu() ?? undefined) : undefined;
18941
+ }
18942
+ requireCustomModeHost() {
18943
+ const missing = CUSTOM_MODE_HOST_MEMBERS.filter((member) => typeof this.host[member] !== 'function');
18944
+ this.hostSupportsCustomMode = missing.length === 0;
18945
+ if (missing.length === 0)
18946
+ return;
18947
+ // Reported (again if the bound menu changes), not thrown: it is a setup problem, so rendering carries on
18948
+ // and the gestures fall through to the browser instead of failing on every right-click.
18949
+ this.errors.handleError(new Error(`uiDtContextMenu [contextMenu] needs a newer <ui-data-table>: its DataTableAddonHost lacks ${missing.join(', ')}. ` +
18950
+ 'Run `npx @gilav21/shadcn-angular update data-table`.'));
18951
+ }
18952
+ /** Whether the gesture was taken: by `contextMenu` if bound, else by the built row menu if `rowActions` is set. */
18953
+ openFromGesture(gesture) {
18954
+ if (this.contextMenuDisabled())
18955
+ return false;
18956
+ const menu = this.customMenu();
18957
+ if (menu && gesture.viaTouch && this.rangeSelectionTakesHold)
18958
+ return false;
18959
+ const rowEl = gesture.target.closest(ROW_SELECTOR);
18960
+ if (rowEl)
18961
+ return menu ? this.openBoundRowMenu(menu, gesture, rowEl) : this.openBuiltRowMenu(gesture, rowEl);
18962
+ return menu ? this.openBoundHeaderMenu(menu, gesture) : false;
18963
+ }
18964
+ /**
18965
+ * With range selection on, the table starts a range from a touch hold on an unselected data cell. It
18966
+ * ignores every other hold (a header, its own columns, a row's padding), a hold on what is already
18967
+ * selected, and every hold while a cell is being edited, so those are free to open the menu.
18968
+ */
18969
+ rangeSelectionWillTake(target) {
18970
+ if (!this.host.isCellRangeSelectionEnabled() || this.host.isEditingCell())
18971
+ return false;
18972
+ const cell = this.cellAt(target);
18973
+ return cell !== null && !TABLE_OWNED_COLUMNS.has(cell.columnKey) && !this.host.isCellSelected(cell.rowIndex, cell.columnKey);
18974
+ }
18975
+ openBuiltRowMenu(gesture, rowEl) {
18556
18976
  if (!this.rowActions())
18557
18977
  return false;
18558
- const context = this.rowContextFromTarget(gesture.target);
18559
- if (!context)
18978
+ const index = rowIndexOf(rowEl);
18979
+ const row = this.host.getRenderedRowAt(index);
18980
+ if (row === undefined)
18560
18981
  return false;
18561
- this.openRowMenu(gesture.clientX, gesture.clientY, context);
18982
+ this.openRowMenu(gesture.clientX, gesture.clientY, this.host.getRowContext(row, index));
18562
18983
  return true;
18563
18984
  }
18564
- rowContextFromTarget(target) {
18565
- const rowEl = target?.closest('[data-row-index]');
18566
- if (!rowEl)
18567
- return null;
18568
- const index = Number.parseInt(rowEl.dataset['rowIndex'] ?? '0', 10);
18985
+ openBoundRowMenu(menu, gesture, rowEl) {
18986
+ const index = rowIndexOf(rowEl);
18569
18987
  const row = this.host.getRenderedRowAt(index);
18570
- return row ? this.host.getRowContext(row, index) : null;
18988
+ if (row === undefined)
18989
+ return false;
18990
+ const cell = this.cellAt(gesture.target);
18991
+ if (cell && !TABLE_OWNED_COLUMNS.has(cell.columnKey))
18992
+ this.host.focusCell(cell.rowIndex, cell.columnKey);
18993
+ const treeRow = this.host.getRenderedTreeRowAt(index);
18994
+ this.rowContextMenu.emit({
18995
+ row,
18996
+ index,
18997
+ event: gesture.source,
18998
+ depth: treeRow?.depth,
18999
+ isLeaf: treeRow?.isLeaf,
19000
+ parentRow: treeRow?.parentRow,
19001
+ });
19002
+ menu.show(gesture.clientX, gesture.clientY, treeRow ? { ...treeRow, row } : row);
19003
+ return true;
19004
+ }
19005
+ openBoundHeaderMenu(menu, gesture) {
19006
+ if (this.contextMenuRowsOnly())
19007
+ return false;
19008
+ const header = gesture.target.closest(HEADER_SELECTOR);
19009
+ if (!header)
19010
+ return false;
19011
+ const column = { id: header.dataset['columnId'] ?? null, name: header.textContent?.trim() ?? '', element: header };
19012
+ this.headerContextMenu.emit({ column, event: gesture.source });
19013
+ menu.show(gesture.clientX, gesture.clientY, column);
19014
+ return true;
19015
+ }
19016
+ /** The data cell under a target, or null when it is in no indexed row or no cell. */
19017
+ cellAt(target) {
19018
+ const element = target instanceof Element ? target : null;
19019
+ const rowEl = element?.closest(ROW_SELECTOR);
19020
+ const columnKey = element?.closest('[data-column]')?.dataset['column'];
19021
+ if (!rowEl || !columnKey)
19022
+ return null;
19023
+ const rowIndex = rowIndexOf(rowEl);
19024
+ return Number.isNaN(rowIndex) ? null : { rowIndex, columnKey };
18571
19025
  }
18572
19026
  openRowMenuFromButton(event, context) {
18573
19027
  const rect = buttonRect(event.target);
@@ -18635,7 +19089,7 @@ class DataTableContextMenuDirective {
18635
19089
  return items;
18636
19090
  }
18637
19091
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DataTableContextMenuDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
18638
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: DataTableContextMenuDirective, isStandalone: true, selector: "[uiDtContextMenu]", inputs: { rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, enableColumnMenu: { classPropertyName: "enableColumnMenu", publicName: "enableColumnMenu", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rowMenuOpen: "rowMenuOpen", columnMenuOpen: "columnMenuOpen" }, ngImport: i0 }); }
19092
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: DataTableContextMenuDirective, isStandalone: true, selector: "[uiDtContextMenu]", inputs: { rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, enableColumnMenu: { classPropertyName: "enableColumnMenu", publicName: "enableColumnMenu", isSignal: true, isRequired: false, transformFunction: null }, contextMenu: { classPropertyName: "contextMenu", publicName: "contextMenu", isSignal: true, isRequired: false, transformFunction: null }, contextMenuDisabled: { classPropertyName: "contextMenuDisabled", publicName: "contextMenuDisabled", isSignal: true, isRequired: false, transformFunction: null }, contextMenuRowsOnly: { classPropertyName: "contextMenuRowsOnly", publicName: "contextMenuRowsOnly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rowMenuOpen: "rowMenuOpen", columnMenuOpen: "columnMenuOpen", rowContextMenu: "rowContextMenu", headerContextMenu: "headerContextMenu" }, ngImport: i0 }); }
18639
19093
  }
18640
19094
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DataTableContextMenuDirective, decorators: [{
18641
19095
  type: Directive,
@@ -18643,10 +19097,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
18643
19097
  selector: '[uiDtContextMenu]',
18644
19098
  standalone: true,
18645
19099
  }]
18646
- }], ctorParameters: () => [], propDecorators: { rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], enableColumnMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableColumnMenu", required: false }] }], rowMenuOpen: [{ type: i0.Output, args: ["rowMenuOpen"] }], columnMenuOpen: [{ type: i0.Output, args: ["columnMenuOpen"] }] } });
19100
+ }], ctorParameters: () => [], propDecorators: { rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], enableColumnMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableColumnMenu", required: false }] }], contextMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextMenu", required: false }] }], contextMenuDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextMenuDisabled", required: false }] }], contextMenuRowsOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextMenuRowsOnly", required: false }] }], rowMenuOpen: [{ type: i0.Output, args: ["rowMenuOpen"] }], columnMenuOpen: [{ type: i0.Output, args: ["columnMenuOpen"] }], rowContextMenu: [{ type: i0.Output, args: ["rowContextMenu"] }], headerContextMenu: [{ type: i0.Output, args: ["headerContextMenu"] }] } });
19101
+ /** The rendered index a row element carries (NaN when it carries none). */
19102
+ function rowIndexOf(rowEl) {
19103
+ return Number.parseInt(rowEl.dataset['rowIndex'] ?? '', 10);
19104
+ }
18647
19105
  /** The bounding rect of the button nearest an event target, if any. */
18648
19106
  function buttonRect(target) {
18649
- const button = target?.closest('button');
19107
+ const button = target instanceof Element ? target.closest('button') : null;
18650
19108
  return button?.getBoundingClientRect();
18651
19109
  }
18652
19110
 
@@ -19131,5 +19589,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
19131
19589
  * Generated bundle index. Do not edit.
19132
19590
  */
19133
19591
 
19134
- 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, restoreSpreadsheetText, toEditedDateValue, toLocalDateString };
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 };
19135
19593
  //# sourceMappingURL=gilav21-shadcn-angular-data-table.mjs.map