@ithouse-bd/ngx-table 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +93 -0
- package/DOCUMENTATION.md +176 -3
- package/README.md +72 -6
- package/THEMING.md +2 -0
- package/fesm2022/ithouse-bd-ngx-table.mjs +1108 -78
- package/fesm2022/ithouse-bd-ngx-table.mjs.map +1 -1
- package/index.d.ts +302 -12
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -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, '&')
|
|
306
|
+
.replace(/</g, '<')
|
|
307
|
+
.replace(/>/g, '>')
|
|
308
|
+
.replace(/"/g, '"')
|
|
309
|
+
.replace(/'/g, ''');
|
|
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,73 @@ 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
|
+
/**
|
|
634
|
+
* Runtime pinning, keyed by column key. A `null` value records an explicit unpin so
|
|
635
|
+
* a column that declares `sticky` in its definition can still be unpinned at runtime.
|
|
636
|
+
*/
|
|
637
|
+
pinnedKeys = signal({}, ...(ngDevMode ? [{ debugName: "pinnedKeys" }] : []));
|
|
638
|
+
/** Measured header widths, used to offset stacked sticky columns. */
|
|
639
|
+
measuredWidths = signal({}, ...(ngDevMode ? [{ debugName: "measuredWidths" }] : []));
|
|
640
|
+
/** Saved named views. */
|
|
641
|
+
views = signal({}, ...(ngDevMode ? [{ debugName: "views" }] : []));
|
|
642
|
+
activeView = signal(null, ...(ngDevMode ? [{ debugName: "activeView" }] : []));
|
|
369
643
|
compact = computed(() => this.dense() || this.density() === 'compact', ...(ngDevMode ? [{ debugName: "compact" }] : []));
|
|
370
644
|
columnPickerOpen = signal(false, ...(ngDevMode ? [{ debugName: "columnPickerOpen" }] : []));
|
|
645
|
+
columnsMenuPos = signal(null, ...(ngDevMode ? [{ debugName: "columnsMenuPos" }] : []));
|
|
646
|
+
viewsOpen = signal(false, ...(ngDevMode ? [{ debugName: "viewsOpen" }] : []));
|
|
647
|
+
viewsMenuPos = signal(null, ...(ngDevMode ? [{ debugName: "viewsMenuPos" }] : []));
|
|
648
|
+
/** Export-format menu; `null` when closed. */
|
|
649
|
+
exportMenuPos = signal(null, ...(ngDevMode ? [{ debugName: "exportMenuPos" }] : []));
|
|
650
|
+
viewNameDraft = signal('', ...(ngDevMode ? [{ debugName: "viewNameDraft" }] : []));
|
|
651
|
+
/** Header menu state; `null` when closed. */
|
|
652
|
+
columnMenu = signal(null, ...(ngDevMode ? [{ debugName: "columnMenu" }] : []));
|
|
371
653
|
/** Right-click menu position; `null` when closed. */
|
|
372
654
|
menuState = signal(null, ...(ngDevMode ? [{ debugName: "menuState" }] : []));
|
|
373
655
|
/** `${rowIndex}:${columnKey}` of the cell that was just copied (shows a check icon). */
|
|
374
656
|
copiedCell = signal(null, ...(ngDevMode ? [{ debugName: "copiedCell" }] : []));
|
|
375
|
-
|
|
657
|
+
/** Row keys whose detail panel is open. */
|
|
658
|
+
expandedKeys = signal(new Set(), ...(ngDevMode ? [{ debugName: "expandedKeys" }] : []));
|
|
659
|
+
/** Cell that owns the single tab stop of the grid. */
|
|
660
|
+
focusedCell = signal(null, ...(ngDevMode ? [{ debugName: "focusedCell" }] : []));
|
|
661
|
+
/** Column key being dragged, and the header it hovers. */
|
|
662
|
+
dragKey = signal(null, ...(ngDevMode ? [{ debugName: "dragKey" }] : []));
|
|
663
|
+
dragOverKey = signal(null, ...(ngDevMode ? [{ debugName: "dragOverKey" }] : []));
|
|
664
|
+
/** `true` once the scroll container is scrolled away from the top. */
|
|
665
|
+
scrolled = signal(false, ...(ngDevMode ? [{ debugName: "scrolled" }] : []));
|
|
666
|
+
resizing = null;
|
|
376
667
|
copyTimer;
|
|
668
|
+
measureHandle;
|
|
669
|
+
/** `storageKey` whose preset was already loaded (or `''` when none is used). */
|
|
670
|
+
presetKey = null;
|
|
671
|
+
skeletonIndexes = computed(() => Array.from({ length: Math.max(0, this.skeletonRows()) }, (_, index) => index), ...(ngDevMode ? [{ debugName: "skeletonIndexes" }] : []));
|
|
377
672
|
constructor() {
|
|
378
|
-
|
|
379
|
-
//
|
|
673
|
+
// Restore the stored preset once, then persist every later change. Restoring must
|
|
674
|
+
// happen here (not in the constructor body) because `storageKey` is an input and is
|
|
675
|
+
// still empty until the host has bound it.
|
|
380
676
|
effect(() => {
|
|
381
|
-
const
|
|
382
|
-
|
|
677
|
+
const key = this.storageKey();
|
|
678
|
+
void this.state();
|
|
679
|
+
void this.views();
|
|
680
|
+
void this.activeView();
|
|
681
|
+
untracked(() => {
|
|
682
|
+
// Load once per storage key. Keying the restore (instead of a one-shot flag) also
|
|
683
|
+
// covers a `storageKey` that is only bound after the first change detection.
|
|
684
|
+
if (key !== this.presetKey) {
|
|
685
|
+
this.presetKey = key;
|
|
686
|
+
const stored = key ? this.readPreset(key) : null;
|
|
687
|
+
if (stored) {
|
|
688
|
+
this.views.set(stored.views ?? {});
|
|
689
|
+
this.activeView.set(stored.activeView ?? null);
|
|
690
|
+
this.applyState(stored.state);
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
this.persistPreset(key);
|
|
695
|
+
});
|
|
383
696
|
});
|
|
384
697
|
// In client mode any change to the query starts again from the first page. In server
|
|
385
698
|
// mode the consumer owns the page (and fetches on every `pageChange`), so resetting
|
|
@@ -406,17 +719,39 @@ class TableComponent {
|
|
|
406
719
|
else if (current < 1)
|
|
407
720
|
untracked(() => this.page.set(1));
|
|
408
721
|
});
|
|
722
|
+
// Sticky columns stack on measured widths, so re-measure after layout changes.
|
|
723
|
+
effect(() => {
|
|
724
|
+
this.pagedRows();
|
|
725
|
+
this.visibleColumns();
|
|
726
|
+
this.compact();
|
|
727
|
+
this.density();
|
|
728
|
+
untracked(() => this.scheduleMeasure());
|
|
729
|
+
});
|
|
730
|
+
afterNextRender(() => this.scheduleMeasure());
|
|
409
731
|
}
|
|
410
732
|
/* ---------------------------------------------------------------- */
|
|
411
733
|
/* Derived data */
|
|
412
734
|
/* ---------------------------------------------------------------- */
|
|
413
735
|
isServer = computed(() => this.mode() === 'server', ...(ngDevMode ? [{ debugName: "isServer" }] : []));
|
|
736
|
+
/** Columns in the user's order (hidden columns keep their slot in the list). */
|
|
737
|
+
orderedColumns = computed(() => {
|
|
738
|
+
const columns = this.columns();
|
|
739
|
+
const order = this.columnOrder();
|
|
740
|
+
if (!order.length)
|
|
741
|
+
return columns;
|
|
742
|
+
const indexOf = new Map(order.map((key, index) => [key, index]));
|
|
743
|
+
return [...columns].sort((a, b) => (indexOf.get(a.key) ?? Number.MAX_SAFE_INTEGER) -
|
|
744
|
+
(indexOf.get(b.key) ?? Number.MAX_SAFE_INTEGER));
|
|
745
|
+
}, ...(ngDevMode ? [{ debugName: "orderedColumns" }] : []));
|
|
414
746
|
visibleColumns = computed(() => {
|
|
415
747
|
const hidden = this.hiddenColumnKeys();
|
|
416
|
-
return this.
|
|
748
|
+
return this.orderedColumns().filter((column) => !column.hidden && !hidden.has(column.key));
|
|
417
749
|
}, ...(ngDevMode ? [{ debugName: "visibleColumns" }] : []));
|
|
418
750
|
selectable = computed(() => this.selectionMode() !== 'none', ...(ngDevMode ? [{ debugName: "selectable" }] : []));
|
|
419
751
|
hasActionsColumn = computed(() => this.rowActions().length > 0 || !!this.rowActionsTemplate(), ...(ngDevMode ? [{ debugName: "hasActionsColumn" }] : []));
|
|
752
|
+
hasRowDetail = computed(() => !!this.rowDetailTemplate() && this.rowDetailTrigger() !== 'none', ...(ngDevMode ? [{ debugName: "hasRowDetail" }] : []));
|
|
753
|
+
/** Expander cell rendered as the first cell of every row. */
|
|
754
|
+
hasExpander = computed(() => this.hasRowDetail() && this.rowDetailTrigger() === 'button', ...(ngDevMode ? [{ debugName: "hasExpander" }] : []));
|
|
420
755
|
/** Rows that match the global search and the per-column filters (client mode). */
|
|
421
756
|
matchingRows = computed(() => {
|
|
422
757
|
const rows = this.data();
|
|
@@ -475,9 +810,44 @@ class TableComponent {
|
|
|
475
810
|
}, ...(ngDevMode ? [{ debugName: "allPageSelected" }] : []));
|
|
476
811
|
somePageSelected = computed(() => !this.allPageSelected() &&
|
|
477
812
|
this.pagedRows().some((row) => this.selectedKeySet().has(this.rowKey(row))), ...(ngDevMode ? [{ debugName: "somePageSelected" }] : []));
|
|
478
|
-
emptyColspan = computed(() => Math.max(1, this.visibleColumns().length +
|
|
813
|
+
emptyColspan = computed(() => Math.max(1, this.visibleColumns().length +
|
|
814
|
+
(this.selectable() ? 1 : 0) +
|
|
815
|
+
(this.hasActionsColumn() ? 1 : 0) +
|
|
816
|
+
(this.hasExpander() ? 1 : 0)), ...(ngDevMode ? [{ debugName: "emptyColspan" }] : []));
|
|
479
817
|
hasQuery = computed(() => this.search().trim() !== '' ||
|
|
480
818
|
Object.values(this.filters()).some((value) => value.trim() !== ''), ...(ngDevMode ? [{ debugName: "hasQuery" }] : []));
|
|
819
|
+
/** Removable chips for the active search term and filters. */
|
|
820
|
+
filterChips = computed(() => {
|
|
821
|
+
const chips = [];
|
|
822
|
+
const term = this.search().trim();
|
|
823
|
+
if (term) {
|
|
824
|
+
chips.push({ kind: 'search', key: '__search', label: 'Search', value: term });
|
|
825
|
+
}
|
|
826
|
+
for (const [key, value] of Object.entries(this.filters())) {
|
|
827
|
+
if (!value.trim())
|
|
828
|
+
continue;
|
|
829
|
+
const column = this.columns().find((candidate) => candidate.key === key);
|
|
830
|
+
const option = this.filterOptionsFor(column ?? { key }).find((candidate) => String(candidate.value) === value);
|
|
831
|
+
chips.push({
|
|
832
|
+
kind: 'filter',
|
|
833
|
+
key,
|
|
834
|
+
label: column?.header ?? key,
|
|
835
|
+
value: option?.label ?? value,
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
return chips;
|
|
839
|
+
}, ...(ngDevMode ? [{ debugName: "filterChips" }] : []));
|
|
840
|
+
/** Columns that declare a footer aggregate. */
|
|
841
|
+
hasAggregates = computed(() => this.visibleColumns().some((column) => !!column.aggregate), ...(ngDevMode ? [{ debugName: "hasAggregates" }] : []));
|
|
842
|
+
/** Full user layout, the shape that `storageKey` stores. */
|
|
843
|
+
state = computed(() => ({
|
|
844
|
+
hidden: [...this.hiddenColumnKeys()],
|
|
845
|
+
density: this.density(),
|
|
846
|
+
order: this.columnOrder(),
|
|
847
|
+
widths: this.columnWidths(),
|
|
848
|
+
pinned: this.pinnedKeys(),
|
|
849
|
+
}), ...(ngDevMode ? [{ debugName: "state" }] : []));
|
|
850
|
+
savedViewNames = computed(() => Object.keys(this.views()).sort(), ...(ngDevMode ? [{ debugName: "savedViewNames" }] : []));
|
|
481
851
|
/* ---------------------------------------------------------------- */
|
|
482
852
|
/* Sorting API */
|
|
483
853
|
/* ---------------------------------------------------------------- */
|
|
@@ -557,6 +927,17 @@ class TableComponent {
|
|
|
557
927
|
this.search.set('');
|
|
558
928
|
this.clearFilters();
|
|
559
929
|
}
|
|
930
|
+
/** Remove one chip from the chip row. */
|
|
931
|
+
removeChip(chip) {
|
|
932
|
+
if (chip.kind === 'search') {
|
|
933
|
+
this.clearSearch();
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
936
|
+
const next = { ...this.filters() };
|
|
937
|
+
delete next[chip.key];
|
|
938
|
+
this.filters.set(next);
|
|
939
|
+
this.filterChange.emit(next);
|
|
940
|
+
}
|
|
560
941
|
/* ---------------------------------------------------------------- */
|
|
561
942
|
/* Pagination API */
|
|
562
943
|
/* ---------------------------------------------------------------- */
|
|
@@ -646,6 +1027,11 @@ class TableComponent {
|
|
|
646
1027
|
deselectRow(row) {
|
|
647
1028
|
this.toggleRow(row, false);
|
|
648
1029
|
}
|
|
1030
|
+
/** Click on a selection-bar action. */
|
|
1031
|
+
onSelectionAction(action, event) {
|
|
1032
|
+
event.stopPropagation();
|
|
1033
|
+
this.selectionAction.emit({ action, rows: this.selected() });
|
|
1034
|
+
}
|
|
649
1035
|
/* ---------------------------------------------------------------- */
|
|
650
1036
|
/* Row actions */
|
|
651
1037
|
/* ---------------------------------------------------------------- */
|
|
@@ -673,17 +1059,48 @@ class TableComponent {
|
|
|
673
1059
|
return;
|
|
674
1060
|
if (isInteractiveTarget(event.target))
|
|
675
1061
|
return;
|
|
676
|
-
if (!this.rowClickable() && !this.selectOnRowClick())
|
|
1062
|
+
if (!this.rowClickable() && !this.selectOnRowClick() && !this.togglesDetailOnRow())
|
|
677
1063
|
return;
|
|
678
1064
|
event.preventDefault();
|
|
679
1065
|
this.activateRow(row, index, event);
|
|
680
1066
|
}
|
|
681
1067
|
/** Shared by mouse and keyboard activation. */
|
|
682
1068
|
activateRow(row, index, event) {
|
|
683
|
-
this.
|
|
1069
|
+
if (this.rowClickable())
|
|
1070
|
+
this.rowClick.emit({ row, index, event });
|
|
684
1071
|
if (this.selectOnRowClick() && this.selectable()) {
|
|
685
1072
|
this.toggleRow(row, !this.isSelected(row));
|
|
686
1073
|
}
|
|
1074
|
+
if (this.togglesDetailOnRow())
|
|
1075
|
+
this.toggleRowDetail(row);
|
|
1076
|
+
}
|
|
1077
|
+
togglesDetailOnRow() {
|
|
1078
|
+
return this.hasRowDetail() && this.rowDetailTrigger() === 'row';
|
|
1079
|
+
}
|
|
1080
|
+
/* ---------------------------------------------------------------- */
|
|
1081
|
+
/* Row detail */
|
|
1082
|
+
/* ---------------------------------------------------------------- */
|
|
1083
|
+
isRowExpanded(row) {
|
|
1084
|
+
return this.expandedKeys().has(String(this.rowKey(row)));
|
|
1085
|
+
}
|
|
1086
|
+
toggleRowDetail(row, event) {
|
|
1087
|
+
event?.stopPropagation();
|
|
1088
|
+
const key = String(this.rowKey(row));
|
|
1089
|
+
const next = new Set(this.expandedKeys());
|
|
1090
|
+
if (next.has(key))
|
|
1091
|
+
next.delete(key);
|
|
1092
|
+
else
|
|
1093
|
+
next.add(key);
|
|
1094
|
+
this.expandedKeys.set(next);
|
|
1095
|
+
}
|
|
1096
|
+
/** `close` callback handed to the `#ithTableRowDetail` template. */
|
|
1097
|
+
rowDetailContext(row, index) {
|
|
1098
|
+
return {
|
|
1099
|
+
$implicit: row,
|
|
1100
|
+
row,
|
|
1101
|
+
index,
|
|
1102
|
+
close: () => this.toggleRowDetail(row),
|
|
1103
|
+
};
|
|
687
1104
|
}
|
|
688
1105
|
/* ---------------------------------------------------------------- */
|
|
689
1106
|
/* Rendering helpers */
|
|
@@ -720,7 +1137,11 @@ class TableComponent {
|
|
|
720
1137
|
}
|
|
721
1138
|
/** Flat class list for a header cell (NgClass rejects nested arrays). */
|
|
722
1139
|
headerClasses(column) {
|
|
723
|
-
return [
|
|
1140
|
+
return [
|
|
1141
|
+
...this.headerClassFor(column),
|
|
1142
|
+
this.stickyClassFor(column),
|
|
1143
|
+
this.dragOverKey() === column.key ? 'ith-table-drop-target' : '',
|
|
1144
|
+
].filter((value) => !!value);
|
|
724
1145
|
}
|
|
725
1146
|
filterClasses(column) {
|
|
726
1147
|
return [this.alignClass(column), this.stickyClassFor(column)].filter((value) => !!value);
|
|
@@ -733,42 +1154,84 @@ class TableComponent {
|
|
|
733
1154
|
}
|
|
734
1155
|
columnStyle(column) {
|
|
735
1156
|
const style = {};
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
style['min-width'] =
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
1157
|
+
const width = this.columnWidths()[column.key];
|
|
1158
|
+
if (width) {
|
|
1159
|
+
style['width'] = `${width}px`;
|
|
1160
|
+
style['min-width'] = `${width}px`;
|
|
1161
|
+
style['max-width'] = `${width}px`;
|
|
1162
|
+
}
|
|
1163
|
+
else {
|
|
1164
|
+
if (column.width)
|
|
1165
|
+
style['width'] = column.width;
|
|
1166
|
+
if (column.minWidth)
|
|
1167
|
+
style['min-width'] = column.minWidth;
|
|
1168
|
+
}
|
|
1169
|
+
const pin = this.pinOf(column);
|
|
1170
|
+
if (pin) {
|
|
1171
|
+
const offset = this.stickyOffsets().get(column.key);
|
|
1172
|
+
if (pin === 'start')
|
|
1173
|
+
style['left'] = `${offset ?? 0}px`;
|
|
1174
|
+
else
|
|
1175
|
+
style['right'] = `${offset ?? 0}px`;
|
|
1176
|
+
}
|
|
744
1177
|
return style;
|
|
745
1178
|
}
|
|
1179
|
+
/** Runtime pin, falling back to the declared `column.sticky`. */
|
|
1180
|
+
pinOf(column) {
|
|
1181
|
+
const pinned = this.pinnedKeys();
|
|
1182
|
+
// `in` (not `??`) so a stored `null` really unpins a column that declares `sticky`.
|
|
1183
|
+
if (column.key in pinned)
|
|
1184
|
+
return pinned[column.key];
|
|
1185
|
+
return column.sticky ?? null;
|
|
1186
|
+
}
|
|
746
1187
|
stickyClassFor(column) {
|
|
747
|
-
|
|
1188
|
+
const pin = this.pinOf(column);
|
|
1189
|
+
if (pin === 'start')
|
|
748
1190
|
return 'ith-table-sticky-start';
|
|
749
|
-
if (
|
|
1191
|
+
if (pin === 'end')
|
|
750
1192
|
return 'ith-table-sticky-end';
|
|
751
1193
|
return '';
|
|
752
1194
|
}
|
|
1195
|
+
/**
|
|
1196
|
+
* Left/right offsets for stacked sticky columns. Depends on measured widths, so it
|
|
1197
|
+
* stays correct for auto-sized and resized columns.
|
|
1198
|
+
*/
|
|
1199
|
+
stickyOffsets = computed(() => {
|
|
1200
|
+
const offsets = new Map();
|
|
1201
|
+
const measured = this.measuredWidths();
|
|
1202
|
+
const declared = this.columnWidths();
|
|
1203
|
+
const widthOf = (column) => declared[column.key] ?? measured[column.key] ?? this.declaredWidthPx(column);
|
|
1204
|
+
let start = this.selectable() && this.stickySelection() ? 46 : 0;
|
|
1205
|
+
for (const column of this.visibleColumns()) {
|
|
1206
|
+
if (this.pinOf(column) !== 'start')
|
|
1207
|
+
continue;
|
|
1208
|
+
offsets.set(column.key, start);
|
|
1209
|
+
start += widthOf(column);
|
|
1210
|
+
}
|
|
1211
|
+
let end = this.hasActionsColumn() && this.stickyActions() ? this.actionsWidthPx() : 0;
|
|
1212
|
+
for (const column of [...this.visibleColumns()].reverse()) {
|
|
1213
|
+
if (this.pinOf(column) !== 'end')
|
|
1214
|
+
continue;
|
|
1215
|
+
offsets.set(column.key, end);
|
|
1216
|
+
end += widthOf(column);
|
|
1217
|
+
}
|
|
1218
|
+
return offsets;
|
|
1219
|
+
}, ...(ngDevMode ? [{ debugName: "stickyOffsets" }] : []));
|
|
753
1220
|
/** Full text for the native tooltip; `null` disables it for a column. */
|
|
754
1221
|
tooltipText(row, column, index) {
|
|
755
1222
|
if (column.tooltip === false)
|
|
756
1223
|
return null;
|
|
757
1224
|
return this.cellText(row, column, index) || null;
|
|
758
1225
|
}
|
|
759
|
-
|
|
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) {
|
|
1226
|
+
declaredWidthPx(column) {
|
|
770
1227
|
const width = column.width ?? '';
|
|
771
|
-
|
|
1228
|
+
if (width.endsWith('px'))
|
|
1229
|
+
return Number.parseFloat(width) || DEFAULT_COLUMN_WIDTH;
|
|
1230
|
+
return DEFAULT_COLUMN_WIDTH;
|
|
1231
|
+
}
|
|
1232
|
+
actionsWidthPx() {
|
|
1233
|
+
const width = this.actionsWidth();
|
|
1234
|
+
return width.endsWith('px') ? Number.parseFloat(width) || 120 : 120;
|
|
772
1235
|
}
|
|
773
1236
|
/* ---------------------------------------------------------------- */
|
|
774
1237
|
/* Copy / context menu */
|
|
@@ -790,17 +1253,6 @@ class TableComponent {
|
|
|
790
1253
|
isCellCopied(index, column) {
|
|
791
1254
|
return this.copiedCell() === `${index}:${column.key}`;
|
|
792
1255
|
}
|
|
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
1256
|
onRowContextMenu(row, index, event) {
|
|
805
1257
|
this.rowContextMenu.emit({ row, index, x: event.clientX, y: event.clientY, event });
|
|
806
1258
|
if (!this.rowMenuTemplate())
|
|
@@ -826,6 +1278,105 @@ class TableComponent {
|
|
|
826
1278
|
this.menuState.set(null);
|
|
827
1279
|
}
|
|
828
1280
|
/* ---------------------------------------------------------------- */
|
|
1281
|
+
/* Keyboard grid navigation */
|
|
1282
|
+
/* ---------------------------------------------------------------- */
|
|
1283
|
+
/** `tabindex` of a body cell: one tab stop for the whole grid. */
|
|
1284
|
+
cellTabIndex(rowIndex, colIndex) {
|
|
1285
|
+
if (!this.keyboardNavigation())
|
|
1286
|
+
return this.copyable() ? 0 : null;
|
|
1287
|
+
const focused = this.focusedCell();
|
|
1288
|
+
if (!focused)
|
|
1289
|
+
return rowIndex === 0 && colIndex === 0 ? 0 : -1;
|
|
1290
|
+
return focused.row === rowIndex && focused.col === colIndex ? 0 : -1;
|
|
1291
|
+
}
|
|
1292
|
+
onCellFocus(rowIndex, colIndex) {
|
|
1293
|
+
const current = this.focusedCell();
|
|
1294
|
+
if (current && current.row === rowIndex && current.col === colIndex)
|
|
1295
|
+
return;
|
|
1296
|
+
this.focusedCell.set({ row: rowIndex, col: colIndex });
|
|
1297
|
+
}
|
|
1298
|
+
/** Copy shortcut plus arrow/Home/End/Page navigation for the cell grid. */
|
|
1299
|
+
onCellKeydown(column, rowIndex, colIndex, event) {
|
|
1300
|
+
if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'c') {
|
|
1301
|
+
if (!this.copyable() || isInteractiveTarget(event.target))
|
|
1302
|
+
return;
|
|
1303
|
+
event.preventDefault();
|
|
1304
|
+
const row = this.pagedRows()[rowIndex];
|
|
1305
|
+
if (row)
|
|
1306
|
+
this.copyCell(row, column, rowIndex);
|
|
1307
|
+
return;
|
|
1308
|
+
}
|
|
1309
|
+
if (!this.keyboardNavigation() || event.altKey)
|
|
1310
|
+
return;
|
|
1311
|
+
const rows = this.pagedRows().length;
|
|
1312
|
+
const cols = this.visibleColumns().length;
|
|
1313
|
+
if (!rows || !cols)
|
|
1314
|
+
return;
|
|
1315
|
+
const lastRow = rows - 1;
|
|
1316
|
+
const lastCol = cols - 1;
|
|
1317
|
+
let row = rowIndex;
|
|
1318
|
+
let col = colIndex;
|
|
1319
|
+
switch (event.key) {
|
|
1320
|
+
case 'ArrowUp':
|
|
1321
|
+
row = Math.max(0, rowIndex - 1);
|
|
1322
|
+
break;
|
|
1323
|
+
case 'ArrowDown':
|
|
1324
|
+
row = Math.min(lastRow, rowIndex + 1);
|
|
1325
|
+
break;
|
|
1326
|
+
case 'ArrowLeft':
|
|
1327
|
+
col = Math.max(0, colIndex - 1);
|
|
1328
|
+
break;
|
|
1329
|
+
case 'ArrowRight':
|
|
1330
|
+
col = Math.min(lastCol, colIndex + 1);
|
|
1331
|
+
break;
|
|
1332
|
+
case 'Home':
|
|
1333
|
+
if (event.ctrlKey || event.metaKey) {
|
|
1334
|
+
row = 0;
|
|
1335
|
+
col = 0;
|
|
1336
|
+
}
|
|
1337
|
+
else {
|
|
1338
|
+
col = 0;
|
|
1339
|
+
}
|
|
1340
|
+
break;
|
|
1341
|
+
case 'End':
|
|
1342
|
+
if (event.ctrlKey || event.metaKey) {
|
|
1343
|
+
row = lastRow;
|
|
1344
|
+
col = lastCol;
|
|
1345
|
+
}
|
|
1346
|
+
else {
|
|
1347
|
+
col = lastCol;
|
|
1348
|
+
}
|
|
1349
|
+
break;
|
|
1350
|
+
case 'PageUp':
|
|
1351
|
+
row = Math.max(0, rowIndex - this.pageSize());
|
|
1352
|
+
break;
|
|
1353
|
+
case 'PageDown':
|
|
1354
|
+
row = Math.min(lastRow, rowIndex + this.pageSize());
|
|
1355
|
+
break;
|
|
1356
|
+
case ' ':
|
|
1357
|
+
case 'Spacebar': {
|
|
1358
|
+
const target = this.pagedRows()[rowIndex];
|
|
1359
|
+
if (!target || !this.selectable() || isInteractiveTarget(event.target))
|
|
1360
|
+
return;
|
|
1361
|
+
event.preventDefault();
|
|
1362
|
+
this.toggleRow(target, !this.isSelected(target));
|
|
1363
|
+
return;
|
|
1364
|
+
}
|
|
1365
|
+
default:
|
|
1366
|
+
return;
|
|
1367
|
+
}
|
|
1368
|
+
event.preventDefault();
|
|
1369
|
+
if (row === rowIndex && col === colIndex)
|
|
1370
|
+
return;
|
|
1371
|
+
this.focusCell(row, col);
|
|
1372
|
+
}
|
|
1373
|
+
/** Move DOM focus to a cell, updating the single tab stop. */
|
|
1374
|
+
focusCell(row, col) {
|
|
1375
|
+
this.focusedCell.set({ row, col });
|
|
1376
|
+
const target = this.host.nativeElement.querySelector(`[data-cell="${row}-${col}"]`);
|
|
1377
|
+
target?.focus();
|
|
1378
|
+
}
|
|
1379
|
+
/* ---------------------------------------------------------------- */
|
|
829
1380
|
/* Column preset / density */
|
|
830
1381
|
/* ---------------------------------------------------------------- */
|
|
831
1382
|
isColumnVisible(column) {
|
|
@@ -835,6 +1386,8 @@ class TableComponent {
|
|
|
835
1386
|
const next = new Set(this.hiddenColumnKeys());
|
|
836
1387
|
if (visible)
|
|
837
1388
|
next.delete(key);
|
|
1389
|
+
else if (!this.canHide(key))
|
|
1390
|
+
return;
|
|
838
1391
|
else
|
|
839
1392
|
next.add(key);
|
|
840
1393
|
// Never hide every column: keep at least one visible.
|
|
@@ -842,56 +1395,526 @@ class TableComponent {
|
|
|
842
1395
|
if (visibleCount === 0)
|
|
843
1396
|
return;
|
|
844
1397
|
this.hiddenColumnKeys.set(next);
|
|
845
|
-
this.
|
|
1398
|
+
this.emitColumns();
|
|
846
1399
|
}
|
|
847
1400
|
resetColumns() {
|
|
848
1401
|
this.hiddenColumnKeys.set(new Set());
|
|
1402
|
+
this.columnOrder.set([]);
|
|
1403
|
+
this.columnWidths.set({});
|
|
1404
|
+
this.pinnedKeys.set({});
|
|
1405
|
+
this.emitColumns();
|
|
1406
|
+
}
|
|
1407
|
+
/** A column can be hidden when it is hideable and at least one other stays visible. */
|
|
1408
|
+
canHide(key) {
|
|
1409
|
+
const column = this.columns().find((candidate) => candidate.key === key);
|
|
1410
|
+
if (column?.hideable === false)
|
|
1411
|
+
return false;
|
|
1412
|
+
return this.visibleColumns().length > 1;
|
|
1413
|
+
}
|
|
1414
|
+
emitColumns() {
|
|
1415
|
+
this.markViewDirty();
|
|
849
1416
|
this.columnsChange.emit(this.visibleColumns().map((column) => column.key));
|
|
1417
|
+
this.columnStateChange.emit(this.state());
|
|
1418
|
+
}
|
|
1419
|
+
/**
|
|
1420
|
+
* A manual layout change (pin, hide, resize, reorder, density) means the table no longer
|
|
1421
|
+
* matches the view that was applied last, so drop its highlight instead of lying about it.
|
|
1422
|
+
*/
|
|
1423
|
+
markViewDirty() {
|
|
1424
|
+
if (this.activeView() !== null)
|
|
1425
|
+
this.activeView.set(null);
|
|
1426
|
+
}
|
|
1427
|
+
toggleColumnPicker(event) {
|
|
1428
|
+
event?.stopPropagation();
|
|
1429
|
+
if (this.columnPickerOpen()) {
|
|
1430
|
+
this.columnPickerOpen.set(false);
|
|
1431
|
+
return;
|
|
1432
|
+
}
|
|
1433
|
+
const anchor = event?.currentTarget;
|
|
1434
|
+
if (anchor instanceof HTMLElement) {
|
|
1435
|
+
this.columnsMenuPos.set(this.floatPosition(anchor, 250, 380));
|
|
1436
|
+
}
|
|
1437
|
+
this.columnPickerOpen.set(true);
|
|
1438
|
+
this.viewsOpen.set(false);
|
|
1439
|
+
this.columnMenu.set(null);
|
|
1440
|
+
}
|
|
1441
|
+
toggleViews(event) {
|
|
1442
|
+
event?.stopPropagation();
|
|
1443
|
+
if (this.viewsOpen()) {
|
|
1444
|
+
this.viewsOpen.set(false);
|
|
1445
|
+
return;
|
|
1446
|
+
}
|
|
1447
|
+
const anchor = event?.currentTarget;
|
|
1448
|
+
if (anchor instanceof HTMLElement) {
|
|
1449
|
+
this.viewsMenuPos.set(this.floatPosition(anchor, 260, 340));
|
|
1450
|
+
}
|
|
1451
|
+
this.viewsOpen.set(true);
|
|
1452
|
+
this.columnPickerOpen.set(false);
|
|
1453
|
+
this.columnMenu.set(null);
|
|
850
1454
|
}
|
|
851
|
-
|
|
852
|
-
|
|
1455
|
+
/** Set the row density explicitly (the toolbar segmented control). */
|
|
1456
|
+
setDensity(density) {
|
|
1457
|
+
if (this.density() === density)
|
|
1458
|
+
return;
|
|
1459
|
+
this.density.set(density);
|
|
1460
|
+
this.markViewDirty();
|
|
1461
|
+
this.densityChange.emit(density);
|
|
853
1462
|
}
|
|
854
1463
|
toggleDensity() {
|
|
855
|
-
this.density
|
|
856
|
-
|
|
1464
|
+
this.setDensity(this.density() === 'compact' ? 'comfortable' : 'compact');
|
|
1465
|
+
}
|
|
1466
|
+
/* ---- header menu ------------------------------------------------- */
|
|
1467
|
+
openColumnMenu(column, event) {
|
|
1468
|
+
event.stopPropagation();
|
|
1469
|
+
const anchor = event.currentTarget;
|
|
1470
|
+
if (!(anchor instanceof HTMLElement))
|
|
1471
|
+
return;
|
|
1472
|
+
if (this.columnMenu()?.key === column.key) {
|
|
1473
|
+
this.columnMenu.set(null);
|
|
1474
|
+
return;
|
|
1475
|
+
}
|
|
1476
|
+
const position = this.floatPosition(anchor, 220, 300);
|
|
1477
|
+
this.columnMenu.set({ key: column.key, ...position });
|
|
1478
|
+
this.columnPickerOpen.set(false);
|
|
1479
|
+
this.viewsOpen.set(false);
|
|
1480
|
+
}
|
|
1481
|
+
columnMenuColumn() {
|
|
1482
|
+
const menu = this.columnMenu();
|
|
1483
|
+
return menu ? this.columns().find((column) => column.key === menu.key) : undefined;
|
|
1484
|
+
}
|
|
1485
|
+
closeColumnMenu() {
|
|
1486
|
+
this.columnMenu.set(null);
|
|
1487
|
+
}
|
|
1488
|
+
menuSort(direction) {
|
|
1489
|
+
const column = this.columnMenuColumn();
|
|
1490
|
+
if (column)
|
|
1491
|
+
this.sort.set({ key: column.key, direction });
|
|
1492
|
+
this.closeColumnMenu();
|
|
1493
|
+
}
|
|
1494
|
+
menuClearSort() {
|
|
1495
|
+
this.sort.set(null);
|
|
1496
|
+
this.closeColumnMenu();
|
|
1497
|
+
}
|
|
1498
|
+
menuPin(pin) {
|
|
1499
|
+
const column = this.columnMenuColumn();
|
|
1500
|
+
if (column)
|
|
1501
|
+
this.pinColumn(column.key, pin);
|
|
1502
|
+
this.closeColumnMenu();
|
|
1503
|
+
}
|
|
1504
|
+
menuHide() {
|
|
1505
|
+
const column = this.columnMenuColumn();
|
|
1506
|
+
if (column)
|
|
1507
|
+
this.setColumnVisible(column.key, false);
|
|
1508
|
+
this.closeColumnMenu();
|
|
1509
|
+
}
|
|
1510
|
+
menuAutosize() {
|
|
1511
|
+
const column = this.columnMenuColumn();
|
|
1512
|
+
if (column)
|
|
1513
|
+
this.autosizeColumn(column.key);
|
|
1514
|
+
this.closeColumnMenu();
|
|
1515
|
+
}
|
|
1516
|
+
canPin(column) {
|
|
1517
|
+
return column.pinnable !== false;
|
|
1518
|
+
}
|
|
1519
|
+
pinColumn(key, pin) {
|
|
1520
|
+
// A `null` entry is kept on purpose: it remembers that the user unpinned a column
|
|
1521
|
+
// whose definition declares `sticky`, instead of silently falling back to it.
|
|
1522
|
+
this.pinnedKeys.set({ ...this.pinnedKeys(), [key]: pin });
|
|
1523
|
+
this.emitColumns();
|
|
1524
|
+
}
|
|
1525
|
+
/* ---- resize ------------------------------------------------------ */
|
|
1526
|
+
startResize(column, event) {
|
|
1527
|
+
if (!this.resizable())
|
|
1528
|
+
return;
|
|
1529
|
+
event.preventDefault();
|
|
1530
|
+
event.stopPropagation();
|
|
1531
|
+
const header = event.target.closest('th');
|
|
1532
|
+
const startWidth = header?.getBoundingClientRect().width ?? this.declaredWidthPx(column);
|
|
1533
|
+
this.resizing = { key: column.key, startX: event.clientX, startWidth };
|
|
1534
|
+
document.body.style.userSelect = 'none';
|
|
1535
|
+
}
|
|
1536
|
+
onDocumentPointerMove(event) {
|
|
1537
|
+
if (!this.resizing)
|
|
1538
|
+
return;
|
|
1539
|
+
const width = Math.max(MIN_COLUMN_WIDTH, Math.round(this.resizing.startWidth + event.clientX - this.resizing.startX));
|
|
1540
|
+
this.columnWidths.set({ ...this.columnWidths(), [this.resizing.key]: width });
|
|
1541
|
+
}
|
|
1542
|
+
onDocumentPointerUp() {
|
|
1543
|
+
if (!this.resizing)
|
|
1544
|
+
return;
|
|
1545
|
+
this.resizing = null;
|
|
1546
|
+
document.body.style.userSelect = '';
|
|
1547
|
+
this.scheduleMeasure();
|
|
1548
|
+
this.markViewDirty();
|
|
1549
|
+
this.columnStateChange.emit(this.state());
|
|
1550
|
+
}
|
|
1551
|
+
/** Shrink/grow a column to its widest rendered value. */
|
|
1552
|
+
autosizeColumn(key) {
|
|
1553
|
+
const column = this.visibleColumns().find((candidate) => candidate.key === key);
|
|
1554
|
+
if (!column)
|
|
1555
|
+
return;
|
|
1556
|
+
const header = String(column.header ?? column.key);
|
|
1557
|
+
const widths = this.pagedRows().map((row, index) => this.cellText(row, column, index).length);
|
|
1558
|
+
const longest = Math.max(header.length, ...widths, 4);
|
|
1559
|
+
const width = Math.min(460, Math.max(MIN_COLUMN_WIDTH, Math.round(longest * 7.6) + 46));
|
|
1560
|
+
this.columnWidths.set({ ...this.columnWidths(), [key]: width });
|
|
1561
|
+
this.columnStateChange.emit(this.state());
|
|
1562
|
+
}
|
|
1563
|
+
/* ---- reorder ----------------------------------------------------- */
|
|
1564
|
+
onHeaderDragStart(column, event) {
|
|
1565
|
+
if (!this.reorderable()) {
|
|
1566
|
+
event.preventDefault();
|
|
1567
|
+
return;
|
|
1568
|
+
}
|
|
1569
|
+
this.dragKey.set(column.key);
|
|
1570
|
+
if (event.dataTransfer) {
|
|
1571
|
+
event.dataTransfer.effectAllowed = 'move';
|
|
1572
|
+
event.dataTransfer.setData('text/plain', column.key);
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
onHeaderDragOver(column, event) {
|
|
1576
|
+
if (!this.reorderable() || !this.dragKey())
|
|
1577
|
+
return;
|
|
1578
|
+
event.preventDefault();
|
|
1579
|
+
if (event.dataTransfer)
|
|
1580
|
+
event.dataTransfer.dropEffect = 'move';
|
|
1581
|
+
if (this.dragOverKey() !== column.key)
|
|
1582
|
+
this.dragOverKey.set(column.key);
|
|
1583
|
+
}
|
|
1584
|
+
onHeaderDrop(column, event) {
|
|
1585
|
+
if (!this.reorderable())
|
|
1586
|
+
return;
|
|
1587
|
+
event.preventDefault();
|
|
1588
|
+
const from = this.dragKey();
|
|
1589
|
+
this.dragKey.set(null);
|
|
1590
|
+
this.dragOverKey.set(null);
|
|
1591
|
+
if (!from || from === column.key)
|
|
1592
|
+
return;
|
|
1593
|
+
this.moveColumn(from, column.key);
|
|
1594
|
+
}
|
|
1595
|
+
onHeaderDragEnd() {
|
|
1596
|
+
this.dragKey.set(null);
|
|
1597
|
+
this.dragOverKey.set(null);
|
|
1598
|
+
}
|
|
1599
|
+
/** Move `from` onto the slot of `to`, keeping hidden columns in the list. */
|
|
1600
|
+
moveColumn(from, to) {
|
|
1601
|
+
const order = this.orderedColumns().map((column) => column.key);
|
|
1602
|
+
const fromIndex = order.indexOf(from);
|
|
1603
|
+
const toIndex = order.indexOf(to);
|
|
1604
|
+
if (fromIndex < 0 || toIndex < 0)
|
|
1605
|
+
return;
|
|
1606
|
+
order.splice(fromIndex, 1);
|
|
1607
|
+
order.splice(toIndex, 0, from);
|
|
1608
|
+
this.columnOrder.set(order);
|
|
1609
|
+
this.emitColumns();
|
|
1610
|
+
}
|
|
1611
|
+
/* ---------------------------------------------------------------- */
|
|
1612
|
+
/* Export */
|
|
1613
|
+
/* ---------------------------------------------------------------- */
|
|
1614
|
+
/** Rows an export writes: the selection when there is one, else every match. */
|
|
1615
|
+
exportRows() {
|
|
1616
|
+
return this.selected().length ? this.selected() : this.sortedRows();
|
|
1617
|
+
}
|
|
1618
|
+
toggleExportMenu(event) {
|
|
1619
|
+
event?.stopPropagation();
|
|
1620
|
+
if (this.exportMenuPos()) {
|
|
1621
|
+
this.exportMenuPos.set(null);
|
|
1622
|
+
return;
|
|
1623
|
+
}
|
|
1624
|
+
const anchor = event?.currentTarget;
|
|
1625
|
+
this.exportMenuPos.set(anchor instanceof HTMLElement ? this.floatPosition(anchor, 210, 170) : { x: 8, y: 8 });
|
|
1626
|
+
this.columnPickerOpen.set(false);
|
|
1627
|
+
this.viewsOpen.set(false);
|
|
1628
|
+
this.columnMenu.set(null);
|
|
1629
|
+
}
|
|
1630
|
+
exportAs(format) {
|
|
1631
|
+
this.exportMenuPos.set(null);
|
|
1632
|
+
if (format === 'xlsx')
|
|
1633
|
+
this.downloadExcel();
|
|
1634
|
+
else
|
|
1635
|
+
this.downloadCsv();
|
|
1636
|
+
}
|
|
1637
|
+
/** CSV text of the current view: selected rows when there are any, else all matches. */
|
|
1638
|
+
toCsv() {
|
|
1639
|
+
const columns = this.visibleColumns();
|
|
1640
|
+
const rows = this.exportRows();
|
|
1641
|
+
const escapeValue = (value) => /[",;\n\r]/.test(value) ? `"${value.replace(/"/g, '""')}"` : value;
|
|
1642
|
+
const header = columns.map((column) => escapeValue(String(column.header ?? column.key)));
|
|
1643
|
+
const body = rows.map((row, index) => columns.map((column) => escapeValue(this.cellText(row, column, index))).join(','));
|
|
1644
|
+
return [header.join(','), ...body].join('\r\n');
|
|
1645
|
+
}
|
|
1646
|
+
/** Download the current view as a UTF-8 CSV file. */
|
|
1647
|
+
downloadCsv() {
|
|
1648
|
+
const csv = this.toCsv();
|
|
1649
|
+
this.csvExport.emit(csv);
|
|
1650
|
+
const blob = new Blob([`\uFEFF${csv}`], { type: 'text/csv;charset=utf-8;' });
|
|
1651
|
+
this.saveFile(blob, `${this.exportFileName()}.csv`, 'csv');
|
|
1652
|
+
}
|
|
1653
|
+
/** Real Excel workbook (`.xlsx`) of the current view, built without dependencies. */
|
|
1654
|
+
toExcel() {
|
|
1655
|
+
const columns = this.visibleColumns();
|
|
1656
|
+
const rows = this.exportRows();
|
|
1657
|
+
return buildXlsxBlob({
|
|
1658
|
+
sheetName: this.title() || 'Data',
|
|
1659
|
+
header: columns.map((column) => String(column.header ?? column.key)),
|
|
1660
|
+
rows: rows.map((row, index) => columns.map((column) => this.cellText(row, column, index))),
|
|
1661
|
+
});
|
|
857
1662
|
}
|
|
1663
|
+
/** Download the current view as an `.xlsx` workbook. */
|
|
1664
|
+
downloadExcel() {
|
|
1665
|
+
this.saveFile(this.toExcel(), `${this.exportFileName()}.xlsx`, 'xlsx');
|
|
1666
|
+
}
|
|
1667
|
+
saveFile(blob, fileName, format) {
|
|
1668
|
+
this.exportFile.emit({ format, fileName, blob, rows: this.exportRows() });
|
|
1669
|
+
if (typeof document === 'undefined' || typeof URL === 'undefined')
|
|
1670
|
+
return;
|
|
1671
|
+
const url = URL.createObjectURL(blob);
|
|
1672
|
+
const link = document.createElement('a');
|
|
1673
|
+
link.href = url;
|
|
1674
|
+
link.download = fileName;
|
|
1675
|
+
link.style.display = 'none';
|
|
1676
|
+
document.body.appendChild(link);
|
|
1677
|
+
link.click();
|
|
1678
|
+
document.body.removeChild(link);
|
|
1679
|
+
setTimeout(() => URL.revokeObjectURL(url), 0);
|
|
1680
|
+
}
|
|
1681
|
+
/* ---------------------------------------------------------------- */
|
|
1682
|
+
/* Aggregates */
|
|
1683
|
+
/* ---------------------------------------------------------------- */
|
|
1684
|
+
/** Footer cell text for a column that declares an `aggregate`. */
|
|
1685
|
+
aggregateText(column) {
|
|
1686
|
+
if (!column.aggregate)
|
|
1687
|
+
return '';
|
|
1688
|
+
const aggregate = typeof column.aggregate === 'string' ? { type: column.aggregate } : column.aggregate;
|
|
1689
|
+
const rows = this.isServer() ? this.data() : this.sortedRows();
|
|
1690
|
+
if (aggregate.type === 'count') {
|
|
1691
|
+
return String(rows.length);
|
|
1692
|
+
}
|
|
1693
|
+
const numbers = rows
|
|
1694
|
+
.map((row) => Number(this.cellValue(row, column)))
|
|
1695
|
+
.filter((value) => Number.isFinite(value));
|
|
1696
|
+
if (!numbers.length)
|
|
1697
|
+
return '';
|
|
1698
|
+
let value = 0;
|
|
1699
|
+
switch (aggregate.type) {
|
|
1700
|
+
case 'sum':
|
|
1701
|
+
value = numbers.reduce((total, next) => total + next, 0);
|
|
1702
|
+
break;
|
|
1703
|
+
case 'avg':
|
|
1704
|
+
value = numbers.reduce((total, next) => total + next, 0) / numbers.length;
|
|
1705
|
+
break;
|
|
1706
|
+
case 'min':
|
|
1707
|
+
value = Math.min(...numbers);
|
|
1708
|
+
break;
|
|
1709
|
+
case 'max':
|
|
1710
|
+
value = Math.max(...numbers);
|
|
1711
|
+
break;
|
|
1712
|
+
}
|
|
1713
|
+
if (aggregate.format)
|
|
1714
|
+
return aggregate.format(value, column);
|
|
1715
|
+
return value.toLocaleString(undefined, { maximumFractionDigits: 2 });
|
|
1716
|
+
}
|
|
1717
|
+
aggregateLabel(column) {
|
|
1718
|
+
if (!column.aggregate)
|
|
1719
|
+
return '';
|
|
1720
|
+
if (typeof column.aggregate !== 'string' && column.aggregate.label) {
|
|
1721
|
+
return column.aggregate.label;
|
|
1722
|
+
}
|
|
1723
|
+
const type = typeof column.aggregate === 'string' ? column.aggregate : column.aggregate.type;
|
|
1724
|
+
return type;
|
|
1725
|
+
}
|
|
1726
|
+
/* ---------------------------------------------------------------- */
|
|
1727
|
+
/* Named views */
|
|
1728
|
+
/* ---------------------------------------------------------------- */
|
|
1729
|
+
applyView(name) {
|
|
1730
|
+
const view = this.views()[name];
|
|
1731
|
+
if (!view)
|
|
1732
|
+
return;
|
|
1733
|
+
this.applyState(view);
|
|
1734
|
+
this.viewsOpen.set(false);
|
|
1735
|
+
// Emit first: `emitColumns()` clears the previous highlight, so the applied view is
|
|
1736
|
+
// marked active afterwards.
|
|
1737
|
+
this.emitColumns();
|
|
1738
|
+
this.activeView.set(name);
|
|
1739
|
+
}
|
|
1740
|
+
saveView() {
|
|
1741
|
+
const name = this.viewNameDraft().trim();
|
|
1742
|
+
if (!name)
|
|
1743
|
+
return;
|
|
1744
|
+
this.views.set({ ...this.views(), [name]: this.state() });
|
|
1745
|
+
this.activeView.set(name);
|
|
1746
|
+
this.viewNameDraft.set('');
|
|
1747
|
+
}
|
|
1748
|
+
deleteView(name, event) {
|
|
1749
|
+
event.stopPropagation();
|
|
1750
|
+
const next = { ...this.views() };
|
|
1751
|
+
delete next[name];
|
|
1752
|
+
this.views.set(next);
|
|
1753
|
+
if (this.activeView() === name)
|
|
1754
|
+
this.activeView.set(null);
|
|
1755
|
+
}
|
|
1756
|
+
onViewNameInput(value) {
|
|
1757
|
+
this.viewNameDraft.set(value);
|
|
1758
|
+
}
|
|
1759
|
+
/* ---------------------------------------------------------------- */
|
|
1760
|
+
/* Scroll */
|
|
1761
|
+
/* ---------------------------------------------------------------- */
|
|
1762
|
+
onScroll(event) {
|
|
1763
|
+
const target = event.target;
|
|
1764
|
+
const scrolled = target.scrollTop > 0;
|
|
1765
|
+
if (scrolled !== this.scrolled())
|
|
1766
|
+
this.scrolled.set(scrolled);
|
|
1767
|
+
}
|
|
1768
|
+
/* ---------------------------------------------------------------- */
|
|
1769
|
+
/* Internals */
|
|
1770
|
+
/* ---------------------------------------------------------------- */
|
|
1771
|
+
/**
|
|
1772
|
+
* Copy `value` and show the check icon only when the browser really took it.
|
|
1773
|
+
*/
|
|
858
1774
|
copyText(value, key) {
|
|
859
|
-
|
|
860
|
-
|
|
1775
|
+
void this.writeClipboard(value).then((copied) => {
|
|
1776
|
+
if (!copied)
|
|
1777
|
+
return;
|
|
1778
|
+
this.copiedCell.set(key);
|
|
1779
|
+
if (this.copyTimer)
|
|
1780
|
+
clearTimeout(this.copyTimer);
|
|
1781
|
+
this.copyTimer = setTimeout(() => this.copiedCell.set(null), 1400);
|
|
1782
|
+
});
|
|
1783
|
+
}
|
|
1784
|
+
/**
|
|
1785
|
+
* The async Clipboard API only exists in a secure context (https / localhost) and can
|
|
1786
|
+
* still be blocked by permissions or a sandboxed iframe. Plain-HTTP intranets get no
|
|
1787
|
+
* `navigator.clipboard` at all, so fall back to a hidden textarea + `execCommand`.
|
|
1788
|
+
*/
|
|
1789
|
+
writeClipboard(value) {
|
|
1790
|
+
const clipboard = typeof navigator === 'undefined' ? undefined : navigator.clipboard;
|
|
1791
|
+
if (clipboard?.writeText) {
|
|
1792
|
+
return clipboard.writeText(value).then(() => true, () => this.legacyCopy(value));
|
|
861
1793
|
}
|
|
862
|
-
this.
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
1794
|
+
return Promise.resolve(this.legacyCopy(value));
|
|
1795
|
+
}
|
|
1796
|
+
/** Deprecated but the only synchronous copy available outside a secure context. */
|
|
1797
|
+
legacyCopy(value) {
|
|
1798
|
+
if (typeof document === 'undefined' || typeof document.execCommand !== 'function')
|
|
1799
|
+
return false;
|
|
1800
|
+
const area = document.createElement('textarea');
|
|
1801
|
+
area.value = value;
|
|
1802
|
+
area.setAttribute('readonly', '');
|
|
1803
|
+
area.setAttribute('aria-hidden', 'true');
|
|
1804
|
+
area.style.position = 'fixed';
|
|
1805
|
+
area.style.top = '-1000px';
|
|
1806
|
+
area.style.opacity = '0';
|
|
1807
|
+
document.body.appendChild(area);
|
|
1808
|
+
area.select();
|
|
1809
|
+
area.setSelectionRange(0, value.length);
|
|
1810
|
+
let copied = false;
|
|
1811
|
+
try {
|
|
1812
|
+
copied = document.execCommand('copy');
|
|
1813
|
+
}
|
|
1814
|
+
catch {
|
|
1815
|
+
copied = false;
|
|
1816
|
+
}
|
|
1817
|
+
document.body.removeChild(area);
|
|
1818
|
+
return copied;
|
|
1819
|
+
}
|
|
1820
|
+
/** Screen position for a menu anchored to `anchor`, kept inside the viewport. */
|
|
1821
|
+
floatPosition(anchor, width, height) {
|
|
1822
|
+
const rect = anchor.getBoundingClientRect();
|
|
1823
|
+
const viewportWidth = typeof window === 'undefined' ? 1280 : window.innerWidth;
|
|
1824
|
+
const viewportHeight = typeof window === 'undefined' ? 800 : window.innerHeight;
|
|
1825
|
+
const x = Math.min(Math.max(8, rect.right - width), Math.max(8, viewportWidth - width - 8));
|
|
1826
|
+
const y = Math.min(rect.bottom + 6, Math.max(8, viewportHeight - height - 8));
|
|
1827
|
+
return { x, y };
|
|
1828
|
+
}
|
|
1829
|
+
/** Read header widths so stacked sticky columns line up. */
|
|
1830
|
+
measureHeaderWidths() {
|
|
1831
|
+
const headers = this.host.nativeElement.querySelectorAll('th[data-col]');
|
|
1832
|
+
if (!headers.length)
|
|
1833
|
+
return;
|
|
1834
|
+
const next = {};
|
|
1835
|
+
headers.forEach((header) => {
|
|
1836
|
+
const key = header.dataset['col'];
|
|
1837
|
+
if (!key)
|
|
1838
|
+
return;
|
|
1839
|
+
const width = Math.round(header.getBoundingClientRect().width);
|
|
1840
|
+
if (width > 0)
|
|
1841
|
+
next[key] = width;
|
|
1842
|
+
});
|
|
1843
|
+
const current = this.measuredWidths();
|
|
1844
|
+
const keys = Object.keys(next);
|
|
1845
|
+
const changed = keys.length !== Object.keys(current).length ||
|
|
1846
|
+
keys.some((key) => Math.abs((current[key] ?? 0) - next[key]) > 0.5);
|
|
1847
|
+
if (changed)
|
|
1848
|
+
this.measuredWidths.set(next);
|
|
1849
|
+
}
|
|
1850
|
+
scheduleMeasure() {
|
|
1851
|
+
if (typeof requestAnimationFrame === 'undefined')
|
|
1852
|
+
return;
|
|
1853
|
+
if (this.measureHandle)
|
|
1854
|
+
cancelAnimationFrame(this.measureHandle);
|
|
1855
|
+
this.measureHandle = requestAnimationFrame(() => {
|
|
1856
|
+
this.measureHandle = undefined;
|
|
1857
|
+
this.measureHeaderWidths();
|
|
1858
|
+
});
|
|
866
1859
|
}
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
if (!preset)
|
|
1860
|
+
applyState(state) {
|
|
1861
|
+
if (!state)
|
|
870
1862
|
return;
|
|
871
|
-
if (Array.isArray(
|
|
872
|
-
this.hiddenColumnKeys.set(new Set(
|
|
873
|
-
if (
|
|
874
|
-
this.density.set(
|
|
1863
|
+
if (Array.isArray(state.hidden))
|
|
1864
|
+
this.hiddenColumnKeys.set(new Set(state.hidden));
|
|
1865
|
+
if (state.density === 'compact' || state.density === 'comfortable') {
|
|
1866
|
+
this.density.set(state.density);
|
|
1867
|
+
}
|
|
1868
|
+
if (Array.isArray(state.order))
|
|
1869
|
+
this.columnOrder.set([...state.order]);
|
|
1870
|
+
if (state.widths && typeof state.widths === 'object') {
|
|
1871
|
+
this.columnWidths.set({ ...state.widths });
|
|
1872
|
+
}
|
|
1873
|
+
if (state.pinned && typeof state.pinned === 'object') {
|
|
1874
|
+
this.pinnedKeys.set({ ...state.pinned });
|
|
875
1875
|
}
|
|
876
1876
|
}
|
|
877
|
-
readPreset() {
|
|
878
|
-
const key = this.storageKey();
|
|
1877
|
+
readPreset(key) {
|
|
879
1878
|
if (!key || typeof localStorage === 'undefined')
|
|
880
1879
|
return null;
|
|
881
1880
|
try {
|
|
882
1881
|
const raw = localStorage.getItem(key);
|
|
883
|
-
|
|
1882
|
+
if (!raw)
|
|
1883
|
+
return null;
|
|
1884
|
+
const parsed = JSON.parse(raw);
|
|
1885
|
+
if (parsed.state) {
|
|
1886
|
+
return {
|
|
1887
|
+
state: parsed.state,
|
|
1888
|
+
views: parsed.views ?? {},
|
|
1889
|
+
activeView: parsed.activeView ?? null,
|
|
1890
|
+
};
|
|
1891
|
+
}
|
|
1892
|
+
return {
|
|
1893
|
+
state: {
|
|
1894
|
+
hidden: Array.isArray(parsed.hidden) ? parsed.hidden : [],
|
|
1895
|
+
density: parsed.density === 'compact' ? 'compact' : 'comfortable',
|
|
1896
|
+
order: [],
|
|
1897
|
+
widths: {},
|
|
1898
|
+
pinned: {},
|
|
1899
|
+
},
|
|
1900
|
+
views: {},
|
|
1901
|
+
activeView: null,
|
|
1902
|
+
};
|
|
884
1903
|
}
|
|
885
1904
|
catch {
|
|
886
1905
|
return null;
|
|
887
1906
|
}
|
|
888
1907
|
}
|
|
889
|
-
persistPreset(
|
|
890
|
-
const key = this.storageKey();
|
|
1908
|
+
persistPreset(key) {
|
|
891
1909
|
if (!key || typeof localStorage === 'undefined')
|
|
892
1910
|
return;
|
|
893
1911
|
try {
|
|
894
|
-
localStorage.setItem(key, JSON.stringify(
|
|
1912
|
+
localStorage.setItem(key, JSON.stringify({
|
|
1913
|
+
v: 2,
|
|
1914
|
+
state: this.state(),
|
|
1915
|
+
views: this.views(),
|
|
1916
|
+
activeView: this.activeView(),
|
|
1917
|
+
}));
|
|
895
1918
|
}
|
|
896
1919
|
catch {
|
|
897
1920
|
// Storage disabled (private mode) — the preset simply stays in memory.
|
|
@@ -900,10 +1923,12 @@ class TableComponent {
|
|
|
900
1923
|
onDocumentClick() {
|
|
901
1924
|
this.closeRowMenu();
|
|
902
1925
|
this.columnPickerOpen.set(false);
|
|
1926
|
+
this.viewsOpen.set(false);
|
|
1927
|
+
this.columnMenu.set(null);
|
|
1928
|
+
this.exportMenuPos.set(null);
|
|
903
1929
|
}
|
|
904
1930
|
onDocumentEscape() {
|
|
905
|
-
this.
|
|
906
|
-
this.columnPickerOpen.set(false);
|
|
1931
|
+
this.onDocumentClick();
|
|
907
1932
|
}
|
|
908
1933
|
alignClass(column) {
|
|
909
1934
|
return column.align ? `ith-table-align-${column.align}` : '';
|
|
@@ -934,9 +1959,6 @@ class TableComponent {
|
|
|
934
1959
|
emptyContext() {
|
|
935
1960
|
return { ...this.toolbarContext() };
|
|
936
1961
|
}
|
|
937
|
-
/* ---------------------------------------------------------------- */
|
|
938
|
-
/* Internals */
|
|
939
|
-
/* ---------------------------------------------------------------- */
|
|
940
1962
|
compareRows(a, b, column) {
|
|
941
1963
|
if (column.sortFn)
|
|
942
1964
|
return column.sortFn(a, b);
|
|
@@ -987,16 +2009,24 @@ class TableComponent {
|
|
|
987
2009
|
return this.cellText(row, column).toLowerCase();
|
|
988
2010
|
}
|
|
989
2011
|
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 & 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 });
|
|
2012
|
+
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 & 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}}@media(hover:none){.ith-table-copy,.ith-table-th-menu{opacity:.55}.ith-table-copy:active,.ith-table-th-menu:active{opacity:1}}.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;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:focus-visible,.ith-table-copy.is-copied{opacity:1}.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
2013
|
}
|
|
992
2014
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.34", ngImport: i0, type: TableComponent, decorators: [{
|
|
993
2015
|
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 & 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), { ...{
|
|
2016
|
+
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 & 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}}@media(hover:none){.ith-table-copy,.ith-table-th-menu{opacity:.55}.ith-table-copy:active,.ith-table-th-menu:active{opacity:1}}.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;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:focus-visible,.ith-table-copy.is-copied{opacity:1}.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"] }]
|
|
2017
|
+
}], 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
2018
|
descendants: true,
|
|
997
2019
|
}, 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
2020
|
descendants: true,
|
|
999
|
-
}, isSignal: true }] }],
|
|
2021
|
+
}, isSignal: true }] }], rowDetailDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TableRowDetailDirective), { ...{
|
|
2022
|
+
descendants: true,
|
|
2023
|
+
}, isSignal: true }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }, { type: i0.Output, args: ["filtersChange"] }], onDocumentPointerMove: [{
|
|
2024
|
+
type: HostListener,
|
|
2025
|
+
args: ['document:pointermove', ['$event']]
|
|
2026
|
+
}], onDocumentPointerUp: [{
|
|
2027
|
+
type: HostListener,
|
|
2028
|
+
args: ['document:pointerup']
|
|
2029
|
+
}], onDocumentClick: [{
|
|
1000
2030
|
type: HostListener,
|
|
1001
2031
|
args: ['document:click']
|
|
1002
2032
|
}], onDocumentEscape: [{
|
|
@@ -1012,5 +2042,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.34", ngImpo
|
|
|
1012
2042
|
* Generated bundle index. Do not edit.
|
|
1013
2043
|
*/
|
|
1014
2044
|
|
|
1015
|
-
export { TableCellDirective, TableComponent, TableEmptyDirective, TableFilterDirective, TableFooterDirective, TableHeaderDirective, TableRowActionsDirective, TableRowMenuDirective, TableToolbarDirective, buildPageWindow, compareWithDirection, defaultCompare, getPathValue, isInteractiveTarget, toDisplay };
|
|
2045
|
+
export { TableCellDirective, TableComponent, TableEmptyDirective, TableFilterDirective, TableFooterDirective, TableHeaderDirective, TableRowActionsDirective, TableRowDetailDirective, TableRowMenuDirective, TableToolbarDirective, buildPageWindow, buildXlsxBlob, compareWithDirection, defaultCompare, getPathValue, isInteractiveTarget, toDisplay };
|
|
1016
2046
|
//# sourceMappingURL=ithouse-bd-ngx-table.mjs.map
|