@gilav21/shadcn-angular-data-table 0.3.5 → 0.3.6

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.
@@ -9777,6 +9777,18 @@ const DEFAULT_GET_ROW_ID = (row) => {
9777
9777
  return contentRowId(row);
9778
9778
  return stringifyValue(id);
9779
9779
  };
9780
+ /**
9781
+ * What the inline text or number field shows for a cell value: the string form of a string, number, boolean or bigint,
9782
+ * a Date as `Date.toString()`, an array as its items joined by commas, and nothing for null, undefined or anything else
9783
+ * (an object has no text to edit).
9784
+ */
9785
+ function editorTextFor(value) {
9786
+ if (isScalarOptionValue(value))
9787
+ return String(value);
9788
+ if (Array.isArray(value))
9789
+ return value.map((item) => (isScalarOptionValue(item) ? String(item) : '')).join(',');
9790
+ return value instanceof Date ? value.toString() : '';
9791
+ }
9780
9792
  /** A select option's value that has a string form to match against (data from JSON stores 1 as '1'). */
9781
9793
  function isScalarOptionValue(value) {
9782
9794
  return ['string', 'number', 'boolean', 'bigint'].includes(typeof value);
@@ -10451,9 +10463,14 @@ class DataTableComponent {
10451
10463
  this.editingCell = signal(null, ...(ngDevMode ? [{ debugName: "editingCell" }] : /* istanbul ignore next */ []));
10452
10464
  this.editValue = signal(null, ...(ngDevMode ? [{ debugName: "editValue" }] : /* istanbul ignore next */ []));
10453
10465
  /**
10454
- * The text a number input shows: what it started with, then the text of each valid keystroke. The input is bound
10455
- * to this, not to {@link editValue}: typing "-0" parses to -0, and writing that back would turn the field into
10456
- * "0" and lose the minus sign. It stays in step with {@link editValue}, so a re-created input shows what commits.
10466
+ * The text the number or text input shows: what it started with ({@link editorTextFor}), then the text of each
10467
+ * keystroke that is a value. The input is bound to this, not to {@link editValue}: typing "-0" parses to -0, and
10468
+ * writing that back would turn the field into "0" and lose the minus sign. It stays in step with
10469
+ * {@link editValue}, so a re-created input shows what commits.
10470
+ * The binding is the input's `value` ATTRIBUTE (its default text), never its `value` property: a property write
10471
+ * from a render that lags a keystroke replaces the field's live text ("1." becomes "1", the caret jumps to the
10472
+ * start and the next keys land in front), while a field the user has typed in ignores a changed default. The one
10473
+ * place the model changes behind the field's back is re-opening the cell being edited: {@link resetEditField}.
10457
10474
  */
10458
10475
  this.editText = signal('', ...(ngDevMode ? [{ debugName: "editText" }] : /* istanbul ignore next */ []));
10459
10476
  this.cellEditError = signal(null, ...(ngDevMode ? [{ debugName: "cellEditError" }] : /* istanbul ignore next */ []));
@@ -13674,6 +13691,9 @@ class DataTableComponent {
13674
13691
  if (isGridColumnKey(key))
13675
13692
  return;
13676
13693
  event.stopPropagation();
13694
+ // Inside an open text field a double-click selects a word: opening the cell again would throw the typed text away.
13695
+ if (this.isEditing(rowIndex, key) && this.openEditInput() !== null)
13696
+ return;
13677
13697
  this.startEditing(rowIndex, key);
13678
13698
  }
13679
13699
  /**
@@ -13685,6 +13705,14 @@ class DataTableComponent {
13685
13705
  const key = String(col.accessorKey);
13686
13706
  if (isGridColumnKey(key))
13687
13707
  return;
13708
+ // Taps inside an open text field place the caret or select a word; they are not a request to open the cell again,
13709
+ // and they must not pair with a tap made before it opened.
13710
+ if (this.isEditing(rowIndex, key) && this.openEditInput() !== null) {
13711
+ this._lastTapTime = 0;
13712
+ this._lastTapRowIndex = -1;
13713
+ this._lastTapColumnKey = "";
13714
+ return;
13715
+ }
13688
13716
  const now = Date.now();
13689
13717
  const isSameCell = this._lastTapRowIndex === rowIndex && this._lastTapColumnKey === key;
13690
13718
  if (isSameCell && now - this._lastTapTime < this.DOUBLE_TAP_MAX_DELAY) {
@@ -13983,13 +14011,30 @@ class DataTableComponent {
13983
14011
  if (this.isDisabled(row))
13984
14012
  return;
13985
14013
  const currentValue = this.getCellValue(row, col.accessorKey, col);
14014
+ const seededText = editorTextFor(currentValue);
13986
14015
  this.cellEditError.set(null);
13987
14016
  this.editValue.set(currentValue);
13988
- this.editText.set(typeof currentValue === 'number' || typeof currentValue === 'string' ? String(currentValue) : '');
14017
+ this.editText.set(seededText);
14018
+ this.resetEditField(seededText);
13989
14019
  this.editingRowId = this.getRowId()(row);
13990
14020
  this.editingCell.set({ rowIndex, columnKey });
13991
14021
  this.focusEditInput();
13992
14022
  }
14023
+ /**
14024
+ * Puts the seeded text into the mounted edit field. The field is bound through its `value` attribute, which a field
14025
+ * the user has typed in ignores, so a re-open (including a cancel followed at once by one, before a render drops the
14026
+ * field) must write it by hand or Enter would commit text the user no longer sees. It also clears a half-typed number.
14027
+ * A field of another cell is removed by the next render, so the write is never seen.
14028
+ */
14029
+ resetEditField(text) {
14030
+ const field = this.openEditInput();
14031
+ if (field !== null)
14032
+ field.value = text;
14033
+ }
14034
+ /** The text or number field of the open inline editor; only one editor is ever open. */
14035
+ openEditInput() {
14036
+ return this._el.nativeElement.querySelector('input[data-edit-input]');
14037
+ }
13993
14038
  focusEditInput() {
13994
14039
  requestAnimationFrame(() => {
13995
14040
  const container = this._el.nativeElement;
@@ -14230,6 +14275,7 @@ class DataTableComponent {
14230
14275
  this.editingCell.set(null);
14231
14276
  this.editingRowId = undefined;
14232
14277
  this.editValue.set(null);
14278
+ this.editText.set('');
14233
14279
  this.cellEditError.set(null);
14234
14280
  }
14235
14281
  /** Returns the inline validation message for a cell, or `null` if valid. */
@@ -14254,8 +14300,7 @@ class DataTableComponent {
14254
14300
  * that knows, and it stays right if the input is re-created while the editor is open.
14255
14301
  */
14256
14302
  editorHoldsPartialNumber() {
14257
- const input = this._el.nativeElement.querySelector('input[data-edit-input]');
14258
- return input?.validity.badInput ?? false;
14303
+ return this.openEditInput()?.validity.badInput ?? false;
14259
14304
  }
14260
14305
  /**
14261
14306
  * Stores what a text or number editor holds: a number (null when cleared) for `editType: 'number'`, else the
@@ -14266,6 +14311,7 @@ class DataTableComponent {
14266
14311
  */
14267
14312
  onEditInput(input, col) {
14268
14313
  if (col.editType !== 'number') {
14314
+ this.editText.set(input.value);
14269
14315
  this.onEditValueChange(input.value);
14270
14316
  return;
14271
14317
  }
@@ -15594,7 +15640,7 @@ class DataTableComponent {
15594
15640
  ComponentPoolService,
15595
15641
  provideComponentLocale(() => DataTableComponent),
15596
15642
  { provide: DataTableAddonHost, useExisting: forwardRef(() => DataTableComponent) },
15597
- ], viewQueries: [{ propertyName: "scrollContainerRef", first: true, predicate: ["scrollContainer"], descendants: true, isSignal: true }, { propertyName: "virtualRowElements", predicate: ["virtualRow"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "resizeHandles", predicate: ["resizeHandle"], descendants: true, isSignal: true }], ngImport: i0, template: " <!-- Reusable: cell content rendering (component/template/cell/default) -->\n <ng-template\n #cellContentTpl\n let-col\n let-row=\"row\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.component) {\n <div\n [uiComponentOutlet]=\"col.component\"\n [inputs]=\"\n treeRow\n ? getSubRowComponentInputs(col, treeRow)\n : col.componentInputs\n ? col.componentInputs(row)\n : EMPTY_RECORD\n \"\n [outputs]=\"\n col.componentOutputs ? col.componentOutputs(row) : EMPTY_RECORD\n \"\n [recycle]=\"recycle\"\n ></div>\n } @else if (col.template) {\n @if (treeRow) {\n <ng-container\n *ngTemplateOutlet=\"\n col.template;\n context: {\n $implicit: row,\n depth: treeRow.depth,\n parentRow: treeRow.parentRow,\n parentId: treeRow.parentId,\n path: treeRow.path,\n isLeaf: treeRow.isLeaf,\n childCount: treeRow.childCount,\n }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"col.template; context: { $implicit: row }\"\n ></ng-container>\n }\n } @else {\n @let fmt = getCellFormatting(col, row);\n @if (fmt) {\n <span\n data-slot=\"cell-formatted\"\n class=\"relative flex w-full items-center gap-1.5 {{ fmt.class }}\"\n [style]=\"fmt.style\"\n >\n @if (fmt.dataBar) {\n @if (fmt.dataBar.track; as track) {\n <span\n data-slot=\"cell-data-bar-track\"\n class=\"pointer-events-none absolute inset-x-0 inset-y-0.5 rounded-sm\"\n [style.background-color]=\"track\"\n ></span>\n }\n <span\n data-slot=\"cell-data-bar\"\n class=\"pointer-events-none absolute inset-y-0.5 start-0 rounded-sm\"\n [style.width]=\"fmt.dataBar.width\"\n [style.background-color]=\"fmt.dataBar.color\"\n ></span>\n }\n @if (fmt.icon) {\n @if (fmt.icon.name) {\n <ui-icon\n data-slot=\"cell-icon\"\n [name]=\"fmt.icon.name\"\n size=\"xs\"\n class=\"relative shrink-0 {{ fmt.icon.class }}\"\n />\n } @else if (fmt.icon.glyph) {\n <span data-slot=\"cell-icon\" class=\"relative shrink-0 {{ fmt.icon.class }}\">{{ fmt.icon.glyph }}</span>\n }\n }\n <span class=\"relative min-w-0 truncate\">\n @if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n </span>\n </span>\n } @else if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n }\n </ng-template>\n\n <!-- Reusable: full cell rendering (special columns + content) -->\n <ng-template\n #cellTpl\n let-col\n let-row=\"row\"\n let-rowIndex=\"rowIndex\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isRowSelected(row)\"\n [disabled]=\"isDisabled(row)\"\n [indeterminate]=\"\n treeRow ? isSubRowSelectionIndeterminate(row) : false\n \"\n (checkedChange)=\"treeRow ? toggleRowWithCascade(row) : toggleRow(row)\"\n ariaLabel=\"Select row\"\n />\n } @else if (col._isTreeExpanderHost && treeRow) {\n <div\n class=\"flex items-center gap-1 min-w-0\"\n [style.padding-inline-start.px]=\"treeRow.depth * subRowIndentSize()\"\n >\n @if (!treeRow.isLeaf) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n treeRow.isExpanded ? 'Collapse sub-rows' : 'Expand sub-rows'\n \"\n (click)=\"toggleSubRowExpanded(treeRow.row, $event)\"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"treeRow.isExpanded && !isRtl()\"\n [class.-rotate-90]=\"treeRow.isExpanded && isRtl()\"\n />\n </button>\n } @else {\n <span class=\"inline-block h-6 w-6 shrink-0\"></span>\n }\n <span class=\"truncate\">\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n </span>\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"isRowExpanded(row) ? 'Collapse row' : 'Expand row'\"\n [attr.aria-expanded]=\"isRowExpanded(row)\"\n (click)=\"toggleRowExpanded(row, $event)\"\n >\n @if (isRowExpanded(row)) {\n <ui-icon name=\"chevron-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevron-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n @if (!isDisabled(row)) {\n @for (slot of cellActionSlots(); track slot.id) {\n <ui-button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-8 w-8 pointer-coarse:size-11\"\n [ariaLabel]=\"slot.ariaLabel ?? 'Row actions'\"\n (click)=\"slot.onClick($event, getRowContext(row, rowIndex))\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"sm\" />\n </ui-button>\n }\n }\n } @else if (\n col.editable && isEditing(rowIndex, String(col.accessorKey))\n ) {\n <ng-container\n *ngTemplateOutlet=\"\n cellEditTpl;\n context: { $implicit: col, row: row, rowIndex: rowIndex }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n }\n </ng-template>\n\n <!-- Reusable: cell edit mode -->\n <ng-template #cellEditTpl let-col let-row=\"row\" let-rowIndex=\"rowIndex\">\n @let editErr = editErrorFor(rowIndex, col);\n @if (col.editComponent) {\n <div\n [uiComponentOutlet]=\"col.editComponent\"\n [inputs]=\"{ value: editValue(), row: row, column: col }\"\n [outputs]=\"{\n valueChange: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\"\n ></div>\n } @else if (col.editTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.editTemplate;\n context: {\n $implicit: editValue(),\n row: row,\n column: col,\n setValue: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\n \"\n ></ng-container>\n } @else if (col.editType === \"checkbox\") {\n <ui-checkbox\n [checked]=\"!!editValue()\"\n [ariaInvalid]=\"editErr ? true : undefined\"\n [ariaDescribedby]=\"editErr ? cellEditErrorId : undefined\"\n (checkedChange)=\"onEditValueChange($event); commitEdit()\"\n />\n } @else if (col.editType === \"date\") {\n <ui-date-picker\n class=\"w-full\"\n [date]=\"editDateValue()\"\n (dateChange)=\"onEditDateChange($event)\"\n />\n } @else if (col.editType === \"select\" && col.editOptions) {\n <select\n data-edit-input\n class=\"w-full h-full bg-background border-0 outline-none text-sm px-1\"\n [class.ring-1]=\"editErr\"\n [class.ring-inset]=\"editErr\"\n [class.ring-destructive]=\"editErr\"\n [attr.aria-invalid]=\"editErr ? true : null\"\n [attr.aria-describedby]=\"editErr ? cellEditErrorId : null\"\n (change)=\"onEditSelect($any($event.target), col)\"\n (keydown)=\"onEditKeydown($event)\"\n >\n @let chosen = editOptionIndex(col);\n @if (chosen === -1) {\n <option value=\"\" selected disabled hidden></option>\n }\n @for (opt of col.editOptions; track $index; let i = $index) {\n <option [value]=\"i\" [selected]=\"i === chosen\">{{ opt.label }}</option>\n }\n </select>\n } @else {\n <input\n data-edit-input\n [type]=\"col.editType === 'number' ? 'number' : 'text'\"\n class=\"w-full h-full bg-background border-0 outline-none text-sm px-1 select-text\"\n [class.ring-1]=\"editErr\"\n [class.ring-inset]=\"editErr\"\n [class.ring-destructive]=\"editErr\"\n [attr.aria-invalid]=\"editErr ? true : null\"\n [attr.aria-describedby]=\"editErr ? cellEditErrorId : null\"\n [value]=\"col.editType === 'number' ? editText() : editValue()\"\n (input)=\"onEditInput($any($event.target), col)\"\n (keydown)=\"onEditKeydown($event)\"\n (blur)=\"editingCell() ? commitEdit() : null\"\n />\n }\n @if (editErr) {\n <p\n [id]=\"cellEditErrorId\"\n class=\"mt-0.5 px-1 text-xs text-destructive\"\n role=\"alert\"\n data-slot=\"cell-edit-error\"\n >\n {{ editErr }}\n </p>\n }\n </ng-template>\n\n <!-- Reusable: row detail/expansion panel -->\n <ng-template #rowDetailTpl let-row>\n @if (rowDetailTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTemplate();\n context: { $implicit: row, row: row }\n \"\n ></ng-container>\n } @else if (rowDetailComponent()) {\n <div\n [uiComponentOutlet]=\"rowDetailComponent()!\"\n [inputs]=\"getRowDetailComponentInputs(row)\"\n ></div>\n } @else {\n <pre class=\"text-xs text-muted-foreground whitespace-pre-wrap\">{{\n row | json\n }}</pre>\n }\n </ng-template>\n\n <!-- Reusable: empty state -->\n <ng-template #emptyStateTpl>\n <ui-table-row class=\"hover:bg-transparent justify-center w-full\">\n <ui-table-cell\n class=\"h-48 sm:h-96 text-center w-full p-0 border-none justify-center\"\n >\n @if (emptyStateComponent()) {\n <ng-container\n [uiComponentOutlet]=\"emptyStateComponent()!\"\n [inputs]=\"emptyStateComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex h-full flex-col items-center justify-center py-10 text-center text-muted-foreground w-full\"\n >\n <ui-icon name=\"circle-off\" size=\"xl\" class=\"mb-4 opacity-20\" />\n <p>{{ noResultsLabel() }}</p>\n </div>\n }\n </ui-table-cell>\n </ui-table-row>\n </ng-template>\n\n @if (skeleton()) {\n <div class=\"flex flex-col w-full space-y-3\" data-slot=\"data-table-skeleton\">\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n @for (row of skeletonRowsArray(); track $index) {\n <ui-skeleton class=\"h-12 w-full rounded-md\" />\n }\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n </div>\n } @else {\n <!-- `relative`: the sr-only announcer and the sr-only cell labels below are\n position:absolute. Without a positioned ancestor their containing block\n is <html>, so they escape this table's scroll container entirely and\n stretch the document to their static position \u2014 which on a page with a\n virtual-scroll table adds a second, page-length scrollbar. -->\n <div class=\"relative flex flex-col w-full h-full space-y-4\">\n <output\n class=\"sr-only\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n data-slot=\"data-table-announcer\"\n >\n {{ srAnnouncement() }}\n </output>\n @if (showToolbar()) {\n <div class=\"flex flex-wrap items-center justify-between gap-2 flex-none\">\n <div class=\"flex flex-1 flex-wrap items-center gap-2\">\n <ui-input\n [placeholder]=\"filterPlaceholder()\"\n [ngModel]=\"globalFilter()\"\n (ngModelChange)=\"onFilterChange($event)\"\n class=\"h-8 w-full sm:w-[150px] lg:w-[250px]\"\n />\n @if (hasAi() && enableNlFilter()) {\n <div class=\"flex items-center gap-1\" data-slot=\"table-nl-filter\">\n <span aria-hidden=\"true\" class=\"text-sm\">\u2728</span>\n <ui-input\n [placeholder]=\"nlFilterPlaceholder()\"\n [ngModel]=\"aiFilterQuery()\"\n (ngModelChange)=\"aiFilterQuery.set($event)\"\n [disabled]=\"aiFilterRunning()\"\n (keydown.enter)=\"runAiFilter()\"\n class=\"h-8 w-full sm:w-[200px]\"\n />\n </div>\n }\n @if (enableAdvancedFilter()) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n data-slot=\"advanced-filter-trigger\"\n class=\"inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 pointer-coarse:h-11 pointer-coarse:min-w-11 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-icon name=\"filter\" size=\"xs\" />\n <span class=\"hidden sm:inline\">{{ filterBuilderLabels().filterButton }}</span>\n @if (advancedFilterCount() > 0) {\n <span class=\"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-xs text-primary-foreground\">{{ advancedFilterCount() }}</span>\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-[min(420px,calc(100vw-2rem))] p-2\">\n <div class=\"space-y-2\">\n <ui-data-table-filter-builder\n [group]=\"advancedFilterGroup()\"\n [columns]=\"filterBuilderColumns()\"\n [labels]=\"filterBuilderLabels()\"\n (groupChange)=\"onAdvancedFilterChange($event)\"\n />\n @if (advancedFilterCount() > 0) {\n <button\n type=\"button\"\n class=\"text-xs text-muted-foreground hover:text-destructive\"\n (click)=\"clearAdvancedFilter()\"\n >{{ filterBuilderLabels().clearFilters }}</button>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n @if (showColumnVisibilityToggle() && hideableColumns().length > 0) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n class=\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n [attr.aria-label]=\"toggleColumnsLabel()\"\n >\n {{ columnsLabel() }}\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-56 p-2\">\n <div class=\"space-y-1\">\n @for (col of hideableColumns(); track col.accessorKey) {\n <div\n class=\"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-checkbox\n [checked]=\"isColumnVisible(col.accessorKey)\"\n (checkedChange)=\"\n setColumnVisibility(col.accessorKey, $event)\n \"\n [ariaLabel]=\"toggleColumnAriaLabel(col.header)\"\n />\n <span>{{ col.header }}</span>\n </div>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n\n <div\n #scrollContainer\n class=\"rounded-md border relative flex-1 min-h-0 overflow-auto w-full\"\n [class.contain-strict]=\"isVirtualScrollActive()\"\n [class.will-change-scroll]=\"isVirtualScrollActive()\"\n [class.select-none]=\"enableCellRangeSelection()\"\n (keydown)=\"onTableKeydown($event)\"\n (click)=\"onTableClick()\"\n (mousedown)=\"onTableMouseDown($event)\"\n (scroll)=\"isVirtualScrollActive() ? onVirtualScroll($event) : null\"\n (dragover)=\"onContainerDragOver($event)\"\n (drop)=\"onRowDrop($event)\"\n tabindex=\"0\"\n >\n @if (isLoaderVisible()) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n @if (loaderTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n loaderTemplate();\n context: {\n $implicit: loadingTrigger(),\n trigger: loadingTrigger(),\n }\n \"\n ></ng-container>\n } @else if (loaderComponent()) {\n <ng-container\n [uiComponentOutlet]=\"loaderComponent()!\"\n [inputs]=\"resolvedLoaderComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>Loading...</span>\n </div>\n }\n </div>\n }\n @if (busyLabel(); as label) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>{{ label }}</span>\n </div>\n </div>\n }\n <!-- #scrollContainer scrolls both axes. If ui-table kept its own\n overflow-x box (which forces overflow-y to auto too), the sticky\n header would stick inside it and scroll away, and its horizontal\n scrollbar would sit under the last row. -->\n <ui-table\n class=\"overflow-visible\"\n [role]=\"enableSubRows() || groupingActive() ? 'treegrid' : 'grid'\"\n >\n <ui-table-header class=\"bg-background\">\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [class]=\"getHeaderClass(col)\"\n class=\"group/head\"\n [class.cursor-grab]=\"isColumnDraggable(col)\"\n [class.cursor-grabbing]=\"isDraggingColumn(col)\"\n [class.opacity-70]=\"isDraggingColumn(col)\"\n [class.relative]=\"isDropTargetColumn(col)\"\n [attr.data-column-id]=\"String(col.accessorKey)\"\n [attr.aria-sort]=\"getAriaSort(col)\"\n [attr.draggable]=\"isColumnDraggable(col) ? 'true' : null\"\n [style]=\"getHeaderCellStyle(col)\"\n (dragstart)=\"onColumnDragStart($event, col)\"\n (dragover)=\"onColumnDragOver($event, col)\"\n (drop)=\"onColumnDrop($event, col)\"\n (dragend)=\"onColumnDragEnd()\"\n >\n @if (isDropTargetColumn(col)) {\n <div\n class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/70 bg-primary/10\"\n ></div>\n }\n <div class=\"flex items-center w-full h-full\">\n <div class=\"flex-1 min-w-0\">\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isIndeterminate()\"\n (checkedChange)=\"toggleAll()\"\n ariaLabel=\"Select all\"\n />\n } @else if (col._isTreeExpanderHost) {\n <!-- gap-2 offsets the sort button's -ms-2, which would otherwise pull it over the expand-all button -->\n <div class=\"flex items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllSubRowsExpanded()\n ? 'Collapse all sub-rows'\n : 'Expand all sub-rows'\n \"\n (click)=\"\n isAllSubRowsExpanded()\n ? collapseAllSubRows()\n : expandAllSubRows(-1)\n \"\n >\n @if (isAllSubRowsExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n @if (col.enableSorting !== false) {\n <ui-data-table-column-header\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n } @else {\n <span>{{ col.header }}</span>\n }\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllExpanded()\n ? 'Collapse all rows'\n : 'Expand all rows'\n \"\n (click)=\"toggleAllExpanded()\"\n >\n @if (isAllExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n <span class=\"sr-only\">Actions</span>\n } @else if (col.headerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.headerTemplate;\n context: { $implicit: col }\n \"\n ></ng-container>\n } @else if (col.enableSorting !== false) {\n <div class=\"flex items-center gap-2\">\n <!-- min-w-0: a narrow column truncates its title instead of sliding it under the filter and menu buttons -->\n <ui-data-table-column-header\n class=\"min-w-0\"\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover [closeOnScroll]=\"true\">\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n } @else {\n <div class=\"flex items-center gap-2\">\n <span>{{ col.header }}</span>\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n </div>\n @if (\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @for (slot of headerActionSlots(); track slot.id) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md opacity-0 group-hover/head:opacity-100 touch-visible pointer-coarse:size-11 hover:bg-accent hover:text-accent-foreground transition-opacity\"\n [attr.aria-label]=\"'Column menu for ' + col.header\"\n (click)=\"slot.onClick($event, col)\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"xs\" />\n </button>\n }\n }\n </div>\n @if (\n enableColumnResize() &&\n col.accessorKey !== \"_selection\"\n ) {\n <div\n #resizeHandle\n class=\"group/resize absolute top-0 w-4 h-full cursor-col-resize touch-none z-40 select-none\"\n [class.right-0]=\"!isRtl()\"\n [class.translate-x-1/2]=\"!isRtl()\"\n [class.left-0]=\"isRtl()\"\n [class.-translate-x-1/2]=\"isRtl()\"\n (mousedown)=\"onResizeStart($event, col)\"\n (touchstart)=\"onResizeTouchStart($event, col)\"\n (dblclick)=\"onResizeDoubleClick($event, col)\"\n role=\"separator\"\n [attr.aria-label]=\"'Resize ' + col.header + ' column (double-click or double-tap to auto-fit)'\"\n >\n <div\n [class]=\"resizeLineClass(col)\"\n aria-hidden=\"true\"\n ></div>\n </div>\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none\"\n [class]=\"getHeaderClass({ _width: 'auto' })\"\n ></ui-table-head>\n }\n </ui-table-row>\n @if (enableFloatingFilters() && hasAnyFloatingFilter()) {\n <ui-table-row class=\"border-0\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [role]=\"hasFloatingFilter(col) ? 'columnheader' : 'presentation'\"\n [style]=\"getHeaderCellStyle(col)\"\n class=\"sticky top-[var(--header-height,41px)] z-20 bg-muted/50 py-1 px-1 overflow-hidden pointer-coarse:h-auto\"\n >\n @if (\n col.floatingFilter !== false &&\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @if (col.floatingFilterComponent) {\n <div\n [uiComponentOutlet]=\"col.floatingFilterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n } @else if (col.floatingFilterTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.floatingFilterTemplate;\n context: {\n $implicit: col,\n value: columnFilters()[String(col.accessorKey)],\n change: getFloatingFilterChange(col),\n }\n \"\n ></ng-container>\n } @else if (col.enableFiltering) {\n <ui-input\n class=\"h-7 text-xs\"\n [placeholder]=\"col.header\"\n [ngModel]=\"\n columnFilters()[String(col.accessorKey)] || ''\n \"\n (ngModelChange)=\"\n onColumnFilterChange(col.accessorKey, $event)\n \"\n />\n }\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none sticky top-[var(--header-height,41px)] z-20 bg-muted/50\"\n ></ui-table-head>\n }\n </ui-table-row>\n }\n </ui-table-header>\n <ui-table-body>\n @if (isVirtualScrollActive()) {\n <div\n [style.height.px]=\"virtualPaddingTop()\"\n class=\"flex-shrink-0\"\n ></div>\n @if (enableSubRows()) {\n @for (\n treeRow of virtualVisibleTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [selected]=\"isRowSelected(treeRow.row)\"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"\n treeRow.isLeaf ? null : treeRow.isExpanded\n \"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0\"\n >\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n }\n } @else {\n @for (\n row of virtualVisibleRows();\n track getRowId()(row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, getVirtualRowIndex(i))\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(getVirtualRowIndex(i))) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n @if (virtualTotalRows() === 0) {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <div\n [style.height.px]=\"virtualPaddingBottom()\"\n class=\"flex-shrink-0\"\n ></div>\n } @else if (enableSubRows()) {\n @if (processedTreeRows().length > 0) {\n @for (\n treeRow of processedTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n [selected]=\"isRowSelected(treeRow.row)\"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [class.opacity-30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-2]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-inset]=\"isRowBeingDragged(treeRow.row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(treeRow.row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"treeRow.isLeaf ? null : treeRow.isExpanded\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(treeRow.row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, treeRow.row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(i)) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, i, treeRow.depth)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"onCellClick(i, col, $event)\"\n (keydown.enter)=\"onCellClick(i, col, $event)\"\n (keydown.space)=\"onCellClick(i, col, $event)\"\n (dblclick)=\"onCellDblClick(i, col, $event)\"\n (touchend)=\"onCellTouchEnd($event, i, col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: i,\n treeRow: treeRow,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(treeRow.row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: treeRow.row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (groupingActive()) {\n @if (pagedGroupedDisplayRows().length > 0) {\n @for (\n displayRow of pagedGroupedDisplayRows();\n track groupTrackBy(displayRow)\n ) {\n @if (isGroupRow(displayRow)) {\n <ui-table-row\n class=\"border-0 bg-muted/40 cursor-pointer select-none\"\n data-slot=\"table-group-row\"\n [attr.data-group-key]=\"displayRow.groupKey\"\n [attr.aria-expanded]=\"!displayRow.collapsed\"\n (click)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.enter)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.space)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n >\n <ui-table-cell\n class=\"flex-1 border-b font-medium\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <div class=\"flex flex-wrap items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n displayRow.collapsed ? 'Expand group' : 'Collapse group'\n \"\n (click)=\"\n $event.stopPropagation();\n toggleGroupCollapsed(displayRow.groupKey)\n \"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"!displayRow.collapsed && !isRtl()\"\n [class.-rotate-90]=\"!displayRow.collapsed && isRtl()\"\n />\n </button>\n <span class=\"truncate\">{{ groupRowValueLabel(displayRow) }}</span>\n <span class=\"text-xs text-muted-foreground\">({{ displayRow.count }})</span>\n @if (groupAggregates()) {\n @for (entry of displayRow.aggregates | keyvalue: keepGroupAggregateOrder; track entry.key) {\n <span class=\"text-xs text-muted-foreground\">\n {{ groupAggregateLabel(entry.key) }}: {{ entry.value }}\n </span>\n }\n }\n </div>\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [selected]=\"isRowSelected(displayRow.row)\"\n [attr.data-disabled]=\"isDisabled(displayRow.row) || null\"\n [class.opacity-50]=\"isDisabled(displayRow.row)\"\n [attr.data-row-index]=\"displayRow.index\"\n [attr.data-row-id]=\"getRowId()(displayRow.row)\"\n data-slot=\"table-group-data-row\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, displayRow.index)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: displayRow.row,\n rowIndex: displayRow.index,\n treeRow: null,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (processedData().length > 0) {\n @for (\n row of (dragPreviewData() ?? processedData());\n track getRowId()(row);\n let i = $index\n ) {\n @if (isFullWidthRow(row)) {\n <ui-table-row\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n class=\"border-0\"\n >\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n @if (fullWidthRowTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n fullWidthRowTemplate();\n context: { $implicit: row, index: i }\n \"\n ></ng-container>\n } @else if (fullWidthRowComponent()) {\n <div\n [uiComponentOutlet]=\"fullWidthRowComponent()!\"\n [inputs]=\"{ row: row, index: i }\"\n ></div>\n }\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [class.ring-2]=\"isRowBeingDragged(row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(row)\"\n [class.ring-inset]=\"isRowBeingDragged(row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell [class]=\"getCellClass(col, i)\" [attr.data-column]=\"String(col.accessorKey)\" [style]=\"getCellStyle(col)\" (click)=\"onCellClick(i, col, $event)\" (keydown.enter)=\"onCellClick(i, col, $event)\" (keydown.space)=\"onCellClick(i, col, $event)\" (dblclick)=\"onCellDblClick(i, col, $event)\" (touchend)=\"onCellTouchEnd($event, i, col)\">\n <ng-container *ngTemplateOutlet=\"cellTpl; context: { $implicit: col, row: row, rowIndex: i, treeRow: null, recycle: false }\"></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell class=\"flex-1 pointer-events-none\" [class]=\"getCellClass({ _width: 'auto' })\"></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell class=\"flex-1 border-b\" style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\">\n <ng-container *ngTemplateOutlet=\"rowDetailTpl; context: { $implicit: row }\"></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <!-- A spacer that stretches the body to fill the container. It holds\n no data and cannot be reached, so it is hidden from assistive\n tech rather than counted as a row of the grid. -->\n <ui-table-row class=\"h-full\" aria-hidden=\"true\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col)\"\n [style]=\"getCellStyle(col)\"\n class=\"bg-background border-0 p-0\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </ui-table-body>\n @if (hasFooter()) {\n <div\n class=\"sticky bottom-0 z-20 bg-background border-t\"\n data-slot=\"table-footer\"\n >\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [style]=\"getCellStyle(col)\"\n class=\"whitespace-nowrap overflow-hidden text-ellipsis text-sm font-medium text-muted-foreground\"\n >\n @if (col.footerComponent) {\n <div\n [uiComponentOutlet]=\"col.footerComponent\"\n [inputs]=\"{\n column: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\"\n ></div>\n } @else if (col.footerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.footerTemplate;\n context: {\n $implicit: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\n \"\n ></ng-container>\n } @else {\n {{ footerValues().get(String(col.accessorKey)) || \"\" }}\n }\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </div>\n }\n </ui-table>\n\n @if (enableFillHandle() && fillHandlePosition(); as pos) {\n <span\n data-slot=\"fill-handle\"\n class=\"absolute z-20 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 cursor-crosshair rounded-[2px] border border-background bg-primary\"\n style=\"touch-action: none;\"\n aria-hidden=\"true\"\n [style.top.px]=\"pos.top\"\n [style.left.px]=\"pos.left\"\n (mousedown)=\"onFillHandleStart($event)\"\n (touchstart)=\"onFillHandleStart($event)\"\n ></span>\n }\n\n @if (enableRangeActions() && rangeSelectionStats(); as stats) {\n <div\n data-slot=\"range-actions\"\n class=\"sticky bottom-0 z-20 flex max-w-[calc(100vw-2rem)] flex-wrap items-center gap-x-4 gap-y-1 border-t bg-background/95 px-3 py-1.5 text-xs backdrop-blur-sm\"\n >\n <span class=\"text-muted-foreground\">{{ rangeLabels().count }}: <span class=\"text-foreground font-medium\">{{ stats.count }}</span></span>\n @if (stats.numericCount > 0) {\n <span class=\"text-muted-foreground\">{{ rangeLabels().sum }}: <span class=\"text-foreground font-medium\">{{ stats.sum }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().avg }}: <span class=\"text-foreground font-medium\">{{ stats.avg }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().min }}: <span class=\"text-foreground font-medium\">{{ stats.min }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().max }}: <span class=\"text-foreground font-medium\">{{ stats.max }}</span></span>\n @if (rangeChartPayload()) {\n <ui-button\n size=\"sm\"\n variant=\"outline\"\n class=\"ms-auto h-6 px-2 pointer-coarse:h-11\"\n [ariaLabel]=\"rangeLabels().chart\"\n (click)=\"openRangeChart()\"\n >\n <ui-icon name=\"bar-chart-3\" size=\"xs\" class=\"me-1\" />{{ rangeLabels().chart }}\n </ui-button>\n }\n }\n </div>\n }\n </div>\n\n @if (showPagination()) {\n <ui-data-table-pagination\n class=\"flex-none\"\n [total]=\"activeTotalItems()\"\n [state]=\"paginationState()\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [showPageSizeSelector]=\"showPageSizeSelector()\"\n [rowsPerPageLabel]=\"rowsPerPageLabel()\"\n [pageLabel]=\"pageLabel()\"\n [ofLabel]=\"ofLabel()\"\n (paginationChange)=\"onPaginationChange($event)\"\n />\n }\n </div>\n } <!-- end @else skeleton -->\n", styles: [":host([data-ui-theme=\"neutral\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=neutral]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"zinc\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=zinc]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"slate\"]){--primary: oklch(.208 .042 265.755);--primary-foreground: oklch(.984 .003 247.858);--ring: oklch(.704 .04 256.788)}:host-context(.dark)[data-ui-theme=slate]{--primary: oklch(.929 .013 255.508);--primary-foreground: oklch(.208 .042 265.755);--ring: oklch(.704 .04 256.788)}:host([data-ui-theme=\"stone\"]){--primary: oklch(.216 .006 56.043);--primary-foreground: oklch(.985 .001 106.423);--ring: oklch(.709 .01 56.259)}:host-context(.dark)[data-ui-theme=stone]{--primary: oklch(.923 .003 48.717);--primary-foreground: oklch(.216 .006 56.043);--ring: oklch(.553 .013 58.071)}:host([data-ui-theme=\"gray\"]){--primary: oklch(.21 .028 264.532);--primary-foreground: oklch(.985 .002 247.839);--ring: oklch(.707 .022 264.436)}:host-context(.dark)[data-ui-theme=gray]{--primary: oklch(.928 .006 264.531);--primary-foreground: oklch(.21 .028 264.532);--ring: oklch(.551 .027 264.364)}:host([data-ui-theme=\"red\"]){--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host-context(.dark)[data-ui-theme=red]{--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host([data-ui-theme=\"rose\"]){--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host-context(.dark)[data-ui-theme=rose]{--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host([data-ui-theme=\"orange\"]){--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host-context(.dark)[data-ui-theme=orange]{--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host([data-ui-theme=\"green\"]){--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host-context(.dark)[data-ui-theme=green]{--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host([data-ui-theme=\"blue\"]){--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host-context(.dark)[data-ui-theme=blue]{--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host([data-ui-theme=\"yellow\"]){--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host-context(.dark)[data-ui-theme=yellow]{--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host([data-ui-theme=\"violet\"]){--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host-context(.dark)[data-ui-theme=violet]{--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host([data-ui-theme=\"amber\"]){--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}:host-context(.dark)[data-ui-theme=amber]{--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}@layer components{@media(hover:hover){[data-slot=table-row]:hover>.pinned-cell{background-image:linear-gradient(color-mix(in oklab,var(--muted) 50%,transparent),color-mix(in oklab,var(--muted) 50%,transparent))}}[data-slot=table-row][data-state=selected]>.pinned-cell{background-image:linear-gradient(var(--muted),var(--muted))}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TableComponent, selector: "ui-table", inputs: ["class", "role"] }, { kind: "component", type: TableHeaderComponent, selector: "ui-table-header", inputs: ["class"] }, { kind: "component", type: TableBodyComponent, selector: "ui-table-body", inputs: ["class", "skeleton", "skeletonRows"] }, { kind: "component", type: TableRowComponent, selector: "ui-table-row", inputs: ["class", "selected"] }, { kind: "component", type: TableHeadComponent, selector: "ui-table-head", inputs: ["class", "role"] }, { kind: "component", type: TableCellComponent, selector: "ui-table-cell", inputs: ["class"] }, { kind: "component", type: InputComponent, selector: "ui-input", inputs: ["type", "placeholder", "disabled", "class", "elementId", "name", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "variant", "loading", "skeleton", "autofocus", "clearable", "floating", "label", "labelClass", "inputMode", "lang", "prefix", "suffix", "value"], outputs: ["valueChange"] }, { kind: "component", type: CheckboxComponent, selector: "ui-checkbox", inputs: ["disabled", "class", "skeleton", "elementId", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "ariaInvalid", "checked", "indeterminate", "label"], outputs: ["checkedChange"] }, { kind: "component", type: DatePickerComponent, selector: "ui-date-picker", inputs: ["class", "placeholder", "disabled", "showTime", "locale", "date"], outputs: ["dateChange"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: DataTableColumnHeaderComponent, selector: "ui-data-table-column-header", inputs: ["title", "column", "direction", "enableSorting", "class", "sortIndex"], outputs: ["sort", "sortMeta"] }, { kind: "component", type: DataTablePaginationComponent, selector: "ui-data-table-pagination", inputs: ["class", "total", "state", "pageSizeOptions", "showPageSizeSelector", "rowsPerPageLabel", "pageLabel", "ofLabel"], outputs: ["paginationChange"] }, { kind: "component", type: DataTableFilterBuilderComponent, selector: "ui-data-table-filter-builder", inputs: ["class", "group", "columns", "labels"], outputs: ["groupChange"] }, { kind: "directive", type: UiComponentOutletDirective, selector: "[uiComponentOutlet]", inputs: ["uiComponentOutlet", "inputs", "outputs", "recycle"], outputs: ["initialized"] }, { kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }, { kind: "pipe", type: i1$1.JsonPipe, name: "json" }, { kind: "pipe", type: i1$1.KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
15643
+ ], viewQueries: [{ propertyName: "scrollContainerRef", first: true, predicate: ["scrollContainer"], descendants: true, isSignal: true }, { propertyName: "virtualRowElements", predicate: ["virtualRow"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "resizeHandles", predicate: ["resizeHandle"], descendants: true, isSignal: true }], ngImport: i0, template: " <!-- Reusable: cell content rendering (component/template/cell/default) -->\n <ng-template\n #cellContentTpl\n let-col\n let-row=\"row\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.component) {\n <div\n [uiComponentOutlet]=\"col.component\"\n [inputs]=\"\n treeRow\n ? getSubRowComponentInputs(col, treeRow)\n : col.componentInputs\n ? col.componentInputs(row)\n : EMPTY_RECORD\n \"\n [outputs]=\"\n col.componentOutputs ? col.componentOutputs(row) : EMPTY_RECORD\n \"\n [recycle]=\"recycle\"\n ></div>\n } @else if (col.template) {\n @if (treeRow) {\n <ng-container\n *ngTemplateOutlet=\"\n col.template;\n context: {\n $implicit: row,\n depth: treeRow.depth,\n parentRow: treeRow.parentRow,\n parentId: treeRow.parentId,\n path: treeRow.path,\n isLeaf: treeRow.isLeaf,\n childCount: treeRow.childCount,\n }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"col.template; context: { $implicit: row }\"\n ></ng-container>\n }\n } @else {\n @let fmt = getCellFormatting(col, row);\n @if (fmt) {\n <span\n data-slot=\"cell-formatted\"\n class=\"relative flex w-full items-center gap-1.5 {{ fmt.class }}\"\n [style]=\"fmt.style\"\n >\n @if (fmt.dataBar) {\n @if (fmt.dataBar.track; as track) {\n <span\n data-slot=\"cell-data-bar-track\"\n class=\"pointer-events-none absolute inset-x-0 inset-y-0.5 rounded-sm\"\n [style.background-color]=\"track\"\n ></span>\n }\n <span\n data-slot=\"cell-data-bar\"\n class=\"pointer-events-none absolute inset-y-0.5 start-0 rounded-sm\"\n [style.width]=\"fmt.dataBar.width\"\n [style.background-color]=\"fmt.dataBar.color\"\n ></span>\n }\n @if (fmt.icon) {\n @if (fmt.icon.name) {\n <ui-icon\n data-slot=\"cell-icon\"\n [name]=\"fmt.icon.name\"\n size=\"xs\"\n class=\"relative shrink-0 {{ fmt.icon.class }}\"\n />\n } @else if (fmt.icon.glyph) {\n <span data-slot=\"cell-icon\" class=\"relative shrink-0 {{ fmt.icon.class }}\">{{ fmt.icon.glyph }}</span>\n }\n }\n <span class=\"relative min-w-0 truncate\">\n @if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n </span>\n </span>\n } @else if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n }\n </ng-template>\n\n <!-- Reusable: full cell rendering (special columns + content) -->\n <ng-template\n #cellTpl\n let-col\n let-row=\"row\"\n let-rowIndex=\"rowIndex\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isRowSelected(row)\"\n [disabled]=\"isDisabled(row)\"\n [indeterminate]=\"\n treeRow ? isSubRowSelectionIndeterminate(row) : false\n \"\n (checkedChange)=\"treeRow ? toggleRowWithCascade(row) : toggleRow(row)\"\n ariaLabel=\"Select row\"\n />\n } @else if (col._isTreeExpanderHost && treeRow) {\n <div\n class=\"flex items-center gap-1 min-w-0\"\n [style.padding-inline-start.px]=\"treeRow.depth * subRowIndentSize()\"\n >\n @if (!treeRow.isLeaf) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n treeRow.isExpanded ? 'Collapse sub-rows' : 'Expand sub-rows'\n \"\n (click)=\"toggleSubRowExpanded(treeRow.row, $event)\"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"treeRow.isExpanded && !isRtl()\"\n [class.-rotate-90]=\"treeRow.isExpanded && isRtl()\"\n />\n </button>\n } @else {\n <span class=\"inline-block h-6 w-6 shrink-0\"></span>\n }\n <span class=\"truncate\">\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n </span>\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"isRowExpanded(row) ? 'Collapse row' : 'Expand row'\"\n [attr.aria-expanded]=\"isRowExpanded(row)\"\n (click)=\"toggleRowExpanded(row, $event)\"\n >\n @if (isRowExpanded(row)) {\n <ui-icon name=\"chevron-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevron-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n @if (!isDisabled(row)) {\n @for (slot of cellActionSlots(); track slot.id) {\n <ui-button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-8 w-8 pointer-coarse:size-11\"\n [ariaLabel]=\"slot.ariaLabel ?? 'Row actions'\"\n (click)=\"slot.onClick($event, getRowContext(row, rowIndex))\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"sm\" />\n </ui-button>\n }\n }\n } @else if (\n col.editable && isEditing(rowIndex, String(col.accessorKey))\n ) {\n <ng-container\n *ngTemplateOutlet=\"\n cellEditTpl;\n context: { $implicit: col, row: row, rowIndex: rowIndex }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n }\n </ng-template>\n\n <!-- Reusable: cell edit mode -->\n <ng-template #cellEditTpl let-col let-row=\"row\" let-rowIndex=\"rowIndex\">\n @let editErr = editErrorFor(rowIndex, col);\n @if (col.editComponent) {\n <div\n [uiComponentOutlet]=\"col.editComponent\"\n [inputs]=\"{ value: editValue(), row: row, column: col }\"\n [outputs]=\"{\n valueChange: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\"\n ></div>\n } @else if (col.editTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.editTemplate;\n context: {\n $implicit: editValue(),\n row: row,\n column: col,\n setValue: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\n \"\n ></ng-container>\n } @else if (col.editType === \"checkbox\") {\n <ui-checkbox\n [checked]=\"!!editValue()\"\n [ariaInvalid]=\"editErr ? true : undefined\"\n [ariaDescribedby]=\"editErr ? cellEditErrorId : undefined\"\n (checkedChange)=\"onEditValueChange($event); commitEdit()\"\n />\n } @else if (col.editType === \"date\") {\n <ui-date-picker\n class=\"w-full\"\n [date]=\"editDateValue()\"\n (dateChange)=\"onEditDateChange($event)\"\n />\n } @else if (col.editType === \"select\" && col.editOptions) {\n <select\n data-edit-input\n class=\"w-full h-full bg-background border-0 outline-none text-sm px-1\"\n [class.ring-1]=\"editErr\"\n [class.ring-inset]=\"editErr\"\n [class.ring-destructive]=\"editErr\"\n [attr.aria-invalid]=\"editErr ? true : null\"\n [attr.aria-describedby]=\"editErr ? cellEditErrorId : null\"\n (change)=\"onEditSelect($any($event.target), col)\"\n (keydown)=\"onEditKeydown($event)\"\n >\n @let chosen = editOptionIndex(col);\n @if (chosen === -1) {\n <option value=\"\" selected disabled hidden></option>\n }\n @for (opt of col.editOptions; track $index; let i = $index) {\n <option [value]=\"i\" [selected]=\"i === chosen\">{{ opt.label }}</option>\n }\n </select>\n } @else {\n <!-- value is bound as an ATTRIBUTE on purpose: a property write from a late render overwrites what is being typed (see editText) -->\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 [attr.value]=\"editText()\"\n (input)=\"onEditInput($any($event.target), col)\"\n (keydown)=\"onEditKeydown($event)\"\n (blur)=\"editingCell() ? commitEdit() : null\"\n />\n }\n @if (editErr) {\n <p\n [id]=\"cellEditErrorId\"\n class=\"mt-0.5 px-1 text-xs text-destructive\"\n role=\"alert\"\n data-slot=\"cell-edit-error\"\n >\n {{ editErr }}\n </p>\n }\n </ng-template>\n\n <!-- Reusable: row detail/expansion panel -->\n <ng-template #rowDetailTpl let-row>\n @if (rowDetailTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTemplate();\n context: { $implicit: row, row: row }\n \"\n ></ng-container>\n } @else if (rowDetailComponent()) {\n <div\n [uiComponentOutlet]=\"rowDetailComponent()!\"\n [inputs]=\"getRowDetailComponentInputs(row)\"\n ></div>\n } @else {\n <pre class=\"text-xs text-muted-foreground whitespace-pre-wrap\">{{\n row | json\n }}</pre>\n }\n </ng-template>\n\n <!-- Reusable: empty state -->\n <ng-template #emptyStateTpl>\n <ui-table-row class=\"hover:bg-transparent justify-center w-full\">\n <ui-table-cell\n class=\"h-48 sm:h-96 text-center w-full p-0 border-none justify-center\"\n >\n @if (emptyStateComponent()) {\n <ng-container\n [uiComponentOutlet]=\"emptyStateComponent()!\"\n [inputs]=\"emptyStateComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex h-full flex-col items-center justify-center py-10 text-center text-muted-foreground w-full\"\n >\n <ui-icon name=\"circle-off\" size=\"xl\" class=\"mb-4 opacity-20\" />\n <p>{{ noResultsLabel() }}</p>\n </div>\n }\n </ui-table-cell>\n </ui-table-row>\n </ng-template>\n\n @if (skeleton()) {\n <div class=\"flex flex-col w-full space-y-3\" data-slot=\"data-table-skeleton\">\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n @for (row of skeletonRowsArray(); track $index) {\n <ui-skeleton class=\"h-12 w-full rounded-md\" />\n }\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n </div>\n } @else {\n <!-- `relative`: the sr-only announcer and the sr-only cell labels below are\n position:absolute. Without a positioned ancestor their containing block\n is <html>, so they escape this table's scroll container entirely and\n stretch the document to their static position \u2014 which on a page with a\n virtual-scroll table adds a second, page-length scrollbar. -->\n <div class=\"relative flex flex-col w-full h-full space-y-4\">\n <output\n class=\"sr-only\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n data-slot=\"data-table-announcer\"\n >\n {{ srAnnouncement() }}\n </output>\n @if (showToolbar()) {\n <div class=\"flex flex-wrap items-center justify-between gap-2 flex-none\">\n <div class=\"flex flex-1 flex-wrap items-center gap-2\">\n <ui-input\n [placeholder]=\"filterPlaceholder()\"\n [ngModel]=\"globalFilter()\"\n (ngModelChange)=\"onFilterChange($event)\"\n class=\"h-8 w-full sm:w-[150px] lg:w-[250px]\"\n />\n @if (hasAi() && enableNlFilter()) {\n <div class=\"flex items-center gap-1\" data-slot=\"table-nl-filter\">\n <span aria-hidden=\"true\" class=\"text-sm\">\u2728</span>\n <ui-input\n [placeholder]=\"nlFilterPlaceholder()\"\n [ngModel]=\"aiFilterQuery()\"\n (ngModelChange)=\"aiFilterQuery.set($event)\"\n [disabled]=\"aiFilterRunning()\"\n (keydown.enter)=\"runAiFilter()\"\n class=\"h-8 w-full sm:w-[200px]\"\n />\n </div>\n }\n @if (enableAdvancedFilter()) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n data-slot=\"advanced-filter-trigger\"\n class=\"inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 pointer-coarse:h-11 pointer-coarse:min-w-11 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-icon name=\"filter\" size=\"xs\" />\n <span class=\"hidden sm:inline\">{{ filterBuilderLabels().filterButton }}</span>\n @if (advancedFilterCount() > 0) {\n <span class=\"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-xs text-primary-foreground\">{{ advancedFilterCount() }}</span>\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-[min(420px,calc(100vw-2rem))] p-2\">\n <div class=\"space-y-2\">\n <ui-data-table-filter-builder\n [group]=\"advancedFilterGroup()\"\n [columns]=\"filterBuilderColumns()\"\n [labels]=\"filterBuilderLabels()\"\n (groupChange)=\"onAdvancedFilterChange($event)\"\n />\n @if (advancedFilterCount() > 0) {\n <button\n type=\"button\"\n class=\"text-xs text-muted-foreground hover:text-destructive\"\n (click)=\"clearAdvancedFilter()\"\n >{{ filterBuilderLabels().clearFilters }}</button>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n @if (showColumnVisibilityToggle() && hideableColumns().length > 0) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n class=\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n [attr.aria-label]=\"toggleColumnsLabel()\"\n >\n {{ columnsLabel() }}\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-56 p-2\">\n <div class=\"space-y-1\">\n @for (col of hideableColumns(); track col.accessorKey) {\n <div\n class=\"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-checkbox\n [checked]=\"isColumnVisible(col.accessorKey)\"\n (checkedChange)=\"\n setColumnVisibility(col.accessorKey, $event)\n \"\n [ariaLabel]=\"toggleColumnAriaLabel(col.header)\"\n />\n <span>{{ col.header }}</span>\n </div>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n\n <div\n #scrollContainer\n class=\"rounded-md border relative flex-1 min-h-0 overflow-auto w-full\"\n [class.contain-strict]=\"isVirtualScrollActive()\"\n [class.will-change-scroll]=\"isVirtualScrollActive()\"\n [class.select-none]=\"enableCellRangeSelection()\"\n (keydown)=\"onTableKeydown($event)\"\n (click)=\"onTableClick()\"\n (mousedown)=\"onTableMouseDown($event)\"\n (scroll)=\"isVirtualScrollActive() ? onVirtualScroll($event) : null\"\n (dragover)=\"onContainerDragOver($event)\"\n (drop)=\"onRowDrop($event)\"\n tabindex=\"0\"\n >\n @if (isLoaderVisible()) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n @if (loaderTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n loaderTemplate();\n context: {\n $implicit: loadingTrigger(),\n trigger: loadingTrigger(),\n }\n \"\n ></ng-container>\n } @else if (loaderComponent()) {\n <ng-container\n [uiComponentOutlet]=\"loaderComponent()!\"\n [inputs]=\"resolvedLoaderComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>Loading...</span>\n </div>\n }\n </div>\n }\n @if (busyLabel(); as label) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>{{ label }}</span>\n </div>\n </div>\n }\n <!-- #scrollContainer scrolls both axes. If ui-table kept its own\n overflow-x box (which forces overflow-y to auto too), the sticky\n header would stick inside it and scroll away, and its horizontal\n scrollbar would sit under the last row. -->\n <ui-table\n class=\"overflow-visible\"\n [role]=\"enableSubRows() || groupingActive() ? 'treegrid' : 'grid'\"\n >\n <ui-table-header class=\"bg-background\">\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [class]=\"getHeaderClass(col)\"\n class=\"group/head\"\n [class.cursor-grab]=\"isColumnDraggable(col)\"\n [class.cursor-grabbing]=\"isDraggingColumn(col)\"\n [class.opacity-70]=\"isDraggingColumn(col)\"\n [class.relative]=\"isDropTargetColumn(col)\"\n [attr.data-column-id]=\"String(col.accessorKey)\"\n [attr.aria-sort]=\"getAriaSort(col)\"\n [attr.draggable]=\"isColumnDraggable(col) ? 'true' : null\"\n [style]=\"getHeaderCellStyle(col)\"\n (dragstart)=\"onColumnDragStart($event, col)\"\n (dragover)=\"onColumnDragOver($event, col)\"\n (drop)=\"onColumnDrop($event, col)\"\n (dragend)=\"onColumnDragEnd()\"\n >\n @if (isDropTargetColumn(col)) {\n <div\n class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/70 bg-primary/10\"\n ></div>\n }\n <div class=\"flex items-center w-full h-full\">\n <div class=\"flex-1 min-w-0\">\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isIndeterminate()\"\n (checkedChange)=\"toggleAll()\"\n ariaLabel=\"Select all\"\n />\n } @else if (col._isTreeExpanderHost) {\n <!-- gap-2 offsets the sort button's -ms-2, which would otherwise pull it over the expand-all button -->\n <div class=\"flex items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllSubRowsExpanded()\n ? 'Collapse all sub-rows'\n : 'Expand all sub-rows'\n \"\n (click)=\"\n isAllSubRowsExpanded()\n ? collapseAllSubRows()\n : expandAllSubRows(-1)\n \"\n >\n @if (isAllSubRowsExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n @if (col.enableSorting !== false) {\n <ui-data-table-column-header\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n } @else {\n <span>{{ col.header }}</span>\n }\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllExpanded()\n ? 'Collapse all rows'\n : 'Expand all rows'\n \"\n (click)=\"toggleAllExpanded()\"\n >\n @if (isAllExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n <span class=\"sr-only\">Actions</span>\n } @else if (col.headerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.headerTemplate;\n context: { $implicit: col }\n \"\n ></ng-container>\n } @else if (col.enableSorting !== false) {\n <div class=\"flex items-center gap-2\">\n <!-- min-w-0: a narrow column truncates its title instead of sliding it under the filter and menu buttons -->\n <ui-data-table-column-header\n class=\"min-w-0\"\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover [closeOnScroll]=\"true\">\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n } @else {\n <div class=\"flex items-center gap-2\">\n <span>{{ col.header }}</span>\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n </div>\n @if (\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @for (slot of headerActionSlots(); track slot.id) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md opacity-0 group-hover/head:opacity-100 touch-visible pointer-coarse:size-11 hover:bg-accent hover:text-accent-foreground transition-opacity\"\n [attr.aria-label]=\"'Column menu for ' + col.header\"\n (click)=\"slot.onClick($event, col)\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"xs\" />\n </button>\n }\n }\n </div>\n @if (\n enableColumnResize() &&\n col.accessorKey !== \"_selection\"\n ) {\n <div\n #resizeHandle\n class=\"group/resize absolute top-0 w-4 h-full cursor-col-resize touch-none z-40 select-none\"\n [class.right-0]=\"!isRtl()\"\n [class.translate-x-1/2]=\"!isRtl()\"\n [class.left-0]=\"isRtl()\"\n [class.-translate-x-1/2]=\"isRtl()\"\n (mousedown)=\"onResizeStart($event, col)\"\n (touchstart)=\"onResizeTouchStart($event, col)\"\n (dblclick)=\"onResizeDoubleClick($event, col)\"\n role=\"separator\"\n [attr.aria-label]=\"'Resize ' + col.header + ' column (double-click or double-tap to auto-fit)'\"\n >\n <div\n [class]=\"resizeLineClass(col)\"\n aria-hidden=\"true\"\n ></div>\n </div>\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none\"\n [class]=\"getHeaderClass({ _width: 'auto' })\"\n ></ui-table-head>\n }\n </ui-table-row>\n @if (enableFloatingFilters() && hasAnyFloatingFilter()) {\n <ui-table-row class=\"border-0\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [role]=\"hasFloatingFilter(col) ? 'columnheader' : 'presentation'\"\n [style]=\"getHeaderCellStyle(col)\"\n class=\"sticky top-[var(--header-height,41px)] z-20 bg-muted/50 py-1 px-1 overflow-hidden pointer-coarse:h-auto\"\n >\n @if (\n col.floatingFilter !== false &&\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @if (col.floatingFilterComponent) {\n <div\n [uiComponentOutlet]=\"col.floatingFilterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n } @else if (col.floatingFilterTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.floatingFilterTemplate;\n context: {\n $implicit: col,\n value: columnFilters()[String(col.accessorKey)],\n change: getFloatingFilterChange(col),\n }\n \"\n ></ng-container>\n } @else if (col.enableFiltering) {\n <ui-input\n class=\"h-7 text-xs\"\n [placeholder]=\"col.header\"\n [ngModel]=\"\n columnFilters()[String(col.accessorKey)] || ''\n \"\n (ngModelChange)=\"\n onColumnFilterChange(col.accessorKey, $event)\n \"\n />\n }\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none sticky top-[var(--header-height,41px)] z-20 bg-muted/50\"\n ></ui-table-head>\n }\n </ui-table-row>\n }\n </ui-table-header>\n <ui-table-body>\n @if (isVirtualScrollActive()) {\n <div\n [style.height.px]=\"virtualPaddingTop()\"\n class=\"flex-shrink-0\"\n ></div>\n @if (enableSubRows()) {\n @for (\n treeRow of virtualVisibleTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [selected]=\"isRowSelected(treeRow.row)\"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"\n treeRow.isLeaf ? null : treeRow.isExpanded\n \"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0\"\n >\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n }\n } @else {\n @for (\n row of virtualVisibleRows();\n track getRowId()(row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, getVirtualRowIndex(i))\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(getVirtualRowIndex(i))) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n @if (virtualTotalRows() === 0) {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <div\n [style.height.px]=\"virtualPaddingBottom()\"\n class=\"flex-shrink-0\"\n ></div>\n } @else if (enableSubRows()) {\n @if (processedTreeRows().length > 0) {\n @for (\n treeRow of processedTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n [selected]=\"isRowSelected(treeRow.row)\"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [class.opacity-30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-2]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-inset]=\"isRowBeingDragged(treeRow.row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(treeRow.row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"treeRow.isLeaf ? null : treeRow.isExpanded\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(treeRow.row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, treeRow.row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(i)) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, i, treeRow.depth)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"onCellClick(i, col, $event)\"\n (keydown.enter)=\"onCellClick(i, col, $event)\"\n (keydown.space)=\"onCellClick(i, col, $event)\"\n (dblclick)=\"onCellDblClick(i, col, $event)\"\n (touchend)=\"onCellTouchEnd($event, i, col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: i,\n treeRow: treeRow,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(treeRow.row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: treeRow.row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (groupingActive()) {\n @if (pagedGroupedDisplayRows().length > 0) {\n @for (\n displayRow of pagedGroupedDisplayRows();\n track groupTrackBy(displayRow)\n ) {\n @if (isGroupRow(displayRow)) {\n <ui-table-row\n class=\"border-0 bg-muted/40 cursor-pointer select-none\"\n data-slot=\"table-group-row\"\n [attr.data-group-key]=\"displayRow.groupKey\"\n [attr.aria-expanded]=\"!displayRow.collapsed\"\n (click)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.enter)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.space)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n >\n <ui-table-cell\n class=\"flex-1 border-b font-medium\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <div class=\"flex flex-wrap items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n displayRow.collapsed ? 'Expand group' : 'Collapse group'\n \"\n (click)=\"\n $event.stopPropagation();\n toggleGroupCollapsed(displayRow.groupKey)\n \"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"!displayRow.collapsed && !isRtl()\"\n [class.-rotate-90]=\"!displayRow.collapsed && isRtl()\"\n />\n </button>\n <span class=\"truncate\">{{ groupRowValueLabel(displayRow) }}</span>\n <span class=\"text-xs text-muted-foreground\">({{ displayRow.count }})</span>\n @if (groupAggregates()) {\n @for (entry of displayRow.aggregates | keyvalue: keepGroupAggregateOrder; track entry.key) {\n <span class=\"text-xs text-muted-foreground\">\n {{ groupAggregateLabel(entry.key) }}: {{ entry.value }}\n </span>\n }\n }\n </div>\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [selected]=\"isRowSelected(displayRow.row)\"\n [attr.data-disabled]=\"isDisabled(displayRow.row) || null\"\n [class.opacity-50]=\"isDisabled(displayRow.row)\"\n [attr.data-row-index]=\"displayRow.index\"\n [attr.data-row-id]=\"getRowId()(displayRow.row)\"\n data-slot=\"table-group-data-row\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, displayRow.index)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: displayRow.row,\n rowIndex: displayRow.index,\n treeRow: null,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (processedData().length > 0) {\n @for (\n row of (dragPreviewData() ?? processedData());\n track getRowId()(row);\n let i = $index\n ) {\n @if (isFullWidthRow(row)) {\n <ui-table-row\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n class=\"border-0\"\n >\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n @if (fullWidthRowTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n fullWidthRowTemplate();\n context: { $implicit: row, index: i }\n \"\n ></ng-container>\n } @else if (fullWidthRowComponent()) {\n <div\n [uiComponentOutlet]=\"fullWidthRowComponent()!\"\n [inputs]=\"{ row: row, index: i }\"\n ></div>\n }\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [class.ring-2]=\"isRowBeingDragged(row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(row)\"\n [class.ring-inset]=\"isRowBeingDragged(row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell [class]=\"getCellClass(col, i)\" [attr.data-column]=\"String(col.accessorKey)\" [style]=\"getCellStyle(col)\" (click)=\"onCellClick(i, col, $event)\" (keydown.enter)=\"onCellClick(i, col, $event)\" (keydown.space)=\"onCellClick(i, col, $event)\" (dblclick)=\"onCellDblClick(i, col, $event)\" (touchend)=\"onCellTouchEnd($event, i, col)\">\n <ng-container *ngTemplateOutlet=\"cellTpl; context: { $implicit: col, row: row, rowIndex: i, treeRow: null, recycle: false }\"></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell class=\"flex-1 pointer-events-none\" [class]=\"getCellClass({ _width: 'auto' })\"></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell class=\"flex-1 border-b\" style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\">\n <ng-container *ngTemplateOutlet=\"rowDetailTpl; context: { $implicit: row }\"></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <!-- A spacer that stretches the body to fill the container. It holds\n no data and cannot be reached, so it is hidden from assistive\n tech rather than counted as a row of the grid. -->\n <ui-table-row class=\"h-full\" aria-hidden=\"true\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col)\"\n [style]=\"getCellStyle(col)\"\n class=\"bg-background border-0 p-0\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </ui-table-body>\n @if (hasFooter()) {\n <div\n class=\"sticky bottom-0 z-20 bg-background border-t\"\n data-slot=\"table-footer\"\n >\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [style]=\"getCellStyle(col)\"\n class=\"whitespace-nowrap overflow-hidden text-ellipsis text-sm font-medium text-muted-foreground\"\n >\n @if (col.footerComponent) {\n <div\n [uiComponentOutlet]=\"col.footerComponent\"\n [inputs]=\"{\n column: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\"\n ></div>\n } @else if (col.footerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.footerTemplate;\n context: {\n $implicit: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\n \"\n ></ng-container>\n } @else {\n {{ footerValues().get(String(col.accessorKey)) || \"\" }}\n }\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </div>\n }\n </ui-table>\n\n @if (enableFillHandle() && fillHandlePosition(); as pos) {\n <span\n data-slot=\"fill-handle\"\n class=\"absolute z-20 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 cursor-crosshair rounded-[2px] border border-background bg-primary\"\n style=\"touch-action: none;\"\n aria-hidden=\"true\"\n [style.top.px]=\"pos.top\"\n [style.left.px]=\"pos.left\"\n (mousedown)=\"onFillHandleStart($event)\"\n (touchstart)=\"onFillHandleStart($event)\"\n ></span>\n }\n\n @if (enableRangeActions() && rangeSelectionStats(); as stats) {\n <div\n data-slot=\"range-actions\"\n class=\"sticky bottom-0 z-20 flex max-w-[calc(100vw-2rem)] flex-wrap items-center gap-x-4 gap-y-1 border-t bg-background/95 px-3 py-1.5 text-xs backdrop-blur-sm\"\n >\n <span class=\"text-muted-foreground\">{{ rangeLabels().count }}: <span class=\"text-foreground font-medium\">{{ stats.count }}</span></span>\n @if (stats.numericCount > 0) {\n <span class=\"text-muted-foreground\">{{ rangeLabels().sum }}: <span class=\"text-foreground font-medium\">{{ stats.sum }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().avg }}: <span class=\"text-foreground font-medium\">{{ stats.avg }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().min }}: <span class=\"text-foreground font-medium\">{{ stats.min }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().max }}: <span class=\"text-foreground font-medium\">{{ stats.max }}</span></span>\n @if (rangeChartPayload()) {\n <ui-button\n size=\"sm\"\n variant=\"outline\"\n class=\"ms-auto h-6 px-2 pointer-coarse:h-11\"\n [ariaLabel]=\"rangeLabels().chart\"\n (click)=\"openRangeChart()\"\n >\n <ui-icon name=\"bar-chart-3\" size=\"xs\" class=\"me-1\" />{{ rangeLabels().chart }}\n </ui-button>\n }\n }\n </div>\n }\n </div>\n\n @if (showPagination()) {\n <ui-data-table-pagination\n class=\"flex-none\"\n [total]=\"activeTotalItems()\"\n [state]=\"paginationState()\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [showPageSizeSelector]=\"showPageSizeSelector()\"\n [rowsPerPageLabel]=\"rowsPerPageLabel()\"\n [pageLabel]=\"pageLabel()\"\n [ofLabel]=\"ofLabel()\"\n (paginationChange)=\"onPaginationChange($event)\"\n />\n }\n </div>\n } <!-- end @else skeleton -->\n", styles: [":host([data-ui-theme=\"neutral\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=neutral]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"zinc\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=zinc]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"slate\"]){--primary: oklch(.208 .042 265.755);--primary-foreground: oklch(.984 .003 247.858);--ring: oklch(.704 .04 256.788)}:host-context(.dark)[data-ui-theme=slate]{--primary: oklch(.929 .013 255.508);--primary-foreground: oklch(.208 .042 265.755);--ring: oklch(.704 .04 256.788)}:host([data-ui-theme=\"stone\"]){--primary: oklch(.216 .006 56.043);--primary-foreground: oklch(.985 .001 106.423);--ring: oklch(.709 .01 56.259)}:host-context(.dark)[data-ui-theme=stone]{--primary: oklch(.923 .003 48.717);--primary-foreground: oklch(.216 .006 56.043);--ring: oklch(.553 .013 58.071)}:host([data-ui-theme=\"gray\"]){--primary: oklch(.21 .028 264.532);--primary-foreground: oklch(.985 .002 247.839);--ring: oklch(.707 .022 264.436)}:host-context(.dark)[data-ui-theme=gray]{--primary: oklch(.928 .006 264.531);--primary-foreground: oklch(.21 .028 264.532);--ring: oklch(.551 .027 264.364)}:host([data-ui-theme=\"red\"]){--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host-context(.dark)[data-ui-theme=red]{--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host([data-ui-theme=\"rose\"]){--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host-context(.dark)[data-ui-theme=rose]{--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host([data-ui-theme=\"orange\"]){--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host-context(.dark)[data-ui-theme=orange]{--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host([data-ui-theme=\"green\"]){--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host-context(.dark)[data-ui-theme=green]{--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host([data-ui-theme=\"blue\"]){--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host-context(.dark)[data-ui-theme=blue]{--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host([data-ui-theme=\"yellow\"]){--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host-context(.dark)[data-ui-theme=yellow]{--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host([data-ui-theme=\"violet\"]){--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host-context(.dark)[data-ui-theme=violet]{--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host([data-ui-theme=\"amber\"]){--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}:host-context(.dark)[data-ui-theme=amber]{--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}@layer components{@media(hover:hover){[data-slot=table-row]:hover>.pinned-cell{background-image:linear-gradient(color-mix(in oklab,var(--muted) 50%,transparent),color-mix(in oklab,var(--muted) 50%,transparent))}}[data-slot=table-row][data-state=selected]>.pinned-cell{background-image:linear-gradient(var(--muted),var(--muted))}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TableComponent, selector: "ui-table", inputs: ["class", "role"] }, { kind: "component", type: TableHeaderComponent, selector: "ui-table-header", inputs: ["class"] }, { kind: "component", type: TableBodyComponent, selector: "ui-table-body", inputs: ["class", "skeleton", "skeletonRows"] }, { kind: "component", type: TableRowComponent, selector: "ui-table-row", inputs: ["class", "selected"] }, { kind: "component", type: TableHeadComponent, selector: "ui-table-head", inputs: ["class", "role"] }, { kind: "component", type: TableCellComponent, selector: "ui-table-cell", inputs: ["class"] }, { kind: "component", type: InputComponent, selector: "ui-input", inputs: ["type", "placeholder", "disabled", "class", "elementId", "name", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "variant", "loading", "skeleton", "autofocus", "clearable", "floating", "label", "labelClass", "inputMode", "lang", "prefix", "suffix", "value"], outputs: ["valueChange"] }, { kind: "component", type: CheckboxComponent, selector: "ui-checkbox", inputs: ["disabled", "class", "skeleton", "elementId", "ariaLabel", "ariaLabelledby", "ariaDescribedby", "ariaInvalid", "checked", "indeterminate", "label"], outputs: ["checkedChange"] }, { kind: "component", type: DatePickerComponent, selector: "ui-date-picker", inputs: ["class", "placeholder", "disabled", "showTime", "locale", "date"], outputs: ["dateChange"] }, { kind: "component", type: PopoverComponent, selector: "ui-popover", inputs: ["class", "open", "closeOnScroll"], outputs: ["openChange"] }, { kind: "component", type: PopoverTriggerComponent, selector: "ui-popover-trigger", inputs: ["class"] }, { kind: "component", type: PopoverContentComponent, selector: "ui-popover-content", inputs: ["class", "align", "side", "sideOffset", "avoidCollisions", "restoreFocus", "strategy"] }, { kind: "component", type: DataTableColumnHeaderComponent, selector: "ui-data-table-column-header", inputs: ["title", "column", "direction", "enableSorting", "class", "sortIndex"], outputs: ["sort", "sortMeta"] }, { kind: "component", type: DataTablePaginationComponent, selector: "ui-data-table-pagination", inputs: ["class", "total", "state", "pageSizeOptions", "showPageSizeSelector", "rowsPerPageLabel", "pageLabel", "ofLabel"], outputs: ["paginationChange"] }, { kind: "component", type: DataTableFilterBuilderComponent, selector: "ui-data-table-filter-builder", inputs: ["class", "group", "columns", "labels"], outputs: ["groupChange"] }, { kind: "directive", type: UiComponentOutletDirective, selector: "[uiComponentOutlet]", inputs: ["uiComponentOutlet", "inputs", "outputs", "recycle"], outputs: ["initialized"] }, { kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["variant", "size", "disabled", "type", "class", "ariaLabel", "aria-expanded", "aria-pressed", "aria-haspopup", "aria-controls", "label", "ripple", "rippleColor", "loading", "skeleton"], outputs: ["clicked"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "weight", "strokeWidth", "color", "fillColor"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["class", "variant"] }, { kind: "pipe", type: i1$1.JsonPipe, name: "json" }, { kind: "pipe", type: i1$1.KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
15598
15644
  }
15599
15645
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DataTableComponent, decorators: [{
15600
15646
  type: Component,
@@ -15628,7 +15674,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
15628
15674
  '[class]': 'hostClasses()',
15629
15675
  '[attr.dir]': 'dir()',
15630
15676
  '[attr.data-ui-theme]': 'theme()',
15631
- }, template: " <!-- Reusable: cell content rendering (component/template/cell/default) -->\n <ng-template\n #cellContentTpl\n let-col\n let-row=\"row\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.component) {\n <div\n [uiComponentOutlet]=\"col.component\"\n [inputs]=\"\n treeRow\n ? getSubRowComponentInputs(col, treeRow)\n : col.componentInputs\n ? col.componentInputs(row)\n : EMPTY_RECORD\n \"\n [outputs]=\"\n col.componentOutputs ? col.componentOutputs(row) : EMPTY_RECORD\n \"\n [recycle]=\"recycle\"\n ></div>\n } @else if (col.template) {\n @if (treeRow) {\n <ng-container\n *ngTemplateOutlet=\"\n col.template;\n context: {\n $implicit: row,\n depth: treeRow.depth,\n parentRow: treeRow.parentRow,\n parentId: treeRow.parentId,\n path: treeRow.path,\n isLeaf: treeRow.isLeaf,\n childCount: treeRow.childCount,\n }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"col.template; context: { $implicit: row }\"\n ></ng-container>\n }\n } @else {\n @let fmt = getCellFormatting(col, row);\n @if (fmt) {\n <span\n data-slot=\"cell-formatted\"\n class=\"relative flex w-full items-center gap-1.5 {{ fmt.class }}\"\n [style]=\"fmt.style\"\n >\n @if (fmt.dataBar) {\n @if (fmt.dataBar.track; as track) {\n <span\n data-slot=\"cell-data-bar-track\"\n class=\"pointer-events-none absolute inset-x-0 inset-y-0.5 rounded-sm\"\n [style.background-color]=\"track\"\n ></span>\n }\n <span\n data-slot=\"cell-data-bar\"\n class=\"pointer-events-none absolute inset-y-0.5 start-0 rounded-sm\"\n [style.width]=\"fmt.dataBar.width\"\n [style.background-color]=\"fmt.dataBar.color\"\n ></span>\n }\n @if (fmt.icon) {\n @if (fmt.icon.name) {\n <ui-icon\n data-slot=\"cell-icon\"\n [name]=\"fmt.icon.name\"\n size=\"xs\"\n class=\"relative shrink-0 {{ fmt.icon.class }}\"\n />\n } @else if (fmt.icon.glyph) {\n <span data-slot=\"cell-icon\" class=\"relative shrink-0 {{ fmt.icon.class }}\">{{ fmt.icon.glyph }}</span>\n }\n }\n <span class=\"relative min-w-0 truncate\">\n @if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n </span>\n </span>\n } @else if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n }\n </ng-template>\n\n <!-- Reusable: full cell rendering (special columns + content) -->\n <ng-template\n #cellTpl\n let-col\n let-row=\"row\"\n let-rowIndex=\"rowIndex\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isRowSelected(row)\"\n [disabled]=\"isDisabled(row)\"\n [indeterminate]=\"\n treeRow ? isSubRowSelectionIndeterminate(row) : false\n \"\n (checkedChange)=\"treeRow ? toggleRowWithCascade(row) : toggleRow(row)\"\n ariaLabel=\"Select row\"\n />\n } @else if (col._isTreeExpanderHost && treeRow) {\n <div\n class=\"flex items-center gap-1 min-w-0\"\n [style.padding-inline-start.px]=\"treeRow.depth * subRowIndentSize()\"\n >\n @if (!treeRow.isLeaf) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n treeRow.isExpanded ? 'Collapse sub-rows' : 'Expand sub-rows'\n \"\n (click)=\"toggleSubRowExpanded(treeRow.row, $event)\"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"treeRow.isExpanded && !isRtl()\"\n [class.-rotate-90]=\"treeRow.isExpanded && isRtl()\"\n />\n </button>\n } @else {\n <span class=\"inline-block h-6 w-6 shrink-0\"></span>\n }\n <span class=\"truncate\">\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n </span>\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"isRowExpanded(row) ? 'Collapse row' : 'Expand row'\"\n [attr.aria-expanded]=\"isRowExpanded(row)\"\n (click)=\"toggleRowExpanded(row, $event)\"\n >\n @if (isRowExpanded(row)) {\n <ui-icon name=\"chevron-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevron-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n @if (!isDisabled(row)) {\n @for (slot of cellActionSlots(); track slot.id) {\n <ui-button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-8 w-8 pointer-coarse:size-11\"\n [ariaLabel]=\"slot.ariaLabel ?? 'Row actions'\"\n (click)=\"slot.onClick($event, getRowContext(row, rowIndex))\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"sm\" />\n </ui-button>\n }\n }\n } @else if (\n col.editable && isEditing(rowIndex, String(col.accessorKey))\n ) {\n <ng-container\n *ngTemplateOutlet=\"\n cellEditTpl;\n context: { $implicit: col, row: row, rowIndex: rowIndex }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n }\n </ng-template>\n\n <!-- Reusable: cell edit mode -->\n <ng-template #cellEditTpl let-col let-row=\"row\" let-rowIndex=\"rowIndex\">\n @let editErr = editErrorFor(rowIndex, col);\n @if (col.editComponent) {\n <div\n [uiComponentOutlet]=\"col.editComponent\"\n [inputs]=\"{ value: editValue(), row: row, column: col }\"\n [outputs]=\"{\n valueChange: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\"\n ></div>\n } @else if (col.editTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.editTemplate;\n context: {\n $implicit: editValue(),\n row: row,\n column: col,\n setValue: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\n \"\n ></ng-container>\n } @else if (col.editType === \"checkbox\") {\n <ui-checkbox\n [checked]=\"!!editValue()\"\n [ariaInvalid]=\"editErr ? true : undefined\"\n [ariaDescribedby]=\"editErr ? cellEditErrorId : undefined\"\n (checkedChange)=\"onEditValueChange($event); commitEdit()\"\n />\n } @else if (col.editType === \"date\") {\n <ui-date-picker\n class=\"w-full\"\n [date]=\"editDateValue()\"\n (dateChange)=\"onEditDateChange($event)\"\n />\n } @else if (col.editType === \"select\" && col.editOptions) {\n <select\n data-edit-input\n class=\"w-full h-full bg-background border-0 outline-none text-sm px-1\"\n [class.ring-1]=\"editErr\"\n [class.ring-inset]=\"editErr\"\n [class.ring-destructive]=\"editErr\"\n [attr.aria-invalid]=\"editErr ? true : null\"\n [attr.aria-describedby]=\"editErr ? cellEditErrorId : null\"\n (change)=\"onEditSelect($any($event.target), col)\"\n (keydown)=\"onEditKeydown($event)\"\n >\n @let chosen = editOptionIndex(col);\n @if (chosen === -1) {\n <option value=\"\" selected disabled hidden></option>\n }\n @for (opt of col.editOptions; track $index; let i = $index) {\n <option [value]=\"i\" [selected]=\"i === chosen\">{{ opt.label }}</option>\n }\n </select>\n } @else {\n <input\n data-edit-input\n [type]=\"col.editType === 'number' ? 'number' : 'text'\"\n class=\"w-full h-full bg-background border-0 outline-none text-sm px-1 select-text\"\n [class.ring-1]=\"editErr\"\n [class.ring-inset]=\"editErr\"\n [class.ring-destructive]=\"editErr\"\n [attr.aria-invalid]=\"editErr ? true : null\"\n [attr.aria-describedby]=\"editErr ? cellEditErrorId : null\"\n [value]=\"col.editType === 'number' ? editText() : editValue()\"\n (input)=\"onEditInput($any($event.target), col)\"\n (keydown)=\"onEditKeydown($event)\"\n (blur)=\"editingCell() ? commitEdit() : null\"\n />\n }\n @if (editErr) {\n <p\n [id]=\"cellEditErrorId\"\n class=\"mt-0.5 px-1 text-xs text-destructive\"\n role=\"alert\"\n data-slot=\"cell-edit-error\"\n >\n {{ editErr }}\n </p>\n }\n </ng-template>\n\n <!-- Reusable: row detail/expansion panel -->\n <ng-template #rowDetailTpl let-row>\n @if (rowDetailTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTemplate();\n context: { $implicit: row, row: row }\n \"\n ></ng-container>\n } @else if (rowDetailComponent()) {\n <div\n [uiComponentOutlet]=\"rowDetailComponent()!\"\n [inputs]=\"getRowDetailComponentInputs(row)\"\n ></div>\n } @else {\n <pre class=\"text-xs text-muted-foreground whitespace-pre-wrap\">{{\n row | json\n }}</pre>\n }\n </ng-template>\n\n <!-- Reusable: empty state -->\n <ng-template #emptyStateTpl>\n <ui-table-row class=\"hover:bg-transparent justify-center w-full\">\n <ui-table-cell\n class=\"h-48 sm:h-96 text-center w-full p-0 border-none justify-center\"\n >\n @if (emptyStateComponent()) {\n <ng-container\n [uiComponentOutlet]=\"emptyStateComponent()!\"\n [inputs]=\"emptyStateComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex h-full flex-col items-center justify-center py-10 text-center text-muted-foreground w-full\"\n >\n <ui-icon name=\"circle-off\" size=\"xl\" class=\"mb-4 opacity-20\" />\n <p>{{ noResultsLabel() }}</p>\n </div>\n }\n </ui-table-cell>\n </ui-table-row>\n </ng-template>\n\n @if (skeleton()) {\n <div class=\"flex flex-col w-full space-y-3\" data-slot=\"data-table-skeleton\">\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n @for (row of skeletonRowsArray(); track $index) {\n <ui-skeleton class=\"h-12 w-full rounded-md\" />\n }\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n </div>\n } @else {\n <!-- `relative`: the sr-only announcer and the sr-only cell labels below are\n position:absolute. Without a positioned ancestor their containing block\n is <html>, so they escape this table's scroll container entirely and\n stretch the document to their static position \u2014 which on a page with a\n virtual-scroll table adds a second, page-length scrollbar. -->\n <div class=\"relative flex flex-col w-full h-full space-y-4\">\n <output\n class=\"sr-only\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n data-slot=\"data-table-announcer\"\n >\n {{ srAnnouncement() }}\n </output>\n @if (showToolbar()) {\n <div class=\"flex flex-wrap items-center justify-between gap-2 flex-none\">\n <div class=\"flex flex-1 flex-wrap items-center gap-2\">\n <ui-input\n [placeholder]=\"filterPlaceholder()\"\n [ngModel]=\"globalFilter()\"\n (ngModelChange)=\"onFilterChange($event)\"\n class=\"h-8 w-full sm:w-[150px] lg:w-[250px]\"\n />\n @if (hasAi() && enableNlFilter()) {\n <div class=\"flex items-center gap-1\" data-slot=\"table-nl-filter\">\n <span aria-hidden=\"true\" class=\"text-sm\">\u2728</span>\n <ui-input\n [placeholder]=\"nlFilterPlaceholder()\"\n [ngModel]=\"aiFilterQuery()\"\n (ngModelChange)=\"aiFilterQuery.set($event)\"\n [disabled]=\"aiFilterRunning()\"\n (keydown.enter)=\"runAiFilter()\"\n class=\"h-8 w-full sm:w-[200px]\"\n />\n </div>\n }\n @if (enableAdvancedFilter()) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n data-slot=\"advanced-filter-trigger\"\n class=\"inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 pointer-coarse:h-11 pointer-coarse:min-w-11 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-icon name=\"filter\" size=\"xs\" />\n <span class=\"hidden sm:inline\">{{ filterBuilderLabels().filterButton }}</span>\n @if (advancedFilterCount() > 0) {\n <span class=\"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-xs text-primary-foreground\">{{ advancedFilterCount() }}</span>\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-[min(420px,calc(100vw-2rem))] p-2\">\n <div class=\"space-y-2\">\n <ui-data-table-filter-builder\n [group]=\"advancedFilterGroup()\"\n [columns]=\"filterBuilderColumns()\"\n [labels]=\"filterBuilderLabels()\"\n (groupChange)=\"onAdvancedFilterChange($event)\"\n />\n @if (advancedFilterCount() > 0) {\n <button\n type=\"button\"\n class=\"text-xs text-muted-foreground hover:text-destructive\"\n (click)=\"clearAdvancedFilter()\"\n >{{ filterBuilderLabels().clearFilters }}</button>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n @if (showColumnVisibilityToggle() && hideableColumns().length > 0) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n class=\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n [attr.aria-label]=\"toggleColumnsLabel()\"\n >\n {{ columnsLabel() }}\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-56 p-2\">\n <div class=\"space-y-1\">\n @for (col of hideableColumns(); track col.accessorKey) {\n <div\n class=\"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-checkbox\n [checked]=\"isColumnVisible(col.accessorKey)\"\n (checkedChange)=\"\n setColumnVisibility(col.accessorKey, $event)\n \"\n [ariaLabel]=\"toggleColumnAriaLabel(col.header)\"\n />\n <span>{{ col.header }}</span>\n </div>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n\n <div\n #scrollContainer\n class=\"rounded-md border relative flex-1 min-h-0 overflow-auto w-full\"\n [class.contain-strict]=\"isVirtualScrollActive()\"\n [class.will-change-scroll]=\"isVirtualScrollActive()\"\n [class.select-none]=\"enableCellRangeSelection()\"\n (keydown)=\"onTableKeydown($event)\"\n (click)=\"onTableClick()\"\n (mousedown)=\"onTableMouseDown($event)\"\n (scroll)=\"isVirtualScrollActive() ? onVirtualScroll($event) : null\"\n (dragover)=\"onContainerDragOver($event)\"\n (drop)=\"onRowDrop($event)\"\n tabindex=\"0\"\n >\n @if (isLoaderVisible()) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n @if (loaderTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n loaderTemplate();\n context: {\n $implicit: loadingTrigger(),\n trigger: loadingTrigger(),\n }\n \"\n ></ng-container>\n } @else if (loaderComponent()) {\n <ng-container\n [uiComponentOutlet]=\"loaderComponent()!\"\n [inputs]=\"resolvedLoaderComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>Loading...</span>\n </div>\n }\n </div>\n }\n @if (busyLabel(); as label) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>{{ label }}</span>\n </div>\n </div>\n }\n <!-- #scrollContainer scrolls both axes. If ui-table kept its own\n overflow-x box (which forces overflow-y to auto too), the sticky\n header would stick inside it and scroll away, and its horizontal\n scrollbar would sit under the last row. -->\n <ui-table\n class=\"overflow-visible\"\n [role]=\"enableSubRows() || groupingActive() ? 'treegrid' : 'grid'\"\n >\n <ui-table-header class=\"bg-background\">\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [class]=\"getHeaderClass(col)\"\n class=\"group/head\"\n [class.cursor-grab]=\"isColumnDraggable(col)\"\n [class.cursor-grabbing]=\"isDraggingColumn(col)\"\n [class.opacity-70]=\"isDraggingColumn(col)\"\n [class.relative]=\"isDropTargetColumn(col)\"\n [attr.data-column-id]=\"String(col.accessorKey)\"\n [attr.aria-sort]=\"getAriaSort(col)\"\n [attr.draggable]=\"isColumnDraggable(col) ? 'true' : null\"\n [style]=\"getHeaderCellStyle(col)\"\n (dragstart)=\"onColumnDragStart($event, col)\"\n (dragover)=\"onColumnDragOver($event, col)\"\n (drop)=\"onColumnDrop($event, col)\"\n (dragend)=\"onColumnDragEnd()\"\n >\n @if (isDropTargetColumn(col)) {\n <div\n class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/70 bg-primary/10\"\n ></div>\n }\n <div class=\"flex items-center w-full h-full\">\n <div class=\"flex-1 min-w-0\">\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isIndeterminate()\"\n (checkedChange)=\"toggleAll()\"\n ariaLabel=\"Select all\"\n />\n } @else if (col._isTreeExpanderHost) {\n <!-- gap-2 offsets the sort button's -ms-2, which would otherwise pull it over the expand-all button -->\n <div class=\"flex items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllSubRowsExpanded()\n ? 'Collapse all sub-rows'\n : 'Expand all sub-rows'\n \"\n (click)=\"\n isAllSubRowsExpanded()\n ? collapseAllSubRows()\n : expandAllSubRows(-1)\n \"\n >\n @if (isAllSubRowsExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n @if (col.enableSorting !== false) {\n <ui-data-table-column-header\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n } @else {\n <span>{{ col.header }}</span>\n }\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllExpanded()\n ? 'Collapse all rows'\n : 'Expand all rows'\n \"\n (click)=\"toggleAllExpanded()\"\n >\n @if (isAllExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n <span class=\"sr-only\">Actions</span>\n } @else if (col.headerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.headerTemplate;\n context: { $implicit: col }\n \"\n ></ng-container>\n } @else if (col.enableSorting !== false) {\n <div class=\"flex items-center gap-2\">\n <!-- min-w-0: a narrow column truncates its title instead of sliding it under the filter and menu buttons -->\n <ui-data-table-column-header\n class=\"min-w-0\"\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover [closeOnScroll]=\"true\">\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n } @else {\n <div class=\"flex items-center gap-2\">\n <span>{{ col.header }}</span>\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n </div>\n @if (\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @for (slot of headerActionSlots(); track slot.id) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md opacity-0 group-hover/head:opacity-100 touch-visible pointer-coarse:size-11 hover:bg-accent hover:text-accent-foreground transition-opacity\"\n [attr.aria-label]=\"'Column menu for ' + col.header\"\n (click)=\"slot.onClick($event, col)\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"xs\" />\n </button>\n }\n }\n </div>\n @if (\n enableColumnResize() &&\n col.accessorKey !== \"_selection\"\n ) {\n <div\n #resizeHandle\n class=\"group/resize absolute top-0 w-4 h-full cursor-col-resize touch-none z-40 select-none\"\n [class.right-0]=\"!isRtl()\"\n [class.translate-x-1/2]=\"!isRtl()\"\n [class.left-0]=\"isRtl()\"\n [class.-translate-x-1/2]=\"isRtl()\"\n (mousedown)=\"onResizeStart($event, col)\"\n (touchstart)=\"onResizeTouchStart($event, col)\"\n (dblclick)=\"onResizeDoubleClick($event, col)\"\n role=\"separator\"\n [attr.aria-label]=\"'Resize ' + col.header + ' column (double-click or double-tap to auto-fit)'\"\n >\n <div\n [class]=\"resizeLineClass(col)\"\n aria-hidden=\"true\"\n ></div>\n </div>\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none\"\n [class]=\"getHeaderClass({ _width: 'auto' })\"\n ></ui-table-head>\n }\n </ui-table-row>\n @if (enableFloatingFilters() && hasAnyFloatingFilter()) {\n <ui-table-row class=\"border-0\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [role]=\"hasFloatingFilter(col) ? 'columnheader' : 'presentation'\"\n [style]=\"getHeaderCellStyle(col)\"\n class=\"sticky top-[var(--header-height,41px)] z-20 bg-muted/50 py-1 px-1 overflow-hidden pointer-coarse:h-auto\"\n >\n @if (\n col.floatingFilter !== false &&\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @if (col.floatingFilterComponent) {\n <div\n [uiComponentOutlet]=\"col.floatingFilterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n } @else if (col.floatingFilterTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.floatingFilterTemplate;\n context: {\n $implicit: col,\n value: columnFilters()[String(col.accessorKey)],\n change: getFloatingFilterChange(col),\n }\n \"\n ></ng-container>\n } @else if (col.enableFiltering) {\n <ui-input\n class=\"h-7 text-xs\"\n [placeholder]=\"col.header\"\n [ngModel]=\"\n columnFilters()[String(col.accessorKey)] || ''\n \"\n (ngModelChange)=\"\n onColumnFilterChange(col.accessorKey, $event)\n \"\n />\n }\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none sticky top-[var(--header-height,41px)] z-20 bg-muted/50\"\n ></ui-table-head>\n }\n </ui-table-row>\n }\n </ui-table-header>\n <ui-table-body>\n @if (isVirtualScrollActive()) {\n <div\n [style.height.px]=\"virtualPaddingTop()\"\n class=\"flex-shrink-0\"\n ></div>\n @if (enableSubRows()) {\n @for (\n treeRow of virtualVisibleTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [selected]=\"isRowSelected(treeRow.row)\"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"\n treeRow.isLeaf ? null : treeRow.isExpanded\n \"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0\"\n >\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n }\n } @else {\n @for (\n row of virtualVisibleRows();\n track getRowId()(row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, getVirtualRowIndex(i))\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(getVirtualRowIndex(i))) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n @if (virtualTotalRows() === 0) {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <div\n [style.height.px]=\"virtualPaddingBottom()\"\n class=\"flex-shrink-0\"\n ></div>\n } @else if (enableSubRows()) {\n @if (processedTreeRows().length > 0) {\n @for (\n treeRow of processedTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n [selected]=\"isRowSelected(treeRow.row)\"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [class.opacity-30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-2]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-inset]=\"isRowBeingDragged(treeRow.row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(treeRow.row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"treeRow.isLeaf ? null : treeRow.isExpanded\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(treeRow.row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, treeRow.row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(i)) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, i, treeRow.depth)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"onCellClick(i, col, $event)\"\n (keydown.enter)=\"onCellClick(i, col, $event)\"\n (keydown.space)=\"onCellClick(i, col, $event)\"\n (dblclick)=\"onCellDblClick(i, col, $event)\"\n (touchend)=\"onCellTouchEnd($event, i, col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: i,\n treeRow: treeRow,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(treeRow.row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: treeRow.row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (groupingActive()) {\n @if (pagedGroupedDisplayRows().length > 0) {\n @for (\n displayRow of pagedGroupedDisplayRows();\n track groupTrackBy(displayRow)\n ) {\n @if (isGroupRow(displayRow)) {\n <ui-table-row\n class=\"border-0 bg-muted/40 cursor-pointer select-none\"\n data-slot=\"table-group-row\"\n [attr.data-group-key]=\"displayRow.groupKey\"\n [attr.aria-expanded]=\"!displayRow.collapsed\"\n (click)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.enter)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.space)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n >\n <ui-table-cell\n class=\"flex-1 border-b font-medium\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <div class=\"flex flex-wrap items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n displayRow.collapsed ? 'Expand group' : 'Collapse group'\n \"\n (click)=\"\n $event.stopPropagation();\n toggleGroupCollapsed(displayRow.groupKey)\n \"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"!displayRow.collapsed && !isRtl()\"\n [class.-rotate-90]=\"!displayRow.collapsed && isRtl()\"\n />\n </button>\n <span class=\"truncate\">{{ groupRowValueLabel(displayRow) }}</span>\n <span class=\"text-xs text-muted-foreground\">({{ displayRow.count }})</span>\n @if (groupAggregates()) {\n @for (entry of displayRow.aggregates | keyvalue: keepGroupAggregateOrder; track entry.key) {\n <span class=\"text-xs text-muted-foreground\">\n {{ groupAggregateLabel(entry.key) }}: {{ entry.value }}\n </span>\n }\n }\n </div>\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [selected]=\"isRowSelected(displayRow.row)\"\n [attr.data-disabled]=\"isDisabled(displayRow.row) || null\"\n [class.opacity-50]=\"isDisabled(displayRow.row)\"\n [attr.data-row-index]=\"displayRow.index\"\n [attr.data-row-id]=\"getRowId()(displayRow.row)\"\n data-slot=\"table-group-data-row\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, displayRow.index)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: displayRow.row,\n rowIndex: displayRow.index,\n treeRow: null,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (processedData().length > 0) {\n @for (\n row of (dragPreviewData() ?? processedData());\n track getRowId()(row);\n let i = $index\n ) {\n @if (isFullWidthRow(row)) {\n <ui-table-row\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n class=\"border-0\"\n >\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n @if (fullWidthRowTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n fullWidthRowTemplate();\n context: { $implicit: row, index: i }\n \"\n ></ng-container>\n } @else if (fullWidthRowComponent()) {\n <div\n [uiComponentOutlet]=\"fullWidthRowComponent()!\"\n [inputs]=\"{ row: row, index: i }\"\n ></div>\n }\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [class.ring-2]=\"isRowBeingDragged(row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(row)\"\n [class.ring-inset]=\"isRowBeingDragged(row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell [class]=\"getCellClass(col, i)\" [attr.data-column]=\"String(col.accessorKey)\" [style]=\"getCellStyle(col)\" (click)=\"onCellClick(i, col, $event)\" (keydown.enter)=\"onCellClick(i, col, $event)\" (keydown.space)=\"onCellClick(i, col, $event)\" (dblclick)=\"onCellDblClick(i, col, $event)\" (touchend)=\"onCellTouchEnd($event, i, col)\">\n <ng-container *ngTemplateOutlet=\"cellTpl; context: { $implicit: col, row: row, rowIndex: i, treeRow: null, recycle: false }\"></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell class=\"flex-1 pointer-events-none\" [class]=\"getCellClass({ _width: 'auto' })\"></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell class=\"flex-1 border-b\" style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\">\n <ng-container *ngTemplateOutlet=\"rowDetailTpl; context: { $implicit: row }\"></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <!-- A spacer that stretches the body to fill the container. It holds\n no data and cannot be reached, so it is hidden from assistive\n tech rather than counted as a row of the grid. -->\n <ui-table-row class=\"h-full\" aria-hidden=\"true\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col)\"\n [style]=\"getCellStyle(col)\"\n class=\"bg-background border-0 p-0\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </ui-table-body>\n @if (hasFooter()) {\n <div\n class=\"sticky bottom-0 z-20 bg-background border-t\"\n data-slot=\"table-footer\"\n >\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [style]=\"getCellStyle(col)\"\n class=\"whitespace-nowrap overflow-hidden text-ellipsis text-sm font-medium text-muted-foreground\"\n >\n @if (col.footerComponent) {\n <div\n [uiComponentOutlet]=\"col.footerComponent\"\n [inputs]=\"{\n column: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\"\n ></div>\n } @else if (col.footerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.footerTemplate;\n context: {\n $implicit: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\n \"\n ></ng-container>\n } @else {\n {{ footerValues().get(String(col.accessorKey)) || \"\" }}\n }\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </div>\n }\n </ui-table>\n\n @if (enableFillHandle() && fillHandlePosition(); as pos) {\n <span\n data-slot=\"fill-handle\"\n class=\"absolute z-20 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 cursor-crosshair rounded-[2px] border border-background bg-primary\"\n style=\"touch-action: none;\"\n aria-hidden=\"true\"\n [style.top.px]=\"pos.top\"\n [style.left.px]=\"pos.left\"\n (mousedown)=\"onFillHandleStart($event)\"\n (touchstart)=\"onFillHandleStart($event)\"\n ></span>\n }\n\n @if (enableRangeActions() && rangeSelectionStats(); as stats) {\n <div\n data-slot=\"range-actions\"\n class=\"sticky bottom-0 z-20 flex max-w-[calc(100vw-2rem)] flex-wrap items-center gap-x-4 gap-y-1 border-t bg-background/95 px-3 py-1.5 text-xs backdrop-blur-sm\"\n >\n <span class=\"text-muted-foreground\">{{ rangeLabels().count }}: <span class=\"text-foreground font-medium\">{{ stats.count }}</span></span>\n @if (stats.numericCount > 0) {\n <span class=\"text-muted-foreground\">{{ rangeLabels().sum }}: <span class=\"text-foreground font-medium\">{{ stats.sum }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().avg }}: <span class=\"text-foreground font-medium\">{{ stats.avg }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().min }}: <span class=\"text-foreground font-medium\">{{ stats.min }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().max }}: <span class=\"text-foreground font-medium\">{{ stats.max }}</span></span>\n @if (rangeChartPayload()) {\n <ui-button\n size=\"sm\"\n variant=\"outline\"\n class=\"ms-auto h-6 px-2 pointer-coarse:h-11\"\n [ariaLabel]=\"rangeLabels().chart\"\n (click)=\"openRangeChart()\"\n >\n <ui-icon name=\"bar-chart-3\" size=\"xs\" class=\"me-1\" />{{ rangeLabels().chart }}\n </ui-button>\n }\n }\n </div>\n }\n </div>\n\n @if (showPagination()) {\n <ui-data-table-pagination\n class=\"flex-none\"\n [total]=\"activeTotalItems()\"\n [state]=\"paginationState()\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [showPageSizeSelector]=\"showPageSizeSelector()\"\n [rowsPerPageLabel]=\"rowsPerPageLabel()\"\n [pageLabel]=\"pageLabel()\"\n [ofLabel]=\"ofLabel()\"\n (paginationChange)=\"onPaginationChange($event)\"\n />\n }\n </div>\n } <!-- end @else skeleton -->\n", styles: [":host([data-ui-theme=\"neutral\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=neutral]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"zinc\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=zinc]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"slate\"]){--primary: oklch(.208 .042 265.755);--primary-foreground: oklch(.984 .003 247.858);--ring: oklch(.704 .04 256.788)}:host-context(.dark)[data-ui-theme=slate]{--primary: oklch(.929 .013 255.508);--primary-foreground: oklch(.208 .042 265.755);--ring: oklch(.704 .04 256.788)}:host([data-ui-theme=\"stone\"]){--primary: oklch(.216 .006 56.043);--primary-foreground: oklch(.985 .001 106.423);--ring: oklch(.709 .01 56.259)}:host-context(.dark)[data-ui-theme=stone]{--primary: oklch(.923 .003 48.717);--primary-foreground: oklch(.216 .006 56.043);--ring: oklch(.553 .013 58.071)}:host([data-ui-theme=\"gray\"]){--primary: oklch(.21 .028 264.532);--primary-foreground: oklch(.985 .002 247.839);--ring: oklch(.707 .022 264.436)}:host-context(.dark)[data-ui-theme=gray]{--primary: oklch(.928 .006 264.531);--primary-foreground: oklch(.21 .028 264.532);--ring: oklch(.551 .027 264.364)}:host([data-ui-theme=\"red\"]){--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host-context(.dark)[data-ui-theme=red]{--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host([data-ui-theme=\"rose\"]){--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host-context(.dark)[data-ui-theme=rose]{--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host([data-ui-theme=\"orange\"]){--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host-context(.dark)[data-ui-theme=orange]{--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host([data-ui-theme=\"green\"]){--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host-context(.dark)[data-ui-theme=green]{--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host([data-ui-theme=\"blue\"]){--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host-context(.dark)[data-ui-theme=blue]{--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host([data-ui-theme=\"yellow\"]){--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host-context(.dark)[data-ui-theme=yellow]{--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host([data-ui-theme=\"violet\"]){--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host-context(.dark)[data-ui-theme=violet]{--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host([data-ui-theme=\"amber\"]){--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}:host-context(.dark)[data-ui-theme=amber]{--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}@layer components{@media(hover:hover){[data-slot=table-row]:hover>.pinned-cell{background-image:linear-gradient(color-mix(in oklab,var(--muted) 50%,transparent),color-mix(in oklab,var(--muted) 50%,transparent))}}[data-slot=table-row][data-state=selected]>.pinned-cell{background-image:linear-gradient(var(--muted),var(--muted))}}\n"] }]
15677
+ }, template: " <!-- Reusable: cell content rendering (component/template/cell/default) -->\n <ng-template\n #cellContentTpl\n let-col\n let-row=\"row\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.component) {\n <div\n [uiComponentOutlet]=\"col.component\"\n [inputs]=\"\n treeRow\n ? getSubRowComponentInputs(col, treeRow)\n : col.componentInputs\n ? col.componentInputs(row)\n : EMPTY_RECORD\n \"\n [outputs]=\"\n col.componentOutputs ? col.componentOutputs(row) : EMPTY_RECORD\n \"\n [recycle]=\"recycle\"\n ></div>\n } @else if (col.template) {\n @if (treeRow) {\n <ng-container\n *ngTemplateOutlet=\"\n col.template;\n context: {\n $implicit: row,\n depth: treeRow.depth,\n parentRow: treeRow.parentRow,\n parentId: treeRow.parentId,\n path: treeRow.path,\n isLeaf: treeRow.isLeaf,\n childCount: treeRow.childCount,\n }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"col.template; context: { $implicit: row }\"\n ></ng-container>\n }\n } @else {\n @let fmt = getCellFormatting(col, row);\n @if (fmt) {\n <span\n data-slot=\"cell-formatted\"\n class=\"relative flex w-full items-center gap-1.5 {{ fmt.class }}\"\n [style]=\"fmt.style\"\n >\n @if (fmt.dataBar) {\n @if (fmt.dataBar.track; as track) {\n <span\n data-slot=\"cell-data-bar-track\"\n class=\"pointer-events-none absolute inset-x-0 inset-y-0.5 rounded-sm\"\n [style.background-color]=\"track\"\n ></span>\n }\n <span\n data-slot=\"cell-data-bar\"\n class=\"pointer-events-none absolute inset-y-0.5 start-0 rounded-sm\"\n [style.width]=\"fmt.dataBar.width\"\n [style.background-color]=\"fmt.dataBar.color\"\n ></span>\n }\n @if (fmt.icon) {\n @if (fmt.icon.name) {\n <ui-icon\n data-slot=\"cell-icon\"\n [name]=\"fmt.icon.name\"\n size=\"xs\"\n class=\"relative shrink-0 {{ fmt.icon.class }}\"\n />\n } @else if (fmt.icon.glyph) {\n <span data-slot=\"cell-icon\" class=\"relative shrink-0 {{ fmt.icon.class }}\">{{ fmt.icon.glyph }}</span>\n }\n }\n <span class=\"relative min-w-0 truncate\">\n @if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n </span>\n </span>\n } @else if (col.cell) {\n {{ col.cell(row) }}\n } @else {\n {{ getCellValue(row, col.accessorKey, col) }}\n }\n }\n </ng-template>\n\n <!-- Reusable: full cell rendering (special columns + content) -->\n <ng-template\n #cellTpl\n let-col\n let-row=\"row\"\n let-rowIndex=\"rowIndex\"\n let-treeRow=\"treeRow\"\n let-recycle=\"recycle\"\n >\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isRowSelected(row)\"\n [disabled]=\"isDisabled(row)\"\n [indeterminate]=\"\n treeRow ? isSubRowSelectionIndeterminate(row) : false\n \"\n (checkedChange)=\"treeRow ? toggleRowWithCascade(row) : toggleRow(row)\"\n ariaLabel=\"Select row\"\n />\n } @else if (col._isTreeExpanderHost && treeRow) {\n <div\n class=\"flex items-center gap-1 min-w-0\"\n [style.padding-inline-start.px]=\"treeRow.depth * subRowIndentSize()\"\n >\n @if (!treeRow.isLeaf) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n treeRow.isExpanded ? 'Collapse sub-rows' : 'Expand sub-rows'\n \"\n (click)=\"toggleSubRowExpanded(treeRow.row, $event)\"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"treeRow.isExpanded && !isRtl()\"\n [class.-rotate-90]=\"treeRow.isExpanded && isRtl()\"\n />\n </button>\n } @else {\n <span class=\"inline-block h-6 w-6 shrink-0\"></span>\n }\n <span class=\"truncate\">\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n </span>\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"isRowExpanded(row) ? 'Collapse row' : 'Expand row'\"\n [attr.aria-expanded]=\"isRowExpanded(row)\"\n (click)=\"toggleRowExpanded(row, $event)\"\n >\n @if (isRowExpanded(row)) {\n <ui-icon name=\"chevron-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevron-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n @if (!isDisabled(row)) {\n @for (slot of cellActionSlots(); track slot.id) {\n <ui-button\n variant=\"ghost\"\n size=\"icon\"\n class=\"h-8 w-8 pointer-coarse:size-11\"\n [ariaLabel]=\"slot.ariaLabel ?? 'Row actions'\"\n (click)=\"slot.onClick($event, getRowContext(row, rowIndex))\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"sm\" />\n </ui-button>\n }\n }\n } @else if (\n col.editable && isEditing(rowIndex, String(col.accessorKey))\n ) {\n <ng-container\n *ngTemplateOutlet=\"\n cellEditTpl;\n context: { $implicit: col, row: row, rowIndex: rowIndex }\n \"\n ></ng-container>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"\n cellContentTpl;\n context: {\n $implicit: col,\n row: row,\n treeRow: treeRow,\n recycle: recycle,\n }\n \"\n ></ng-container>\n }\n </ng-template>\n\n <!-- Reusable: cell edit mode -->\n <ng-template #cellEditTpl let-col let-row=\"row\" let-rowIndex=\"rowIndex\">\n @let editErr = editErrorFor(rowIndex, col);\n @if (col.editComponent) {\n <div\n [uiComponentOutlet]=\"col.editComponent\"\n [inputs]=\"{ value: editValue(), row: row, column: col }\"\n [outputs]=\"{\n valueChange: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\"\n ></div>\n } @else if (col.editTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.editTemplate;\n context: {\n $implicit: editValue(),\n row: row,\n column: col,\n setValue: onEditValueChange.bind(this),\n commit: commitEdit.bind(this),\n cancel: cancelEdit.bind(this),\n }\n \"\n ></ng-container>\n } @else if (col.editType === \"checkbox\") {\n <ui-checkbox\n [checked]=\"!!editValue()\"\n [ariaInvalid]=\"editErr ? true : undefined\"\n [ariaDescribedby]=\"editErr ? cellEditErrorId : undefined\"\n (checkedChange)=\"onEditValueChange($event); commitEdit()\"\n />\n } @else if (col.editType === \"date\") {\n <ui-date-picker\n class=\"w-full\"\n [date]=\"editDateValue()\"\n (dateChange)=\"onEditDateChange($event)\"\n />\n } @else if (col.editType === \"select\" && col.editOptions) {\n <select\n data-edit-input\n class=\"w-full h-full bg-background border-0 outline-none text-sm px-1\"\n [class.ring-1]=\"editErr\"\n [class.ring-inset]=\"editErr\"\n [class.ring-destructive]=\"editErr\"\n [attr.aria-invalid]=\"editErr ? true : null\"\n [attr.aria-describedby]=\"editErr ? cellEditErrorId : null\"\n (change)=\"onEditSelect($any($event.target), col)\"\n (keydown)=\"onEditKeydown($event)\"\n >\n @let chosen = editOptionIndex(col);\n @if (chosen === -1) {\n <option value=\"\" selected disabled hidden></option>\n }\n @for (opt of col.editOptions; track $index; let i = $index) {\n <option [value]=\"i\" [selected]=\"i === chosen\">{{ opt.label }}</option>\n }\n </select>\n } @else {\n <!-- value is bound as an ATTRIBUTE on purpose: a property write from a late render overwrites what is being typed (see editText) -->\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 [attr.value]=\"editText()\"\n (input)=\"onEditInput($any($event.target), col)\"\n (keydown)=\"onEditKeydown($event)\"\n (blur)=\"editingCell() ? commitEdit() : null\"\n />\n }\n @if (editErr) {\n <p\n [id]=\"cellEditErrorId\"\n class=\"mt-0.5 px-1 text-xs text-destructive\"\n role=\"alert\"\n data-slot=\"cell-edit-error\"\n >\n {{ editErr }}\n </p>\n }\n </ng-template>\n\n <!-- Reusable: row detail/expansion panel -->\n <ng-template #rowDetailTpl let-row>\n @if (rowDetailTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTemplate();\n context: { $implicit: row, row: row }\n \"\n ></ng-container>\n } @else if (rowDetailComponent()) {\n <div\n [uiComponentOutlet]=\"rowDetailComponent()!\"\n [inputs]=\"getRowDetailComponentInputs(row)\"\n ></div>\n } @else {\n <pre class=\"text-xs text-muted-foreground whitespace-pre-wrap\">{{\n row | json\n }}</pre>\n }\n </ng-template>\n\n <!-- Reusable: empty state -->\n <ng-template #emptyStateTpl>\n <ui-table-row class=\"hover:bg-transparent justify-center w-full\">\n <ui-table-cell\n class=\"h-48 sm:h-96 text-center w-full p-0 border-none justify-center\"\n >\n @if (emptyStateComponent()) {\n <ng-container\n [uiComponentOutlet]=\"emptyStateComponent()!\"\n [inputs]=\"emptyStateComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex h-full flex-col items-center justify-center py-10 text-center text-muted-foreground w-full\"\n >\n <ui-icon name=\"circle-off\" size=\"xl\" class=\"mb-4 opacity-20\" />\n <p>{{ noResultsLabel() }}</p>\n </div>\n }\n </ui-table-cell>\n </ui-table-row>\n </ng-template>\n\n @if (skeleton()) {\n <div class=\"flex flex-col w-full space-y-3\" data-slot=\"data-table-skeleton\">\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n @for (row of skeletonRowsArray(); track $index) {\n <ui-skeleton class=\"h-12 w-full rounded-md\" />\n }\n <ui-skeleton class=\"h-9 w-full rounded-md\" />\n </div>\n } @else {\n <!-- `relative`: the sr-only announcer and the sr-only cell labels below are\n position:absolute. Without a positioned ancestor their containing block\n is <html>, so they escape this table's scroll container entirely and\n stretch the document to their static position \u2014 which on a page with a\n virtual-scroll table adds a second, page-length scrollbar. -->\n <div class=\"relative flex flex-col w-full h-full space-y-4\">\n <output\n class=\"sr-only\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n data-slot=\"data-table-announcer\"\n >\n {{ srAnnouncement() }}\n </output>\n @if (showToolbar()) {\n <div class=\"flex flex-wrap items-center justify-between gap-2 flex-none\">\n <div class=\"flex flex-1 flex-wrap items-center gap-2\">\n <ui-input\n [placeholder]=\"filterPlaceholder()\"\n [ngModel]=\"globalFilter()\"\n (ngModelChange)=\"onFilterChange($event)\"\n class=\"h-8 w-full sm:w-[150px] lg:w-[250px]\"\n />\n @if (hasAi() && enableNlFilter()) {\n <div class=\"flex items-center gap-1\" data-slot=\"table-nl-filter\">\n <span aria-hidden=\"true\" class=\"text-sm\">\u2728</span>\n <ui-input\n [placeholder]=\"nlFilterPlaceholder()\"\n [ngModel]=\"aiFilterQuery()\"\n (ngModelChange)=\"aiFilterQuery.set($event)\"\n [disabled]=\"aiFilterRunning()\"\n (keydown.enter)=\"runAiFilter()\"\n class=\"h-8 w-full sm:w-[200px]\"\n />\n </div>\n }\n @if (enableAdvancedFilter()) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n data-slot=\"advanced-filter-trigger\"\n class=\"inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 pointer-coarse:h-11 pointer-coarse:min-w-11 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-icon name=\"filter\" size=\"xs\" />\n <span class=\"hidden sm:inline\">{{ filterBuilderLabels().filterButton }}</span>\n @if (advancedFilterCount() > 0) {\n <span class=\"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-xs text-primary-foreground\">{{ advancedFilterCount() }}</span>\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-[min(420px,calc(100vw-2rem))] p-2\">\n <div class=\"space-y-2\">\n <ui-data-table-filter-builder\n [group]=\"advancedFilterGroup()\"\n [columns]=\"filterBuilderColumns()\"\n [labels]=\"filterBuilderLabels()\"\n (groupChange)=\"onAdvancedFilterChange($event)\"\n />\n @if (advancedFilterCount() > 0) {\n <button\n type=\"button\"\n class=\"text-xs text-muted-foreground hover:text-destructive\"\n (click)=\"clearAdvancedFilter()\"\n >{{ filterBuilderLabels().clearFilters }}</button>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n @if (showColumnVisibilityToggle() && hideableColumns().length > 0) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n type=\"button\"\n class=\"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md border border-input bg-background px-3 h-8 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground\"\n [attr.aria-label]=\"toggleColumnsLabel()\"\n >\n {{ columnsLabel() }}\n </button>\n </ui-popover-trigger>\n <ui-popover-content class=\"w-56 p-2\">\n <div class=\"space-y-1\">\n @for (col of hideableColumns(); track col.accessorKey) {\n <div\n class=\"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground\"\n >\n <ui-checkbox\n [checked]=\"isColumnVisible(col.accessorKey)\"\n (checkedChange)=\"\n setColumnVisibility(col.accessorKey, $event)\n \"\n [ariaLabel]=\"toggleColumnAriaLabel(col.header)\"\n />\n <span>{{ col.header }}</span>\n </div>\n }\n </div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n\n <div\n #scrollContainer\n class=\"rounded-md border relative flex-1 min-h-0 overflow-auto w-full\"\n [class.contain-strict]=\"isVirtualScrollActive()\"\n [class.will-change-scroll]=\"isVirtualScrollActive()\"\n [class.select-none]=\"enableCellRangeSelection()\"\n (keydown)=\"onTableKeydown($event)\"\n (click)=\"onTableClick()\"\n (mousedown)=\"onTableMouseDown($event)\"\n (scroll)=\"isVirtualScrollActive() ? onVirtualScroll($event) : null\"\n (dragover)=\"onContainerDragOver($event)\"\n (drop)=\"onRowDrop($event)\"\n tabindex=\"0\"\n >\n @if (isLoaderVisible()) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n @if (loaderTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n loaderTemplate();\n context: {\n $implicit: loadingTrigger(),\n trigger: loadingTrigger(),\n }\n \"\n ></ng-container>\n } @else if (loaderComponent()) {\n <ng-container\n [uiComponentOutlet]=\"loaderComponent()!\"\n [inputs]=\"resolvedLoaderComponentInputs()\"\n ></ng-container>\n } @else {\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>Loading...</span>\n </div>\n }\n </div>\n }\n @if (busyLabel(); as label) {\n <div\n class=\"absolute inset-0 z-40 flex items-center justify-center bg-background/70 backdrop-blur-[1px]\"\n >\n <div\n class=\"flex items-center gap-2 rounded-md border bg-background px-3 py-2 text-sm text-muted-foreground\"\n >\n <span\n class=\"inline-block h-3 w-3 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground\"\n ></span>\n <span>{{ label }}</span>\n </div>\n </div>\n }\n <!-- #scrollContainer scrolls both axes. If ui-table kept its own\n overflow-x box (which forces overflow-y to auto too), the sticky\n header would stick inside it and scroll away, and its horizontal\n scrollbar would sit under the last row. -->\n <ui-table\n class=\"overflow-visible\"\n [role]=\"enableSubRows() || groupingActive() ? 'treegrid' : 'grid'\"\n >\n <ui-table-header class=\"bg-background\">\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [class]=\"getHeaderClass(col)\"\n class=\"group/head\"\n [class.cursor-grab]=\"isColumnDraggable(col)\"\n [class.cursor-grabbing]=\"isDraggingColumn(col)\"\n [class.opacity-70]=\"isDraggingColumn(col)\"\n [class.relative]=\"isDropTargetColumn(col)\"\n [attr.data-column-id]=\"String(col.accessorKey)\"\n [attr.aria-sort]=\"getAriaSort(col)\"\n [attr.draggable]=\"isColumnDraggable(col) ? 'true' : null\"\n [style]=\"getHeaderCellStyle(col)\"\n (dragstart)=\"onColumnDragStart($event, col)\"\n (dragover)=\"onColumnDragOver($event, col)\"\n (drop)=\"onColumnDrop($event, col)\"\n (dragend)=\"onColumnDragEnd()\"\n >\n @if (isDropTargetColumn(col)) {\n <div\n class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/70 bg-primary/10\"\n ></div>\n }\n <div class=\"flex items-center w-full h-full\">\n <div class=\"flex-1 min-w-0\">\n @if (col.accessorKey === \"_selection\") {\n <ui-checkbox\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isIndeterminate()\"\n (checkedChange)=\"toggleAll()\"\n ariaLabel=\"Select all\"\n />\n } @else if (col._isTreeExpanderHost) {\n <!-- gap-2 offsets the sort button's -ms-2, which would otherwise pull it over the expand-all button -->\n <div class=\"flex items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllSubRowsExpanded()\n ? 'Collapse all sub-rows'\n : 'Expand all sub-rows'\n \"\n (click)=\"\n isAllSubRowsExpanded()\n ? collapseAllSubRows()\n : expandAllSubRows(-1)\n \"\n >\n @if (isAllSubRowsExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n @if (col.enableSorting !== false) {\n <ui-data-table-column-header\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n } @else {\n <span>{{ col.header }}</span>\n }\n </div>\n } @else if (col.accessorKey === \"_expander\") {\n <button\n type=\"button\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n isAllExpanded()\n ? 'Collapse all rows'\n : 'Expand all rows'\n \"\n (click)=\"toggleAllExpanded()\"\n >\n @if (isAllExpanded()) {\n <ui-icon name=\"chevrons-up\" size=\"xs\" />\n } @else {\n <ui-icon name=\"chevrons-down\" size=\"xs\" />\n }\n </button>\n } @else if (col.accessorKey === \"_actions\") {\n <span class=\"sr-only\">Actions</span>\n } @else if (col.headerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.headerTemplate;\n context: { $implicit: col }\n \"\n ></ng-container>\n } @else if (col.enableSorting !== false) {\n <div class=\"flex items-center gap-2\">\n <!-- min-w-0: a narrow column truncates its title instead of sliding it under the filter and menu buttons -->\n <ui-data-table-column-header\n class=\"min-w-0\"\n [title]=\"col.header\"\n [column]=\"String(col.accessorKey)\"\n [direction]=\"getSortDirection(col.accessorKey)\"\n [sortIndex]=\"getSortIndex(col.accessorKey)\"\n (sortMeta)=\"\n onSortChange(\n col.accessorKey,\n $event.direction,\n $event.multi\n )\n \"\n />\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover [closeOnScroll]=\"true\">\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n } @else {\n <div class=\"flex items-center gap-2\">\n <span>{{ col.header }}</span>\n @if (col.enableFiltering && col.filterComponent) {\n <ui-popover>\n <ui-popover-trigger>\n <button\n class=\"relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 w-8 pointer-coarse:size-11\"\n [class.text-primary]=\"\n isColumnFilterActive(col)\n \"\n [attr.aria-label]=\"'Filter ' + col.header\"\n >\n @if (isColumnFilterActive(col)) {\n <ui-icon\n name=\"filter\"\n size=\"sm\"\n weight=\"solid\"\n />\n } @else {\n <ui-icon name=\"filter\" size=\"sm\" />\n }\n </button>\n </ui-popover-trigger>\n <ui-popover-content\n class=\"w-80 max-w-[calc(100vw-2rem)]\"\n strategy=\"fixed\"\n align=\"end\"\n >\n <div\n [uiComponentOutlet]=\"col.filterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n </ui-popover-content>\n </ui-popover>\n }\n </div>\n }\n </div>\n @if (\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @for (slot of headerActionSlots(); track slot.id) {\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md opacity-0 group-hover/head:opacity-100 touch-visible pointer-coarse:size-11 hover:bg-accent hover:text-accent-foreground transition-opacity\"\n [attr.aria-label]=\"'Column menu for ' + col.header\"\n (click)=\"slot.onClick($event, col)\"\n >\n <ui-icon [name]=\"slot.icon ?? 'more-vertical'\" size=\"xs\" />\n </button>\n }\n }\n </div>\n @if (\n enableColumnResize() &&\n col.accessorKey !== \"_selection\"\n ) {\n <div\n #resizeHandle\n class=\"group/resize absolute top-0 w-4 h-full cursor-col-resize touch-none z-40 select-none\"\n [class.right-0]=\"!isRtl()\"\n [class.translate-x-1/2]=\"!isRtl()\"\n [class.left-0]=\"isRtl()\"\n [class.-translate-x-1/2]=\"isRtl()\"\n (mousedown)=\"onResizeStart($event, col)\"\n (touchstart)=\"onResizeTouchStart($event, col)\"\n (dblclick)=\"onResizeDoubleClick($event, col)\"\n role=\"separator\"\n [attr.aria-label]=\"'Resize ' + col.header + ' column (double-click or double-tap to auto-fit)'\"\n >\n <div\n [class]=\"resizeLineClass(col)\"\n aria-hidden=\"true\"\n ></div>\n </div>\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none\"\n [class]=\"getHeaderClass({ _width: 'auto' })\"\n ></ui-table-head>\n }\n </ui-table-row>\n @if (enableFloatingFilters() && hasAnyFloatingFilter()) {\n <ui-table-row class=\"border-0\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-head\n [role]=\"hasFloatingFilter(col) ? 'columnheader' : 'presentation'\"\n [style]=\"getHeaderCellStyle(col)\"\n class=\"sticky top-[var(--header-height,41px)] z-20 bg-muted/50 py-1 px-1 overflow-hidden pointer-coarse:h-auto\"\n >\n @if (\n col.floatingFilter !== false &&\n col.accessorKey !== \"_selection\" &&\n col.accessorKey !== \"_expander\" &&\n col.accessorKey !== \"_actions\"\n ) {\n @if (col.floatingFilterComponent) {\n <div\n [uiComponentOutlet]=\"col.floatingFilterComponent\"\n [inputs]=\"getFilterInputs(col)\"\n [outputs]=\"getFilterOutputs(col)\"\n ></div>\n } @else if (col.floatingFilterTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.floatingFilterTemplate;\n context: {\n $implicit: col,\n value: columnFilters()[String(col.accessorKey)],\n change: getFloatingFilterChange(col),\n }\n \"\n ></ng-container>\n } @else if (col.enableFiltering) {\n <ui-input\n class=\"h-7 text-xs\"\n [placeholder]=\"col.header\"\n [ngModel]=\"\n columnFilters()[String(col.accessorKey)] || ''\n \"\n (ngModelChange)=\"\n onColumnFilterChange(col.accessorKey, $event)\n \"\n />\n }\n }\n </ui-table-head>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-head\n role=\"presentation\"\n class=\"flex-1 pointer-events-none sticky top-[var(--header-height,41px)] z-20 bg-muted/50\"\n ></ui-table-head>\n }\n </ui-table-row>\n }\n </ui-table-header>\n <ui-table-body>\n @if (isVirtualScrollActive()) {\n <div\n [style.height.px]=\"virtualPaddingTop()\"\n class=\"flex-shrink-0\"\n ></div>\n @if (enableSubRows()) {\n @for (\n treeRow of virtualVisibleTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [selected]=\"isRowSelected(treeRow.row)\"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"\n treeRow.isLeaf ? null : treeRow.isExpanded\n \"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0\"\n >\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"\n getCellClass(\n col,\n getVirtualRowIndex(i),\n treeRow.depth\n )\n \"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: treeRow,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n }\n } @else {\n @for (\n row of virtualVisibleRows();\n track getRowId()(row);\n let i = $index\n ) {\n <ui-table-row\n #virtualRow\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"getVirtualRowIndex(i)\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.data-virtual-row-index]=\"getVirtualRowIndex(i)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, getVirtualRowIndex(i))\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n [style.height.px]=\"\n virtualVariableRowHeight() ? null : effectiveRowHeight()\n \"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(getVirtualRowIndex(i))) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of pinnedLeftColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingLeft()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (\n col of virtualVisibleMiddleColumns();\n track col.accessorKey\n ) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n <div\n [style.min-width.px]=\"virtualPaddingRight()\"\n class=\"flex-shrink-0\"\n ></div>\n @for (col of pinnedRightColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, getVirtualRowIndex(i))\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n (click)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.enter)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (keydown.space)=\"\n onCellClick(getVirtualRowIndex(i), col, $event)\n \"\n (dblclick)=\"\n onCellDblClick(getVirtualRowIndex(i), col, $event)\n \"\n (touchend)=\"\n onCellTouchEnd($event, getVirtualRowIndex(i), col)\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: row,\n rowIndex: getVirtualRowIndex(i),\n treeRow: null,\n recycle: virtualRecycleComponents(),\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n @if (virtualTotalRows() === 0) {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <div\n [style.height.px]=\"virtualPaddingBottom()\"\n class=\"flex-shrink-0\"\n ></div>\n } @else if (enableSubRows()) {\n @if (processedTreeRows().length > 0) {\n @for (\n treeRow of processedTreeRows();\n track getRowId()(treeRow.row);\n let i = $index\n ) {\n <ui-table-row\n [selected]=\"isRowSelected(treeRow.row)\"\n [attr.data-disabled]=\"isDisabled(treeRow.row) || null\"\n [class.opacity-50]=\"isDisabled(treeRow.row)\"\n [class.opacity-30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-2]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(treeRow.row)\"\n [class.ring-inset]=\"isRowBeingDragged(treeRow.row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(treeRow.row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(treeRow.row)\"\n [attr.data-depth]=\"treeRow.depth\"\n [attr.aria-level]=\"treeRow.depth + 1\"\n [attr.aria-expanded]=\"treeRow.isLeaf ? null : treeRow.isExpanded\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(treeRow.row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, treeRow.row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0 relative\"\n >\n @switch (getDropEdge(i)) {\n @case ('top') {\n <div class=\"pointer-events-none absolute inset-x-0 top-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('bottom') {\n <div class=\"pointer-events-none absolute inset-x-0 bottom-0 z-30 h-0.5 bg-primary shadow-[0_0_4px_0] shadow-primary\"></div>\n }\n @case ('on') {\n <div class=\"pointer-events-none absolute inset-0 z-30 border-2 border-primary/50 rounded-sm bg-primary/5\"></div>\n }\n }\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, i, treeRow.depth)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getTreeCellStyle(col, treeRow.depth)\"\n (click)=\"onCellClick(i, col, $event)\"\n (keydown.enter)=\"onCellClick(i, col, $event)\"\n (keydown.space)=\"onCellClick(i, col, $event)\"\n (dblclick)=\"onCellDblClick(i, col, $event)\"\n (touchend)=\"onCellTouchEnd($event, i, col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: treeRow.row,\n rowIndex: i,\n treeRow: treeRow,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(treeRow.row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n rowDetailTpl;\n context: { $implicit: treeRow.row }\n \"\n ></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (groupingActive()) {\n @if (pagedGroupedDisplayRows().length > 0) {\n @for (\n displayRow of pagedGroupedDisplayRows();\n track groupTrackBy(displayRow)\n ) {\n @if (isGroupRow(displayRow)) {\n <ui-table-row\n class=\"border-0 bg-muted/40 cursor-pointer select-none\"\n data-slot=\"table-group-row\"\n [attr.data-group-key]=\"displayRow.groupKey\"\n [attr.aria-expanded]=\"!displayRow.collapsed\"\n (click)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.enter)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n (keydown.space)=\"toggleGroupCollapsed(displayRow.groupKey)\"\n >\n <ui-table-cell\n class=\"flex-1 border-b font-medium\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n <div class=\"flex flex-wrap items-center gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md hover:bg-accent hover:text-accent-foreground pointer-coarse:size-11\"\n [attr.aria-label]=\"\n displayRow.collapsed ? 'Expand group' : 'Collapse group'\n \"\n (click)=\"\n $event.stopPropagation();\n toggleGroupCollapsed(displayRow.groupKey)\n \"\n >\n <ui-icon\n [name]=\"isRtl() ? 'chevron-left' : 'chevron-right'\"\n size=\"xs\"\n class=\"transition-transform duration-200\"\n [class.rotate-90]=\"!displayRow.collapsed && !isRtl()\"\n [class.-rotate-90]=\"!displayRow.collapsed && isRtl()\"\n />\n </button>\n <span class=\"truncate\">{{ groupRowValueLabel(displayRow) }}</span>\n <span class=\"text-xs text-muted-foreground\">({{ displayRow.count }})</span>\n @if (groupAggregates()) {\n @for (entry of displayRow.aggregates | keyvalue: keepGroupAggregateOrder; track entry.key) {\n <span class=\"text-xs text-muted-foreground\">\n {{ groupAggregateLabel(entry.key) }}: {{ entry.value }}\n </span>\n }\n }\n </div>\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [selected]=\"isRowSelected(displayRow.row)\"\n [attr.data-disabled]=\"isDisabled(displayRow.row) || null\"\n [class.opacity-50]=\"isDisabled(displayRow.row)\"\n [attr.data-row-index]=\"displayRow.index\"\n [attr.data-row-id]=\"getRowId()(displayRow.row)\"\n data-slot=\"table-group-data-row\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col, displayRow.index)\"\n [attr.data-column]=\"String(col.accessorKey)\"\n [style]=\"getCellStyle(col)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n cellTpl;\n context: {\n $implicit: col,\n row: displayRow.row,\n rowIndex: displayRow.index,\n treeRow: null,\n recycle: false,\n }\n \"\n ></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n [class]=\"getCellClass({ _width: 'auto' })\"\n ></ui-table-cell>\n }\n </ui-table-row>\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n } @else if (processedData().length > 0) {\n @for (\n row of (dragPreviewData() ?? processedData());\n track getRowId()(row);\n let i = $index\n ) {\n @if (isFullWidthRow(row)) {\n <ui-table-row\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n class=\"border-0\"\n >\n <ui-table-cell\n class=\"flex-1 border-b\"\n style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\"\n >\n @if (fullWidthRowTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n fullWidthRowTemplate();\n context: { $implicit: row, index: i }\n \"\n ></ng-container>\n } @else if (fullWidthRowComponent()) {\n <div\n [uiComponentOutlet]=\"fullWidthRowComponent()!\"\n [inputs]=\"{ row: row, index: i }\"\n ></div>\n }\n </ui-table-cell>\n </ui-table-row>\n } @else {\n <ui-table-row\n [selected]=\"isRowSelected(row)\"\n [attr.data-disabled]=\"isDisabled(row) || null\"\n [class.opacity-50]=\"isDisabled(row)\"\n [class.opacity-30]=\"isRowBeingDragged(row)\"\n [class.ring-2]=\"isRowBeingDragged(row)\"\n [class.ring-primary/30]=\"isRowBeingDragged(row)\"\n [class.ring-inset]=\"isRowBeingDragged(row)\"\n [class.bg-primary/5]=\"isRowBeingDragged(row)\"\n [attr.data-row-index]=\"i\"\n [attr.data-row-id]=\"getRowId()(row)\"\n [attr.draggable]=\"enableRowDrag() && !isDisabled(row) ? 'true' : null\"\n (dragstart)=\"onRowDragStart($event, row)\"\n (dragover)=\"onRowDragOver($event, i)\"\n (drop)=\"onRowDrop($event)\"\n (dragend)=\"onRowDragEnd()\"\n class=\"border-0\"\n >\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell [class]=\"getCellClass(col, i)\" [attr.data-column]=\"String(col.accessorKey)\" [style]=\"getCellStyle(col)\" (click)=\"onCellClick(i, col, $event)\" (keydown.enter)=\"onCellClick(i, col, $event)\" (keydown.space)=\"onCellClick(i, col, $event)\" (dblclick)=\"onCellDblClick(i, col, $event)\" (touchend)=\"onCellTouchEnd($event, i, col)\">\n <ng-container *ngTemplateOutlet=\"cellTpl; context: { $implicit: col, row: row, rowIndex: i, treeRow: null, recycle: false }\"></ng-container>\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell class=\"flex-1 pointer-events-none\" [class]=\"getCellClass({ _width: 'auto' })\"></ui-table-cell>\n }\n </ui-table-row>\n @if (enableRowExpansion() && isRowExpanded(row)) {\n <ui-table-row class=\"border-0 bg-muted/20\">\n <ui-table-cell class=\"flex-1 border-b\" style=\"min-width: 0; max-width: none; width: 100%; flex-basis: 100%;\">\n <ng-container *ngTemplateOutlet=\"rowDetailTpl; context: { $implicit: row }\"></ng-container>\n </ui-table-cell>\n </ui-table-row>\n }\n }\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"emptyStateTpl\"></ng-container>\n }\n <!-- A spacer that stretches the body to fill the container. It holds\n no data and cannot be reached, so it is hidden from assistive\n tech rather than counted as a row of the grid. -->\n <ui-table-row class=\"h-full\" aria-hidden=\"true\">\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [class]=\"getCellClass(col)\"\n [style]=\"getCellStyle(col)\"\n class=\"bg-background border-0 p-0\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </ui-table-body>\n @if (hasFooter()) {\n <div\n class=\"sticky bottom-0 z-20 bg-background border-t\"\n data-slot=\"table-footer\"\n >\n <ui-table-row>\n @for (col of enhancedColumns(); track col.accessorKey) {\n <ui-table-cell\n [style]=\"getCellStyle(col)\"\n class=\"whitespace-nowrap overflow-hidden text-ellipsis text-sm font-medium text-muted-foreground\"\n >\n @if (col.footerComponent) {\n <div\n [uiComponentOutlet]=\"col.footerComponent\"\n [inputs]=\"{\n column: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\"\n ></div>\n } @else if (col.footerTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n col.footerTemplate;\n context: {\n $implicit: col,\n rows: filteredData(),\n value:\n footerValues().get(String(col.accessorKey)) || '',\n }\n \"\n ></ng-container>\n } @else {\n {{ footerValues().get(String(col.accessorKey)) || \"\" }}\n }\n </ui-table-cell>\n }\n @if (!hasFlexibleColumns()) {\n <ui-table-cell\n class=\"flex-1 pointer-events-none\"\n ></ui-table-cell>\n }\n </ui-table-row>\n </div>\n }\n </ui-table>\n\n @if (enableFillHandle() && fillHandlePosition(); as pos) {\n <span\n data-slot=\"fill-handle\"\n class=\"absolute z-20 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 cursor-crosshair rounded-[2px] border border-background bg-primary\"\n style=\"touch-action: none;\"\n aria-hidden=\"true\"\n [style.top.px]=\"pos.top\"\n [style.left.px]=\"pos.left\"\n (mousedown)=\"onFillHandleStart($event)\"\n (touchstart)=\"onFillHandleStart($event)\"\n ></span>\n }\n\n @if (enableRangeActions() && rangeSelectionStats(); as stats) {\n <div\n data-slot=\"range-actions\"\n class=\"sticky bottom-0 z-20 flex max-w-[calc(100vw-2rem)] flex-wrap items-center gap-x-4 gap-y-1 border-t bg-background/95 px-3 py-1.5 text-xs backdrop-blur-sm\"\n >\n <span class=\"text-muted-foreground\">{{ rangeLabels().count }}: <span class=\"text-foreground font-medium\">{{ stats.count }}</span></span>\n @if (stats.numericCount > 0) {\n <span class=\"text-muted-foreground\">{{ rangeLabels().sum }}: <span class=\"text-foreground font-medium\">{{ stats.sum }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().avg }}: <span class=\"text-foreground font-medium\">{{ stats.avg }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().min }}: <span class=\"text-foreground font-medium\">{{ stats.min }}</span></span>\n <span class=\"text-muted-foreground\">{{ rangeLabels().max }}: <span class=\"text-foreground font-medium\">{{ stats.max }}</span></span>\n @if (rangeChartPayload()) {\n <ui-button\n size=\"sm\"\n variant=\"outline\"\n class=\"ms-auto h-6 px-2 pointer-coarse:h-11\"\n [ariaLabel]=\"rangeLabels().chart\"\n (click)=\"openRangeChart()\"\n >\n <ui-icon name=\"bar-chart-3\" size=\"xs\" class=\"me-1\" />{{ rangeLabels().chart }}\n </ui-button>\n }\n }\n </div>\n }\n </div>\n\n @if (showPagination()) {\n <ui-data-table-pagination\n class=\"flex-none\"\n [total]=\"activeTotalItems()\"\n [state]=\"paginationState()\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [showPageSizeSelector]=\"showPageSizeSelector()\"\n [rowsPerPageLabel]=\"rowsPerPageLabel()\"\n [pageLabel]=\"pageLabel()\"\n [ofLabel]=\"ofLabel()\"\n (paginationChange)=\"onPaginationChange($event)\"\n />\n }\n </div>\n } <!-- end @else skeleton -->\n", styles: [":host([data-ui-theme=\"neutral\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=neutral]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"zinc\"]){--primary: oklch(.205 0 0);--primary-foreground: oklch(.985 0 0);--ring: oklch(.708 0 0)}:host-context(.dark)[data-ui-theme=zinc]{--primary: oklch(.985 0 0);--primary-foreground: oklch(.205 0 0);--ring: oklch(.708 0 0)}:host([data-ui-theme=\"slate\"]){--primary: oklch(.208 .042 265.755);--primary-foreground: oklch(.984 .003 247.858);--ring: oklch(.704 .04 256.788)}:host-context(.dark)[data-ui-theme=slate]{--primary: oklch(.929 .013 255.508);--primary-foreground: oklch(.208 .042 265.755);--ring: oklch(.704 .04 256.788)}:host([data-ui-theme=\"stone\"]){--primary: oklch(.216 .006 56.043);--primary-foreground: oklch(.985 .001 106.423);--ring: oklch(.709 .01 56.259)}:host-context(.dark)[data-ui-theme=stone]{--primary: oklch(.923 .003 48.717);--primary-foreground: oklch(.216 .006 56.043);--ring: oklch(.553 .013 58.071)}:host([data-ui-theme=\"gray\"]){--primary: oklch(.21 .028 264.532);--primary-foreground: oklch(.985 .002 247.839);--ring: oklch(.707 .022 264.436)}:host-context(.dark)[data-ui-theme=gray]{--primary: oklch(.928 .006 264.531);--primary-foreground: oklch(.21 .028 264.532);--ring: oklch(.551 .027 264.364)}:host([data-ui-theme=\"red\"]){--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host-context(.dark)[data-ui-theme=red]{--primary: oklch(.577 .245 27.325);--primary-foreground: oklch(.985 0 0);--ring: oklch(.577 .245 27.325)}:host([data-ui-theme=\"rose\"]){--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host-context(.dark)[data-ui-theme=rose]{--primary: oklch(.645 .246 16.439);--primary-foreground: oklch(.985 0 0);--ring: oklch(.645 .246 16.439)}:host([data-ui-theme=\"orange\"]){--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host-context(.dark)[data-ui-theme=orange]{--primary: oklch(.646 .222 41.116);--primary-foreground: oklch(.985 0 0);--ring: oklch(.646 .222 41.116)}:host([data-ui-theme=\"green\"]){--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host-context(.dark)[data-ui-theme=green]{--primary: oklch(.623 .214 131.655);--primary-foreground: oklch(.985 0 0);--ring: oklch(.623 .214 131.655)}:host([data-ui-theme=\"blue\"]){--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host-context(.dark)[data-ui-theme=blue]{--primary: oklch(.546 .245 262.881);--primary-foreground: oklch(.985 0 0);--ring: oklch(.546 .245 262.881)}:host([data-ui-theme=\"yellow\"]){--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host-context(.dark)[data-ui-theme=yellow]{--primary: oklch(.82 .185 84.67);--primary-foreground: oklch(.205 0 0);--ring: oklch(.82 .185 84.67)}:host([data-ui-theme=\"violet\"]){--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host-context(.dark)[data-ui-theme=violet]{--primary: oklch(.558 .288 302.321);--primary-foreground: oklch(.985 0 0);--ring: oklch(.558 .288 302.321)}:host([data-ui-theme=\"amber\"]){--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}:host-context(.dark)[data-ui-theme=amber]{--primary: oklch(.77 .16 70);--primary-foreground: oklch(.145 0 0);--ring: oklch(.77 .16 70)}@layer components{@media(hover:hover){[data-slot=table-row]:hover>.pinned-cell{background-image:linear-gradient(color-mix(in oklab,var(--muted) 50%,transparent),color-mix(in oklab,var(--muted) 50%,transparent))}}[data-slot=table-row][data-state=selected]>.pinned-cell{background-image:linear-gradient(var(--muted),var(--muted))}}\n"] }]
15632
15678
  }], 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", { ...{
15633
15679
  read: ElementRef,
15634
15680
  }, 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 }] }] } });