@ithouse-bd/ngx-table 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { NgClass, NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { input, Directive, model, output, contentChildren, computed, signal, effect, untracked, HostListener, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { input, Directive, inject, ElementRef, model, output, contentChildren, computed, signal, effect, untracked, afterNextRender, HostListener, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
 
5
5
  /**
6
6
  * Custom cell renderer.
@@ -126,6 +126,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.34", ngImpo
126
126
  type: Directive,
127
127
  args: [{ selector: '[ithTableRowMenu]' }]
128
128
  }], ctorParameters: () => [{ type: i0.TemplateRef }] });
129
+ /**
130
+ * Expandable row content, rendered on its own full-width row under the row.
131
+ *
132
+ * ```html
133
+ * <ng-template ithTableRowDetail let-row let-close="close">
134
+ * <div class="detail">{{ row.email }}</div>
135
+ * </ng-template>
136
+ * ```
137
+ */
138
+ class TableRowDetailDirective {
139
+ template;
140
+ constructor(template) {
141
+ this.template = template;
142
+ }
143
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.34", ngImport: i0, type: TableRowDetailDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
144
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.34", type: TableRowDetailDirective, isStandalone: true, selector: "[ithTableRowDetail]", ngImport: i0 });
145
+ }
146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.34", ngImport: i0, type: TableRowDetailDirective, decorators: [{
147
+ type: Directive,
148
+ args: [{ selector: '[ithTableRowDetail]' }]
149
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
129
150
 
130
151
  /** Read a dot-path value (`'a.b.c'`) from an object; `undefined` when a link is missing. */
131
152
  function getPathValue(source, path) {
@@ -191,7 +212,204 @@ function isInteractiveTarget(target) {
191
212
  return !!target.closest('input, textarea, select, button, a, [contenteditable="true"], [role="button"]');
192
213
  }
193
214
 
215
+ /**
216
+ * Tiny, dependency-free `.xlsx` writer.
217
+ *
218
+ * An xlsx file is a ZIP container with a handful of XML parts. Everything here is
219
+ * written with STORE (no compression), which is valid and keeps the code small, so the
220
+ * table can offer real Excel output without pulling in a spreadsheet library.
221
+ */
222
+ const CRC_TABLE = (() => {
223
+ const table = new Uint32Array(256);
224
+ for (let index = 0; index < 256; index++) {
225
+ let value = index;
226
+ for (let bit = 0; bit < 8; bit++) {
227
+ value = value & 1 ? 0xedb88320 ^ (value >>> 1) : value >>> 1;
228
+ }
229
+ table[index] = value >>> 0;
230
+ }
231
+ return table;
232
+ })();
233
+ function crc32(bytes) {
234
+ let crc = 0xffffffff;
235
+ for (let index = 0; index < bytes.length; index++) {
236
+ crc = CRC_TABLE[(crc ^ bytes[index]) & 0xff] ^ (crc >>> 8);
237
+ }
238
+ return (crc ^ 0xffffffff) >>> 0;
239
+ }
240
+ function toBytes(text) {
241
+ return new TextEncoder().encode(text);
242
+ }
243
+ /** Build a ZIP archive from plain (stored) entries. */
244
+ function zip(entries) {
245
+ const localParts = [];
246
+ const centralParts = [];
247
+ let offset = 0;
248
+ for (const entry of entries) {
249
+ const nameBytes = toBytes(entry.name);
250
+ const crc = crc32(entry.data);
251
+ const size = entry.data.length;
252
+ const local = new Uint8Array(30 + nameBytes.length);
253
+ const localView = new DataView(local.buffer);
254
+ localView.setUint32(0, 0x04034b50, true); // local file header
255
+ localView.setUint16(4, 20, true); // version needed
256
+ localView.setUint16(6, 0x0800, true); // UTF-8 names
257
+ localView.setUint16(8, 0, true); // stored
258
+ localView.setUint16(10, 0, true); // time
259
+ localView.setUint16(12, 0x21, true); // 1980-01-01
260
+ localView.setUint32(14, crc, true);
261
+ localView.setUint32(18, size, true);
262
+ localView.setUint32(22, size, true);
263
+ localView.setUint16(26, nameBytes.length, true);
264
+ localView.setUint16(28, 0, true);
265
+ local.set(nameBytes, 30);
266
+ const central = new Uint8Array(46 + nameBytes.length);
267
+ const centralView = new DataView(central.buffer);
268
+ centralView.setUint32(0, 0x02014b50, true); // central directory
269
+ centralView.setUint16(4, 20, true); // version made by
270
+ centralView.setUint16(6, 20, true); // version needed
271
+ centralView.setUint16(8, 0x0800, true);
272
+ centralView.setUint16(10, 0, true);
273
+ centralView.setUint16(12, 0, true);
274
+ centralView.setUint16(14, 0x21, true);
275
+ centralView.setUint32(16, crc, true);
276
+ centralView.setUint32(20, size, true);
277
+ centralView.setUint32(24, size, true);
278
+ centralView.setUint16(28, nameBytes.length, true);
279
+ centralView.setUint32(42, offset, true);
280
+ central.set(nameBytes, 46);
281
+ localParts.push(local, entry.data);
282
+ centralParts.push(central);
283
+ offset += local.length + size;
284
+ }
285
+ const centralSize = centralParts.reduce((total, part) => total + part.length, 0);
286
+ const end = new Uint8Array(22);
287
+ const endView = new DataView(end.buffer);
288
+ endView.setUint32(0, 0x06054b50, true); // end of central directory
289
+ endView.setUint16(8, entries.length, true);
290
+ endView.setUint16(10, entries.length, true);
291
+ endView.setUint32(12, centralSize, true);
292
+ endView.setUint32(16, offset, true);
293
+ const all = [...localParts, ...centralParts, end];
294
+ const total = all.reduce((size, part) => size + part.length, 0);
295
+ const output = new Uint8Array(total);
296
+ let cursor = 0;
297
+ for (const part of all) {
298
+ output.set(part, cursor);
299
+ cursor += part.length;
300
+ }
301
+ return output;
302
+ }
303
+ function escapeXml(value) {
304
+ return value
305
+ .replace(/&/g, '&amp;')
306
+ .replace(/</g, '&lt;')
307
+ .replace(/>/g, '&gt;')
308
+ .replace(/"/g, '&quot;')
309
+ .replace(/'/g, '&apos;');
310
+ }
311
+ function columnName(index) {
312
+ let name = '';
313
+ let current = index;
314
+ while (current >= 0) {
315
+ name = String.fromCharCode((current % 26) + 65) + name;
316
+ current = Math.floor(current / 26) - 1;
317
+ }
318
+ return name;
319
+ }
320
+ /** Build an `.xlsx` workbook (single sheet, frozen + filtered header row). */
321
+ function buildXlsxBlob(options) {
322
+ const { sheetName, header, rows } = options;
323
+ const widths = options.columnWidths ??
324
+ header.map((title, index) => {
325
+ const longest = rows.reduce((max, row) => Math.max(max, (row[index] ?? '').length), title.length);
326
+ return Math.min(60, Math.max(8, longest + 2));
327
+ });
328
+ const cell = (value, ref, style) => {
329
+ if (value === '')
330
+ return '';
331
+ return `<c r="${ref}" t="inlineStr" s="${style}"><is><t xml:space="preserve">${escapeXml(value)}</t></is></c>`;
332
+ };
333
+ const headerXml = header
334
+ .map((value, index) => `<c r="${columnName(index)}1" t="inlineStr" s="1"><is><t xml:space="preserve">${escapeXml(value)}</t></is></c>`)
335
+ .join('');
336
+ const rowsXml = rows
337
+ .map((row, rowIndex) => {
338
+ const cells = row
339
+ .map((value, columnIndex) => cell(value ?? '', `${columnName(columnIndex)}${rowIndex + 2}`, 0))
340
+ .join('');
341
+ return `<row r="${rowIndex + 2}">${cells}</row>`;
342
+ })
343
+ .join('');
344
+ const lastColumn = columnName(Math.max(0, header.length - 1));
345
+ const lastRow = rows.length + 1;
346
+ const worksheet = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` +
347
+ `<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">` +
348
+ `<sheetViews><sheetView workbookViewId="0">` +
349
+ `<pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/>` +
350
+ `</sheetView></sheetViews>` +
351
+ `<cols>${widths
352
+ .map((width, index) => `<col min="${index + 1}" max="${index + 1}" width="${width}" customWidth="1"/>`)
353
+ .join('')}</cols>` +
354
+ `<sheetData><row r="1">${headerXml}</row>${rowsXml}</sheetData>` +
355
+ `<autoFilter ref="A1:${lastColumn}${lastRow}"/>` +
356
+ `</worksheet>`;
357
+ const workbook = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` +
358
+ `<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" ` +
359
+ `xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">` +
360
+ `<sheets><sheet name="${escapeXml(sheetName).slice(0, 31)}" sheetId="1" r:id="rId1"/></sheets>` +
361
+ `</workbook>`;
362
+ const workbookRels = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` +
363
+ `<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">` +
364
+ `<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/>` +
365
+ `<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>` +
366
+ `</Relationships>`;
367
+ const rootRels = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` +
368
+ `<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">` +
369
+ `<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>` +
370
+ `</Relationships>`;
371
+ const contentTypes = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` +
372
+ `<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">` +
373
+ `<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>` +
374
+ `<Default Extension="xml" ContentType="application/xml"/>` +
375
+ `<Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/>` +
376
+ `<Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>` +
377
+ `<Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>` +
378
+ `</Types>`;
379
+ const styles = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>` +
380
+ `<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">` +
381
+ `<fonts count="2">` +
382
+ `<font><sz val="11"/><name val="Calibri"/></font>` +
383
+ `<font><b/><sz val="11"/><color rgb="FFFFFFFF"/><name val="Calibri"/></font>` +
384
+ `</fonts>` +
385
+ `<fills count="3">` +
386
+ `<fill><patternFill patternType="none"/></fill>` +
387
+ `<fill><patternFill patternType="gray125"/></fill>` +
388
+ `<fill><patternFill patternType="solid"><fgColor rgb="FF5B21B6"/><bgColor indexed="64"/></patternFill></fill>` +
389
+ `</fills>` +
390
+ `<borders count="1"><border/></borders>` +
391
+ `<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>` +
392
+ `<cellXfs count="2">` +
393
+ `<xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>` +
394
+ `<xf numFmtId="0" fontId="1" fillId="2" borderId="0" xfId="0" applyFont="1" applyFill="1" applyAlignment="1"><alignment vertical="center"/></xf>` +
395
+ `</cellXfs>` +
396
+ `</styleSheet>`;
397
+ const archive = zip([
398
+ { name: '[Content_Types].xml', data: toBytes(contentTypes) },
399
+ { name: '_rels/.rels', data: toBytes(rootRels) },
400
+ { name: 'xl/workbook.xml', data: toBytes(workbook) },
401
+ { name: 'xl/_rels/workbook.xml.rels', data: toBytes(workbookRels) },
402
+ { name: 'xl/styles.xml', data: toBytes(styles) },
403
+ { name: 'xl/worksheets/sheet1.xml', data: toBytes(worksheet) },
404
+ ]);
405
+ return new Blob([archive], {
406
+ type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
407
+ });
408
+ }
409
+
194
410
  let tableIdCounter = 0;
411
+ const DEFAULT_COLUMN_WIDTH = 140;
412
+ const MIN_COLUMN_WIDTH = 56;
195
413
  /**
196
414
  * Generic, standalone data table.
197
415
  *
@@ -206,6 +424,7 @@ let tableIdCounter = 0;
206
424
  * ```
207
425
  */
208
426
  class TableComponent {
427
+ host = inject(ElementRef);
209
428
  /** Unique prefix for generated DOM ids. */
210
429
  idBase = `ith-table-${tableIdCounter++}`;
211
430
  /* ---------------------------------------------------------------- */
@@ -259,6 +478,8 @@ class TableComponent {
259
478
  /** How many numbered page buttons are rendered. */
260
479
  maxPageButtons = input(5, ...(ngDevMode ? [{ debugName: "maxPageButtons" }] : []));
261
480
  showFooter = input(true, ...(ngDevMode ? [{ debugName: "showFooter" }] : []));
481
+ /** Render removable chips for the active search term and column filters. */
482
+ showFilterChips = input(true, ...(ngDevMode ? [{ debugName: "showFilterChips" }] : []));
262
483
  /* ---------------------------------------------------------------- */
263
484
  /* Selection */
264
485
  /* ---------------------------------------------------------------- */
@@ -268,6 +489,8 @@ class TableComponent {
268
489
  selected = model([], ...(ngDevMode ? [{ debugName: "selected" }] : []));
269
490
  /** Selecting a row by clicking anywhere on it (not only the checkbox). */
270
491
  selectOnRowClick = input(false, ...(ngDevMode ? [{ debugName: "selectOnRowClick" }] : []));
492
+ /** Bulk actions rendered in the selection bar once rows are selected. */
493
+ selectionActions = input([], ...(ngDevMode ? [{ debugName: "selectionActions" }] : []));
271
494
  /* ---------------------------------------------------------------- */
272
495
  /* Row actions / presentation */
273
496
  /* ---------------------------------------------------------------- */
@@ -294,6 +517,20 @@ class TableComponent {
294
517
  showColumnPicker = input(false, ...(ngDevMode ? [{ debugName: "showColumnPicker" }] : []));
295
518
  /** Show the comfortable/compact density toggle in the toolbar. */
296
519
  showDensityToggle = input(false, ...(ngDevMode ? [{ debugName: "showDensityToggle" }] : []));
520
+ /** Show the per-column header menu (sort, pin, autosize, hide). */
521
+ showColumnMenu = input(true, ...(ngDevMode ? [{ debugName: "showColumnMenu" }] : []));
522
+ /** Show the toolbar "Export" button (CSV download). */
523
+ showExport = input(false, ...(ngDevMode ? [{ debugName: "showExport" }] : []));
524
+ /** Base file name used by `downloadCsv()`. */
525
+ exportFileName = input('table', ...(ngDevMode ? [{ debugName: "exportFileName" }] : []));
526
+ /** Show the toolbar "Views" menu for saving/loading named presets. */
527
+ showViews = input(false, ...(ngDevMode ? [{ debugName: "showViews" }] : []));
528
+ /** Allow dragging the column separator to resize a column. */
529
+ resizable = input(false, ...(ngDevMode ? [{ debugName: "resizable" }] : []));
530
+ /** Allow dragging a header onto another header to reorder columns. */
531
+ reorderable = input(false, ...(ngDevMode ? [{ debugName: "reorderable" }] : []));
532
+ /** Arrow-key navigation across cells with a single tab stop. */
533
+ keyboardNavigation = input(true, ...(ngDevMode ? [{ debugName: "keyboardNavigation" }] : []));
297
534
  /**
298
535
  * localStorage key for the saved column/density preset. When set, the user's
299
536
  * choice is restored on the next visit.
@@ -301,11 +538,22 @@ class TableComponent {
301
538
  storageKey = input('', ...(ngDevMode ? [{ debugName: "storageKey" }] : []));
302
539
  /** Number of placeholder rows rendered while `loading` and there are no rows. */
303
540
  skeletonRows = input(6, ...(ngDevMode ? [{ debugName: "skeletonRows" }] : []));
541
+ /**
542
+ * Minimum number of body rows the grid keeps in view. Rows stay at their natural
543
+ * height, the spare space stays empty, so a table with one row does not collapse
544
+ * into a single line. `0` lets the grid shrink to its content.
545
+ */
546
+ minRows = input(4, ...(ngDevMode ? [{ debugName: "minRows" }] : []));
304
547
  /** Stick the checkbox column to the start edge. */
305
548
  stickySelection = input(false, ...(ngDevMode ? [{ debugName: "stickySelection" }] : []));
306
549
  /** Stick the actions column to the end edge. */
307
550
  stickyActions = input(false, ...(ngDevMode ? [{ debugName: "stickyActions" }] : []));
308
551
  /* ---------------------------------------------------------------- */
552
+ /* Row detail */
553
+ /* ---------------------------------------------------------------- */
554
+ /** How the `#ithTableRowDetail` template is expanded. */
555
+ rowDetailTrigger = input('button', ...(ngDevMode ? [{ debugName: "rowDetailTrigger" }] : []));
556
+ /* ---------------------------------------------------------------- */
309
557
  /* Events */
310
558
  /* ---------------------------------------------------------------- */
311
559
  actionClick = output();
@@ -317,6 +565,14 @@ class TableComponent {
317
565
  /** Visible column keys, emitted whenever the user changes column visibility. */
318
566
  columnsChange = output();
319
567
  densityChange = output();
568
+ /** Full user-chosen layout (hidden, density, order, widths, pinned). */
569
+ columnStateChange = output();
570
+ /** Bulk action clicked in the selection bar. */
571
+ selectionAction = output();
572
+ /** Emitted with the generated CSV text after `downloadCsv()` / the toolbar button. */
573
+ csvExport = output();
574
+ /** Emitted for both downloads (CSV and XLSX) with the produced file. */
575
+ exportFile = output();
320
576
  /* ---------------------------------------------------------------- */
321
577
  /* Custom templates */
322
578
  /* ---------------------------------------------------------------- */
@@ -332,6 +588,9 @@ class TableComponent {
332
588
  rowMenuDirectives = contentChildren(TableRowMenuDirective, ...(ngDevMode ? [{ debugName: "rowMenuDirectives", descendants: true }] : [{
333
589
  descendants: true,
334
590
  }]));
591
+ rowDetailDirectives = contentChildren(TableRowDetailDirective, ...(ngDevMode ? [{ debugName: "rowDetailDirectives", descendants: true }] : [{
592
+ descendants: true,
593
+ }]));
335
594
  cellTemplates = computed(() => {
336
595
  const templates = new Map();
337
596
  for (const directive of this.cellDirectives()) {
@@ -358,6 +617,7 @@ class TableComponent {
358
617
  footerTemplate = computed(() => this.footerDirectives()[0]?.template, ...(ngDevMode ? [{ debugName: "footerTemplate" }] : []));
359
618
  emptyTemplate = computed(() => this.emptyDirectives()[0]?.template, ...(ngDevMode ? [{ debugName: "emptyTemplate" }] : []));
360
619
  rowMenuTemplate = computed(() => this.rowMenuDirectives()[0]?.template, ...(ngDevMode ? [{ debugName: "rowMenuTemplate" }] : []));
620
+ rowDetailTemplate = computed(() => this.rowDetailDirectives()[0]?.template, ...(ngDevMode ? [{ debugName: "rowDetailTemplate" }] : []));
361
621
  /* ---------------------------------------------------------------- */
362
622
  /* Internal state */
363
623
  /* ---------------------------------------------------------------- */
@@ -366,20 +626,69 @@ class TableComponent {
366
626
  /** Columns hidden at runtime (on top of `column.hidden`), persisted via `storageKey`. */
367
627
  hiddenColumnKeys = signal(new Set(), ...(ngDevMode ? [{ debugName: "hiddenColumnKeys" }] : []));
368
628
  density = signal('comfortable', ...(ngDevMode ? [{ debugName: "density" }] : []));
629
+ /** Runtime column order (all column keys, hidden ones included). */
630
+ columnOrder = signal([], ...(ngDevMode ? [{ debugName: "columnOrder" }] : []));
631
+ /** Runtime widths in px, keyed by column key. */
632
+ columnWidths = signal({}, ...(ngDevMode ? [{ debugName: "columnWidths" }] : []));
633
+ /** Runtime pinning, keyed by column key. */
634
+ pinnedKeys = signal({}, ...(ngDevMode ? [{ debugName: "pinnedKeys" }] : []));
635
+ /** Measured header widths, used to offset stacked sticky columns. */
636
+ measuredWidths = signal({}, ...(ngDevMode ? [{ debugName: "measuredWidths" }] : []));
637
+ /** Saved named views. */
638
+ views = signal({}, ...(ngDevMode ? [{ debugName: "views" }] : []));
639
+ activeView = signal(null, ...(ngDevMode ? [{ debugName: "activeView" }] : []));
369
640
  compact = computed(() => this.dense() || this.density() === 'compact', ...(ngDevMode ? [{ debugName: "compact" }] : []));
370
641
  columnPickerOpen = signal(false, ...(ngDevMode ? [{ debugName: "columnPickerOpen" }] : []));
642
+ columnsMenuPos = signal(null, ...(ngDevMode ? [{ debugName: "columnsMenuPos" }] : []));
643
+ viewsOpen = signal(false, ...(ngDevMode ? [{ debugName: "viewsOpen" }] : []));
644
+ viewsMenuPos = signal(null, ...(ngDevMode ? [{ debugName: "viewsMenuPos" }] : []));
645
+ /** Export-format menu; `null` when closed. */
646
+ exportMenuPos = signal(null, ...(ngDevMode ? [{ debugName: "exportMenuPos" }] : []));
647
+ viewNameDraft = signal('', ...(ngDevMode ? [{ debugName: "viewNameDraft" }] : []));
648
+ /** Header menu state; `null` when closed. */
649
+ columnMenu = signal(null, ...(ngDevMode ? [{ debugName: "columnMenu" }] : []));
371
650
  /** Right-click menu position; `null` when closed. */
372
651
  menuState = signal(null, ...(ngDevMode ? [{ debugName: "menuState" }] : []));
373
652
  /** `${rowIndex}:${columnKey}` of the cell that was just copied (shows a check icon). */
374
653
  copiedCell = signal(null, ...(ngDevMode ? [{ debugName: "copiedCell" }] : []));
375
- skeletonIndexes = computed(() => Array.from({ length: Math.max(0, this.skeletonRows()) }, (_, index) => index), ...(ngDevMode ? [{ debugName: "skeletonIndexes" }] : []));
654
+ /** Row keys whose detail panel is open. */
655
+ expandedKeys = signal(new Set(), ...(ngDevMode ? [{ debugName: "expandedKeys" }] : []));
656
+ /** Cell that owns the single tab stop of the grid. */
657
+ focusedCell = signal(null, ...(ngDevMode ? [{ debugName: "focusedCell" }] : []));
658
+ /** Column key being dragged, and the header it hovers. */
659
+ dragKey = signal(null, ...(ngDevMode ? [{ debugName: "dragKey" }] : []));
660
+ dragOverKey = signal(null, ...(ngDevMode ? [{ debugName: "dragOverKey" }] : []));
661
+ /** `true` once the scroll container is scrolled away from the top. */
662
+ scrolled = signal(false, ...(ngDevMode ? [{ debugName: "scrolled" }] : []));
663
+ resizing = null;
376
664
  copyTimer;
665
+ measureHandle;
666
+ presetLoaded = false;
667
+ skeletonIndexes = computed(() => Array.from({ length: Math.max(0, this.skeletonRows()) }, (_, index) => index), ...(ngDevMode ? [{ debugName: "skeletonIndexes" }] : []));
377
668
  constructor() {
378
- this.restorePreset();
379
- // Persist the preset whenever the user changes it.
669
+ // Restore the stored preset once, then persist every later change. Restoring must
670
+ // happen here (not in the constructor body) because `storageKey` is an input and is
671
+ // still empty until the host has bound it.
380
672
  effect(() => {
381
- const preset = { hidden: [...this.hiddenColumnKeys()], density: this.density() };
382
- untracked(() => this.persistPreset(preset));
673
+ const key = this.storageKey();
674
+ const state = this.state();
675
+ void this.views();
676
+ void this.activeView();
677
+ untracked(() => {
678
+ if (!this.presetLoaded) {
679
+ this.presetLoaded = true;
680
+ if (!key)
681
+ return;
682
+ const stored = this.readPreset(key);
683
+ if (stored) {
684
+ this.views.set(stored.views ?? {});
685
+ this.activeView.set(stored.activeView ?? null);
686
+ this.applyState(stored.state);
687
+ return;
688
+ }
689
+ }
690
+ this.persistPreset(key);
691
+ });
383
692
  });
384
693
  // In client mode any change to the query starts again from the first page. In server
385
694
  // mode the consumer owns the page (and fetches on every `pageChange`), so resetting
@@ -406,17 +715,39 @@ class TableComponent {
406
715
  else if (current < 1)
407
716
  untracked(() => this.page.set(1));
408
717
  });
718
+ // Sticky columns stack on measured widths, so re-measure after layout changes.
719
+ effect(() => {
720
+ this.pagedRows();
721
+ this.visibleColumns();
722
+ this.compact();
723
+ this.density();
724
+ untracked(() => this.scheduleMeasure());
725
+ });
726
+ afterNextRender(() => this.scheduleMeasure());
409
727
  }
410
728
  /* ---------------------------------------------------------------- */
411
729
  /* Derived data */
412
730
  /* ---------------------------------------------------------------- */
413
731
  isServer = computed(() => this.mode() === 'server', ...(ngDevMode ? [{ debugName: "isServer" }] : []));
732
+ /** Columns in the user's order (hidden columns keep their slot in the list). */
733
+ orderedColumns = computed(() => {
734
+ const columns = this.columns();
735
+ const order = this.columnOrder();
736
+ if (!order.length)
737
+ return columns;
738
+ const indexOf = new Map(order.map((key, index) => [key, index]));
739
+ return [...columns].sort((a, b) => (indexOf.get(a.key) ?? Number.MAX_SAFE_INTEGER) -
740
+ (indexOf.get(b.key) ?? Number.MAX_SAFE_INTEGER));
741
+ }, ...(ngDevMode ? [{ debugName: "orderedColumns" }] : []));
414
742
  visibleColumns = computed(() => {
415
743
  const hidden = this.hiddenColumnKeys();
416
- return this.columns().filter((column) => !column.hidden && !hidden.has(column.key));
744
+ return this.orderedColumns().filter((column) => !column.hidden && !hidden.has(column.key));
417
745
  }, ...(ngDevMode ? [{ debugName: "visibleColumns" }] : []));
418
746
  selectable = computed(() => this.selectionMode() !== 'none', ...(ngDevMode ? [{ debugName: "selectable" }] : []));
419
747
  hasActionsColumn = computed(() => this.rowActions().length > 0 || !!this.rowActionsTemplate(), ...(ngDevMode ? [{ debugName: "hasActionsColumn" }] : []));
748
+ hasRowDetail = computed(() => !!this.rowDetailTemplate() && this.rowDetailTrigger() !== 'none', ...(ngDevMode ? [{ debugName: "hasRowDetail" }] : []));
749
+ /** Expander cell rendered as the first cell of every row. */
750
+ hasExpander = computed(() => this.hasRowDetail() && this.rowDetailTrigger() === 'button', ...(ngDevMode ? [{ debugName: "hasExpander" }] : []));
420
751
  /** Rows that match the global search and the per-column filters (client mode). */
421
752
  matchingRows = computed(() => {
422
753
  const rows = this.data();
@@ -475,9 +806,44 @@ class TableComponent {
475
806
  }, ...(ngDevMode ? [{ debugName: "allPageSelected" }] : []));
476
807
  somePageSelected = computed(() => !this.allPageSelected() &&
477
808
  this.pagedRows().some((row) => this.selectedKeySet().has(this.rowKey(row))), ...(ngDevMode ? [{ debugName: "somePageSelected" }] : []));
478
- emptyColspan = computed(() => Math.max(1, this.visibleColumns().length + (this.selectable() ? 1 : 0) + (this.hasActionsColumn() ? 1 : 0)), ...(ngDevMode ? [{ debugName: "emptyColspan" }] : []));
809
+ emptyColspan = computed(() => Math.max(1, this.visibleColumns().length +
810
+ (this.selectable() ? 1 : 0) +
811
+ (this.hasActionsColumn() ? 1 : 0) +
812
+ (this.hasExpander() ? 1 : 0)), ...(ngDevMode ? [{ debugName: "emptyColspan" }] : []));
479
813
  hasQuery = computed(() => this.search().trim() !== '' ||
480
814
  Object.values(this.filters()).some((value) => value.trim() !== ''), ...(ngDevMode ? [{ debugName: "hasQuery" }] : []));
815
+ /** Removable chips for the active search term and filters. */
816
+ filterChips = computed(() => {
817
+ const chips = [];
818
+ const term = this.search().trim();
819
+ if (term) {
820
+ chips.push({ kind: 'search', key: '__search', label: 'Search', value: term });
821
+ }
822
+ for (const [key, value] of Object.entries(this.filters())) {
823
+ if (!value.trim())
824
+ continue;
825
+ const column = this.columns().find((candidate) => candidate.key === key);
826
+ const option = this.filterOptionsFor(column ?? { key }).find((candidate) => String(candidate.value) === value);
827
+ chips.push({
828
+ kind: 'filter',
829
+ key,
830
+ label: column?.header ?? key,
831
+ value: option?.label ?? value,
832
+ });
833
+ }
834
+ return chips;
835
+ }, ...(ngDevMode ? [{ debugName: "filterChips" }] : []));
836
+ /** Columns that declare a footer aggregate. */
837
+ hasAggregates = computed(() => this.visibleColumns().some((column) => !!column.aggregate), ...(ngDevMode ? [{ debugName: "hasAggregates" }] : []));
838
+ /** Full user layout, the shape that `storageKey` stores. */
839
+ state = computed(() => ({
840
+ hidden: [...this.hiddenColumnKeys()],
841
+ density: this.density(),
842
+ order: this.columnOrder(),
843
+ widths: this.columnWidths(),
844
+ pinned: this.pinnedKeys(),
845
+ }), ...(ngDevMode ? [{ debugName: "state" }] : []));
846
+ savedViewNames = computed(() => Object.keys(this.views()).sort(), ...(ngDevMode ? [{ debugName: "savedViewNames" }] : []));
481
847
  /* ---------------------------------------------------------------- */
482
848
  /* Sorting API */
483
849
  /* ---------------------------------------------------------------- */
@@ -557,6 +923,17 @@ class TableComponent {
557
923
  this.search.set('');
558
924
  this.clearFilters();
559
925
  }
926
+ /** Remove one chip from the chip row. */
927
+ removeChip(chip) {
928
+ if (chip.kind === 'search') {
929
+ this.clearSearch();
930
+ return;
931
+ }
932
+ const next = { ...this.filters() };
933
+ delete next[chip.key];
934
+ this.filters.set(next);
935
+ this.filterChange.emit(next);
936
+ }
560
937
  /* ---------------------------------------------------------------- */
561
938
  /* Pagination API */
562
939
  /* ---------------------------------------------------------------- */
@@ -646,6 +1023,11 @@ class TableComponent {
646
1023
  deselectRow(row) {
647
1024
  this.toggleRow(row, false);
648
1025
  }
1026
+ /** Click on a selection-bar action. */
1027
+ onSelectionAction(action, event) {
1028
+ event.stopPropagation();
1029
+ this.selectionAction.emit({ action, rows: this.selected() });
1030
+ }
649
1031
  /* ---------------------------------------------------------------- */
650
1032
  /* Row actions */
651
1033
  /* ---------------------------------------------------------------- */
@@ -673,17 +1055,48 @@ class TableComponent {
673
1055
  return;
674
1056
  if (isInteractiveTarget(event.target))
675
1057
  return;
676
- if (!this.rowClickable() && !this.selectOnRowClick())
1058
+ if (!this.rowClickable() && !this.selectOnRowClick() && !this.togglesDetailOnRow())
677
1059
  return;
678
1060
  event.preventDefault();
679
1061
  this.activateRow(row, index, event);
680
1062
  }
681
1063
  /** Shared by mouse and keyboard activation. */
682
1064
  activateRow(row, index, event) {
683
- this.rowClick.emit({ row, index, event });
1065
+ if (this.rowClickable())
1066
+ this.rowClick.emit({ row, index, event });
684
1067
  if (this.selectOnRowClick() && this.selectable()) {
685
1068
  this.toggleRow(row, !this.isSelected(row));
686
1069
  }
1070
+ if (this.togglesDetailOnRow())
1071
+ this.toggleRowDetail(row);
1072
+ }
1073
+ togglesDetailOnRow() {
1074
+ return this.hasRowDetail() && this.rowDetailTrigger() === 'row';
1075
+ }
1076
+ /* ---------------------------------------------------------------- */
1077
+ /* Row detail */
1078
+ /* ---------------------------------------------------------------- */
1079
+ isRowExpanded(row) {
1080
+ return this.expandedKeys().has(String(this.rowKey(row)));
1081
+ }
1082
+ toggleRowDetail(row, event) {
1083
+ event?.stopPropagation();
1084
+ const key = String(this.rowKey(row));
1085
+ const next = new Set(this.expandedKeys());
1086
+ if (next.has(key))
1087
+ next.delete(key);
1088
+ else
1089
+ next.add(key);
1090
+ this.expandedKeys.set(next);
1091
+ }
1092
+ /** `close` callback handed to the `#ithTableRowDetail` template. */
1093
+ rowDetailContext(row, index) {
1094
+ return {
1095
+ $implicit: row,
1096
+ row,
1097
+ index,
1098
+ close: () => this.toggleRowDetail(row),
1099
+ };
687
1100
  }
688
1101
  /* ---------------------------------------------------------------- */
689
1102
  /* Rendering helpers */
@@ -720,7 +1133,11 @@ class TableComponent {
720
1133
  }
721
1134
  /** Flat class list for a header cell (NgClass rejects nested arrays). */
722
1135
  headerClasses(column) {
723
- return [...this.headerClassFor(column), this.stickyClassFor(column)].filter((value) => !!value);
1136
+ return [
1137
+ ...this.headerClassFor(column),
1138
+ this.stickyClassFor(column),
1139
+ this.dragOverKey() === column.key ? 'ith-table-drop-target' : '',
1140
+ ].filter((value) => !!value);
724
1141
  }
725
1142
  filterClasses(column) {
726
1143
  return [this.alignClass(column), this.stickyClassFor(column)].filter((value) => !!value);
@@ -733,42 +1150,80 @@ class TableComponent {
733
1150
  }
734
1151
  columnStyle(column) {
735
1152
  const style = {};
736
- if (column.width)
737
- style['width'] = column.width;
738
- if (column.minWidth)
739
- style['min-width'] = column.minWidth;
740
- if (column.sticky === 'start')
741
- style['left'] = this.stickyStartOffset(column);
742
- if (column.sticky === 'end')
743
- style['right'] = '0px';
1153
+ const width = this.columnWidths()[column.key];
1154
+ if (width) {
1155
+ style['width'] = `${width}px`;
1156
+ style['min-width'] = `${width}px`;
1157
+ style['max-width'] = `${width}px`;
1158
+ }
1159
+ else {
1160
+ if (column.width)
1161
+ style['width'] = column.width;
1162
+ if (column.minWidth)
1163
+ style['min-width'] = column.minWidth;
1164
+ }
1165
+ const pin = this.pinOf(column);
1166
+ if (pin) {
1167
+ const offset = this.stickyOffsets().get(column.key);
1168
+ if (pin === 'start')
1169
+ style['left'] = `${offset ?? 0}px`;
1170
+ else
1171
+ style['right'] = `${offset ?? 0}px`;
1172
+ }
744
1173
  return style;
745
1174
  }
1175
+ /** Runtime pin, falling back to the declared `column.sticky`. */
1176
+ pinOf(column) {
1177
+ return this.pinnedKeys()[column.key] ?? column.sticky ?? null;
1178
+ }
746
1179
  stickyClassFor(column) {
747
- if (column.sticky === 'start')
1180
+ const pin = this.pinOf(column);
1181
+ if (pin === 'start')
748
1182
  return 'ith-table-sticky-start';
749
- if (column.sticky === 'end')
1183
+ if (pin === 'end')
750
1184
  return 'ith-table-sticky-end';
751
1185
  return '';
752
1186
  }
1187
+ /**
1188
+ * Left/right offsets for stacked sticky columns. Depends on measured widths, so it
1189
+ * stays correct for auto-sized and resized columns.
1190
+ */
1191
+ stickyOffsets = computed(() => {
1192
+ const offsets = new Map();
1193
+ const measured = this.measuredWidths();
1194
+ const declared = this.columnWidths();
1195
+ const widthOf = (column) => declared[column.key] ?? measured[column.key] ?? this.declaredWidthPx(column);
1196
+ let start = this.selectable() && this.stickySelection() ? 46 : 0;
1197
+ for (const column of this.visibleColumns()) {
1198
+ if (this.pinOf(column) !== 'start')
1199
+ continue;
1200
+ offsets.set(column.key, start);
1201
+ start += widthOf(column);
1202
+ }
1203
+ let end = this.hasActionsColumn() && this.stickyActions() ? this.actionsWidthPx() : 0;
1204
+ for (const column of [...this.visibleColumns()].reverse()) {
1205
+ if (this.pinOf(column) !== 'end')
1206
+ continue;
1207
+ offsets.set(column.key, end);
1208
+ end += widthOf(column);
1209
+ }
1210
+ return offsets;
1211
+ }, ...(ngDevMode ? [{ debugName: "stickyOffsets" }] : []));
753
1212
  /** Full text for the native tooltip; `null` disables it for a column. */
754
1213
  tooltipText(row, column, index) {
755
1214
  if (column.tooltip === false)
756
1215
  return null;
757
1216
  return this.cellText(row, column, index) || null;
758
1217
  }
759
- stickyStartOffset(column) {
760
- let offset = this.selectable() && this.stickySelection() ? 44 : 0;
761
- for (const candidate of this.visibleColumns()) {
762
- if (candidate.key === column.key)
763
- break;
764
- if (candidate.sticky === 'start')
765
- offset += this.columnWidthPx(candidate);
766
- }
767
- return `${offset}px`;
768
- }
769
- columnWidthPx(column) {
1218
+ declaredWidthPx(column) {
770
1219
  const width = column.width ?? '';
771
- return width.endsWith('px') ? Number.parseFloat(width) || 0 : 0;
1220
+ if (width.endsWith('px'))
1221
+ return Number.parseFloat(width) || DEFAULT_COLUMN_WIDTH;
1222
+ return DEFAULT_COLUMN_WIDTH;
1223
+ }
1224
+ actionsWidthPx() {
1225
+ const width = this.actionsWidth();
1226
+ return width.endsWith('px') ? Number.parseFloat(width) || 120 : 120;
772
1227
  }
773
1228
  /* ---------------------------------------------------------------- */
774
1229
  /* Copy / context menu */
@@ -790,17 +1245,6 @@ class TableComponent {
790
1245
  isCellCopied(index, column) {
791
1246
  return this.copiedCell() === `${index}:${column.key}`;
792
1247
  }
793
- /** Ctrl/Cmd+C while a cell has focus copies that cell. */
794
- onCellKeydown(row, column, index, event) {
795
- if (!this.copyable())
796
- return;
797
- if (event.key.toLowerCase() !== 'c' || !(event.ctrlKey || event.metaKey))
798
- return;
799
- if (isInteractiveTarget(event.target))
800
- return;
801
- event.preventDefault();
802
- this.copyCell(row, column, index);
803
- }
804
1248
  onRowContextMenu(row, index, event) {
805
1249
  this.rowContextMenu.emit({ row, index, x: event.clientX, y: event.clientY, event });
806
1250
  if (!this.rowMenuTemplate())
@@ -826,6 +1270,105 @@ class TableComponent {
826
1270
  this.menuState.set(null);
827
1271
  }
828
1272
  /* ---------------------------------------------------------------- */
1273
+ /* Keyboard grid navigation */
1274
+ /* ---------------------------------------------------------------- */
1275
+ /** `tabindex` of a body cell: one tab stop for the whole grid. */
1276
+ cellTabIndex(rowIndex, colIndex) {
1277
+ if (!this.keyboardNavigation())
1278
+ return this.copyable() ? 0 : null;
1279
+ const focused = this.focusedCell();
1280
+ if (!focused)
1281
+ return rowIndex === 0 && colIndex === 0 ? 0 : -1;
1282
+ return focused.row === rowIndex && focused.col === colIndex ? 0 : -1;
1283
+ }
1284
+ onCellFocus(rowIndex, colIndex) {
1285
+ const current = this.focusedCell();
1286
+ if (current && current.row === rowIndex && current.col === colIndex)
1287
+ return;
1288
+ this.focusedCell.set({ row: rowIndex, col: colIndex });
1289
+ }
1290
+ /** Copy shortcut plus arrow/Home/End/Page navigation for the cell grid. */
1291
+ onCellKeydown(column, rowIndex, colIndex, event) {
1292
+ if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'c') {
1293
+ if (!this.copyable() || isInteractiveTarget(event.target))
1294
+ return;
1295
+ event.preventDefault();
1296
+ const row = this.pagedRows()[rowIndex];
1297
+ if (row)
1298
+ this.copyCell(row, column, rowIndex);
1299
+ return;
1300
+ }
1301
+ if (!this.keyboardNavigation() || event.altKey)
1302
+ return;
1303
+ const rows = this.pagedRows().length;
1304
+ const cols = this.visibleColumns().length;
1305
+ if (!rows || !cols)
1306
+ return;
1307
+ const lastRow = rows - 1;
1308
+ const lastCol = cols - 1;
1309
+ let row = rowIndex;
1310
+ let col = colIndex;
1311
+ switch (event.key) {
1312
+ case 'ArrowUp':
1313
+ row = Math.max(0, rowIndex - 1);
1314
+ break;
1315
+ case 'ArrowDown':
1316
+ row = Math.min(lastRow, rowIndex + 1);
1317
+ break;
1318
+ case 'ArrowLeft':
1319
+ col = Math.max(0, colIndex - 1);
1320
+ break;
1321
+ case 'ArrowRight':
1322
+ col = Math.min(lastCol, colIndex + 1);
1323
+ break;
1324
+ case 'Home':
1325
+ if (event.ctrlKey || event.metaKey) {
1326
+ row = 0;
1327
+ col = 0;
1328
+ }
1329
+ else {
1330
+ col = 0;
1331
+ }
1332
+ break;
1333
+ case 'End':
1334
+ if (event.ctrlKey || event.metaKey) {
1335
+ row = lastRow;
1336
+ col = lastCol;
1337
+ }
1338
+ else {
1339
+ col = lastCol;
1340
+ }
1341
+ break;
1342
+ case 'PageUp':
1343
+ row = Math.max(0, rowIndex - this.pageSize());
1344
+ break;
1345
+ case 'PageDown':
1346
+ row = Math.min(lastRow, rowIndex + this.pageSize());
1347
+ break;
1348
+ case ' ':
1349
+ case 'Spacebar': {
1350
+ const target = this.pagedRows()[rowIndex];
1351
+ if (!target || !this.selectable() || isInteractiveTarget(event.target))
1352
+ return;
1353
+ event.preventDefault();
1354
+ this.toggleRow(target, !this.isSelected(target));
1355
+ return;
1356
+ }
1357
+ default:
1358
+ return;
1359
+ }
1360
+ event.preventDefault();
1361
+ if (row === rowIndex && col === colIndex)
1362
+ return;
1363
+ this.focusCell(row, col);
1364
+ }
1365
+ /** Move DOM focus to a cell, updating the single tab stop. */
1366
+ focusCell(row, col) {
1367
+ this.focusedCell.set({ row, col });
1368
+ const target = this.host.nativeElement.querySelector(`[data-cell="${row}-${col}"]`);
1369
+ target?.focus();
1370
+ }
1371
+ /* ---------------------------------------------------------------- */
829
1372
  /* Column preset / density */
830
1373
  /* ---------------------------------------------------------------- */
831
1374
  isColumnVisible(column) {
@@ -835,6 +1378,8 @@ class TableComponent {
835
1378
  const next = new Set(this.hiddenColumnKeys());
836
1379
  if (visible)
837
1380
  next.delete(key);
1381
+ else if (!this.canHide(key))
1382
+ return;
838
1383
  else
839
1384
  next.add(key);
840
1385
  // Never hide every column: keep at least one visible.
@@ -842,19 +1387,369 @@ class TableComponent {
842
1387
  if (visibleCount === 0)
843
1388
  return;
844
1389
  this.hiddenColumnKeys.set(next);
845
- this.columnsChange.emit(this.visibleColumns().map((column) => column.key));
1390
+ this.emitColumns();
846
1391
  }
847
1392
  resetColumns() {
848
1393
  this.hiddenColumnKeys.set(new Set());
1394
+ this.columnOrder.set([]);
1395
+ this.columnWidths.set({});
1396
+ this.pinnedKeys.set({});
1397
+ this.emitColumns();
1398
+ }
1399
+ /** A column can be hidden when it is hideable and at least one other stays visible. */
1400
+ canHide(key) {
1401
+ const column = this.columns().find((candidate) => candidate.key === key);
1402
+ if (column?.hideable === false)
1403
+ return false;
1404
+ return this.visibleColumns().length > 1;
1405
+ }
1406
+ emitColumns() {
849
1407
  this.columnsChange.emit(this.visibleColumns().map((column) => column.key));
1408
+ this.columnStateChange.emit(this.state());
850
1409
  }
851
- toggleColumnPicker() {
852
- this.columnPickerOpen.update((open) => !open);
1410
+ toggleColumnPicker(event) {
1411
+ event?.stopPropagation();
1412
+ if (this.columnPickerOpen()) {
1413
+ this.columnPickerOpen.set(false);
1414
+ return;
1415
+ }
1416
+ const anchor = event?.currentTarget;
1417
+ if (anchor instanceof HTMLElement) {
1418
+ this.columnsMenuPos.set(this.floatPosition(anchor, 250, 380));
1419
+ }
1420
+ this.columnPickerOpen.set(true);
1421
+ this.viewsOpen.set(false);
1422
+ this.columnMenu.set(null);
1423
+ }
1424
+ toggleViews(event) {
1425
+ event?.stopPropagation();
1426
+ if (this.viewsOpen()) {
1427
+ this.viewsOpen.set(false);
1428
+ return;
1429
+ }
1430
+ const anchor = event?.currentTarget;
1431
+ if (anchor instanceof HTMLElement) {
1432
+ this.viewsMenuPos.set(this.floatPosition(anchor, 260, 340));
1433
+ }
1434
+ this.viewsOpen.set(true);
1435
+ this.columnPickerOpen.set(false);
1436
+ this.columnMenu.set(null);
1437
+ }
1438
+ /** Set the row density explicitly (the toolbar segmented control). */
1439
+ setDensity(density) {
1440
+ if (this.density() === density)
1441
+ return;
1442
+ this.density.set(density);
1443
+ this.densityChange.emit(density);
853
1444
  }
854
1445
  toggleDensity() {
855
- this.density.update((density) => (density === 'compact' ? 'comfortable' : 'compact'));
856
- this.densityChange.emit(this.density());
1446
+ this.setDensity(this.density() === 'compact' ? 'comfortable' : 'compact');
1447
+ }
1448
+ /* ---- header menu ------------------------------------------------- */
1449
+ openColumnMenu(column, event) {
1450
+ event.stopPropagation();
1451
+ const anchor = event.currentTarget;
1452
+ if (!(anchor instanceof HTMLElement))
1453
+ return;
1454
+ if (this.columnMenu()?.key === column.key) {
1455
+ this.columnMenu.set(null);
1456
+ return;
1457
+ }
1458
+ const position = this.floatPosition(anchor, 220, 300);
1459
+ this.columnMenu.set({ key: column.key, ...position });
1460
+ this.columnPickerOpen.set(false);
1461
+ this.viewsOpen.set(false);
1462
+ }
1463
+ columnMenuColumn() {
1464
+ const menu = this.columnMenu();
1465
+ return menu ? this.columns().find((column) => column.key === menu.key) : undefined;
1466
+ }
1467
+ closeColumnMenu() {
1468
+ this.columnMenu.set(null);
1469
+ }
1470
+ menuSort(direction) {
1471
+ const column = this.columnMenuColumn();
1472
+ if (column)
1473
+ this.sort.set({ key: column.key, direction });
1474
+ this.closeColumnMenu();
1475
+ }
1476
+ menuClearSort() {
1477
+ this.sort.set(null);
1478
+ this.closeColumnMenu();
1479
+ }
1480
+ menuPin(pin) {
1481
+ const column = this.columnMenuColumn();
1482
+ if (column)
1483
+ this.pinColumn(column.key, pin);
1484
+ this.closeColumnMenu();
1485
+ }
1486
+ menuHide() {
1487
+ const column = this.columnMenuColumn();
1488
+ if (column)
1489
+ this.setColumnVisible(column.key, false);
1490
+ this.closeColumnMenu();
1491
+ }
1492
+ menuAutosize() {
1493
+ const column = this.columnMenuColumn();
1494
+ if (column)
1495
+ this.autosizeColumn(column.key);
1496
+ this.closeColumnMenu();
1497
+ }
1498
+ canPin(column) {
1499
+ return column.pinnable !== false;
1500
+ }
1501
+ pinColumn(key, pin) {
1502
+ const next = { ...this.pinnedKeys() };
1503
+ if (pin)
1504
+ next[key] = pin;
1505
+ else
1506
+ delete next[key];
1507
+ this.pinnedKeys.set(next);
1508
+ this.emitColumns();
1509
+ }
1510
+ /* ---- resize ------------------------------------------------------ */
1511
+ startResize(column, event) {
1512
+ if (!this.resizable())
1513
+ return;
1514
+ event.preventDefault();
1515
+ event.stopPropagation();
1516
+ const header = event.target.closest('th');
1517
+ const startWidth = header?.getBoundingClientRect().width ?? this.declaredWidthPx(column);
1518
+ this.resizing = { key: column.key, startX: event.clientX, startWidth };
1519
+ document.body.style.userSelect = 'none';
1520
+ }
1521
+ onDocumentPointerMove(event) {
1522
+ if (!this.resizing)
1523
+ return;
1524
+ const width = Math.max(MIN_COLUMN_WIDTH, Math.round(this.resizing.startWidth + event.clientX - this.resizing.startX));
1525
+ this.columnWidths.set({ ...this.columnWidths(), [this.resizing.key]: width });
1526
+ }
1527
+ onDocumentPointerUp() {
1528
+ if (!this.resizing)
1529
+ return;
1530
+ this.resizing = null;
1531
+ document.body.style.userSelect = '';
1532
+ this.scheduleMeasure();
1533
+ this.columnStateChange.emit(this.state());
1534
+ }
1535
+ /** Shrink/grow a column to its widest rendered value. */
1536
+ autosizeColumn(key) {
1537
+ const column = this.visibleColumns().find((candidate) => candidate.key === key);
1538
+ if (!column)
1539
+ return;
1540
+ const header = String(column.header ?? column.key);
1541
+ const widths = this.pagedRows().map((row, index) => this.cellText(row, column, index).length);
1542
+ const longest = Math.max(header.length, ...widths, 4);
1543
+ const width = Math.min(460, Math.max(MIN_COLUMN_WIDTH, Math.round(longest * 7.6) + 46));
1544
+ this.columnWidths.set({ ...this.columnWidths(), [key]: width });
1545
+ this.columnStateChange.emit(this.state());
1546
+ }
1547
+ /* ---- reorder ----------------------------------------------------- */
1548
+ onHeaderDragStart(column, event) {
1549
+ if (!this.reorderable()) {
1550
+ event.preventDefault();
1551
+ return;
1552
+ }
1553
+ this.dragKey.set(column.key);
1554
+ if (event.dataTransfer) {
1555
+ event.dataTransfer.effectAllowed = 'move';
1556
+ event.dataTransfer.setData('text/plain', column.key);
1557
+ }
1558
+ }
1559
+ onHeaderDragOver(column, event) {
1560
+ if (!this.reorderable() || !this.dragKey())
1561
+ return;
1562
+ event.preventDefault();
1563
+ if (event.dataTransfer)
1564
+ event.dataTransfer.dropEffect = 'move';
1565
+ if (this.dragOverKey() !== column.key)
1566
+ this.dragOverKey.set(column.key);
1567
+ }
1568
+ onHeaderDrop(column, event) {
1569
+ if (!this.reorderable())
1570
+ return;
1571
+ event.preventDefault();
1572
+ const from = this.dragKey();
1573
+ this.dragKey.set(null);
1574
+ this.dragOverKey.set(null);
1575
+ if (!from || from === column.key)
1576
+ return;
1577
+ this.moveColumn(from, column.key);
1578
+ }
1579
+ onHeaderDragEnd() {
1580
+ this.dragKey.set(null);
1581
+ this.dragOverKey.set(null);
1582
+ }
1583
+ /** Move `from` onto the slot of `to`, keeping hidden columns in the list. */
1584
+ moveColumn(from, to) {
1585
+ const order = this.orderedColumns().map((column) => column.key);
1586
+ const fromIndex = order.indexOf(from);
1587
+ const toIndex = order.indexOf(to);
1588
+ if (fromIndex < 0 || toIndex < 0)
1589
+ return;
1590
+ order.splice(fromIndex, 1);
1591
+ order.splice(toIndex, 0, from);
1592
+ this.columnOrder.set(order);
1593
+ this.emitColumns();
1594
+ }
1595
+ /* ---------------------------------------------------------------- */
1596
+ /* Export */
1597
+ /* ---------------------------------------------------------------- */
1598
+ /** Rows an export writes: the selection when there is one, else every match. */
1599
+ exportRows() {
1600
+ return this.selected().length ? this.selected() : this.sortedRows();
1601
+ }
1602
+ toggleExportMenu(event) {
1603
+ event?.stopPropagation();
1604
+ if (this.exportMenuPos()) {
1605
+ this.exportMenuPos.set(null);
1606
+ return;
1607
+ }
1608
+ const anchor = event?.currentTarget;
1609
+ this.exportMenuPos.set(anchor instanceof HTMLElement ? this.floatPosition(anchor, 210, 170) : { x: 8, y: 8 });
1610
+ this.columnPickerOpen.set(false);
1611
+ this.viewsOpen.set(false);
1612
+ this.columnMenu.set(null);
1613
+ }
1614
+ exportAs(format) {
1615
+ this.exportMenuPos.set(null);
1616
+ if (format === 'xlsx')
1617
+ this.downloadExcel();
1618
+ else
1619
+ this.downloadCsv();
1620
+ }
1621
+ /** CSV text of the current view: selected rows when there are any, else all matches. */
1622
+ toCsv() {
1623
+ const columns = this.visibleColumns();
1624
+ const rows = this.exportRows();
1625
+ const escapeValue = (value) => /[",;\n\r]/.test(value) ? `"${value.replace(/"/g, '""')}"` : value;
1626
+ const header = columns.map((column) => escapeValue(String(column.header ?? column.key)));
1627
+ const body = rows.map((row, index) => columns.map((column) => escapeValue(this.cellText(row, column, index))).join(','));
1628
+ return [header.join(','), ...body].join('\r\n');
1629
+ }
1630
+ /** Download the current view as a UTF-8 CSV file. */
1631
+ downloadCsv() {
1632
+ const csv = this.toCsv();
1633
+ this.csvExport.emit(csv);
1634
+ const blob = new Blob([`\uFEFF${csv}`], { type: 'text/csv;charset=utf-8;' });
1635
+ this.saveFile(blob, `${this.exportFileName()}.csv`, 'csv');
1636
+ }
1637
+ /** Real Excel workbook (`.xlsx`) of the current view, built without dependencies. */
1638
+ toExcel() {
1639
+ const columns = this.visibleColumns();
1640
+ const rows = this.exportRows();
1641
+ return buildXlsxBlob({
1642
+ sheetName: this.title() || 'Data',
1643
+ header: columns.map((column) => String(column.header ?? column.key)),
1644
+ rows: rows.map((row, index) => columns.map((column) => this.cellText(row, column, index))),
1645
+ });
1646
+ }
1647
+ /** Download the current view as an `.xlsx` workbook. */
1648
+ downloadExcel() {
1649
+ this.saveFile(this.toExcel(), `${this.exportFileName()}.xlsx`, 'xlsx');
1650
+ }
1651
+ saveFile(blob, fileName, format) {
1652
+ this.exportFile.emit({ format, fileName, blob, rows: this.exportRows() });
1653
+ if (typeof document === 'undefined' || typeof URL === 'undefined')
1654
+ return;
1655
+ const url = URL.createObjectURL(blob);
1656
+ const link = document.createElement('a');
1657
+ link.href = url;
1658
+ link.download = fileName;
1659
+ link.style.display = 'none';
1660
+ document.body.appendChild(link);
1661
+ link.click();
1662
+ document.body.removeChild(link);
1663
+ setTimeout(() => URL.revokeObjectURL(url), 0);
1664
+ }
1665
+ /* ---------------------------------------------------------------- */
1666
+ /* Aggregates */
1667
+ /* ---------------------------------------------------------------- */
1668
+ /** Footer cell text for a column that declares an `aggregate`. */
1669
+ aggregateText(column) {
1670
+ if (!column.aggregate)
1671
+ return '';
1672
+ const aggregate = typeof column.aggregate === 'string' ? { type: column.aggregate } : column.aggregate;
1673
+ const rows = this.isServer() ? this.data() : this.sortedRows();
1674
+ if (aggregate.type === 'count') {
1675
+ return String(rows.length);
1676
+ }
1677
+ const numbers = rows
1678
+ .map((row) => Number(this.cellValue(row, column)))
1679
+ .filter((value) => Number.isFinite(value));
1680
+ if (!numbers.length)
1681
+ return '';
1682
+ let value = 0;
1683
+ switch (aggregate.type) {
1684
+ case 'sum':
1685
+ value = numbers.reduce((total, next) => total + next, 0);
1686
+ break;
1687
+ case 'avg':
1688
+ value = numbers.reduce((total, next) => total + next, 0) / numbers.length;
1689
+ break;
1690
+ case 'min':
1691
+ value = Math.min(...numbers);
1692
+ break;
1693
+ case 'max':
1694
+ value = Math.max(...numbers);
1695
+ break;
1696
+ }
1697
+ if (aggregate.format)
1698
+ return aggregate.format(value, column);
1699
+ return value.toLocaleString(undefined, { maximumFractionDigits: 2 });
1700
+ }
1701
+ aggregateLabel(column) {
1702
+ if (!column.aggregate)
1703
+ return '';
1704
+ if (typeof column.aggregate !== 'string' && column.aggregate.label) {
1705
+ return column.aggregate.label;
1706
+ }
1707
+ const type = typeof column.aggregate === 'string' ? column.aggregate : column.aggregate.type;
1708
+ return type;
1709
+ }
1710
+ /* ---------------------------------------------------------------- */
1711
+ /* Named views */
1712
+ /* ---------------------------------------------------------------- */
1713
+ applyView(name) {
1714
+ const view = this.views()[name];
1715
+ if (!view)
1716
+ return;
1717
+ this.applyState(view);
1718
+ this.activeView.set(name);
1719
+ this.viewsOpen.set(false);
1720
+ this.emitColumns();
1721
+ }
1722
+ saveView() {
1723
+ const name = this.viewNameDraft().trim();
1724
+ if (!name)
1725
+ return;
1726
+ this.views.set({ ...this.views(), [name]: this.state() });
1727
+ this.activeView.set(name);
1728
+ this.viewNameDraft.set('');
1729
+ }
1730
+ deleteView(name, event) {
1731
+ event.stopPropagation();
1732
+ const next = { ...this.views() };
1733
+ delete next[name];
1734
+ this.views.set(next);
1735
+ if (this.activeView() === name)
1736
+ this.activeView.set(null);
857
1737
  }
1738
+ onViewNameInput(value) {
1739
+ this.viewNameDraft.set(value);
1740
+ }
1741
+ /* ---------------------------------------------------------------- */
1742
+ /* Scroll */
1743
+ /* ---------------------------------------------------------------- */
1744
+ onScroll(event) {
1745
+ const target = event.target;
1746
+ const scrolled = target.scrollTop > 0;
1747
+ if (scrolled !== this.scrolled())
1748
+ this.scrolled.set(scrolled);
1749
+ }
1750
+ /* ---------------------------------------------------------------- */
1751
+ /* Internals */
1752
+ /* ---------------------------------------------------------------- */
858
1753
  copyText(value, key) {
859
1754
  if (typeof navigator !== 'undefined' && navigator.clipboard?.writeText) {
860
1755
  void navigator.clipboard.writeText(value).catch(() => undefined);
@@ -864,34 +1759,104 @@ class TableComponent {
864
1759
  clearTimeout(this.copyTimer);
865
1760
  this.copyTimer = setTimeout(() => this.copiedCell.set(null), 1400);
866
1761
  }
867
- restorePreset() {
868
- const preset = this.readPreset();
869
- if (!preset)
1762
+ /** Screen position for a menu anchored to `anchor`, kept inside the viewport. */
1763
+ floatPosition(anchor, width, height) {
1764
+ const rect = anchor.getBoundingClientRect();
1765
+ const viewportWidth = typeof window === 'undefined' ? 1280 : window.innerWidth;
1766
+ const viewportHeight = typeof window === 'undefined' ? 800 : window.innerHeight;
1767
+ const x = Math.min(Math.max(8, rect.right - width), Math.max(8, viewportWidth - width - 8));
1768
+ const y = Math.min(rect.bottom + 6, Math.max(8, viewportHeight - height - 8));
1769
+ return { x, y };
1770
+ }
1771
+ /** Read header widths so stacked sticky columns line up. */
1772
+ measureHeaderWidths() {
1773
+ const headers = this.host.nativeElement.querySelectorAll('th[data-col]');
1774
+ if (!headers.length)
1775
+ return;
1776
+ const next = {};
1777
+ headers.forEach((header) => {
1778
+ const key = header.dataset['col'];
1779
+ if (!key)
1780
+ return;
1781
+ const width = Math.round(header.getBoundingClientRect().width);
1782
+ if (width > 0)
1783
+ next[key] = width;
1784
+ });
1785
+ const current = this.measuredWidths();
1786
+ const keys = Object.keys(next);
1787
+ const changed = keys.length !== Object.keys(current).length ||
1788
+ keys.some((key) => Math.abs((current[key] ?? 0) - next[key]) > 0.5);
1789
+ if (changed)
1790
+ this.measuredWidths.set(next);
1791
+ }
1792
+ scheduleMeasure() {
1793
+ if (typeof requestAnimationFrame === 'undefined')
1794
+ return;
1795
+ if (this.measureHandle)
1796
+ cancelAnimationFrame(this.measureHandle);
1797
+ this.measureHandle = requestAnimationFrame(() => {
1798
+ this.measureHandle = undefined;
1799
+ this.measureHeaderWidths();
1800
+ });
1801
+ }
1802
+ applyState(state) {
1803
+ if (!state)
870
1804
  return;
871
- if (Array.isArray(preset.hidden))
872
- this.hiddenColumnKeys.set(new Set(preset.hidden));
873
- if (preset.density === 'compact' || preset.density === 'comfortable') {
874
- this.density.set(preset.density);
1805
+ if (Array.isArray(state.hidden))
1806
+ this.hiddenColumnKeys.set(new Set(state.hidden));
1807
+ if (state.density === 'compact' || state.density === 'comfortable') {
1808
+ this.density.set(state.density);
1809
+ }
1810
+ if (Array.isArray(state.order))
1811
+ this.columnOrder.set([...state.order]);
1812
+ if (state.widths && typeof state.widths === 'object') {
1813
+ this.columnWidths.set({ ...state.widths });
1814
+ }
1815
+ if (state.pinned && typeof state.pinned === 'object') {
1816
+ this.pinnedKeys.set({ ...state.pinned });
875
1817
  }
876
1818
  }
877
- readPreset() {
878
- const key = this.storageKey();
1819
+ readPreset(key) {
879
1820
  if (!key || typeof localStorage === 'undefined')
880
1821
  return null;
881
1822
  try {
882
1823
  const raw = localStorage.getItem(key);
883
- return raw ? JSON.parse(raw) : null;
1824
+ if (!raw)
1825
+ return null;
1826
+ const parsed = JSON.parse(raw);
1827
+ if (parsed.state) {
1828
+ return {
1829
+ state: parsed.state,
1830
+ views: parsed.views ?? {},
1831
+ activeView: parsed.activeView ?? null,
1832
+ };
1833
+ }
1834
+ return {
1835
+ state: {
1836
+ hidden: Array.isArray(parsed.hidden) ? parsed.hidden : [],
1837
+ density: parsed.density === 'compact' ? 'compact' : 'comfortable',
1838
+ order: [],
1839
+ widths: {},
1840
+ pinned: {},
1841
+ },
1842
+ views: {},
1843
+ activeView: null,
1844
+ };
884
1845
  }
885
1846
  catch {
886
1847
  return null;
887
1848
  }
888
1849
  }
889
- persistPreset(preset) {
890
- const key = this.storageKey();
1850
+ persistPreset(key) {
891
1851
  if (!key || typeof localStorage === 'undefined')
892
1852
  return;
893
1853
  try {
894
- localStorage.setItem(key, JSON.stringify(preset));
1854
+ localStorage.setItem(key, JSON.stringify({
1855
+ v: 2,
1856
+ state: this.state(),
1857
+ views: this.views(),
1858
+ activeView: this.activeView(),
1859
+ }));
895
1860
  }
896
1861
  catch {
897
1862
  // Storage disabled (private mode) — the preset simply stays in memory.
@@ -900,10 +1865,12 @@ class TableComponent {
900
1865
  onDocumentClick() {
901
1866
  this.closeRowMenu();
902
1867
  this.columnPickerOpen.set(false);
1868
+ this.viewsOpen.set(false);
1869
+ this.columnMenu.set(null);
1870
+ this.exportMenuPos.set(null);
903
1871
  }
904
1872
  onDocumentEscape() {
905
- this.closeRowMenu();
906
- this.columnPickerOpen.set(false);
1873
+ this.onDocumentClick();
907
1874
  }
908
1875
  alignClass(column) {
909
1876
  return column.align ? `ith-table-align-${column.align}` : '';
@@ -934,9 +1901,6 @@ class TableComponent {
934
1901
  emptyContext() {
935
1902
  return { ...this.toolbarContext() };
936
1903
  }
937
- /* ---------------------------------------------------------------- */
938
- /* Internals */
939
- /* ---------------------------------------------------------------- */
940
1904
  compareRows(a, b, column) {
941
1905
  if (column.sortFn)
942
1906
  return column.sortFn(a, b);
@@ -987,16 +1951,24 @@ class TableComponent {
987
1951
  return this.cellText(row, column).toLowerCase();
988
1952
  }
989
1953
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.34", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
990
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.34", type: TableComponent, isStandalone: true, selector: "ith-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, keyField: { classPropertyName: "keyField", publicName: "keyField", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, countSuffix: { classPropertyName: "countSuffix", publicName: "countSuffix", isSignal: true, isRequired: false, transformFunction: null }, totalLabel: { classPropertyName: "totalLabel", publicName: "totalLabel", isSignal: true, isRequired: false, transformFunction: null }, showToolbar: { classPropertyName: "showToolbar", publicName: "showToolbar", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, showFilters: { classPropertyName: "showFilters", publicName: "showFilters", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterAllLabel: { classPropertyName: "filterAllLabel", publicName: "filterAllLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, sortable: { classPropertyName: "sortable", publicName: "sortable", isSignal: true, isRequired: false, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showPagination: { classPropertyName: "showPagination", publicName: "showPagination", isSignal: true, isRequired: false, transformFunction: null }, showPageSize: { classPropertyName: "showPageSize", publicName: "showPageSize", isSignal: true, isRequired: false, transformFunction: null }, showFirstLast: { classPropertyName: "showFirstLast", publicName: "showFirstLast", isSignal: true, isRequired: false, transformFunction: null }, maxPageButtons: { classPropertyName: "maxPageButtons", publicName: "maxPageButtons", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selectAllScope: { classPropertyName: "selectAllScope", publicName: "selectAllScope", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, selectOnRowClick: { classPropertyName: "selectOnRowClick", publicName: "selectOnRowClick", isSignal: true, isRequired: false, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, actionsHeader: { classPropertyName: "actionsHeader", publicName: "actionsHeader", isSignal: true, isRequired: false, transformFunction: null }, actionsWidth: { classPropertyName: "actionsWidth", publicName: "actionsWidth", isSignal: true, isRequired: false, transformFunction: null }, rowClickable: { classPropertyName: "rowClickable", publicName: "rowClickable", isSignal: true, isRequired: false, transformFunction: null }, rowClass: { classPropertyName: "rowClass", publicName: "rowClass", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, hoverable: { classPropertyName: "hoverable", publicName: "hoverable", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, dense: { classPropertyName: "dense", publicName: "dense", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, copyable: { classPropertyName: "copyable", publicName: "copyable", isSignal: true, isRequired: false, transformFunction: null }, showColumnPicker: { classPropertyName: "showColumnPicker", publicName: "showColumnPicker", isSignal: true, isRequired: false, transformFunction: null }, showDensityToggle: { classPropertyName: "showDensityToggle", publicName: "showDensityToggle", isSignal: true, isRequired: false, transformFunction: null }, storageKey: { classPropertyName: "storageKey", publicName: "storageKey", isSignal: true, isRequired: false, transformFunction: null }, skeletonRows: { classPropertyName: "skeletonRows", publicName: "skeletonRows", isSignal: true, isRequired: false, transformFunction: null }, stickySelection: { classPropertyName: "stickySelection", publicName: "stickySelection", isSignal: true, isRequired: false, transformFunction: null }, stickyActions: { classPropertyName: "stickyActions", publicName: "stickyActions", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sort: "sortChange", search: "searchChange", filterChange: "filterChange", page: "pageChange", pageSize: "pageSizeChange", selected: "selectedChange", actionClick: "actionClick", rowClick: "rowClick", cellCopy: "cellCopy", rowContextMenu: "rowContextMenu", columnsChange: "columnsChange", densityChange: "densityChange", filters: "filtersChange" }, host: { listeners: { "document:click": "onDocumentClick()", "document:keydown.escape": "onDocumentEscape()" } }, queries: [{ propertyName: "cellDirectives", predicate: TableCellDirective, descendants: true, isSignal: true }, { propertyName: "headerDirectives", predicate: TableHeaderDirective, descendants: true, isSignal: true }, { propertyName: "filterDirectives", predicate: TableFilterDirective, descendants: true, isSignal: true }, { propertyName: "rowActionsDirectives", predicate: TableRowActionsDirective, descendants: true, isSignal: true }, { propertyName: "toolbarDirectives", predicate: TableToolbarDirective, descendants: true, isSignal: true }, { propertyName: "footerDirectives", predicate: TableFooterDirective, descendants: true, isSignal: true }, { propertyName: "emptyDirectives", predicate: TableEmptyDirective, descendants: true, isSignal: true }, { propertyName: "rowMenuDirectives", predicate: TableRowMenuDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"ith-table\"\n [class.ith-table-bordered]=\"bordered()\"\n [class.ith-table-dense]=\"dense()\"\n [class.ith-table-striped]=\"striped()\"\n [class.ith-table-hoverable]=\"hoverable()\"\n [class.ith-table-sticky]=\"stickyHeader()\"\n [class.ith-table-compact]=\"compact()\">\n <!-- Toolbar -->\n @if (showToolbar()) {\n <div class=\"ith-table-toolbar\">\n <div class=\"ith-table-toolbar-inner\">\n <div class=\"ith-table-toolbar-main\">\n @if (title()) {\n <h3 class=\"ith-table-title\">{{ title() }}</h3>\n }\n <span class=\"ith-table-badge\">{{ totalRows() }} {{ countSuffix() }}</span>\n @if (selected().length > 0) {\n <span class=\"ith-table-badge ith-table-badge-accent\">{{ selected().length }} selected</span>\n }\n @if (toolbarTemplate(); as toolbarTpl) {\n <ng-container\n [ngTemplateOutlet]=\"toolbarTpl\"\n [ngTemplateOutletContext]=\"toolbarContext()\" />\n }\n </div>\n\n <div class=\"ith-table-toolbar-spacer\"></div>\n\n <div class=\"ith-table-toolbar-actions\">\n @if (showColumnPicker()) {\n <div class=\"ith-table-columns\" (click)=\"$event.stopPropagation()\">\n <button\n type=\"button\"\n class=\"ith-table-tool-btn\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"columnPickerOpen()\"\n (click)=\"toggleColumnPicker()\">\n <svg class=\"ith-table-tool-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <rect x=\"3\" y=\"4\" width=\"7\" height=\"16\" rx=\"1.5\" />\n <rect x=\"14\" y=\"4\" width=\"7\" height=\"16\" rx=\"1.5\" />\n </svg>\n <span>Columns</span>\n </button>\n @if (columnPickerOpen()) {\n <div class=\"ith-table-columns-popover\" role=\"dialog\" aria-label=\"Visible columns\">\n <div class=\"ith-table-columns-header\">Show columns</div>\n <div class=\"ith-table-columns-list\">\n @for (column of columns(); track column.key) {\n <label class=\"ith-table-columns-item\">\n <input\n type=\"checkbox\"\n class=\"ith-table-checkbox\"\n [checked]=\"isColumnVisible(column)\"\n [disabled]=\"column.hidden\"\n (change)=\"setColumnVisible(column.key, $any($event.target).checked)\" />\n <span>{{ column.header ?? column.key }}</span>\n </label>\n }\n </div>\n <div class=\"ith-table-columns-footer\">\n <button type=\"button\" class=\"ith-table-columns-reset\" (click)=\"resetColumns()\">\n Reset columns\n </button>\n </div>\n </div>\n }\n </div>\n }\n\n @if (showDensityToggle()) {\n <button\n type=\"button\"\n class=\"ith-table-tool-btn\"\n [attr.aria-pressed]=\"compact()\"\n (click)=\"toggleDensity()\">\n @if (compact()) {\n <svg class=\"ith-table-tool-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M4 7h16M4 12h16M4 17h16\" />\n </svg>\n <span>Comfortable</span>\n } @else {\n <svg class=\"ith-table-tool-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M4 6h16M4 10h16M4 14h16M4 18h16\" />\n </svg>\n <span>Compact</span>\n }\n </button>\n }\n\n @if (searchable()) {\n <div class=\"ith-table-search\">\n <svg class=\"ith-table-search-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.6-3.6\" />\n </svg>\n <input\n type=\"search\"\n class=\"ith-table-search-input\"\n [value]=\"search()\"\n [attr.placeholder]=\"searchPlaceholder()\"\n [attr.aria-label]=\"searchPlaceholder()\"\n (input)=\"onSearchInput($any($event.target).value)\" />\n @if (search()) {\n <button type=\"button\" class=\"ith-table-search-clear\" (click)=\"clearSearch()\" aria-label=\"Clear search\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M6 6l12 12M18 6 6 18\" />\n </svg>\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n\n <!-- Table -->\n <div class=\"ith-table-scroll\" [style.maxHeight]=\"maxHeight() || null\">\n <table class=\"ith-table-grid\" [attr.aria-label]=\"ariaLabel()\" [attr.aria-busy]=\"loading()\">\n <thead>\n <tr class=\"ith-table-head-row\">\n @if (selectable()) {\n <th\n scope=\"col\"\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\">\n @if (selectionMode() === 'multi') {\n <input\n type=\"checkbox\"\n class=\"ith-table-checkbox\"\n [checked]=\"allPageSelected()\"\n [indeterminate]=\"somePageSelected()\"\n [attr.aria-label]=\"'Select all rows'\"\n (change)=\"onSelectAllChange($event)\" />\n }\n </th>\n }\n\n @for (column of visibleColumns(); track column.key) {\n <th\n scope=\"col\"\n class=\"ith-table-th\"\n [ngClass]=\"headerClasses(column)\"\n [style]=\"columnStyle(column)\"\n [attr.aria-sort]=\"isSortable(column) ? ariaSort(column) : null\">\n @if (headerTemplate(column); as headerTpl) {\n <ng-container\n [ngTemplateOutlet]=\"headerTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column: column }\" />\n } @else if (isSortable(column)) {\n <button\n type=\"button\"\n class=\"ith-table-sort\"\n [class.is-sorted]=\"!!sortDirection(column)\"\n (click)=\"toggleSort(column)\"\n [attr.aria-label]=\"'Sort by ' + (column.header ?? column.key)\">\n <span class=\"ith-table-th-label\">{{ column.header ?? column.key }}</span>\n <span class=\"ith-table-sort-icons\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 10 6\" class=\"ith-table-sort-up\" [class.is-active]=\"sortDirection(column) === 'asc'\"><path d=\"M5 0l5 6H0z\" /></svg>\n <svg viewBox=\"0 0 10 6\" class=\"ith-table-sort-down\" [class.is-active]=\"sortDirection(column) === 'desc'\"><path d=\"M5 6L0 0h10z\" /></svg>\n </span>\n </button>\n } @else {\n <span class=\"ith-table-th-label\">{{ column.header ?? column.key }}</span>\n }\n </th>\n }\n\n @if (hasActionsColumn()) {\n <th\n scope=\"col\"\n class=\"ith-table-th ith-table-actions-head\"\n [class.ith-table-sticky-end]=\"stickyActions()\"\n [style.width]=\"actionsWidth()\"\n [style.right]=\"stickyActions() ? '0px' : null\">\n {{ actionsHeader() }}\n </th>\n }\n </tr>\n\n @if (showFilters()) {\n <tr class=\"ith-table-filter-row\">\n @if (selectable()) {\n <th\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\"></th>\n }\n @for (column of visibleColumns(); track column.key) {\n <th\n class=\"ith-table-filter-cell\"\n [ngClass]=\"filterClasses(column)\"\n [style]=\"columnStyle(column)\">\n @if (filterTemplate(column); as filterTpl) {\n <ng-container\n [ngTemplateOutlet]=\"filterTpl\"\n [ngTemplateOutletContext]=\"filterContext(column)\" />\n } @else if (column.filterable !== false) {\n @switch (filterTypeFor(column)) {\n @case ('select') {\n <select\n class=\"ith-table-filter-input ith-table-filter-select\"\n [value]=\"filterValue(column.key)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (change)=\"onFilterInput(column.key, $any($event.target).value)\">\n <option value=\"\">{{ filterAllLabel() }}</option>\n @for (option of filterOptionsFor(column); track option.value) {\n <option [value]=\"option.value\">{{ option.label }}</option>\n }\n </select>\n }\n @case ('number') {\n <input\n type=\"number\"\n class=\"ith-table-filter-input\"\n [value]=\"filterValue(column.key)\"\n [attr.placeholder]=\"filterPlaceholderFor(column)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (input)=\"onFilterInput(column.key, $any($event.target).value)\" />\n }\n @case ('date') {\n <input\n type=\"date\"\n class=\"ith-table-filter-input\"\n [value]=\"filterValue(column.key)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (input)=\"onFilterInput(column.key, $any($event.target).value)\" />\n }\n @default {\n <input\n type=\"text\"\n class=\"ith-table-filter-input\"\n [value]=\"filterValue(column.key)\"\n [attr.placeholder]=\"filterPlaceholderFor(column)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (input)=\"onFilterInput(column.key, $any($event.target).value)\" />\n }\n }\n }\n </th>\n }\n @if (hasActionsColumn()) {\n <th\n class=\"ith-table-filter-cell\"\n [class.ith-table-sticky-end]=\"stickyActions()\"\n [style.right]=\"stickyActions() ? '0px' : null\"></th>\n }\n </tr>\n }\n </thead>\n\n <tbody>\n @if (loading() && pagedRows().length === 0) {\n @for (skeleton of skeletonIndexes(); track skeleton) {\n <tr class=\"ith-table-skeleton-row\" aria-hidden=\"true\">\n @if (selectable()) {\n <td\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\">\n <span class=\"ith-table-skeleton is-check\"></span>\n </td>\n }\n @for (column of visibleColumns(); track column.key) {\n <td class=\"ith-table-td\">\n <span class=\"ith-table-skeleton\"></span>\n </td>\n }\n @if (hasActionsColumn()) {\n <td class=\"ith-table-actions-cell\"><span class=\"ith-table-skeleton\"></span></td>\n }\n </tr>\n }\n <tr>\n <td class=\"ith-table-visually-hidden\" [attr.colspan]=\"emptyColspan()\" aria-live=\"polite\">\n {{ loadingText() }}\n </td>\n </tr>\n } @else if (pagedRows().length === 0) {\n <tr>\n <td class=\"ith-table-status\" [attr.colspan]=\"emptyColspan()\">\n @if (emptyTemplate(); as emptyTpl) {\n <ng-container\n [ngTemplateOutlet]=\"emptyTpl\"\n [ngTemplateOutletContext]=\"emptyContext()\" />\n } @else {\n <div class=\"ith-table-empty\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M3 10h18M9 10v9\" />\n </svg>\n <span>{{ hasQuery() ? 'No records match your search.' : emptyText() }}</span>\n @if (hasQuery()) {\n <button type=\"button\" class=\"ith-table-link\" (click)=\"clearQuery()\">Clear search &amp; filters</button>\n }\n </div>\n }\n </td>\n </tr>\n } @else {\n @for (row of pagedRows(); track trackRow($index, row); let rowIndex = $index) {\n <tr\n class=\"ith-table-row\"\n [ngClass]=\"rowClassFor(row, $index)\"\n [class.ith-table-row-clickable]=\"rowClickable() || selectOnRowClick()\"\n [attr.tabindex]=\"rowClickable() || selectOnRowClick() ? 0 : null\"\n [attr.aria-selected]=\"selectable() ? isSelected(row) : null\"\n (click)=\"onRowClick(row, $index, $event)\"\n (keydown)=\"onRowKeydown(row, $index, $event)\"\n (contextmenu)=\"onRowContextMenu(row, $index, $event)\">\n @if (selectable()) {\n <td\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\">\n <input\n type=\"checkbox\"\n class=\"ith-table-checkbox\"\n [checked]=\"isSelected(row)\"\n [attr.aria-label]=\"'Select row ' + ($index + 1)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"onRowCheckboxChange(row, $event)\" />\n </td>\n }\n\n @for (column of visibleColumns(); track column.key) {\n <td\n class=\"ith-table-td\"\n [class.ith-table-copyable]=\"copyable()\"\n [ngClass]=\"cellClasses(row, column, rowIndex)\"\n [style]=\"columnStyle(column)\"\n [attr.title]=\"tooltipText(row, column, rowIndex)\"\n [attr.tabindex]=\"copyable() ? 0 : null\"\n (keydown)=\"onCellKeydown(row, column, rowIndex, $event)\">\n @if (cellTemplate(column); as cellTpl) {\n <ng-container\n [ngTemplateOutlet]=\"cellTpl\"\n [ngTemplateOutletContext]=\"cellContext(row, column, rowIndex)\" />\n } @else {\n {{ cellText(row, column, rowIndex) }}\n }\n @if (copyable()) {\n <button\n type=\"button\"\n class=\"ith-table-copy\"\n [class.is-copied]=\"isCellCopied(rowIndex, column)\"\n [attr.aria-label]=\"'Copy ' + (column.header ?? column.key)\"\n (click)=\"copyCell(row, column, rowIndex, $event)\">\n @if (isCellCopied(rowIndex, column)) {\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m5 13 4 4L19 7\" /></svg>\n } @else {\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" /><path d=\"M15 5.5A2.5 2.5 0 0 0 12.5 3H6a2 2 0 0 0-2 2v7.5A2.5 2.5 0 0 0 6.5 15\" /></svg>\n }\n </button>\n }\n </td>\n }\n\n @if (hasActionsColumn()) {\n <td\n class=\"ith-table-actions-cell\"\n [class.ith-table-sticky-end]=\"stickyActions()\"\n [style.right]=\"stickyActions() ? '0px' : null\">\n @if (rowActionsTemplate(); as actionsTpl) {\n <ng-container\n [ngTemplateOutlet]=\"actionsTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row, index: $index }\" />\n } @else {\n @for (action of rowActions(); track action.id) {\n @if (isActionVisible(action, row, $index)) {\n <button\n type=\"button\"\n class=\"ith-table-action\"\n [ngClass]=\"action.class ?? ''\"\n [attr.title]=\"action.title ?? action.label\"\n [disabled]=\"isActionDisabled(action, row, $index)\"\n (click)=\"onActionClick(action, row, $index, $event)\">\n @if (action.icon) {\n <span class=\"ith-table-action-icon\" aria-hidden=\"true\">{{ action.icon }}</span>\n }\n <span>{{ action.label }}</span>\n </button>\n }\n }\n }\n </td>\n }\n </tr>\n }\n }\n </tbody>\n </table>\n\n @if (loading() && pagedRows().length > 0) {\n <div class=\"ith-table-loading-overlay\">\n <span class=\"ith-table-spinner\" aria-hidden=\"true\"></span>\n <span>{{ loadingText() }}</span>\n </div>\n }\n </div>\n\n <!-- Right-click menu (projected template, positioned at the pointer) -->\n @if (menuState(); as menu) {\n <div\n class=\"ith-table-menu\"\n role=\"menu\"\n [style.left.px]=\"menu.x\"\n [style.top.px]=\"menu.y\"\n (click)=\"closeRowMenu(); $event.stopPropagation()\">\n @if (rowMenuTemplate(); as menuTpl) {\n <ng-container\n [ngTemplateOutlet]=\"menuTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: menu.row, row: menu.row, index: menu.index }\" />\n }\n </div>\n }\n\n <!-- Footer -->\n @if (showFooter()) {\n <div class=\"ith-table-footer\">\n <div class=\"ith-table-footer-info\">\n @if (footerTemplate(); as footerTpl) {\n <ng-container\n [ngTemplateOutlet]=\"footerTpl\"\n [ngTemplateOutletContext]=\"footerContext()\" />\n } @else {\n <span>\n Showing <strong>{{ rangeStart() }}</strong>\u2013<strong>{{ rangeEnd() }}</strong>\n of <strong>{{ totalRows() }}</strong>\n </span>\n <span class=\"ith-table-total\">{{ totalLabel() }}: <strong>{{ totalRows() }}</strong></span>\n }\n </div>\n\n <div class=\"ith-table-footer-controls\">\n @if (showPagination()) {\n <nav class=\"ith-table-pagination\" aria-label=\"Pagination\">\n @if (showFirstLast()) {\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"firstPage()\" [disabled]=\"page() === 1\" aria-label=\"First page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m11 17-5-5 5-5M18 17l-5-5 5-5\" /></svg>\n </button>\n }\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"previousPage()\" [disabled]=\"page() === 1\" aria-label=\"Previous page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m15 18-6-6 6-6\" /></svg>\n </button>\n\n @for (item of pageItems(); track item) {\n <button\n type=\"button\"\n class=\"ith-table-page-btn ith-table-page-number\"\n [class.is-active]=\"item === page()\"\n [attr.aria-current]=\"item === page() ? 'page' : null\"\n (click)=\"goToPage(item)\">\n {{ item }}\n </button>\n }\n\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"nextPage()\" [disabled]=\"page() === pageCount()\" aria-label=\"Next page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m9 18 6-6-6-6\" /></svg>\n </button>\n @if (showFirstLast()) {\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"lastPage()\" [disabled]=\"page() === pageCount()\" aria-label=\"Last page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m13 17 5-5-5-5M6 17l5-5-5-5\" /></svg>\n </button>\n }\n <span class=\"ith-table-page-state\">Page {{ page() }} / {{ pageCount() }}</span>\n </nav>\n }\n\n @if (showPageSize()) {\n <label class=\"ith-table-page-size\">\n <span>Rows:</span>\n <select class=\"ith-table-select\" [value]=\"pageSize()\" (change)=\"onPageSizeChange($any($event.target).value)\">\n @for (size of pageSizeChoices(); track size) {\n <option [value]=\"size\">{{ size }}</option>\n }\n </select>\n </label>\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:block;--_brand: var(--ith-table-brand, #5b21b6);--_bg: var(--ith-table-bg, #ffffff);--_text: var(--ith-table-text, #1f2937);--_muted: var(--ith-table-muted, #6b7280);--_border: var(--ith-table-border, #e8eaf0);--_header-bg: var(--ith-table-header-bg, var(--_brand));--_header-text: var(--ith-table-header-text, #ffffff);--_hover: var(--ith-table-hover, color-mix(in srgb, var(--_brand) 6%, #ffffff));--_selected-bg: var(--ith-table-selected-bg, color-mix(in srgb, var(--_brand) 10%, #ffffff));--_striped-bg: var(--ith-table-striped-bg, color-mix(in srgb, var(--_brand) 2%, #ffffff));--_accent: var(--ith-table-accent, var(--_brand));--_accent-soft: var(--ith-table-accent-soft, color-mix(in srgb, var(--_brand) 12%, #ffffff));--_input-bg: var(--ith-table-input-bg, #ffffff);--_input-border: var(--ith-table-input-border, #dfe3ec);--_footer-bg: var(--ith-table-footer-bg, color-mix(in srgb, var(--_brand) 2%, #ffffff));--_filter-bg: var(--ith-table-filter-bg, color-mix(in srgb, var(--_brand) 3%, #ffffff));--_overlay: var(--ith-table-overlay, rgba(255, 255, 255, .72));--_radius: var(--ith-table-radius, 14px);--_shadow: var(--ith-table-shadow, 0 18px 40px -28px rgba(24, 20, 60, .55));--_focus: var(--ith-table-focus, color-mix(in srgb, var(--_brand) 25%, transparent));--_cell-padding: var(--ith-table-cell-padding, 12px 16px);--_font-size: var(--ith-table-font-size, 14px);--_header-font-size: var(--ith-table-header-font-size, 13px)}:host-context([data-theme=\"dark\"]),:host-context(.dark){--_brand: var(--ith-table-brand, #7c3aed);--_bg: var(--ith-table-bg, #161826);--_text: var(--ith-table-text, #e7e9f3);--_muted: var(--ith-table-muted, #9aa0b5);--_border: var(--ith-table-border, #2a2e42);--_header-bg: var(--ith-table-header-bg, color-mix(in srgb, var(--_brand) 42%, #0b0d16));--_header-text: var(--ith-table-header-text, #f3eeff);--_hover: var(--ith-table-hover, color-mix(in srgb, var(--_brand) 10%, #161826));--_selected-bg: var(--ith-table-selected-bg, color-mix(in srgb, var(--_brand) 20%, #161826));--_striped-bg: var(--ith-table-striped-bg, color-mix(in srgb, var(--_brand) 4%, #161826));--_accent: var(--ith-table-accent, color-mix(in srgb, var(--_brand) 55%, #ffffff));--_accent-soft: var(--ith-table-accent-soft, color-mix(in srgb, var(--_brand) 26%, #161826));--_input-bg: var(--ith-table-input-bg, #1b1e30);--_input-border: var(--ith-table-input-border, #343a52);--_footer-bg: var(--ith-table-footer-bg, color-mix(in srgb, var(--_brand) 4%, #12141f));--_filter-bg: var(--ith-table-filter-bg, color-mix(in srgb, var(--_brand) 6%, #161826));--_overlay: var(--ith-table-overlay, rgba(17, 19, 30, .72));--_shadow: var(--ith-table-shadow, 0 18px 40px -28px rgba(0, 0, 0, .85));--_focus: var(--ith-table-focus, color-mix(in srgb, var(--_brand) 38%, transparent))}@media(prefers-color-scheme:dark){:host-context([data-theme=\"auto\"]){--_brand: var(--ith-table-brand, #7c3aed);--_bg: var(--ith-table-bg, #161826);--_text: var(--ith-table-text, #e7e9f3);--_muted: var(--ith-table-muted, #9aa0b5);--_border: var(--ith-table-border, #2a2e42);--_header-bg: var(--ith-table-header-bg, color-mix(in srgb, var(--_brand) 42%, #0b0d16));--_header-text: var(--ith-table-header-text, #f3eeff);--_hover: var(--ith-table-hover, color-mix(in srgb, var(--_brand) 10%, #161826));--_selected-bg: var(--ith-table-selected-bg, color-mix(in srgb, var(--_brand) 20%, #161826));--_striped-bg: var(--ith-table-striped-bg, color-mix(in srgb, var(--_brand) 4%, #161826));--_accent: var(--ith-table-accent, color-mix(in srgb, var(--_brand) 55%, #ffffff));--_accent-soft: var(--ith-table-accent-soft, color-mix(in srgb, var(--_brand) 26%, #161826));--_input-bg: var(--ith-table-input-bg, #1b1e30);--_input-border: var(--ith-table-input-border, #343a52);--_footer-bg: var(--ith-table-footer-bg, color-mix(in srgb, var(--_brand) 4%, #12141f));--_filter-bg: var(--ith-table-filter-bg, color-mix(in srgb, var(--_brand) 6%, #161826));--_overlay: var(--ith-table-overlay, rgba(17, 19, 30, .72));--_shadow: var(--ith-table-shadow, 0 18px 40px -28px rgba(0, 0, 0, .85));--_focus: var(--ith-table-focus, color-mix(in srgb, var(--_brand) 38%, transparent))}}.ith-table{display:block;position:relative;background:var(--_bg);color:var(--_text);border:1px solid var(--_border);border-radius:var(--_radius);box-shadow:var(--_shadow);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:var(--_font-size);overflow:hidden}.ith-table-toolbar{padding:14px 16px;border-bottom:1px solid var(--_border);background:color-mix(in srgb,var(--_brand) 3%,var(--_bg))}.ith-table-toolbar-inner{display:flex;align-items:center;gap:12px;flex-wrap:nowrap;min-width:0;overflow-x:auto;scrollbar-width:none}.ith-table-toolbar-inner::-webkit-scrollbar{display:none}.ith-table-toolbar-main{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;min-width:0;flex:0 0 auto}.ith-table-toolbar-spacer{flex:1 1 auto;min-width:8px}.ith-table-title{margin:0;font-size:15.5px;font-weight:650;letter-spacing:-.015em;color:var(--_text);white-space:nowrap}.ith-table-badge{display:inline-flex;align-items:center;padding:3px 10px;border-radius:999px;background:var(--_accent-soft);color:var(--_accent);font-size:11.5px;font-weight:600;line-height:1.4;white-space:nowrap}.ith-table-badge-accent{background:var(--_accent);color:#fff;box-shadow:0 0 0 1px color-mix(in srgb,var(--_accent) 30%,transparent)}.ith-table-search{position:relative;flex:0 1 260px;min-width:180px}.ith-table-search-icon{position:absolute;left:12px;top:50%;width:15px;height:15px;transform:translateY(-50%);color:var(--_muted);pointer-events:none}.ith-table-search-input{width:100%;box-sizing:border-box;height:36px;padding:0 34px 0 36px;border:1px solid var(--_input-border);border-radius:10px;background:var(--_input-bg);color:var(--_text);font-size:13px;font-family:inherit;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ith-table-search-input:hover{border-color:color-mix(in srgb,var(--_accent) 35%,var(--_input-border))}.ith-table-search-input::placeholder{color:var(--_muted)}.ith-table-search-input::-webkit-search-cancel-button,.ith-table-search-input::-webkit-search-decoration,.ith-table-search-input::-webkit-search-results-button,.ith-table-search-input::-webkit-search-results-decoration{-webkit-appearance:none;appearance:none;display:none}.ith-table-search-input:focus{outline:none;border-color:var(--_accent);box-shadow:0 0 0 3px var(--_focus);background:var(--_bg)}.ith-table-search-clear{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:24px;height:24px;display:grid;place-items:center;border:0;border-radius:7px;background:transparent;color:var(--_muted);cursor:pointer;transition:background-color .12s ease,color .12s ease}.ith-table-search-clear svg{width:14px;height:14px}.ith-table-search-clear:hover{background:var(--_accent-soft);color:var(--_accent)}.ith-table-scroll{position:relative;overflow:auto}.ith-table-grid{width:100%;border-collapse:separate;border-spacing:0;table-layout:auto}.ith-table-head-row th{background:var(--_header-bg);color:var(--_header-text);font-size:var(--_header-font-size);font-weight:600;letter-spacing:.01em;text-align:left;padding:13px 16px;white-space:nowrap;border:0}.ith-table-sticky .ith-table-head-row th{position:sticky;top:0;z-index:2}.ith-table-th-label{display:inline-block}.ith-table-sort{display:inline-flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;letter-spacing:inherit;cursor:pointer;text-align:inherit}.ith-table-sort-icons{display:inline-flex;flex-direction:column;gap:2px;opacity:.5}.ith-table-sort-icons svg{width:8px;height:5px;fill:currentColor;opacity:.5;transition:opacity .15s ease}.ith-table-sort-icons svg.is-active{opacity:1}.ith-table-sort.is-sorted .ith-table-sort-icons{opacity:1}.ith-table-select-cell{width:46px;text-align:center;padding-left:14px;padding-right:10px}.ith-table-checkbox{width:16px;height:16px;margin:0;cursor:pointer;accent-color:var(--_accent);vertical-align:middle}.ith-table-checkbox:focus-visible{outline:2px solid var(--_accent);outline-offset:2px}.ith-table-row{background:var(--_bg);transition:background-color .15s ease}.ith-table-hoverable .ith-table-row:hover{background:var(--_hover)}.ith-table-row.ith-table-row-selected{background:var(--_selected-bg)}.ith-table-row.ith-table-row-selected td:first-child{box-shadow:inset 3px 0 0 var(--_accent)}.ith-table-row-clickable{cursor:pointer}.ith-table-td{padding:var(--_cell-padding);border-bottom:1px solid var(--_border);font-size:var(--_font-size);color:var(--_text);vertical-align:middle;white-space:nowrap;background:transparent}.ith-table-row:last-child .ith-table-td{border-bottom:0}.ith-table-align-left{text-align:left}.ith-table-align-center{text-align:center}.ith-table-align-right,.ith-table-actions-head{text-align:right}.ith-table-actions-cell{padding:var(--_cell-padding);border-bottom:1px solid var(--_border);text-align:right;white-space:nowrap}.ith-table-row:last-child .ith-table-actions-cell{border-bottom:0}.ith-table-action{display:inline-flex;align-items:center;gap:4px;padding:5px 9px;margin-left:4px;border:1px solid var(--_border);border-radius:7px;background:transparent;color:var(--_accent);font-family:inherit;font-size:12px;font-weight:500;line-height:1.2;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.ith-table-action:hover:not(:disabled){background:var(--_accent-soft);border-color:var(--_accent)}.ith-table-action:disabled{opacity:.45;cursor:not-allowed}.ith-table-action-icon{font-size:12px;line-height:1}.ith-table-action.is-danger{color:#dc2626;border-color:#fecaca}.ith-table-filter-row th{background:var(--_filter-bg);padding:8px 10px;border-bottom:1px solid var(--_border);border-top:1px solid var(--_border)}.ith-table-filter-input{width:100%;box-sizing:border-box;height:30px;padding:0 9px;border:1px solid var(--_input-border);border-radius:7px;background:var(--_input-bg);color:var(--_text);font-family:inherit;font-size:12px}.ith-table-filter-select{cursor:pointer;padding-right:4px}.ith-table-filter-input:focus{outline:none;border-color:var(--_accent);box-shadow:0 0 0 3px var(--_focus)}.ith-table-filter-input::placeholder{color:var(--_muted)}.ith-table-status{padding:40px 16px;text-align:center;color:var(--_muted);font-size:13px}.ith-table-empty{display:flex;flex-direction:column;align-items:center;gap:8px}.ith-table-empty svg{width:36px;height:36px;opacity:.45}.ith-table-spinner{display:inline-block;width:16px;height:16px;border:2px solid var(--_accent-soft);border-top-color:var(--_accent);border-radius:50%;animation:ith-table-spin .7s linear infinite;vertical-align:middle}@keyframes ith-table-spin{to{transform:rotate(360deg)}}.ith-table-loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--_overlay);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);color:var(--_text);font-size:13px;font-weight:500;z-index:3}.ith-table-link{padding:0;border:0;background:none;color:var(--_accent);font-family:inherit;font-size:12px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.ith-table-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 16px;border-top:1px solid var(--_border);background:var(--_footer-bg);font-size:12px;color:var(--_muted)}.ith-table-footer-info{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.ith-table-footer-info strong{color:var(--_text);font-weight:600}.ith-table-footer-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.ith-table-pagination{display:flex;align-items:center;gap:4px}.ith-table-page-btn{display:inline-grid;place-items:center;min-width:30px;height:30px;padding:0 6px;border:1px solid var(--_border);border-radius:7px;background:var(--_bg);color:var(--_text);font-family:inherit;font-size:12px;font-weight:500;cursor:pointer;transition:background-color .15s ease,border-color .15s ease,color .15s ease}.ith-table-page-btn svg{width:14px;height:14px}.ith-table-page-btn:hover:not(:disabled){border-color:var(--_accent);color:var(--_accent);background:var(--_accent-soft)}.ith-table-page-btn:disabled{opacity:.4;cursor:not-allowed}.ith-table-page-number{min-width:30px}.ith-table-page-number.is-active{background:var(--_accent);border-color:var(--_accent);color:#fff}.ith-table-page-number.is-active:hover{background:var(--_accent);color:#fff}.ith-table-page-state{margin-left:6px;white-space:nowrap}.ith-table-page-size{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.ith-table-select{height:30px;padding:0 6px;border:1px solid var(--_border);border-radius:7px;background:var(--_bg);color:var(--_text);font-family:inherit;font-size:12px;cursor:pointer}.ith-table-select:focus-visible,.ith-table-page-btn:focus-visible,.ith-table-action:focus-visible,.ith-table-link:focus-visible{outline:2px solid var(--_accent);outline-offset:2px}.ith-table-dense{--ith-table-cell-padding: 8px 12px;--ith-table-font-size: 13px;--ith-table-header-font-size: 12px}.ith-table-dense .ith-table-head-row th{padding:10px 12px}.ith-table-striped .ith-table-row:nth-child(2n){background:var(--_striped-bg)}.ith-table-bordered .ith-table-td,.ith-table-bordered .ith-table-actions-cell,.ith-table-bordered .ith-table-head-row th,.ith-table-bordered .ith-table-filter-row th{border-right:1px solid var(--_border)}.ith-table-bordered .ith-table-head-row th:last-child,.ith-table-bordered .ith-table-filter-row th:last-child{border-right:0}.ith-table-bordered .ith-table-td:last-child,.ith-table-bordered .ith-table-actions-cell:last-child{border-right:0}@media(prefers-reduced-motion:reduce){.ith-table-row,.ith-table-action,.ith-table-page-btn,.ith-table-search-input,.ith-table-sort-icons svg{transition:none}.ith-table-spinner{animation-duration:2.4s}}@media(max-width:640px){.ith-table-footer{align-items:stretch;flex-direction:column}.ith-table-toolbar-inner{gap:10px}.ith-table-search{flex:1 1 auto}.ith-table-footer-controls{justify-content:space-between}.ith-table-page-state{display:none}}.ith-table-toolbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;flex:0 0 auto}.ith-table-tool-btn{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 13px;border:1px solid var(--_input-border);border-radius:10px;background:var(--_input-bg);color:var(--_text);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;white-space:nowrap;transition:border-color .14s ease,background-color .14s ease,color .14s ease,box-shadow .14s ease}.ith-table-tool-icon{width:15px;height:15px;flex-shrink:0;opacity:.8}.ith-table-tool-btn:hover .ith-table-tool-icon,.ith-table-tool-btn[aria-expanded=true] .ith-table-tool-icon,.ith-table-tool-btn[aria-pressed=true] .ith-table-tool-icon{opacity:1}.ith-table-tool-btn:hover{border-color:color-mix(in srgb,var(--_accent) 45%,var(--_input-border));background:color-mix(in srgb,var(--_accent) 4%,var(--_input-bg));color:var(--_accent)}.ith-table-tool-btn[aria-expanded=true],.ith-table-tool-btn[aria-pressed=true]{border-color:var(--_accent);background:var(--_accent-soft);color:var(--_accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--_accent) 20%,transparent)}.ith-table-tool-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--_focus)}.ith-table-columns{position:relative}.ith-table-columns-popover{position:absolute;z-index:45;top:calc(100% + 8px);inset-inline-end:0;min-width:220px;max-height:340px;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--_border);border-radius:12px;background:var(--_bg);color:var(--_text);box-shadow:0 18px 40px -18px #110c2e59,0 0 0 1px color-mix(in srgb,var(--_border) 60%,transparent)}.ith-table-columns-header{padding:10px 12px 8px;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--_muted)}.ith-table-columns-list{padding:0 6px 6px;overflow-y:auto;max-height:240px}.ith-table-columns-item{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:8px;font-size:13px;cursor:pointer;transition:background-color .12s ease}.ith-table-columns-item:hover{background:var(--_hover)}.ith-table-columns-footer{border-top:1px solid var(--_border);padding:4px;background:color-mix(in srgb,var(--_brand) 2%,var(--_bg))}.ith-table-columns-reset{width:100%;padding:7px 8px;border:0;border-radius:8px;background:transparent;color:var(--_accent);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;transition:background-color .12s ease}.ith-table-columns-reset:hover{background:var(--_accent-soft)}.ith-table.ith-table-compact{--ith-table-cell-padding: 7px 12px}.ith-table-sticky-start,.ith-table-sticky-end{position:sticky;z-index:3;background:var(--_bg)}.ith-table-sticky-start{box-shadow:inset -1px 0 0 var(--_border)}.ith-table-sticky-end{box-shadow:inset 1px 0 0 var(--_border)}.ith-table-striped .ith-table-row:nth-child(2n) .ith-table-sticky-start,.ith-table-striped .ith-table-row:nth-child(2n) .ith-table-sticky-end{background:var(--_striped-bg)}.ith-table-row-selected .ith-table-sticky-start,.ith-table-row-selected .ith-table-sticky-end{background:var(--_selected-bg)}.ith-table-row:hover .ith-table-sticky-start,.ith-table-row:hover .ith-table-sticky-end{background:var(--_hover)}thead .ith-table-sticky-start,thead .ith-table-sticky-end{z-index:7;background:var(--_header-bg)}.ith-table-filter-row .ith-table-sticky-start,.ith-table-filter-row .ith-table-sticky-end{z-index:6;background:var(--_filter-bg)}.ith-table-td{position:relative}.ith-table-td.ith-table-copyable{padding-inline-end:36px}.ith-table-copy{position:absolute;inset-inline-end:8px;top:50%;display:grid;place-items:center;width:24px;height:24px;padding:0;transform:translateY(-50%);border:1px solid transparent;border-radius:7px;background:var(--_bg);color:var(--_muted);cursor:pointer;opacity:0;pointer-events:none;transition:opacity .12s ease,color .12s ease,border-color .12s ease}.ith-table-copy svg{width:14px;height:14px}.ith-table-td:hover .ith-table-copy,.ith-table-td:focus-within .ith-table-copy,.ith-table-copy.is-copied{opacity:1;pointer-events:auto}.ith-table-copy:hover{border-color:var(--_accent);color:var(--_accent)}.ith-table-copy.is-copied{color:var(--_accent)}.ith-table-td:focus-visible{outline:2px solid var(--_accent);outline-offset:-2px}.ith-table-skeleton{display:block;width:72%;height:12px;border-radius:6px;background:linear-gradient(90deg,var(--_border) 25%,var(--_hover) 37%,var(--_border) 63%);background-size:400% 100%;animation:ith-table-shimmer 1.4s ease infinite}.ith-table-skeleton.is-check{width:16px;height:16px;border-radius:4px;margin:0 auto}@keyframes ith-table-shimmer{0%{background-position:100% 50%}to{background-position:0 50%}}.ith-table-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.ith-table-menu{position:fixed;z-index:1000;min-width:180px;max-width:280px;padding:6px;border:1px solid var(--_border);border-radius:10px;background:var(--_bg);color:var(--_text);box-shadow:0 16px 36px -16px #110c2e73;font-size:13px}@media(prefers-reduced-motion:reduce){.ith-table-skeleton{animation:none}.ith-table-copy,.ith-table-tool-btn{transition:none}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1954
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.34", type: TableComponent, isStandalone: true, selector: "ith-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, keyField: { classPropertyName: "keyField", publicName: "keyField", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, countSuffix: { classPropertyName: "countSuffix", publicName: "countSuffix", isSignal: true, isRequired: false, transformFunction: null }, totalLabel: { classPropertyName: "totalLabel", publicName: "totalLabel", isSignal: true, isRequired: false, transformFunction: null }, showToolbar: { classPropertyName: "showToolbar", publicName: "showToolbar", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, showFilters: { classPropertyName: "showFilters", publicName: "showFilters", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterAllLabel: { classPropertyName: "filterAllLabel", publicName: "filterAllLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, sortable: { classPropertyName: "sortable", publicName: "sortable", isSignal: true, isRequired: false, transformFunction: null }, search: { classPropertyName: "search", publicName: "search", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showPagination: { classPropertyName: "showPagination", publicName: "showPagination", isSignal: true, isRequired: false, transformFunction: null }, showPageSize: { classPropertyName: "showPageSize", publicName: "showPageSize", isSignal: true, isRequired: false, transformFunction: null }, showFirstLast: { classPropertyName: "showFirstLast", publicName: "showFirstLast", isSignal: true, isRequired: false, transformFunction: null }, maxPageButtons: { classPropertyName: "maxPageButtons", publicName: "maxPageButtons", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, showFilterChips: { classPropertyName: "showFilterChips", publicName: "showFilterChips", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selectAllScope: { classPropertyName: "selectAllScope", publicName: "selectAllScope", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, selectOnRowClick: { classPropertyName: "selectOnRowClick", publicName: "selectOnRowClick", isSignal: true, isRequired: false, transformFunction: null }, selectionActions: { classPropertyName: "selectionActions", publicName: "selectionActions", isSignal: true, isRequired: false, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, actionsHeader: { classPropertyName: "actionsHeader", publicName: "actionsHeader", isSignal: true, isRequired: false, transformFunction: null }, actionsWidth: { classPropertyName: "actionsWidth", publicName: "actionsWidth", isSignal: true, isRequired: false, transformFunction: null }, rowClickable: { classPropertyName: "rowClickable", publicName: "rowClickable", isSignal: true, isRequired: false, transformFunction: null }, rowClass: { classPropertyName: "rowClass", publicName: "rowClass", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingText: { classPropertyName: "loadingText", publicName: "loadingText", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, hoverable: { classPropertyName: "hoverable", publicName: "hoverable", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, dense: { classPropertyName: "dense", publicName: "dense", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, copyable: { classPropertyName: "copyable", publicName: "copyable", isSignal: true, isRequired: false, transformFunction: null }, showColumnPicker: { classPropertyName: "showColumnPicker", publicName: "showColumnPicker", isSignal: true, isRequired: false, transformFunction: null }, showDensityToggle: { classPropertyName: "showDensityToggle", publicName: "showDensityToggle", isSignal: true, isRequired: false, transformFunction: null }, showColumnMenu: { classPropertyName: "showColumnMenu", publicName: "showColumnMenu", isSignal: true, isRequired: false, transformFunction: null }, showExport: { classPropertyName: "showExport", publicName: "showExport", isSignal: true, isRequired: false, transformFunction: null }, exportFileName: { classPropertyName: "exportFileName", publicName: "exportFileName", isSignal: true, isRequired: false, transformFunction: null }, showViews: { classPropertyName: "showViews", publicName: "showViews", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, keyboardNavigation: { classPropertyName: "keyboardNavigation", publicName: "keyboardNavigation", isSignal: true, isRequired: false, transformFunction: null }, storageKey: { classPropertyName: "storageKey", publicName: "storageKey", isSignal: true, isRequired: false, transformFunction: null }, skeletonRows: { classPropertyName: "skeletonRows", publicName: "skeletonRows", isSignal: true, isRequired: false, transformFunction: null }, minRows: { classPropertyName: "minRows", publicName: "minRows", isSignal: true, isRequired: false, transformFunction: null }, stickySelection: { classPropertyName: "stickySelection", publicName: "stickySelection", isSignal: true, isRequired: false, transformFunction: null }, stickyActions: { classPropertyName: "stickyActions", publicName: "stickyActions", isSignal: true, isRequired: false, transformFunction: null }, rowDetailTrigger: { classPropertyName: "rowDetailTrigger", publicName: "rowDetailTrigger", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sort: "sortChange", search: "searchChange", filterChange: "filterChange", page: "pageChange", pageSize: "pageSizeChange", selected: "selectedChange", actionClick: "actionClick", rowClick: "rowClick", cellCopy: "cellCopy", rowContextMenu: "rowContextMenu", columnsChange: "columnsChange", densityChange: "densityChange", columnStateChange: "columnStateChange", selectionAction: "selectionAction", csvExport: "csvExport", exportFile: "exportFile", filters: "filtersChange" }, host: { listeners: { "document:pointermove": "onDocumentPointerMove($event)", "document:pointerup": "onDocumentPointerUp()", "document:click": "onDocumentClick()", "document:keydown.escape": "onDocumentEscape()" } }, queries: [{ propertyName: "cellDirectives", predicate: TableCellDirective, descendants: true, isSignal: true }, { propertyName: "headerDirectives", predicate: TableHeaderDirective, descendants: true, isSignal: true }, { propertyName: "filterDirectives", predicate: TableFilterDirective, descendants: true, isSignal: true }, { propertyName: "rowActionsDirectives", predicate: TableRowActionsDirective, descendants: true, isSignal: true }, { propertyName: "toolbarDirectives", predicate: TableToolbarDirective, descendants: true, isSignal: true }, { propertyName: "footerDirectives", predicate: TableFooterDirective, descendants: true, isSignal: true }, { propertyName: "emptyDirectives", predicate: TableEmptyDirective, descendants: true, isSignal: true }, { propertyName: "rowMenuDirectives", predicate: TableRowMenuDirective, descendants: true, isSignal: true }, { propertyName: "rowDetailDirectives", predicate: TableRowDetailDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"ith-table\"\n [class.ith-table-bordered]=\"bordered()\"\n [class.ith-table-dense]=\"dense()\"\n [class.ith-table-striped]=\"striped()\"\n [class.ith-table-hoverable]=\"hoverable()\"\n [class.ith-table-sticky]=\"stickyHeader()\"\n [class.ith-table-compact]=\"compact()\">\n <!-- Toolbar -->\n @if (showToolbar()) {\n <div class=\"ith-table-toolbar\">\n <div class=\"ith-table-toolbar-inner\">\n <div class=\"ith-table-toolbar-main\">\n @if (title()) {\n <h3 class=\"ith-table-title\">{{ title() }}</h3>\n }\n <span class=\"ith-table-badge\">{{ totalRows() }} {{ countSuffix() }}</span>\n @if (selected().length > 0) {\n <span class=\"ith-table-badge ith-table-badge-accent\">{{ selected().length }} selected</span>\n }\n @if (toolbarTemplate(); as toolbarTpl) {\n <ng-container\n [ngTemplateOutlet]=\"toolbarTpl\"\n [ngTemplateOutletContext]=\"toolbarContext()\" />\n }\n </div>\n\n <div class=\"ith-table-toolbar-spacer\"></div>\n\n <div class=\"ith-table-toolbar-actions\">\n @if (showViews()) {\n <div class=\"ith-table-menu-anchor\" (click)=\"$event.stopPropagation()\">\n <button\n type=\"button\"\n class=\"ith-table-tool-btn\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"viewsOpen()\"\n (click)=\"toggleViews($event)\">\n <svg class=\"ith-table-tool-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M4 6h16M4 12h10M4 18h7\" />\n </svg>\n <span>Views</span>\n </button>\n </div>\n }\n\n @if (showColumnPicker()) {\n <div class=\"ith-table-menu-anchor\" (click)=\"$event.stopPropagation()\">\n <button\n type=\"button\"\n class=\"ith-table-tool-btn\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"columnPickerOpen()\"\n (click)=\"toggleColumnPicker($event)\">\n <svg class=\"ith-table-tool-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <rect x=\"3\" y=\"4\" width=\"7\" height=\"16\" rx=\"1.5\" />\n <rect x=\"14\" y=\"4\" width=\"7\" height=\"16\" rx=\"1.5\" />\n </svg>\n <span>Columns</span>\n </button>\n </div>\n }\n\n @if (showDensityToggle()) {\n <div class=\"ith-table-segmented\" role=\"group\" aria-label=\"Row density\">\n <button\n type=\"button\"\n class=\"ith-table-segmented-btn\"\n [class.is-active]=\"!compact()\"\n [attr.aria-pressed]=\"!compact()\"\n title=\"Comfortable rows\"\n (click)=\"setDensity('comfortable')\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M4 8h16M4 16h16\" />\n </svg>\n <span>Comfortable</span>\n </button>\n <button\n type=\"button\"\n class=\"ith-table-segmented-btn\"\n [class.is-active]=\"compact()\"\n [attr.aria-pressed]=\"compact()\"\n title=\"Compact rows\"\n (click)=\"setDensity('compact')\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M4 6h16M4 10h16M4 14h16M4 18h16\" />\n </svg>\n <span>Compact</span>\n </button>\n </div>\n }\n\n @if (showExport()) {\n <div class=\"ith-table-menu-anchor\" (click)=\"$event.stopPropagation()\">\n <button\n type=\"button\"\n class=\"ith-table-tool-btn\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"!!exportMenuPos()\"\n title=\"Export the current view\"\n (click)=\"toggleExportMenu($event)\">\n <svg class=\"ith-table-tool-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M12 4v11m0 0 4-4m-4 4-4-4\" />\n <path d=\"M4 19h16\" />\n </svg>\n <span>Export</span>\n </button>\n </div>\n }\n\n @if (searchable()) {\n <div class=\"ith-table-search\">\n <svg class=\"ith-table-search-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.6-3.6\" />\n </svg>\n <input\n type=\"search\"\n class=\"ith-table-search-input\"\n [value]=\"search()\"\n [attr.placeholder]=\"searchPlaceholder()\"\n [attr.aria-label]=\"searchPlaceholder()\"\n (input)=\"onSearchInput($any($event.target).value)\" />\n @if (search()) {\n <button type=\"button\" class=\"ith-table-search-clear\" (click)=\"clearSearch()\" aria-label=\"Clear search\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M6 6l12 12M18 6 6 18\" />\n </svg>\n </button>\n }\n </div>\n }\n </div>\n </div>\n\n @if (showFilterChips() && hasQuery()) {\n <div class=\"ith-table-chips\">\n @for (chip of filterChips(); track chip.kind + chip.key) {\n <span class=\"ith-table-chip\">\n <span class=\"ith-table-chip-label\">{{ chip.label }}</span>\n <span class=\"ith-table-chip-value\">{{ chip.value }}</span>\n <button\n type=\"button\"\n class=\"ith-table-chip-remove\"\n [attr.aria-label]=\"'Remove ' + chip.label + ' filter'\"\n (click)=\"removeChip(chip)\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M6 6l12 12M18 6 6 18\" />\n </svg>\n </button>\n </span>\n }\n <button type=\"button\" class=\"ith-table-chips-clear\" (click)=\"clearQuery()\">Clear all</button>\n </div>\n }\n </div>\n }\n\n <!-- Bulk actions for the current selection -->\n @if (selected().length > 0 && selectionActions().length) {\n <div class=\"ith-table-selection-bar\" role=\"region\" aria-label=\"Selection actions\">\n <span class=\"ith-table-selection-count\">\n <strong>{{ selected().length }}</strong> selected\n </span>\n <span class=\"ith-table-selection-spacer\"></span>\n <div class=\"ith-table-selection-actions\">\n @for (action of selectionActions(); track action.id) {\n <button\n type=\"button\"\n class=\"ith-table-selection-btn\"\n [ngClass]=\"action.class ?? ''\"\n [attr.title]=\"action.title ?? action.label\"\n (click)=\"onSelectionAction(action, $event)\">\n @if (action.icon) {\n <span class=\"ith-table-selection-icon\" aria-hidden=\"true\">{{ action.icon }}</span>\n }\n <span>{{ action.label }}</span>\n </button>\n }\n <button type=\"button\" class=\"ith-table-selection-clear\" (click)=\"clearSelection()\">\n Clear selection\n </button>\n </div>\n </div>\n }\n\n <!-- Table -->\n <div\n class=\"ith-table-scroll\"\n [class.ith-table-scroll-bounded]=\"!!maxHeight()\"\n [class.ith-table-scroll-filtered]=\"showFilters()\"\n [class.is-scrolled]=\"scrolled()\"\n [style.maxHeight]=\"maxHeight() || null\"\n [style.--_min-rows]=\"minRows()\"\n (scroll)=\"onScroll($event)\">\n <table class=\"ith-table-grid\" [attr.aria-label]=\"ariaLabel()\" [attr.aria-busy]=\"loading()\">\n <thead>\n <tr class=\"ith-table-head-row\">\n @if (selectable()) {\n <th\n scope=\"col\"\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\">\n @if (selectionMode() === 'multi') {\n <input\n type=\"checkbox\"\n class=\"ith-table-checkbox\"\n [checked]=\"allPageSelected()\"\n [indeterminate]=\"somePageSelected()\"\n [attr.aria-label]=\"'Select all rows'\"\n (change)=\"onSelectAllChange($event)\" />\n }\n </th>\n }\n\n @if (hasExpander()) {\n <th scope=\"col\" class=\"ith-table-expander-cell\" [attr.aria-label]=\"'Row details'\"></th>\n }\n\n @for (column of visibleColumns(); track column.key) {\n <th\n scope=\"col\"\n class=\"ith-table-th\"\n [ngClass]=\"headerClasses(column)\"\n [style]=\"columnStyle(column)\"\n [attr.data-col]=\"column.key\"\n [attr.aria-sort]=\"isSortable(column) ? ariaSort(column) : null\"\n [attr.draggable]=\"reorderable() ? 'true' : null\"\n [class.ith-table-th-dragging]=\"dragKey() === column.key\"\n (dragstart)=\"onHeaderDragStart(column, $event)\"\n (dragover)=\"onHeaderDragOver(column, $event)\"\n (drop)=\"onHeaderDrop(column, $event)\"\n (dragend)=\"onHeaderDragEnd()\">\n <div class=\"ith-table-th-inner\">\n @if (headerTemplate(column); as headerTpl) {\n <ng-container\n [ngTemplateOutlet]=\"headerTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column: column }\" />\n } @else if (isSortable(column)) {\n <button\n type=\"button\"\n class=\"ith-table-sort\"\n [class.is-sorted]=\"!!sortDirection(column)\"\n (click)=\"toggleSort(column)\"\n [attr.aria-label]=\"'Sort by ' + (column.header ?? column.key)\">\n <span class=\"ith-table-th-label\">{{ column.header ?? column.key }}</span>\n <span class=\"ith-table-sort-icons\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 10 6\" class=\"ith-table-sort-up\" [class.is-active]=\"sortDirection(column) === 'asc'\"><path d=\"M5 0l5 6H0z\" /></svg>\n <svg viewBox=\"0 0 10 6\" class=\"ith-table-sort-down\" [class.is-active]=\"sortDirection(column) === 'desc'\"><path d=\"M5 6L0 0h10z\" /></svg>\n </span>\n </button>\n } @else {\n <span class=\"ith-table-th-label\">{{ column.header ?? column.key }}</span>\n }\n\n @if (showColumnMenu()) {\n <button\n type=\"button\"\n class=\"ith-table-th-menu\"\n [attr.aria-expanded]=\"columnMenu()?.key === column.key\"\n [attr.aria-label]=\"'Column options for ' + (column.header ?? column.key)\"\n (click)=\"openColumnMenu(column, $event)\">\n <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"5\" r=\"1.7\" />\n <circle cx=\"12\" cy=\"12\" r=\"1.7\" />\n <circle cx=\"12\" cy=\"19\" r=\"1.7\" />\n </svg>\n </button>\n }\n\n @if (pinOf(column) === 'start') {\n <span class=\"ith-table-pin-dot\" aria-hidden=\"true\"></span>\n }\n </div>\n\n @if (resizable()) {\n <span\n class=\"ith-table-resizer\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"'Resize ' + (column.header ?? column.key)\"\n (pointerdown)=\"startResize(column, $event)\"></span>\n }\n </th>\n }\n\n @if (hasActionsColumn()) {\n <th\n scope=\"col\"\n class=\"ith-table-th ith-table-actions-head\"\n [class.ith-table-sticky-end]=\"stickyActions()\"\n [style.width]=\"actionsWidth()\"\n [style.right]=\"stickyActions() ? '0px' : null\">\n {{ actionsHeader() }}\n </th>\n }\n </tr>\n\n @if (showFilters()) {\n <tr class=\"ith-table-filter-row\">\n @if (selectable()) {\n <th\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\"></th>\n }\n @if (hasExpander()) {\n <th class=\"ith-table-expander-cell\"></th>\n }\n @for (column of visibleColumns(); track column.key) {\n <th\n class=\"ith-table-filter-cell\"\n [ngClass]=\"filterClasses(column)\"\n [style]=\"columnStyle(column)\">\n @if (filterTemplate(column); as filterTpl) {\n <ng-container\n [ngTemplateOutlet]=\"filterTpl\"\n [ngTemplateOutletContext]=\"filterContext(column)\" />\n } @else if (column.filterable !== false) {\n @switch (filterTypeFor(column)) {\n @case ('select') {\n <select\n class=\"ith-table-filter-input ith-table-filter-select\"\n [value]=\"filterValue(column.key)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (change)=\"onFilterInput(column.key, $any($event.target).value)\">\n <option value=\"\">{{ filterAllLabel() }}</option>\n @for (option of filterOptionsFor(column); track option.value) {\n <option [value]=\"option.value\">{{ option.label }}</option>\n }\n </select>\n }\n @case ('number') {\n <input\n type=\"number\"\n class=\"ith-table-filter-input\"\n [value]=\"filterValue(column.key)\"\n [attr.placeholder]=\"filterPlaceholderFor(column)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (input)=\"onFilterInput(column.key, $any($event.target).value)\" />\n }\n @case ('date') {\n <input\n type=\"date\"\n class=\"ith-table-filter-input\"\n [value]=\"filterValue(column.key)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (input)=\"onFilterInput(column.key, $any($event.target).value)\" />\n }\n @default {\n <input\n type=\"text\"\n class=\"ith-table-filter-input\"\n [value]=\"filterValue(column.key)\"\n [attr.placeholder]=\"filterPlaceholderFor(column)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (input)=\"onFilterInput(column.key, $any($event.target).value)\" />\n }\n }\n }\n </th>\n }\n @if (hasActionsColumn()) {\n <th\n class=\"ith-table-filter-cell\"\n [class.ith-table-sticky-end]=\"stickyActions()\"\n [style.right]=\"stickyActions() ? '0px' : null\"></th>\n }\n </tr>\n }\n </thead>\n\n <tbody>\n @if (loading() && pagedRows().length === 0) {\n @for (skeleton of skeletonIndexes(); track skeleton) {\n <tr class=\"ith-table-skeleton-row\" aria-hidden=\"true\">\n @if (selectable()) {\n <td\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\">\n <span class=\"ith-table-skeleton is-check\"></span>\n </td>\n }\n @if (hasExpander()) {\n <td class=\"ith-table-expander-cell\"></td>\n }\n @for (column of visibleColumns(); track column.key) {\n <td class=\"ith-table-td\">\n <span class=\"ith-table-skeleton\"></span>\n </td>\n }\n @if (hasActionsColumn()) {\n <td class=\"ith-table-actions-cell\"><span class=\"ith-table-skeleton\"></span></td>\n }\n </tr>\n }\n <tr>\n <td class=\"ith-table-visually-hidden\" [attr.colspan]=\"emptyColspan()\" aria-live=\"polite\">\n {{ loadingText() }}\n </td>\n </tr>\n } @else if (pagedRows().length === 0) {\n <tr>\n <td class=\"ith-table-status\" [attr.colspan]=\"emptyColspan()\">\n @if (emptyTemplate(); as emptyTpl) {\n <ng-container\n [ngTemplateOutlet]=\"emptyTpl\"\n [ngTemplateOutletContext]=\"emptyContext()\" />\n } @else {\n <div class=\"ith-table-empty\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M3 10h18M9 10v9\" />\n </svg>\n <span>{{ hasQuery() ? 'No records match your search.' : emptyText() }}</span>\n @if (hasQuery()) {\n <button type=\"button\" class=\"ith-table-link\" (click)=\"clearQuery()\">Clear search &amp; filters</button>\n }\n </div>\n }\n </td>\n </tr>\n } @else {\n @for (row of pagedRows(); track trackRow($index, row); let rowIndex = $index) {\n <tr\n class=\"ith-table-row\"\n [ngClass]=\"rowClassFor(row, $index)\"\n [class.ith-table-row-clickable]=\"rowClickable() || selectOnRowClick() || (hasRowDetail() && rowDetailTrigger() === 'row')\"\n [attr.tabindex]=\"rowClickable() || selectOnRowClick() ? 0 : null\"\n [attr.aria-selected]=\"selectable() ? isSelected(row) : null\"\n [attr.aria-expanded]=\"hasRowDetail() ? isRowExpanded(row) : null\"\n (click)=\"onRowClick(row, $index, $event)\"\n (keydown)=\"onRowKeydown(row, $index, $event)\"\n (contextmenu)=\"onRowContextMenu(row, $index, $event)\">\n @if (selectable()) {\n <td\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\">\n <input\n type=\"checkbox\"\n class=\"ith-table-checkbox\"\n [checked]=\"isSelected(row)\"\n [attr.aria-label]=\"'Select row ' + ($index + 1)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"onRowCheckboxChange(row, $event)\" />\n </td>\n }\n\n @if (hasExpander()) {\n <td class=\"ith-table-expander-cell\">\n <button\n type=\"button\"\n class=\"ith-table-expander\"\n [class.is-open]=\"isRowExpanded(row)\"\n [attr.aria-expanded]=\"isRowExpanded(row)\"\n [attr.aria-label]=\"'Toggle details for row ' + ($index + 1)\"\n (click)=\"toggleRowDetail(row, $event)\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"m9 6 6 6-6 6\" />\n </svg>\n </button>\n </td>\n }\n\n @for (column of visibleColumns(); track column.key; let colIndex = $index) {\n <td\n class=\"ith-table-td\"\n [class.ith-table-copyable]=\"copyable()\"\n [ngClass]=\"cellClasses(row, column, rowIndex)\"\n [style]=\"columnStyle(column)\"\n [attr.title]=\"tooltipText(row, column, rowIndex)\"\n [attr.data-cell]=\"rowIndex + '-' + colIndex\"\n [attr.data-col]=\"column.key\"\n [attr.tabindex]=\"cellTabIndex(rowIndex, colIndex)\"\n (focus)=\"onCellFocus(rowIndex, colIndex)\"\n (keydown)=\"onCellKeydown(column, rowIndex, colIndex, $event)\">\n @if (cellTemplate(column); as cellTpl) {\n <ng-container\n [ngTemplateOutlet]=\"cellTpl\"\n [ngTemplateOutletContext]=\"cellContext(row, column, rowIndex)\" />\n } @else {\n {{ cellText(row, column, rowIndex) }}\n }\n @if (copyable()) {\n <button\n type=\"button\"\n class=\"ith-table-copy\"\n [class.is-copied]=\"isCellCopied(rowIndex, column)\"\n [attr.aria-label]=\"'Copy ' + (column.header ?? column.key)\"\n (click)=\"copyCell(row, column, rowIndex, $event)\">\n @if (isCellCopied(rowIndex, column)) {\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m5 13 4 4L19 7\" /></svg>\n } @else {\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" /><path d=\"M15 5.5A2.5 2.5 0 0 0 12.5 3H6a2 2 0 0 0-2 2v7.5A2.5 2.5 0 0 0 6.5 15\" /></svg>\n }\n </button>\n }\n </td>\n }\n\n @if (hasActionsColumn()) {\n <td\n class=\"ith-table-actions-cell\"\n [class.ith-table-sticky-end]=\"stickyActions()\"\n [style.right]=\"stickyActions() ? '0px' : null\">\n @if (rowActionsTemplate(); as actionsTpl) {\n <ng-container\n [ngTemplateOutlet]=\"actionsTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row, index: $index }\" />\n } @else {\n @for (action of rowActions(); track action.id) {\n @if (isActionVisible(action, row, $index)) {\n <button\n type=\"button\"\n class=\"ith-table-action\"\n [ngClass]=\"action.class ?? ''\"\n [attr.title]=\"action.title ?? action.label\"\n [disabled]=\"isActionDisabled(action, row, $index)\"\n (click)=\"onActionClick(action, row, $index, $event)\">\n @if (action.icon) {\n <span class=\"ith-table-action-icon\" aria-hidden=\"true\">{{ action.icon }}</span>\n }\n <span>{{ action.label }}</span>\n </button>\n }\n }\n }\n </td>\n }\n </tr>\n\n @if (hasRowDetail() && isRowExpanded(row)) {\n <tr class=\"ith-table-detail-row\">\n <td [attr.colspan]=\"emptyColspan()\">\n @if (rowDetailTemplate(); as detailTpl) {\n <ng-container\n [ngTemplateOutlet]=\"detailTpl\"\n [ngTemplateOutletContext]=\"rowDetailContext(row, rowIndex)\" />\n }\n </td>\n </tr>\n }\n }\n }\n </tbody>\n\n @if (hasAggregates() && pagedRows().length > 0) {\n <tfoot>\n <tr class=\"ith-table-total-row\">\n @if (selectable()) {\n <td\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\"></td>\n }\n @if (hasExpander()) {\n <td class=\"ith-table-expander-cell\"></td>\n }\n @for (column of visibleColumns(); track column.key) {\n <td\n class=\"ith-table-total-cell\"\n [ngClass]=\"stickyClassFor(column)\"\n [style]=\"columnStyle(column)\">\n @if (column.aggregate) {\n <span class=\"ith-table-total-label\">{{ aggregateLabel(column) }}</span>\n <span class=\"ith-table-total-value\">{{ aggregateText(column) }}</span>\n }\n </td>\n }\n @if (hasActionsColumn()) {\n <td\n class=\"ith-table-total-cell ith-table-actions-cell\"\n [class.ith-table-sticky-end]=\"stickyActions()\"\n [style.right]=\"stickyActions() ? '0px' : null\"></td>\n }\n </tr>\n </tfoot>\n }\n </table>\n\n @if (loading() && pagedRows().length > 0) {\n <div class=\"ith-table-loading-overlay\">\n <span class=\"ith-table-spinner\" aria-hidden=\"true\"></span>\n <span>{{ loadingText() }}</span>\n </div>\n }\n </div>\n\n <!-- Columns popover (fixed, so the toolbar's scroll box cannot clip it) -->\n @if (columnPickerOpen()) {\n <div\n class=\"ith-table-popover\"\n role=\"dialog\"\n aria-label=\"Visible columns\"\n [style.left.px]=\"columnsMenuPos()?.x ?? 0\"\n [style.top.px]=\"columnsMenuPos()?.y ?? 0\"\n (click)=\"$event.stopPropagation()\">\n <div class=\"ith-table-popover-header\">Show columns</div>\n <div class=\"ith-table-popover-list\">\n @for (column of orderedColumns(); track column.key) {\n <label class=\"ith-table-columns-item\">\n <input\n type=\"checkbox\"\n class=\"ith-table-checkbox\"\n [checked]=\"isColumnVisible(column)\"\n [disabled]=\"!isColumnVisible(column) && !canHide(column.key)\"\n (change)=\"setColumnVisible(column.key, $any($event.target).checked)\" />\n <span>{{ column.header ?? column.key }}</span>\n @if (pinOf(column)) {\n <span class=\"ith-table-pin-tag\">{{ pinOf(column) }}</span>\n }\n </label>\n }\n </div>\n <div class=\"ith-table-popover-footer\">\n <button type=\"button\" class=\"ith-table-popover-action\" (click)=\"resetColumns()\">\n Reset columns\n </button>\n </div>\n </div>\n }\n\n <!-- Export formats -->\n @if (exportMenuPos(); as pos) {\n <div\n class=\"ith-table-popover ith-table-export-menu\"\n role=\"menu\"\n aria-label=\"Export format\"\n [style.left.px]=\"pos.x\"\n [style.top.px]=\"pos.y\"\n (click)=\"$event.stopPropagation()\">\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"exportAs('xlsx')\">\n <span class=\"ith-table-export-name\">Excel</span>\n <span class=\"ith-table-export-hint\">.xlsx \u2014 Excel, Numbers, Sheets</span>\n </button>\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"exportAs('csv')\">\n <span class=\"ith-table-export-name\">CSV</span>\n <span class=\"ith-table-export-hint\">.csv \u2014 plain text, any tool</span>\n </button>\n </div>\n }\n\n <!-- Named views -->\n @if (viewsOpen()) {\n <div\n class=\"ith-table-popover\"\n role=\"dialog\"\n aria-label=\"Saved views\"\n [style.left.px]=\"viewsMenuPos()?.x ?? 0\"\n [style.top.px]=\"viewsMenuPos()?.y ?? 0\"\n (click)=\"$event.stopPropagation()\">\n <div class=\"ith-table-popover-header\">Saved views</div>\n <div class=\"ith-table-popover-list\">\n @for (name of savedViewNames(); track name) {\n <div class=\"ith-table-view-item\" [class.is-active]=\"activeView() === name\">\n <button type=\"button\" class=\"ith-table-view-apply\" (click)=\"applyView(name)\">\n {{ name }}\n </button>\n <button\n type=\"button\"\n class=\"ith-table-view-delete\"\n [attr.aria-label]=\"'Delete view ' + name\"\n (click)=\"deleteView(name, $event)\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M6 6l12 12M18 6 6 18\" />\n </svg>\n </button>\n </div>\n } @empty {\n <p class=\"ith-table-popover-empty\">No saved views yet.</p>\n }\n </div>\n <div class=\"ith-table-popover-footer ith-table-view-save\">\n <input\n type=\"text\"\n class=\"ith-table-view-input\"\n placeholder=\"View name\"\n aria-label=\"New view name\"\n [value]=\"viewNameDraft()\"\n (input)=\"onViewNameInput($any($event.target).value)\"\n (keydown.enter)=\"saveView()\" />\n <button type=\"button\" class=\"ith-table-popover-action\" (click)=\"saveView()\">Save</button>\n </div>\n </div>\n }\n\n <!-- Column header menu -->\n @if (columnMenu(); as menu) {\n <div\n class=\"ith-table-popover ith-table-column-menu\"\n role=\"menu\"\n [style.left.px]=\"menu.x\"\n [style.top.px]=\"menu.y\"\n (click)=\"$event.stopPropagation()\">\n @if (columnMenuColumn(); as column) {\n @if (isSortable(column)) {\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuSort('asc')\">\n Sort ascending\n </button>\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuSort('desc')\">\n Sort descending\n </button>\n @if (sortDirection(column)) {\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuClearSort()\">\n Clear sort\n </button>\n }\n <div class=\"ith-table-menu-divider\"></div>\n }\n @if (canPin(column)) {\n @if (pinOf(column) !== 'start') {\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuPin('start')\">\n Pin to left\n </button>\n }\n @if (pinOf(column) !== 'end') {\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuPin('end')\">\n Pin to right\n </button>\n }\n @if (pinOf(column)) {\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuPin(null)\">\n Unpin column\n </button>\n }\n <div class=\"ith-table-menu-divider\"></div>\n }\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuAutosize()\">\n Fit to content\n </button>\n @if (canHide(column.key)) {\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuHide()\">\n Hide column\n </button>\n }\n }\n </div>\n }\n\n <!-- Right-click menu (projected template, positioned at the pointer) -->\n @if (menuState(); as menu) {\n <div\n class=\"ith-table-menu\"\n role=\"menu\"\n [style.left.px]=\"menu.x\"\n [style.top.px]=\"menu.y\"\n (click)=\"closeRowMenu(); $event.stopPropagation()\">\n @if (rowMenuTemplate(); as menuTpl) {\n <ng-container\n [ngTemplateOutlet]=\"menuTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: menu.row, row: menu.row, index: menu.index }\" />\n }\n </div>\n }\n\n <!-- Footer -->\n @if (showFooter()) {\n <div class=\"ith-table-footer\">\n <div class=\"ith-table-footer-info\">\n @if (footerTemplate(); as footerTpl) {\n <ng-container\n [ngTemplateOutlet]=\"footerTpl\"\n [ngTemplateOutletContext]=\"footerContext()\" />\n } @else {\n <span>\n Showing <strong>{{ rangeStart() }}</strong>\u2013<strong>{{ rangeEnd() }}</strong>\n of <strong>{{ totalRows() }}</strong>\n </span>\n <span class=\"ith-table-total\">{{ totalLabel() }}: <strong>{{ totalRows() }}</strong></span>\n }\n </div>\n\n <div class=\"ith-table-footer-controls\">\n @if (showPagination()) {\n <nav class=\"ith-table-pagination\" aria-label=\"Pagination\">\n @if (showFirstLast()) {\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"firstPage()\" [disabled]=\"page() === 1\" aria-label=\"First page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m11 17-5-5 5-5M18 17l-5-5 5-5\" /></svg>\n </button>\n }\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"previousPage()\" [disabled]=\"page() === 1\" aria-label=\"Previous page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m15 18-6-6 6-6\" /></svg>\n </button>\n\n @for (item of pageItems(); track item) {\n <button\n type=\"button\"\n class=\"ith-table-page-btn ith-table-page-number\"\n [class.is-active]=\"item === page()\"\n [attr.aria-current]=\"item === page() ? 'page' : null\"\n (click)=\"goToPage(item)\">\n {{ item }}\n </button>\n }\n\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"nextPage()\" [disabled]=\"page() === pageCount()\" aria-label=\"Next page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m9 18 6-6-6-6\" /></svg>\n </button>\n @if (showFirstLast()) {\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"lastPage()\" [disabled]=\"page() === pageCount()\" aria-label=\"Last page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m13 17 5-5-5-5M6 17l5-5-5-5\" /></svg>\n </button>\n }\n <span class=\"ith-table-page-state\">Page {{ page() }} / {{ pageCount() }}</span>\n </nav>\n }\n\n @if (showPageSize()) {\n <label class=\"ith-table-page-size\">\n <span>Rows:</span>\n <select class=\"ith-table-select\" [value]=\"pageSize()\" (change)=\"onPageSizeChange($any($event.target).value)\">\n @for (size of pageSizeChoices(); track size) {\n <option [value]=\"size\">{{ size }}</option>\n }\n </select>\n </label>\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:block;--_brand: var(--ith-table-brand, #5b21b6);--_bg: var(--ith-table-bg, #ffffff);--_text: var(--ith-table-text, #1f2937);--_muted: var(--ith-table-muted, #6b7280);--_border: var(--ith-table-border, #e8eaf0);--_header-bg: var(--ith-table-header-bg, var(--_brand));--_header-text: var(--ith-table-header-text, #ffffff);--_hover: var(--ith-table-hover, color-mix(in srgb, var(--_brand) 6%, #ffffff));--_selected-bg: var(--ith-table-selected-bg, color-mix(in srgb, var(--_brand) 10%, #ffffff));--_striped-bg: var(--ith-table-striped-bg, color-mix(in srgb, var(--_brand) 2%, #ffffff));--_accent: var(--ith-table-accent, var(--_brand));--_accent-soft: var(--ith-table-accent-soft, color-mix(in srgb, var(--_brand) 12%, #ffffff));--_input-bg: var(--ith-table-input-bg, #ffffff);--_input-border: var(--ith-table-input-border, #dfe3ec);--_footer-bg: var(--ith-table-footer-bg, color-mix(in srgb, var(--_brand) 2%, #ffffff));--_filter-bg: var(--ith-table-filter-bg, color-mix(in srgb, var(--_brand) 3%, #ffffff));--_overlay: var(--ith-table-overlay, rgba(255, 255, 255, .72));--_radius: var(--ith-table-radius, 14px);--_shadow: var(--ith-table-shadow, 0 18px 40px -28px rgba(24, 20, 60, .55));--_focus: var(--ith-table-focus, color-mix(in srgb, var(--_brand) 25%, transparent));--_cell-padding: var(--ith-table-cell-padding, 12px 16px);--_font-size: var(--ith-table-font-size, 14px);--_header-font-size: var(--ith-table-header-font-size, 13px);--_row-height: var(--ith-table-row-height, 46px);--_head-height: var(--ith-table-head-height, 45px);--_filter-height: 47px;--_on-accent: #ffffff;--_toolbar-tint: color-mix(in srgb, var(--_brand) 3%, var(--_bg));--_popover-bg: var(--_bg);--_scroll-thumb: color-mix(in srgb, var(--_muted) 38%, transparent);--_danger: #dc2626;--_elevation: 0 18px 40px -18px rgba(17, 12, 46, .35), 0 0 0 1px color-mix(in srgb, var(--_border) 60%, transparent)}:host-context([data-theme=\"dark\"]),:host-context(.dark){--_brand: var(--ith-table-brand, #7c3aed);--_bg: var(--ith-table-bg, #161826);--_text: var(--ith-table-text, #e7e9f3);--_muted: var(--ith-table-muted, #9aa0b5);--_border: var(--ith-table-border, #2f3348);--_header-bg: var(--ith-table-header-bg, color-mix(in srgb, var(--_brand) 34%, #0b0d16));--_header-text: var(--ith-table-header-text, #f3eeff);--_hover: var(--ith-table-hover, color-mix(in srgb, var(--_brand) 15%, #161826));--_selected-bg: var(--ith-table-selected-bg, color-mix(in srgb, var(--_brand) 20%, #161826));--_striped-bg: var(--ith-table-striped-bg, color-mix(in srgb, var(--_brand) 6%, #161826));--_accent: var(--ith-table-accent, color-mix(in srgb, var(--_brand) 55%, #ffffff));--_accent-soft: var(--ith-table-accent-soft, color-mix(in srgb, var(--_brand) 26%, #161826));--_input-bg: var(--ith-table-input-bg, #202436);--_input-border: var(--ith-table-input-border, #343a52);--_footer-bg: var(--ith-table-footer-bg, color-mix(in srgb, var(--_brand) 4%, #12141f));--_filter-bg: var(--ith-table-filter-bg, color-mix(in srgb, var(--_brand) 9%, #161826));--_overlay: var(--ith-table-overlay, rgba(17, 19, 30, .72));--_shadow: var(--ith-table-shadow, 0 18px 40px -28px rgba(0, 0, 0, .85));--_focus: var(--ith-table-focus, color-mix(in srgb, var(--_brand) 38%, transparent));--_on-accent: #15121f;--_toolbar-tint: color-mix(in srgb, var(--_brand) 12%, var(--_bg));--_popover-bg: #1d2133;--_scroll-thumb: color-mix(in srgb, #ffffff 22%, transparent);--_danger: #f87171;--_elevation: 0 22px 48px -20px rgba(0, 0, 0, .8), 0 0 0 1px color-mix(in srgb, #ffffff 8%, transparent)}@media(prefers-color-scheme:dark){:host-context([data-theme=\"auto\"]){--_brand: var(--ith-table-brand, #7c3aed);--_bg: var(--ith-table-bg, #161826);--_text: var(--ith-table-text, #e7e9f3);--_muted: var(--ith-table-muted, #9aa0b5);--_border: var(--ith-table-border, #2f3348);--_header-bg: var(--ith-table-header-bg, color-mix(in srgb, var(--_brand) 34%, #0b0d16));--_header-text: var(--ith-table-header-text, #f3eeff);--_hover: var(--ith-table-hover, color-mix(in srgb, var(--_brand) 15%, #161826));--_selected-bg: var(--ith-table-selected-bg, color-mix(in srgb, var(--_brand) 20%, #161826));--_striped-bg: var(--ith-table-striped-bg, color-mix(in srgb, var(--_brand) 6%, #161826));--_accent: var(--ith-table-accent, color-mix(in srgb, var(--_brand) 55%, #ffffff));--_accent-soft: var(--ith-table-accent-soft, color-mix(in srgb, var(--_brand) 26%, #161826));--_input-bg: var(--ith-table-input-bg, #202436);--_input-border: var(--ith-table-input-border, #343a52);--_footer-bg: var(--ith-table-footer-bg, color-mix(in srgb, var(--_brand) 4%, #12141f));--_filter-bg: var(--ith-table-filter-bg, color-mix(in srgb, var(--_brand) 9%, #161826));--_overlay: var(--ith-table-overlay, rgba(17, 19, 30, .72));--_shadow: var(--ith-table-shadow, 0 18px 40px -28px rgba(0, 0, 0, .85));--_focus: var(--ith-table-focus, color-mix(in srgb, var(--_brand) 38%, transparent));--_on-accent: #15121f;--_toolbar-tint: color-mix(in srgb, var(--_brand) 12%, var(--_bg));--_popover-bg: #1d2133;--_scroll-thumb: color-mix(in srgb, #ffffff 22%, transparent);--_danger: #f87171;--_elevation: 0 22px 48px -20px rgba(0, 0, 0, .8), 0 0 0 1px color-mix(in srgb, #ffffff 8%, transparent)}}.ith-table{display:block;position:relative;background:var(--_bg);color:var(--_text);border:1px solid var(--_border);border-radius:var(--_radius);box-shadow:var(--_shadow);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:var(--_font-size);overflow:hidden}.ith-table-toolbar{padding:14px 16px;border-bottom:1px solid var(--_border);background:var(--_toolbar-tint)}.ith-table-toolbar-inner{display:flex;align-items:center;gap:12px;flex-wrap:nowrap;min-width:0;overflow-x:auto;scrollbar-width:none}.ith-table-toolbar-inner::-webkit-scrollbar{display:none}.ith-table-toolbar-main{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;min-width:0;flex:0 0 auto}.ith-table-toolbar-spacer{flex:1 1 auto;min-width:8px}.ith-table-title{margin:0;font-size:15.5px;font-weight:650;letter-spacing:-.015em;color:var(--_text);white-space:nowrap}.ith-table-badge{display:inline-flex;align-items:center;padding:3px 10px;border-radius:999px;background:var(--_accent-soft);color:var(--_accent);font-size:11.5px;font-weight:600;line-height:1.4;white-space:nowrap}.ith-table-badge-accent{background:var(--_accent);color:var(--_on-accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--_accent) 30%,transparent)}.ith-table-search{position:relative;flex:0 1 260px;min-width:180px}.ith-table-search-icon{position:absolute;left:12px;top:50%;width:15px;height:15px;transform:translateY(-50%);color:var(--_muted);pointer-events:none}.ith-table-search-input{width:100%;box-sizing:border-box;height:36px;padding:0 34px 0 36px;border:1px solid var(--_input-border);border-radius:10px;background:var(--_input-bg);color:var(--_text);font-size:13px;font-family:inherit;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ith-table-search-input:hover{border-color:color-mix(in srgb,var(--_accent) 35%,var(--_input-border))}.ith-table-search-input::placeholder{color:var(--_muted)}.ith-table-search-input::-webkit-search-cancel-button,.ith-table-search-input::-webkit-search-decoration,.ith-table-search-input::-webkit-search-results-button,.ith-table-search-input::-webkit-search-results-decoration{-webkit-appearance:none;appearance:none;display:none}.ith-table-search-input:focus{outline:none;border-color:var(--_accent);box-shadow:0 0 0 3px var(--_focus);background:var(--_bg)}.ith-table-search-clear{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:24px;height:24px;display:grid;place-items:center;border:0;border-radius:7px;background:transparent;color:var(--_muted);cursor:pointer;transition:background-color .12s ease,color .12s ease}.ith-table-search-clear svg{width:14px;height:14px}.ith-table-search-clear:hover{background:var(--_accent-soft);color:var(--_accent)}.ith-table-scroll{position:relative;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--_scroll-thumb) transparent}.ith-table-scroll::-webkit-scrollbar{width:10px;height:10px}.ith-table-scroll::-webkit-scrollbar-track{background:transparent}.ith-table-scroll::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:999px;background-color:var(--_scroll-thumb);background-clip:content-box}.ith-table-scroll::-webkit-scrollbar-thumb:hover{background-color:color-mix(in srgb,var(--_scroll-thumb) 75%,var(--_text))}.ith-table-scroll:not(.ith-table-scroll-bounded){min-height:calc(var(--_head-height) + var(--_row-height) * var(--_min-rows, 4))}.ith-table-scroll:not(.ith-table-scroll-bounded).ith-table-scroll-filtered{min-height:calc(var(--_head-height) + var(--_filter-height) + var(--_row-height) * var(--_min-rows, 4))}.ith-table-grid{width:100%;border-collapse:separate;border-spacing:0;table-layout:auto}.ith-table-head-row th{background:var(--_header-bg);color:var(--_header-text);font-size:var(--_header-font-size);font-weight:600;letter-spacing:.01em;text-align:left;padding:13px 16px;white-space:nowrap;border:0}.ith-table-sticky .ith-table-head-row th{position:sticky;top:0;z-index:2}.ith-table-th-label{display:inline-block}.ith-table-sort{display:inline-flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;letter-spacing:inherit;cursor:pointer;text-align:inherit}.ith-table-sort-icons{display:inline-flex;flex-direction:column;gap:2px;opacity:.5}.ith-table-sort-icons svg{width:8px;height:5px;fill:currentColor;opacity:.5;transition:opacity .15s ease}.ith-table-sort-icons svg.is-active{opacity:1}.ith-table-sort.is-sorted .ith-table-sort-icons{opacity:1}.ith-table-select-cell{width:46px;text-align:center;padding-left:14px;padding-right:10px}.ith-table-checkbox{width:16px;height:16px;margin:0;cursor:pointer;accent-color:var(--_accent);vertical-align:middle}.ith-table-checkbox:focus-visible{outline:2px solid var(--_accent);outline-offset:2px}.ith-table-row{background:var(--_bg);transition:background-color .15s ease}.ith-table-hoverable .ith-table-row:hover{background:var(--_hover)}.ith-table-row.ith-table-row-selected{background:var(--_selected-bg)}.ith-table-row.ith-table-row-selected td:first-child{box-shadow:inset 3px 0 0 var(--_accent)}.ith-table-row-clickable{cursor:pointer}.ith-table-td{padding:var(--_cell-padding);border-bottom:1px solid var(--_border);font-size:var(--_font-size);color:var(--_text);vertical-align:middle;white-space:nowrap;background:transparent}.ith-table-row:last-child .ith-table-td{border-bottom:0}.ith-table-align-left{text-align:left}.ith-table-align-center{text-align:center}.ith-table-align-right,.ith-table-actions-head{text-align:right}.ith-table-actions-cell{padding:var(--_cell-padding);border-bottom:1px solid var(--_border);text-align:right;white-space:nowrap}.ith-table-row:last-child .ith-table-actions-cell{border-bottom:0}.ith-table-action{display:inline-flex;align-items:center;gap:4px;padding:5px 9px;margin-left:4px;border:1px solid var(--_border);border-radius:7px;background:transparent;color:var(--_accent);font-family:inherit;font-size:12px;font-weight:500;line-height:1.2;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.ith-table-action:hover:not(:disabled){background:var(--_accent-soft);border-color:var(--_accent)}.ith-table-action:disabled{opacity:.45;cursor:not-allowed}.ith-table-action-icon{font-size:12px;line-height:1}.ith-table-action.is-danger{color:var(--_danger);border-color:color-mix(in srgb,var(--_danger) 35%,transparent)}.ith-table-filter-row th{background:var(--_filter-bg);padding:8px 10px;border-bottom:1px solid var(--_border);border-top:1px solid var(--_border)}.ith-table-filter-input{width:100%;box-sizing:border-box;height:30px;padding:0 9px;border:1px solid var(--_input-border);border-radius:7px;background:var(--_input-bg);color:var(--_text);font-family:inherit;font-size:12px}.ith-table-filter-select{cursor:pointer;padding-right:4px}.ith-table-filter-input:focus{outline:none;border-color:var(--_accent);box-shadow:0 0 0 3px var(--_focus)}.ith-table-filter-input::placeholder{color:var(--_muted)}.ith-table-status{padding:40px 16px;text-align:center;color:var(--_muted);font-size:13px}.ith-table-empty{display:flex;flex-direction:column;align-items:center;gap:8px}.ith-table-empty svg{width:36px;height:36px;opacity:.45}.ith-table-spinner{display:inline-block;width:16px;height:16px;border:2px solid var(--_accent-soft);border-top-color:var(--_accent);border-radius:50%;animation:ith-table-spin .7s linear infinite;vertical-align:middle}@keyframes ith-table-spin{to{transform:rotate(360deg)}}.ith-table-loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--_overlay);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);color:var(--_text);font-size:13px;font-weight:500;z-index:3}.ith-table-link{padding:0;border:0;background:none;color:var(--_accent);font-family:inherit;font-size:12px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.ith-table-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 16px;border-top:1px solid var(--_border);background:var(--_footer-bg);font-size:12px;color:var(--_muted)}.ith-table-footer-info{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.ith-table-footer-info strong{color:var(--_text);font-weight:600}.ith-table-footer-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.ith-table-pagination{display:flex;align-items:center;gap:4px}.ith-table-page-btn{display:inline-grid;place-items:center;min-width:30px;height:30px;padding:0 6px;border:1px solid var(--_border);border-radius:7px;background:var(--_bg);color:var(--_text);font-family:inherit;font-size:12px;font-weight:500;cursor:pointer;transition:background-color .15s ease,border-color .15s ease,color .15s ease}.ith-table-page-btn svg{width:14px;height:14px}.ith-table-page-btn:hover:not(:disabled){border-color:var(--_accent);color:var(--_accent);background:var(--_accent-soft)}.ith-table-page-btn:disabled{opacity:.4;cursor:not-allowed}.ith-table-page-number{min-width:30px}.ith-table-page-number.is-active{background:var(--_accent);border-color:var(--_accent);color:var(--_on-accent)}.ith-table-page-number.is-active:hover{background:var(--_accent);color:var(--_on-accent)}.ith-table-page-state{margin-left:6px;white-space:nowrap}.ith-table-page-size{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.ith-table-select{height:30px;padding:0 6px;border:1px solid var(--_border);border-radius:7px;background:var(--_bg);color:var(--_text);font-family:inherit;font-size:12px;cursor:pointer}.ith-table-select:focus-visible,.ith-table-page-btn:focus-visible,.ith-table-action:focus-visible,.ith-table-link:focus-visible{outline:2px solid var(--_accent);outline-offset:2px}.ith-table-dense{--ith-table-cell-padding: 8px 12px;--ith-table-font-size: 13px;--ith-table-header-font-size: 12px;--_cell-padding: 8px 12px;--_font-size: 13px;--_header-font-size: 12px;--_row-height: 39px;--_head-height: 38px}.ith-table-dense .ith-table-head-row th{padding:10px 12px}.ith-table-striped .ith-table-row:nth-child(2n){background:var(--_striped-bg)}.ith-table-bordered .ith-table-td,.ith-table-bordered .ith-table-actions-cell,.ith-table-bordered .ith-table-head-row th,.ith-table-bordered .ith-table-filter-row th{border-right:1px solid var(--_border)}.ith-table-bordered .ith-table-head-row th:last-child,.ith-table-bordered .ith-table-filter-row th:last-child{border-right:0}.ith-table-bordered .ith-table-td:last-child,.ith-table-bordered .ith-table-actions-cell:last-child{border-right:0}@media(prefers-reduced-motion:reduce){.ith-table-row,.ith-table-action,.ith-table-page-btn,.ith-table-search-input,.ith-table-sort-icons svg{transition:none}.ith-table-spinner{animation-duration:2.4s}}@media(max-width:640px){.ith-table-footer{align-items:stretch;flex-direction:column}.ith-table-toolbar-inner{gap:10px}.ith-table-search{flex:1 1 auto}.ith-table-footer-controls{justify-content:space-between}.ith-table-page-state{display:none}}.ith-table-toolbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;flex:0 0 auto}.ith-table-tool-btn{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 13px;border:1px solid var(--_input-border);border-radius:10px;background:var(--_input-bg);color:var(--_text);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;white-space:nowrap;transition:border-color .14s ease,background-color .14s ease,color .14s ease,box-shadow .14s ease}.ith-table-tool-icon{width:15px;height:15px;flex-shrink:0;opacity:.8}.ith-table-tool-btn:hover .ith-table-tool-icon,.ith-table-tool-btn[aria-expanded=true] .ith-table-tool-icon,.ith-table-tool-btn[aria-pressed=true] .ith-table-tool-icon{opacity:1}.ith-table-tool-btn:hover{border-color:color-mix(in srgb,var(--_accent) 45%,var(--_input-border));background:color-mix(in srgb,var(--_accent) 4%,var(--_input-bg));color:var(--_accent)}.ith-table-tool-btn[aria-expanded=true],.ith-table-tool-btn[aria-pressed=true]{border-color:var(--_accent);background:var(--_accent-soft);color:var(--_accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--_accent) 20%,transparent)}.ith-table-tool-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--_focus)}.ith-table-menu-anchor{position:relative;display:inline-flex}.ith-table-segmented{display:inline-flex;align-items:center;gap:2px;height:36px;padding:3px;border:1px solid var(--_input-border);border-radius:10px;background:var(--_input-bg)}.ith-table-segmented-btn{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border:0;border-radius:7px;background:transparent;color:var(--_muted);font:inherit;font-size:12.5px;font-weight:600;white-space:nowrap;cursor:pointer;transition:background-color .12s ease,color .12s ease}.ith-table-segmented-btn svg{width:13px;height:13px}.ith-table-segmented-btn:hover{color:var(--_accent)}.ith-table-segmented-btn.is-active{background:var(--_accent-soft);color:var(--_accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--_accent) 22%,transparent)}.ith-table-segmented-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--_focus)}.ith-table-popover{position:fixed;z-index:900;width:250px;max-height:380px;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--_border);border-radius:12px;background:var(--_popover-bg);color:var(--_text);box-shadow:var(--_elevation);font-size:13px}.ith-table-popover-header{padding:10px 12px 8px;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--_muted)}.ith-table-popover-list{padding:0 6px 6px;overflow-y:auto;max-height:280px}.ith-table-popover-footer{display:flex;gap:6px;padding:6px;border-top:1px solid var(--_border);background:color-mix(in srgb,var(--_brand) 2%,var(--_bg))}.ith-table-popover-action{flex:1 1 auto;padding:7px 8px;border:0;border-radius:8px;background:transparent;color:var(--_accent);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer}.ith-table-popover-action:hover{background:var(--_accent-soft)}.ith-table-popover-empty{margin:0;padding:10px 12px;color:var(--_muted);font-size:12.5px}.ith-table-columns-item{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:8px;font-size:13px;cursor:pointer;transition:background-color .12s ease}.ith-table-columns-item:hover{background:var(--_hover)}.ith-table-columns-item input:disabled{opacity:.4;cursor:not-allowed}.ith-table-pin-tag{margin-left:auto;padding:1px 7px;border-radius:999px;background:var(--_accent-soft);color:var(--_accent);font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.ith-table-view-item{display:flex;align-items:center;gap:4px;padding-right:4px;border-radius:8px}.ith-table-view-item:hover{background:var(--_hover)}.ith-table-view-item.is-active .ith-table-view-apply{color:var(--_accent);font-weight:650}.ith-table-view-apply{flex:1 1 auto;padding:7px 8px;border:0;background:transparent;color:var(--_text);font:inherit;font-size:13px;text-align:left;cursor:pointer}.ith-table-view-delete{display:grid;place-items:center;width:24px;height:24px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--_muted);cursor:pointer}.ith-table-view-delete svg{width:11px;height:11px}.ith-table-view-delete:hover{background:var(--_accent-soft);color:var(--_accent)}.ith-table-view-save{align-items:center}.ith-table-view-input{flex:1 1 auto;min-width:0;height:30px;padding:0 9px;border:1px solid var(--_input-border);border-radius:8px;background:var(--_input-bg);color:var(--_text);font:inherit;font-size:12.5px}.ith-table-view-input:focus{outline:none;border-color:var(--_accent);box-shadow:0 0 0 3px var(--_focus)}.ith-table-column-menu{width:220px;padding:6px}.ith-table-menu-item{display:block;width:100%;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:var(--_text);font:inherit;font-size:13px;text-align:left;cursor:pointer}.ith-table-menu-item:hover{background:var(--_accent-soft);color:var(--_accent)}.ith-table-menu-divider{height:1px;margin:5px 6px;background:var(--_border)}.ith-table.ith-table-compact{--ith-table-cell-padding: 7px 12px;--_cell-padding: var(--ith-table-compact-padding, 7px 12px);--_font-size: var(--ith-table-compact-font-size, 13px);--_header-font-size: 12.5px;--_row-height: 39px;--_head-height: 39px}.ith-table.ith-table-compact .ith-table-head-row th{padding:10px 12px}.ith-table.ith-table-compact .ith-table-filter-row th{padding:6px 10px}.ith-table-sticky-start,.ith-table-sticky-end{position:sticky;z-index:3;background:var(--_bg)}.ith-table-sticky-start{box-shadow:inset -1px 0 0 var(--_border)}.ith-table-sticky-end{box-shadow:inset 1px 0 0 var(--_border)}.ith-table-striped .ith-table-row:nth-child(2n) .ith-table-sticky-start,.ith-table-striped .ith-table-row:nth-child(2n) .ith-table-sticky-end{background:var(--_striped-bg)}.ith-table-row-selected .ith-table-sticky-start,.ith-table-row-selected .ith-table-sticky-end{background:var(--_selected-bg)}.ith-table-row:hover .ith-table-sticky-start,.ith-table-row:hover .ith-table-sticky-end{background:var(--_hover)}thead .ith-table-sticky-start,thead .ith-table-sticky-end{z-index:7;background:var(--_header-bg)}.ith-table-filter-row .ith-table-sticky-start,.ith-table-filter-row .ith-table-sticky-end{z-index:6;background:var(--_filter-bg)}.ith-table-td:not(.ith-table-sticky-start):not(.ith-table-sticky-end){position:relative}.ith-table-td.ith-table-copyable{padding-inline-end:36px}.ith-table-copy{position:absolute;inset-inline-end:8px;top:50%;display:grid;place-items:center;width:24px;height:24px;padding:0;transform:translateY(-50%);border:1px solid transparent;border-radius:7px;background:var(--_bg);color:var(--_muted);cursor:pointer;opacity:0;pointer-events:none;transition:opacity .12s ease,color .12s ease,border-color .12s ease}.ith-table-copy svg{width:14px;height:14px}.ith-table-td:hover .ith-table-copy,.ith-table-td:focus-within .ith-table-copy,.ith-table-copy.is-copied{opacity:1;pointer-events:auto}.ith-table-copy:hover{border-color:var(--_accent);color:var(--_accent)}.ith-table-copy.is-copied{color:var(--_accent)}.ith-table-td:focus-visible{outline:2px solid var(--_accent);outline-offset:-2px}.ith-table-skeleton{display:block;width:72%;height:12px;border-radius:6px;background:linear-gradient(90deg,var(--_border) 25%,var(--_hover) 37%,var(--_border) 63%);background-size:400% 100%;animation:ith-table-shimmer 1.4s ease infinite}.ith-table-skeleton.is-check{width:16px;height:16px;border-radius:4px;margin:0 auto}@keyframes ith-table-shimmer{0%{background-position:100% 50%}to{background-position:0 50%}}.ith-table-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.ith-table-menu{position:fixed;z-index:1000;min-width:180px;max-width:280px;padding:6px;border:1px solid var(--_border);border-radius:10px;background:var(--_popover-bg);color:var(--_text);box-shadow:var(--_elevation);font-size:13px}@media(prefers-reduced-motion:reduce){.ith-table-skeleton{animation:none}.ith-table-copy,.ith-table-tool-btn{transition:none}}.ith-table-th-inner{display:flex;align-items:center;gap:6px;min-width:0}.ith-table-th-inner>*:first-child{min-width:0}.ith-table-th:not(.ith-table-sticky-start):not(.ith-table-sticky-end){position:relative}.ith-table-th-menu{display:grid;place-items:center;flex:0 0 auto;width:20px;height:20px;padding:0;border:0;border-radius:6px;background:transparent;color:inherit;cursor:pointer;opacity:0;transition:opacity .12s ease,background-color .12s ease}.ith-table-th-menu svg{width:13px;height:13px}.ith-table-th:hover .ith-table-th-menu,.ith-table-th-menu[aria-expanded=true],.ith-table-th-menu:focus-visible{opacity:.85}.ith-table-th-menu:hover{background:color-mix(in srgb,currentColor 20%,transparent);opacity:1}.ith-table-th-menu:focus-visible{outline:2px solid currentColor;outline-offset:1px}.ith-table-resizer{position:absolute;top:0;inset-inline-end:-4px;bottom:0;width:9px;z-index:4;cursor:col-resize;touch-action:none}.ith-table-resizer:after{content:\"\";position:absolute;top:22%;bottom:22%;inset-inline-start:4px;width:2px;border-radius:2px;background:transparent;transition:background-color .12s ease}.ith-table-th:hover .ith-table-resizer:after{background:color-mix(in srgb,currentColor 40%,transparent)}.ith-table-th-dragging{opacity:.5}.ith-table-drop-target{box-shadow:inset 3px 0 0 var(--_accent)}.ith-table-pin-dot{flex:0 0 auto;width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.55}.ith-table-sticky .ith-table-scroll.is-scrolled .ith-table-head-row th{box-shadow:0 1px 0 var(--_border),0 10px 16px -14px #0c0a1e8c}.ith-table-chips{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:10px}.ith-table-chip{display:inline-flex;align-items:center;gap:6px;max-width:260px;padding:3px 4px 3px 9px;border:1px solid color-mix(in srgb,var(--_accent) 24%,transparent);border-radius:999px;background:var(--_accent-soft);color:var(--_accent);font-size:11.5px;font-weight:600}.ith-table-chip-label{font-size:10px;letter-spacing:.04em;text-transform:uppercase;opacity:.7}.ith-table-chip-value{max-width:150px;overflow:hidden;font-weight:500;text-overflow:ellipsis;white-space:nowrap}.ith-table-chip-remove{display:grid;place-items:center;width:18px;height:18px;padding:0;border:0;border-radius:50%;background:color-mix(in srgb,var(--_accent) 16%,transparent);color:inherit;cursor:pointer}.ith-table-chip-remove svg{width:9px;height:9px}.ith-table-chip-remove:hover{background:var(--_accent);color:var(--_on-accent)}.ith-table-chips-clear{padding:3px 8px;border:0;border-radius:999px;background:transparent;color:var(--_muted);font:inherit;font-size:11.5px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.ith-table-chips-clear:hover{color:var(--_accent)}.ith-table-selection-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 16px;border-bottom:1px solid color-mix(in srgb,var(--_accent) 28%,var(--_border));background:var(--_accent-soft);color:var(--_accent);font-size:12.5px}.ith-table-selection-count strong{font-weight:700}.ith-table-selection-spacer{flex:1 1 auto}.ith-table-selection-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.ith-table-selection-btn{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border:1px solid color-mix(in srgb,var(--_accent) 35%,transparent);border-radius:8px;background:var(--_bg);color:var(--_accent);font:inherit;font-size:12px;font-weight:600;cursor:pointer;transition:background-color .12s ease,color .12s ease}.ith-table-selection-btn:hover{background:var(--_accent);color:var(--_on-accent)}.ith-table-selection-btn.is-danger{border-color:color-mix(in srgb,var(--_danger) 40%,transparent);color:var(--_danger)}.ith-table-selection-btn.is-danger:hover{background:var(--_danger);color:#fff}.ith-table-selection-clear{border:0;background:transparent;color:var(--_muted);font:inherit;font-size:12px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.ith-table-selection-clear:hover{color:var(--_accent)}.ith-table-expander-cell{width:38px;padding:0 0 0 10px;text-align:center}th.ith-table-expander-cell{background:var(--_header-bg)}.ith-table-expander{display:grid;place-items:center;width:22px;height:22px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--_muted);cursor:pointer;transition:transform .15s ease,color .12s ease,background-color .12s ease}.ith-table-expander svg{width:13px;height:13px}.ith-table-expander:hover{background:var(--_accent-soft);color:var(--_accent)}.ith-table-expander.is-open{transform:rotate(90deg);color:var(--_accent)}.ith-table-detail-row>td{padding:14px 16px;border-bottom:1px solid var(--_border);background:var(--_striped-bg);white-space:normal}.ith-table-total-cell{padding:var(--_cell-padding);border-top:1px solid var(--_border);background:var(--_filter-bg);font-size:12px;white-space:nowrap}.ith-table-total-row .ith-table-select-cell,.ith-table-total-row .ith-table-expander-cell{border-top:1px solid var(--_border);background:var(--_filter-bg)}.ith-table-total-label{margin-inline-end:6px;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--_muted)}.ith-table-total-value{font-weight:650;color:var(--_text)}@media(prefers-reduced-motion:reduce){.ith-table-expander,.ith-table-th-menu,.ith-table-selection-btn{transition:none}}.ith-table-export-menu{width:236px;padding:6px}.ith-table-export-name{display:block;font-weight:650}.ith-table-export-hint{display:block;margin-top:2px;font-size:11px;font-weight:500;color:var(--_muted)}.ith-table-menu-item:hover .ith-table-export-hint{color:inherit;opacity:.75}:host-context([data-theme=\"dark\"]) .ith-table,:host-context(.dark) .ith-table{box-shadow:var(--_shadow),inset 0 0 0 1px color-mix(in srgb,#ffffff 6%,transparent)}@media(prefers-color-scheme:dark){:host-context([data-theme=\"auto\"]) .ith-table{box-shadow:var(--_shadow),inset 0 0 0 1px color-mix(in srgb,#ffffff 6%,transparent)}}:host-context([data-theme=\"dark\"]) .ith-table-td,:host-context(.dark) .ith-table-td,:host-context([data-theme=\"dark\"]) .ith-table-actions-cell,:host-context(.dark) .ith-table-actions-cell{border-color:color-mix(in srgb,var(--_border) 78%,#ffffff)}:host-context([data-theme=\"dark\"]) .ith-table-row.ith-table-row-selected td:first-child,:host-context(.dark) .ith-table-row.ith-table-row-selected td:first-child{box-shadow:inset 3px 0 0 var(--_accent)}:host-context([data-theme=\"dark\"]) .ith-table-sort-icons,:host-context(.dark) .ith-table-sort-icons{opacity:.65}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
991
1955
  }
992
1956
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.34", ngImport: i0, type: TableComponent, decorators: [{
993
1957
  type: Component,
994
- args: [{ selector: 'ith-table', imports: [NgClass, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"ith-table\"\n [class.ith-table-bordered]=\"bordered()\"\n [class.ith-table-dense]=\"dense()\"\n [class.ith-table-striped]=\"striped()\"\n [class.ith-table-hoverable]=\"hoverable()\"\n [class.ith-table-sticky]=\"stickyHeader()\"\n [class.ith-table-compact]=\"compact()\">\n <!-- Toolbar -->\n @if (showToolbar()) {\n <div class=\"ith-table-toolbar\">\n <div class=\"ith-table-toolbar-inner\">\n <div class=\"ith-table-toolbar-main\">\n @if (title()) {\n <h3 class=\"ith-table-title\">{{ title() }}</h3>\n }\n <span class=\"ith-table-badge\">{{ totalRows() }} {{ countSuffix() }}</span>\n @if (selected().length > 0) {\n <span class=\"ith-table-badge ith-table-badge-accent\">{{ selected().length }} selected</span>\n }\n @if (toolbarTemplate(); as toolbarTpl) {\n <ng-container\n [ngTemplateOutlet]=\"toolbarTpl\"\n [ngTemplateOutletContext]=\"toolbarContext()\" />\n }\n </div>\n\n <div class=\"ith-table-toolbar-spacer\"></div>\n\n <div class=\"ith-table-toolbar-actions\">\n @if (showColumnPicker()) {\n <div class=\"ith-table-columns\" (click)=\"$event.stopPropagation()\">\n <button\n type=\"button\"\n class=\"ith-table-tool-btn\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"columnPickerOpen()\"\n (click)=\"toggleColumnPicker()\">\n <svg class=\"ith-table-tool-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <rect x=\"3\" y=\"4\" width=\"7\" height=\"16\" rx=\"1.5\" />\n <rect x=\"14\" y=\"4\" width=\"7\" height=\"16\" rx=\"1.5\" />\n </svg>\n <span>Columns</span>\n </button>\n @if (columnPickerOpen()) {\n <div class=\"ith-table-columns-popover\" role=\"dialog\" aria-label=\"Visible columns\">\n <div class=\"ith-table-columns-header\">Show columns</div>\n <div class=\"ith-table-columns-list\">\n @for (column of columns(); track column.key) {\n <label class=\"ith-table-columns-item\">\n <input\n type=\"checkbox\"\n class=\"ith-table-checkbox\"\n [checked]=\"isColumnVisible(column)\"\n [disabled]=\"column.hidden\"\n (change)=\"setColumnVisible(column.key, $any($event.target).checked)\" />\n <span>{{ column.header ?? column.key }}</span>\n </label>\n }\n </div>\n <div class=\"ith-table-columns-footer\">\n <button type=\"button\" class=\"ith-table-columns-reset\" (click)=\"resetColumns()\">\n Reset columns\n </button>\n </div>\n </div>\n }\n </div>\n }\n\n @if (showDensityToggle()) {\n <button\n type=\"button\"\n class=\"ith-table-tool-btn\"\n [attr.aria-pressed]=\"compact()\"\n (click)=\"toggleDensity()\">\n @if (compact()) {\n <svg class=\"ith-table-tool-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M4 7h16M4 12h16M4 17h16\" />\n </svg>\n <span>Comfortable</span>\n } @else {\n <svg class=\"ith-table-tool-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M4 6h16M4 10h16M4 14h16M4 18h16\" />\n </svg>\n <span>Compact</span>\n }\n </button>\n }\n\n @if (searchable()) {\n <div class=\"ith-table-search\">\n <svg class=\"ith-table-search-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.6-3.6\" />\n </svg>\n <input\n type=\"search\"\n class=\"ith-table-search-input\"\n [value]=\"search()\"\n [attr.placeholder]=\"searchPlaceholder()\"\n [attr.aria-label]=\"searchPlaceholder()\"\n (input)=\"onSearchInput($any($event.target).value)\" />\n @if (search()) {\n <button type=\"button\" class=\"ith-table-search-clear\" (click)=\"clearSearch()\" aria-label=\"Clear search\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M6 6l12 12M18 6 6 18\" />\n </svg>\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n\n <!-- Table -->\n <div class=\"ith-table-scroll\" [style.maxHeight]=\"maxHeight() || null\">\n <table class=\"ith-table-grid\" [attr.aria-label]=\"ariaLabel()\" [attr.aria-busy]=\"loading()\">\n <thead>\n <tr class=\"ith-table-head-row\">\n @if (selectable()) {\n <th\n scope=\"col\"\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\">\n @if (selectionMode() === 'multi') {\n <input\n type=\"checkbox\"\n class=\"ith-table-checkbox\"\n [checked]=\"allPageSelected()\"\n [indeterminate]=\"somePageSelected()\"\n [attr.aria-label]=\"'Select all rows'\"\n (change)=\"onSelectAllChange($event)\" />\n }\n </th>\n }\n\n @for (column of visibleColumns(); track column.key) {\n <th\n scope=\"col\"\n class=\"ith-table-th\"\n [ngClass]=\"headerClasses(column)\"\n [style]=\"columnStyle(column)\"\n [attr.aria-sort]=\"isSortable(column) ? ariaSort(column) : null\">\n @if (headerTemplate(column); as headerTpl) {\n <ng-container\n [ngTemplateOutlet]=\"headerTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column: column }\" />\n } @else if (isSortable(column)) {\n <button\n type=\"button\"\n class=\"ith-table-sort\"\n [class.is-sorted]=\"!!sortDirection(column)\"\n (click)=\"toggleSort(column)\"\n [attr.aria-label]=\"'Sort by ' + (column.header ?? column.key)\">\n <span class=\"ith-table-th-label\">{{ column.header ?? column.key }}</span>\n <span class=\"ith-table-sort-icons\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 10 6\" class=\"ith-table-sort-up\" [class.is-active]=\"sortDirection(column) === 'asc'\"><path d=\"M5 0l5 6H0z\" /></svg>\n <svg viewBox=\"0 0 10 6\" class=\"ith-table-sort-down\" [class.is-active]=\"sortDirection(column) === 'desc'\"><path d=\"M5 6L0 0h10z\" /></svg>\n </span>\n </button>\n } @else {\n <span class=\"ith-table-th-label\">{{ column.header ?? column.key }}</span>\n }\n </th>\n }\n\n @if (hasActionsColumn()) {\n <th\n scope=\"col\"\n class=\"ith-table-th ith-table-actions-head\"\n [class.ith-table-sticky-end]=\"stickyActions()\"\n [style.width]=\"actionsWidth()\"\n [style.right]=\"stickyActions() ? '0px' : null\">\n {{ actionsHeader() }}\n </th>\n }\n </tr>\n\n @if (showFilters()) {\n <tr class=\"ith-table-filter-row\">\n @if (selectable()) {\n <th\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\"></th>\n }\n @for (column of visibleColumns(); track column.key) {\n <th\n class=\"ith-table-filter-cell\"\n [ngClass]=\"filterClasses(column)\"\n [style]=\"columnStyle(column)\">\n @if (filterTemplate(column); as filterTpl) {\n <ng-container\n [ngTemplateOutlet]=\"filterTpl\"\n [ngTemplateOutletContext]=\"filterContext(column)\" />\n } @else if (column.filterable !== false) {\n @switch (filterTypeFor(column)) {\n @case ('select') {\n <select\n class=\"ith-table-filter-input ith-table-filter-select\"\n [value]=\"filterValue(column.key)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (change)=\"onFilterInput(column.key, $any($event.target).value)\">\n <option value=\"\">{{ filterAllLabel() }}</option>\n @for (option of filterOptionsFor(column); track option.value) {\n <option [value]=\"option.value\">{{ option.label }}</option>\n }\n </select>\n }\n @case ('number') {\n <input\n type=\"number\"\n class=\"ith-table-filter-input\"\n [value]=\"filterValue(column.key)\"\n [attr.placeholder]=\"filterPlaceholderFor(column)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (input)=\"onFilterInput(column.key, $any($event.target).value)\" />\n }\n @case ('date') {\n <input\n type=\"date\"\n class=\"ith-table-filter-input\"\n [value]=\"filterValue(column.key)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (input)=\"onFilterInput(column.key, $any($event.target).value)\" />\n }\n @default {\n <input\n type=\"text\"\n class=\"ith-table-filter-input\"\n [value]=\"filterValue(column.key)\"\n [attr.placeholder]=\"filterPlaceholderFor(column)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (input)=\"onFilterInput(column.key, $any($event.target).value)\" />\n }\n }\n }\n </th>\n }\n @if (hasActionsColumn()) {\n <th\n class=\"ith-table-filter-cell\"\n [class.ith-table-sticky-end]=\"stickyActions()\"\n [style.right]=\"stickyActions() ? '0px' : null\"></th>\n }\n </tr>\n }\n </thead>\n\n <tbody>\n @if (loading() && pagedRows().length === 0) {\n @for (skeleton of skeletonIndexes(); track skeleton) {\n <tr class=\"ith-table-skeleton-row\" aria-hidden=\"true\">\n @if (selectable()) {\n <td\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\">\n <span class=\"ith-table-skeleton is-check\"></span>\n </td>\n }\n @for (column of visibleColumns(); track column.key) {\n <td class=\"ith-table-td\">\n <span class=\"ith-table-skeleton\"></span>\n </td>\n }\n @if (hasActionsColumn()) {\n <td class=\"ith-table-actions-cell\"><span class=\"ith-table-skeleton\"></span></td>\n }\n </tr>\n }\n <tr>\n <td class=\"ith-table-visually-hidden\" [attr.colspan]=\"emptyColspan()\" aria-live=\"polite\">\n {{ loadingText() }}\n </td>\n </tr>\n } @else if (pagedRows().length === 0) {\n <tr>\n <td class=\"ith-table-status\" [attr.colspan]=\"emptyColspan()\">\n @if (emptyTemplate(); as emptyTpl) {\n <ng-container\n [ngTemplateOutlet]=\"emptyTpl\"\n [ngTemplateOutletContext]=\"emptyContext()\" />\n } @else {\n <div class=\"ith-table-empty\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M3 10h18M9 10v9\" />\n </svg>\n <span>{{ hasQuery() ? 'No records match your search.' : emptyText() }}</span>\n @if (hasQuery()) {\n <button type=\"button\" class=\"ith-table-link\" (click)=\"clearQuery()\">Clear search &amp; filters</button>\n }\n </div>\n }\n </td>\n </tr>\n } @else {\n @for (row of pagedRows(); track trackRow($index, row); let rowIndex = $index) {\n <tr\n class=\"ith-table-row\"\n [ngClass]=\"rowClassFor(row, $index)\"\n [class.ith-table-row-clickable]=\"rowClickable() || selectOnRowClick()\"\n [attr.tabindex]=\"rowClickable() || selectOnRowClick() ? 0 : null\"\n [attr.aria-selected]=\"selectable() ? isSelected(row) : null\"\n (click)=\"onRowClick(row, $index, $event)\"\n (keydown)=\"onRowKeydown(row, $index, $event)\"\n (contextmenu)=\"onRowContextMenu(row, $index, $event)\">\n @if (selectable()) {\n <td\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\">\n <input\n type=\"checkbox\"\n class=\"ith-table-checkbox\"\n [checked]=\"isSelected(row)\"\n [attr.aria-label]=\"'Select row ' + ($index + 1)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"onRowCheckboxChange(row, $event)\" />\n </td>\n }\n\n @for (column of visibleColumns(); track column.key) {\n <td\n class=\"ith-table-td\"\n [class.ith-table-copyable]=\"copyable()\"\n [ngClass]=\"cellClasses(row, column, rowIndex)\"\n [style]=\"columnStyle(column)\"\n [attr.title]=\"tooltipText(row, column, rowIndex)\"\n [attr.tabindex]=\"copyable() ? 0 : null\"\n (keydown)=\"onCellKeydown(row, column, rowIndex, $event)\">\n @if (cellTemplate(column); as cellTpl) {\n <ng-container\n [ngTemplateOutlet]=\"cellTpl\"\n [ngTemplateOutletContext]=\"cellContext(row, column, rowIndex)\" />\n } @else {\n {{ cellText(row, column, rowIndex) }}\n }\n @if (copyable()) {\n <button\n type=\"button\"\n class=\"ith-table-copy\"\n [class.is-copied]=\"isCellCopied(rowIndex, column)\"\n [attr.aria-label]=\"'Copy ' + (column.header ?? column.key)\"\n (click)=\"copyCell(row, column, rowIndex, $event)\">\n @if (isCellCopied(rowIndex, column)) {\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m5 13 4 4L19 7\" /></svg>\n } @else {\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" /><path d=\"M15 5.5A2.5 2.5 0 0 0 12.5 3H6a2 2 0 0 0-2 2v7.5A2.5 2.5 0 0 0 6.5 15\" /></svg>\n }\n </button>\n }\n </td>\n }\n\n @if (hasActionsColumn()) {\n <td\n class=\"ith-table-actions-cell\"\n [class.ith-table-sticky-end]=\"stickyActions()\"\n [style.right]=\"stickyActions() ? '0px' : null\">\n @if (rowActionsTemplate(); as actionsTpl) {\n <ng-container\n [ngTemplateOutlet]=\"actionsTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row, index: $index }\" />\n } @else {\n @for (action of rowActions(); track action.id) {\n @if (isActionVisible(action, row, $index)) {\n <button\n type=\"button\"\n class=\"ith-table-action\"\n [ngClass]=\"action.class ?? ''\"\n [attr.title]=\"action.title ?? action.label\"\n [disabled]=\"isActionDisabled(action, row, $index)\"\n (click)=\"onActionClick(action, row, $index, $event)\">\n @if (action.icon) {\n <span class=\"ith-table-action-icon\" aria-hidden=\"true\">{{ action.icon }}</span>\n }\n <span>{{ action.label }}</span>\n </button>\n }\n }\n }\n </td>\n }\n </tr>\n }\n }\n </tbody>\n </table>\n\n @if (loading() && pagedRows().length > 0) {\n <div class=\"ith-table-loading-overlay\">\n <span class=\"ith-table-spinner\" aria-hidden=\"true\"></span>\n <span>{{ loadingText() }}</span>\n </div>\n }\n </div>\n\n <!-- Right-click menu (projected template, positioned at the pointer) -->\n @if (menuState(); as menu) {\n <div\n class=\"ith-table-menu\"\n role=\"menu\"\n [style.left.px]=\"menu.x\"\n [style.top.px]=\"menu.y\"\n (click)=\"closeRowMenu(); $event.stopPropagation()\">\n @if (rowMenuTemplate(); as menuTpl) {\n <ng-container\n [ngTemplateOutlet]=\"menuTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: menu.row, row: menu.row, index: menu.index }\" />\n }\n </div>\n }\n\n <!-- Footer -->\n @if (showFooter()) {\n <div class=\"ith-table-footer\">\n <div class=\"ith-table-footer-info\">\n @if (footerTemplate(); as footerTpl) {\n <ng-container\n [ngTemplateOutlet]=\"footerTpl\"\n [ngTemplateOutletContext]=\"footerContext()\" />\n } @else {\n <span>\n Showing <strong>{{ rangeStart() }}</strong>\u2013<strong>{{ rangeEnd() }}</strong>\n of <strong>{{ totalRows() }}</strong>\n </span>\n <span class=\"ith-table-total\">{{ totalLabel() }}: <strong>{{ totalRows() }}</strong></span>\n }\n </div>\n\n <div class=\"ith-table-footer-controls\">\n @if (showPagination()) {\n <nav class=\"ith-table-pagination\" aria-label=\"Pagination\">\n @if (showFirstLast()) {\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"firstPage()\" [disabled]=\"page() === 1\" aria-label=\"First page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m11 17-5-5 5-5M18 17l-5-5 5-5\" /></svg>\n </button>\n }\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"previousPage()\" [disabled]=\"page() === 1\" aria-label=\"Previous page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m15 18-6-6 6-6\" /></svg>\n </button>\n\n @for (item of pageItems(); track item) {\n <button\n type=\"button\"\n class=\"ith-table-page-btn ith-table-page-number\"\n [class.is-active]=\"item === page()\"\n [attr.aria-current]=\"item === page() ? 'page' : null\"\n (click)=\"goToPage(item)\">\n {{ item }}\n </button>\n }\n\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"nextPage()\" [disabled]=\"page() === pageCount()\" aria-label=\"Next page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m9 18 6-6-6-6\" /></svg>\n </button>\n @if (showFirstLast()) {\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"lastPage()\" [disabled]=\"page() === pageCount()\" aria-label=\"Last page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m13 17 5-5-5-5M6 17l5-5-5-5\" /></svg>\n </button>\n }\n <span class=\"ith-table-page-state\">Page {{ page() }} / {{ pageCount() }}</span>\n </nav>\n }\n\n @if (showPageSize()) {\n <label class=\"ith-table-page-size\">\n <span>Rows:</span>\n <select class=\"ith-table-select\" [value]=\"pageSize()\" (change)=\"onPageSizeChange($any($event.target).value)\">\n @for (size of pageSizeChoices(); track size) {\n <option [value]=\"size\">{{ size }}</option>\n }\n </select>\n </label>\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:block;--_brand: var(--ith-table-brand, #5b21b6);--_bg: var(--ith-table-bg, #ffffff);--_text: var(--ith-table-text, #1f2937);--_muted: var(--ith-table-muted, #6b7280);--_border: var(--ith-table-border, #e8eaf0);--_header-bg: var(--ith-table-header-bg, var(--_brand));--_header-text: var(--ith-table-header-text, #ffffff);--_hover: var(--ith-table-hover, color-mix(in srgb, var(--_brand) 6%, #ffffff));--_selected-bg: var(--ith-table-selected-bg, color-mix(in srgb, var(--_brand) 10%, #ffffff));--_striped-bg: var(--ith-table-striped-bg, color-mix(in srgb, var(--_brand) 2%, #ffffff));--_accent: var(--ith-table-accent, var(--_brand));--_accent-soft: var(--ith-table-accent-soft, color-mix(in srgb, var(--_brand) 12%, #ffffff));--_input-bg: var(--ith-table-input-bg, #ffffff);--_input-border: var(--ith-table-input-border, #dfe3ec);--_footer-bg: var(--ith-table-footer-bg, color-mix(in srgb, var(--_brand) 2%, #ffffff));--_filter-bg: var(--ith-table-filter-bg, color-mix(in srgb, var(--_brand) 3%, #ffffff));--_overlay: var(--ith-table-overlay, rgba(255, 255, 255, .72));--_radius: var(--ith-table-radius, 14px);--_shadow: var(--ith-table-shadow, 0 18px 40px -28px rgba(24, 20, 60, .55));--_focus: var(--ith-table-focus, color-mix(in srgb, var(--_brand) 25%, transparent));--_cell-padding: var(--ith-table-cell-padding, 12px 16px);--_font-size: var(--ith-table-font-size, 14px);--_header-font-size: var(--ith-table-header-font-size, 13px)}:host-context([data-theme=\"dark\"]),:host-context(.dark){--_brand: var(--ith-table-brand, #7c3aed);--_bg: var(--ith-table-bg, #161826);--_text: var(--ith-table-text, #e7e9f3);--_muted: var(--ith-table-muted, #9aa0b5);--_border: var(--ith-table-border, #2a2e42);--_header-bg: var(--ith-table-header-bg, color-mix(in srgb, var(--_brand) 42%, #0b0d16));--_header-text: var(--ith-table-header-text, #f3eeff);--_hover: var(--ith-table-hover, color-mix(in srgb, var(--_brand) 10%, #161826));--_selected-bg: var(--ith-table-selected-bg, color-mix(in srgb, var(--_brand) 20%, #161826));--_striped-bg: var(--ith-table-striped-bg, color-mix(in srgb, var(--_brand) 4%, #161826));--_accent: var(--ith-table-accent, color-mix(in srgb, var(--_brand) 55%, #ffffff));--_accent-soft: var(--ith-table-accent-soft, color-mix(in srgb, var(--_brand) 26%, #161826));--_input-bg: var(--ith-table-input-bg, #1b1e30);--_input-border: var(--ith-table-input-border, #343a52);--_footer-bg: var(--ith-table-footer-bg, color-mix(in srgb, var(--_brand) 4%, #12141f));--_filter-bg: var(--ith-table-filter-bg, color-mix(in srgb, var(--_brand) 6%, #161826));--_overlay: var(--ith-table-overlay, rgba(17, 19, 30, .72));--_shadow: var(--ith-table-shadow, 0 18px 40px -28px rgba(0, 0, 0, .85));--_focus: var(--ith-table-focus, color-mix(in srgb, var(--_brand) 38%, transparent))}@media(prefers-color-scheme:dark){:host-context([data-theme=\"auto\"]){--_brand: var(--ith-table-brand, #7c3aed);--_bg: var(--ith-table-bg, #161826);--_text: var(--ith-table-text, #e7e9f3);--_muted: var(--ith-table-muted, #9aa0b5);--_border: var(--ith-table-border, #2a2e42);--_header-bg: var(--ith-table-header-bg, color-mix(in srgb, var(--_brand) 42%, #0b0d16));--_header-text: var(--ith-table-header-text, #f3eeff);--_hover: var(--ith-table-hover, color-mix(in srgb, var(--_brand) 10%, #161826));--_selected-bg: var(--ith-table-selected-bg, color-mix(in srgb, var(--_brand) 20%, #161826));--_striped-bg: var(--ith-table-striped-bg, color-mix(in srgb, var(--_brand) 4%, #161826));--_accent: var(--ith-table-accent, color-mix(in srgb, var(--_brand) 55%, #ffffff));--_accent-soft: var(--ith-table-accent-soft, color-mix(in srgb, var(--_brand) 26%, #161826));--_input-bg: var(--ith-table-input-bg, #1b1e30);--_input-border: var(--ith-table-input-border, #343a52);--_footer-bg: var(--ith-table-footer-bg, color-mix(in srgb, var(--_brand) 4%, #12141f));--_filter-bg: var(--ith-table-filter-bg, color-mix(in srgb, var(--_brand) 6%, #161826));--_overlay: var(--ith-table-overlay, rgba(17, 19, 30, .72));--_shadow: var(--ith-table-shadow, 0 18px 40px -28px rgba(0, 0, 0, .85));--_focus: var(--ith-table-focus, color-mix(in srgb, var(--_brand) 38%, transparent))}}.ith-table{display:block;position:relative;background:var(--_bg);color:var(--_text);border:1px solid var(--_border);border-radius:var(--_radius);box-shadow:var(--_shadow);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:var(--_font-size);overflow:hidden}.ith-table-toolbar{padding:14px 16px;border-bottom:1px solid var(--_border);background:color-mix(in srgb,var(--_brand) 3%,var(--_bg))}.ith-table-toolbar-inner{display:flex;align-items:center;gap:12px;flex-wrap:nowrap;min-width:0;overflow-x:auto;scrollbar-width:none}.ith-table-toolbar-inner::-webkit-scrollbar{display:none}.ith-table-toolbar-main{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;min-width:0;flex:0 0 auto}.ith-table-toolbar-spacer{flex:1 1 auto;min-width:8px}.ith-table-title{margin:0;font-size:15.5px;font-weight:650;letter-spacing:-.015em;color:var(--_text);white-space:nowrap}.ith-table-badge{display:inline-flex;align-items:center;padding:3px 10px;border-radius:999px;background:var(--_accent-soft);color:var(--_accent);font-size:11.5px;font-weight:600;line-height:1.4;white-space:nowrap}.ith-table-badge-accent{background:var(--_accent);color:#fff;box-shadow:0 0 0 1px color-mix(in srgb,var(--_accent) 30%,transparent)}.ith-table-search{position:relative;flex:0 1 260px;min-width:180px}.ith-table-search-icon{position:absolute;left:12px;top:50%;width:15px;height:15px;transform:translateY(-50%);color:var(--_muted);pointer-events:none}.ith-table-search-input{width:100%;box-sizing:border-box;height:36px;padding:0 34px 0 36px;border:1px solid var(--_input-border);border-radius:10px;background:var(--_input-bg);color:var(--_text);font-size:13px;font-family:inherit;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ith-table-search-input:hover{border-color:color-mix(in srgb,var(--_accent) 35%,var(--_input-border))}.ith-table-search-input::placeholder{color:var(--_muted)}.ith-table-search-input::-webkit-search-cancel-button,.ith-table-search-input::-webkit-search-decoration,.ith-table-search-input::-webkit-search-results-button,.ith-table-search-input::-webkit-search-results-decoration{-webkit-appearance:none;appearance:none;display:none}.ith-table-search-input:focus{outline:none;border-color:var(--_accent);box-shadow:0 0 0 3px var(--_focus);background:var(--_bg)}.ith-table-search-clear{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:24px;height:24px;display:grid;place-items:center;border:0;border-radius:7px;background:transparent;color:var(--_muted);cursor:pointer;transition:background-color .12s ease,color .12s ease}.ith-table-search-clear svg{width:14px;height:14px}.ith-table-search-clear:hover{background:var(--_accent-soft);color:var(--_accent)}.ith-table-scroll{position:relative;overflow:auto}.ith-table-grid{width:100%;border-collapse:separate;border-spacing:0;table-layout:auto}.ith-table-head-row th{background:var(--_header-bg);color:var(--_header-text);font-size:var(--_header-font-size);font-weight:600;letter-spacing:.01em;text-align:left;padding:13px 16px;white-space:nowrap;border:0}.ith-table-sticky .ith-table-head-row th{position:sticky;top:0;z-index:2}.ith-table-th-label{display:inline-block}.ith-table-sort{display:inline-flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;letter-spacing:inherit;cursor:pointer;text-align:inherit}.ith-table-sort-icons{display:inline-flex;flex-direction:column;gap:2px;opacity:.5}.ith-table-sort-icons svg{width:8px;height:5px;fill:currentColor;opacity:.5;transition:opacity .15s ease}.ith-table-sort-icons svg.is-active{opacity:1}.ith-table-sort.is-sorted .ith-table-sort-icons{opacity:1}.ith-table-select-cell{width:46px;text-align:center;padding-left:14px;padding-right:10px}.ith-table-checkbox{width:16px;height:16px;margin:0;cursor:pointer;accent-color:var(--_accent);vertical-align:middle}.ith-table-checkbox:focus-visible{outline:2px solid var(--_accent);outline-offset:2px}.ith-table-row{background:var(--_bg);transition:background-color .15s ease}.ith-table-hoverable .ith-table-row:hover{background:var(--_hover)}.ith-table-row.ith-table-row-selected{background:var(--_selected-bg)}.ith-table-row.ith-table-row-selected td:first-child{box-shadow:inset 3px 0 0 var(--_accent)}.ith-table-row-clickable{cursor:pointer}.ith-table-td{padding:var(--_cell-padding);border-bottom:1px solid var(--_border);font-size:var(--_font-size);color:var(--_text);vertical-align:middle;white-space:nowrap;background:transparent}.ith-table-row:last-child .ith-table-td{border-bottom:0}.ith-table-align-left{text-align:left}.ith-table-align-center{text-align:center}.ith-table-align-right,.ith-table-actions-head{text-align:right}.ith-table-actions-cell{padding:var(--_cell-padding);border-bottom:1px solid var(--_border);text-align:right;white-space:nowrap}.ith-table-row:last-child .ith-table-actions-cell{border-bottom:0}.ith-table-action{display:inline-flex;align-items:center;gap:4px;padding:5px 9px;margin-left:4px;border:1px solid var(--_border);border-radius:7px;background:transparent;color:var(--_accent);font-family:inherit;font-size:12px;font-weight:500;line-height:1.2;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.ith-table-action:hover:not(:disabled){background:var(--_accent-soft);border-color:var(--_accent)}.ith-table-action:disabled{opacity:.45;cursor:not-allowed}.ith-table-action-icon{font-size:12px;line-height:1}.ith-table-action.is-danger{color:#dc2626;border-color:#fecaca}.ith-table-filter-row th{background:var(--_filter-bg);padding:8px 10px;border-bottom:1px solid var(--_border);border-top:1px solid var(--_border)}.ith-table-filter-input{width:100%;box-sizing:border-box;height:30px;padding:0 9px;border:1px solid var(--_input-border);border-radius:7px;background:var(--_input-bg);color:var(--_text);font-family:inherit;font-size:12px}.ith-table-filter-select{cursor:pointer;padding-right:4px}.ith-table-filter-input:focus{outline:none;border-color:var(--_accent);box-shadow:0 0 0 3px var(--_focus)}.ith-table-filter-input::placeholder{color:var(--_muted)}.ith-table-status{padding:40px 16px;text-align:center;color:var(--_muted);font-size:13px}.ith-table-empty{display:flex;flex-direction:column;align-items:center;gap:8px}.ith-table-empty svg{width:36px;height:36px;opacity:.45}.ith-table-spinner{display:inline-block;width:16px;height:16px;border:2px solid var(--_accent-soft);border-top-color:var(--_accent);border-radius:50%;animation:ith-table-spin .7s linear infinite;vertical-align:middle}@keyframes ith-table-spin{to{transform:rotate(360deg)}}.ith-table-loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--_overlay);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);color:var(--_text);font-size:13px;font-weight:500;z-index:3}.ith-table-link{padding:0;border:0;background:none;color:var(--_accent);font-family:inherit;font-size:12px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.ith-table-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 16px;border-top:1px solid var(--_border);background:var(--_footer-bg);font-size:12px;color:var(--_muted)}.ith-table-footer-info{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.ith-table-footer-info strong{color:var(--_text);font-weight:600}.ith-table-footer-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.ith-table-pagination{display:flex;align-items:center;gap:4px}.ith-table-page-btn{display:inline-grid;place-items:center;min-width:30px;height:30px;padding:0 6px;border:1px solid var(--_border);border-radius:7px;background:var(--_bg);color:var(--_text);font-family:inherit;font-size:12px;font-weight:500;cursor:pointer;transition:background-color .15s ease,border-color .15s ease,color .15s ease}.ith-table-page-btn svg{width:14px;height:14px}.ith-table-page-btn:hover:not(:disabled){border-color:var(--_accent);color:var(--_accent);background:var(--_accent-soft)}.ith-table-page-btn:disabled{opacity:.4;cursor:not-allowed}.ith-table-page-number{min-width:30px}.ith-table-page-number.is-active{background:var(--_accent);border-color:var(--_accent);color:#fff}.ith-table-page-number.is-active:hover{background:var(--_accent);color:#fff}.ith-table-page-state{margin-left:6px;white-space:nowrap}.ith-table-page-size{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.ith-table-select{height:30px;padding:0 6px;border:1px solid var(--_border);border-radius:7px;background:var(--_bg);color:var(--_text);font-family:inherit;font-size:12px;cursor:pointer}.ith-table-select:focus-visible,.ith-table-page-btn:focus-visible,.ith-table-action:focus-visible,.ith-table-link:focus-visible{outline:2px solid var(--_accent);outline-offset:2px}.ith-table-dense{--ith-table-cell-padding: 8px 12px;--ith-table-font-size: 13px;--ith-table-header-font-size: 12px}.ith-table-dense .ith-table-head-row th{padding:10px 12px}.ith-table-striped .ith-table-row:nth-child(2n){background:var(--_striped-bg)}.ith-table-bordered .ith-table-td,.ith-table-bordered .ith-table-actions-cell,.ith-table-bordered .ith-table-head-row th,.ith-table-bordered .ith-table-filter-row th{border-right:1px solid var(--_border)}.ith-table-bordered .ith-table-head-row th:last-child,.ith-table-bordered .ith-table-filter-row th:last-child{border-right:0}.ith-table-bordered .ith-table-td:last-child,.ith-table-bordered .ith-table-actions-cell:last-child{border-right:0}@media(prefers-reduced-motion:reduce){.ith-table-row,.ith-table-action,.ith-table-page-btn,.ith-table-search-input,.ith-table-sort-icons svg{transition:none}.ith-table-spinner{animation-duration:2.4s}}@media(max-width:640px){.ith-table-footer{align-items:stretch;flex-direction:column}.ith-table-toolbar-inner{gap:10px}.ith-table-search{flex:1 1 auto}.ith-table-footer-controls{justify-content:space-between}.ith-table-page-state{display:none}}.ith-table-toolbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;flex:0 0 auto}.ith-table-tool-btn{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 13px;border:1px solid var(--_input-border);border-radius:10px;background:var(--_input-bg);color:var(--_text);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;white-space:nowrap;transition:border-color .14s ease,background-color .14s ease,color .14s ease,box-shadow .14s ease}.ith-table-tool-icon{width:15px;height:15px;flex-shrink:0;opacity:.8}.ith-table-tool-btn:hover .ith-table-tool-icon,.ith-table-tool-btn[aria-expanded=true] .ith-table-tool-icon,.ith-table-tool-btn[aria-pressed=true] .ith-table-tool-icon{opacity:1}.ith-table-tool-btn:hover{border-color:color-mix(in srgb,var(--_accent) 45%,var(--_input-border));background:color-mix(in srgb,var(--_accent) 4%,var(--_input-bg));color:var(--_accent)}.ith-table-tool-btn[aria-expanded=true],.ith-table-tool-btn[aria-pressed=true]{border-color:var(--_accent);background:var(--_accent-soft);color:var(--_accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--_accent) 20%,transparent)}.ith-table-tool-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--_focus)}.ith-table-columns{position:relative}.ith-table-columns-popover{position:absolute;z-index:45;top:calc(100% + 8px);inset-inline-end:0;min-width:220px;max-height:340px;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--_border);border-radius:12px;background:var(--_bg);color:var(--_text);box-shadow:0 18px 40px -18px #110c2e59,0 0 0 1px color-mix(in srgb,var(--_border) 60%,transparent)}.ith-table-columns-header{padding:10px 12px 8px;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--_muted)}.ith-table-columns-list{padding:0 6px 6px;overflow-y:auto;max-height:240px}.ith-table-columns-item{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:8px;font-size:13px;cursor:pointer;transition:background-color .12s ease}.ith-table-columns-item:hover{background:var(--_hover)}.ith-table-columns-footer{border-top:1px solid var(--_border);padding:4px;background:color-mix(in srgb,var(--_brand) 2%,var(--_bg))}.ith-table-columns-reset{width:100%;padding:7px 8px;border:0;border-radius:8px;background:transparent;color:var(--_accent);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;transition:background-color .12s ease}.ith-table-columns-reset:hover{background:var(--_accent-soft)}.ith-table.ith-table-compact{--ith-table-cell-padding: 7px 12px}.ith-table-sticky-start,.ith-table-sticky-end{position:sticky;z-index:3;background:var(--_bg)}.ith-table-sticky-start{box-shadow:inset -1px 0 0 var(--_border)}.ith-table-sticky-end{box-shadow:inset 1px 0 0 var(--_border)}.ith-table-striped .ith-table-row:nth-child(2n) .ith-table-sticky-start,.ith-table-striped .ith-table-row:nth-child(2n) .ith-table-sticky-end{background:var(--_striped-bg)}.ith-table-row-selected .ith-table-sticky-start,.ith-table-row-selected .ith-table-sticky-end{background:var(--_selected-bg)}.ith-table-row:hover .ith-table-sticky-start,.ith-table-row:hover .ith-table-sticky-end{background:var(--_hover)}thead .ith-table-sticky-start,thead .ith-table-sticky-end{z-index:7;background:var(--_header-bg)}.ith-table-filter-row .ith-table-sticky-start,.ith-table-filter-row .ith-table-sticky-end{z-index:6;background:var(--_filter-bg)}.ith-table-td{position:relative}.ith-table-td.ith-table-copyable{padding-inline-end:36px}.ith-table-copy{position:absolute;inset-inline-end:8px;top:50%;display:grid;place-items:center;width:24px;height:24px;padding:0;transform:translateY(-50%);border:1px solid transparent;border-radius:7px;background:var(--_bg);color:var(--_muted);cursor:pointer;opacity:0;pointer-events:none;transition:opacity .12s ease,color .12s ease,border-color .12s ease}.ith-table-copy svg{width:14px;height:14px}.ith-table-td:hover .ith-table-copy,.ith-table-td:focus-within .ith-table-copy,.ith-table-copy.is-copied{opacity:1;pointer-events:auto}.ith-table-copy:hover{border-color:var(--_accent);color:var(--_accent)}.ith-table-copy.is-copied{color:var(--_accent)}.ith-table-td:focus-visible{outline:2px solid var(--_accent);outline-offset:-2px}.ith-table-skeleton{display:block;width:72%;height:12px;border-radius:6px;background:linear-gradient(90deg,var(--_border) 25%,var(--_hover) 37%,var(--_border) 63%);background-size:400% 100%;animation:ith-table-shimmer 1.4s ease infinite}.ith-table-skeleton.is-check{width:16px;height:16px;border-radius:4px;margin:0 auto}@keyframes ith-table-shimmer{0%{background-position:100% 50%}to{background-position:0 50%}}.ith-table-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.ith-table-menu{position:fixed;z-index:1000;min-width:180px;max-width:280px;padding:6px;border:1px solid var(--_border);border-radius:10px;background:var(--_bg);color:var(--_text);box-shadow:0 16px 36px -16px #110c2e73;font-size:13px}@media(prefers-reduced-motion:reduce){.ith-table-skeleton{animation:none}.ith-table-copy,.ith-table-tool-btn{transition:none}}\n"] }]
995
- }], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], keyField: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyField", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], countSuffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "countSuffix", required: false }] }], totalLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalLabel", required: false }] }], showToolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToolbar", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], showFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFilters", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], filterAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterAllLabel", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], sort: [{ type: i0.Input, args: [{ isSignal: true, alias: "sort", required: false }] }, { type: i0.Output, args: ["sortChange"] }], sortable: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortable", required: false }] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }, { type: i0.Output, args: ["searchChange"] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], showPagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPagination", required: false }] }], showPageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPageSize", required: false }] }], showFirstLast: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFirstLast", required: false }] }], maxPageButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxPageButtons", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], selectAllScope: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllScope", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], selectOnRowClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOnRowClick", required: false }] }], rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], actionsHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsHeader", required: false }] }], actionsWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsWidth", required: false }] }], rowClickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowClickable", required: false }] }], rowClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowClass", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingText", required: false }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], hoverable: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverable", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], dense: [{ type: i0.Input, args: [{ isSignal: true, alias: "dense", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], copyable: [{ type: i0.Input, args: [{ isSignal: true, alias: "copyable", required: false }] }], showColumnPicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "showColumnPicker", required: false }] }], showDensityToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDensityToggle", required: false }] }], storageKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "storageKey", required: false }] }], skeletonRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonRows", required: false }] }], stickySelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickySelection", required: false }] }], stickyActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyActions", required: false }] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], cellCopy: [{ type: i0.Output, args: ["cellCopy"] }], rowContextMenu: [{ type: i0.Output, args: ["rowContextMenu"] }], columnsChange: [{ type: i0.Output, args: ["columnsChange"] }], densityChange: [{ type: i0.Output, args: ["densityChange"] }], cellDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableCellDirective), { ...{ descendants: true }, isSignal: true }] }], headerDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableHeaderDirective), { ...{ descendants: true }, isSignal: true }] }], filterDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableFilterDirective), { ...{ descendants: true }, isSignal: true }] }], rowActionsDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableRowActionsDirective), { ...{
1958
+ args: [{ selector: 'ith-table', imports: [NgClass, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"ith-table\"\n [class.ith-table-bordered]=\"bordered()\"\n [class.ith-table-dense]=\"dense()\"\n [class.ith-table-striped]=\"striped()\"\n [class.ith-table-hoverable]=\"hoverable()\"\n [class.ith-table-sticky]=\"stickyHeader()\"\n [class.ith-table-compact]=\"compact()\">\n <!-- Toolbar -->\n @if (showToolbar()) {\n <div class=\"ith-table-toolbar\">\n <div class=\"ith-table-toolbar-inner\">\n <div class=\"ith-table-toolbar-main\">\n @if (title()) {\n <h3 class=\"ith-table-title\">{{ title() }}</h3>\n }\n <span class=\"ith-table-badge\">{{ totalRows() }} {{ countSuffix() }}</span>\n @if (selected().length > 0) {\n <span class=\"ith-table-badge ith-table-badge-accent\">{{ selected().length }} selected</span>\n }\n @if (toolbarTemplate(); as toolbarTpl) {\n <ng-container\n [ngTemplateOutlet]=\"toolbarTpl\"\n [ngTemplateOutletContext]=\"toolbarContext()\" />\n }\n </div>\n\n <div class=\"ith-table-toolbar-spacer\"></div>\n\n <div class=\"ith-table-toolbar-actions\">\n @if (showViews()) {\n <div class=\"ith-table-menu-anchor\" (click)=\"$event.stopPropagation()\">\n <button\n type=\"button\"\n class=\"ith-table-tool-btn\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"viewsOpen()\"\n (click)=\"toggleViews($event)\">\n <svg class=\"ith-table-tool-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M4 6h16M4 12h10M4 18h7\" />\n </svg>\n <span>Views</span>\n </button>\n </div>\n }\n\n @if (showColumnPicker()) {\n <div class=\"ith-table-menu-anchor\" (click)=\"$event.stopPropagation()\">\n <button\n type=\"button\"\n class=\"ith-table-tool-btn\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"columnPickerOpen()\"\n (click)=\"toggleColumnPicker($event)\">\n <svg class=\"ith-table-tool-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <rect x=\"3\" y=\"4\" width=\"7\" height=\"16\" rx=\"1.5\" />\n <rect x=\"14\" y=\"4\" width=\"7\" height=\"16\" rx=\"1.5\" />\n </svg>\n <span>Columns</span>\n </button>\n </div>\n }\n\n @if (showDensityToggle()) {\n <div class=\"ith-table-segmented\" role=\"group\" aria-label=\"Row density\">\n <button\n type=\"button\"\n class=\"ith-table-segmented-btn\"\n [class.is-active]=\"!compact()\"\n [attr.aria-pressed]=\"!compact()\"\n title=\"Comfortable rows\"\n (click)=\"setDensity('comfortable')\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M4 8h16M4 16h16\" />\n </svg>\n <span>Comfortable</span>\n </button>\n <button\n type=\"button\"\n class=\"ith-table-segmented-btn\"\n [class.is-active]=\"compact()\"\n [attr.aria-pressed]=\"compact()\"\n title=\"Compact rows\"\n (click)=\"setDensity('compact')\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M4 6h16M4 10h16M4 14h16M4 18h16\" />\n </svg>\n <span>Compact</span>\n </button>\n </div>\n }\n\n @if (showExport()) {\n <div class=\"ith-table-menu-anchor\" (click)=\"$event.stopPropagation()\">\n <button\n type=\"button\"\n class=\"ith-table-tool-btn\"\n aria-haspopup=\"true\"\n [attr.aria-expanded]=\"!!exportMenuPos()\"\n title=\"Export the current view\"\n (click)=\"toggleExportMenu($event)\">\n <svg class=\"ith-table-tool-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M12 4v11m0 0 4-4m-4 4-4-4\" />\n <path d=\"M4 19h16\" />\n </svg>\n <span>Export</span>\n </button>\n </div>\n }\n\n @if (searchable()) {\n <div class=\"ith-table-search\">\n <svg class=\"ith-table-search-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.6-3.6\" />\n </svg>\n <input\n type=\"search\"\n class=\"ith-table-search-input\"\n [value]=\"search()\"\n [attr.placeholder]=\"searchPlaceholder()\"\n [attr.aria-label]=\"searchPlaceholder()\"\n (input)=\"onSearchInput($any($event.target).value)\" />\n @if (search()) {\n <button type=\"button\" class=\"ith-table-search-clear\" (click)=\"clearSearch()\" aria-label=\"Clear search\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M6 6l12 12M18 6 6 18\" />\n </svg>\n </button>\n }\n </div>\n }\n </div>\n </div>\n\n @if (showFilterChips() && hasQuery()) {\n <div class=\"ith-table-chips\">\n @for (chip of filterChips(); track chip.kind + chip.key) {\n <span class=\"ith-table-chip\">\n <span class=\"ith-table-chip-label\">{{ chip.label }}</span>\n <span class=\"ith-table-chip-value\">{{ chip.value }}</span>\n <button\n type=\"button\"\n class=\"ith-table-chip-remove\"\n [attr.aria-label]=\"'Remove ' + chip.label + ' filter'\"\n (click)=\"removeChip(chip)\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M6 6l12 12M18 6 6 18\" />\n </svg>\n </button>\n </span>\n }\n <button type=\"button\" class=\"ith-table-chips-clear\" (click)=\"clearQuery()\">Clear all</button>\n </div>\n }\n </div>\n }\n\n <!-- Bulk actions for the current selection -->\n @if (selected().length > 0 && selectionActions().length) {\n <div class=\"ith-table-selection-bar\" role=\"region\" aria-label=\"Selection actions\">\n <span class=\"ith-table-selection-count\">\n <strong>{{ selected().length }}</strong> selected\n </span>\n <span class=\"ith-table-selection-spacer\"></span>\n <div class=\"ith-table-selection-actions\">\n @for (action of selectionActions(); track action.id) {\n <button\n type=\"button\"\n class=\"ith-table-selection-btn\"\n [ngClass]=\"action.class ?? ''\"\n [attr.title]=\"action.title ?? action.label\"\n (click)=\"onSelectionAction(action, $event)\">\n @if (action.icon) {\n <span class=\"ith-table-selection-icon\" aria-hidden=\"true\">{{ action.icon }}</span>\n }\n <span>{{ action.label }}</span>\n </button>\n }\n <button type=\"button\" class=\"ith-table-selection-clear\" (click)=\"clearSelection()\">\n Clear selection\n </button>\n </div>\n </div>\n }\n\n <!-- Table -->\n <div\n class=\"ith-table-scroll\"\n [class.ith-table-scroll-bounded]=\"!!maxHeight()\"\n [class.ith-table-scroll-filtered]=\"showFilters()\"\n [class.is-scrolled]=\"scrolled()\"\n [style.maxHeight]=\"maxHeight() || null\"\n [style.--_min-rows]=\"minRows()\"\n (scroll)=\"onScroll($event)\">\n <table class=\"ith-table-grid\" [attr.aria-label]=\"ariaLabel()\" [attr.aria-busy]=\"loading()\">\n <thead>\n <tr class=\"ith-table-head-row\">\n @if (selectable()) {\n <th\n scope=\"col\"\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\">\n @if (selectionMode() === 'multi') {\n <input\n type=\"checkbox\"\n class=\"ith-table-checkbox\"\n [checked]=\"allPageSelected()\"\n [indeterminate]=\"somePageSelected()\"\n [attr.aria-label]=\"'Select all rows'\"\n (change)=\"onSelectAllChange($event)\" />\n }\n </th>\n }\n\n @if (hasExpander()) {\n <th scope=\"col\" class=\"ith-table-expander-cell\" [attr.aria-label]=\"'Row details'\"></th>\n }\n\n @for (column of visibleColumns(); track column.key) {\n <th\n scope=\"col\"\n class=\"ith-table-th\"\n [ngClass]=\"headerClasses(column)\"\n [style]=\"columnStyle(column)\"\n [attr.data-col]=\"column.key\"\n [attr.aria-sort]=\"isSortable(column) ? ariaSort(column) : null\"\n [attr.draggable]=\"reorderable() ? 'true' : null\"\n [class.ith-table-th-dragging]=\"dragKey() === column.key\"\n (dragstart)=\"onHeaderDragStart(column, $event)\"\n (dragover)=\"onHeaderDragOver(column, $event)\"\n (drop)=\"onHeaderDrop(column, $event)\"\n (dragend)=\"onHeaderDragEnd()\">\n <div class=\"ith-table-th-inner\">\n @if (headerTemplate(column); as headerTpl) {\n <ng-container\n [ngTemplateOutlet]=\"headerTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column: column }\" />\n } @else if (isSortable(column)) {\n <button\n type=\"button\"\n class=\"ith-table-sort\"\n [class.is-sorted]=\"!!sortDirection(column)\"\n (click)=\"toggleSort(column)\"\n [attr.aria-label]=\"'Sort by ' + (column.header ?? column.key)\">\n <span class=\"ith-table-th-label\">{{ column.header ?? column.key }}</span>\n <span class=\"ith-table-sort-icons\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 10 6\" class=\"ith-table-sort-up\" [class.is-active]=\"sortDirection(column) === 'asc'\"><path d=\"M5 0l5 6H0z\" /></svg>\n <svg viewBox=\"0 0 10 6\" class=\"ith-table-sort-down\" [class.is-active]=\"sortDirection(column) === 'desc'\"><path d=\"M5 6L0 0h10z\" /></svg>\n </span>\n </button>\n } @else {\n <span class=\"ith-table-th-label\">{{ column.header ?? column.key }}</span>\n }\n\n @if (showColumnMenu()) {\n <button\n type=\"button\"\n class=\"ith-table-th-menu\"\n [attr.aria-expanded]=\"columnMenu()?.key === column.key\"\n [attr.aria-label]=\"'Column options for ' + (column.header ?? column.key)\"\n (click)=\"openColumnMenu(column, $event)\">\n <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"5\" r=\"1.7\" />\n <circle cx=\"12\" cy=\"12\" r=\"1.7\" />\n <circle cx=\"12\" cy=\"19\" r=\"1.7\" />\n </svg>\n </button>\n }\n\n @if (pinOf(column) === 'start') {\n <span class=\"ith-table-pin-dot\" aria-hidden=\"true\"></span>\n }\n </div>\n\n @if (resizable()) {\n <span\n class=\"ith-table-resizer\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"'Resize ' + (column.header ?? column.key)\"\n (pointerdown)=\"startResize(column, $event)\"></span>\n }\n </th>\n }\n\n @if (hasActionsColumn()) {\n <th\n scope=\"col\"\n class=\"ith-table-th ith-table-actions-head\"\n [class.ith-table-sticky-end]=\"stickyActions()\"\n [style.width]=\"actionsWidth()\"\n [style.right]=\"stickyActions() ? '0px' : null\">\n {{ actionsHeader() }}\n </th>\n }\n </tr>\n\n @if (showFilters()) {\n <tr class=\"ith-table-filter-row\">\n @if (selectable()) {\n <th\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\"></th>\n }\n @if (hasExpander()) {\n <th class=\"ith-table-expander-cell\"></th>\n }\n @for (column of visibleColumns(); track column.key) {\n <th\n class=\"ith-table-filter-cell\"\n [ngClass]=\"filterClasses(column)\"\n [style]=\"columnStyle(column)\">\n @if (filterTemplate(column); as filterTpl) {\n <ng-container\n [ngTemplateOutlet]=\"filterTpl\"\n [ngTemplateOutletContext]=\"filterContext(column)\" />\n } @else if (column.filterable !== false) {\n @switch (filterTypeFor(column)) {\n @case ('select') {\n <select\n class=\"ith-table-filter-input ith-table-filter-select\"\n [value]=\"filterValue(column.key)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (change)=\"onFilterInput(column.key, $any($event.target).value)\">\n <option value=\"\">{{ filterAllLabel() }}</option>\n @for (option of filterOptionsFor(column); track option.value) {\n <option [value]=\"option.value\">{{ option.label }}</option>\n }\n </select>\n }\n @case ('number') {\n <input\n type=\"number\"\n class=\"ith-table-filter-input\"\n [value]=\"filterValue(column.key)\"\n [attr.placeholder]=\"filterPlaceholderFor(column)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (input)=\"onFilterInput(column.key, $any($event.target).value)\" />\n }\n @case ('date') {\n <input\n type=\"date\"\n class=\"ith-table-filter-input\"\n [value]=\"filterValue(column.key)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (input)=\"onFilterInput(column.key, $any($event.target).value)\" />\n }\n @default {\n <input\n type=\"text\"\n class=\"ith-table-filter-input\"\n [value]=\"filterValue(column.key)\"\n [attr.placeholder]=\"filterPlaceholderFor(column)\"\n [attr.aria-label]=\"'Filter by ' + (column.header ?? column.key)\"\n (input)=\"onFilterInput(column.key, $any($event.target).value)\" />\n }\n }\n }\n </th>\n }\n @if (hasActionsColumn()) {\n <th\n class=\"ith-table-filter-cell\"\n [class.ith-table-sticky-end]=\"stickyActions()\"\n [style.right]=\"stickyActions() ? '0px' : null\"></th>\n }\n </tr>\n }\n </thead>\n\n <tbody>\n @if (loading() && pagedRows().length === 0) {\n @for (skeleton of skeletonIndexes(); track skeleton) {\n <tr class=\"ith-table-skeleton-row\" aria-hidden=\"true\">\n @if (selectable()) {\n <td\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\">\n <span class=\"ith-table-skeleton is-check\"></span>\n </td>\n }\n @if (hasExpander()) {\n <td class=\"ith-table-expander-cell\"></td>\n }\n @for (column of visibleColumns(); track column.key) {\n <td class=\"ith-table-td\">\n <span class=\"ith-table-skeleton\"></span>\n </td>\n }\n @if (hasActionsColumn()) {\n <td class=\"ith-table-actions-cell\"><span class=\"ith-table-skeleton\"></span></td>\n }\n </tr>\n }\n <tr>\n <td class=\"ith-table-visually-hidden\" [attr.colspan]=\"emptyColspan()\" aria-live=\"polite\">\n {{ loadingText() }}\n </td>\n </tr>\n } @else if (pagedRows().length === 0) {\n <tr>\n <td class=\"ith-table-status\" [attr.colspan]=\"emptyColspan()\">\n @if (emptyTemplate(); as emptyTpl) {\n <ng-container\n [ngTemplateOutlet]=\"emptyTpl\"\n [ngTemplateOutletContext]=\"emptyContext()\" />\n } @else {\n <div class=\"ith-table-empty\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M3 10h18M9 10v9\" />\n </svg>\n <span>{{ hasQuery() ? 'No records match your search.' : emptyText() }}</span>\n @if (hasQuery()) {\n <button type=\"button\" class=\"ith-table-link\" (click)=\"clearQuery()\">Clear search &amp; filters</button>\n }\n </div>\n }\n </td>\n </tr>\n } @else {\n @for (row of pagedRows(); track trackRow($index, row); let rowIndex = $index) {\n <tr\n class=\"ith-table-row\"\n [ngClass]=\"rowClassFor(row, $index)\"\n [class.ith-table-row-clickable]=\"rowClickable() || selectOnRowClick() || (hasRowDetail() && rowDetailTrigger() === 'row')\"\n [attr.tabindex]=\"rowClickable() || selectOnRowClick() ? 0 : null\"\n [attr.aria-selected]=\"selectable() ? isSelected(row) : null\"\n [attr.aria-expanded]=\"hasRowDetail() ? isRowExpanded(row) : null\"\n (click)=\"onRowClick(row, $index, $event)\"\n (keydown)=\"onRowKeydown(row, $index, $event)\"\n (contextmenu)=\"onRowContextMenu(row, $index, $event)\">\n @if (selectable()) {\n <td\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\">\n <input\n type=\"checkbox\"\n class=\"ith-table-checkbox\"\n [checked]=\"isSelected(row)\"\n [attr.aria-label]=\"'Select row ' + ($index + 1)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"onRowCheckboxChange(row, $event)\" />\n </td>\n }\n\n @if (hasExpander()) {\n <td class=\"ith-table-expander-cell\">\n <button\n type=\"button\"\n class=\"ith-table-expander\"\n [class.is-open]=\"isRowExpanded(row)\"\n [attr.aria-expanded]=\"isRowExpanded(row)\"\n [attr.aria-label]=\"'Toggle details for row ' + ($index + 1)\"\n (click)=\"toggleRowDetail(row, $event)\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"m9 6 6 6-6 6\" />\n </svg>\n </button>\n </td>\n }\n\n @for (column of visibleColumns(); track column.key; let colIndex = $index) {\n <td\n class=\"ith-table-td\"\n [class.ith-table-copyable]=\"copyable()\"\n [ngClass]=\"cellClasses(row, column, rowIndex)\"\n [style]=\"columnStyle(column)\"\n [attr.title]=\"tooltipText(row, column, rowIndex)\"\n [attr.data-cell]=\"rowIndex + '-' + colIndex\"\n [attr.data-col]=\"column.key\"\n [attr.tabindex]=\"cellTabIndex(rowIndex, colIndex)\"\n (focus)=\"onCellFocus(rowIndex, colIndex)\"\n (keydown)=\"onCellKeydown(column, rowIndex, colIndex, $event)\">\n @if (cellTemplate(column); as cellTpl) {\n <ng-container\n [ngTemplateOutlet]=\"cellTpl\"\n [ngTemplateOutletContext]=\"cellContext(row, column, rowIndex)\" />\n } @else {\n {{ cellText(row, column, rowIndex) }}\n }\n @if (copyable()) {\n <button\n type=\"button\"\n class=\"ith-table-copy\"\n [class.is-copied]=\"isCellCopied(rowIndex, column)\"\n [attr.aria-label]=\"'Copy ' + (column.header ?? column.key)\"\n (click)=\"copyCell(row, column, rowIndex, $event)\">\n @if (isCellCopied(rowIndex, column)) {\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m5 13 4 4L19 7\" /></svg>\n } @else {\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" /><path d=\"M15 5.5A2.5 2.5 0 0 0 12.5 3H6a2 2 0 0 0-2 2v7.5A2.5 2.5 0 0 0 6.5 15\" /></svg>\n }\n </button>\n }\n </td>\n }\n\n @if (hasActionsColumn()) {\n <td\n class=\"ith-table-actions-cell\"\n [class.ith-table-sticky-end]=\"stickyActions()\"\n [style.right]=\"stickyActions() ? '0px' : null\">\n @if (rowActionsTemplate(); as actionsTpl) {\n <ng-container\n [ngTemplateOutlet]=\"actionsTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row, index: $index }\" />\n } @else {\n @for (action of rowActions(); track action.id) {\n @if (isActionVisible(action, row, $index)) {\n <button\n type=\"button\"\n class=\"ith-table-action\"\n [ngClass]=\"action.class ?? ''\"\n [attr.title]=\"action.title ?? action.label\"\n [disabled]=\"isActionDisabled(action, row, $index)\"\n (click)=\"onActionClick(action, row, $index, $event)\">\n @if (action.icon) {\n <span class=\"ith-table-action-icon\" aria-hidden=\"true\">{{ action.icon }}</span>\n }\n <span>{{ action.label }}</span>\n </button>\n }\n }\n }\n </td>\n }\n </tr>\n\n @if (hasRowDetail() && isRowExpanded(row)) {\n <tr class=\"ith-table-detail-row\">\n <td [attr.colspan]=\"emptyColspan()\">\n @if (rowDetailTemplate(); as detailTpl) {\n <ng-container\n [ngTemplateOutlet]=\"detailTpl\"\n [ngTemplateOutletContext]=\"rowDetailContext(row, rowIndex)\" />\n }\n </td>\n </tr>\n }\n }\n }\n </tbody>\n\n @if (hasAggregates() && pagedRows().length > 0) {\n <tfoot>\n <tr class=\"ith-table-total-row\">\n @if (selectable()) {\n <td\n class=\"ith-table-select-cell\"\n [class.ith-table-sticky-start]=\"stickySelection()\"\n [style.left]=\"stickySelection() ? '0px' : null\"></td>\n }\n @if (hasExpander()) {\n <td class=\"ith-table-expander-cell\"></td>\n }\n @for (column of visibleColumns(); track column.key) {\n <td\n class=\"ith-table-total-cell\"\n [ngClass]=\"stickyClassFor(column)\"\n [style]=\"columnStyle(column)\">\n @if (column.aggregate) {\n <span class=\"ith-table-total-label\">{{ aggregateLabel(column) }}</span>\n <span class=\"ith-table-total-value\">{{ aggregateText(column) }}</span>\n }\n </td>\n }\n @if (hasActionsColumn()) {\n <td\n class=\"ith-table-total-cell ith-table-actions-cell\"\n [class.ith-table-sticky-end]=\"stickyActions()\"\n [style.right]=\"stickyActions() ? '0px' : null\"></td>\n }\n </tr>\n </tfoot>\n }\n </table>\n\n @if (loading() && pagedRows().length > 0) {\n <div class=\"ith-table-loading-overlay\">\n <span class=\"ith-table-spinner\" aria-hidden=\"true\"></span>\n <span>{{ loadingText() }}</span>\n </div>\n }\n </div>\n\n <!-- Columns popover (fixed, so the toolbar's scroll box cannot clip it) -->\n @if (columnPickerOpen()) {\n <div\n class=\"ith-table-popover\"\n role=\"dialog\"\n aria-label=\"Visible columns\"\n [style.left.px]=\"columnsMenuPos()?.x ?? 0\"\n [style.top.px]=\"columnsMenuPos()?.y ?? 0\"\n (click)=\"$event.stopPropagation()\">\n <div class=\"ith-table-popover-header\">Show columns</div>\n <div class=\"ith-table-popover-list\">\n @for (column of orderedColumns(); track column.key) {\n <label class=\"ith-table-columns-item\">\n <input\n type=\"checkbox\"\n class=\"ith-table-checkbox\"\n [checked]=\"isColumnVisible(column)\"\n [disabled]=\"!isColumnVisible(column) && !canHide(column.key)\"\n (change)=\"setColumnVisible(column.key, $any($event.target).checked)\" />\n <span>{{ column.header ?? column.key }}</span>\n @if (pinOf(column)) {\n <span class=\"ith-table-pin-tag\">{{ pinOf(column) }}</span>\n }\n </label>\n }\n </div>\n <div class=\"ith-table-popover-footer\">\n <button type=\"button\" class=\"ith-table-popover-action\" (click)=\"resetColumns()\">\n Reset columns\n </button>\n </div>\n </div>\n }\n\n <!-- Export formats -->\n @if (exportMenuPos(); as pos) {\n <div\n class=\"ith-table-popover ith-table-export-menu\"\n role=\"menu\"\n aria-label=\"Export format\"\n [style.left.px]=\"pos.x\"\n [style.top.px]=\"pos.y\"\n (click)=\"$event.stopPropagation()\">\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"exportAs('xlsx')\">\n <span class=\"ith-table-export-name\">Excel</span>\n <span class=\"ith-table-export-hint\">.xlsx \u2014 Excel, Numbers, Sheets</span>\n </button>\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"exportAs('csv')\">\n <span class=\"ith-table-export-name\">CSV</span>\n <span class=\"ith-table-export-hint\">.csv \u2014 plain text, any tool</span>\n </button>\n </div>\n }\n\n <!-- Named views -->\n @if (viewsOpen()) {\n <div\n class=\"ith-table-popover\"\n role=\"dialog\"\n aria-label=\"Saved views\"\n [style.left.px]=\"viewsMenuPos()?.x ?? 0\"\n [style.top.px]=\"viewsMenuPos()?.y ?? 0\"\n (click)=\"$event.stopPropagation()\">\n <div class=\"ith-table-popover-header\">Saved views</div>\n <div class=\"ith-table-popover-list\">\n @for (name of savedViewNames(); track name) {\n <div class=\"ith-table-view-item\" [class.is-active]=\"activeView() === name\">\n <button type=\"button\" class=\"ith-table-view-apply\" (click)=\"applyView(name)\">\n {{ name }}\n </button>\n <button\n type=\"button\"\n class=\"ith-table-view-delete\"\n [attr.aria-label]=\"'Delete view ' + name\"\n (click)=\"deleteView(name, $event)\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" aria-hidden=\"true\">\n <path d=\"M6 6l12 12M18 6 6 18\" />\n </svg>\n </button>\n </div>\n } @empty {\n <p class=\"ith-table-popover-empty\">No saved views yet.</p>\n }\n </div>\n <div class=\"ith-table-popover-footer ith-table-view-save\">\n <input\n type=\"text\"\n class=\"ith-table-view-input\"\n placeholder=\"View name\"\n aria-label=\"New view name\"\n [value]=\"viewNameDraft()\"\n (input)=\"onViewNameInput($any($event.target).value)\"\n (keydown.enter)=\"saveView()\" />\n <button type=\"button\" class=\"ith-table-popover-action\" (click)=\"saveView()\">Save</button>\n </div>\n </div>\n }\n\n <!-- Column header menu -->\n @if (columnMenu(); as menu) {\n <div\n class=\"ith-table-popover ith-table-column-menu\"\n role=\"menu\"\n [style.left.px]=\"menu.x\"\n [style.top.px]=\"menu.y\"\n (click)=\"$event.stopPropagation()\">\n @if (columnMenuColumn(); as column) {\n @if (isSortable(column)) {\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuSort('asc')\">\n Sort ascending\n </button>\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuSort('desc')\">\n Sort descending\n </button>\n @if (sortDirection(column)) {\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuClearSort()\">\n Clear sort\n </button>\n }\n <div class=\"ith-table-menu-divider\"></div>\n }\n @if (canPin(column)) {\n @if (pinOf(column) !== 'start') {\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuPin('start')\">\n Pin to left\n </button>\n }\n @if (pinOf(column) !== 'end') {\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuPin('end')\">\n Pin to right\n </button>\n }\n @if (pinOf(column)) {\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuPin(null)\">\n Unpin column\n </button>\n }\n <div class=\"ith-table-menu-divider\"></div>\n }\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuAutosize()\">\n Fit to content\n </button>\n @if (canHide(column.key)) {\n <button type=\"button\" class=\"ith-table-menu-item\" role=\"menuitem\" (click)=\"menuHide()\">\n Hide column\n </button>\n }\n }\n </div>\n }\n\n <!-- Right-click menu (projected template, positioned at the pointer) -->\n @if (menuState(); as menu) {\n <div\n class=\"ith-table-menu\"\n role=\"menu\"\n [style.left.px]=\"menu.x\"\n [style.top.px]=\"menu.y\"\n (click)=\"closeRowMenu(); $event.stopPropagation()\">\n @if (rowMenuTemplate(); as menuTpl) {\n <ng-container\n [ngTemplateOutlet]=\"menuTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: menu.row, row: menu.row, index: menu.index }\" />\n }\n </div>\n }\n\n <!-- Footer -->\n @if (showFooter()) {\n <div class=\"ith-table-footer\">\n <div class=\"ith-table-footer-info\">\n @if (footerTemplate(); as footerTpl) {\n <ng-container\n [ngTemplateOutlet]=\"footerTpl\"\n [ngTemplateOutletContext]=\"footerContext()\" />\n } @else {\n <span>\n Showing <strong>{{ rangeStart() }}</strong>\u2013<strong>{{ rangeEnd() }}</strong>\n of <strong>{{ totalRows() }}</strong>\n </span>\n <span class=\"ith-table-total\">{{ totalLabel() }}: <strong>{{ totalRows() }}</strong></span>\n }\n </div>\n\n <div class=\"ith-table-footer-controls\">\n @if (showPagination()) {\n <nav class=\"ith-table-pagination\" aria-label=\"Pagination\">\n @if (showFirstLast()) {\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"firstPage()\" [disabled]=\"page() === 1\" aria-label=\"First page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m11 17-5-5 5-5M18 17l-5-5 5-5\" /></svg>\n </button>\n }\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"previousPage()\" [disabled]=\"page() === 1\" aria-label=\"Previous page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m15 18-6-6 6-6\" /></svg>\n </button>\n\n @for (item of pageItems(); track item) {\n <button\n type=\"button\"\n class=\"ith-table-page-btn ith-table-page-number\"\n [class.is-active]=\"item === page()\"\n [attr.aria-current]=\"item === page() ? 'page' : null\"\n (click)=\"goToPage(item)\">\n {{ item }}\n </button>\n }\n\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"nextPage()\" [disabled]=\"page() === pageCount()\" aria-label=\"Next page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m9 18 6-6-6-6\" /></svg>\n </button>\n @if (showFirstLast()) {\n <button type=\"button\" class=\"ith-table-page-btn\" (click)=\"lastPage()\" [disabled]=\"page() === pageCount()\" aria-label=\"Last page\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"m13 17 5-5-5-5M6 17l5-5-5-5\" /></svg>\n </button>\n }\n <span class=\"ith-table-page-state\">Page {{ page() }} / {{ pageCount() }}</span>\n </nav>\n }\n\n @if (showPageSize()) {\n <label class=\"ith-table-page-size\">\n <span>Rows:</span>\n <select class=\"ith-table-select\" [value]=\"pageSize()\" (change)=\"onPageSizeChange($any($event.target).value)\">\n @for (size of pageSizeChoices(); track size) {\n <option [value]=\"size\">{{ size }}</option>\n }\n </select>\n </label>\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:block;--_brand: var(--ith-table-brand, #5b21b6);--_bg: var(--ith-table-bg, #ffffff);--_text: var(--ith-table-text, #1f2937);--_muted: var(--ith-table-muted, #6b7280);--_border: var(--ith-table-border, #e8eaf0);--_header-bg: var(--ith-table-header-bg, var(--_brand));--_header-text: var(--ith-table-header-text, #ffffff);--_hover: var(--ith-table-hover, color-mix(in srgb, var(--_brand) 6%, #ffffff));--_selected-bg: var(--ith-table-selected-bg, color-mix(in srgb, var(--_brand) 10%, #ffffff));--_striped-bg: var(--ith-table-striped-bg, color-mix(in srgb, var(--_brand) 2%, #ffffff));--_accent: var(--ith-table-accent, var(--_brand));--_accent-soft: var(--ith-table-accent-soft, color-mix(in srgb, var(--_brand) 12%, #ffffff));--_input-bg: var(--ith-table-input-bg, #ffffff);--_input-border: var(--ith-table-input-border, #dfe3ec);--_footer-bg: var(--ith-table-footer-bg, color-mix(in srgb, var(--_brand) 2%, #ffffff));--_filter-bg: var(--ith-table-filter-bg, color-mix(in srgb, var(--_brand) 3%, #ffffff));--_overlay: var(--ith-table-overlay, rgba(255, 255, 255, .72));--_radius: var(--ith-table-radius, 14px);--_shadow: var(--ith-table-shadow, 0 18px 40px -28px rgba(24, 20, 60, .55));--_focus: var(--ith-table-focus, color-mix(in srgb, var(--_brand) 25%, transparent));--_cell-padding: var(--ith-table-cell-padding, 12px 16px);--_font-size: var(--ith-table-font-size, 14px);--_header-font-size: var(--ith-table-header-font-size, 13px);--_row-height: var(--ith-table-row-height, 46px);--_head-height: var(--ith-table-head-height, 45px);--_filter-height: 47px;--_on-accent: #ffffff;--_toolbar-tint: color-mix(in srgb, var(--_brand) 3%, var(--_bg));--_popover-bg: var(--_bg);--_scroll-thumb: color-mix(in srgb, var(--_muted) 38%, transparent);--_danger: #dc2626;--_elevation: 0 18px 40px -18px rgba(17, 12, 46, .35), 0 0 0 1px color-mix(in srgb, var(--_border) 60%, transparent)}:host-context([data-theme=\"dark\"]),:host-context(.dark){--_brand: var(--ith-table-brand, #7c3aed);--_bg: var(--ith-table-bg, #161826);--_text: var(--ith-table-text, #e7e9f3);--_muted: var(--ith-table-muted, #9aa0b5);--_border: var(--ith-table-border, #2f3348);--_header-bg: var(--ith-table-header-bg, color-mix(in srgb, var(--_brand) 34%, #0b0d16));--_header-text: var(--ith-table-header-text, #f3eeff);--_hover: var(--ith-table-hover, color-mix(in srgb, var(--_brand) 15%, #161826));--_selected-bg: var(--ith-table-selected-bg, color-mix(in srgb, var(--_brand) 20%, #161826));--_striped-bg: var(--ith-table-striped-bg, color-mix(in srgb, var(--_brand) 6%, #161826));--_accent: var(--ith-table-accent, color-mix(in srgb, var(--_brand) 55%, #ffffff));--_accent-soft: var(--ith-table-accent-soft, color-mix(in srgb, var(--_brand) 26%, #161826));--_input-bg: var(--ith-table-input-bg, #202436);--_input-border: var(--ith-table-input-border, #343a52);--_footer-bg: var(--ith-table-footer-bg, color-mix(in srgb, var(--_brand) 4%, #12141f));--_filter-bg: var(--ith-table-filter-bg, color-mix(in srgb, var(--_brand) 9%, #161826));--_overlay: var(--ith-table-overlay, rgba(17, 19, 30, .72));--_shadow: var(--ith-table-shadow, 0 18px 40px -28px rgba(0, 0, 0, .85));--_focus: var(--ith-table-focus, color-mix(in srgb, var(--_brand) 38%, transparent));--_on-accent: #15121f;--_toolbar-tint: color-mix(in srgb, var(--_brand) 12%, var(--_bg));--_popover-bg: #1d2133;--_scroll-thumb: color-mix(in srgb, #ffffff 22%, transparent);--_danger: #f87171;--_elevation: 0 22px 48px -20px rgba(0, 0, 0, .8), 0 0 0 1px color-mix(in srgb, #ffffff 8%, transparent)}@media(prefers-color-scheme:dark){:host-context([data-theme=\"auto\"]){--_brand: var(--ith-table-brand, #7c3aed);--_bg: var(--ith-table-bg, #161826);--_text: var(--ith-table-text, #e7e9f3);--_muted: var(--ith-table-muted, #9aa0b5);--_border: var(--ith-table-border, #2f3348);--_header-bg: var(--ith-table-header-bg, color-mix(in srgb, var(--_brand) 34%, #0b0d16));--_header-text: var(--ith-table-header-text, #f3eeff);--_hover: var(--ith-table-hover, color-mix(in srgb, var(--_brand) 15%, #161826));--_selected-bg: var(--ith-table-selected-bg, color-mix(in srgb, var(--_brand) 20%, #161826));--_striped-bg: var(--ith-table-striped-bg, color-mix(in srgb, var(--_brand) 6%, #161826));--_accent: var(--ith-table-accent, color-mix(in srgb, var(--_brand) 55%, #ffffff));--_accent-soft: var(--ith-table-accent-soft, color-mix(in srgb, var(--_brand) 26%, #161826));--_input-bg: var(--ith-table-input-bg, #202436);--_input-border: var(--ith-table-input-border, #343a52);--_footer-bg: var(--ith-table-footer-bg, color-mix(in srgb, var(--_brand) 4%, #12141f));--_filter-bg: var(--ith-table-filter-bg, color-mix(in srgb, var(--_brand) 9%, #161826));--_overlay: var(--ith-table-overlay, rgba(17, 19, 30, .72));--_shadow: var(--ith-table-shadow, 0 18px 40px -28px rgba(0, 0, 0, .85));--_focus: var(--ith-table-focus, color-mix(in srgb, var(--_brand) 38%, transparent));--_on-accent: #15121f;--_toolbar-tint: color-mix(in srgb, var(--_brand) 12%, var(--_bg));--_popover-bg: #1d2133;--_scroll-thumb: color-mix(in srgb, #ffffff 22%, transparent);--_danger: #f87171;--_elevation: 0 22px 48px -20px rgba(0, 0, 0, .8), 0 0 0 1px color-mix(in srgb, #ffffff 8%, transparent)}}.ith-table{display:block;position:relative;background:var(--_bg);color:var(--_text);border:1px solid var(--_border);border-radius:var(--_radius);box-shadow:var(--_shadow);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:var(--_font-size);overflow:hidden}.ith-table-toolbar{padding:14px 16px;border-bottom:1px solid var(--_border);background:var(--_toolbar-tint)}.ith-table-toolbar-inner{display:flex;align-items:center;gap:12px;flex-wrap:nowrap;min-width:0;overflow-x:auto;scrollbar-width:none}.ith-table-toolbar-inner::-webkit-scrollbar{display:none}.ith-table-toolbar-main{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;min-width:0;flex:0 0 auto}.ith-table-toolbar-spacer{flex:1 1 auto;min-width:8px}.ith-table-title{margin:0;font-size:15.5px;font-weight:650;letter-spacing:-.015em;color:var(--_text);white-space:nowrap}.ith-table-badge{display:inline-flex;align-items:center;padding:3px 10px;border-radius:999px;background:var(--_accent-soft);color:var(--_accent);font-size:11.5px;font-weight:600;line-height:1.4;white-space:nowrap}.ith-table-badge-accent{background:var(--_accent);color:var(--_on-accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--_accent) 30%,transparent)}.ith-table-search{position:relative;flex:0 1 260px;min-width:180px}.ith-table-search-icon{position:absolute;left:12px;top:50%;width:15px;height:15px;transform:translateY(-50%);color:var(--_muted);pointer-events:none}.ith-table-search-input{width:100%;box-sizing:border-box;height:36px;padding:0 34px 0 36px;border:1px solid var(--_input-border);border-radius:10px;background:var(--_input-bg);color:var(--_text);font-size:13px;font-family:inherit;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.ith-table-search-input:hover{border-color:color-mix(in srgb,var(--_accent) 35%,var(--_input-border))}.ith-table-search-input::placeholder{color:var(--_muted)}.ith-table-search-input::-webkit-search-cancel-button,.ith-table-search-input::-webkit-search-decoration,.ith-table-search-input::-webkit-search-results-button,.ith-table-search-input::-webkit-search-results-decoration{-webkit-appearance:none;appearance:none;display:none}.ith-table-search-input:focus{outline:none;border-color:var(--_accent);box-shadow:0 0 0 3px var(--_focus);background:var(--_bg)}.ith-table-search-clear{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:24px;height:24px;display:grid;place-items:center;border:0;border-radius:7px;background:transparent;color:var(--_muted);cursor:pointer;transition:background-color .12s ease,color .12s ease}.ith-table-search-clear svg{width:14px;height:14px}.ith-table-search-clear:hover{background:var(--_accent-soft);color:var(--_accent)}.ith-table-scroll{position:relative;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--_scroll-thumb) transparent}.ith-table-scroll::-webkit-scrollbar{width:10px;height:10px}.ith-table-scroll::-webkit-scrollbar-track{background:transparent}.ith-table-scroll::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:999px;background-color:var(--_scroll-thumb);background-clip:content-box}.ith-table-scroll::-webkit-scrollbar-thumb:hover{background-color:color-mix(in srgb,var(--_scroll-thumb) 75%,var(--_text))}.ith-table-scroll:not(.ith-table-scroll-bounded){min-height:calc(var(--_head-height) + var(--_row-height) * var(--_min-rows, 4))}.ith-table-scroll:not(.ith-table-scroll-bounded).ith-table-scroll-filtered{min-height:calc(var(--_head-height) + var(--_filter-height) + var(--_row-height) * var(--_min-rows, 4))}.ith-table-grid{width:100%;border-collapse:separate;border-spacing:0;table-layout:auto}.ith-table-head-row th{background:var(--_header-bg);color:var(--_header-text);font-size:var(--_header-font-size);font-weight:600;letter-spacing:.01em;text-align:left;padding:13px 16px;white-space:nowrap;border:0}.ith-table-sticky .ith-table-head-row th{position:sticky;top:0;z-index:2}.ith-table-th-label{display:inline-block}.ith-table-sort{display:inline-flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;letter-spacing:inherit;cursor:pointer;text-align:inherit}.ith-table-sort-icons{display:inline-flex;flex-direction:column;gap:2px;opacity:.5}.ith-table-sort-icons svg{width:8px;height:5px;fill:currentColor;opacity:.5;transition:opacity .15s ease}.ith-table-sort-icons svg.is-active{opacity:1}.ith-table-sort.is-sorted .ith-table-sort-icons{opacity:1}.ith-table-select-cell{width:46px;text-align:center;padding-left:14px;padding-right:10px}.ith-table-checkbox{width:16px;height:16px;margin:0;cursor:pointer;accent-color:var(--_accent);vertical-align:middle}.ith-table-checkbox:focus-visible{outline:2px solid var(--_accent);outline-offset:2px}.ith-table-row{background:var(--_bg);transition:background-color .15s ease}.ith-table-hoverable .ith-table-row:hover{background:var(--_hover)}.ith-table-row.ith-table-row-selected{background:var(--_selected-bg)}.ith-table-row.ith-table-row-selected td:first-child{box-shadow:inset 3px 0 0 var(--_accent)}.ith-table-row-clickable{cursor:pointer}.ith-table-td{padding:var(--_cell-padding);border-bottom:1px solid var(--_border);font-size:var(--_font-size);color:var(--_text);vertical-align:middle;white-space:nowrap;background:transparent}.ith-table-row:last-child .ith-table-td{border-bottom:0}.ith-table-align-left{text-align:left}.ith-table-align-center{text-align:center}.ith-table-align-right,.ith-table-actions-head{text-align:right}.ith-table-actions-cell{padding:var(--_cell-padding);border-bottom:1px solid var(--_border);text-align:right;white-space:nowrap}.ith-table-row:last-child .ith-table-actions-cell{border-bottom:0}.ith-table-action{display:inline-flex;align-items:center;gap:4px;padding:5px 9px;margin-left:4px;border:1px solid var(--_border);border-radius:7px;background:transparent;color:var(--_accent);font-family:inherit;font-size:12px;font-weight:500;line-height:1.2;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.ith-table-action:hover:not(:disabled){background:var(--_accent-soft);border-color:var(--_accent)}.ith-table-action:disabled{opacity:.45;cursor:not-allowed}.ith-table-action-icon{font-size:12px;line-height:1}.ith-table-action.is-danger{color:var(--_danger);border-color:color-mix(in srgb,var(--_danger) 35%,transparent)}.ith-table-filter-row th{background:var(--_filter-bg);padding:8px 10px;border-bottom:1px solid var(--_border);border-top:1px solid var(--_border)}.ith-table-filter-input{width:100%;box-sizing:border-box;height:30px;padding:0 9px;border:1px solid var(--_input-border);border-radius:7px;background:var(--_input-bg);color:var(--_text);font-family:inherit;font-size:12px}.ith-table-filter-select{cursor:pointer;padding-right:4px}.ith-table-filter-input:focus{outline:none;border-color:var(--_accent);box-shadow:0 0 0 3px var(--_focus)}.ith-table-filter-input::placeholder{color:var(--_muted)}.ith-table-status{padding:40px 16px;text-align:center;color:var(--_muted);font-size:13px}.ith-table-empty{display:flex;flex-direction:column;align-items:center;gap:8px}.ith-table-empty svg{width:36px;height:36px;opacity:.45}.ith-table-spinner{display:inline-block;width:16px;height:16px;border:2px solid var(--_accent-soft);border-top-color:var(--_accent);border-radius:50%;animation:ith-table-spin .7s linear infinite;vertical-align:middle}@keyframes ith-table-spin{to{transform:rotate(360deg)}}.ith-table-loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--_overlay);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);color:var(--_text);font-size:13px;font-weight:500;z-index:3}.ith-table-link{padding:0;border:0;background:none;color:var(--_accent);font-family:inherit;font-size:12px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.ith-table-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 16px;border-top:1px solid var(--_border);background:var(--_footer-bg);font-size:12px;color:var(--_muted)}.ith-table-footer-info{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.ith-table-footer-info strong{color:var(--_text);font-weight:600}.ith-table-footer-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.ith-table-pagination{display:flex;align-items:center;gap:4px}.ith-table-page-btn{display:inline-grid;place-items:center;min-width:30px;height:30px;padding:0 6px;border:1px solid var(--_border);border-radius:7px;background:var(--_bg);color:var(--_text);font-family:inherit;font-size:12px;font-weight:500;cursor:pointer;transition:background-color .15s ease,border-color .15s ease,color .15s ease}.ith-table-page-btn svg{width:14px;height:14px}.ith-table-page-btn:hover:not(:disabled){border-color:var(--_accent);color:var(--_accent);background:var(--_accent-soft)}.ith-table-page-btn:disabled{opacity:.4;cursor:not-allowed}.ith-table-page-number{min-width:30px}.ith-table-page-number.is-active{background:var(--_accent);border-color:var(--_accent);color:var(--_on-accent)}.ith-table-page-number.is-active:hover{background:var(--_accent);color:var(--_on-accent)}.ith-table-page-state{margin-left:6px;white-space:nowrap}.ith-table-page-size{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.ith-table-select{height:30px;padding:0 6px;border:1px solid var(--_border);border-radius:7px;background:var(--_bg);color:var(--_text);font-family:inherit;font-size:12px;cursor:pointer}.ith-table-select:focus-visible,.ith-table-page-btn:focus-visible,.ith-table-action:focus-visible,.ith-table-link:focus-visible{outline:2px solid var(--_accent);outline-offset:2px}.ith-table-dense{--ith-table-cell-padding: 8px 12px;--ith-table-font-size: 13px;--ith-table-header-font-size: 12px;--_cell-padding: 8px 12px;--_font-size: 13px;--_header-font-size: 12px;--_row-height: 39px;--_head-height: 38px}.ith-table-dense .ith-table-head-row th{padding:10px 12px}.ith-table-striped .ith-table-row:nth-child(2n){background:var(--_striped-bg)}.ith-table-bordered .ith-table-td,.ith-table-bordered .ith-table-actions-cell,.ith-table-bordered .ith-table-head-row th,.ith-table-bordered .ith-table-filter-row th{border-right:1px solid var(--_border)}.ith-table-bordered .ith-table-head-row th:last-child,.ith-table-bordered .ith-table-filter-row th:last-child{border-right:0}.ith-table-bordered .ith-table-td:last-child,.ith-table-bordered .ith-table-actions-cell:last-child{border-right:0}@media(prefers-reduced-motion:reduce){.ith-table-row,.ith-table-action,.ith-table-page-btn,.ith-table-search-input,.ith-table-sort-icons svg{transition:none}.ith-table-spinner{animation-duration:2.4s}}@media(max-width:640px){.ith-table-footer{align-items:stretch;flex-direction:column}.ith-table-toolbar-inner{gap:10px}.ith-table-search{flex:1 1 auto}.ith-table-footer-controls{justify-content:space-between}.ith-table-page-state{display:none}}.ith-table-toolbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;flex:0 0 auto}.ith-table-tool-btn{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 13px;border:1px solid var(--_input-border);border-radius:10px;background:var(--_input-bg);color:var(--_text);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer;white-space:nowrap;transition:border-color .14s ease,background-color .14s ease,color .14s ease,box-shadow .14s ease}.ith-table-tool-icon{width:15px;height:15px;flex-shrink:0;opacity:.8}.ith-table-tool-btn:hover .ith-table-tool-icon,.ith-table-tool-btn[aria-expanded=true] .ith-table-tool-icon,.ith-table-tool-btn[aria-pressed=true] .ith-table-tool-icon{opacity:1}.ith-table-tool-btn:hover{border-color:color-mix(in srgb,var(--_accent) 45%,var(--_input-border));background:color-mix(in srgb,var(--_accent) 4%,var(--_input-bg));color:var(--_accent)}.ith-table-tool-btn[aria-expanded=true],.ith-table-tool-btn[aria-pressed=true]{border-color:var(--_accent);background:var(--_accent-soft);color:var(--_accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--_accent) 20%,transparent)}.ith-table-tool-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--_focus)}.ith-table-menu-anchor{position:relative;display:inline-flex}.ith-table-segmented{display:inline-flex;align-items:center;gap:2px;height:36px;padding:3px;border:1px solid var(--_input-border);border-radius:10px;background:var(--_input-bg)}.ith-table-segmented-btn{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border:0;border-radius:7px;background:transparent;color:var(--_muted);font:inherit;font-size:12.5px;font-weight:600;white-space:nowrap;cursor:pointer;transition:background-color .12s ease,color .12s ease}.ith-table-segmented-btn svg{width:13px;height:13px}.ith-table-segmented-btn:hover{color:var(--_accent)}.ith-table-segmented-btn.is-active{background:var(--_accent-soft);color:var(--_accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--_accent) 22%,transparent)}.ith-table-segmented-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--_focus)}.ith-table-popover{position:fixed;z-index:900;width:250px;max-height:380px;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--_border);border-radius:12px;background:var(--_popover-bg);color:var(--_text);box-shadow:var(--_elevation);font-size:13px}.ith-table-popover-header{padding:10px 12px 8px;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--_muted)}.ith-table-popover-list{padding:0 6px 6px;overflow-y:auto;max-height:280px}.ith-table-popover-footer{display:flex;gap:6px;padding:6px;border-top:1px solid var(--_border);background:color-mix(in srgb,var(--_brand) 2%,var(--_bg))}.ith-table-popover-action{flex:1 1 auto;padding:7px 8px;border:0;border-radius:8px;background:transparent;color:var(--_accent);font:inherit;font-size:12.5px;font-weight:600;cursor:pointer}.ith-table-popover-action:hover{background:var(--_accent-soft)}.ith-table-popover-empty{margin:0;padding:10px 12px;color:var(--_muted);font-size:12.5px}.ith-table-columns-item{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:8px;font-size:13px;cursor:pointer;transition:background-color .12s ease}.ith-table-columns-item:hover{background:var(--_hover)}.ith-table-columns-item input:disabled{opacity:.4;cursor:not-allowed}.ith-table-pin-tag{margin-left:auto;padding:1px 7px;border-radius:999px;background:var(--_accent-soft);color:var(--_accent);font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.ith-table-view-item{display:flex;align-items:center;gap:4px;padding-right:4px;border-radius:8px}.ith-table-view-item:hover{background:var(--_hover)}.ith-table-view-item.is-active .ith-table-view-apply{color:var(--_accent);font-weight:650}.ith-table-view-apply{flex:1 1 auto;padding:7px 8px;border:0;background:transparent;color:var(--_text);font:inherit;font-size:13px;text-align:left;cursor:pointer}.ith-table-view-delete{display:grid;place-items:center;width:24px;height:24px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--_muted);cursor:pointer}.ith-table-view-delete svg{width:11px;height:11px}.ith-table-view-delete:hover{background:var(--_accent-soft);color:var(--_accent)}.ith-table-view-save{align-items:center}.ith-table-view-input{flex:1 1 auto;min-width:0;height:30px;padding:0 9px;border:1px solid var(--_input-border);border-radius:8px;background:var(--_input-bg);color:var(--_text);font:inherit;font-size:12.5px}.ith-table-view-input:focus{outline:none;border-color:var(--_accent);box-shadow:0 0 0 3px var(--_focus)}.ith-table-column-menu{width:220px;padding:6px}.ith-table-menu-item{display:block;width:100%;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:var(--_text);font:inherit;font-size:13px;text-align:left;cursor:pointer}.ith-table-menu-item:hover{background:var(--_accent-soft);color:var(--_accent)}.ith-table-menu-divider{height:1px;margin:5px 6px;background:var(--_border)}.ith-table.ith-table-compact{--ith-table-cell-padding: 7px 12px;--_cell-padding: var(--ith-table-compact-padding, 7px 12px);--_font-size: var(--ith-table-compact-font-size, 13px);--_header-font-size: 12.5px;--_row-height: 39px;--_head-height: 39px}.ith-table.ith-table-compact .ith-table-head-row th{padding:10px 12px}.ith-table.ith-table-compact .ith-table-filter-row th{padding:6px 10px}.ith-table-sticky-start,.ith-table-sticky-end{position:sticky;z-index:3;background:var(--_bg)}.ith-table-sticky-start{box-shadow:inset -1px 0 0 var(--_border)}.ith-table-sticky-end{box-shadow:inset 1px 0 0 var(--_border)}.ith-table-striped .ith-table-row:nth-child(2n) .ith-table-sticky-start,.ith-table-striped .ith-table-row:nth-child(2n) .ith-table-sticky-end{background:var(--_striped-bg)}.ith-table-row-selected .ith-table-sticky-start,.ith-table-row-selected .ith-table-sticky-end{background:var(--_selected-bg)}.ith-table-row:hover .ith-table-sticky-start,.ith-table-row:hover .ith-table-sticky-end{background:var(--_hover)}thead .ith-table-sticky-start,thead .ith-table-sticky-end{z-index:7;background:var(--_header-bg)}.ith-table-filter-row .ith-table-sticky-start,.ith-table-filter-row .ith-table-sticky-end{z-index:6;background:var(--_filter-bg)}.ith-table-td:not(.ith-table-sticky-start):not(.ith-table-sticky-end){position:relative}.ith-table-td.ith-table-copyable{padding-inline-end:36px}.ith-table-copy{position:absolute;inset-inline-end:8px;top:50%;display:grid;place-items:center;width:24px;height:24px;padding:0;transform:translateY(-50%);border:1px solid transparent;border-radius:7px;background:var(--_bg);color:var(--_muted);cursor:pointer;opacity:0;pointer-events:none;transition:opacity .12s ease,color .12s ease,border-color .12s ease}.ith-table-copy svg{width:14px;height:14px}.ith-table-td:hover .ith-table-copy,.ith-table-td:focus-within .ith-table-copy,.ith-table-copy.is-copied{opacity:1;pointer-events:auto}.ith-table-copy:hover{border-color:var(--_accent);color:var(--_accent)}.ith-table-copy.is-copied{color:var(--_accent)}.ith-table-td:focus-visible{outline:2px solid var(--_accent);outline-offset:-2px}.ith-table-skeleton{display:block;width:72%;height:12px;border-radius:6px;background:linear-gradient(90deg,var(--_border) 25%,var(--_hover) 37%,var(--_border) 63%);background-size:400% 100%;animation:ith-table-shimmer 1.4s ease infinite}.ith-table-skeleton.is-check{width:16px;height:16px;border-radius:4px;margin:0 auto}@keyframes ith-table-shimmer{0%{background-position:100% 50%}to{background-position:0 50%}}.ith-table-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.ith-table-menu{position:fixed;z-index:1000;min-width:180px;max-width:280px;padding:6px;border:1px solid var(--_border);border-radius:10px;background:var(--_popover-bg);color:var(--_text);box-shadow:var(--_elevation);font-size:13px}@media(prefers-reduced-motion:reduce){.ith-table-skeleton{animation:none}.ith-table-copy,.ith-table-tool-btn{transition:none}}.ith-table-th-inner{display:flex;align-items:center;gap:6px;min-width:0}.ith-table-th-inner>*:first-child{min-width:0}.ith-table-th:not(.ith-table-sticky-start):not(.ith-table-sticky-end){position:relative}.ith-table-th-menu{display:grid;place-items:center;flex:0 0 auto;width:20px;height:20px;padding:0;border:0;border-radius:6px;background:transparent;color:inherit;cursor:pointer;opacity:0;transition:opacity .12s ease,background-color .12s ease}.ith-table-th-menu svg{width:13px;height:13px}.ith-table-th:hover .ith-table-th-menu,.ith-table-th-menu[aria-expanded=true],.ith-table-th-menu:focus-visible{opacity:.85}.ith-table-th-menu:hover{background:color-mix(in srgb,currentColor 20%,transparent);opacity:1}.ith-table-th-menu:focus-visible{outline:2px solid currentColor;outline-offset:1px}.ith-table-resizer{position:absolute;top:0;inset-inline-end:-4px;bottom:0;width:9px;z-index:4;cursor:col-resize;touch-action:none}.ith-table-resizer:after{content:\"\";position:absolute;top:22%;bottom:22%;inset-inline-start:4px;width:2px;border-radius:2px;background:transparent;transition:background-color .12s ease}.ith-table-th:hover .ith-table-resizer:after{background:color-mix(in srgb,currentColor 40%,transparent)}.ith-table-th-dragging{opacity:.5}.ith-table-drop-target{box-shadow:inset 3px 0 0 var(--_accent)}.ith-table-pin-dot{flex:0 0 auto;width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.55}.ith-table-sticky .ith-table-scroll.is-scrolled .ith-table-head-row th{box-shadow:0 1px 0 var(--_border),0 10px 16px -14px #0c0a1e8c}.ith-table-chips{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:10px}.ith-table-chip{display:inline-flex;align-items:center;gap:6px;max-width:260px;padding:3px 4px 3px 9px;border:1px solid color-mix(in srgb,var(--_accent) 24%,transparent);border-radius:999px;background:var(--_accent-soft);color:var(--_accent);font-size:11.5px;font-weight:600}.ith-table-chip-label{font-size:10px;letter-spacing:.04em;text-transform:uppercase;opacity:.7}.ith-table-chip-value{max-width:150px;overflow:hidden;font-weight:500;text-overflow:ellipsis;white-space:nowrap}.ith-table-chip-remove{display:grid;place-items:center;width:18px;height:18px;padding:0;border:0;border-radius:50%;background:color-mix(in srgb,var(--_accent) 16%,transparent);color:inherit;cursor:pointer}.ith-table-chip-remove svg{width:9px;height:9px}.ith-table-chip-remove:hover{background:var(--_accent);color:var(--_on-accent)}.ith-table-chips-clear{padding:3px 8px;border:0;border-radius:999px;background:transparent;color:var(--_muted);font:inherit;font-size:11.5px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.ith-table-chips-clear:hover{color:var(--_accent)}.ith-table-selection-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 16px;border-bottom:1px solid color-mix(in srgb,var(--_accent) 28%,var(--_border));background:var(--_accent-soft);color:var(--_accent);font-size:12.5px}.ith-table-selection-count strong{font-weight:700}.ith-table-selection-spacer{flex:1 1 auto}.ith-table-selection-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.ith-table-selection-btn{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border:1px solid color-mix(in srgb,var(--_accent) 35%,transparent);border-radius:8px;background:var(--_bg);color:var(--_accent);font:inherit;font-size:12px;font-weight:600;cursor:pointer;transition:background-color .12s ease,color .12s ease}.ith-table-selection-btn:hover{background:var(--_accent);color:var(--_on-accent)}.ith-table-selection-btn.is-danger{border-color:color-mix(in srgb,var(--_danger) 40%,transparent);color:var(--_danger)}.ith-table-selection-btn.is-danger:hover{background:var(--_danger);color:#fff}.ith-table-selection-clear{border:0;background:transparent;color:var(--_muted);font:inherit;font-size:12px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.ith-table-selection-clear:hover{color:var(--_accent)}.ith-table-expander-cell{width:38px;padding:0 0 0 10px;text-align:center}th.ith-table-expander-cell{background:var(--_header-bg)}.ith-table-expander{display:grid;place-items:center;width:22px;height:22px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--_muted);cursor:pointer;transition:transform .15s ease,color .12s ease,background-color .12s ease}.ith-table-expander svg{width:13px;height:13px}.ith-table-expander:hover{background:var(--_accent-soft);color:var(--_accent)}.ith-table-expander.is-open{transform:rotate(90deg);color:var(--_accent)}.ith-table-detail-row>td{padding:14px 16px;border-bottom:1px solid var(--_border);background:var(--_striped-bg);white-space:normal}.ith-table-total-cell{padding:var(--_cell-padding);border-top:1px solid var(--_border);background:var(--_filter-bg);font-size:12px;white-space:nowrap}.ith-table-total-row .ith-table-select-cell,.ith-table-total-row .ith-table-expander-cell{border-top:1px solid var(--_border);background:var(--_filter-bg)}.ith-table-total-label{margin-inline-end:6px;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--_muted)}.ith-table-total-value{font-weight:650;color:var(--_text)}@media(prefers-reduced-motion:reduce){.ith-table-expander,.ith-table-th-menu,.ith-table-selection-btn{transition:none}}.ith-table-export-menu{width:236px;padding:6px}.ith-table-export-name{display:block;font-weight:650}.ith-table-export-hint{display:block;margin-top:2px;font-size:11px;font-weight:500;color:var(--_muted)}.ith-table-menu-item:hover .ith-table-export-hint{color:inherit;opacity:.75}:host-context([data-theme=\"dark\"]) .ith-table,:host-context(.dark) .ith-table{box-shadow:var(--_shadow),inset 0 0 0 1px color-mix(in srgb,#ffffff 6%,transparent)}@media(prefers-color-scheme:dark){:host-context([data-theme=\"auto\"]) .ith-table{box-shadow:var(--_shadow),inset 0 0 0 1px color-mix(in srgb,#ffffff 6%,transparent)}}:host-context([data-theme=\"dark\"]) .ith-table-td,:host-context(.dark) .ith-table-td,:host-context([data-theme=\"dark\"]) .ith-table-actions-cell,:host-context(.dark) .ith-table-actions-cell{border-color:color-mix(in srgb,var(--_border) 78%,#ffffff)}:host-context([data-theme=\"dark\"]) .ith-table-row.ith-table-row-selected td:first-child,:host-context(.dark) .ith-table-row.ith-table-row-selected td:first-child{box-shadow:inset 3px 0 0 var(--_accent)}:host-context([data-theme=\"dark\"]) .ith-table-sort-icons,:host-context(.dark) .ith-table-sort-icons{opacity:.65}\n"] }]
1959
+ }], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], keyField: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyField", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], countSuffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "countSuffix", required: false }] }], totalLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalLabel", required: false }] }], showToolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToolbar", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], showFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFilters", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], filterAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterAllLabel", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], sort: [{ type: i0.Input, args: [{ isSignal: true, alias: "sort", required: false }] }, { type: i0.Output, args: ["sortChange"] }], sortable: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortable", required: false }] }], search: [{ type: i0.Input, args: [{ isSignal: true, alias: "search", required: false }] }, { type: i0.Output, args: ["searchChange"] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], showPagination: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPagination", required: false }] }], showPageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPageSize", required: false }] }], showFirstLast: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFirstLast", required: false }] }], maxPageButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxPageButtons", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], showFilterChips: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFilterChips", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], selectAllScope: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllScope", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], selectOnRowClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOnRowClick", required: false }] }], selectionActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionActions", required: false }] }], rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], actionsHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsHeader", required: false }] }], actionsWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsWidth", required: false }] }], rowClickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowClickable", required: false }] }], rowClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowClass", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingText", required: false }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], hoverable: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverable", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], dense: [{ type: i0.Input, args: [{ isSignal: true, alias: "dense", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], copyable: [{ type: i0.Input, args: [{ isSignal: true, alias: "copyable", required: false }] }], showColumnPicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "showColumnPicker", required: false }] }], showDensityToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDensityToggle", required: false }] }], showColumnMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "showColumnMenu", required: false }] }], showExport: [{ type: i0.Input, args: [{ isSignal: true, alias: "showExport", required: false }] }], exportFileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportFileName", required: false }] }], showViews: [{ type: i0.Input, args: [{ isSignal: true, alias: "showViews", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], reorderable: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderable", required: false }] }], keyboardNavigation: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyboardNavigation", required: false }] }], storageKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "storageKey", required: false }] }], skeletonRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonRows", required: false }] }], minRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "minRows", required: false }] }], stickySelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickySelection", required: false }] }], stickyActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyActions", required: false }] }], rowDetailTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowDetailTrigger", required: false }] }], actionClick: [{ type: i0.Output, args: ["actionClick"] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], cellCopy: [{ type: i0.Output, args: ["cellCopy"] }], rowContextMenu: [{ type: i0.Output, args: ["rowContextMenu"] }], columnsChange: [{ type: i0.Output, args: ["columnsChange"] }], densityChange: [{ type: i0.Output, args: ["densityChange"] }], columnStateChange: [{ type: i0.Output, args: ["columnStateChange"] }], selectionAction: [{ type: i0.Output, args: ["selectionAction"] }], csvExport: [{ type: i0.Output, args: ["csvExport"] }], exportFile: [{ type: i0.Output, args: ["exportFile"] }], cellDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableCellDirective), { ...{ descendants: true }, isSignal: true }] }], headerDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableHeaderDirective), { ...{ descendants: true }, isSignal: true }] }], filterDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableFilterDirective), { ...{ descendants: true }, isSignal: true }] }], rowActionsDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableRowActionsDirective), { ...{
996
1960
  descendants: true,
997
1961
  }, isSignal: true }] }], toolbarDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableToolbarDirective), { ...{ descendants: true }, isSignal: true }] }], footerDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableFooterDirective), { ...{ descendants: true }, isSignal: true }] }], emptyDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableEmptyDirective), { ...{ descendants: true }, isSignal: true }] }], rowMenuDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableRowMenuDirective), { ...{
998
1962
  descendants: true,
999
- }, isSignal: true }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }, { type: i0.Output, args: ["filtersChange"] }], onDocumentClick: [{
1963
+ }, isSignal: true }] }], rowDetailDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableRowDetailDirective), { ...{
1964
+ descendants: true,
1965
+ }, isSignal: true }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }, { type: i0.Output, args: ["filtersChange"] }], onDocumentPointerMove: [{
1966
+ type: HostListener,
1967
+ args: ['document:pointermove', ['$event']]
1968
+ }], onDocumentPointerUp: [{
1969
+ type: HostListener,
1970
+ args: ['document:pointerup']
1971
+ }], onDocumentClick: [{
1000
1972
  type: HostListener,
1001
1973
  args: ['document:click']
1002
1974
  }], onDocumentEscape: [{
@@ -1012,5 +1984,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.34", ngImpo
1012
1984
  * Generated bundle index. Do not edit.
1013
1985
  */
1014
1986
 
1015
- export { TableCellDirective, TableComponent, TableEmptyDirective, TableFilterDirective, TableFooterDirective, TableHeaderDirective, TableRowActionsDirective, TableRowMenuDirective, TableToolbarDirective, buildPageWindow, compareWithDirection, defaultCompare, getPathValue, isInteractiveTarget, toDisplay };
1987
+ export { TableCellDirective, TableComponent, TableEmptyDirective, TableFilterDirective, TableFooterDirective, TableHeaderDirective, TableRowActionsDirective, TableRowDetailDirective, TableRowMenuDirective, TableToolbarDirective, buildPageWindow, buildXlsxBlob, compareWithDirection, defaultCompare, getPathValue, isInteractiveTarget, toDisplay };
1016
1988
  //# sourceMappingURL=ithouse-bd-ngx-table.mjs.map