@tectra-ng/ui 0.1.1 → 0.1.2

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.
Files changed (96) hide show
  1. package/country/README.md +14 -4
  2. package/data-view/README.md +71 -0
  3. package/fesm2022/tectra-ng-ui-autocomplete.mjs +2 -2
  4. package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
  5. package/fesm2022/tectra-ng-ui-cascade-select.mjs +2 -2
  6. package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
  7. package/fesm2022/tectra-ng-ui-chip.mjs +2 -2
  8. package/fesm2022/tectra-ng-ui-chip.mjs.map +1 -1
  9. package/fesm2022/tectra-ng-ui-chips-input.mjs +2 -2
  10. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
  11. package/fesm2022/tectra-ng-ui-color-picker.mjs +2 -2
  12. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
  13. package/fesm2022/tectra-ng-ui-country.mjs +47 -6
  14. package/fesm2022/tectra-ng-ui-country.mjs.map +1 -1
  15. package/fesm2022/tectra-ng-ui-data-view.mjs +1370 -0
  16. package/fesm2022/tectra-ng-ui-data-view.mjs.map +1 -0
  17. package/fesm2022/tectra-ng-ui-fieldset.mjs +2 -2
  18. package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -1
  19. package/fesm2022/tectra-ng-ui-input-number.mjs +2 -2
  20. package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -1
  21. package/fesm2022/tectra-ng-ui-input.mjs +2 -2
  22. package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
  23. package/fesm2022/tectra-ng-ui-listbox.mjs +2 -2
  24. package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -1
  25. package/fesm2022/tectra-ng-ui-menu.mjs +2 -2
  26. package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -1
  27. package/fesm2022/tectra-ng-ui-message.mjs +2 -2
  28. package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
  29. package/fesm2022/tectra-ng-ui-multiselect.mjs +2 -2
  30. package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
  31. package/fesm2022/tectra-ng-ui-paginator.mjs +2 -2
  32. package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -1
  33. package/fesm2022/tectra-ng-ui-select.mjs +4 -4
  34. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
  35. package/fesm2022/tectra-ng-ui-slider.mjs +2 -2
  36. package/fesm2022/tectra-ng-ui-slider.mjs.map +1 -1
  37. package/fesm2022/tectra-ng-ui-table.mjs +1373 -1333
  38. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
  39. package/fesm2022/tectra-ng-ui-tag.mjs +2 -2
  40. package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -1
  41. package/fesm2022/tectra-ng-ui-toggle-switch.mjs +2 -2
  42. package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -1
  43. package/fesm2022/tectra-ng-ui-tree-select.mjs +7 -46
  44. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
  45. package/fesm2022/tectra-ng-ui-tree-table.mjs +901 -0
  46. package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -0
  47. package/fesm2022/tectra-ng-ui-tree.mjs +1940 -0
  48. package/fesm2022/tectra-ng-ui-tree.mjs.map +1 -0
  49. package/fesm2022/tectra-ng-ui-virtual-scroller.mjs +928 -0
  50. package/fesm2022/tectra-ng-ui-virtual-scroller.mjs.map +1 -0
  51. package/package.json +17 -1
  52. package/tree/README.md +93 -0
  53. package/tree-table/README.md +84 -0
  54. package/types/tectra-ng-ui-autocomplete.d.ts +11 -0
  55. package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -1
  56. package/types/tectra-ng-ui-chip.d.ts +3 -0
  57. package/types/tectra-ng-ui-chip.d.ts.map +1 -1
  58. package/types/tectra-ng-ui-country-select.d.ts +11 -0
  59. package/types/tectra-ng-ui-country-select.d.ts.map +1 -1
  60. package/types/tectra-ng-ui-country.d.ts +9 -3
  61. package/types/tectra-ng-ui-country.d.ts.map +1 -1
  62. package/types/tectra-ng-ui-data-view.d.ts +363 -0
  63. package/types/tectra-ng-ui-data-view.d.ts.map +1 -0
  64. package/types/tectra-ng-ui-fieldset.d.ts +8 -0
  65. package/types/tectra-ng-ui-fieldset.d.ts.map +1 -1
  66. package/types/tectra-ng-ui-input-number.d.ts +1 -0
  67. package/types/tectra-ng-ui-input-number.d.ts.map +1 -1
  68. package/types/tectra-ng-ui-input.d.ts +4 -0
  69. package/types/tectra-ng-ui-input.d.ts.map +1 -1
  70. package/types/tectra-ng-ui-menu.d.ts +2 -0
  71. package/types/tectra-ng-ui-menu.d.ts.map +1 -1
  72. package/types/tectra-ng-ui-message.d.ts +5 -0
  73. package/types/tectra-ng-ui-message.d.ts.map +1 -1
  74. package/types/tectra-ng-ui-multiselect.d.ts +11 -0
  75. package/types/tectra-ng-ui-multiselect.d.ts.map +1 -1
  76. package/types/tectra-ng-ui-paginator.d.ts +1 -0
  77. package/types/tectra-ng-ui-paginator.d.ts.map +1 -1
  78. package/types/tectra-ng-ui-select.d.ts +11 -0
  79. package/types/tectra-ng-ui-select.d.ts.map +1 -1
  80. package/types/tectra-ng-ui-slider.d.ts +1 -0
  81. package/types/tectra-ng-ui-slider.d.ts.map +1 -1
  82. package/types/tectra-ng-ui-table.d.ts +181 -15
  83. package/types/tectra-ng-ui-table.d.ts.map +1 -1
  84. package/types/tectra-ng-ui-tag.d.ts +8 -0
  85. package/types/tectra-ng-ui-tag.d.ts.map +1 -1
  86. package/types/tectra-ng-ui-toggle-switch.d.ts +5 -0
  87. package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -1
  88. package/types/tectra-ng-ui-tree-select.d.ts +19 -22
  89. package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
  90. package/types/tectra-ng-ui-tree-table.d.ts +94 -0
  91. package/types/tectra-ng-ui-tree-table.d.ts.map +1 -0
  92. package/types/tectra-ng-ui-tree.d.ts +571 -0
  93. package/types/tectra-ng-ui-tree.d.ts.map +1 -0
  94. package/types/tectra-ng-ui-virtual-scroller.d.ts +297 -0
  95. package/types/tectra-ng-ui-virtual-scroller.d.ts.map +1 -0
  96. package/virtual-scroller/README.md +60 -0
@@ -1,31 +1,45 @@
1
1
  import { BreakpointObserver } from "@angular/cdk/layout";
2
+ import * as i3 from "@angular/cdk/drag-drop";
2
3
  import { CdkDrag, CdkDragHandle, CdkDropList, moveItemInArray } from "@angular/cdk/drag-drop";
3
- import { NgTemplateOutlet } from "@angular/common";
4
4
  import * as i0 from "@angular/core";
5
5
  import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, Injector, TemplateRef, ViewEncapsulation, afterNextRender, afterRenderEffect, booleanAttribute, computed, contentChild, contentChildren, effect, inject, input, model, numberAttribute, output, signal, untracked, viewChild } from "@angular/core";
6
6
  import { toObservable, toSignal } from "@angular/core/rxjs-interop";
7
- import * as i1 from "@angular/forms";
8
- import { FormsModule } from "@angular/forms";
9
7
  import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
10
8
  import { TxLocaleService, injectTranslations } from "@tectra-ng/core/i18n";
11
9
  import { optionalBoolean, optionalNumber } from "@tectra-ng/core/utils";
12
- import { TxIcon } from "@tectra-ng/icons";
13
10
  import { toStyleObject } from "@tectra-ng/themes";
11
+ import { map, of, switchMap } from "rxjs";
12
+ import * as i1 from "@angular/common";
13
+ import { NgTemplateOutlet } from "@angular/common";
14
+ import * as i1$1 from "@angular/forms";
15
+ import { FormsModule } from "@angular/forms";
16
+ import * as i4 from "@tectra-ng/icons";
17
+ import { TxIcon } from "@tectra-ng/icons";
18
+ import * as i7 from "@tectra-ng/ui/button";
14
19
  import { TxButton } from "@tectra-ng/ui/button";
20
+ import * as i8 from "@tectra-ng/ui/checkbox";
15
21
  import { TxCheckbox } from "@tectra-ng/ui/checkbox";
22
+ import * as i9 from "@tectra-ng/ui/input";
16
23
  import { TxInput } from "@tectra-ng/ui/input";
24
+ import * as i10 from "@tectra-ng/ui/input-number";
17
25
  import { TxInputNumber } from "@tectra-ng/ui/input-number";
18
- import { TxSelect } from "@tectra-ng/ui/select";
26
+ import * as i15 from "@tectra-ng/ui/menu";
19
27
  import { TxMenu, TxMenuItemTemplate, TxMenuTrigger } from "@tectra-ng/ui/menu";
28
+ import * as i13 from "@tectra-ng/ui/paginator";
20
29
  import { TxPaginator } from "@tectra-ng/ui/paginator";
30
+ import * as i14 from "@tectra-ng/ui/progress-spinner";
21
31
  import { TxProgressSpinner } from "@tectra-ng/ui/progress-spinner";
32
+ import * as i12 from "@tectra-ng/ui/radio-button";
22
33
  import { TxRadioButton } from "@tectra-ng/ui/radio-button";
23
- import { map, of, switchMap } from "rxjs";
24
- import { uniqueId } from "@tectra-ng/core/a11y";
25
- import { TxPopover, TxPopoverTrigger } from "@tectra-ng/ui/popover";
34
+ import * as i11 from "@tectra-ng/ui/select";
35
+ import { TxSelect } from "@tectra-ng/ui/select";
36
+ import * as i6 from "@tectra-ng/ui/skeleton";
37
+ import { TxSkeleton } from "@tectra-ng/ui/skeleton";
38
+ import * as i5 from "@tectra-ng/ui/tooltip";
26
39
  import { TxTooltip } from "@tectra-ng/ui/tooltip";
27
40
  import { TxMultiselect } from "@tectra-ng/ui/multiselect";
28
- import { TxSkeleton } from "@tectra-ng/ui/skeleton";
41
+ import { TxPopover, TxPopoverTrigger } from "@tectra-ng/ui/popover";
42
+ import { uniqueId } from "@tectra-ng/core/a11y";
29
43
  import { TxStyleLoader } from "@tectra-ng/core/styles";
30
44
  const ACTION_BUTTON_WIDTH = 30;
31
45
  const ACTION_BUTTON_GAP = 7;
@@ -121,7 +135,6 @@ i0.ɵɵngDeclareClassMetadata({
121
135
  type: TxTableActionsStore,
122
136
  decorators: [{ type: Injectable }]
123
137
  });
124
- const TX_TABLE = new InjectionToken("TX_TABLE");
125
138
  function resolveField(row, field) {
126
139
  if (!field || row === null || row === void 0) return void 0;
127
140
  return field.split(".").reduce((value, key) => value === null || value === void 0 ? void 0 : value[key], row);
@@ -196,250 +209,589 @@ function mergeColumnOrder(columns, order, visible) {
196
209
  });
197
210
  return result;
198
211
  }
199
- var TxTableSettings = class TxTableSettings {
200
- table = inject(TX_TABLE);
201
- document = inject(DOCUMENT);
202
- columns = input([], ...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
203
- hidden = input(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []);
204
- showColumns = input(true, {
205
- ...ngDevMode ? { debugName: "showColumns" } : /* istanbul ignore next */ {},
206
- transform: booleanAttribute
207
- });
208
- showActions = input(false, {
209
- ...ngDevMode ? { debugName: "showActions" } : /* istanbul ignore next */ {},
210
- transform: booleanAttribute
211
- });
212
- unstyled = input(false, ...ngDevMode ? [{ debugName: "unstyled" }] : /* istanbul ignore next */ []);
213
- columnToggled = output();
214
- id = uniqueId("tx-table-settings");
215
- translations = injectTranslations();
216
- store = this.table.actionsStore;
217
- activeTab = signal("columns", ...ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []);
218
- canReorder = this.table.reorderableColumns;
219
- listedColumns = computed(() => this.columns().filter((column) => column.hideable !== false || this.canReorder() && column.reorderable !== false), ...ngDevMode ? [{ debugName: "listedColumns" }] : /* istanbul ignore next */ []);
220
- tabs = computed(() => {
221
- const tabs = [];
222
- if (this.showColumns()) tabs.push("columns");
223
- if (this.showActions() && this.store.registeredActions().length) tabs.push("actions");
224
- return tabs;
225
- }, ...ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []);
226
- currentTab = computed(() => this.tabs().includes(this.activeTab()) ? this.activeTab() : this.tabs()[0] ?? "columns", ...ngDevMode ? [{ debugName: "currentTab" }] : /* istanbul ignore next */ []);
227
- label(column) {
228
- return columnLabel(column);
229
- }
230
- moveTab(step) {
231
- const tabs = this.tabs();
232
- const next = tabs[(tabs.indexOf(this.currentTab()) + step + tabs.length) % tabs.length];
233
- this.activeTab.set(next);
234
- this.document.getElementById(`${this.id}-${next}`)?.focus();
212
+ const TX_FILTER_MATCH_MODES = {
213
+ text: [
214
+ "startsWith",
215
+ "contains",
216
+ "notContains",
217
+ "endsWith",
218
+ "equals",
219
+ "notEquals"
220
+ ],
221
+ numeric: [
222
+ "equals",
223
+ "notEquals",
224
+ "lt",
225
+ "lte",
226
+ "gt",
227
+ "gte"
228
+ ],
229
+ date: [
230
+ "dateIs",
231
+ "dateIsNot",
232
+ "dateBefore",
233
+ "dateAfter"
234
+ ],
235
+ boolean: ["equals"]
236
+ };
237
+ function defaultMatchMode(column) {
238
+ if (column.filterOptions?.length) return "in";
239
+ return (column.filterMatchModes ?? TX_FILTER_MATCH_MODES[column.filterType ?? "text"])[0];
240
+ }
241
+ function isFilled(value) {
242
+ if (value === null || value === void 0) return false;
243
+ if (typeof value === "string") return value.trim() !== "";
244
+ if (Array.isArray(value)) return value.length > 0;
245
+ return true;
246
+ }
247
+ function isFilterActive(filter) {
248
+ return !!filter?.rules.some((rule) => isFilled(rule.value));
249
+ }
250
+ function normalize(value, locale) {
251
+ return String(value).normalize("NFD").replace(/\p{Diacritic}/gu, "").toLocaleLowerCase(locale);
252
+ }
253
+ function toTime(value) {
254
+ if (value === null || value === void 0 || value === "") return null;
255
+ const date = value instanceof Date ? value : new Date(value);
256
+ return Number.isNaN(date.getTime()) ? null : date.getTime();
257
+ }
258
+ function dayOf(value) {
259
+ const time = toTime(value);
260
+ return time === null ? null : new Date(time).toDateString();
261
+ }
262
+ function compare(value, filter) {
263
+ if (value === null || value === void 0) return null;
264
+ if (typeof value === "number" || typeof filter === "number") {
265
+ const left = Number(value);
266
+ const right = Number(filter);
267
+ return Number.isNaN(left) || Number.isNaN(right) ? null : left - right;
235
268
  }
236
- dropColumn(event) {
237
- const columns = this.listedColumns();
238
- const from = columns[event.previousIndex];
239
- const to = columns[event.currentIndex];
240
- if (from && to && to.reorderable !== false) this.table.reorderColumn(from.field, to.field);
269
+ const left = toTime(value);
270
+ const right = toTime(filter);
271
+ if (value instanceof Date && left !== null && right !== null) return left - right;
272
+ return String(value).localeCompare(String(filter), void 0, {
273
+ numeric: true,
274
+ sensitivity: "base"
275
+ });
276
+ }
277
+ function matchesRule(value, rule, locale) {
278
+ const filter = rule.value;
279
+ if (!isFilled(filter)) return true;
280
+ const text = value === null || value === void 0 ? "" : normalize(value, locale);
281
+ const needle = typeof filter === "string" || typeof filter === "number" ? normalize(filter, locale) : "";
282
+ switch (rule.matchMode) {
283
+ case "startsWith": return text.startsWith(needle);
284
+ case "contains": return text.includes(needle);
285
+ case "notContains": return !text.includes(needle);
286
+ case "endsWith": return text.endsWith(needle);
287
+ case "equals":
288
+ if (typeof filter === "boolean") return value === filter;
289
+ if (typeof filter === "number") return Number(value) === filter;
290
+ if (filter instanceof Date) return toTime(value) === toTime(filter);
291
+ return text === needle;
292
+ case "notEquals":
293
+ if (typeof filter === "boolean") return value !== filter;
294
+ if (typeof filter === "number") return Number(value) !== filter;
295
+ if (filter instanceof Date) return toTime(value) !== toTime(filter);
296
+ return text !== needle;
297
+ case "in": return Array.isArray(filter) && filter.some((item) => item === value || item !== null && value !== null && normalize(item, locale) === text);
298
+ case "lt":
299
+ case "lte":
300
+ case "gt":
301
+ case "gte": {
302
+ const result = compare(value, filter);
303
+ if (result === null) return false;
304
+ return rule.matchMode === "lt" ? result < 0 : rule.matchMode === "lte" ? result <= 0 : rule.matchMode === "gt" ? result > 0 : result >= 0;
305
+ }
306
+ case "between": {
307
+ const [from, to] = Array.isArray(filter) ? filter : [];
308
+ const fromResult = isFilled(from) ? compare(value, from) : 0;
309
+ const toResult = isFilled(to) ? compare(value, to) : 0;
310
+ return fromResult !== null && toResult !== null && fromResult >= 0 && toResult <= 0;
311
+ }
312
+ case "dateIs": return dayOf(value) !== null && dayOf(value) === dayOf(filter);
313
+ case "dateIsNot": return dayOf(value) !== dayOf(filter);
314
+ case "dateBefore": {
315
+ const left = toTime(value);
316
+ const right = toTime(filter);
317
+ return left !== null && right !== null && left < right;
318
+ }
319
+ case "dateAfter": {
320
+ const left = toTime(value);
321
+ const right = toTime(filter);
322
+ return left !== null && right !== null && left > right;
323
+ }
241
324
  }
242
- moveColumn(column, step, event) {
243
- if (!this.canReorder() || column.reorderable === false) return;
244
- event.preventDefault();
245
- const columns = this.listedColumns();
246
- const target = columns[columns.indexOf(column) + step];
247
- if (!target || target.reorderable === false) return;
248
- this.table.reorderColumn(column.field, target.field);
249
- const field = column.field;
250
- setTimeout(() => {
251
- const index = this.listedColumns().findIndex((item) => item.field === field);
252
- this.document.querySelectorAll(`#${this.id}-panel .tx-table-settings__action input`)[index]?.focus();
325
+ }
326
+ function matchesFilter(value, filter, locale) {
327
+ const rules = filter.rules.filter((rule) => isFilled(rule.value));
328
+ if (!rules.length) return true;
329
+ return filter.operator === "or" ? rules.some((rule) => matchesRule(value, rule, locale)) : rules.every((rule) => matchesRule(value, rule, locale));
330
+ }
331
+ function filterRows(rows, filters, columns, globalFilter, globalFields, locale) {
332
+ const active = Object.entries(filters).filter(([, filter]) => isFilterActive(filter));
333
+ const query = globalFilter.trim() ? normalize(globalFilter.trim(), locale) : "";
334
+ if (!active.length && !query) return [...rows];
335
+ const fieldOf = (key) => columns.find((column) => column.field === key)?.filterField ?? key;
336
+ return rows.filter((row) => {
337
+ if (!active.every(([key, filter]) => matchesFilter(resolveField(row, fieldOf(key)), filter, locale))) return false;
338
+ if (!query) return true;
339
+ return globalFields.some((field) => {
340
+ const value = resolveField(row, field);
341
+ return value !== null && value !== void 0 && normalize(value, locale).includes(query);
253
342
  });
254
- }
255
- moveAction(index, step, event) {
256
- const target = index + step;
257
- if (target < 0 || target >= this.store.registeredActions().length) return;
258
- event.preventDefault();
259
- this.store.reorder(index, target);
260
- setTimeout(() => this.document.querySelectorAll(`#${this.id}-panel .tx-table-settings__action input`)[target]?.focus());
261
- }
262
- dropAction(event) {
263
- this.store.reorder(event.previousIndex, event.currentIndex);
264
- }
343
+ });
344
+ }
345
+ const FORMULA = /^[=+\-@\t\r]/;
346
+ const NUMBER = /^[+-]?\d+([.,]\d+)?$/;
347
+ function csvCell(value, separator = ",") {
348
+ if (value === null || value === void 0) return "";
349
+ let text = value instanceof Date ? value.toISOString() : String(value);
350
+ if (FORMULA.test(text) && text.length > 1 && !NUMBER.test(text)) text = `'${text}`;
351
+ return /["\r\n]/.test(text) || text.includes(separator) ? `"${text.replace(/"/g, "\"\"")}"` : text;
352
+ }
353
+ function toCsv(rows, columns, options = {}) {
354
+ const separator = options.separator ?? ",";
355
+ const read = options.value ?? ((row, column) => resolveField(row, column.field));
356
+ const lines = rows.map((row) => columns.map((column) => csvCell(read(row, column), separator)).join(separator));
357
+ if (options.header !== false) lines.unshift(columns.map((column) => csvCell(columnLabel(column), separator)).join(separator));
358
+ return lines.join("\r\n");
359
+ }
360
+ function downloadCsv(document, csv, filename) {
361
+ const view = document.defaultView;
362
+ if (!view?.URL?.createObjectURL) return;
363
+ const url = view.URL.createObjectURL(new Blob(["", csv], { type: "text/csv;charset=utf-8" }));
364
+ const link = document.createElement("a");
365
+ link.href = url;
366
+ link.download = filename.endsWith(".csv") ? filename : `${filename}.csv`;
367
+ link.style.display = "none";
368
+ document.body.appendChild(link);
369
+ link.click();
370
+ link.remove();
371
+ view.setTimeout(() => view.URL.revokeObjectURL(url));
372
+ }
373
+ var TxTableStyles = class TxTableStyles {
265
374
  static ɵfac = i0.ɵɵngDeclareFactory({
266
375
  minVersion: "12.0.0",
267
376
  version: "22.2.3",
268
377
  ngImport: i0,
269
- type: TxTableSettings,
378
+ type: TxTableStyles,
270
379
  deps: [],
271
380
  target: i0.ɵɵFactoryTarget.Component
272
381
  });
273
382
  static ɵcmp = i0.ɵɵngDeclareComponent({
274
- minVersion: "17.0.0",
383
+ minVersion: "14.0.0",
275
384
  version: "22.2.3",
276
- type: TxTableSettings,
385
+ type: TxTableStyles,
277
386
  isStandalone: true,
278
- selector: "tx-table-settings",
279
- inputs: {
280
- columns: {
281
- classPropertyName: "columns",
282
- publicName: "columns",
283
- isSignal: true,
284
- isRequired: false,
285
- transformFunction: null
286
- },
287
- hidden: {
288
- classPropertyName: "hidden",
289
- publicName: "hidden",
290
- isSignal: true,
291
- isRequired: false,
292
- transformFunction: null
293
- },
294
- showColumns: {
295
- classPropertyName: "showColumns",
296
- publicName: "showColumns",
297
- isSignal: true,
298
- isRequired: false,
299
- transformFunction: null
300
- },
301
- showActions: {
302
- classPropertyName: "showActions",
303
- publicName: "showActions",
387
+ selector: "tx-table-styles",
388
+ ngImport: i0,
389
+ template: "",
390
+ isInline: true,
391
+ styles: [".tx-table__drag-preview{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:var(--tx-table-header-cell-padding);border:1px solid var(--tx-table-drag-preview-border-color);border-radius:var(--tx-table-drag-preview-border-radius);background:var(--tx-table-drag-preview-background);box-shadow:var(--tx-table-drag-preview-shadow);color:var(--tx-table-header-cell-color);font-family:inherit;font-size:var(--tx-table-header-cell-font-size);font-weight:var(--tx-table-header-cell-font-weight);list-style:none}.tx-table__drag-preview .tx-table__resizer{display:none}.cdk-drag-animating.tx-table__th{transition:transform .3s cubic-bezier(.2,.8,.4,1)}.tx-table__menu-action{display:inline-flex;flex-shrink:0;pointer-events:none}.tx-table__menu-action .tx-button{width:24px;min-width:24px;height:24px;padding:0;font-size:10.5px}.tx-table__menu-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-menu__item:has(.tx-table__menu-action :is(button,a):disabled){opacity:.5;pointer-events:none}@media(prefers-reduced-motion:reduce){.cdk-drag-animating.tx-table__th{transition:none}}\n"],
392
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
393
+ encapsulation: i0.ViewEncapsulation.None
394
+ });
395
+ };
396
+ i0.ɵɵngDeclareClassMetadata({
397
+ minVersion: "12.0.0",
398
+ version: "22.2.3",
399
+ ngImport: i0,
400
+ type: TxTableStyles,
401
+ decorators: [{
402
+ type: Component,
403
+ args: [{
404
+ selector: "tx-table-styles",
405
+ template: "",
406
+ encapsulation: ViewEncapsulation.None,
407
+ changeDetection: ChangeDetectionStrategy.OnPush,
408
+ styles: [".tx-table__drag-preview{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:var(--tx-table-header-cell-padding);border:1px solid var(--tx-table-drag-preview-border-color);border-radius:var(--tx-table-drag-preview-border-radius);background:var(--tx-table-drag-preview-background);box-shadow:var(--tx-table-drag-preview-shadow);color:var(--tx-table-header-cell-color);font-family:inherit;font-size:var(--tx-table-header-cell-font-size);font-weight:var(--tx-table-header-cell-font-weight);list-style:none}.tx-table__drag-preview .tx-table__resizer{display:none}.cdk-drag-animating.tx-table__th{transition:transform .3s cubic-bezier(.2,.8,.4,1)}.tx-table__menu-action{display:inline-flex;flex-shrink:0;pointer-events:none}.tx-table__menu-action .tx-button{width:24px;min-width:24px;height:24px;padding:0;font-size:10.5px}.tx-table__menu-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-menu__item:has(.tx-table__menu-action :is(button,a):disabled){opacity:.5;pointer-events:none}@media(prefers-reduced-motion:reduce){.cdk-drag-animating.tx-table__th{transition:none}}\n"]
409
+ }]
410
+ }]
411
+ });
412
+ const TX_TABLE = new InjectionToken("TX_TABLE");
413
+ const MAX_RULES = 2;
414
+ function toDateInput(value) {
415
+ if (!(value instanceof Date) || Number.isNaN(value.getTime())) return "";
416
+ const pad = (part) => String(part).padStart(2, "0");
417
+ return `${value.getFullYear()}-${pad(value.getMonth() + 1)}-${pad(value.getDate())}`;
418
+ }
419
+ function fromDateInput(value) {
420
+ const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
421
+ return match ? new Date(Number(match[1]), Number(match[2]) - 1, Number(match[3])) : null;
422
+ }
423
+ var TxTableColumnFilter = class TxTableColumnFilter {
424
+ table = inject(TX_TABLE);
425
+ panel = viewChild("panel", ...ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []);
426
+ timer;
427
+ column = input.required(...ngDevMode ? [{ debugName: "column" }] : /* istanbul ignore next */ []);
428
+ display = input("menu", ...ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []);
429
+ maxRules = MAX_RULES;
430
+ translations = injectTranslations();
431
+ type = computed(() => this.column().filterOptions?.length ? "options" : this.column().filterType ?? "text", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
432
+ modes = computed(() => this.type() === "options" || this.type() === "boolean" ? [] : this.column().filterMatchModes ?? TX_FILTER_MATCH_MODES[this.column().filterType ?? "text"], ...ngDevMode ? [{ debugName: "modes" }] : /* istanbul ignore next */ []);
433
+ current = computed(() => this.table.filters()[this.column().field], ...ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []);
434
+ active = computed(() => isFilterActive(this.current()), ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
435
+ draft = signal({
436
+ operator: "and",
437
+ rules: [{
438
+ value: null,
439
+ matchMode: "startsWith"
440
+ }]
441
+ }, ...ngDevMode ? [{ debugName: "draft" }] : /* istanbul ignore next */ []);
442
+ live = computed(() => this.current() ?? this.empty(), ...ngDevMode ? [{ debugName: "live" }] : /* istanbul ignore next */ []);
443
+ modeOptions = computed(() => this.modes().map((mode) => ({
444
+ value: mode,
445
+ label: this.translations()[mode]
446
+ })), ...ngDevMode ? [{ debugName: "modeOptions" }] : /* istanbul ignore next */ []);
447
+ operatorOptions = computed(() => [{
448
+ value: "and",
449
+ label: this.translations().filterMatchAll
450
+ }, {
451
+ value: "or",
452
+ label: this.translations().filterMatchAny
453
+ }], ...ngDevMode ? [{ debugName: "operatorOptions" }] : /* istanbul ignore next */ []);
454
+ booleanOptions = computed(() => [
455
+ {
456
+ value: null,
457
+ label: this.translations().filterAny
458
+ },
459
+ {
460
+ value: true,
461
+ label: this.translations().yes
462
+ },
463
+ {
464
+ value: false,
465
+ label: this.translations().no
466
+ }
467
+ ], ...ngDevMode ? [{ debugName: "booleanOptions" }] : /* istanbul ignore next */ []);
468
+ modeItems = computed(() => {
469
+ const selected = this.live().rules[0]?.matchMode;
470
+ return this.modeOptions().map((option) => ({
471
+ id: option.value,
472
+ label: option.label,
473
+ icon: option.value === selected ? "check" : void 0,
474
+ command: () => this.setLiveMode(option.value)
475
+ }));
476
+ }, ...ngDevMode ? [{ debugName: "modeItems" }] : /* istanbul ignore next */ []);
477
+ buttonLabel = computed(() => this.translations().filterColumn.replace("{column}", columnLabel(this.column())), ...ngDevMode ? [{ debugName: "buttonLabel" }] : /* istanbul ignore next */ []);
478
+ valueLabel = computed(() => `${columnLabel(this.column())}: ${this.translations().filterValue}`, ...ngDevMode ? [{ debugName: "valueLabel" }] : /* istanbul ignore next */ []);
479
+ constructor() {
480
+ inject(DestroyRef).onDestroy(() => clearTimeout(this.timer));
481
+ }
482
+ empty() {
483
+ return {
484
+ operator: "and",
485
+ rules: [{
486
+ value: null,
487
+ matchMode: defaultMatchMode(this.column())
488
+ }]
489
+ };
490
+ }
491
+ startDraft() {
492
+ const current = this.current();
493
+ this.draft.set(current ? {
494
+ operator: current.operator,
495
+ rules: current.rules.map((rule) => ({ ...rule }))
496
+ } : this.empty());
497
+ }
498
+ dateValue(value) {
499
+ return toDateInput(value);
500
+ }
501
+ parseDate(value) {
502
+ return fromDateInput(value);
503
+ }
504
+ setValue(index, value, live) {
505
+ if (live) {
506
+ const filter = this.live();
507
+ const rules = filter.rules.map((rule, position) => position === index ? {
508
+ ...rule,
509
+ value
510
+ } : rule);
511
+ clearTimeout(this.timer);
512
+ const commit = () => this.table.applyFilter(this.column().field, {
513
+ ...filter,
514
+ rules
515
+ });
516
+ if (this.type() === "text") this.timer = setTimeout(commit, this.table.filterDelay());
517
+ else commit();
518
+ return;
519
+ }
520
+ this.updateRules((rules) => rules.map((rule, position) => position === index ? {
521
+ ...rule,
522
+ value
523
+ } : rule));
524
+ }
525
+ setMode(index, matchMode) {
526
+ this.updateRules((rules) => rules.map((rule, position) => position === index ? {
527
+ ...rule,
528
+ matchMode
529
+ } : rule));
530
+ }
531
+ setLiveMode(matchMode) {
532
+ const filter = this.live();
533
+ this.table.applyFilter(this.column().field, {
534
+ ...filter,
535
+ rules: filter.rules.map((rule, index) => index === 0 ? {
536
+ ...rule,
537
+ matchMode
538
+ } : rule)
539
+ });
540
+ }
541
+ setOperator(operator) {
542
+ this.draft.set({
543
+ ...this.draft(),
544
+ operator
545
+ });
546
+ }
547
+ addRule() {
548
+ this.updateRules((rules) => [...rules, {
549
+ value: null,
550
+ matchMode: defaultMatchMode(this.column())
551
+ }]);
552
+ }
553
+ removeRule(index) {
554
+ this.updateRules((rules) => rules.filter((_, position) => position !== index));
555
+ }
556
+ apply() {
557
+ this.table.applyFilter(this.column().field, this.draft());
558
+ this.panel()?.hide();
559
+ }
560
+ clear() {
561
+ this.draft.set(this.empty());
562
+ this.table.applyFilter(this.column().field, null);
563
+ this.panel()?.hide();
564
+ }
565
+ updateRules(change) {
566
+ this.draft.set({
567
+ ...this.draft(),
568
+ rules: change(this.draft().rules)
569
+ });
570
+ }
571
+ static ɵfac = i0.ɵɵngDeclareFactory({
572
+ minVersion: "12.0.0",
573
+ version: "22.2.3",
574
+ ngImport: i0,
575
+ type: TxTableColumnFilter,
576
+ deps: [],
577
+ target: i0.ɵɵFactoryTarget.Component
578
+ });
579
+ static ɵcmp = i0.ɵɵngDeclareComponent({
580
+ minVersion: "17.0.0",
581
+ version: "22.2.3",
582
+ type: TxTableColumnFilter,
583
+ isStandalone: true,
584
+ selector: "tx-table-column-filter",
585
+ inputs: {
586
+ column: {
587
+ classPropertyName: "column",
588
+ publicName: "column",
304
589
  isSignal: true,
305
- isRequired: false,
590
+ isRequired: true,
306
591
  transformFunction: null
307
592
  },
308
- unstyled: {
309
- classPropertyName: "unstyled",
310
- publicName: "unstyled",
593
+ display: {
594
+ classPropertyName: "display",
595
+ publicName: "display",
311
596
  isSignal: true,
312
597
  isRequired: false,
313
598
  transformFunction: null
314
599
  }
315
600
  },
316
- outputs: { columnToggled: "columnToggled" },
317
- host: { classAttribute: "tx-table-settings" },
601
+ host: {
602
+ properties: { "class.tx-table-column-filter--row": "display() === 'row'" },
603
+ classAttribute: "tx-table-column-filter"
604
+ },
605
+ viewQueries: [{
606
+ propertyName: "panel",
607
+ first: true,
608
+ predicate: ["panel"],
609
+ descendants: true,
610
+ isSignal: true
611
+ }],
318
612
  ngImport: i0,
319
613
  template: `
320
- <button
321
- txButton
322
- type="button"
323
- size="small"
324
- icon="cog"
325
- class="tx-table-settings__button"
326
- [unstyled]="unstyled()"
327
- [txTooltip]="translations().tableSettings"
328
- [attr.aria-label]="translations().tableSettings"
329
- [txPopoverTrigger]="panel"
330
- ></button>
331
- <tx-popover #panel placement="bottom-end" [ariaLabel]="translations().tableSettings" [unstyled]="unstyled()">
332
- <div class="tx-table-settings__panel">
333
- @if (tabs().length > 1) {
334
- <div class="tx-table-settings__tabs" role="tablist">
335
- @for (tab of tabs(); track tab) {
336
- <button
337
- type="button"
338
- role="tab"
339
- class="tx-table-settings__tab"
340
- [id]="id + '-' + tab"
341
- [attr.aria-selected]="tab === currentTab()"
342
- [attr.aria-controls]="id + '-panel'"
343
- [attr.tabindex]="tab === currentTab() ? 0 : -1"
344
- [txTooltip]="tab === 'columns' ? translations().tableColumnsHint : translations().tableActionsHint"
345
- (click)="activeTab.set(tab)"
346
- (keydown.arrowright)="moveTab(1)"
347
- (keydown.arrowleft)="moveTab(-1)"
348
- >
349
- <tx-icon aria-hidden="true" [name]="tab === 'columns' ? 'table' : 'bolt'" />
350
- {{ tab === 'columns' ? translations().tableColumns : translations().tableActions }}
351
- </button>
352
- }
353
- </div>
354
- } @else {
355
- <div class="tx-table-settings__title" [id]="id + '-' + currentTab()">
356
- <tx-icon aria-hidden="true" [name]="currentTab() === 'columns' ? 'table' : 'bolt'" />
357
- <span>{{ currentTab() === 'columns' ? translations().tableColumns : translations().tableActions }}</span>
358
- </div>
614
+ <ng-template #editor let-rule let-index="index" let-live="live">
615
+ @switch (type()) {
616
+ @case ('numeric') {
617
+ <tx-input-number
618
+ size="small"
619
+ class="tx-table-filter__value"
620
+ [ariaLabel]="valueLabel()"
621
+ [placeholder]="column().filterPlaceholder"
622
+ [ngModel]="rule.value"
623
+ (ngModelChange)="setValue(index, $event, live)"
624
+ />
359
625
  }
360
- <div
361
- class="tx-table-settings__list"
362
- [id]="id + '-panel'"
363
- [attr.role]="tabs().length > 1 ? 'tabpanel' : 'group'"
364
- [attr.aria-labelledby]="id + '-' + currentTab()"
365
- >
366
- @if (currentTab() === 'columns') {
367
- <div
368
- #columnList
369
- cdkDropList
370
- class="tx-table-settings__actions"
371
- [cdkDropListDisabled]="!canReorder()"
372
- (cdkDropListDropped)="dropColumn($event)"
373
- >
374
- @for (column of listedColumns(); track column.field) {
375
- <div
376
- cdkDrag
377
- cdkDragLockAxis="y"
378
- class="tx-table-settings__action"
379
- [cdkDragBoundary]="columnList"
380
- [class.tx-table-settings__action--static]="!canReorder() || column.reorderable === false"
381
- [cdkDragDisabled]="!canReorder() || column.reorderable === false"
382
- >
383
- @if (canReorder()) {
384
- <span
385
- cdkDragHandle
386
- class="tx-table-settings__handle"
387
- [class.tx-table-settings__handle--hidden]="column.reorderable === false"
388
- [attr.aria-hidden]="true"
389
- >
390
- <tx-icon name="bars" />
391
- </span>
392
- }
393
- <tx-checkbox
394
- binary
395
- [label]="label(column)"
396
- [disabled]="column.hideable === false"
397
- [ngModel]="!hidden().has(column.field)"
398
- (ngModelChange)="columnToggled.emit({ field: column.field, visible: $event })"
399
- (keydown.alt.arrowup)="moveColumn(column, -1, $event)"
400
- (keydown.alt.arrowdown)="moveColumn(column, 1, $event)"
401
- />
402
- </div>
403
- }
404
- </div>
626
+ @case ('date') {
627
+ <input
628
+ txInput
629
+ type="date"
630
+ size="small"
631
+ class="tx-table-filter__value"
632
+ [attr.aria-label]="valueLabel()"
633
+ [value]="dateValue(rule.value)"
634
+ (change)="setValue(index, parseDate($any($event.target).value), live)"
635
+ />
636
+ }
637
+ @case ('boolean') {
638
+ <tx-select
639
+ size="small"
640
+ class="tx-table-filter__value"
641
+ optionLabel="label"
642
+ optionValue="value"
643
+ [options]="booleanOptions()"
644
+ [ariaLabel]="valueLabel()"
645
+ [ngModel]="rule.value"
646
+ (ngModelChange)="setValue(index, $event, true)"
647
+ />
648
+ }
649
+ @case ('options') {
650
+ <tx-multiselect
651
+ size="small"
652
+ class="tx-table-filter__value"
653
+ optionLabel="label"
654
+ optionValue="value"
655
+ [maxSelectedLabels]="2"
656
+ [options]="column().filterOptions ?? []"
657
+ [ariaLabel]="valueLabel()"
658
+ [placeholder]="column().filterPlaceholder ?? translations().filterAny"
659
+ [ngModel]="rule.value ?? []"
660
+ (ngModelChange)="setValue(index, $event, live)"
661
+ />
662
+ }
663
+ @default {
664
+ <input
665
+ txInput
666
+ type="text"
667
+ size="small"
668
+ class="tx-table-filter__value"
669
+ [attr.aria-label]="valueLabel()"
670
+ [placeholder]="column().filterPlaceholder ?? ''"
671
+ [value]="rule.value ?? ''"
672
+ (input)="setValue(index, $any($event.target).value, live)"
673
+ (keydown.enter)="apply()"
674
+ />
675
+ }
676
+ }
677
+ </ng-template>
678
+
679
+ @if (display() === 'row') {
680
+ <div class="tx-table-filter__row">
681
+ <ng-container [ngTemplateOutlet]="editor" [ngTemplateOutletContext]="{ $implicit: live().rules[0], index: 0, live: true }" />
682
+ @if (modes().length > 1) {
683
+ <button
684
+ txButton
685
+ type="button"
686
+ text
687
+ rounded
688
+ size="small"
689
+ severity="secondary"
690
+ class="tx-table-filter__button"
691
+ [class.tx-table-filter__button--active]="active()"
692
+ [icon]="active() ? 'filter-fill' : 'filter'"
693
+ [attr.aria-label]="buttonLabel()"
694
+ [txMenuTrigger]="modeMenu"
695
+ ></button>
696
+ <tx-menu #modeMenu popup [model]="modeItems()" [ariaLabel]="translations().filterMatchMode" />
697
+ }
698
+ </div>
699
+ } @else {
700
+ <button
701
+ txButton
702
+ type="button"
703
+ text
704
+ rounded
705
+ size="small"
706
+ severity="secondary"
707
+ class="tx-table-filter__button"
708
+ [class.tx-table-filter__button--active]="active()"
709
+ [icon]="active() ? 'filter-fill' : 'filter'"
710
+ [attr.aria-label]="buttonLabel()"
711
+ [txPopoverTrigger]="panel"
712
+ (click)="$event.stopPropagation()"
713
+ ></button>
714
+ <tx-popover #panel placement="bottom-start" [ariaLabel]="buttonLabel()" (opened)="startDraft()">
715
+ <div class="tx-table-filter">
716
+ @if (type() === 'boolean' || type() === 'options') {
717
+ <ng-container [ngTemplateOutlet]="editor" [ngTemplateOutletContext]="{ $implicit: draft().rules[0], index: 0, live: false }" />
405
718
  } @else {
406
- <div #actionList cdkDropList class="tx-table-settings__actions" (cdkDropListDropped)="dropAction($event)">
407
- @for (action of store.registeredActions(); track action.id; let index = $index) {
408
- <div cdkDrag cdkDragLockAxis="y" class="tx-table-settings__action" [cdkDragBoundary]="actionList">
409
- <span cdkDragHandle class="tx-table-settings__handle" aria-hidden="true">
410
- <tx-icon aria-hidden="true" name="bars" />
411
- </span>
412
- <tx-checkbox
413
- binary
414
- [label]="action.label"
415
- [ngModel]="store.isPinned(action.id)"
416
- (ngModelChange)="store.setPinned(action.id, $event)"
417
- (keydown.alt.arrowup)="moveAction(index, -1, $event)"
418
- (keydown.alt.arrowdown)="moveAction(index, 1, $event)"
719
+ @if (draft().rules.length > 1) {
720
+ <tx-select
721
+ size="small"
722
+ optionLabel="label"
723
+ optionValue="value"
724
+ [options]="operatorOptions()"
725
+ [ariaLabel]="translations().filterMatchAll + ' / ' + translations().filterMatchAny"
726
+ [ngModel]="draft().operator"
727
+ (ngModelChange)="setOperator($event)"
728
+ />
729
+ }
730
+ @for (rule of draft().rules; track $index; let index = $index) {
731
+ <div class="tx-table-filter__rule">
732
+ @if (modes().length > 1) {
733
+ <tx-select
734
+ size="small"
735
+ optionLabel="label"
736
+ optionValue="value"
737
+ [options]="modeOptions()"
738
+ [ariaLabel]="translations().filterMatchMode"
739
+ [ngModel]="rule.matchMode"
740
+ (ngModelChange)="setMode(index, $event)"
419
741
  />
420
- </div>
421
- }
422
- </div>
742
+ }
743
+ <ng-container [ngTemplateOutlet]="editor" [ngTemplateOutletContext]="{ $implicit: rule, index, live: false }" />
744
+ @if (draft().rules.length > 1) {
745
+ <button
746
+ txButton
747
+ type="button"
748
+ text
749
+ size="small"
750
+ severity="danger"
751
+ icon="trash"
752
+ [label]="translations().filterRemoveRule"
753
+ (click)="removeRule(index)"
754
+ ></button>
755
+ }
756
+ </div>
757
+ }
758
+ @if (draft().rules.length < maxRules) {
759
+ <button txButton type="button" text size="small" icon="plus" [label]="translations().filterAddRule" (click)="addRule()"></button>
760
+ }
423
761
  }
762
+ <div class="tx-table-filter__footer">
763
+ <button txButton type="button" outlined size="small" severity="secondary" [label]="translations().clear" (click)="clear()"></button>
764
+ <button txButton type="button" size="small" [label]="translations().filterApply" (click)="apply()"></button>
765
+ </div>
424
766
  </div>
425
- </div>
426
- </tx-popover>
767
+ </tx-popover>
768
+ }
427
769
  `,
428
770
  isInline: true,
429
- styles: [":host{display:inline-flex}.tx-table-settings__panel{display:flex;flex-direction:column;box-sizing:border-box;width:var(--tx-table-settings-width);gap:var(--tx-table-settings-gap)}.tx-table-settings__tabs,.tx-table-settings__title{display:flex;align-items:center;gap:var(--tx-table-settings-title-gap)}.tx-table-settings__title{padding-bottom:var(--tx-table-settings-item-padding);border-bottom:1px solid var(--tx-surface-border);color:var(--tx-text-primary);font-weight:var(--tx-table-settings-title-font-weight)}.tx-table-settings__tabs{border-bottom:1px solid var(--tx-surface-border)}.tx-table-settings__tab{display:inline-flex;flex:1;align-items:center;justify-content:center;gap:var(--tx-table-settings-title-gap);margin:0 0 -1px;padding:var(--tx-table-settings-item-padding) 0 calc(var(--tx-table-settings-item-padding) * 2);border:0;border-bottom:2px solid transparent;background:none;color:var(--tx-text-muted);font:inherit;font-weight:var(--tx-table-settings-title-font-weight);cursor:pointer}.tx-table-settings__tab[aria-selected=true]{border-bottom-color:var(--tx-primary-base);color:var(--tx-primary-base)}.tx-table-settings__tab:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}.tx-table-settings__list{display:flex;flex-direction:column;gap:var(--tx-table-settings-gap);max-height:var(--tx-table-settings-max-height);overflow-y:auto}.tx-table-settings__actions{display:flex;flex-direction:column;gap:calc(var(--tx-table-settings-item-padding) / 2)}.tx-table-settings__action{display:flex;align-items:center;gap:var(--tx-table-settings-title-gap);padding:var(--tx-table-settings-item-padding);border-radius:var(--tx-table-settings-item-radius);background:var(--tx-surface-card)}.tx-table-settings__action:hover{background:var(--tx-table-settings-item-hover-background)}.tx-table-settings__action--static{background:transparent}.tx-table-settings__handle--hidden{visibility:hidden}.tx-table-settings__handle{display:inline-flex;color:var(--tx-table-settings-handle-color);font-size:var(--tx-table-settings-handle-size);cursor:move}.cdk-drag-preview.tx-table-settings__action{box-shadow:var(--tx-shadow-overlay)}.cdk-drag-placeholder{opacity:.4}.cdk-drag-animating{transition:transform var(--tx-motion-duration) cubic-bezier(0,0,.2,1)}@media(prefers-reduced-motion:reduce){.cdk-drag-animating{transition:none}}\n"],
771
+ styles: [":host{display:inline-flex;min-width:0}:host(.tx-table-column-filter--row){display:flex;width:100%}.tx-table-filter__row{display:flex;flex:1;align-items:center;gap:var(--tx-table-filter-gap, 7px);min-width:0}.tx-table-filter__row .tx-table-filter__value{flex:1;min-width:0;width:100%}.tx-table-filter{display:flex;flex-direction:column;gap:var(--tx-table-filter-gap, 7px);min-width:var(--tx-table-filter-min-width, 175px)}.tx-table-filter__rule{display:flex;flex-direction:column;gap:var(--tx-table-filter-gap, 7px);padding-bottom:var(--tx-table-filter-gap, 7px);border-bottom:1px solid var(--tx-surface-border)}.tx-table-filter__rule:last-of-type{padding-bottom:0;border-bottom:0}.tx-table-filter__footer{display:flex;align-items:center;justify-content:space-between;gap:var(--tx-table-filter-gap, 7px)}.tx-table-filter__value{width:100%}.tx-table-filter__button--active{color:var(--tx-primary-base)}\n"],
430
772
  dependencies: [
773
+ {
774
+ kind: "directive",
775
+ type: NgTemplateOutlet,
776
+ selector: "[ngTemplateOutlet]",
777
+ inputs: [
778
+ "ngTemplateOutletContext",
779
+ "ngTemplateOutlet",
780
+ "ngTemplateOutletInjector"
781
+ ]
782
+ },
431
783
  {
432
784
  kind: "ngmodule",
433
785
  type: FormsModule
434
786
  },
435
787
  {
436
788
  kind: "directive",
437
- type: i1.NgControlStatus,
789
+ type: i1$1.NgControlStatus,
438
790
  selector: "[formControlName],[ngModel],[formControl]"
439
791
  },
440
792
  {
441
793
  kind: "directive",
442
- type: i1.NgModel,
794
+ type: i1$1.NgModel,
443
795
  selector: "[ngModel]:not([formControlName]):not([formControl])",
444
796
  inputs: [
445
797
  "name",
@@ -451,76 +803,9 @@ var TxTableSettings = class TxTableSettings {
451
803
  exportAs: ["ngModel"]
452
804
  },
453
805
  {
454
- kind: "directive",
455
- type: CdkDropList,
456
- selector: "[cdkDropList], cdk-drop-list",
457
- inputs: [
458
- "cdkDropListConnectedTo",
459
- "cdkDropListData",
460
- "cdkDropListOrientation",
461
- "id",
462
- "cdkDropListLockAxis",
463
- "cdkDropListDisabled",
464
- "cdkDropListSortingDisabled",
465
- "cdkDropListEnterPredicate",
466
- "cdkDropListSortPredicate",
467
- "cdkDropListAutoScrollDisabled",
468
- "cdkDropListAutoScrollStep",
469
- "cdkDropListElementContainer",
470
- "cdkDropListHasAnchor"
471
- ],
472
- outputs: [
473
- "cdkDropListDropped",
474
- "cdkDropListEntered",
475
- "cdkDropListExited",
476
- "cdkDropListSorted"
477
- ],
478
- exportAs: ["cdkDropList"]
479
- },
480
- {
481
- kind: "directive",
482
- type: CdkDrag,
483
- selector: "[cdkDrag]",
484
- inputs: [
485
- "cdkDragData",
486
- "cdkDragLockAxis",
487
- "cdkDragRootElement",
488
- "cdkDragBoundary",
489
- "cdkDragStartDelay",
490
- "cdkDragFreeDragPosition",
491
- "cdkDragDisabled",
492
- "cdkDragConstrainPosition",
493
- "cdkDragPreviewClass",
494
- "cdkDragPreviewContainer",
495
- "cdkDragScale"
496
- ],
497
- outputs: [
498
- "cdkDragStarted",
499
- "cdkDragReleased",
500
- "cdkDragEnded",
501
- "cdkDragEntered",
502
- "cdkDragExited",
503
- "cdkDragDropped",
504
- "cdkDragMoved"
505
- ],
506
- exportAs: ["cdkDrag"]
507
- },
508
- {
509
- kind: "directive",
510
- type: CdkDragHandle,
511
- selector: "[cdkDragHandle]",
512
- inputs: ["cdkDragHandleDisabled"]
513
- },
514
- {
515
- kind: "component",
516
- type: TxIcon,
517
- selector: "tx-icon",
518
- inputs: ["name"]
519
- },
520
- {
521
- kind: "component",
522
- type: TxButton,
523
- selector: "button[txButton], a[txButton]",
806
+ kind: "component",
807
+ type: TxButton,
808
+ selector: "button[txButton], a[txButton]",
524
809
  inputs: [
525
810
  "label",
526
811
  "severity",
@@ -548,23 +833,48 @@ var TxTableSettings = class TxTableSettings {
548
833
  "unstyled"
549
834
  ]
550
835
  },
836
+ {
837
+ kind: "directive",
838
+ type: TxInput,
839
+ selector: "input[txInput], textarea[txInput]",
840
+ inputs: [
841
+ "invalid",
842
+ "size",
843
+ "variant",
844
+ "fluid",
845
+ "dt",
846
+ "pt",
847
+ "ptOptions",
848
+ "unstyled"
849
+ ]
850
+ },
551
851
  {
552
852
  kind: "component",
553
- type: TxCheckbox,
554
- selector: "tx-checkbox",
853
+ type: TxInputNumber,
854
+ selector: "tx-input-number",
555
855
  inputs: [
556
- "label",
557
- "description",
558
- "value",
559
- "binary",
560
- "trueValue",
561
- "falseValue",
562
- "indeterminate",
563
- "icon",
564
- "indeterminateIcon",
856
+ "mode",
857
+ "currency",
858
+ "currencyDisplay",
859
+ "locale",
860
+ "useGrouping",
861
+ "minFractionDigits",
862
+ "maxFractionDigits",
863
+ "prefix",
864
+ "suffix",
865
+ "min",
866
+ "max",
867
+ "step",
868
+ "showButtons",
869
+ "buttonLayout",
870
+ "incrementIcon",
871
+ "decrementIcon",
872
+ "allowEmpty",
873
+ "showClear",
874
+ "placeholder",
565
875
  "size",
566
876
  "variant",
567
- "tile",
877
+ "fluid",
568
878
  "invalid",
569
879
  "disabled",
570
880
  "readonly",
@@ -579,7 +889,44 @@ var TxTableSettings = class TxTableSettings {
579
889
  "ptOptions",
580
890
  "unstyled"
581
891
  ],
582
- outputs: ["indeterminateChange", "changed"]
892
+ outputs: ["changed", "cleared"]
893
+ },
894
+ {
895
+ kind: "component",
896
+ type: TxSelect,
897
+ selector: "tx-select",
898
+ inputs: [
899
+ "options",
900
+ "editable",
901
+ "checkmark",
902
+ "dropdownIcon",
903
+ "dt",
904
+ "pt",
905
+ "ptOptions",
906
+ "unstyled"
907
+ ],
908
+ outputs: ["changed"]
909
+ },
910
+ {
911
+ kind: "component",
912
+ type: TxMultiselect,
913
+ selector: "tx-multiselect",
914
+ inputs: [
915
+ "options",
916
+ "display",
917
+ "maxSelectedLabels",
918
+ "selectedItemsLabel",
919
+ "selectAllLabel",
920
+ "countLabel",
921
+ "selectionLimit",
922
+ "showToggleAll",
923
+ "dropdownIcon",
924
+ "dt",
925
+ "pt",
926
+ "ptOptions",
927
+ "unstyled"
928
+ ],
929
+ outputs: ["changed"]
583
930
  },
584
931
  {
585
932
  kind: "component",
@@ -618,31 +965,34 @@ var TxTableSettings = class TxTableSettings {
618
965
  inputs: ["txPopoverTrigger"]
619
966
  },
620
967
  {
621
- kind: "directive",
622
- type: TxTooltip,
623
- selector: "[txTooltip]",
968
+ kind: "component",
969
+ type: TxMenu,
970
+ selector: "tx-menu, tx-tiered-menu",
624
971
  inputs: [
625
- "txTooltip",
626
- "tooltipPlacement",
627
- "tooltipEvent",
628
- "tooltipShowDelay",
629
- "tooltipHideDelay",
630
- "tooltipLife",
631
- "tooltipOffset",
632
- "tooltipArrow",
633
- "tooltipInteractive",
634
- "tooltipDisabled",
635
- "tooltipOverflowOnly",
636
- "tooltipMultiline",
637
- "tooltipContext",
638
- "tooltipClass",
639
- "tooltipDt",
640
- "tooltipPt",
641
- "tooltipPtOptions",
642
- "tooltipUnstyled"
972
+ "model",
973
+ "popup",
974
+ "tiered",
975
+ "placement",
976
+ "offset",
977
+ "variant",
978
+ "ariaLabel",
979
+ "ariaLabelledBy",
980
+ "dt",
981
+ "pt",
982
+ "ptOptions",
983
+ "unstyled"
643
984
  ],
644
- outputs: ["tooltipShown", "tooltipHidden"],
645
- exportAs: ["txTooltip"]
985
+ outputs: [
986
+ "itemSelected",
987
+ "opened",
988
+ "closed"
989
+ ]
990
+ },
991
+ {
992
+ kind: "directive",
993
+ type: TxMenuTrigger,
994
+ selector: "[txMenuTrigger]",
995
+ inputs: ["txMenuTrigger"]
646
996
  }
647
997
  ],
648
998
  changeDetection: i0.ChangeDetectionStrategy.OnPush
@@ -652,699 +1002,457 @@ i0.ɵɵngDeclareClassMetadata({
652
1002
  minVersion: "12.0.0",
653
1003
  version: "22.2.3",
654
1004
  ngImport: i0,
655
- type: TxTableSettings,
1005
+ type: TxTableColumnFilter,
656
1006
  decorators: [{
657
1007
  type: Component,
658
1008
  args: [{
659
- selector: "tx-table-settings",
1009
+ selector: "tx-table-column-filter",
660
1010
  imports: [
1011
+ NgTemplateOutlet,
661
1012
  FormsModule,
662
- CdkDropList,
663
- CdkDrag,
664
- CdkDragHandle,
665
- TxIcon,
666
1013
  TxButton,
667
- TxCheckbox,
1014
+ TxInput,
1015
+ TxInputNumber,
1016
+ TxSelect,
1017
+ TxMultiselect,
668
1018
  TxPopover,
669
1019
  TxPopoverTrigger,
670
- TxTooltip
1020
+ TxMenu,
1021
+ TxMenuTrigger
671
1022
  ],
672
1023
  template: `
673
- <button
674
- txButton
675
- type="button"
676
- size="small"
677
- icon="cog"
678
- class="tx-table-settings__button"
679
- [unstyled]="unstyled()"
680
- [txTooltip]="translations().tableSettings"
681
- [attr.aria-label]="translations().tableSettings"
682
- [txPopoverTrigger]="panel"
683
- ></button>
684
- <tx-popover #panel placement="bottom-end" [ariaLabel]="translations().tableSettings" [unstyled]="unstyled()">
685
- <div class="tx-table-settings__panel">
686
- @if (tabs().length > 1) {
687
- <div class="tx-table-settings__tabs" role="tablist">
688
- @for (tab of tabs(); track tab) {
689
- <button
690
- type="button"
691
- role="tab"
692
- class="tx-table-settings__tab"
693
- [id]="id + '-' + tab"
694
- [attr.aria-selected]="tab === currentTab()"
695
- [attr.aria-controls]="id + '-panel'"
696
- [attr.tabindex]="tab === currentTab() ? 0 : -1"
697
- [txTooltip]="tab === 'columns' ? translations().tableColumnsHint : translations().tableActionsHint"
698
- (click)="activeTab.set(tab)"
699
- (keydown.arrowright)="moveTab(1)"
700
- (keydown.arrowleft)="moveTab(-1)"
701
- >
702
- <tx-icon aria-hidden="true" [name]="tab === 'columns' ? 'table' : 'bolt'" />
703
- {{ tab === 'columns' ? translations().tableColumns : translations().tableActions }}
704
- </button>
705
- }
706
- </div>
707
- } @else {
708
- <div class="tx-table-settings__title" [id]="id + '-' + currentTab()">
709
- <tx-icon aria-hidden="true" [name]="currentTab() === 'columns' ? 'table' : 'bolt'" />
710
- <span>{{ currentTab() === 'columns' ? translations().tableColumns : translations().tableActions }}</span>
711
- </div>
1024
+ <ng-template #editor let-rule let-index="index" let-live="live">
1025
+ @switch (type()) {
1026
+ @case ('numeric') {
1027
+ <tx-input-number
1028
+ size="small"
1029
+ class="tx-table-filter__value"
1030
+ [ariaLabel]="valueLabel()"
1031
+ [placeholder]="column().filterPlaceholder"
1032
+ [ngModel]="rule.value"
1033
+ (ngModelChange)="setValue(index, $event, live)"
1034
+ />
712
1035
  }
713
- <div
714
- class="tx-table-settings__list"
715
- [id]="id + '-panel'"
716
- [attr.role]="tabs().length > 1 ? 'tabpanel' : 'group'"
717
- [attr.aria-labelledby]="id + '-' + currentTab()"
718
- >
719
- @if (currentTab() === 'columns') {
720
- <div
721
- #columnList
722
- cdkDropList
723
- class="tx-table-settings__actions"
724
- [cdkDropListDisabled]="!canReorder()"
725
- (cdkDropListDropped)="dropColumn($event)"
726
- >
727
- @for (column of listedColumns(); track column.field) {
728
- <div
729
- cdkDrag
730
- cdkDragLockAxis="y"
731
- class="tx-table-settings__action"
732
- [cdkDragBoundary]="columnList"
733
- [class.tx-table-settings__action--static]="!canReorder() || column.reorderable === false"
734
- [cdkDragDisabled]="!canReorder() || column.reorderable === false"
735
- >
736
- @if (canReorder()) {
737
- <span
738
- cdkDragHandle
739
- class="tx-table-settings__handle"
740
- [class.tx-table-settings__handle--hidden]="column.reorderable === false"
741
- [attr.aria-hidden]="true"
742
- >
743
- <tx-icon name="bars" />
744
- </span>
745
- }
746
- <tx-checkbox
747
- binary
748
- [label]="label(column)"
749
- [disabled]="column.hideable === false"
750
- [ngModel]="!hidden().has(column.field)"
751
- (ngModelChange)="columnToggled.emit({ field: column.field, visible: $event })"
752
- (keydown.alt.arrowup)="moveColumn(column, -1, $event)"
753
- (keydown.alt.arrowdown)="moveColumn(column, 1, $event)"
754
- />
755
- </div>
756
- }
757
- </div>
1036
+ @case ('date') {
1037
+ <input
1038
+ txInput
1039
+ type="date"
1040
+ size="small"
1041
+ class="tx-table-filter__value"
1042
+ [attr.aria-label]="valueLabel()"
1043
+ [value]="dateValue(rule.value)"
1044
+ (change)="setValue(index, parseDate($any($event.target).value), live)"
1045
+ />
1046
+ }
1047
+ @case ('boolean') {
1048
+ <tx-select
1049
+ size="small"
1050
+ class="tx-table-filter__value"
1051
+ optionLabel="label"
1052
+ optionValue="value"
1053
+ [options]="booleanOptions()"
1054
+ [ariaLabel]="valueLabel()"
1055
+ [ngModel]="rule.value"
1056
+ (ngModelChange)="setValue(index, $event, true)"
1057
+ />
1058
+ }
1059
+ @case ('options') {
1060
+ <tx-multiselect
1061
+ size="small"
1062
+ class="tx-table-filter__value"
1063
+ optionLabel="label"
1064
+ optionValue="value"
1065
+ [maxSelectedLabels]="2"
1066
+ [options]="column().filterOptions ?? []"
1067
+ [ariaLabel]="valueLabel()"
1068
+ [placeholder]="column().filterPlaceholder ?? translations().filterAny"
1069
+ [ngModel]="rule.value ?? []"
1070
+ (ngModelChange)="setValue(index, $event, live)"
1071
+ />
1072
+ }
1073
+ @default {
1074
+ <input
1075
+ txInput
1076
+ type="text"
1077
+ size="small"
1078
+ class="tx-table-filter__value"
1079
+ [attr.aria-label]="valueLabel()"
1080
+ [placeholder]="column().filterPlaceholder ?? ''"
1081
+ [value]="rule.value ?? ''"
1082
+ (input)="setValue(index, $any($event.target).value, live)"
1083
+ (keydown.enter)="apply()"
1084
+ />
1085
+ }
1086
+ }
1087
+ </ng-template>
1088
+
1089
+ @if (display() === 'row') {
1090
+ <div class="tx-table-filter__row">
1091
+ <ng-container [ngTemplateOutlet]="editor" [ngTemplateOutletContext]="{ $implicit: live().rules[0], index: 0, live: true }" />
1092
+ @if (modes().length > 1) {
1093
+ <button
1094
+ txButton
1095
+ type="button"
1096
+ text
1097
+ rounded
1098
+ size="small"
1099
+ severity="secondary"
1100
+ class="tx-table-filter__button"
1101
+ [class.tx-table-filter__button--active]="active()"
1102
+ [icon]="active() ? 'filter-fill' : 'filter'"
1103
+ [attr.aria-label]="buttonLabel()"
1104
+ [txMenuTrigger]="modeMenu"
1105
+ ></button>
1106
+ <tx-menu #modeMenu popup [model]="modeItems()" [ariaLabel]="translations().filterMatchMode" />
1107
+ }
1108
+ </div>
1109
+ } @else {
1110
+ <button
1111
+ txButton
1112
+ type="button"
1113
+ text
1114
+ rounded
1115
+ size="small"
1116
+ severity="secondary"
1117
+ class="tx-table-filter__button"
1118
+ [class.tx-table-filter__button--active]="active()"
1119
+ [icon]="active() ? 'filter-fill' : 'filter'"
1120
+ [attr.aria-label]="buttonLabel()"
1121
+ [txPopoverTrigger]="panel"
1122
+ (click)="$event.stopPropagation()"
1123
+ ></button>
1124
+ <tx-popover #panel placement="bottom-start" [ariaLabel]="buttonLabel()" (opened)="startDraft()">
1125
+ <div class="tx-table-filter">
1126
+ @if (type() === 'boolean' || type() === 'options') {
1127
+ <ng-container [ngTemplateOutlet]="editor" [ngTemplateOutletContext]="{ $implicit: draft().rules[0], index: 0, live: false }" />
758
1128
  } @else {
759
- <div #actionList cdkDropList class="tx-table-settings__actions" (cdkDropListDropped)="dropAction($event)">
760
- @for (action of store.registeredActions(); track action.id; let index = $index) {
761
- <div cdkDrag cdkDragLockAxis="y" class="tx-table-settings__action" [cdkDragBoundary]="actionList">
762
- <span cdkDragHandle class="tx-table-settings__handle" aria-hidden="true">
763
- <tx-icon aria-hidden="true" name="bars" />
764
- </span>
765
- <tx-checkbox
766
- binary
767
- [label]="action.label"
768
- [ngModel]="store.isPinned(action.id)"
769
- (ngModelChange)="store.setPinned(action.id, $event)"
770
- (keydown.alt.arrowup)="moveAction(index, -1, $event)"
771
- (keydown.alt.arrowdown)="moveAction(index, 1, $event)"
1129
+ @if (draft().rules.length > 1) {
1130
+ <tx-select
1131
+ size="small"
1132
+ optionLabel="label"
1133
+ optionValue="value"
1134
+ [options]="operatorOptions()"
1135
+ [ariaLabel]="translations().filterMatchAll + ' / ' + translations().filterMatchAny"
1136
+ [ngModel]="draft().operator"
1137
+ (ngModelChange)="setOperator($event)"
1138
+ />
1139
+ }
1140
+ @for (rule of draft().rules; track $index; let index = $index) {
1141
+ <div class="tx-table-filter__rule">
1142
+ @if (modes().length > 1) {
1143
+ <tx-select
1144
+ size="small"
1145
+ optionLabel="label"
1146
+ optionValue="value"
1147
+ [options]="modeOptions()"
1148
+ [ariaLabel]="translations().filterMatchMode"
1149
+ [ngModel]="rule.matchMode"
1150
+ (ngModelChange)="setMode(index, $event)"
772
1151
  />
773
- </div>
774
- }
775
- </div>
1152
+ }
1153
+ <ng-container [ngTemplateOutlet]="editor" [ngTemplateOutletContext]="{ $implicit: rule, index, live: false }" />
1154
+ @if (draft().rules.length > 1) {
1155
+ <button
1156
+ txButton
1157
+ type="button"
1158
+ text
1159
+ size="small"
1160
+ severity="danger"
1161
+ icon="trash"
1162
+ [label]="translations().filterRemoveRule"
1163
+ (click)="removeRule(index)"
1164
+ ></button>
1165
+ }
1166
+ </div>
1167
+ }
1168
+ @if (draft().rules.length < maxRules) {
1169
+ <button txButton type="button" text size="small" icon="plus" [label]="translations().filterAddRule" (click)="addRule()"></button>
1170
+ }
776
1171
  }
1172
+ <div class="tx-table-filter__footer">
1173
+ <button txButton type="button" outlined size="small" severity="secondary" [label]="translations().clear" (click)="clear()"></button>
1174
+ <button txButton type="button" size="small" [label]="translations().filterApply" (click)="apply()"></button>
1175
+ </div>
777
1176
  </div>
778
- </div>
779
- </tx-popover>
1177
+ </tx-popover>
1178
+ }
780
1179
  `,
781
1180
  changeDetection: ChangeDetectionStrategy.OnPush,
782
- host: { class: "tx-table-settings" },
783
- styles: [":host{display:inline-flex}.tx-table-settings__panel{display:flex;flex-direction:column;box-sizing:border-box;width:var(--tx-table-settings-width);gap:var(--tx-table-settings-gap)}.tx-table-settings__tabs,.tx-table-settings__title{display:flex;align-items:center;gap:var(--tx-table-settings-title-gap)}.tx-table-settings__title{padding-bottom:var(--tx-table-settings-item-padding);border-bottom:1px solid var(--tx-surface-border);color:var(--tx-text-primary);font-weight:var(--tx-table-settings-title-font-weight)}.tx-table-settings__tabs{border-bottom:1px solid var(--tx-surface-border)}.tx-table-settings__tab{display:inline-flex;flex:1;align-items:center;justify-content:center;gap:var(--tx-table-settings-title-gap);margin:0 0 -1px;padding:var(--tx-table-settings-item-padding) 0 calc(var(--tx-table-settings-item-padding) * 2);border:0;border-bottom:2px solid transparent;background:none;color:var(--tx-text-muted);font:inherit;font-weight:var(--tx-table-settings-title-font-weight);cursor:pointer}.tx-table-settings__tab[aria-selected=true]{border-bottom-color:var(--tx-primary-base);color:var(--tx-primary-base)}.tx-table-settings__tab:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}.tx-table-settings__list{display:flex;flex-direction:column;gap:var(--tx-table-settings-gap);max-height:var(--tx-table-settings-max-height);overflow-y:auto}.tx-table-settings__actions{display:flex;flex-direction:column;gap:calc(var(--tx-table-settings-item-padding) / 2)}.tx-table-settings__action{display:flex;align-items:center;gap:var(--tx-table-settings-title-gap);padding:var(--tx-table-settings-item-padding);border-radius:var(--tx-table-settings-item-radius);background:var(--tx-surface-card)}.tx-table-settings__action:hover{background:var(--tx-table-settings-item-hover-background)}.tx-table-settings__action--static{background:transparent}.tx-table-settings__handle--hidden{visibility:hidden}.tx-table-settings__handle{display:inline-flex;color:var(--tx-table-settings-handle-color);font-size:var(--tx-table-settings-handle-size);cursor:move}.cdk-drag-preview.tx-table-settings__action{box-shadow:var(--tx-shadow-overlay)}.cdk-drag-placeholder{opacity:.4}.cdk-drag-animating{transition:transform var(--tx-motion-duration) cubic-bezier(0,0,.2,1)}@media(prefers-reduced-motion:reduce){.cdk-drag-animating{transition:none}}\n"]
1181
+ host: {
1182
+ class: "tx-table-column-filter",
1183
+ "[class.tx-table-column-filter--row]": "display() === 'row'"
1184
+ },
1185
+ styles: [":host{display:inline-flex;min-width:0}:host(.tx-table-column-filter--row){display:flex;width:100%}.tx-table-filter__row{display:flex;flex:1;align-items:center;gap:var(--tx-table-filter-gap, 7px);min-width:0}.tx-table-filter__row .tx-table-filter__value{flex:1;min-width:0;width:100%}.tx-table-filter{display:flex;flex-direction:column;gap:var(--tx-table-filter-gap, 7px);min-width:var(--tx-table-filter-min-width, 175px)}.tx-table-filter__rule{display:flex;flex-direction:column;gap:var(--tx-table-filter-gap, 7px);padding-bottom:var(--tx-table-filter-gap, 7px);border-bottom:1px solid var(--tx-surface-border)}.tx-table-filter__rule:last-of-type{padding-bottom:0;border-bottom:0}.tx-table-filter__footer{display:flex;align-items:center;justify-content:space-between;gap:var(--tx-table-filter-gap, 7px)}.tx-table-filter__value{width:100%}.tx-table-filter__button--active{color:var(--tx-primary-base)}\n"]
784
1186
  }]
785
1187
  }],
1188
+ ctorParameters: () => [],
786
1189
  propDecorators: {
787
- columns: [{
788
- type: i0.Input,
789
- args: [{
790
- isSignal: true,
791
- alias: "columns",
792
- required: false
793
- }]
794
- }],
795
- hidden: [{
796
- type: i0.Input,
797
- args: [{
798
- isSignal: true,
799
- alias: "hidden",
800
- required: false
801
- }]
1190
+ panel: [{
1191
+ type: i0.ViewChild,
1192
+ args: ["panel", { isSignal: true }]
802
1193
  }],
803
- showColumns: [{
1194
+ column: [{
804
1195
  type: i0.Input,
805
1196
  args: [{
806
1197
  isSignal: true,
807
- alias: "showColumns",
808
- required: false
1198
+ alias: "column",
1199
+ required: true
809
1200
  }]
810
1201
  }],
811
- showActions: [{
1202
+ display: [{
812
1203
  type: i0.Input,
813
1204
  args: [{
814
1205
  isSignal: true,
815
- alias: "showActions",
1206
+ alias: "display",
816
1207
  required: false
817
1208
  }]
818
- }],
819
- unstyled: [{
820
- type: i0.Input,
821
- args: [{
822
- isSignal: true,
823
- alias: "unstyled",
824
- required: false
825
- }]
826
- }],
827
- columnToggled: [{
828
- type: i0.Output,
829
- args: ["columnToggled"]
830
1209
  }]
831
1210
  }
832
1211
  });
833
- const TX_FILTER_MATCH_MODES = {
834
- text: [
835
- "startsWith",
836
- "contains",
837
- "notContains",
838
- "endsWith",
839
- "equals",
840
- "notEquals"
841
- ],
842
- numeric: [
843
- "equals",
844
- "notEquals",
845
- "lt",
846
- "lte",
847
- "gt",
848
- "gte"
849
- ],
850
- date: [
851
- "dateIs",
852
- "dateIsNot",
853
- "dateBefore",
854
- "dateAfter"
855
- ],
856
- boolean: ["equals"]
857
- };
858
- function defaultMatchMode(column) {
859
- if (column.filterOptions?.length) return "in";
860
- return (column.filterMatchModes ?? TX_FILTER_MATCH_MODES[column.filterType ?? "text"])[0];
861
- }
862
- function isFilled(value) {
863
- if (value === null || value === void 0) return false;
864
- if (typeof value === "string") return value.trim() !== "";
865
- if (Array.isArray(value)) return value.length > 0;
866
- return true;
867
- }
868
- function isFilterActive(filter) {
869
- return !!filter?.rules.some((rule) => isFilled(rule.value));
870
- }
871
- function normalize(value, locale) {
872
- return String(value).normalize("NFD").replace(/\p{Diacritic}/gu, "").toLocaleLowerCase(locale);
873
- }
874
- function toTime(value) {
875
- if (value === null || value === void 0 || value === "") return null;
876
- const date = value instanceof Date ? value : new Date(value);
877
- return Number.isNaN(date.getTime()) ? null : date.getTime();
878
- }
879
- function dayOf(value) {
880
- const time = toTime(value);
881
- return time === null ? null : new Date(time).toDateString();
882
- }
883
- function compare(value, filter) {
884
- if (value === null || value === void 0) return null;
885
- if (typeof value === "number" || typeof filter === "number") {
886
- const left = Number(value);
887
- const right = Number(filter);
888
- return Number.isNaN(left) || Number.isNaN(right) ? null : left - right;
889
- }
890
- const left = toTime(value);
891
- const right = toTime(filter);
892
- if (value instanceof Date && left !== null && right !== null) return left - right;
893
- return String(value).localeCompare(String(filter), void 0, {
894
- numeric: true,
895
- sensitivity: "base"
1212
+ var TxTableSettings = class TxTableSettings {
1213
+ table = inject(TX_TABLE);
1214
+ document = inject(DOCUMENT);
1215
+ columns = input([], ...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
1216
+ hidden = input(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []);
1217
+ showColumns = input(true, {
1218
+ ...ngDevMode ? { debugName: "showColumns" } : /* istanbul ignore next */ {},
1219
+ transform: booleanAttribute
896
1220
  });
897
- }
898
- function matchesRule(value, rule, locale) {
899
- const filter = rule.value;
900
- if (!isFilled(filter)) return true;
901
- const text = value === null || value === void 0 ? "" : normalize(value, locale);
902
- const needle = typeof filter === "string" || typeof filter === "number" ? normalize(filter, locale) : "";
903
- switch (rule.matchMode) {
904
- case "startsWith": return text.startsWith(needle);
905
- case "contains": return text.includes(needle);
906
- case "notContains": return !text.includes(needle);
907
- case "endsWith": return text.endsWith(needle);
908
- case "equals":
909
- if (typeof filter === "boolean") return value === filter;
910
- if (typeof filter === "number") return Number(value) === filter;
911
- if (filter instanceof Date) return toTime(value) === toTime(filter);
912
- return text === needle;
913
- case "notEquals":
914
- if (typeof filter === "boolean") return value !== filter;
915
- if (typeof filter === "number") return Number(value) !== filter;
916
- if (filter instanceof Date) return toTime(value) !== toTime(filter);
917
- return text !== needle;
918
- case "in": return Array.isArray(filter) && filter.some((item) => item === value || item !== null && value !== null && normalize(item, locale) === text);
919
- case "lt":
920
- case "lte":
921
- case "gt":
922
- case "gte": {
923
- const result = compare(value, filter);
924
- if (result === null) return false;
925
- return rule.matchMode === "lt" ? result < 0 : rule.matchMode === "lte" ? result <= 0 : rule.matchMode === "gt" ? result > 0 : result >= 0;
926
- }
927
- case "between": {
928
- const [from, to] = Array.isArray(filter) ? filter : [];
929
- const fromResult = isFilled(from) ? compare(value, from) : 0;
930
- const toResult = isFilled(to) ? compare(value, to) : 0;
931
- return fromResult !== null && toResult !== null && fromResult >= 0 && toResult <= 0;
932
- }
933
- case "dateIs": return dayOf(value) !== null && dayOf(value) === dayOf(filter);
934
- case "dateIsNot": return dayOf(value) !== dayOf(filter);
935
- case "dateBefore": {
936
- const left = toTime(value);
937
- const right = toTime(filter);
938
- return left !== null && right !== null && left < right;
939
- }
940
- case "dateAfter": {
941
- const left = toTime(value);
942
- const right = toTime(filter);
943
- return left !== null && right !== null && left > right;
944
- }
945
- }
946
- }
947
- function matchesFilter(value, filter, locale) {
948
- const rules = filter.rules.filter((rule) => isFilled(rule.value));
949
- if (!rules.length) return true;
950
- return filter.operator === "or" ? rules.some((rule) => matchesRule(value, rule, locale)) : rules.every((rule) => matchesRule(value, rule, locale));
951
- }
952
- function filterRows(rows, filters, columns, globalFilter, globalFields, locale) {
953
- const active = Object.entries(filters).filter(([, filter]) => isFilterActive(filter));
954
- const query = globalFilter.trim() ? normalize(globalFilter.trim(), locale) : "";
955
- if (!active.length && !query) return [...rows];
956
- const fieldOf = (key) => columns.find((column) => column.field === key)?.filterField ?? key;
957
- return rows.filter((row) => {
958
- if (!active.every(([key, filter]) => matchesFilter(resolveField(row, fieldOf(key)), filter, locale))) return false;
959
- if (!query) return true;
960
- return globalFields.some((field) => {
961
- const value = resolveField(row, field);
962
- return value !== null && value !== void 0 && normalize(value, locale).includes(query);
963
- });
1221
+ showActions = input(false, {
1222
+ ...ngDevMode ? { debugName: "showActions" } : /* istanbul ignore next */ {},
1223
+ transform: booleanAttribute
964
1224
  });
965
- }
966
- const MAX_RULES = 2;
967
- function toDateInput(value) {
968
- if (!(value instanceof Date) || Number.isNaN(value.getTime())) return "";
969
- const pad = (part) => String(part).padStart(2, "0");
970
- return `${value.getFullYear()}-${pad(value.getMonth() + 1)}-${pad(value.getDate())}`;
971
- }
972
- function fromDateInput(value) {
973
- const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
974
- return match ? new Date(Number(match[1]), Number(match[2]) - 1, Number(match[3])) : null;
975
- }
976
- var TxTableColumnFilter = class TxTableColumnFilter {
977
- table = inject(TX_TABLE);
978
- panel = viewChild("panel", ...ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []);
979
- timer;
980
- column = input.required(...ngDevMode ? [{ debugName: "column" }] : /* istanbul ignore next */ []);
981
- display = input("menu", ...ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []);
982
- maxRules = MAX_RULES;
1225
+ unstyled = input(false, ...ngDevMode ? [{ debugName: "unstyled" }] : /* istanbul ignore next */ []);
1226
+ columnToggled = output();
1227
+ id = uniqueId("tx-table-settings");
983
1228
  translations = injectTranslations();
984
- type = computed(() => this.column().filterOptions?.length ? "options" : this.column().filterType ?? "text", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
985
- modes = computed(() => this.type() === "options" || this.type() === "boolean" ? [] : this.column().filterMatchModes ?? TX_FILTER_MATCH_MODES[this.column().filterType ?? "text"], ...ngDevMode ? [{ debugName: "modes" }] : /* istanbul ignore next */ []);
986
- current = computed(() => this.table.filters()[this.column().field], ...ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []);
987
- active = computed(() => isFilterActive(this.current()), ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
988
- draft = signal({
989
- operator: "and",
990
- rules: [{
991
- value: null,
992
- matchMode: "startsWith"
993
- }]
994
- }, ...ngDevMode ? [{ debugName: "draft" }] : /* istanbul ignore next */ []);
995
- live = computed(() => this.current() ?? this.empty(), ...ngDevMode ? [{ debugName: "live" }] : /* istanbul ignore next */ []);
996
- modeOptions = computed(() => this.modes().map((mode) => ({
997
- value: mode,
998
- label: this.translations()[mode]
999
- })), ...ngDevMode ? [{ debugName: "modeOptions" }] : /* istanbul ignore next */ []);
1000
- operatorOptions = computed(() => [{
1001
- value: "and",
1002
- label: this.translations().filterMatchAll
1003
- }, {
1004
- value: "or",
1005
- label: this.translations().filterMatchAny
1006
- }], ...ngDevMode ? [{ debugName: "operatorOptions" }] : /* istanbul ignore next */ []);
1007
- booleanOptions = computed(() => [
1008
- {
1009
- value: null,
1010
- label: this.translations().filterAny
1011
- },
1012
- {
1013
- value: true,
1014
- label: this.translations().yes
1015
- },
1016
- {
1017
- value: false,
1018
- label: this.translations().no
1019
- }
1020
- ], ...ngDevMode ? [{ debugName: "booleanOptions" }] : /* istanbul ignore next */ []);
1021
- modeItems = computed(() => {
1022
- const selected = this.live().rules[0]?.matchMode;
1023
- return this.modeOptions().map((option) => ({
1024
- id: option.value,
1025
- label: option.label,
1026
- icon: option.value === selected ? "check" : void 0,
1027
- command: () => this.setLiveMode(option.value)
1028
- }));
1029
- }, ...ngDevMode ? [{ debugName: "modeItems" }] : /* istanbul ignore next */ []);
1030
- buttonLabel = computed(() => this.translations().filterColumn.replace("{column}", columnLabel(this.column())), ...ngDevMode ? [{ debugName: "buttonLabel" }] : /* istanbul ignore next */ []);
1031
- valueLabel = computed(() => `${columnLabel(this.column())}: ${this.translations().filterValue}`, ...ngDevMode ? [{ debugName: "valueLabel" }] : /* istanbul ignore next */ []);
1032
- constructor() {
1033
- inject(DestroyRef).onDestroy(() => clearTimeout(this.timer));
1034
- }
1035
- empty() {
1036
- return {
1037
- operator: "and",
1038
- rules: [{
1039
- value: null,
1040
- matchMode: defaultMatchMode(this.column())
1041
- }]
1042
- };
1043
- }
1044
- startDraft() {
1045
- const current = this.current();
1046
- this.draft.set(current ? {
1047
- operator: current.operator,
1048
- rules: current.rules.map((rule) => ({ ...rule }))
1049
- } : this.empty());
1050
- }
1051
- dateValue(value) {
1052
- return toDateInput(value);
1053
- }
1054
- parseDate(value) {
1055
- return fromDateInput(value);
1056
- }
1057
- setValue(index, value, live) {
1058
- if (live) {
1059
- const filter = this.live();
1060
- const rules = filter.rules.map((rule, position) => position === index ? {
1061
- ...rule,
1062
- value
1063
- } : rule);
1064
- clearTimeout(this.timer);
1065
- const commit = () => this.table.applyFilter(this.column().field, {
1066
- ...filter,
1067
- rules
1068
- });
1069
- if (this.type() === "text") this.timer = setTimeout(commit, this.table.filterDelay());
1070
- else commit();
1071
- return;
1072
- }
1073
- this.updateRules((rules) => rules.map((rule, position) => position === index ? {
1074
- ...rule,
1075
- value
1076
- } : rule));
1229
+ store = this.table.actionsStore;
1230
+ activeTab = signal("columns", ...ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []);
1231
+ canReorder = this.table.reorderableColumns;
1232
+ listedColumns = computed(() => this.columns().filter((column) => column.hideable !== false || this.canReorder() && column.reorderable !== false), ...ngDevMode ? [{ debugName: "listedColumns" }] : /* istanbul ignore next */ []);
1233
+ tabs = computed(() => {
1234
+ const tabs = [];
1235
+ if (this.showColumns()) tabs.push("columns");
1236
+ if (this.showActions() && this.store.registeredActions().length) tabs.push("actions");
1237
+ return tabs;
1238
+ }, ...ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []);
1239
+ currentTab = computed(() => this.tabs().includes(this.activeTab()) ? this.activeTab() : this.tabs()[0] ?? "columns", ...ngDevMode ? [{ debugName: "currentTab" }] : /* istanbul ignore next */ []);
1240
+ label(column) {
1241
+ return columnLabel(column);
1077
1242
  }
1078
- setMode(index, matchMode) {
1079
- this.updateRules((rules) => rules.map((rule, position) => position === index ? {
1080
- ...rule,
1081
- matchMode
1082
- } : rule));
1243
+ moveTab(step) {
1244
+ const tabs = this.tabs();
1245
+ const next = tabs[(tabs.indexOf(this.currentTab()) + step + tabs.length) % tabs.length];
1246
+ this.activeTab.set(next);
1247
+ this.document.getElementById(`${this.id}-${next}`)?.focus();
1083
1248
  }
1084
- setLiveMode(matchMode) {
1085
- const filter = this.live();
1086
- this.table.applyFilter(this.column().field, {
1087
- ...filter,
1088
- rules: filter.rules.map((rule, index) => index === 0 ? {
1089
- ...rule,
1090
- matchMode
1091
- } : rule)
1092
- });
1249
+ dropColumn(event) {
1250
+ const columns = this.listedColumns();
1251
+ const from = columns[event.previousIndex];
1252
+ const to = columns[event.currentIndex];
1253
+ if (from && to && to.reorderable !== false) this.table.reorderColumn(from.field, to.field);
1093
1254
  }
1094
- setOperator(operator) {
1095
- this.draft.set({
1096
- ...this.draft(),
1097
- operator
1255
+ moveColumn(column, step, event) {
1256
+ if (!this.canReorder() || column.reorderable === false) return;
1257
+ event.preventDefault();
1258
+ const columns = this.listedColumns();
1259
+ const target = columns[columns.indexOf(column) + step];
1260
+ if (!target || target.reorderable === false) return;
1261
+ this.table.reorderColumn(column.field, target.field);
1262
+ const field = column.field;
1263
+ setTimeout(() => {
1264
+ const index = this.listedColumns().findIndex((item) => item.field === field);
1265
+ this.document.querySelectorAll(`#${this.id}-panel .tx-table-settings__action input`)[index]?.focus();
1098
1266
  });
1099
1267
  }
1100
- addRule() {
1101
- this.updateRules((rules) => [...rules, {
1102
- value: null,
1103
- matchMode: defaultMatchMode(this.column())
1104
- }]);
1105
- }
1106
- removeRule(index) {
1107
- this.updateRules((rules) => rules.filter((_, position) => position !== index));
1108
- }
1109
- apply() {
1110
- this.table.applyFilter(this.column().field, this.draft());
1111
- this.panel()?.hide();
1112
- }
1113
- clear() {
1114
- this.draft.set(this.empty());
1115
- this.table.applyFilter(this.column().field, null);
1116
- this.panel()?.hide();
1268
+ moveAction(index, step, event) {
1269
+ const target = index + step;
1270
+ if (target < 0 || target >= this.store.registeredActions().length) return;
1271
+ event.preventDefault();
1272
+ this.store.reorder(index, target);
1273
+ setTimeout(() => this.document.querySelectorAll(`#${this.id}-panel .tx-table-settings__action input`)[target]?.focus());
1117
1274
  }
1118
- updateRules(change) {
1119
- this.draft.set({
1120
- ...this.draft(),
1121
- rules: change(this.draft().rules)
1122
- });
1275
+ dropAction(event) {
1276
+ this.store.reorder(event.previousIndex, event.currentIndex);
1123
1277
  }
1124
1278
  static ɵfac = i0.ɵɵngDeclareFactory({
1125
1279
  minVersion: "12.0.0",
1126
1280
  version: "22.2.3",
1127
1281
  ngImport: i0,
1128
- type: TxTableColumnFilter,
1282
+ type: TxTableSettings,
1129
1283
  deps: [],
1130
1284
  target: i0.ɵɵFactoryTarget.Component
1131
1285
  });
1132
1286
  static ɵcmp = i0.ɵɵngDeclareComponent({
1133
1287
  minVersion: "17.0.0",
1134
1288
  version: "22.2.3",
1135
- type: TxTableColumnFilter,
1289
+ type: TxTableSettings,
1136
1290
  isStandalone: true,
1137
- selector: "tx-table-column-filter",
1291
+ selector: "tx-table-settings",
1138
1292
  inputs: {
1139
- column: {
1140
- classPropertyName: "column",
1141
- publicName: "column",
1293
+ columns: {
1294
+ classPropertyName: "columns",
1295
+ publicName: "columns",
1142
1296
  isSignal: true,
1143
- isRequired: true,
1297
+ isRequired: false,
1144
1298
  transformFunction: null
1145
1299
  },
1146
- display: {
1147
- classPropertyName: "display",
1148
- publicName: "display",
1300
+ hidden: {
1301
+ classPropertyName: "hidden",
1302
+ publicName: "hidden",
1303
+ isSignal: true,
1304
+ isRequired: false,
1305
+ transformFunction: null
1306
+ },
1307
+ showColumns: {
1308
+ classPropertyName: "showColumns",
1309
+ publicName: "showColumns",
1310
+ isSignal: true,
1311
+ isRequired: false,
1312
+ transformFunction: null
1313
+ },
1314
+ showActions: {
1315
+ classPropertyName: "showActions",
1316
+ publicName: "showActions",
1317
+ isSignal: true,
1318
+ isRequired: false,
1319
+ transformFunction: null
1320
+ },
1321
+ unstyled: {
1322
+ classPropertyName: "unstyled",
1323
+ publicName: "unstyled",
1149
1324
  isSignal: true,
1150
1325
  isRequired: false,
1151
1326
  transformFunction: null
1152
1327
  }
1153
1328
  },
1154
- host: {
1155
- properties: { "class.tx-table-column-filter--row": "display() === 'row'" },
1156
- classAttribute: "tx-table-column-filter"
1157
- },
1158
- viewQueries: [{
1159
- propertyName: "panel",
1160
- first: true,
1161
- predicate: ["panel"],
1162
- descendants: true,
1163
- isSignal: true
1164
- }],
1329
+ outputs: { columnToggled: "columnToggled" },
1330
+ host: { classAttribute: "tx-table-settings" },
1165
1331
  ngImport: i0,
1166
1332
  template: `
1167
- <ng-template #editor let-rule let-index="index" let-live="live">
1168
- @switch (type()) {
1169
- @case ('numeric') {
1170
- <tx-input-number
1171
- size="small"
1172
- class="tx-table-filter__value"
1173
- [ariaLabel]="valueLabel()"
1174
- [placeholder]="column().filterPlaceholder"
1175
- [ngModel]="rule.value"
1176
- (ngModelChange)="setValue(index, $event, live)"
1177
- />
1178
- }
1179
- @case ('date') {
1180
- <input
1181
- txInput
1182
- type="date"
1183
- size="small"
1184
- class="tx-table-filter__value"
1185
- [attr.aria-label]="valueLabel()"
1186
- [value]="dateValue(rule.value)"
1187
- (change)="setValue(index, parseDate($any($event.target).value), live)"
1188
- />
1189
- }
1190
- @case ('boolean') {
1191
- <tx-select
1192
- size="small"
1193
- class="tx-table-filter__value"
1194
- optionLabel="label"
1195
- optionValue="value"
1196
- [options]="booleanOptions()"
1197
- [ariaLabel]="valueLabel()"
1198
- [ngModel]="rule.value"
1199
- (ngModelChange)="setValue(index, $event, true)"
1200
- />
1201
- }
1202
- @case ('options') {
1203
- <tx-multiselect
1204
- size="small"
1205
- class="tx-table-filter__value"
1206
- optionLabel="label"
1207
- optionValue="value"
1208
- [maxSelectedLabels]="2"
1209
- [options]="column().filterOptions ?? []"
1210
- [ariaLabel]="valueLabel()"
1211
- [placeholder]="column().filterPlaceholder ?? translations().filterAny"
1212
- [ngModel]="rule.value ?? []"
1213
- (ngModelChange)="setValue(index, $event, live)"
1214
- />
1215
- }
1216
- @default {
1217
- <input
1218
- txInput
1219
- type="text"
1220
- size="small"
1221
- class="tx-table-filter__value"
1222
- [attr.aria-label]="valueLabel()"
1223
- [placeholder]="column().filterPlaceholder ?? ''"
1224
- [value]="rule.value ?? ''"
1225
- (input)="setValue(index, $any($event.target).value, live)"
1226
- (keydown.enter)="apply()"
1227
- />
1228
- }
1229
- }
1230
- </ng-template>
1231
-
1232
- @if (display() === 'row') {
1233
- <div class="tx-table-filter__row">
1234
- <ng-container [ngTemplateOutlet]="editor" [ngTemplateOutletContext]="{ $implicit: live().rules[0], index: 0, live: true }" />
1235
- @if (modes().length > 1) {
1236
- <button
1237
- txButton
1238
- type="button"
1239
- text
1240
- rounded
1241
- size="small"
1242
- severity="secondary"
1243
- class="tx-table-filter__button"
1244
- [class.tx-table-filter__button--active]="active()"
1245
- [icon]="active() ? 'filter-fill' : 'filter'"
1246
- [attr.aria-label]="buttonLabel()"
1247
- [txMenuTrigger]="modeMenu"
1248
- ></button>
1249
- <tx-menu #modeMenu popup [model]="modeItems()" [ariaLabel]="translations().filterMatchMode" />
1333
+ <button
1334
+ txButton
1335
+ type="button"
1336
+ size="small"
1337
+ icon="cog"
1338
+ class="tx-table-settings__button"
1339
+ [unstyled]="unstyled()"
1340
+ [txTooltip]="translations().tableSettings"
1341
+ [attr.aria-label]="translations().tableSettings"
1342
+ [txPopoverTrigger]="panel"
1343
+ ></button>
1344
+ <tx-popover #panel placement="bottom-end" [ariaLabel]="translations().tableSettings" [unstyled]="unstyled()">
1345
+ <div class="tx-table-settings__panel">
1346
+ @if (tabs().length > 1) {
1347
+ <div class="tx-table-settings__tabs" role="tablist">
1348
+ @for (tab of tabs(); track tab) {
1349
+ <button
1350
+ type="button"
1351
+ role="tab"
1352
+ class="tx-table-settings__tab"
1353
+ [id]="id + '-' + tab"
1354
+ [attr.aria-selected]="tab === currentTab()"
1355
+ [attr.aria-controls]="id + '-panel'"
1356
+ [attr.tabindex]="tab === currentTab() ? 0 : -1"
1357
+ [txTooltip]="tab === 'columns' ? translations().tableColumnsHint : translations().tableActionsHint"
1358
+ (click)="activeTab.set(tab)"
1359
+ (keydown.arrowright)="moveTab(1)"
1360
+ (keydown.arrowleft)="moveTab(-1)"
1361
+ >
1362
+ <tx-icon aria-hidden="true" [name]="tab === 'columns' ? 'table' : 'bolt'" />
1363
+ {{ tab === 'columns' ? translations().tableColumns : translations().tableActions }}
1364
+ </button>
1365
+ }
1366
+ </div>
1367
+ } @else {
1368
+ <div class="tx-table-settings__title" [id]="id + '-' + currentTab()">
1369
+ <tx-icon aria-hidden="true" [name]="currentTab() === 'columns' ? 'table' : 'bolt'" />
1370
+ <span>{{ currentTab() === 'columns' ? translations().tableColumns : translations().tableActions }}</span>
1371
+ </div>
1250
1372
  }
1251
- </div>
1252
- } @else {
1253
- <button
1254
- txButton
1255
- type="button"
1256
- text
1257
- rounded
1258
- size="small"
1259
- severity="secondary"
1260
- class="tx-table-filter__button"
1261
- [class.tx-table-filter__button--active]="active()"
1262
- [icon]="active() ? 'filter-fill' : 'filter'"
1263
- [attr.aria-label]="buttonLabel()"
1264
- [txPopoverTrigger]="panel"
1265
- (click)="$event.stopPropagation()"
1266
- ></button>
1267
- <tx-popover #panel placement="bottom-start" [ariaLabel]="buttonLabel()" (opened)="startDraft()">
1268
- <div class="tx-table-filter">
1269
- @if (type() === 'boolean' || type() === 'options') {
1270
- <ng-container [ngTemplateOutlet]="editor" [ngTemplateOutletContext]="{ $implicit: draft().rules[0], index: 0, live: false }" />
1373
+ <div
1374
+ class="tx-table-settings__list"
1375
+ [id]="id + '-panel'"
1376
+ [attr.role]="tabs().length > 1 ? 'tabpanel' : 'group'"
1377
+ [attr.aria-labelledby]="id + '-' + currentTab()"
1378
+ >
1379
+ @if (currentTab() === 'columns') {
1380
+ <div
1381
+ #columnList
1382
+ cdkDropList
1383
+ class="tx-table-settings__actions"
1384
+ [cdkDropListDisabled]="!canReorder()"
1385
+ (cdkDropListDropped)="dropColumn($event)"
1386
+ >
1387
+ @for (column of listedColumns(); track column.field) {
1388
+ <div
1389
+ cdkDrag
1390
+ cdkDragLockAxis="y"
1391
+ class="tx-table-settings__action"
1392
+ [cdkDragBoundary]="columnList"
1393
+ [class.tx-table-settings__action--static]="!canReorder() || column.reorderable === false"
1394
+ [cdkDragDisabled]="!canReorder() || column.reorderable === false"
1395
+ >
1396
+ @if (canReorder()) {
1397
+ <span
1398
+ cdkDragHandle
1399
+ class="tx-table-settings__handle"
1400
+ [class.tx-table-settings__handle--hidden]="column.reorderable === false"
1401
+ [attr.aria-hidden]="true"
1402
+ >
1403
+ <tx-icon name="bars" />
1404
+ </span>
1405
+ }
1406
+ <tx-checkbox
1407
+ binary
1408
+ [label]="label(column)"
1409
+ [disabled]="column.hideable === false"
1410
+ [ngModel]="!hidden().has(column.field)"
1411
+ (ngModelChange)="columnToggled.emit({ field: column.field, visible: $event })"
1412
+ (keydown.alt.arrowup)="moveColumn(column, -1, $event)"
1413
+ (keydown.alt.arrowdown)="moveColumn(column, 1, $event)"
1414
+ />
1415
+ </div>
1416
+ }
1417
+ </div>
1271
1418
  } @else {
1272
- @if (draft().rules.length > 1) {
1273
- <tx-select
1274
- size="small"
1275
- optionLabel="label"
1276
- optionValue="value"
1277
- [options]="operatorOptions()"
1278
- [ariaLabel]="translations().filterMatchAll + ' / ' + translations().filterMatchAny"
1279
- [ngModel]="draft().operator"
1280
- (ngModelChange)="setOperator($event)"
1281
- />
1282
- }
1283
- @for (rule of draft().rules; track $index; let index = $index) {
1284
- <div class="tx-table-filter__rule">
1285
- @if (modes().length > 1) {
1286
- <tx-select
1287
- size="small"
1288
- optionLabel="label"
1289
- optionValue="value"
1290
- [options]="modeOptions()"
1291
- [ariaLabel]="translations().filterMatchMode"
1292
- [ngModel]="rule.matchMode"
1293
- (ngModelChange)="setMode(index, $event)"
1419
+ <div #actionList cdkDropList class="tx-table-settings__actions" (cdkDropListDropped)="dropAction($event)">
1420
+ @for (action of store.registeredActions(); track action.id; let index = $index) {
1421
+ <div cdkDrag cdkDragLockAxis="y" class="tx-table-settings__action" [cdkDragBoundary]="actionList">
1422
+ <span cdkDragHandle class="tx-table-settings__handle" aria-hidden="true">
1423
+ <tx-icon aria-hidden="true" name="bars" />
1424
+ </span>
1425
+ <tx-checkbox
1426
+ binary
1427
+ [label]="action.label"
1428
+ [ngModel]="store.isPinned(action.id)"
1429
+ (ngModelChange)="store.setPinned(action.id, $event)"
1430
+ (keydown.alt.arrowup)="moveAction(index, -1, $event)"
1431
+ (keydown.alt.arrowdown)="moveAction(index, 1, $event)"
1294
1432
  />
1295
- }
1296
- <ng-container [ngTemplateOutlet]="editor" [ngTemplateOutletContext]="{ $implicit: rule, index, live: false }" />
1297
- @if (draft().rules.length > 1) {
1298
- <button
1299
- txButton
1300
- type="button"
1301
- text
1302
- size="small"
1303
- severity="danger"
1304
- icon="trash"
1305
- [label]="translations().filterRemoveRule"
1306
- (click)="removeRule(index)"
1307
- ></button>
1308
- }
1309
- </div>
1310
- }
1311
- @if (draft().rules.length < maxRules) {
1312
- <button txButton type="button" text size="small" icon="plus" [label]="translations().filterAddRule" (click)="addRule()"></button>
1313
- }
1433
+ </div>
1434
+ }
1435
+ </div>
1314
1436
  }
1315
- <div class="tx-table-filter__footer">
1316
- <button txButton type="button" outlined size="small" severity="secondary" [label]="translations().clear" (click)="clear()"></button>
1317
- <button txButton type="button" size="small" [label]="translations().filterApply" (click)="apply()"></button>
1318
- </div>
1319
1437
  </div>
1320
- </tx-popover>
1321
- }
1438
+ </div>
1439
+ </tx-popover>
1322
1440
  `,
1323
1441
  isInline: true,
1324
- styles: [":host{display:inline-flex;min-width:0}:host(.tx-table-column-filter--row){display:flex;width:100%}.tx-table-filter__row{display:flex;flex:1;align-items:center;gap:var(--tx-table-filter-gap, 7px);min-width:0}.tx-table-filter__row .tx-table-filter__value{flex:1;min-width:0;width:100%}.tx-table-filter{display:flex;flex-direction:column;gap:var(--tx-table-filter-gap, 7px);min-width:var(--tx-table-filter-min-width, 175px)}.tx-table-filter__rule{display:flex;flex-direction:column;gap:var(--tx-table-filter-gap, 7px);padding-bottom:var(--tx-table-filter-gap, 7px);border-bottom:1px solid var(--tx-surface-border)}.tx-table-filter__rule:last-of-type{padding-bottom:0;border-bottom:0}.tx-table-filter__footer{display:flex;align-items:center;justify-content:space-between;gap:var(--tx-table-filter-gap, 7px)}.tx-table-filter__value{width:100%}.tx-table-filter__button--active{color:var(--tx-primary-base)}\n"],
1442
+ styles: [":host{display:inline-flex}.tx-table-settings__panel{display:flex;flex-direction:column;box-sizing:border-box;width:var(--tx-table-settings-width);gap:var(--tx-table-settings-gap)}.tx-table-settings__tabs,.tx-table-settings__title{display:flex;align-items:center;gap:var(--tx-table-settings-title-gap)}.tx-table-settings__title{padding-bottom:var(--tx-table-settings-item-padding);border-bottom:1px solid var(--tx-surface-border);color:var(--tx-text-primary);font-weight:var(--tx-table-settings-title-font-weight)}.tx-table-settings__tabs{border-bottom:1px solid var(--tx-surface-border)}.tx-table-settings__tab{display:inline-flex;flex:1;align-items:center;justify-content:center;gap:var(--tx-table-settings-title-gap);margin:0 0 -1px;padding:var(--tx-table-settings-item-padding) 0 calc(var(--tx-table-settings-item-padding) * 2);border:0;border-bottom:2px solid transparent;background:none;color:var(--tx-text-muted);font:inherit;font-weight:var(--tx-table-settings-title-font-weight);cursor:pointer}.tx-table-settings__tab[aria-selected=true]{border-bottom-color:var(--tx-primary-base);color:var(--tx-primary-base)}.tx-table-settings__tab:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}.tx-table-settings__list{display:flex;flex-direction:column;gap:var(--tx-table-settings-gap);max-height:var(--tx-table-settings-max-height);overflow-y:auto}.tx-table-settings__actions{display:flex;flex-direction:column;gap:calc(var(--tx-table-settings-item-padding) / 2)}.tx-table-settings__action{display:flex;align-items:center;gap:var(--tx-table-settings-title-gap);padding:var(--tx-table-settings-item-padding);border-radius:var(--tx-table-settings-item-radius);background:var(--tx-surface-card)}.tx-table-settings__action:hover{background:var(--tx-table-settings-item-hover-background)}.tx-table-settings__action--static{background:transparent}.tx-table-settings__handle--hidden{visibility:hidden}.tx-table-settings__handle{display:inline-flex;color:var(--tx-table-settings-handle-color);font-size:var(--tx-table-settings-handle-size);cursor:move}.cdk-drag-preview.tx-table-settings__action{box-shadow:var(--tx-shadow-overlay)}.cdk-drag-placeholder{opacity:.4}.cdk-drag-animating{transition:transform var(--tx-motion-duration) cubic-bezier(0,0,.2,1)}@media(prefers-reduced-motion:reduce){.cdk-drag-animating{transition:none}}\n"],
1325
1443
  dependencies: [
1326
- {
1327
- kind: "directive",
1328
- type: NgTemplateOutlet,
1329
- selector: "[ngTemplateOutlet]",
1330
- inputs: [
1331
- "ngTemplateOutletContext",
1332
- "ngTemplateOutlet",
1333
- "ngTemplateOutletInjector"
1334
- ]
1335
- },
1336
1444
  {
1337
1445
  kind: "ngmodule",
1338
1446
  type: FormsModule
1339
1447
  },
1340
1448
  {
1341
1449
  kind: "directive",
1342
- type: i1.NgControlStatus,
1450
+ type: i1$1.NgControlStatus,
1343
1451
  selector: "[formControlName],[ngModel],[formControl]"
1344
1452
  },
1345
1453
  {
1346
1454
  kind: "directive",
1347
- type: i1.NgModel,
1455
+ type: i1$1.NgModel,
1348
1456
  selector: "[ngModel]:not([formControlName]):not([formControl])",
1349
1457
  inputs: [
1350
1458
  "name",
@@ -1355,6 +1463,73 @@ var TxTableColumnFilter = class TxTableColumnFilter {
1355
1463
  outputs: ["ngModelChange"],
1356
1464
  exportAs: ["ngModel"]
1357
1465
  },
1466
+ {
1467
+ kind: "directive",
1468
+ type: CdkDropList,
1469
+ selector: "[cdkDropList], cdk-drop-list",
1470
+ inputs: [
1471
+ "cdkDropListConnectedTo",
1472
+ "cdkDropListData",
1473
+ "cdkDropListOrientation",
1474
+ "id",
1475
+ "cdkDropListLockAxis",
1476
+ "cdkDropListDisabled",
1477
+ "cdkDropListSortingDisabled",
1478
+ "cdkDropListEnterPredicate",
1479
+ "cdkDropListSortPredicate",
1480
+ "cdkDropListAutoScrollDisabled",
1481
+ "cdkDropListAutoScrollStep",
1482
+ "cdkDropListElementContainer",
1483
+ "cdkDropListHasAnchor"
1484
+ ],
1485
+ outputs: [
1486
+ "cdkDropListDropped",
1487
+ "cdkDropListEntered",
1488
+ "cdkDropListExited",
1489
+ "cdkDropListSorted"
1490
+ ],
1491
+ exportAs: ["cdkDropList"]
1492
+ },
1493
+ {
1494
+ kind: "directive",
1495
+ type: CdkDrag,
1496
+ selector: "[cdkDrag]",
1497
+ inputs: [
1498
+ "cdkDragData",
1499
+ "cdkDragLockAxis",
1500
+ "cdkDragRootElement",
1501
+ "cdkDragBoundary",
1502
+ "cdkDragStartDelay",
1503
+ "cdkDragFreeDragPosition",
1504
+ "cdkDragDisabled",
1505
+ "cdkDragConstrainPosition",
1506
+ "cdkDragPreviewClass",
1507
+ "cdkDragPreviewContainer",
1508
+ "cdkDragScale"
1509
+ ],
1510
+ outputs: [
1511
+ "cdkDragStarted",
1512
+ "cdkDragReleased",
1513
+ "cdkDragEnded",
1514
+ "cdkDragEntered",
1515
+ "cdkDragExited",
1516
+ "cdkDragDropped",
1517
+ "cdkDragMoved"
1518
+ ],
1519
+ exportAs: ["cdkDrag"]
1520
+ },
1521
+ {
1522
+ kind: "directive",
1523
+ type: CdkDragHandle,
1524
+ selector: "[cdkDragHandle]",
1525
+ inputs: ["cdkDragHandleDisabled"]
1526
+ },
1527
+ {
1528
+ kind: "component",
1529
+ type: TxIcon,
1530
+ selector: "tx-icon",
1531
+ inputs: ["name"]
1532
+ },
1358
1533
  {
1359
1534
  kind: "component",
1360
1535
  type: TxButton,
@@ -1386,48 +1561,23 @@ var TxTableColumnFilter = class TxTableColumnFilter {
1386
1561
  "unstyled"
1387
1562
  ]
1388
1563
  },
1389
- {
1390
- kind: "directive",
1391
- type: TxInput,
1392
- selector: "input[txInput], textarea[txInput]",
1393
- inputs: [
1394
- "invalid",
1395
- "size",
1396
- "variant",
1397
- "fluid",
1398
- "dt",
1399
- "pt",
1400
- "ptOptions",
1401
- "unstyled"
1402
- ]
1403
- },
1404
1564
  {
1405
1565
  kind: "component",
1406
- type: TxInputNumber,
1407
- selector: "tx-input-number",
1566
+ type: TxCheckbox,
1567
+ selector: "tx-checkbox",
1408
1568
  inputs: [
1409
- "mode",
1410
- "currency",
1411
- "currencyDisplay",
1412
- "locale",
1413
- "useGrouping",
1414
- "minFractionDigits",
1415
- "maxFractionDigits",
1416
- "prefix",
1417
- "suffix",
1418
- "min",
1419
- "max",
1420
- "step",
1421
- "showButtons",
1422
- "buttonLayout",
1423
- "incrementIcon",
1424
- "decrementIcon",
1425
- "allowEmpty",
1426
- "showClear",
1427
- "placeholder",
1569
+ "label",
1570
+ "description",
1571
+ "value",
1572
+ "binary",
1573
+ "trueValue",
1574
+ "falseValue",
1575
+ "indeterminate",
1576
+ "icon",
1577
+ "indeterminateIcon",
1428
1578
  "size",
1429
1579
  "variant",
1430
- "fluid",
1580
+ "tile",
1431
1581
  "invalid",
1432
1582
  "disabled",
1433
1583
  "readonly",
@@ -1442,44 +1592,7 @@ var TxTableColumnFilter = class TxTableColumnFilter {
1442
1592
  "ptOptions",
1443
1593
  "unstyled"
1444
1594
  ],
1445
- outputs: ["changed", "cleared"]
1446
- },
1447
- {
1448
- kind: "component",
1449
- type: TxSelect,
1450
- selector: "tx-select",
1451
- inputs: [
1452
- "options",
1453
- "editable",
1454
- "checkmark",
1455
- "dropdownIcon",
1456
- "dt",
1457
- "pt",
1458
- "ptOptions",
1459
- "unstyled"
1460
- ],
1461
- outputs: ["changed"]
1462
- },
1463
- {
1464
- kind: "component",
1465
- type: TxMultiselect,
1466
- selector: "tx-multiselect",
1467
- inputs: [
1468
- "options",
1469
- "display",
1470
- "maxSelectedLabels",
1471
- "selectedItemsLabel",
1472
- "selectAllLabel",
1473
- "countLabel",
1474
- "selectionLimit",
1475
- "showToggleAll",
1476
- "dropdownIcon",
1477
- "dt",
1478
- "pt",
1479
- "ptOptions",
1480
- "unstyled"
1481
- ],
1482
- outputs: ["changed"]
1595
+ outputs: ["indeterminateChange", "changed"]
1483
1596
  },
1484
1597
  {
1485
1598
  kind: "component",
@@ -1518,34 +1631,31 @@ var TxTableColumnFilter = class TxTableColumnFilter {
1518
1631
  inputs: ["txPopoverTrigger"]
1519
1632
  },
1520
1633
  {
1521
- kind: "component",
1522
- type: TxMenu,
1523
- selector: "tx-menu, tx-tiered-menu",
1634
+ kind: "directive",
1635
+ type: TxTooltip,
1636
+ selector: "[txTooltip]",
1524
1637
  inputs: [
1525
- "model",
1526
- "popup",
1527
- "tiered",
1528
- "placement",
1529
- "offset",
1530
- "variant",
1531
- "ariaLabel",
1532
- "ariaLabelledBy",
1533
- "dt",
1534
- "pt",
1535
- "ptOptions",
1536
- "unstyled"
1638
+ "txTooltip",
1639
+ "tooltipPlacement",
1640
+ "tooltipEvent",
1641
+ "tooltipShowDelay",
1642
+ "tooltipHideDelay",
1643
+ "tooltipLife",
1644
+ "tooltipOffset",
1645
+ "tooltipArrow",
1646
+ "tooltipInteractive",
1647
+ "tooltipDisabled",
1648
+ "tooltipOverflowOnly",
1649
+ "tooltipMultiline",
1650
+ "tooltipContext",
1651
+ "tooltipClass",
1652
+ "tooltipDt",
1653
+ "tooltipPt",
1654
+ "tooltipPtOptions",
1655
+ "tooltipUnstyled"
1537
1656
  ],
1538
- outputs: [
1539
- "itemSelected",
1540
- "opened",
1541
- "closed"
1542
- ]
1543
- },
1544
- {
1545
- kind: "directive",
1546
- type: TxMenuTrigger,
1547
- selector: "[txMenuTrigger]",
1548
- inputs: ["txMenuTrigger"]
1657
+ outputs: ["tooltipShown", "tooltipHidden"],
1658
+ exportAs: ["txTooltip"]
1549
1659
  }
1550
1660
  ],
1551
1661
  changeDetection: i0.ChangeDetectionStrategy.OnPush
@@ -1555,280 +1665,206 @@ i0.ɵɵngDeclareClassMetadata({
1555
1665
  minVersion: "12.0.0",
1556
1666
  version: "22.2.3",
1557
1667
  ngImport: i0,
1558
- type: TxTableColumnFilter,
1668
+ type: TxTableSettings,
1559
1669
  decorators: [{
1560
1670
  type: Component,
1561
1671
  args: [{
1562
- selector: "tx-table-column-filter",
1672
+ selector: "tx-table-settings",
1563
1673
  imports: [
1564
- NgTemplateOutlet,
1565
1674
  FormsModule,
1675
+ CdkDropList,
1676
+ CdkDrag,
1677
+ CdkDragHandle,
1678
+ TxIcon,
1566
1679
  TxButton,
1567
- TxInput,
1568
- TxInputNumber,
1569
- TxSelect,
1570
- TxMultiselect,
1680
+ TxCheckbox,
1571
1681
  TxPopover,
1572
1682
  TxPopoverTrigger,
1573
- TxMenu,
1574
- TxMenuTrigger
1683
+ TxTooltip
1575
1684
  ],
1576
1685
  template: `
1577
- <ng-template #editor let-rule let-index="index" let-live="live">
1578
- @switch (type()) {
1579
- @case ('numeric') {
1580
- <tx-input-number
1581
- size="small"
1582
- class="tx-table-filter__value"
1583
- [ariaLabel]="valueLabel()"
1584
- [placeholder]="column().filterPlaceholder"
1585
- [ngModel]="rule.value"
1586
- (ngModelChange)="setValue(index, $event, live)"
1587
- />
1588
- }
1589
- @case ('date') {
1590
- <input
1591
- txInput
1592
- type="date"
1593
- size="small"
1594
- class="tx-table-filter__value"
1595
- [attr.aria-label]="valueLabel()"
1596
- [value]="dateValue(rule.value)"
1597
- (change)="setValue(index, parseDate($any($event.target).value), live)"
1598
- />
1599
- }
1600
- @case ('boolean') {
1601
- <tx-select
1602
- size="small"
1603
- class="tx-table-filter__value"
1604
- optionLabel="label"
1605
- optionValue="value"
1606
- [options]="booleanOptions()"
1607
- [ariaLabel]="valueLabel()"
1608
- [ngModel]="rule.value"
1609
- (ngModelChange)="setValue(index, $event, true)"
1610
- />
1611
- }
1612
- @case ('options') {
1613
- <tx-multiselect
1614
- size="small"
1615
- class="tx-table-filter__value"
1616
- optionLabel="label"
1617
- optionValue="value"
1618
- [maxSelectedLabels]="2"
1619
- [options]="column().filterOptions ?? []"
1620
- [ariaLabel]="valueLabel()"
1621
- [placeholder]="column().filterPlaceholder ?? translations().filterAny"
1622
- [ngModel]="rule.value ?? []"
1623
- (ngModelChange)="setValue(index, $event, live)"
1624
- />
1625
- }
1626
- @default {
1627
- <input
1628
- txInput
1629
- type="text"
1630
- size="small"
1631
- class="tx-table-filter__value"
1632
- [attr.aria-label]="valueLabel()"
1633
- [placeholder]="column().filterPlaceholder ?? ''"
1634
- [value]="rule.value ?? ''"
1635
- (input)="setValue(index, $any($event.target).value, live)"
1636
- (keydown.enter)="apply()"
1637
- />
1638
- }
1639
- }
1640
- </ng-template>
1641
-
1642
- @if (display() === 'row') {
1643
- <div class="tx-table-filter__row">
1644
- <ng-container [ngTemplateOutlet]="editor" [ngTemplateOutletContext]="{ $implicit: live().rules[0], index: 0, live: true }" />
1645
- @if (modes().length > 1) {
1646
- <button
1647
- txButton
1648
- type="button"
1649
- text
1650
- rounded
1651
- size="small"
1652
- severity="secondary"
1653
- class="tx-table-filter__button"
1654
- [class.tx-table-filter__button--active]="active()"
1655
- [icon]="active() ? 'filter-fill' : 'filter'"
1656
- [attr.aria-label]="buttonLabel()"
1657
- [txMenuTrigger]="modeMenu"
1658
- ></button>
1659
- <tx-menu #modeMenu popup [model]="modeItems()" [ariaLabel]="translations().filterMatchMode" />
1686
+ <button
1687
+ txButton
1688
+ type="button"
1689
+ size="small"
1690
+ icon="cog"
1691
+ class="tx-table-settings__button"
1692
+ [unstyled]="unstyled()"
1693
+ [txTooltip]="translations().tableSettings"
1694
+ [attr.aria-label]="translations().tableSettings"
1695
+ [txPopoverTrigger]="panel"
1696
+ ></button>
1697
+ <tx-popover #panel placement="bottom-end" [ariaLabel]="translations().tableSettings" [unstyled]="unstyled()">
1698
+ <div class="tx-table-settings__panel">
1699
+ @if (tabs().length > 1) {
1700
+ <div class="tx-table-settings__tabs" role="tablist">
1701
+ @for (tab of tabs(); track tab) {
1702
+ <button
1703
+ type="button"
1704
+ role="tab"
1705
+ class="tx-table-settings__tab"
1706
+ [id]="id + '-' + tab"
1707
+ [attr.aria-selected]="tab === currentTab()"
1708
+ [attr.aria-controls]="id + '-panel'"
1709
+ [attr.tabindex]="tab === currentTab() ? 0 : -1"
1710
+ [txTooltip]="tab === 'columns' ? translations().tableColumnsHint : translations().tableActionsHint"
1711
+ (click)="activeTab.set(tab)"
1712
+ (keydown.arrowright)="moveTab(1)"
1713
+ (keydown.arrowleft)="moveTab(-1)"
1714
+ >
1715
+ <tx-icon aria-hidden="true" [name]="tab === 'columns' ? 'table' : 'bolt'" />
1716
+ {{ tab === 'columns' ? translations().tableColumns : translations().tableActions }}
1717
+ </button>
1718
+ }
1719
+ </div>
1720
+ } @else {
1721
+ <div class="tx-table-settings__title" [id]="id + '-' + currentTab()">
1722
+ <tx-icon aria-hidden="true" [name]="currentTab() === 'columns' ? 'table' : 'bolt'" />
1723
+ <span>{{ currentTab() === 'columns' ? translations().tableColumns : translations().tableActions }}</span>
1724
+ </div>
1660
1725
  }
1661
- </div>
1662
- } @else {
1663
- <button
1664
- txButton
1665
- type="button"
1666
- text
1667
- rounded
1668
- size="small"
1669
- severity="secondary"
1670
- class="tx-table-filter__button"
1671
- [class.tx-table-filter__button--active]="active()"
1672
- [icon]="active() ? 'filter-fill' : 'filter'"
1673
- [attr.aria-label]="buttonLabel()"
1674
- [txPopoverTrigger]="panel"
1675
- (click)="$event.stopPropagation()"
1676
- ></button>
1677
- <tx-popover #panel placement="bottom-start" [ariaLabel]="buttonLabel()" (opened)="startDraft()">
1678
- <div class="tx-table-filter">
1679
- @if (type() === 'boolean' || type() === 'options') {
1680
- <ng-container [ngTemplateOutlet]="editor" [ngTemplateOutletContext]="{ $implicit: draft().rules[0], index: 0, live: false }" />
1726
+ <div
1727
+ class="tx-table-settings__list"
1728
+ [id]="id + '-panel'"
1729
+ [attr.role]="tabs().length > 1 ? 'tabpanel' : 'group'"
1730
+ [attr.aria-labelledby]="id + '-' + currentTab()"
1731
+ >
1732
+ @if (currentTab() === 'columns') {
1733
+ <div
1734
+ #columnList
1735
+ cdkDropList
1736
+ class="tx-table-settings__actions"
1737
+ [cdkDropListDisabled]="!canReorder()"
1738
+ (cdkDropListDropped)="dropColumn($event)"
1739
+ >
1740
+ @for (column of listedColumns(); track column.field) {
1741
+ <div
1742
+ cdkDrag
1743
+ cdkDragLockAxis="y"
1744
+ class="tx-table-settings__action"
1745
+ [cdkDragBoundary]="columnList"
1746
+ [class.tx-table-settings__action--static]="!canReorder() || column.reorderable === false"
1747
+ [cdkDragDisabled]="!canReorder() || column.reorderable === false"
1748
+ >
1749
+ @if (canReorder()) {
1750
+ <span
1751
+ cdkDragHandle
1752
+ class="tx-table-settings__handle"
1753
+ [class.tx-table-settings__handle--hidden]="column.reorderable === false"
1754
+ [attr.aria-hidden]="true"
1755
+ >
1756
+ <tx-icon name="bars" />
1757
+ </span>
1758
+ }
1759
+ <tx-checkbox
1760
+ binary
1761
+ [label]="label(column)"
1762
+ [disabled]="column.hideable === false"
1763
+ [ngModel]="!hidden().has(column.field)"
1764
+ (ngModelChange)="columnToggled.emit({ field: column.field, visible: $event })"
1765
+ (keydown.alt.arrowup)="moveColumn(column, -1, $event)"
1766
+ (keydown.alt.arrowdown)="moveColumn(column, 1, $event)"
1767
+ />
1768
+ </div>
1769
+ }
1770
+ </div>
1681
1771
  } @else {
1682
- @if (draft().rules.length > 1) {
1683
- <tx-select
1684
- size="small"
1685
- optionLabel="label"
1686
- optionValue="value"
1687
- [options]="operatorOptions()"
1688
- [ariaLabel]="translations().filterMatchAll + ' / ' + translations().filterMatchAny"
1689
- [ngModel]="draft().operator"
1690
- (ngModelChange)="setOperator($event)"
1691
- />
1692
- }
1693
- @for (rule of draft().rules; track $index; let index = $index) {
1694
- <div class="tx-table-filter__rule">
1695
- @if (modes().length > 1) {
1696
- <tx-select
1697
- size="small"
1698
- optionLabel="label"
1699
- optionValue="value"
1700
- [options]="modeOptions()"
1701
- [ariaLabel]="translations().filterMatchMode"
1702
- [ngModel]="rule.matchMode"
1703
- (ngModelChange)="setMode(index, $event)"
1772
+ <div #actionList cdkDropList class="tx-table-settings__actions" (cdkDropListDropped)="dropAction($event)">
1773
+ @for (action of store.registeredActions(); track action.id; let index = $index) {
1774
+ <div cdkDrag cdkDragLockAxis="y" class="tx-table-settings__action" [cdkDragBoundary]="actionList">
1775
+ <span cdkDragHandle class="tx-table-settings__handle" aria-hidden="true">
1776
+ <tx-icon aria-hidden="true" name="bars" />
1777
+ </span>
1778
+ <tx-checkbox
1779
+ binary
1780
+ [label]="action.label"
1781
+ [ngModel]="store.isPinned(action.id)"
1782
+ (ngModelChange)="store.setPinned(action.id, $event)"
1783
+ (keydown.alt.arrowup)="moveAction(index, -1, $event)"
1784
+ (keydown.alt.arrowdown)="moveAction(index, 1, $event)"
1704
1785
  />
1705
- }
1706
- <ng-container [ngTemplateOutlet]="editor" [ngTemplateOutletContext]="{ $implicit: rule, index, live: false }" />
1707
- @if (draft().rules.length > 1) {
1708
- <button
1709
- txButton
1710
- type="button"
1711
- text
1712
- size="small"
1713
- severity="danger"
1714
- icon="trash"
1715
- [label]="translations().filterRemoveRule"
1716
- (click)="removeRule(index)"
1717
- ></button>
1718
- }
1719
- </div>
1720
- }
1721
- @if (draft().rules.length < maxRules) {
1722
- <button txButton type="button" text size="small" icon="plus" [label]="translations().filterAddRule" (click)="addRule()"></button>
1723
- }
1786
+ </div>
1787
+ }
1788
+ </div>
1724
1789
  }
1725
- <div class="tx-table-filter__footer">
1726
- <button txButton type="button" outlined size="small" severity="secondary" [label]="translations().clear" (click)="clear()"></button>
1727
- <button txButton type="button" size="small" [label]="translations().filterApply" (click)="apply()"></button>
1728
- </div>
1729
1790
  </div>
1730
- </tx-popover>
1731
- }
1791
+ </div>
1792
+ </tx-popover>
1732
1793
  `,
1733
1794
  changeDetection: ChangeDetectionStrategy.OnPush,
1734
- host: {
1735
- class: "tx-table-column-filter",
1736
- "[class.tx-table-column-filter--row]": "display() === 'row'"
1737
- },
1738
- styles: [":host{display:inline-flex;min-width:0}:host(.tx-table-column-filter--row){display:flex;width:100%}.tx-table-filter__row{display:flex;flex:1;align-items:center;gap:var(--tx-table-filter-gap, 7px);min-width:0}.tx-table-filter__row .tx-table-filter__value{flex:1;min-width:0;width:100%}.tx-table-filter{display:flex;flex-direction:column;gap:var(--tx-table-filter-gap, 7px);min-width:var(--tx-table-filter-min-width, 175px)}.tx-table-filter__rule{display:flex;flex-direction:column;gap:var(--tx-table-filter-gap, 7px);padding-bottom:var(--tx-table-filter-gap, 7px);border-bottom:1px solid var(--tx-surface-border)}.tx-table-filter__rule:last-of-type{padding-bottom:0;border-bottom:0}.tx-table-filter__footer{display:flex;align-items:center;justify-content:space-between;gap:var(--tx-table-filter-gap, 7px)}.tx-table-filter__value{width:100%}.tx-table-filter__button--active{color:var(--tx-primary-base)}\n"]
1795
+ host: { class: "tx-table-settings" },
1796
+ styles: [":host{display:inline-flex}.tx-table-settings__panel{display:flex;flex-direction:column;box-sizing:border-box;width:var(--tx-table-settings-width);gap:var(--tx-table-settings-gap)}.tx-table-settings__tabs,.tx-table-settings__title{display:flex;align-items:center;gap:var(--tx-table-settings-title-gap)}.tx-table-settings__title{padding-bottom:var(--tx-table-settings-item-padding);border-bottom:1px solid var(--tx-surface-border);color:var(--tx-text-primary);font-weight:var(--tx-table-settings-title-font-weight)}.tx-table-settings__tabs{border-bottom:1px solid var(--tx-surface-border)}.tx-table-settings__tab{display:inline-flex;flex:1;align-items:center;justify-content:center;gap:var(--tx-table-settings-title-gap);margin:0 0 -1px;padding:var(--tx-table-settings-item-padding) 0 calc(var(--tx-table-settings-item-padding) * 2);border:0;border-bottom:2px solid transparent;background:none;color:var(--tx-text-muted);font:inherit;font-weight:var(--tx-table-settings-title-font-weight);cursor:pointer}.tx-table-settings__tab[aria-selected=true]{border-bottom-color:var(--tx-primary-base);color:var(--tx-primary-base)}.tx-table-settings__tab:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}.tx-table-settings__list{display:flex;flex-direction:column;gap:var(--tx-table-settings-gap);max-height:var(--tx-table-settings-max-height);overflow-y:auto}.tx-table-settings__actions{display:flex;flex-direction:column;gap:calc(var(--tx-table-settings-item-padding) / 2)}.tx-table-settings__action{display:flex;align-items:center;gap:var(--tx-table-settings-title-gap);padding:var(--tx-table-settings-item-padding);border-radius:var(--tx-table-settings-item-radius);background:var(--tx-surface-card)}.tx-table-settings__action:hover{background:var(--tx-table-settings-item-hover-background)}.tx-table-settings__action--static{background:transparent}.tx-table-settings__handle--hidden{visibility:hidden}.tx-table-settings__handle{display:inline-flex;color:var(--tx-table-settings-handle-color);font-size:var(--tx-table-settings-handle-size);cursor:move}.cdk-drag-preview.tx-table-settings__action{box-shadow:var(--tx-shadow-overlay)}.cdk-drag-placeholder{opacity:.4}.cdk-drag-animating{transition:transform var(--tx-motion-duration) cubic-bezier(0,0,.2,1)}@media(prefers-reduced-motion:reduce){.cdk-drag-animating{transition:none}}\n"]
1739
1797
  }]
1740
1798
  }],
1741
- ctorParameters: () => [],
1742
1799
  propDecorators: {
1743
- panel: [{
1744
- type: i0.ViewChild,
1745
- args: ["panel", { isSignal: true }]
1800
+ columns: [{
1801
+ type: i0.Input,
1802
+ args: [{
1803
+ isSignal: true,
1804
+ alias: "columns",
1805
+ required: false
1806
+ }]
1746
1807
  }],
1747
- column: [{
1808
+ hidden: [{
1748
1809
  type: i0.Input,
1749
1810
  args: [{
1750
1811
  isSignal: true,
1751
- alias: "column",
1752
- required: true
1812
+ alias: "hidden",
1813
+ required: false
1753
1814
  }]
1754
1815
  }],
1755
- display: [{
1816
+ showColumns: [{
1756
1817
  type: i0.Input,
1757
1818
  args: [{
1758
1819
  isSignal: true,
1759
- alias: "display",
1820
+ alias: "showColumns",
1821
+ required: false
1822
+ }]
1823
+ }],
1824
+ showActions: [{
1825
+ type: i0.Input,
1826
+ args: [{
1827
+ isSignal: true,
1828
+ alias: "showActions",
1829
+ required: false
1830
+ }]
1831
+ }],
1832
+ unstyled: [{
1833
+ type: i0.Input,
1834
+ args: [{
1835
+ isSignal: true,
1836
+ alias: "unstyled",
1760
1837
  required: false
1761
1838
  }]
1839
+ }],
1840
+ columnToggled: [{
1841
+ type: i0.Output,
1842
+ args: ["columnToggled"]
1762
1843
  }]
1763
1844
  }
1764
1845
  });
1765
- const FORMULA = /^[=+\-@\t\r]/;
1766
- const NUMBER = /^[+-]?\d+([.,]\d+)?$/;
1767
- function csvCell(value, separator = ",") {
1768
- if (value === null || value === void 0) return "";
1769
- let text = value instanceof Date ? value.toISOString() : String(value);
1770
- if (FORMULA.test(text) && text.length > 1 && !NUMBER.test(text)) text = `'${text}`;
1771
- return /["\r\n]/.test(text) || text.includes(separator) ? `"${text.replace(/"/g, "\"\"")}"` : text;
1772
- }
1773
- function toCsv(rows, columns, options = {}) {
1774
- const separator = options.separator ?? ",";
1775
- const read = options.value ?? ((row, column) => resolveField(row, column.field));
1776
- const lines = rows.map((row) => columns.map((column) => csvCell(read(row, column), separator)).join(separator));
1777
- if (options.header !== false) lines.unshift(columns.map((column) => csvCell(columnLabel(column), separator)).join(separator));
1778
- return lines.join("\r\n");
1779
- }
1780
- function downloadCsv(document, csv, filename) {
1781
- const view = document.defaultView;
1782
- if (!view?.URL?.createObjectURL) return;
1783
- const url = view.URL.createObjectURL(new Blob(["", csv], { type: "text/csv;charset=utf-8" }));
1784
- const link = document.createElement("a");
1785
- link.href = url;
1786
- link.download = filename.endsWith(".csv") ? filename : `${filename}.csv`;
1787
- link.style.display = "none";
1788
- document.body.appendChild(link);
1789
- link.click();
1790
- link.remove();
1791
- view.setTimeout(() => view.URL.revokeObjectURL(url));
1792
- }
1793
- var TxTableStyles = class TxTableStyles {
1794
- static ɵfac = i0.ɵɵngDeclareFactory({
1795
- minVersion: "12.0.0",
1796
- version: "22.2.3",
1797
- ngImport: i0,
1798
- type: TxTableStyles,
1799
- deps: [],
1800
- target: i0.ɵɵFactoryTarget.Component
1801
- });
1802
- static ɵcmp = i0.ɵɵngDeclareComponent({
1803
- minVersion: "14.0.0",
1804
- version: "22.2.3",
1805
- type: TxTableStyles,
1806
- isStandalone: true,
1807
- selector: "tx-table-styles",
1808
- ngImport: i0,
1809
- template: "",
1810
- isInline: true,
1811
- styles: [".tx-table__drag-preview{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:var(--tx-table-header-cell-padding);border:1px solid var(--tx-table-drag-preview-border-color);border-radius:var(--tx-table-drag-preview-border-radius);background:var(--tx-table-drag-preview-background);box-shadow:var(--tx-table-drag-preview-shadow);color:var(--tx-table-header-cell-color);font-family:inherit;font-size:var(--tx-table-header-cell-font-size);font-weight:var(--tx-table-header-cell-font-weight);list-style:none}.tx-table__drag-preview .tx-table__resizer{display:none}.cdk-drag-animating.tx-table__th{transition:transform .3s cubic-bezier(.2,.8,.4,1)}.tx-table__menu-action{display:inline-flex;flex-shrink:0;pointer-events:none}.tx-table__menu-action .tx-button{width:24px;min-width:24px;height:24px;padding:0;font-size:10.5px}.tx-table__menu-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-menu__item:has(.tx-table__menu-action :is(button,a):disabled){opacity:.5;pointer-events:none}@media(prefers-reduced-motion:reduce){.cdk-drag-animating.tx-table__th{transition:none}}\n"],
1812
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1813
- encapsulation: i0.ViewEncapsulation.None
1814
- });
1815
- };
1816
- i0.ɵɵngDeclareClassMetadata({
1817
- minVersion: "12.0.0",
1818
- version: "22.2.3",
1819
- ngImport: i0,
1820
- type: TxTableStyles,
1821
- decorators: [{
1822
- type: Component,
1823
- args: [{
1824
- selector: "tx-table-styles",
1825
- template: "",
1826
- encapsulation: ViewEncapsulation.None,
1827
- changeDetection: ChangeDetectionStrategy.OnPush,
1828
- styles: [".tx-table__drag-preview{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:var(--tx-table-header-cell-padding);border:1px solid var(--tx-table-drag-preview-border-color);border-radius:var(--tx-table-drag-preview-border-radius);background:var(--tx-table-drag-preview-background);box-shadow:var(--tx-table-drag-preview-shadow);color:var(--tx-table-header-cell-color);font-family:inherit;font-size:var(--tx-table-header-cell-font-size);font-weight:var(--tx-table-header-cell-font-weight);list-style:none}.tx-table__drag-preview .tx-table__resizer{display:none}.cdk-drag-animating.tx-table__th{transition:transform .3s cubic-bezier(.2,.8,.4,1)}.tx-table__menu-action{display:inline-flex;flex-shrink:0;pointer-events:none}.tx-table__menu-action .tx-button{width:24px;min-width:24px;height:24px;padding:0;font-size:10.5px}.tx-table__menu-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-menu__item:has(.tx-table__menu-action :is(button,a):disabled){opacity:.5;pointer-events:none}@media(prefers-reduced-motion:reduce){.cdk-drag-animating.tx-table__th{transition:none}}\n"]
1829
- }]
1830
- }]
1831
- });
1846
+ const TX_TABLE_IMPORTS = [
1847
+ NgTemplateOutlet,
1848
+ FormsModule,
1849
+ CdkDropList,
1850
+ CdkDrag,
1851
+ CdkDragHandle,
1852
+ TxIcon,
1853
+ TxTooltip,
1854
+ TxSkeleton,
1855
+ TxButton,
1856
+ TxCheckbox,
1857
+ TxInput,
1858
+ TxInputNumber,
1859
+ TxSelect,
1860
+ TxRadioButton,
1861
+ TxPaginator,
1862
+ TxProgressSpinner,
1863
+ TxMenu,
1864
+ TxMenuItemTemplate,
1865
+ TxTableSettings,
1866
+ TxTableColumnFilter
1867
+ ];
1832
1868
  var TxTableCell = class TxTableCell {
1833
1869
  templateRef = inject(TemplateRef);
1834
1870
  txTableCell = input.required(...ngDevMode ? [{ debugName: "txTableCell" }] : /* istanbul ignore next */ []);
@@ -2622,7 +2658,11 @@ var TxTable = class TxTable {
2622
2658
  }));
2623
2659
  }, ...ngDevMode ? [{ debugName: "frozenRows" }] : /* istanbul ignore next */ []);
2624
2660
  animatedGroups = computed(() => !!this.groupRowsBy() && this.expandableRowGroups() && this.rowGroupMode() === "subheader", ...ngDevMode ? [{ debugName: "animatedGroups" }] : /* istanbul ignore next */ []);
2625
- hasSelectColumn = computed(() => this.selectionMode() === "checkbox" || this.selectionMode() === "radio", ...ngDevMode ? [{ debugName: "hasSelectColumn" }] : /* istanbul ignore next */ []);
2661
+ animatedRows = computed(() => this.animatedGroups() || this.isTree && !this.virtualScroll(), ...ngDevMode ? [{ debugName: "animatedRows" }] : /* istanbul ignore next */ []);
2662
+ isTree = false;
2663
+ treeCheckbox = computed(() => this.isTree && this.selectionMode() === "checkbox", ...ngDevMode ? [{ debugName: "treeCheckbox" }] : /* istanbul ignore next */ []);
2664
+ treeField = computed(() => this.isTree ? this.visibleColumns()[0]?.field ?? null : null, ...ngDevMode ? [{ debugName: "treeField" }] : /* istanbul ignore next */ []);
2665
+ hasSelectColumn = computed(() => this.selectionMode() === "checkbox" && !this.treeCheckbox() || this.selectionMode() === "radio", ...ngDevMode ? [{ debugName: "hasSelectColumn" }] : /* istanbul ignore next */ []);
2626
2666
  hasExpandColumn = computed(() => !!this.expansionTemplate(), ...ngDevMode ? [{ debugName: "hasExpandColumn" }] : /* istanbul ignore next */ []);
2627
2667
  hasActionsColumn = computed(() => !!this.actionsTemplate(), ...ngDevMode ? [{ debugName: "hasActionsColumn" }] : /* istanbul ignore next */ []);
2628
2668
  renderColumns = computed(() => {
@@ -2783,8 +2823,11 @@ var TxTable = class TxTable {
2783
2823
  const offset = this.frozenOffsets()[item.column.field] ?? 0;
2784
2824
  return item.frozen === "start" ? { insetInlineStart: `${offset}px` } : { insetInlineEnd: `${offset}px` };
2785
2825
  }
2826
+ dataOf(row) {
2827
+ return row;
2828
+ }
2786
2829
  cellValue(row, column) {
2787
- return resolveField(row, column.field);
2830
+ return resolveField(this.dataOf(row), column.field);
2788
2831
  }
2789
2832
  displayValue(row, column) {
2790
2833
  const value = this.cellValue(row, column);
@@ -2894,11 +2937,15 @@ var TxTable = class TxTable {
2894
2937
  this.emitLazyLoad();
2895
2938
  this.saveState();
2896
2939
  }
2940
+ identityOf(row) {
2941
+ const dataKey = this.dataKey();
2942
+ return dataKey ? resolveField(row, dataKey) : row;
2943
+ }
2897
2944
  isSelected(row) {
2898
2945
  const selection = this.selection();
2899
2946
  if (selection === null || selection === void 0) return false;
2900
- const dataKey = this.dataKey();
2901
- const same = (other) => dataKey ? resolveField(other, dataKey) === resolveField(row, dataKey) : other === row;
2947
+ const identity = this.identityOf(row);
2948
+ const same = (other) => this.identityOf(other) === identity;
2902
2949
  return Array.isArray(selection) ? selection.some(same) : same(selection);
2903
2950
  }
2904
2951
  multiple() {
@@ -2934,8 +2981,7 @@ var TxTable = class TxTable {
2934
2981
  this.selection.set(checked ? [...rest, ...page] : rest);
2935
2982
  }
2936
2983
  sameRow(a, b) {
2937
- const dataKey = this.dataKey();
2938
- return dataKey ? resolveField(a, dataKey) === resolveField(b, dataKey) : a === b;
2984
+ return this.identityOf(a) === this.identityOf(b);
2939
2985
  }
2940
2986
  onRowClick(item, position, event) {
2941
2987
  this.rowClick.emit({
@@ -2972,8 +3018,13 @@ var TxTable = class TxTable {
2972
3018
  const [start, end] = from < to ? [from, to] : [to, from];
2973
3019
  this.selection.set(rows.slice(start, end + 1).filter((row) => row.selectable).map((row) => row.row));
2974
3020
  }
3021
+ rowsFocusable() {
3022
+ return this.rowSelection();
3023
+ }
3024
+ treeRowKey;
2975
3025
  onRowKeydown(item, position, event) {
2976
- if (!this.rowSelection() || event.target !== event.currentTarget) return;
3026
+ if (!this.rowsFocusable() || event.target !== event.currentTarget) return;
3027
+ if (this.treeRowKey?.(item, position, event)) return;
2977
3028
  const count = this.renderRows().length;
2978
3029
  const focus = (next) => {
2979
3030
  const index = Math.max(0, Math.min(count - 1, next));
@@ -2999,6 +3050,7 @@ var TxTable = class TxTable {
2999
3050
  break;
3000
3051
  case " ":
3001
3052
  case "Enter":
3053
+ if (!this.selectionMode()) break;
3002
3054
  event.preventDefault();
3003
3055
  this.toggleRow(item, event);
3004
3056
  this.selectionAnchor = position;
@@ -3044,6 +3096,12 @@ var TxTable = class TxTable {
3044
3096
  });
3045
3097
  }
3046
3098
  }
3099
+ isCollapsedRow(item) {
3100
+ return !!item.group?.collapsed || !!item.tree?.hidden;
3101
+ }
3102
+ toggleNode(item, event) {
3103
+ this.toggleExpansion(item, event);
3104
+ }
3047
3105
  isClosing(key) {
3048
3106
  return this.closingKeys().includes(key);
3049
3107
  }
@@ -3088,8 +3146,8 @@ var TxTable = class TxTable {
3088
3146
  }
3089
3147
  editorContext(item, column) {
3090
3148
  return {
3091
- $implicit: item.row,
3092
- row: item.row,
3149
+ $implicit: this.dataOf(item.row),
3150
+ row: this.dataOf(item.row),
3093
3151
  index: item.index,
3094
3152
  column,
3095
3153
  value: this.draftValue(item, column),
@@ -3123,9 +3181,9 @@ var TxTable = class TxTable {
3123
3181
  this.cellEdit.set(null);
3124
3182
  const item = this.renderRows().find((row) => row.key === edit.key);
3125
3183
  if (!item) return;
3126
- const previousValue = resolveField(item.row, edit.field);
3184
+ const previousValue = resolveField(this.dataOf(item.row), edit.field);
3127
3185
  if (previousValue !== edit.value) {
3128
- writeField(item.row, edit.field, edit.value);
3186
+ writeField(this.dataOf(item.row), edit.field, edit.value);
3129
3187
  this.editVersion.update((version) => version + 1);
3130
3188
  }
3131
3189
  this.cellEditComplete.emit({
@@ -3142,7 +3200,7 @@ var TxTable = class TxTable {
3142
3200
  this.cellEdit.set(null);
3143
3201
  const item = this.renderRows().find((row) => row.key === edit.key);
3144
3202
  if (item) {
3145
- const value = resolveField(item.row, edit.field);
3203
+ const value = resolveField(this.dataOf(item.row), edit.field);
3146
3204
  this.cellEditCancel.emit({
3147
3205
  row: item.row,
3148
3206
  index: item.index,
@@ -3231,11 +3289,11 @@ var TxTable = class TxTable {
3231
3289
  const previous = {};
3232
3290
  const changes = {};
3233
3291
  Object.entries(draft).forEach(([field, value]) => {
3234
- const old = resolveField(item.row, field);
3292
+ const old = resolveField(this.dataOf(item.row), field);
3235
3293
  previous[field] = old;
3236
3294
  if (old !== value) {
3237
3295
  changes[field] = value;
3238
- writeField(item.row, field, value);
3296
+ writeField(this.dataOf(item.row), field, value);
3239
3297
  }
3240
3298
  });
3241
3299
  this.closeRowEdit(item.key);
@@ -3252,7 +3310,7 @@ var TxTable = class TxTable {
3252
3310
  if (!draft) return;
3253
3311
  this.closeRowEdit(item.key);
3254
3312
  const previous = {};
3255
- Object.keys(draft).forEach((field) => previous[field] = resolveField(item.row, field));
3313
+ Object.keys(draft).forEach((field) => previous[field] = resolveField(this.dataOf(item.row), field));
3256
3314
  this.rowEditCancel.emit({
3257
3315
  row: item.row,
3258
3316
  index: item.index,
@@ -3370,16 +3428,19 @@ var TxTable = class TxTable {
3370
3428
  }
3371
3429
  exportCSV(options = {}) {
3372
3430
  const selection = this.selection();
3373
- const rows = options.selectionOnly ? Array.isArray(selection) ? selection : selection ? [selection] : [] : this.sortedRows().filter((row) => row !== null && row !== void 0);
3431
+ const rows = options.selectionOnly ? Array.isArray(selection) ? selection : selection ? [selection] : [] : this.exportRows();
3374
3432
  const columns = this.visibleColumns();
3375
3433
  const own = this.exportFunction();
3376
3434
  const csv = toCsv(rows, columns, {
3377
3435
  separator: this.csvSeparator(),
3378
- value: own ? (row, column) => own(row, column) : void 0
3436
+ value: own ? (row, column) => own(row, column) : (row, column) => this.cellValue(row, column)
3379
3437
  });
3380
3438
  downloadCsv(this.document, csv, options.filename ?? this.exportFilename());
3381
3439
  return csv;
3382
3440
  }
3441
+ exportRows() {
3442
+ return this.sortedRows().filter((row) => row !== null && row !== void 0);
3443
+ }
3383
3444
  canExpand(item) {
3384
3445
  const expandable = this.expandableRows();
3385
3446
  return !expandable || expandable(item.row, item.index);
@@ -4395,12 +4456,12 @@ var TxTable = class TxTable {
4395
4456
  isSignal: true
4396
4457
  }],
4397
4458
  ngImport: i0,
4398
- template: "@if (showToolbar()) {\n <div class=\"tx-table__toolbar\" [class]=\"passThrough().toolbar?.class\" [style]=\"passThrough().toolbar?.style\">\n <div class=\"tx-table__toolbar-slot\"><ng-content select=\"[txTableToolbar]\" /></div>\n @if (showSettings()) {\n <tx-table-settings\n [columns]=\"columns()\"\n [hidden]=\"hidden()\"\n [showColumns]=\"columnSettings()\"\n [showActions]=\"actionsSettings()\"\n [unstyled]=\"isUnstyled()\"\n (columnToggled)=\"toggleColumn($event.field, $event.visible)\"\n />\n }\n </div>\n}\n\n@if (showPaginatorTop()) {\n <ng-container [ngTemplateOutlet]=\"pager\" [ngTemplateOutletContext]=\"{ $implicit: 'top' }\" />\n}\n\n<div class=\"tx-table__frame\" [class]=\"passThrough().frame?.class\" [style]=\"passThrough().frame?.style\" [attr.aria-busy]=\"loading() || null\">\n @if (cardView() && selectionMode() === 'checkbox' && !empty()) {\n <div class=\"tx-table__select-all\">\n <tx-checkbox\n binary\n [label]=\"translations().selectAll\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"toggleAll($event)\"\n />\n </div>\n }\n\n @if (loading()) {\n <div class=\"tx-table__loading\" [class]=\"passThrough().loading?.class\" [style]=\"passThrough().loading?.style\">\n <tx-progress-spinner [ariaLabel]=\"translations().loading\" [unstyled]=\"isUnstyled()\" />\n </div>\n }\n\n @if (!cardView()) {\n <div\n class=\"tx-table__scroller\"\n [class.tx-table__scroller--empty]=\"empty()\"\n [class]=\"passThrough().scroller?.class\"\n [style]=\"passThrough().scroller?.style\"\n [style.max-height]=\"scrollHeight()\"\n (scroll)=\"onScroll($event)\"\n >\n <table\n class=\"tx-table__table\"\n [class]=\"passThrough().table?.class\"\n [style]=\"passThrough().table?.style\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-multiselectable]=\"rowSelection() ? selectionMode() === 'multiple' : null\"\n [attr.role]=\"rowSelection() ? 'grid' : null\"\n >\n <thead class=\"tx-table__thead\" [class]=\"passThrough().thead?.class\" [style]=\"passThrough().thead?.style\">\n <tr\n #headerRow\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n class=\"tx-table__header-row\"\n [class]=\"passThrough().headerRow?.class\"\n [style]=\"passThrough().headerRow?.style\"\n [cdkDropListDisabled]=\"!reorderableColumns()\"\n (cdkDropListDropped)=\"dropColumn($event)\"\n >\n @for (item of renderColumns(); track item.column.field; let last = $last) {\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragPreviewClass=\"tx-table__drag-preview\"\n [cdkDragBoundary]=\"headerRow\"\n scope=\"col\"\n class=\"tx-table__th\"\n [class]=\"[item.column.headerClass ?? '', passThrough().headerCell?.class ?? '']\"\n [style]=\"passThrough().headerCell?.style\"\n [style.width]=\"item.style['width']\"\n [style.min-width]=\"item.style['minWidth']\"\n [style.max-width]=\"item.style['maxWidth']\"\n [style.inset-inline-start]=\"frozenStyle(item)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(item)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!item.frozen\"\n [class.tx-table__cell--frozen-last]=\"item.lastFrozenStart\"\n [class.tx-table__cell--frozen-first-end]=\"item.firstFrozenEnd\"\n [class.tx-table__th--draggable]=\"reorderableColumns() && item.kind === 'data' && item.column.reorderable !== false\"\n [attr.data-field]=\"item.column.field\"\n [attr.data-align]=\"item.column.align ?? null\"\n [attr.aria-sort]=\"item.kind === 'data' ? ariaSort(item.column) : null\"\n [cdkDragDisabled]=\"!reorderableColumns() || item.kind !== 'data' || item.column.reorderable === false\"\n >\n @switch (item.kind) {\n @case ('select') {\n @if (selectionMode() === 'checkbox') {\n <tx-checkbox\n binary\n class=\"tx-table__select\"\n [ariaLabel]=\"translations().selectAll\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"toggleAll($event)\"\n />\n } @else {\n <span class=\"tx-table__sr-only\">{{ translations().selectRow }}</span>\n }\n }\n @case ('expand') {\n <span class=\"tx-table__sr-only\">{{ translations().expandRow }}</span>\n }\n @case ('actions') {\n <span class=\"tx-table__column-title\">{{ item.column.header }}</span>\n }\n @default {\n <div class=\"tx-table__header-content\">\n @if (headerTemplatesByField().get(item.column.field); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.column }\" />\n } @else if (isSortable(item.column)) {\n @if (reorderableColumns() && item.column.reorderable !== false) {\n <tx-icon class=\"tx-table__grip\" aria-hidden=\"true\" name=\"grip-vertical\" />\n }\n <button\n type=\"button\"\n class=\"tx-table__sort\"\n [class]=\"passThrough().sortButton?.class\"\n [style]=\"passThrough().sortButton?.style\"\n (click)=\"sort(item.column, $event)\"\n (keydown.alt.arrowleft)=\"moveColumnBy(item.column, -1, $event)\"\n (keydown.alt.arrowright)=\"moveColumnBy(item.column, 1, $event)\"\n >\n <span class=\"tx-table__column-title\">{{ label(item.column) }}</span>\n @if (sortOrderOf(item.column); as order) {\n <tx-icon\n class=\"tx-table__sort-icon\"\n aria-hidden=\"true\"\n name=\"sort-amount-down\"\n [class.tx-table__sort-icon--desc]=\"order === 'desc'\"\n [class]=\"passThrough().sortIcon?.class\"\n [style]=\"passThrough().sortIcon?.style\"\n />\n @if (sortMode() === 'multiple' && sortMeta().length > 1) {\n <span class=\"tx-table__sort-badge\" aria-hidden=\"true\">{{ sortIndexOf(item.column) + 1 }}</span>\n }\n }\n </button>\n } @else {\n @if (reorderableColumns() && item.column.reorderable !== false) {\n <tx-icon class=\"tx-table__grip\" aria-hidden=\"true\" name=\"grip-vertical\" />\n }\n <span class=\"tx-table__column-title\">{{ label(item.column) }}</span>\n }\n @if (item.column.filter && filterDisplay() === 'menu') {\n <tx-table-column-filter class=\"tx-table__filter\" [column]=\"item.column\" />\n }\n </div>\n }\n }\n @if (resizableColumns() && item.kind === 'data' && item.column.resizable !== false && item.column.width === undefined && !last) {\n <span\n class=\"tx-table__resizer\"\n role=\"separator\"\n tabindex=\"0\"\n aria-orientation=\"vertical\"\n [class.tx-table__resizer--active]=\"resizing() === item.column.field\"\n [attr.aria-label]=\"translations().resizeColumn.replace('{column}', label(item.column))\"\n [attr.aria-valuenow]=\"resizeValue(item.column)\"\n [attr.aria-valuemin]=\"resizeMin(item.column)\"\n [attr.aria-valuemax]=\"resizeMax(item.column)\"\n (pointerdown)=\"startResize(item, $event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown.arrowleft)=\"resizeByKey(item, -10, $event)\"\n (keydown.arrowright)=\"resizeByKey(item, 10, $event)\"\n >\n <span class=\"tx-table__resizer-line\"></span>\n </span>\n }\n </th>\n }\n </tr>\n @if (filterRow()) {\n <tr class=\"tx-table__filter-row\">\n @for (item of renderColumns(); track item.column.field) {\n <td\n class=\"tx-table__th tx-table__filter-cell\"\n [style.inset-inline-start]=\"frozenStyle(item)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(item)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!item.frozen\"\n [class.tx-table__cell--frozen-last]=\"item.lastFrozenStart\"\n [class.tx-table__cell--frozen-first-end]=\"item.firstFrozenEnd\"\n >\n @if (item.kind === 'data' && item.column.filter) {\n <tx-table-column-filter display=\"row\" [column]=\"item.column\" />\n }\n </td>\n }\n </tr>\n }\n </thead>\n @if (frozenRows().length) {\n <tbody class=\"tx-table__frozen-tbody\" [style.top.px]=\"headerHeight()\">\n @for (item of frozenRows(); track item.key; let position = $index) {\n <tr class=\"tx-table__row tx-table__row--frozen\">\n <ng-container [ngTemplateOutlet]=\"rowCells\" [ngTemplateOutletContext]=\"{ $implicit: item, position }\" />\n </tr>\n }\n </tbody>\n }\n <tbody\n #tbody\n cdkDropList\n class=\"tx-table__tbody\"\n [class]=\"passThrough().tbody?.class\"\n [style]=\"passThrough().tbody?.style\"\n [cdkDropListDisabled]=\"!reorderableRows()\"\n (cdkDropListDropped)=\"dropRow($event)\"\n >\n @if (spacerBefore()) {\n <tr class=\"tx-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"dataColumnCount()\" [style.height.px]=\"spacerBefore()\"></td>\n </tr>\n }\n @for (item of visibleRows(); track item.key; let windowIndex = $index) {\n @let position = windowRange().start + windowIndex;\n @let odd = position % 2 === 1;\n @if (item.group?.first && rowGroupMode() === 'subheader') {\n <tr class=\"tx-table__group-header\">\n <td class=\"tx-table__group-cell\" [attr.colspan]=\"dataColumnCount()\">\n <div class=\"tx-table__group-content\">\n @if (expandableRowGroups()) {\n <button\n type=\"button\"\n class=\"tx-table__row-toggle\"\n [attr.aria-expanded]=\"!item.group.collapsed\"\n [attr.aria-label]=\"item.group.collapsed ? translations().expandRow : translations().collapseRow\"\n (click)=\"toggleGroup(item)\"\n >\n <tx-icon aria-hidden=\"true\" name=\"chevron-right\" class=\"tx-table__row-toggle-icon\" [class.tx-table__row-toggle-icon--open]=\"!item.group.collapsed\" />\n </button>\n }\n @if (groupHeaderTemplate(); as header) {\n <ng-container [ngTemplateOutlet]=\"header.templateRef\" [ngTemplateOutletContext]=\"groupContext(item)\" />\n } @else {\n <span class=\"tx-table__group-title\">{{ item.group.value }}</span>\n <span class=\"tx-table__group-count\">{{ translations().rowGroup.replace('{count}', '' + item.group.size) }}</span>\n }\n </div>\n </td>\n </tr>\n }\n @if (!item.group?.collapsed || animatedGroups()) {\n <tr\n cdkDrag\n cdkDragLockAxis=\"y\"\n cdkDragPreviewContainer=\"parent\"\n class=\"tx-table__row\"\n [class]=\"[rowClassOf(item) ?? '', passThrough().row?.class ?? '']\"\n [style]=\"passThrough().row?.style\"\n [class.tx-table__row--odd]=\"odd\"\n [class.tx-table__row--selected]=\"item.selected\"\n [class.tx-table__row--selectable]=\"rowSelection() && item.selectable\"\n [class.tx-table__row--menu]=\"menuRowKey() === item.key && menuRowKey() !== undefined\"\n [attr.aria-selected]=\"rowSelection() ? item.selected : null\"\n [attr.tabindex]=\"rowSelection() ? (position === focusedRow() ? 0 : -1) : null\"\n [attr.data-key]=\"item.key\"\n [class.tx-table__row--editing]=\"isRowEditing(item)\"\n [class.tx-table__row--collapsed]=\"!!item.group?.collapsed\"\n [attr.inert]=\"item.group?.collapsed ? '' : null\"\n [attr.aria-hidden]=\"item.group?.collapsed ? true : null\"\n (click)=\"onRowClick(item, position, $event)\"\n (keydown)=\"onRowKeydown(item, position, $event)\"\n (contextmenu)=\"onRowContextMenu(item, $event)\"\n >\n <ng-container [ngTemplateOutlet]=\"rowCells\" [ngTemplateOutletContext]=\"{ $implicit: item, position }\" />\n </tr>\n @if ((item.expanded || isClosing(item.key)) && !item.group?.collapsed && expansionTemplate(); as expansion) {\n <tr class=\"tx-table__expansion\">\n <td class=\"tx-table__expansion-cell\" [attr.colspan]=\"dataColumnCount()\">\n <div\n class=\"tx-table__expansion-body\"\n [class.tx-table__expansion-body--open]=\"item.expanded\"\n (transitionend)=\"finishClosing(item.key, $event)\"\n >\n <div class=\"tx-table__expansion-inner\">\n <div class=\"tx-table__expansion-content\">\n <ng-container [ngTemplateOutlet]=\"expansion.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.row, index: item.index }\" />\n </div>\n </div>\n </div>\n </td>\n </tr>\n }\n @if (item.group?.last && rowGroupMode() === 'subheader' && groupFooterTemplate(); as footer) {\n <tr class=\"tx-table__group-footer\">\n <td class=\"tx-table__group-cell\" [attr.colspan]=\"dataColumnCount()\">\n <ng-container [ngTemplateOutlet]=\"footer.templateRef\" [ngTemplateOutletContext]=\"groupContext(item)\" />\n </td>\n </tr>\n }\n }\n }\n @if (spacerAfter()) {\n <tr class=\"tx-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"dataColumnCount()\" [style.height.px]=\"spacerAfter()\"></td>\n </tr>\n }\n </tbody>\n @if (hasFooter()) {\n <tfoot class=\"tx-table__tfoot\" [class]=\"passThrough().tfoot?.class\" [style]=\"passThrough().tfoot?.style\">\n <tr>\n @for (item of renderColumns(); track item.column.field) {\n <td\n class=\"tx-table__footer-cell\"\n [class]=\"passThrough().footerCell?.class\"\n [style]=\"passThrough().footerCell?.style\"\n [style.inset-inline-start]=\"frozenStyle(item)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(item)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!item.frozen\"\n [attr.data-align]=\"item.column.align ?? null\"\n >\n @if (footerTemplatesByField().get(item.column.field); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.column }\" />\n } @else {\n {{ item.column.footer }}\n }\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n </div>\n } @else if (!empty()) {\n <div class=\"tx-table__cards\" role=\"list\" [class]=\"passThrough().cards?.class\" [style]=\"passThrough().cards?.style\" [attr.aria-label]=\"ariaLabel() ?? null\">\n @for (item of renderRows(); track item.key) {\n <div\n role=\"listitem\"\n class=\"tx-table__card\"\n [class]=\"passThrough().card?.class\"\n [style]=\"passThrough().card?.style\"\n [class.tx-table__card--selected]=\"item.selected\"\n [class.tx-table__card--custom]=\"!!cardTemplate()\"\n >\n @if (cardTemplate(); as card) {\n <ng-container [ngTemplateOutlet]=\"card.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.row, index: item.index }\" />\n } @else {\n @if (hasSelectColumn()) {\n <div class=\"tx-table__card-select\">\n @if (selectionMode() === 'checkbox') {\n <tx-checkbox\n binary\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"item.selected\"\n (ngModelChange)=\"toggleRow(item)\"\n />\n } @else {\n <tx-radio-button\n [value]=\"item.key\"\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"radioValue()\"\n (ngModelChange)=\"selectRadio(item)\"\n />\n }\n </div>\n }\n @if (cardTitleColumn(); as title) {\n <div class=\"tx-table__card-title\" [class.tx-table__card-title--select]=\"hasSelectColumn()\">\n <ng-container [ngTemplateOutlet]=\"cellContent\" [ngTemplateOutletContext]=\"{ $implicit: item, column: title }\" />\n </div>\n }\n @for (column of cardFields(); track column.field) {\n <div class=\"tx-table__card-field\">\n <span class=\"tx-table__card-label\">{{ label(column) }}</span>\n <span class=\"tx-table__card-value\"><ng-container [ngTemplateOutlet]=\"cellContent\" [ngTemplateOutletContext]=\"{ $implicit: item, column }\" /></span>\n </div>\n }\n @if (actionsTemplate(); as actions) {\n <div class=\"tx-table__card-actions\">\n <ng-container [ngTemplateOutlet]=\"actions.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.row, index: item.index }\" />\n </div>\n }\n }\n </div>\n }\n </div>\n }\n\n @if (empty()) {\n <div class=\"tx-table__empty\" [class]=\"passThrough().empty?.class\" [style]=\"passThrough().empty?.style\">\n @if (emptyTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: dataColumnCount() }\" />\n } @else {\n {{ emptyMessage() ?? translations().emptyMessage }}\n }\n </div>\n }\n</div>\n\n@if (showPaginatorBottom()) {\n <ng-container [ngTemplateOutlet]=\"pager\" [ngTemplateOutletContext]=\"{ $implicit: 'bottom' }\" />\n}\n\n<ng-content />\n\n<tx-tiered-menu\n #rowMenu\n popup\n variant=\"context\"\n placement=\"bottom-start\"\n [offset]=\"0\"\n [model]=\"menuItems()\"\n [ariaLabel]=\"translations().rowActions\"\n [unstyled]=\"isUnstyled()\"\n (closed)=\"onMenuClosed()\"\n>\n <ng-template txMenuItem let-menuItem>\n @if (actionTemplate(menuItem); as action) {\n <span class=\"tx-table__menu-action\" aria-hidden=\"true\" [attr.data-action-id]=\"action.id()\">\n <ng-container [ngTemplateOutlet]=\"action.templateRef\" />\n </span>\n } @else if (menuItem.icon) {\n <tx-icon class=\"tx-table__menu-icon\" aria-hidden=\"true\" [name]=\"menuItem.icon\" />\n }\n <span class=\"tx-table__menu-label\">{{ menuItem.label }}</span>\n </ng-template>\n</tx-tiered-menu>\n\n<ng-template #cellContent let-item let-column=\"column\">\n @if (templatesByField().get(column.field); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item.row, row: item.row, index: item.index, column, value: cellValue(item.row, column) }\"\n />\n } @else {\n {{ displayValue(item.row, column) }}\n }\n</ng-template>\n\n<ng-template #pager let-position>\n <tx-paginator\n class=\"tx-table__paginator\"\n [class.tx-table__paginator--top]=\"position === 'top'\"\n [class]=\"passThrough().paginator?.class\"\n [style]=\"passThrough().paginator?.style\"\n [first]=\"first()\"\n [rows]=\"rows()\"\n [totalRecords]=\"total()\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [showTotal]=\"showTotal()\"\n [showCurrentPageReport]=\"showCurrentPageReport()\"\n [currentPageReportTemplate]=\"currentPageReportTemplate()\"\n [showFirstLastIcon]=\"showFirstLastIcon()\"\n [showPageLinks]=\"showPageLinks()\"\n [showJumpToPageDropdown]=\"showJumpToPageDropdown()\"\n [showJumpToPageInput]=\"showJumpToPageInput()\"\n [alwaysShow]=\"alwaysShowPaginator()\"\n [pageLinkSize]=\"pageLinks()\"\n [unstyled]=\"isUnstyled()\"\n (pageChange)=\"onPage($event)\"\n />\n</ng-template>\n\n<ng-template #rowCells let-item let-position=\"position\">\n @for (column of renderColumns(); track column.column.field) {\n @if (!isGroupedCellHidden(item, column)) {\n <td\n class=\"tx-table__td\"\n [class]=\"[column.column.cellClass ?? '', passThrough().cell?.class ?? '']\"\n [style]=\"passThrough().cell?.style\"\n [style.inset-inline-start]=\"frozenStyle(column)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(column)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!column.frozen\"\n [class.tx-table__cell--frozen-last]=\"column.lastFrozenStart\"\n [class.tx-table__cell--frozen-first-end]=\"column.firstFrozenEnd\"\n [class.tx-table__td--actions]=\"column.kind === 'actions'\"\n [class.tx-table__td--editable]=\"column.kind === 'data' && editMode() === 'cell' && !!column.column.editable\"\n [class.tx-table__td--editing]=\"column.kind === 'data' && isEditing(item, column.column)\"\n [attr.data-field]=\"column.column.field\"\n [attr.data-align]=\"column.column.align ?? null\"\n [attr.rowspan]=\"groupRowspan(item, column)\"\n [attr.tabindex]=\"column.kind === 'data' && editMode() === 'cell' && column.column.editable ? 0 : null\"\n (click)=\"onCellClick(item, column, $event)\"\n (keydown)=\"onCellKeydown(item, column, $event)\"\n (focusout)=\"onCellFocusOut(item, column, $event)\"\n >\n @if (animatedGroups()) {\n <div class=\"tx-table__cell-body\">\n <div class=\"tx-table__cell-inner\">\n <ng-container [ngTemplateOutlet]=\"cellBody\" [ngTemplateOutletContext]=\"{ $implicit: item, column, position }\" />\n </div>\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"cellBody\" [ngTemplateOutletContext]=\"{ $implicit: item, column, position }\" />\n }\n </td>\n }\n }\n</ng-template>\n\n<ng-template #cellBody let-item let-column=\"column\" let-position=\"position\">\n @switch (column.kind) {\n @case ('reorder') {\n <button\n type=\"button\"\n cdkDragHandle\n class=\"tx-table__row-handle\"\n [attr.aria-label]=\"translations().moveRow\"\n (keydown.alt.arrowup)=\"moveRowBy(position, -1, $event)\"\n (keydown.alt.arrowdown)=\"moveRowBy(position, 1, $event)\"\n >\n <tx-icon aria-hidden=\"true\" name=\"bars\" />\n </button>\n }\n @case ('select') {\n @if (selectionMode() === 'checkbox') {\n <tx-checkbox\n binary\n class=\"tx-table__select\"\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"item.selected\"\n (ngModelChange)=\"toggleRow(item)\"\n />\n } @else {\n <tx-radio-button\n class=\"tx-table__select\"\n [value]=\"item.key\"\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"radioValue()\"\n (ngModelChange)=\"selectRadio(item)\"\n />\n }\n }\n @case ('expand') {\n @if (canExpand(item)) {\n <button\n type=\"button\"\n class=\"tx-table__row-toggle\"\n [attr.aria-expanded]=\"item.expanded\"\n [attr.aria-label]=\"item.expanded ? translations().collapseRow : translations().expandRow\"\n (click)=\"toggleExpansion(item, $event)\"\n >\n <tx-icon aria-hidden=\"true\" name=\"chevron-right\" class=\"tx-table__row-toggle-icon\" [class.tx-table__row-toggle-icon--open]=\"item.expanded\" />\n </button>\n }\n }\n @case ('actions') {\n @if (actionsTemplate(); as actions) {\n <ng-container [ngTemplateOutlet]=\"actions.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.row, index: item.index }\" />\n }\n }\n @case ('editor') {\n <div class=\"tx-table__row-editor\">\n @if (isRowEditing(item)) {\n <button\n txButton\n type=\"button\"\n text\n rounded\n size=\"small\"\n severity=\"success\"\n icon=\"check\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"translations().saveRow\"\n (click)=\"saveRow(item)\"\n ></button>\n <button\n txButton\n type=\"button\"\n text\n rounded\n size=\"small\"\n severity=\"danger\"\n icon=\"times\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"translations().cancelEdit\"\n (click)=\"cancelRow(item)\"\n ></button>\n } @else {\n <button\n txButton\n type=\"button\"\n text\n rounded\n size=\"small\"\n severity=\"secondary\"\n icon=\"pencil\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"translations().editRow\"\n (click)=\"startRowEdit(item)\"\n ></button>\n }\n </div>\n }\n @default {\n @if (isEditing(item, column.column)) {\n <div class=\"tx-table__editor\">\n @if (editorTemplatesByField().get(column.column.field); as editor) {\n <ng-container [ngTemplateOutlet]=\"editor.templateRef\" [ngTemplateOutletContext]=\"editorContext(item, column.column)\" />\n } @else if (column.column.editOptions?.length) {\n <tx-select\n size=\"small\"\n optionLabel=\"label\"\n optionValue=\"value\"\n class=\"tx-table__editor-control\"\n [options]=\"column.column.editOptions\"\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"draftValue(item, column.column)\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n } @else {\n @switch (column.column.editType ?? 'text') {\n @case ('numeric') {\n <tx-input-number\n size=\"small\"\n class=\"tx-table__editor-control\"\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"draftValue(item, column.column)\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n }\n @case ('boolean') {\n <tx-checkbox\n binary\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"draftValue(item, column.column)\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n }\n @case ('date') {\n <input\n txInput\n type=\"date\"\n size=\"small\"\n class=\"tx-table__editor-control\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"label(column.column)\"\n [value]=\"dateInput(draftValue(item, column.column))\"\n (change)=\"setDraft(item, column.column, parseDateInput($any($event.target).value))\"\n />\n }\n @default {\n <input\n txInput\n type=\"text\"\n size=\"small\"\n class=\"tx-table__editor-control\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"label(column.column)\"\n [value]=\"draftValue(item, column.column) ?? ''\"\n (input)=\"setDraft(item, column.column, $any($event.target).value)\"\n />\n }\n }\n }\n </div>\n } @else if (templatesByField().get(column.column.field); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template.templateRef\"\n [ngTemplateOutletContext]=\"{\n $implicit: item.row,\n row: item.row,\n index: item.index,\n column: column.column,\n value: cellValue(item.row, column.column),\n }\"\n />\n } @else if (isLoadingRow(item)) {\n <tx-skeleton class=\"tx-table__loading-cell\" height=\"14px\" />\n } @else if (cellTooltip()) {\n <span class=\"tx-table__cell-text\" tooltipOverflowOnly [txTooltip]=\"displayValue(item.row, column.column)\">{{ displayValue(item.row, column.column) }}</span>\n } @else {\n {{ displayValue(item.row, column.column) }}\n }\n }\n }\n</ng-template>\n",
4399
- styles: [":host{display:block;min-width:0}.tx-table__toolbar{display:flex;align-items:center;justify-content:space-between}.tx-table__toolbar-slot{flex:1;min-width:0}.tx-table__frame{position:relative}.tx-table__scroller{position:relative;overflow:auto}.tx-table__scroller--empty{overflow:hidden}.tx-table__table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0}.tx-table__thead{position:sticky;inset-block-start:0;z-index:2}.tx-table__th,.tx-table__td,.tx-table__footer-cell{box-sizing:border-box;overflow:hidden;text-align:start;vertical-align:middle}.tx-table__th{position:relative;white-space:nowrap;text-overflow:ellipsis}.tx-table__td{white-space:nowrap;text-overflow:ellipsis;font-variant-numeric:tabular-nums}[data-align=center]{text-align:center}[data-align=end]{text-align:end}.tx-table__cell--frozen{position:sticky;z-index:1}.tx-table__sort{display:inline-flex;align-items:center;max-width:100%;margin:0;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:inherit;cursor:pointer}.tx-table__header-content{display:flex;align-items:center;min-width:0}.tx-table__header-content>.tx-table__sort,.tx-table__header-content>.tx-table__column-title{min-width:0}.tx-table__filter{flex-shrink:0;margin-inline-start:auto}.tx-table__filter-cell{overflow:visible}.tx-table__column-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-table__sort-icon{flex-shrink:0}.tx-table__sort-icon--desc{transform:rotate(180deg)}.tx-table__sort-badge{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.tx-table__resizer{position:absolute;inset-block:0;inset-inline-end:-5px;z-index:3;display:flex;align-items:center;justify-content:center;cursor:col-resize;touch-action:none}.tx-table__resizer:before{content:\"\";position:absolute;inset-block:0;inset-inline-start:-2px;width:14px}.tx-table__resizer-line{height:100%}.tx-table__th--draggable{cursor:grab}.tx-table__th--draggable:active{cursor:grabbing}.tx-table__row--selectable{cursor:pointer}.tx-table__row-toggle{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;margin:0;padding:0;border:0;background:transparent;cursor:pointer}.tx-table__row-toggle-icon:dir(rtl){transform:scaleX(-1)}.tx-table__row-toggle-icon--open,.tx-table__row-toggle-icon--open:dir(rtl){transform:rotate(90deg)}.tx-table__expansion-body{display:grid;grid-template-rows:0fr}.tx-table__expansion-body--open{grid-template-rows:1fr}.tx-table__expansion-inner{min-height:0;overflow:hidden}.tx-table__expansion-body:not(.tx-table__expansion-body--open)>.tx-table__expansion-inner{visibility:hidden}.tx-table__grip{position:absolute;inset-block-start:50%;inset-inline-start:1px;opacity:0;transform:translateY(-50%);pointer-events:none}.tx-table__th--draggable:hover .tx-table__grip,.tx-table__th--draggable:focus-within .tx-table__grip{opacity:1}.tx-table__select{display:inline-flex;vertical-align:middle}.tx-table__editor{display:flex;align-items:center;min-width:0}.tx-table__editor-control{flex:1;width:100%;min-width:0}.tx-table__row-editor{display:flex;align-items:center;justify-content:center}.tx-table__td--editable{cursor:text}.tx-table__td--editing{overflow:visible;text-overflow:clip}.tx-table__cell-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-table__spacer>td{padding:0;border:0}.tx-table__cell-body{display:grid;grid-template-rows:1fr}.tx-table__cell-inner{min-height:0;overflow:hidden;text-overflow:ellipsis}.tx-table__row--collapsed .tx-table__cell-body{grid-template-rows:0fr}.tx-table__row--collapsed .tx-table__cell-inner{visibility:hidden}.tx-table__frozen-tbody{position:sticky;z-index:2}.tx-table__row-handle{display:inline-flex;align-items:center;justify-content:center;margin:0;padding:0;border:0;background:transparent;color:inherit;cursor:grab;touch-action:none}.tx-table__tbody.cdk-drop-list-dragging .tx-table__row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.tx-table__row.cdk-drag-preview{display:table-row}.tx-table__group-content{display:flex;align-items:center}.tx-table__loading{position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center}.tx-table__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.tx-table__cards{display:grid}.tx-table__card{position:relative;display:flex;flex-direction:column;min-width:0}.tx-table__card-field,.tx-table__card-title{display:flex;align-items:center;min-width:0;overflow-wrap:break-word}.tx-table__card-field{text-align:end}.tx-table__card-label{flex-shrink:0;max-width:45%;margin-inline-end:auto;text-align:start}.tx-table__card-value{min-width:0}.tx-table__card-select{position:absolute;z-index:1}.tx-table__card-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;order:99;margin-top:auto}.tx-table--resizing{cursor:col-resize;-webkit-user-select:none;user-select:none}.tx-table--resizing *{cursor:col-resize}:host([data-styled]){color:var(--tx-table-color);font-size:var(--tx-table-font-size);line-height:var(--tx-table-line-height)}:host([data-styled]) .tx-table__toolbar{gap:var(--tx-table-toolbar-gap);margin-bottom:var(--tx-table-toolbar-margin-bottom)}:host([data-styled]) .tx-table__scroller{padding-bottom:var(--tx-table-scroller-padding-bottom);scrollbar-color:var(--tx-table-scroller-scrollbar-thumb) transparent}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar{width:var(--tx-table-scroller-scrollbar-size);height:var(--tx-table-scroller-scrollbar-size)}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-track,:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-corner{background:transparent}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:999px;background-color:var(--tx-table-scroller-scrollbar-thumb);background-clip:padding-box}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-thumb:hover{background-color:var(--tx-table-scroller-scrollbar-thumb-hover)}:host([data-styled]) .tx-table__scroller--empty{padding-bottom:0}:host([data-styled]) .tx-table__thead{background:var(--tx-table-header-cell-background)}:host([data-styled]) .tx-table__th{padding:var(--tx-table-header-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-header-cell-background);color:var(--tx-table-header-cell-color);font-size:var(--tx-table-header-cell-font-size);font-weight:var(--tx-table-header-cell-font-weight);transition:background var(--tx-table-transition-duration),color var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__header-content{gap:var(--tx-table-header-cell-gap)}:host([data-styled]) .tx-table__filter{margin-block:calc(var(--tx-table-filter-button-inset) * -1)}:host([data-styled]) .tx-table__filter-cell{padding:var(--tx-table-filter-cell-padding);font-weight:var(--tx-font-weight-regular)}:host([data-styled]) .tx-table__sort{gap:var(--tx-table-header-cell-gap);border-radius:var(--tx-radius-xs)}:host([data-styled]) .tx-table__sort:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-table__sort-icon{--tx-icon-size: var(--tx-table-sort-icon-size);color:var(--tx-table-sort-icon-color);transition:transform .3s ease}:host([data-styled]) .tx-table__sort-badge{min-width:var(--tx-table-sort-icon-badge-size);height:var(--tx-table-sort-icon-badge-size);border-radius:999px;background:var(--tx-table-sort-icon-badge-background);color:var(--tx-table-sort-icon-badge-color);font-size:var(--tx-table-sort-icon-badge-font-size)}:host([data-styled]) .tx-table__resizer{width:var(--tx-table-column-resizer-width)}:host([data-styled]) .tx-table__resizer-line{width:var(--tx-table-column-resizer-line-width);background-color:transparent;transition:background-color var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__resizer:hover .tx-table__resizer-line,:host([data-styled]) .tx-table__resizer--active .tx-table__resizer-line,:host([data-styled]) .tx-table__resizer:focus-visible .tx-table__resizer-line{background-color:var(--tx-table-column-resizer-color)}:host([data-styled]) .tx-table__resizer:focus-visible{outline:none}:host([data-styled]) .tx-table__header-row.cdk-drop-list-dragging{background:var(--tx-table-drop-point-background)}:host([data-styled]) .tx-table__header-row.cdk-drop-list-dragging .tx-table__th:hover{background:var(--tx-table-drop-point-hover-background)}:host([data-styled]) .tx-table__th.cdk-drag-placeholder{opacity:.6}:host([data-styled]) .tx-table__row{background:var(--tx-table-row-background);color:var(--tx-table-row-color);outline-color:transparent;transition:background var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__td{height:var(--tx-table-body-cell-height);padding:var(--tx-table-body-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px}:host([data-styled]) .tx-table__expansion-cell{padding:0;border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-row-background)}:host([data-styled]) .tx-table__expansion-content{padding:var(--tx-table-body-cell-padding)}:host([data-styled]) .tx-table__expansion-body{transition:grid-template-rows var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__expansion-body:not(.tx-table__expansion-body--open)>.tx-table__expansion-inner{transition:visibility 0s linear var(--tx-table-expansion-duration)}@starting-style{:host([data-styled]) .tx-table__expansion-body--open{grid-template-rows:0fr}}:host([data-styled]) .tx-table__row-toggle-icon{transition:transform var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__row--collapsed>.tx-table__td{height:0;padding-block:0;border-bottom-width:0}:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row{transition:visibility 0s linear}:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row--collapsed{visibility:collapse;transition-delay:var(--tx-table-expansion-duration)}:host([data-styled]) .tx-table__cell-body{transition:grid-template-rows var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__cell-inner{transition:visibility 0s linear}:host([data-styled]) .tx-table__row--collapsed .tx-table__cell-inner{transition-delay:var(--tx-table-expansion-duration)}:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row>.tx-table__td{transition:height var(--tx-table-expansion-duration) var(--tx-table-expansion-easing),padding-block var(--tx-table-expansion-duration) var(--tx-table-expansion-easing),border-bottom-width var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__grip{--tx-icon-size: var(--tx-table-grip-size);color:var(--tx-table-grip-color);transition:opacity var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__footer-cell{padding:var(--tx-table-footer-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-footer-cell-background);color:var(--tx-table-footer-cell-color);font-weight:var(--tx-table-footer-cell-font-weight)}:host([data-styled]) .tx-table__cell--frozen{background:var(--tx-table-row-background);box-shadow:var(--tx-table-frozen-column-shadow)}:host([data-styled]) .tx-table__th.tx-table__cell--frozen{background:var(--tx-table-header-cell-background)}:host([data-styled]) .tx-table__cell--frozen-last{border-inline-end:1px solid var(--tx-table-border-color)}:host([data-styled]) .tx-table__cell--frozen-first-end{border-inline-start:1px solid var(--tx-table-border-color)}:host([data-styled]) .tx-table__row .tx-table__cell--frozen{background:inherit}:host([data-styled]) .tx-table__row--selected{background:var(--tx-table-row-selected-background);color:var(--tx-table-row-selected-color)}:host([data-styled]) .tx-table__row--selected>.tx-table__td{border-block-end-color:var(--tx-table-body-cell-selected-border-color)}:host([data-styled]) .tx-table__row--menu>.tx-table__td{background:var(--tx-table-row-menu-background)}:host([data-styled]) .tx-table__row:focus-visible{outline:var(--tx-table-row-focus-ring-width) var(--tx-table-row-focus-ring-style) var(--tx-table-row-focus-ring-color);outline-offset:var(--tx-table-row-focus-ring-offset)}:host([data-styled]) .tx-table__row-handle{width:var(--tx-table-row-toggle-button-size);height:var(--tx-table-row-toggle-button-size);border-radius:var(--tx-radius-xs);color:var(--tx-table-grip-color)}:host([data-styled]) .tx-table__row-handle:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-table__row.cdk-drag-preview{box-shadow:var(--tx-table-drag-preview-shadow);background:var(--tx-table-row-background)}:host([data-styled]) .tx-table__row.cdk-drag-placeholder{opacity:.4}:host([data-styled]) .tx-table__group-cell{padding:var(--tx-table-body-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-group-background);font-weight:var(--tx-table-group-font-weight)}:host([data-styled]) .tx-table__group-content{gap:var(--tx-table-header-cell-gap)}:host([data-styled]) .tx-table__group-count{color:var(--tx-text-muted);font-weight:var(--tx-font-weight-regular)}:host([data-styled]) .tx-table__frozen-tbody .tx-table__td{background:var(--tx-table-row-background)}:host([data-styled]) .tx-table__td--editable:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}:host([data-styled]) .tx-table__td--editing{padding-block:var(--tx-table-editor-padding-block)}:host([data-styled]) .tx-table__row-editor{gap:var(--tx-table-actions-gap)}:host([data-styled]) .tx-table__row-toggle{width:var(--tx-table-row-toggle-button-size);height:var(--tx-table-row-toggle-button-size);border-radius:var(--tx-table-row-toggle-button-border-radius);color:var(--tx-table-row-toggle-button-color);transition:background var(--tx-table-transition-duration),color var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__row-toggle:hover{background:var(--tx-table-row-toggle-button-hover-background);color:var(--tx-table-row-toggle-button-hover-color)}:host([data-styled]) .tx-table__row-toggle:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-table__loading{background:var(--tx-table-loading-background);-webkit-backdrop-filter:blur(var(--tx-table-loading-blur));backdrop-filter:blur(var(--tx-table-loading-blur))}:host([data-styled]) .tx-table__empty{padding:var(--tx-table-empty-padding);border:1px solid var(--tx-table-border-color);border-top:0;color:var(--tx-table-empty-color)}:host([data-styled]) .tx-table__paginator{margin-top:var(--tx-table-paginator-margin-top)}:host([data-styled]) .tx-table__paginator--top{margin-top:0;margin-bottom:var(--tx-table-paginator-margin-top)}:host([data-styled]) .tx-table__select-all{margin-bottom:var(--tx-table-toolbar-margin-bottom)}:host([data-styled]) .tx-table__cards{grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--tx-table-card-min-width)),1fr));gap:var(--tx-table-card-gap)}:host([data-styled]) .tx-table__card{border-radius:var(--tx-table-card-border-radius);background:var(--tx-table-card-background);box-shadow:inset 0 0 0 1px var(--tx-table-card-border-color)}:host([data-styled]) .tx-table__card--selected{box-shadow:inset 0 0 0 1px var(--tx-table-row-focus-ring-color)}:host([data-styled]) .tx-table__card-field{gap:var(--tx-table-card-field-gap);padding:var(--tx-table-card-field-padding);border-bottom:1px solid var(--tx-table-card-border-color);font-size:var(--tx-table-card-field-font-size)}:host([data-styled]) .tx-table__card-field:last-child{border-bottom:0}:host([data-styled]) .tx-table__card-label{color:var(--tx-table-card-label-color);font-size:var(--tx-table-card-label-font-size)}:host([data-styled]) .tx-table__card-title{padding:var(--tx-table-card-title-padding);border-bottom:1px solid var(--tx-table-card-border-color);font-size:var(--tx-table-card-title-font-size);font-weight:var(--tx-table-card-title-font-weight)}:host([data-styled]) .tx-table__card-title--select{padding-inline-end:calc(var(--tx-table-card-select-inset) * 4)}:host([data-styled]) .tx-table__card-select{inset-block-start:var(--tx-table-card-select-inset);inset-inline-end:var(--tx-table-card-select-inset)}:host([data-styled]) .tx-table__card-actions{gap:var(--tx-table-actions-gap);padding:var(--tx-table-card-actions-padding)}:host([data-styled].tx-table--gridlines) .tx-table__th{border-width:1px 0 1px 1px}:host([data-styled].tx-table--gridlines) .tx-table__th:last-child{border-width:1px}:host([data-styled].tx-table--gridlines) .tx-table__thead>tr:not(:first-child)>.tx-table__th{border-top-width:0}:host([data-styled].tx-table--gridlines) .tx-table__td,:host([data-styled].tx-table--gridlines) .tx-table__footer-cell{border-width:0 0 1px 1px}:host([data-styled].tx-table--gridlines) .tx-table__td:last-child,:host([data-styled].tx-table--gridlines) .tx-table__footer-cell:last-child{border-width:0 1px 1px}:host([data-styled].tx-table--gridlines) .tx-table__expansion-cell,:host([data-styled].tx-table--gridlines) .tx-table__group-cell{border-width:0 1px 1px}:host([data-styled].tx-table--striped) .tx-table__row--odd:not(.tx-table__row--selected){background:var(--tx-table-row-striped-background)}:host([data-styled].tx-table--hoverable) .tx-table__row:not(.tx-table__row--selected):hover{background:var(--tx-table-row-hover-background)}:host([data-styled][data-size=small]) .tx-table__th{padding:var(--tx-table-header-cell-sm-padding)}:host([data-styled][data-size=small]) .tx-table__td{height:var(--tx-table-body-cell-sm-height);padding:var(--tx-table-body-cell-sm-padding)}:host([data-styled][data-size=large]) .tx-table__th{padding:var(--tx-table-header-cell-lg-padding)}:host([data-styled][data-size=large]) .tx-table__td{height:var(--tx-table-body-cell-lg-height);padding:var(--tx-table-body-cell-lg-padding)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-table__th,:host([data-styled]) .tx-table__row,:host([data-styled]) .tx-table__sort-icon,:host([data-styled]) .tx-table__resizer-line,:host([data-styled]) .tx-table__row-toggle,:host([data-styled]) .tx-table__row-toggle-icon,:host([data-styled]) .tx-table__grip,:host([data-styled]) .tx-table__expansion-body,:host([data-styled]) .tx-table__cell-body,:host([data-styled]) .tx-table__cell-inner,:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row>.tx-table__td,:host([data-styled]) .tx-table__expansion-inner{transition:none}}\n"],
4459
+ template: "@if (showToolbar()) {\n <div class=\"tx-table__toolbar\" [class]=\"passThrough().toolbar?.class\" [style]=\"passThrough().toolbar?.style\">\n <div class=\"tx-table__toolbar-slot\"><ng-content select=\"[txTableToolbar]\" /></div>\n @if (showSettings()) {\n <tx-table-settings\n [columns]=\"columns()\"\n [hidden]=\"hidden()\"\n [showColumns]=\"columnSettings()\"\n [showActions]=\"actionsSettings()\"\n [unstyled]=\"isUnstyled()\"\n (columnToggled)=\"toggleColumn($event.field, $event.visible)\"\n />\n }\n </div>\n}\n\n@if (showPaginatorTop()) {\n <ng-container [ngTemplateOutlet]=\"pager\" [ngTemplateOutletContext]=\"{ $implicit: 'top' }\" />\n}\n\n<div class=\"tx-table__frame\" [class]=\"passThrough().frame?.class\" [style]=\"passThrough().frame?.style\" [attr.aria-busy]=\"loading() || null\">\n @if (cardView() && selectionMode() === 'checkbox' && !empty()) {\n <div class=\"tx-table__select-all\">\n <tx-checkbox\n binary\n [label]=\"translations().selectAll\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"toggleAll($event)\"\n />\n </div>\n }\n\n @if (loading()) {\n <div class=\"tx-table__loading\" [class]=\"passThrough().loading?.class\" [style]=\"passThrough().loading?.style\">\n <tx-progress-spinner [ariaLabel]=\"translations().loading\" [unstyled]=\"isUnstyled()\" />\n </div>\n }\n\n @if (!cardView()) {\n <div\n class=\"tx-table__scroller\"\n [class.tx-table__scroller--empty]=\"empty()\"\n [class]=\"passThrough().scroller?.class\"\n [style]=\"passThrough().scroller?.style\"\n [style.max-height]=\"scrollHeight()\"\n (scroll)=\"onScroll($event)\"\n >\n <table\n class=\"tx-table__table\"\n [class]=\"passThrough().table?.class\"\n [style]=\"passThrough().table?.style\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-multiselectable]=\"rowSelection() || treeCheckbox() ? selectionMode() !== 'single' : null\"\n [attr.role]=\"isTree ? 'treegrid' : rowSelection() ? 'grid' : null\"\n >\n <thead class=\"tx-table__thead\" [class]=\"passThrough().thead?.class\" [style]=\"passThrough().thead?.style\">\n <tr\n #headerRow\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n class=\"tx-table__header-row\"\n [class]=\"passThrough().headerRow?.class\"\n [style]=\"passThrough().headerRow?.style\"\n [cdkDropListDisabled]=\"!reorderableColumns()\"\n (cdkDropListDropped)=\"dropColumn($event)\"\n >\n @for (item of renderColumns(); track item.column.field; let last = $last) {\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragPreviewClass=\"tx-table__drag-preview\"\n [cdkDragBoundary]=\"headerRow\"\n scope=\"col\"\n class=\"tx-table__th\"\n [class]=\"[item.column.headerClass ?? '', passThrough().headerCell?.class ?? '']\"\n [style]=\"passThrough().headerCell?.style\"\n [style.width]=\"item.style['width']\"\n [style.min-width]=\"item.style['minWidth']\"\n [style.max-width]=\"item.style['maxWidth']\"\n [style.inset-inline-start]=\"frozenStyle(item)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(item)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!item.frozen\"\n [class.tx-table__cell--frozen-last]=\"item.lastFrozenStart\"\n [class.tx-table__cell--frozen-first-end]=\"item.firstFrozenEnd\"\n [class.tx-table__th--draggable]=\"reorderableColumns() && item.kind === 'data' && item.column.reorderable !== false\"\n [attr.data-field]=\"item.column.field\"\n [attr.data-align]=\"item.column.align ?? null\"\n [attr.aria-sort]=\"item.kind === 'data' ? ariaSort(item.column) : null\"\n [cdkDragDisabled]=\"!reorderableColumns() || item.kind !== 'data' || item.column.reorderable === false\"\n >\n @switch (item.kind) {\n @case ('select') {\n @if (selectionMode() === 'checkbox') {\n <tx-checkbox\n binary\n class=\"tx-table__select\"\n [ariaLabel]=\"translations().selectAll\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"toggleAll($event)\"\n />\n } @else {\n <span class=\"tx-table__sr-only\">{{ translations().selectRow }}</span>\n }\n }\n @case ('expand') {\n <span class=\"tx-table__sr-only\">{{ translations().expandRow }}</span>\n }\n @case ('actions') {\n <span class=\"tx-table__column-title\">{{ item.column.header }}</span>\n }\n @default {\n <div class=\"tx-table__header-content\">\n @if (treeCheckbox() && item.column.field === treeField()) {\n <tx-checkbox\n binary\n class=\"tx-table__select tx-table__tree-select-all\"\n [ariaLabel]=\"translations().selectAll\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"toggleAll($event)\"\n />\n }\n @if (headerTemplatesByField().get(item.column.field); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.column }\" />\n } @else if (isSortable(item.column)) {\n @if (reorderableColumns() && item.column.reorderable !== false) {\n <tx-icon class=\"tx-table__grip\" aria-hidden=\"true\" name=\"grip-vertical\" />\n }\n <button\n type=\"button\"\n class=\"tx-table__sort\"\n [class]=\"passThrough().sortButton?.class\"\n [style]=\"passThrough().sortButton?.style\"\n (click)=\"sort(item.column, $event)\"\n (keydown.alt.arrowleft)=\"moveColumnBy(item.column, -1, $event)\"\n (keydown.alt.arrowright)=\"moveColumnBy(item.column, 1, $event)\"\n >\n <span class=\"tx-table__column-title\">{{ label(item.column) }}</span>\n @if (sortOrderOf(item.column); as order) {\n <tx-icon\n class=\"tx-table__sort-icon\"\n aria-hidden=\"true\"\n name=\"sort-amount-down\"\n [class.tx-table__sort-icon--desc]=\"order === 'desc'\"\n [class]=\"passThrough().sortIcon?.class\"\n [style]=\"passThrough().sortIcon?.style\"\n />\n @if (sortMode() === 'multiple' && sortMeta().length > 1) {\n <span class=\"tx-table__sort-badge\" aria-hidden=\"true\">{{ sortIndexOf(item.column) + 1 }}</span>\n }\n }\n </button>\n } @else {\n @if (reorderableColumns() && item.column.reorderable !== false) {\n <tx-icon class=\"tx-table__grip\" aria-hidden=\"true\" name=\"grip-vertical\" />\n }\n <span class=\"tx-table__column-title\">{{ label(item.column) }}</span>\n }\n @if (item.column.filter && filterDisplay() === 'menu') {\n <tx-table-column-filter class=\"tx-table__filter\" [column]=\"item.column\" />\n }\n </div>\n }\n }\n @if (resizableColumns() && item.kind === 'data' && item.column.resizable !== false && item.column.width === undefined && !last) {\n <span\n class=\"tx-table__resizer\"\n role=\"separator\"\n tabindex=\"0\"\n aria-orientation=\"vertical\"\n [class.tx-table__resizer--active]=\"resizing() === item.column.field\"\n [attr.aria-label]=\"translations().resizeColumn.replace('{column}', label(item.column))\"\n [attr.aria-valuenow]=\"resizeValue(item.column)\"\n [attr.aria-valuemin]=\"resizeMin(item.column)\"\n [attr.aria-valuemax]=\"resizeMax(item.column)\"\n (pointerdown)=\"startResize(item, $event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown.arrowleft)=\"resizeByKey(item, -10, $event)\"\n (keydown.arrowright)=\"resizeByKey(item, 10, $event)\"\n >\n <span class=\"tx-table__resizer-line\"></span>\n </span>\n }\n </th>\n }\n </tr>\n @if (filterRow()) {\n <tr class=\"tx-table__filter-row\">\n @for (item of renderColumns(); track item.column.field) {\n <td\n class=\"tx-table__th tx-table__filter-cell\"\n [style.inset-inline-start]=\"frozenStyle(item)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(item)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!item.frozen\"\n [class.tx-table__cell--frozen-last]=\"item.lastFrozenStart\"\n [class.tx-table__cell--frozen-first-end]=\"item.firstFrozenEnd\"\n >\n @if (item.kind === 'data' && item.column.filter) {\n <tx-table-column-filter display=\"row\" [column]=\"item.column\" />\n }\n </td>\n }\n </tr>\n }\n </thead>\n @if (frozenRows().length) {\n <tbody class=\"tx-table__frozen-tbody\" [style.top.px]=\"headerHeight()\">\n @for (item of frozenRows(); track item.key; let position = $index) {\n <tr class=\"tx-table__row tx-table__row--frozen\">\n <ng-container [ngTemplateOutlet]=\"rowCells\" [ngTemplateOutletContext]=\"{ $implicit: item, position }\" />\n </tr>\n }\n </tbody>\n }\n <tbody\n #tbody\n cdkDropList\n class=\"tx-table__tbody\"\n [class]=\"passThrough().tbody?.class\"\n [style]=\"passThrough().tbody?.style\"\n [cdkDropListDisabled]=\"!reorderableRows()\"\n (cdkDropListDropped)=\"dropRow($event)\"\n >\n @if (spacerBefore()) {\n <tr class=\"tx-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"dataColumnCount()\" [style.height.px]=\"spacerBefore()\"></td>\n </tr>\n }\n @for (item of visibleRows(); track item.key; let windowIndex = $index) {\n @let position = windowRange().start + windowIndex;\n @let odd = position % 2 === 1;\n @if (item.group?.first && rowGroupMode() === 'subheader') {\n <tr class=\"tx-table__group-header\">\n <td class=\"tx-table__group-cell\" [attr.colspan]=\"dataColumnCount()\">\n <div class=\"tx-table__group-content\">\n @if (expandableRowGroups()) {\n <button\n type=\"button\"\n class=\"tx-table__row-toggle\"\n [attr.aria-expanded]=\"!item.group.collapsed\"\n [attr.aria-label]=\"item.group.collapsed ? translations().expandRow : translations().collapseRow\"\n (click)=\"toggleGroup(item)\"\n >\n <tx-icon aria-hidden=\"true\" name=\"chevron-right\" class=\"tx-table__row-toggle-icon\" [class.tx-table__row-toggle-icon--open]=\"!item.group.collapsed\" />\n </button>\n }\n @if (groupHeaderTemplate(); as header) {\n <ng-container [ngTemplateOutlet]=\"header.templateRef\" [ngTemplateOutletContext]=\"groupContext(item)\" />\n } @else {\n <span class=\"tx-table__group-title\">{{ item.group.value }}</span>\n <span class=\"tx-table__group-count\">{{ translations().rowGroup.replace('{count}', '' + item.group.size) }}</span>\n }\n </div>\n </td>\n </tr>\n }\n @if (!item.group?.collapsed || animatedGroups()) {\n <tr\n cdkDrag\n cdkDragLockAxis=\"y\"\n cdkDragPreviewContainer=\"parent\"\n class=\"tx-table__row\"\n [class]=\"[rowClassOf(item) ?? '', passThrough().row?.class ?? '']\"\n [style]=\"passThrough().row?.style\"\n [class.tx-table__row--odd]=\"odd\"\n [class.tx-table__row--selected]=\"item.selected\"\n [class.tx-table__row--selectable]=\"rowSelection() && item.selectable\"\n [class.tx-table__row--menu]=\"menuRowKey() === item.key && menuRowKey() !== undefined\"\n [attr.aria-selected]=\"rowSelection() ? item.selected : null\"\n [attr.aria-level]=\"item.tree?.level ?? null\"\n [attr.aria-expanded]=\"item.tree && !item.tree.leaf ? item.tree.expanded : null\"\n [attr.aria-setsize]=\"item.tree?.setSize ?? null\"\n [attr.aria-posinset]=\"item.tree?.posInSet ?? null\"\n [attr.aria-busy]=\"item.tree?.loading || null\"\n [attr.tabindex]=\"rowsFocusable() ? (position === focusedRow() ? 0 : -1) : null\"\n [attr.data-key]=\"item.key\"\n [class.tx-table__row--editing]=\"isRowEditing(item)\"\n [class.tx-table__row--collapsed]=\"isCollapsedRow(item)\"\n [attr.inert]=\"isCollapsedRow(item) ? '' : null\"\n [attr.aria-hidden]=\"isCollapsedRow(item) ? true : null\"\n (click)=\"onRowClick(item, position, $event)\"\n (keydown)=\"onRowKeydown(item, position, $event)\"\n (contextmenu)=\"onRowContextMenu(item, $event)\"\n >\n <ng-container [ngTemplateOutlet]=\"rowCells\" [ngTemplateOutletContext]=\"{ $implicit: item, position }\" />\n </tr>\n @if ((item.expanded || isClosing(item.key)) && !item.group?.collapsed && expansionTemplate(); as expansion) {\n <tr class=\"tx-table__expansion\">\n <td class=\"tx-table__expansion-cell\" [attr.colspan]=\"dataColumnCount()\">\n <div\n class=\"tx-table__expansion-body\"\n [class.tx-table__expansion-body--open]=\"item.expanded\"\n (transitionend)=\"finishClosing(item.key, $event)\"\n >\n <div class=\"tx-table__expansion-inner\">\n <div class=\"tx-table__expansion-content\">\n <ng-container [ngTemplateOutlet]=\"expansion.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: dataOf(item.row), node: item.row, index: item.index }\" />\n </div>\n </div>\n </div>\n </td>\n </tr>\n }\n @if (item.group?.last && rowGroupMode() === 'subheader' && groupFooterTemplate(); as footer) {\n <tr class=\"tx-table__group-footer\">\n <td class=\"tx-table__group-cell\" [attr.colspan]=\"dataColumnCount()\">\n <ng-container [ngTemplateOutlet]=\"footer.templateRef\" [ngTemplateOutletContext]=\"groupContext(item)\" />\n </td>\n </tr>\n }\n }\n }\n @if (spacerAfter()) {\n <tr class=\"tx-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"dataColumnCount()\" [style.height.px]=\"spacerAfter()\"></td>\n </tr>\n }\n </tbody>\n @if (hasFooter()) {\n <tfoot class=\"tx-table__tfoot\" [class]=\"passThrough().tfoot?.class\" [style]=\"passThrough().tfoot?.style\">\n <tr>\n @for (item of renderColumns(); track item.column.field) {\n <td\n class=\"tx-table__footer-cell\"\n [class]=\"passThrough().footerCell?.class\"\n [style]=\"passThrough().footerCell?.style\"\n [style.inset-inline-start]=\"frozenStyle(item)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(item)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!item.frozen\"\n [attr.data-align]=\"item.column.align ?? null\"\n >\n @if (footerTemplatesByField().get(item.column.field); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.column }\" />\n } @else {\n {{ item.column.footer }}\n }\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n </div>\n } @else if (!empty()) {\n <div class=\"tx-table__cards\" role=\"list\" [class]=\"passThrough().cards?.class\" [style]=\"passThrough().cards?.style\" [attr.aria-label]=\"ariaLabel() ?? null\">\n @for (item of renderRows(); track item.key) {\n <div\n role=\"listitem\"\n class=\"tx-table__card\"\n [class]=\"passThrough().card?.class\"\n [style]=\"passThrough().card?.style\"\n [class.tx-table__card--selected]=\"item.selected\"\n [class.tx-table__card--custom]=\"!!cardTemplate()\"\n >\n @if (cardTemplate(); as card) {\n <ng-container [ngTemplateOutlet]=\"card.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: dataOf(item.row), node: item.row, index: item.index }\" />\n } @else {\n @if (hasSelectColumn()) {\n <div class=\"tx-table__card-select\">\n @if (selectionMode() === 'checkbox') {\n <tx-checkbox\n binary\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"item.selected\"\n (ngModelChange)=\"toggleRow(item)\"\n />\n } @else {\n <tx-radio-button\n [value]=\"item.key\"\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"radioValue()\"\n (ngModelChange)=\"selectRadio(item)\"\n />\n }\n </div>\n }\n @if (cardTitleColumn(); as title) {\n <div class=\"tx-table__card-title\" [class.tx-table__card-title--select]=\"hasSelectColumn()\">\n <ng-container [ngTemplateOutlet]=\"cellContent\" [ngTemplateOutletContext]=\"{ $implicit: item, column: title }\" />\n </div>\n }\n @for (column of cardFields(); track column.field) {\n <div class=\"tx-table__card-field\">\n <span class=\"tx-table__card-label\">{{ label(column) }}</span>\n <span class=\"tx-table__card-value\"><ng-container [ngTemplateOutlet]=\"cellContent\" [ngTemplateOutletContext]=\"{ $implicit: item, column }\" /></span>\n </div>\n }\n @if (actionsTemplate(); as actions) {\n <div class=\"tx-table__card-actions\">\n <ng-container [ngTemplateOutlet]=\"actions.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: dataOf(item.row), node: item.row, index: item.index }\" />\n </div>\n }\n }\n </div>\n }\n </div>\n }\n\n @if (empty()) {\n <div class=\"tx-table__empty\" [class]=\"passThrough().empty?.class\" [style]=\"passThrough().empty?.style\">\n @if (emptyTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: dataColumnCount() }\" />\n } @else {\n {{ emptyMessage() ?? translations().emptyMessage }}\n }\n </div>\n }\n</div>\n\n@if (showPaginatorBottom()) {\n <ng-container [ngTemplateOutlet]=\"pager\" [ngTemplateOutletContext]=\"{ $implicit: 'bottom' }\" />\n}\n\n<ng-content />\n\n<tx-tiered-menu\n #rowMenu\n popup\n variant=\"context\"\n placement=\"bottom-start\"\n [offset]=\"0\"\n [model]=\"menuItems()\"\n [ariaLabel]=\"translations().rowActions\"\n [unstyled]=\"isUnstyled()\"\n (closed)=\"onMenuClosed()\"\n>\n <ng-template txMenuItem let-menuItem>\n @if (actionTemplate(menuItem); as action) {\n <span class=\"tx-table__menu-action\" aria-hidden=\"true\" [attr.data-action-id]=\"action.id()\">\n <ng-container [ngTemplateOutlet]=\"action.templateRef\" />\n </span>\n } @else if (menuItem.icon) {\n <tx-icon class=\"tx-table__menu-icon\" aria-hidden=\"true\" [name]=\"menuItem.icon\" />\n }\n <span class=\"tx-table__menu-label\">{{ menuItem.label }}</span>\n </ng-template>\n</tx-tiered-menu>\n\n<ng-template #cellContent let-item let-column=\"column\">\n @if (templatesByField().get(column.field); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: dataOf(item.row), row: dataOf(item.row), node: item.row, index: item.index, column, value: cellValue(item.row, column) }\"\n />\n } @else {\n {{ displayValue(item.row, column) }}\n }\n</ng-template>\n\n<ng-template #pager let-position>\n <tx-paginator\n class=\"tx-table__paginator\"\n [class.tx-table__paginator--top]=\"position === 'top'\"\n [class]=\"passThrough().paginator?.class\"\n [style]=\"passThrough().paginator?.style\"\n [first]=\"first()\"\n [rows]=\"rows()\"\n [totalRecords]=\"total()\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [showTotal]=\"showTotal()\"\n [showCurrentPageReport]=\"showCurrentPageReport()\"\n [currentPageReportTemplate]=\"currentPageReportTemplate()\"\n [showFirstLastIcon]=\"showFirstLastIcon()\"\n [showPageLinks]=\"showPageLinks()\"\n [showJumpToPageDropdown]=\"showJumpToPageDropdown()\"\n [showJumpToPageInput]=\"showJumpToPageInput()\"\n [alwaysShow]=\"alwaysShowPaginator()\"\n [pageLinkSize]=\"pageLinks()\"\n [unstyled]=\"isUnstyled()\"\n (pageChange)=\"onPage($event)\"\n />\n</ng-template>\n\n<ng-template #rowCells let-item let-position=\"position\">\n @for (column of renderColumns(); track column.column.field) {\n @if (!isGroupedCellHidden(item, column)) {\n <td\n class=\"tx-table__td\"\n [class]=\"[column.column.cellClass ?? '', passThrough().cell?.class ?? '']\"\n [style]=\"passThrough().cell?.style\"\n [style.inset-inline-start]=\"frozenStyle(column)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(column)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!column.frozen\"\n [class.tx-table__cell--frozen-last]=\"column.lastFrozenStart\"\n [class.tx-table__cell--frozen-first-end]=\"column.firstFrozenEnd\"\n [class.tx-table__td--actions]=\"column.kind === 'actions'\"\n [class.tx-table__td--editable]=\"column.kind === 'data' && editMode() === 'cell' && !!column.column.editable\"\n [class.tx-table__td--editing]=\"column.kind === 'data' && isEditing(item, column.column)\"\n [attr.data-field]=\"column.column.field\"\n [attr.data-align]=\"column.column.align ?? null\"\n [attr.rowspan]=\"groupRowspan(item, column)\"\n [attr.tabindex]=\"column.kind === 'data' && editMode() === 'cell' && column.column.editable ? 0 : null\"\n (click)=\"onCellClick(item, column, $event)\"\n (keydown)=\"onCellKeydown(item, column, $event)\"\n (focusout)=\"onCellFocusOut(item, column, $event)\"\n >\n @if (animatedRows()) {\n <div class=\"tx-table__cell-body\">\n <div class=\"tx-table__cell-inner\">\n <ng-container [ngTemplateOutlet]=\"cellBody\" [ngTemplateOutletContext]=\"{ $implicit: item, column, position }\" />\n </div>\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"cellBody\" [ngTemplateOutletContext]=\"{ $implicit: item, column, position }\" />\n }\n </td>\n }\n }\n</ng-template>\n\n<ng-template #cellBody let-item let-column=\"column\" let-position=\"position\">\n @switch (column.kind) {\n @case ('reorder') {\n <button\n type=\"button\"\n cdkDragHandle\n class=\"tx-table__row-handle\"\n [attr.aria-label]=\"translations().moveRow\"\n (keydown.alt.arrowup)=\"moveRowBy(position, -1, $event)\"\n (keydown.alt.arrowdown)=\"moveRowBy(position, 1, $event)\"\n >\n <tx-icon aria-hidden=\"true\" name=\"bars\" />\n </button>\n }\n @case ('select') {\n @if (selectionMode() === 'checkbox') {\n <tx-checkbox\n binary\n class=\"tx-table__select\"\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"item.selected\"\n (ngModelChange)=\"toggleRow(item)\"\n />\n } @else {\n <tx-radio-button\n class=\"tx-table__select\"\n [value]=\"item.key\"\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"radioValue()\"\n (ngModelChange)=\"selectRadio(item)\"\n />\n }\n }\n @case ('expand') {\n @if (canExpand(item)) {\n <button\n type=\"button\"\n class=\"tx-table__row-toggle\"\n [attr.aria-expanded]=\"item.expanded\"\n [attr.aria-label]=\"item.expanded ? translations().collapseRow : translations().expandRow\"\n (click)=\"toggleExpansion(item, $event)\"\n >\n <tx-icon aria-hidden=\"true\" name=\"chevron-right\" class=\"tx-table__row-toggle-icon\" [class.tx-table__row-toggle-icon--open]=\"item.expanded\" />\n </button>\n }\n }\n @case ('actions') {\n @if (actionsTemplate(); as actions) {\n <ng-container [ngTemplateOutlet]=\"actions.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: dataOf(item.row), node: item.row, index: item.index }\" />\n }\n }\n @case ('editor') {\n <div class=\"tx-table__row-editor\">\n @if (isRowEditing(item)) {\n <button\n txButton\n type=\"button\"\n text\n rounded\n size=\"small\"\n severity=\"success\"\n icon=\"check\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"translations().saveRow\"\n (click)=\"saveRow(item)\"\n ></button>\n <button\n txButton\n type=\"button\"\n text\n rounded\n size=\"small\"\n severity=\"danger\"\n icon=\"times\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"translations().cancelEdit\"\n (click)=\"cancelRow(item)\"\n ></button>\n } @else {\n <button\n txButton\n type=\"button\"\n text\n rounded\n size=\"small\"\n severity=\"secondary\"\n icon=\"pencil\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"translations().editRow\"\n (click)=\"startRowEdit(item)\"\n ></button>\n }\n </div>\n }\n @default {\n @if (item.tree && column.column.field === treeField()) {\n <div class=\"tx-table__tree-cell\" [style.--tx-table-tree-level]=\"item.tree.level - 1\">\n <button\n type=\"button\"\n class=\"tx-table__row-toggle tx-table__tree-toggle\"\n [class.tx-table__tree-toggle--hidden]=\"item.tree.leaf\"\n [attr.tabindex]=\"item.tree.leaf ? -1 : null\"\n [attr.aria-hidden]=\"item.tree.leaf || null\"\n [attr.aria-expanded]=\"item.tree.leaf ? null : item.tree.expanded\"\n [attr.aria-label]=\"item.tree.expanded ? translations().collapseRow : translations().expandRow\"\n [class]=\"passThrough().treeToggle?.class\"\n [style]=\"passThrough().treeToggle?.style\"\n (click)=\"toggleNode(item, $event)\"\n >\n @if (item.tree.loading) {\n <tx-icon aria-hidden=\"true\" name=\"spinner\" class=\"tx-table__tree-toggle-icon--loading\" />\n } @else {\n <tx-icon aria-hidden=\"true\" name=\"chevron-right\" class=\"tx-table__row-toggle-icon\" [class.tx-table__row-toggle-icon--open]=\"item.tree.expanded\" />\n }\n </button>\n @if (treeCheckbox()) {\n <tx-checkbox\n binary\n class=\"tx-table__tree-checkbox\"\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"item.selected\"\n [indeterminate]=\"item.tree.partial\"\n (ngModelChange)=\"toggleRow(item)\"\n />\n }\n <div class=\"tx-table__tree-content\">\n <ng-container [ngTemplateOutlet]=\"dataCell\" [ngTemplateOutletContext]=\"{ $implicit: item, column }\" />\n </div>\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"dataCell\" [ngTemplateOutletContext]=\"{ $implicit: item, column }\" />\n }\n }\n }\n</ng-template>\n\n<ng-template #dataCell let-item let-column=\"column\">\n @if (isEditing(item, column.column)) {\n <div class=\"tx-table__editor\">\n @if (editorTemplatesByField().get(column.column.field); as editor) {\n <ng-container [ngTemplateOutlet]=\"editor.templateRef\" [ngTemplateOutletContext]=\"editorContext(item, column.column)\" />\n } @else if (column.column.editOptions?.length) {\n <tx-select\n size=\"small\"\n optionLabel=\"label\"\n optionValue=\"value\"\n class=\"tx-table__editor-control\"\n [options]=\"column.column.editOptions\"\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"draftValue(item, column.column)\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n } @else {\n @switch (column.column.editType ?? 'text') {\n @case ('numeric') {\n <tx-input-number\n size=\"small\"\n class=\"tx-table__editor-control\"\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"draftValue(item, column.column)\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n }\n @case ('boolean') {\n <tx-checkbox\n binary\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"draftValue(item, column.column)\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n }\n @case ('date') {\n <input\n txInput\n type=\"date\"\n size=\"small\"\n class=\"tx-table__editor-control\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"label(column.column)\"\n [value]=\"dateInput(draftValue(item, column.column))\"\n (change)=\"setDraft(item, column.column, parseDateInput($any($event.target).value))\"\n />\n }\n @default {\n <input\n txInput\n type=\"text\"\n size=\"small\"\n class=\"tx-table__editor-control\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"label(column.column)\"\n [value]=\"draftValue(item, column.column) ?? ''\"\n (input)=\"setDraft(item, column.column, $any($event.target).value)\"\n />\n }\n }\n }\n </div>\n } @else if (templatesByField().get(column.column.field); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template.templateRef\"\n [ngTemplateOutletContext]=\"{\n $implicit: dataOf(item.row),\n row: dataOf(item.row),\n node: item.row,\n index: item.index,\n column: column.column,\n value: cellValue(item.row, column.column),\n }\"\n />\n } @else if (isLoadingRow(item)) {\n <tx-skeleton class=\"tx-table__loading-cell\" height=\"14px\" />\n } @else if (cellTooltip()) {\n <span class=\"tx-table__cell-text\" tooltipOverflowOnly [txTooltip]=\"displayValue(item.row, column.column)\">{{ displayValue(item.row, column.column) }}</span>\n } @else {\n {{ displayValue(item.row, column.column) }}\n }\n</ng-template>\n",
4460
+ styles: [":host{display:block;min-width:0}.tx-table__toolbar{display:flex;align-items:center;justify-content:space-between}.tx-table__toolbar-slot{flex:1;min-width:0}.tx-table__frame{position:relative}.tx-table__scroller{position:relative;overflow:auto}.tx-table__scroller--empty{overflow:hidden}.tx-table__table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0}.tx-table__thead{position:sticky;inset-block-start:0;z-index:2}.tx-table__th,.tx-table__td,.tx-table__footer-cell{box-sizing:border-box;overflow:hidden;text-align:start;vertical-align:middle}.tx-table__th{position:relative;white-space:nowrap;text-overflow:ellipsis}.tx-table__td{white-space:nowrap;text-overflow:ellipsis;font-variant-numeric:tabular-nums}[data-align=center]{text-align:center}[data-align=end]{text-align:end}.tx-table__cell--frozen{position:sticky;z-index:1}.tx-table__sort{display:inline-flex;align-items:center;max-width:100%;margin:0;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:inherit;cursor:pointer}.tx-table__header-content{display:flex;align-items:center;min-width:0}.tx-table__header-content>.tx-table__sort,.tx-table__header-content>.tx-table__column-title{min-width:0}.tx-table__filter{flex-shrink:0;margin-inline-start:auto}.tx-table__filter-cell{overflow:visible}.tx-table__column-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-table__sort-icon{flex-shrink:0}.tx-table__sort-icon--desc{transform:rotate(180deg)}.tx-table__sort-badge{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.tx-table__resizer{position:absolute;inset-block:0;inset-inline-end:-5px;z-index:3;display:flex;align-items:center;justify-content:center;cursor:col-resize;touch-action:none}.tx-table__resizer:before{content:\"\";position:absolute;inset-block:0;inset-inline-start:-2px;width:14px}.tx-table__resizer-line{height:100%}.tx-table__th--draggable{cursor:grab}.tx-table__th--draggable:active{cursor:grabbing}.tx-table__row--selectable{cursor:pointer}.tx-table__row-toggle{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;margin:0;padding:0;border:0;background:transparent;cursor:pointer}.tx-table__row-toggle-icon:dir(rtl){transform:scaleX(-1)}.tx-table__row-toggle-icon--open,.tx-table__row-toggle-icon--open:dir(rtl){transform:rotate(90deg)}.tx-table__expansion-body{display:grid;grid-template-rows:0fr}.tx-table__expansion-body--open{grid-template-rows:1fr}.tx-table__expansion-inner{min-height:0;overflow:hidden}.tx-table__expansion-body:not(.tx-table__expansion-body--open)>.tx-table__expansion-inner{visibility:hidden}.tx-table__grip{position:absolute;inset-block-start:50%;inset-inline-start:1px;opacity:0;transform:translateY(-50%);pointer-events:none}.tx-table__th--draggable:hover .tx-table__grip,.tx-table__th--draggable:focus-within .tx-table__grip{opacity:1}.tx-table__select{display:inline-flex;vertical-align:middle}.tx-table__editor{display:flex;align-items:center;min-width:0}.tx-table__editor-control{flex:1;width:100%;min-width:0}.tx-table__row-editor{display:flex;align-items:center;justify-content:center}.tx-table__td--editable{cursor:text}.tx-table__td--editing{overflow:visible;text-overflow:clip}.tx-table__cell-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-table__spacer>td{padding:0;border:0}.tx-table__cell-body{display:grid;grid-template-rows:1fr}.tx-table__cell-inner{min-height:0;overflow:hidden;text-overflow:ellipsis}.tx-table__row--collapsed .tx-table__cell-body{grid-template-rows:0fr}.tx-table__row--collapsed .tx-table__cell-inner{visibility:hidden}.tx-table__frozen-tbody{position:sticky;z-index:2}.tx-table__row-handle{display:inline-flex;align-items:center;justify-content:center;margin:0;padding:0;border:0;background:transparent;color:inherit;cursor:grab;touch-action:none}.tx-table__tbody.cdk-drop-list-dragging .tx-table__row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.tx-table__row.cdk-drag-preview{display:table-row}.tx-table__group-content{display:flex;align-items:center}.tx-table__loading{position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center}.tx-table__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.tx-table__cards{display:grid}.tx-table__card{position:relative;display:flex;flex-direction:column;min-width:0}.tx-table__card-field,.tx-table__card-title{display:flex;align-items:center;min-width:0;overflow-wrap:break-word}.tx-table__card-field{text-align:end}.tx-table__card-label{flex-shrink:0;max-width:45%;margin-inline-end:auto;text-align:start}.tx-table__card-value{min-width:0}.tx-table__card-select{position:absolute;z-index:1}.tx-table__card-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;order:99;margin-top:auto}.tx-table--resizing{cursor:col-resize;-webkit-user-select:none;user-select:none}.tx-table--resizing *{cursor:col-resize}.tx-table__tree-cell{display:flex;align-items:center;min-width:0}.tx-table__tree-content{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-table__tree-toggle{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;margin:0;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.tx-table__tree-toggle--hidden{visibility:hidden}.tx-table__tree-select-all{margin-inline-end:var(--tx-tree-table-node-gap)}:host([data-styled]){color:var(--tx-table-color);font-size:var(--tx-table-font-size);line-height:var(--tx-table-line-height)}:host([data-styled]) .tx-table__toolbar{gap:var(--tx-table-toolbar-gap);margin-bottom:var(--tx-table-toolbar-margin-bottom)}:host([data-styled]) .tx-table__scroller{padding-bottom:var(--tx-table-scroller-padding-bottom);scrollbar-color:var(--tx-table-scroller-scrollbar-thumb) transparent}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar{width:var(--tx-table-scroller-scrollbar-size);height:var(--tx-table-scroller-scrollbar-size)}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-track,:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-corner{background:transparent}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:999px;background-color:var(--tx-table-scroller-scrollbar-thumb);background-clip:padding-box}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-thumb:hover{background-color:var(--tx-table-scroller-scrollbar-thumb-hover)}:host([data-styled]) .tx-table__scroller--empty{padding-bottom:0}:host([data-styled]) .tx-table__thead{background:var(--tx-table-header-cell-background)}:host([data-styled]) .tx-table__th{padding:var(--tx-table-header-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-header-cell-background);color:var(--tx-table-header-cell-color);font-size:var(--tx-table-header-cell-font-size);font-weight:var(--tx-table-header-cell-font-weight);transition:background var(--tx-table-transition-duration),color var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__header-content{gap:var(--tx-table-header-cell-gap)}:host([data-styled]) .tx-table__filter{margin-block:calc(var(--tx-table-filter-button-inset) * -1)}:host([data-styled]) .tx-table__filter-cell{padding:var(--tx-table-filter-cell-padding);font-weight:var(--tx-font-weight-regular)}:host([data-styled]) .tx-table__sort{gap:var(--tx-table-header-cell-gap);border-radius:var(--tx-radius-xs)}:host([data-styled]) .tx-table__sort:focus-visible{outline:var(--tx-table-header-cell-focus-ring-width) var(--tx-table-header-cell-focus-ring-style) var(--tx-table-header-cell-focus-ring-color);outline-offset:var(--tx-table-header-cell-focus-ring-offset);box-shadow:var(--tx-table-header-cell-focus-ring-shadow)}:host([data-styled]) .tx-table__sort-icon{--tx-icon-size: var(--tx-table-sort-icon-size);color:var(--tx-table-sort-icon-color);transition:transform .3s ease}:host([data-styled]) .tx-table__sort-badge{min-width:var(--tx-table-sort-icon-badge-size);height:var(--tx-table-sort-icon-badge-size);border-radius:999px;background:var(--tx-table-sort-icon-badge-background);color:var(--tx-table-sort-icon-badge-color);font-size:var(--tx-table-sort-icon-badge-font-size)}:host([data-styled]) .tx-table__resizer{width:var(--tx-table-column-resizer-width)}:host([data-styled]) .tx-table__resizer-line{width:var(--tx-table-column-resizer-line-width);background-color:transparent;transition:background-color var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__resizer:hover .tx-table__resizer-line,:host([data-styled]) .tx-table__resizer--active .tx-table__resizer-line,:host([data-styled]) .tx-table__resizer:focus-visible .tx-table__resizer-line{background-color:var(--tx-table-column-resizer-color)}:host([data-styled]) .tx-table__resizer:focus-visible{outline:none}:host([data-styled]) .tx-table__header-row.cdk-drop-list-dragging{background:var(--tx-table-drop-point-background)}:host([data-styled]) .tx-table__header-row.cdk-drop-list-dragging .tx-table__th:hover{background:var(--tx-table-drop-point-hover-background)}:host([data-styled]) .tx-table__th.cdk-drag-placeholder{opacity:.6}:host([data-styled]) .tx-table__row{background:var(--tx-table-row-background);color:var(--tx-table-row-color);outline-color:transparent;transition:background var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__td{height:var(--tx-table-body-cell-height);padding:var(--tx-table-body-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px}:host([data-styled]) .tx-table__expansion-cell{padding:0;border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-row-background)}:host([data-styled]) .tx-table__expansion-content{padding:var(--tx-table-body-cell-padding)}:host([data-styled]) .tx-table__expansion-body{transition:grid-template-rows var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__expansion-body:not(.tx-table__expansion-body--open)>.tx-table__expansion-inner{transition:visibility 0s linear var(--tx-table-expansion-duration)}@starting-style{:host([data-styled]) .tx-table__expansion-body--open{grid-template-rows:0fr}}:host([data-styled]) .tx-table__row-toggle-icon{transition:transform var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__row--collapsed>.tx-table__td{height:0;padding-block:0;border-bottom-width:0}:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row{transition:visibility 0s linear}:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row--collapsed{visibility:collapse;transition-delay:var(--tx-table-expansion-duration)}:host([data-styled]) .tx-table__cell-body{transition:grid-template-rows var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__cell-inner{transition:visibility 0s linear}:host([data-styled]) .tx-table__row--collapsed .tx-table__cell-inner{transition-delay:var(--tx-table-expansion-duration)}:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row>.tx-table__td{transition:height var(--tx-table-expansion-duration) var(--tx-table-expansion-easing),padding-block var(--tx-table-expansion-duration) var(--tx-table-expansion-easing),border-bottom-width var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__grip{--tx-icon-size: var(--tx-table-grip-size);color:var(--tx-table-grip-color);transition:opacity var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__footer-cell{padding:var(--tx-table-footer-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-footer-cell-background);color:var(--tx-table-footer-cell-color);font-weight:var(--tx-table-footer-cell-font-weight)}:host([data-styled]) .tx-table__cell--frozen{background:var(--tx-table-row-background);box-shadow:var(--tx-table-frozen-column-shadow)}:host([data-styled]) .tx-table__th.tx-table__cell--frozen{background:var(--tx-table-header-cell-background)}:host([data-styled]) .tx-table__cell--frozen-last{border-inline-end:1px solid var(--tx-table-border-color)}:host([data-styled]) .tx-table__cell--frozen-first-end{border-inline-start:1px solid var(--tx-table-border-color)}:host([data-styled]) .tx-table__row .tx-table__cell--frozen{background:inherit}:host([data-styled]) .tx-table__row--selected{background:var(--tx-table-row-selected-background);color:var(--tx-table-row-selected-color)}:host([data-styled]) .tx-table__row--selected>.tx-table__td{border-block-end-color:var(--tx-table-body-cell-selected-border-color)}:host([data-styled]) .tx-table__row--menu>.tx-table__td{background:var(--tx-table-row-menu-background)}:host([data-styled]) .tx-table__row:focus-visible{outline:var(--tx-table-row-focus-ring-width) var(--tx-table-row-focus-ring-style) var(--tx-table-row-focus-ring-color);outline-offset:var(--tx-table-row-focus-ring-offset);box-shadow:var(--tx-table-row-focus-ring-shadow)}:host([data-styled]) .tx-table__row-handle{width:var(--tx-table-row-toggle-button-size);height:var(--tx-table-row-toggle-button-size);border-radius:var(--tx-radius-xs);color:var(--tx-table-grip-color)}:host([data-styled]) .tx-table__row-handle:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-table__row.cdk-drag-preview{box-shadow:var(--tx-table-drag-preview-shadow);background:var(--tx-table-row-background)}:host([data-styled]) .tx-table__row.cdk-drag-placeholder{opacity:.4}:host([data-styled]) .tx-table__group-cell{padding:var(--tx-table-body-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-group-background);font-weight:var(--tx-table-group-font-weight)}:host([data-styled]) .tx-table__group-content{gap:var(--tx-table-header-cell-gap)}:host([data-styled]) .tx-table__group-count{color:var(--tx-text-muted);font-weight:var(--tx-font-weight-regular)}:host([data-styled]) .tx-table__frozen-tbody .tx-table__td{background:var(--tx-table-row-background)}:host([data-styled]) .tx-table__td--editable:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}:host([data-styled]) .tx-table__td--editing{padding-block:var(--tx-table-editor-padding-block)}:host([data-styled]) .tx-table__row-editor{gap:var(--tx-table-actions-gap)}:host([data-styled]) .tx-table__row-toggle{width:var(--tx-table-row-toggle-button-size);height:var(--tx-table-row-toggle-button-size);border-radius:var(--tx-table-row-toggle-button-border-radius);color:var(--tx-table-row-toggle-button-color);transition:background var(--tx-table-transition-duration),color var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__row-toggle:hover{background:var(--tx-table-row-toggle-button-hover-background);color:var(--tx-table-row-toggle-button-hover-color)}:host([data-styled]) .tx-table__row-toggle:focus-visible{outline:var(--tx-table-row-toggle-button-focus-ring-width) var(--tx-table-row-toggle-button-focus-ring-style) var(--tx-table-row-toggle-button-focus-ring-color);outline-offset:var(--tx-table-row-toggle-button-focus-ring-offset);box-shadow:var(--tx-table-row-toggle-button-focus-ring-shadow)}:host([data-styled]) .tx-table__tree-cell{gap:var(--tx-tree-table-node-gap);padding-inline-start:calc(var(--tx-table-tree-level, 0) * var(--tx-tree-table-node-indent))}:host([data-styled]) .tx-table__tree-toggle-icon--loading{animation:tx-table-tree-spin .8s linear infinite}:host([data-styled]) .tx-table__loading{background:var(--tx-table-loading-background);-webkit-backdrop-filter:blur(var(--tx-table-loading-blur));backdrop-filter:blur(var(--tx-table-loading-blur))}:host([data-styled]) .tx-table__empty{padding:var(--tx-table-empty-padding);border:1px solid var(--tx-table-border-color);border-top:0;color:var(--tx-table-empty-color)}:host([data-styled]) .tx-table__paginator{margin-top:var(--tx-table-paginator-margin-top)}:host([data-styled]) .tx-table__paginator--top{margin-top:0;margin-bottom:var(--tx-table-paginator-margin-top)}:host([data-styled]) .tx-table__select-all{margin-bottom:var(--tx-table-toolbar-margin-bottom)}:host([data-styled]) .tx-table__cards{grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--tx-table-card-min-width)),1fr));gap:var(--tx-table-card-gap)}:host([data-styled]) .tx-table__card{border-radius:var(--tx-table-card-border-radius);background:var(--tx-table-card-background);box-shadow:inset 0 0 0 1px var(--tx-table-card-border-color)}:host([data-styled]) .tx-table__card--selected{box-shadow:inset 0 0 0 1px var(--tx-table-row-focus-ring-color)}:host([data-styled]) .tx-table__card-field{gap:var(--tx-table-card-field-gap);padding:var(--tx-table-card-field-padding);border-bottom:1px solid var(--tx-table-card-border-color);font-size:var(--tx-table-card-field-font-size)}:host([data-styled]) .tx-table__card-field:last-child{border-bottom:0}:host([data-styled]) .tx-table__card-label{color:var(--tx-table-card-label-color);font-size:var(--tx-table-card-label-font-size)}:host([data-styled]) .tx-table__card-title{padding:var(--tx-table-card-title-padding);border-bottom:1px solid var(--tx-table-card-border-color);font-size:var(--tx-table-card-title-font-size);font-weight:var(--tx-table-card-title-font-weight)}:host([data-styled]) .tx-table__card-title--select{padding-inline-end:calc(var(--tx-table-card-select-inset) * 4)}:host([data-styled]) .tx-table__card-select{inset-block-start:var(--tx-table-card-select-inset);inset-inline-end:var(--tx-table-card-select-inset)}:host([data-styled]) .tx-table__card-actions{gap:var(--tx-table-actions-gap);padding:var(--tx-table-card-actions-padding)}:host([data-styled].tx-table--gridlines) .tx-table__th{border-width:1px 0 1px 1px}:host([data-styled].tx-table--gridlines) .tx-table__th:last-child{border-width:1px}:host([data-styled].tx-table--gridlines) .tx-table__thead>tr:not(:first-child)>.tx-table__th{border-top-width:0}:host([data-styled].tx-table--gridlines) .tx-table__td,:host([data-styled].tx-table--gridlines) .tx-table__footer-cell{border-width:0 0 1px 1px}:host([data-styled].tx-table--gridlines) .tx-table__td:last-child,:host([data-styled].tx-table--gridlines) .tx-table__footer-cell:last-child{border-width:0 1px 1px}:host([data-styled].tx-table--gridlines) .tx-table__expansion-cell,:host([data-styled].tx-table--gridlines) .tx-table__group-cell{border-width:0 1px 1px}:host([data-styled].tx-table--striped) .tx-table__row--odd:not(.tx-table__row--selected){background:var(--tx-table-row-striped-background)}:host([data-styled].tx-table--hoverable) .tx-table__row:not(.tx-table__row--selected):hover{background:var(--tx-table-row-hover-background)}:host([data-styled][data-size=small]) .tx-table__th{padding:var(--tx-table-header-cell-sm-padding)}:host([data-styled][data-size=small]) .tx-table__td{height:var(--tx-table-body-cell-sm-height);padding:var(--tx-table-body-cell-sm-padding)}:host([data-styled][data-size=large]) .tx-table__th{padding:var(--tx-table-header-cell-lg-padding)}:host([data-styled][data-size=large]) .tx-table__td{height:var(--tx-table-body-cell-lg-height);padding:var(--tx-table-body-cell-lg-padding)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-table__th,:host([data-styled]) .tx-table__row,:host([data-styled]) .tx-table__sort-icon,:host([data-styled]) .tx-table__resizer-line,:host([data-styled]) .tx-table__row-toggle,:host([data-styled]) .tx-table__row-toggle-icon,:host([data-styled]) .tx-table__grip,:host([data-styled]) .tx-table__expansion-body,:host([data-styled]) .tx-table__cell-body,:host([data-styled]) .tx-table__cell-inner,:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row>.tx-table__td,:host([data-styled]) .tx-table__expansion-inner{transition:none}}@keyframes tx-table-tree-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-table__tree-toggle-icon--loading{animation-duration:2.4s}}\n"],
4400
4461
  dependencies: [
4401
4462
  {
4402
4463
  kind: "directive",
4403
- type: NgTemplateOutlet,
4464
+ type: i1.NgTemplateOutlet,
4404
4465
  selector: "[ngTemplateOutlet]",
4405
4466
  inputs: [
4406
4467
  "ngTemplateOutletContext",
@@ -4410,16 +4471,16 @@ var TxTable = class TxTable {
4410
4471
  },
4411
4472
  {
4412
4473
  kind: "ngmodule",
4413
- type: FormsModule
4474
+ type: i1$1.FormsModule
4414
4475
  },
4415
4476
  {
4416
4477
  kind: "directive",
4417
- type: i1.NgControlStatus,
4478
+ type: i1$1.NgControlStatus,
4418
4479
  selector: "[formControlName],[ngModel],[formControl]"
4419
4480
  },
4420
4481
  {
4421
4482
  kind: "directive",
4422
- type: i1.NgModel,
4483
+ type: i1$1.NgModel,
4423
4484
  selector: "[ngModel]:not([formControlName]):not([formControl])",
4424
4485
  inputs: [
4425
4486
  "name",
@@ -4432,7 +4493,7 @@ var TxTable = class TxTable {
4432
4493
  },
4433
4494
  {
4434
4495
  kind: "directive",
4435
- type: CdkDropList,
4496
+ type: i3.CdkDropList,
4436
4497
  selector: "[cdkDropList], cdk-drop-list",
4437
4498
  inputs: [
4438
4499
  "cdkDropListConnectedTo",
@@ -4459,7 +4520,7 @@ var TxTable = class TxTable {
4459
4520
  },
4460
4521
  {
4461
4522
  kind: "directive",
4462
- type: CdkDrag,
4523
+ type: i3.CdkDrag,
4463
4524
  selector: "[cdkDrag]",
4464
4525
  inputs: [
4465
4526
  "cdkDragData",
@@ -4487,19 +4548,19 @@ var TxTable = class TxTable {
4487
4548
  },
4488
4549
  {
4489
4550
  kind: "directive",
4490
- type: CdkDragHandle,
4551
+ type: i3.CdkDragHandle,
4491
4552
  selector: "[cdkDragHandle]",
4492
4553
  inputs: ["cdkDragHandleDisabled"]
4493
4554
  },
4494
4555
  {
4495
4556
  kind: "component",
4496
- type: TxIcon,
4557
+ type: i4.TxIcon,
4497
4558
  selector: "tx-icon",
4498
4559
  inputs: ["name"]
4499
4560
  },
4500
4561
  {
4501
4562
  kind: "directive",
4502
- type: TxTooltip,
4563
+ type: i5.TxTooltip,
4503
4564
  selector: "[txTooltip]",
4504
4565
  inputs: [
4505
4566
  "txTooltip",
@@ -4526,7 +4587,7 @@ var TxTable = class TxTable {
4526
4587
  },
4527
4588
  {
4528
4589
  kind: "component",
4529
- type: TxSkeleton,
4590
+ type: i6.TxSkeleton,
4530
4591
  selector: "tx-skeleton",
4531
4592
  inputs: [
4532
4593
  "shape",
@@ -4544,7 +4605,7 @@ var TxTable = class TxTable {
4544
4605
  },
4545
4606
  {
4546
4607
  kind: "component",
4547
- type: TxButton,
4608
+ type: i7.TxButton,
4548
4609
  selector: "button[txButton], a[txButton]",
4549
4610
  inputs: [
4550
4611
  "label",
@@ -4575,7 +4636,7 @@ var TxTable = class TxTable {
4575
4636
  },
4576
4637
  {
4577
4638
  kind: "component",
4578
- type: TxCheckbox,
4639
+ type: i8.TxCheckbox,
4579
4640
  selector: "tx-checkbox",
4580
4641
  inputs: [
4581
4642
  "label",
@@ -4608,7 +4669,7 @@ var TxTable = class TxTable {
4608
4669
  },
4609
4670
  {
4610
4671
  kind: "directive",
4611
- type: TxInput,
4672
+ type: i9.TxInput,
4612
4673
  selector: "input[txInput], textarea[txInput]",
4613
4674
  inputs: [
4614
4675
  "invalid",
@@ -4623,7 +4684,7 @@ var TxTable = class TxTable {
4623
4684
  },
4624
4685
  {
4625
4686
  kind: "component",
4626
- type: TxInputNumber,
4687
+ type: i10.TxInputNumber,
4627
4688
  selector: "tx-input-number",
4628
4689
  inputs: [
4629
4690
  "mode",
@@ -4666,7 +4727,7 @@ var TxTable = class TxTable {
4666
4727
  },
4667
4728
  {
4668
4729
  kind: "component",
4669
- type: TxSelect,
4730
+ type: i11.TxSelect,
4670
4731
  selector: "tx-select",
4671
4732
  inputs: [
4672
4733
  "options",
@@ -4682,7 +4743,7 @@ var TxTable = class TxTable {
4682
4743
  },
4683
4744
  {
4684
4745
  kind: "component",
4685
- type: TxRadioButton,
4746
+ type: i12.TxRadioButton,
4686
4747
  selector: "tx-radio-button",
4687
4748
  inputs: [
4688
4749
  "value",
@@ -4709,7 +4770,7 @@ var TxTable = class TxTable {
4709
4770
  },
4710
4771
  {
4711
4772
  kind: "component",
4712
- type: TxPaginator,
4773
+ type: i13.TxPaginator,
4713
4774
  selector: "tx-paginator",
4714
4775
  inputs: [
4715
4776
  "first",
@@ -4748,7 +4809,7 @@ var TxTable = class TxTable {
4748
4809
  },
4749
4810
  {
4750
4811
  kind: "component",
4751
- type: TxProgressSpinner,
4812
+ type: i14.TxProgressSpinner,
4752
4813
  selector: "tx-progress-spinner",
4753
4814
  inputs: [
4754
4815
  "size",
@@ -4765,7 +4826,7 @@ var TxTable = class TxTable {
4765
4826
  },
4766
4827
  {
4767
4828
  kind: "component",
4768
- type: TxMenu,
4829
+ type: i15.TxMenu,
4769
4830
  selector: "tx-menu, tx-tiered-menu",
4770
4831
  inputs: [
4771
4832
  "model",
@@ -4789,7 +4850,7 @@ var TxTable = class TxTable {
4789
4850
  },
4790
4851
  {
4791
4852
  kind: "directive",
4792
- type: TxMenuItemTemplate,
4853
+ type: i15.TxMenuItemTemplate,
4793
4854
  selector: "ng-template[txMenuItem]"
4794
4855
  },
4795
4856
  {
@@ -4824,28 +4885,7 @@ i0.ɵɵngDeclareClassMetadata({
4824
4885
  type: Component,
4825
4886
  args: [{
4826
4887
  selector: "tx-table",
4827
- imports: [
4828
- NgTemplateOutlet,
4829
- FormsModule,
4830
- CdkDropList,
4831
- CdkDrag,
4832
- CdkDragHandle,
4833
- TxIcon,
4834
- TxTooltip,
4835
- TxSkeleton,
4836
- TxButton,
4837
- TxCheckbox,
4838
- TxInput,
4839
- TxInputNumber,
4840
- TxSelect,
4841
- TxRadioButton,
4842
- TxPaginator,
4843
- TxProgressSpinner,
4844
- TxMenu,
4845
- TxMenuItemTemplate,
4846
- TxTableSettings,
4847
- TxTableColumnFilter
4848
- ],
4888
+ imports: TX_TABLE_IMPORTS,
4849
4889
  changeDetection: ChangeDetectionStrategy.OnPush,
4850
4890
  providers: [TxTableActionsStore, {
4851
4891
  provide: TX_TABLE,
@@ -4864,8 +4904,8 @@ i0.ɵɵngDeclareClassMetadata({
4864
4904
  "[class.tx-table--resizing]": "resizing() !== null",
4865
4905
  "[class.tx-table--loading]": "loading()"
4866
4906
  },
4867
- template: "@if (showToolbar()) {\n <div class=\"tx-table__toolbar\" [class]=\"passThrough().toolbar?.class\" [style]=\"passThrough().toolbar?.style\">\n <div class=\"tx-table__toolbar-slot\"><ng-content select=\"[txTableToolbar]\" /></div>\n @if (showSettings()) {\n <tx-table-settings\n [columns]=\"columns()\"\n [hidden]=\"hidden()\"\n [showColumns]=\"columnSettings()\"\n [showActions]=\"actionsSettings()\"\n [unstyled]=\"isUnstyled()\"\n (columnToggled)=\"toggleColumn($event.field, $event.visible)\"\n />\n }\n </div>\n}\n\n@if (showPaginatorTop()) {\n <ng-container [ngTemplateOutlet]=\"pager\" [ngTemplateOutletContext]=\"{ $implicit: 'top' }\" />\n}\n\n<div class=\"tx-table__frame\" [class]=\"passThrough().frame?.class\" [style]=\"passThrough().frame?.style\" [attr.aria-busy]=\"loading() || null\">\n @if (cardView() && selectionMode() === 'checkbox' && !empty()) {\n <div class=\"tx-table__select-all\">\n <tx-checkbox\n binary\n [label]=\"translations().selectAll\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"toggleAll($event)\"\n />\n </div>\n }\n\n @if (loading()) {\n <div class=\"tx-table__loading\" [class]=\"passThrough().loading?.class\" [style]=\"passThrough().loading?.style\">\n <tx-progress-spinner [ariaLabel]=\"translations().loading\" [unstyled]=\"isUnstyled()\" />\n </div>\n }\n\n @if (!cardView()) {\n <div\n class=\"tx-table__scroller\"\n [class.tx-table__scroller--empty]=\"empty()\"\n [class]=\"passThrough().scroller?.class\"\n [style]=\"passThrough().scroller?.style\"\n [style.max-height]=\"scrollHeight()\"\n (scroll)=\"onScroll($event)\"\n >\n <table\n class=\"tx-table__table\"\n [class]=\"passThrough().table?.class\"\n [style]=\"passThrough().table?.style\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-multiselectable]=\"rowSelection() ? selectionMode() === 'multiple' : null\"\n [attr.role]=\"rowSelection() ? 'grid' : null\"\n >\n <thead class=\"tx-table__thead\" [class]=\"passThrough().thead?.class\" [style]=\"passThrough().thead?.style\">\n <tr\n #headerRow\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n class=\"tx-table__header-row\"\n [class]=\"passThrough().headerRow?.class\"\n [style]=\"passThrough().headerRow?.style\"\n [cdkDropListDisabled]=\"!reorderableColumns()\"\n (cdkDropListDropped)=\"dropColumn($event)\"\n >\n @for (item of renderColumns(); track item.column.field; let last = $last) {\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragPreviewClass=\"tx-table__drag-preview\"\n [cdkDragBoundary]=\"headerRow\"\n scope=\"col\"\n class=\"tx-table__th\"\n [class]=\"[item.column.headerClass ?? '', passThrough().headerCell?.class ?? '']\"\n [style]=\"passThrough().headerCell?.style\"\n [style.width]=\"item.style['width']\"\n [style.min-width]=\"item.style['minWidth']\"\n [style.max-width]=\"item.style['maxWidth']\"\n [style.inset-inline-start]=\"frozenStyle(item)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(item)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!item.frozen\"\n [class.tx-table__cell--frozen-last]=\"item.lastFrozenStart\"\n [class.tx-table__cell--frozen-first-end]=\"item.firstFrozenEnd\"\n [class.tx-table__th--draggable]=\"reorderableColumns() && item.kind === 'data' && item.column.reorderable !== false\"\n [attr.data-field]=\"item.column.field\"\n [attr.data-align]=\"item.column.align ?? null\"\n [attr.aria-sort]=\"item.kind === 'data' ? ariaSort(item.column) : null\"\n [cdkDragDisabled]=\"!reorderableColumns() || item.kind !== 'data' || item.column.reorderable === false\"\n >\n @switch (item.kind) {\n @case ('select') {\n @if (selectionMode() === 'checkbox') {\n <tx-checkbox\n binary\n class=\"tx-table__select\"\n [ariaLabel]=\"translations().selectAll\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"toggleAll($event)\"\n />\n } @else {\n <span class=\"tx-table__sr-only\">{{ translations().selectRow }}</span>\n }\n }\n @case ('expand') {\n <span class=\"tx-table__sr-only\">{{ translations().expandRow }}</span>\n }\n @case ('actions') {\n <span class=\"tx-table__column-title\">{{ item.column.header }}</span>\n }\n @default {\n <div class=\"tx-table__header-content\">\n @if (headerTemplatesByField().get(item.column.field); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.column }\" />\n } @else if (isSortable(item.column)) {\n @if (reorderableColumns() && item.column.reorderable !== false) {\n <tx-icon class=\"tx-table__grip\" aria-hidden=\"true\" name=\"grip-vertical\" />\n }\n <button\n type=\"button\"\n class=\"tx-table__sort\"\n [class]=\"passThrough().sortButton?.class\"\n [style]=\"passThrough().sortButton?.style\"\n (click)=\"sort(item.column, $event)\"\n (keydown.alt.arrowleft)=\"moveColumnBy(item.column, -1, $event)\"\n (keydown.alt.arrowright)=\"moveColumnBy(item.column, 1, $event)\"\n >\n <span class=\"tx-table__column-title\">{{ label(item.column) }}</span>\n @if (sortOrderOf(item.column); as order) {\n <tx-icon\n class=\"tx-table__sort-icon\"\n aria-hidden=\"true\"\n name=\"sort-amount-down\"\n [class.tx-table__sort-icon--desc]=\"order === 'desc'\"\n [class]=\"passThrough().sortIcon?.class\"\n [style]=\"passThrough().sortIcon?.style\"\n />\n @if (sortMode() === 'multiple' && sortMeta().length > 1) {\n <span class=\"tx-table__sort-badge\" aria-hidden=\"true\">{{ sortIndexOf(item.column) + 1 }}</span>\n }\n }\n </button>\n } @else {\n @if (reorderableColumns() && item.column.reorderable !== false) {\n <tx-icon class=\"tx-table__grip\" aria-hidden=\"true\" name=\"grip-vertical\" />\n }\n <span class=\"tx-table__column-title\">{{ label(item.column) }}</span>\n }\n @if (item.column.filter && filterDisplay() === 'menu') {\n <tx-table-column-filter class=\"tx-table__filter\" [column]=\"item.column\" />\n }\n </div>\n }\n }\n @if (resizableColumns() && item.kind === 'data' && item.column.resizable !== false && item.column.width === undefined && !last) {\n <span\n class=\"tx-table__resizer\"\n role=\"separator\"\n tabindex=\"0\"\n aria-orientation=\"vertical\"\n [class.tx-table__resizer--active]=\"resizing() === item.column.field\"\n [attr.aria-label]=\"translations().resizeColumn.replace('{column}', label(item.column))\"\n [attr.aria-valuenow]=\"resizeValue(item.column)\"\n [attr.aria-valuemin]=\"resizeMin(item.column)\"\n [attr.aria-valuemax]=\"resizeMax(item.column)\"\n (pointerdown)=\"startResize(item, $event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown.arrowleft)=\"resizeByKey(item, -10, $event)\"\n (keydown.arrowright)=\"resizeByKey(item, 10, $event)\"\n >\n <span class=\"tx-table__resizer-line\"></span>\n </span>\n }\n </th>\n }\n </tr>\n @if (filterRow()) {\n <tr class=\"tx-table__filter-row\">\n @for (item of renderColumns(); track item.column.field) {\n <td\n class=\"tx-table__th tx-table__filter-cell\"\n [style.inset-inline-start]=\"frozenStyle(item)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(item)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!item.frozen\"\n [class.tx-table__cell--frozen-last]=\"item.lastFrozenStart\"\n [class.tx-table__cell--frozen-first-end]=\"item.firstFrozenEnd\"\n >\n @if (item.kind === 'data' && item.column.filter) {\n <tx-table-column-filter display=\"row\" [column]=\"item.column\" />\n }\n </td>\n }\n </tr>\n }\n </thead>\n @if (frozenRows().length) {\n <tbody class=\"tx-table__frozen-tbody\" [style.top.px]=\"headerHeight()\">\n @for (item of frozenRows(); track item.key; let position = $index) {\n <tr class=\"tx-table__row tx-table__row--frozen\">\n <ng-container [ngTemplateOutlet]=\"rowCells\" [ngTemplateOutletContext]=\"{ $implicit: item, position }\" />\n </tr>\n }\n </tbody>\n }\n <tbody\n #tbody\n cdkDropList\n class=\"tx-table__tbody\"\n [class]=\"passThrough().tbody?.class\"\n [style]=\"passThrough().tbody?.style\"\n [cdkDropListDisabled]=\"!reorderableRows()\"\n (cdkDropListDropped)=\"dropRow($event)\"\n >\n @if (spacerBefore()) {\n <tr class=\"tx-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"dataColumnCount()\" [style.height.px]=\"spacerBefore()\"></td>\n </tr>\n }\n @for (item of visibleRows(); track item.key; let windowIndex = $index) {\n @let position = windowRange().start + windowIndex;\n @let odd = position % 2 === 1;\n @if (item.group?.first && rowGroupMode() === 'subheader') {\n <tr class=\"tx-table__group-header\">\n <td class=\"tx-table__group-cell\" [attr.colspan]=\"dataColumnCount()\">\n <div class=\"tx-table__group-content\">\n @if (expandableRowGroups()) {\n <button\n type=\"button\"\n class=\"tx-table__row-toggle\"\n [attr.aria-expanded]=\"!item.group.collapsed\"\n [attr.aria-label]=\"item.group.collapsed ? translations().expandRow : translations().collapseRow\"\n (click)=\"toggleGroup(item)\"\n >\n <tx-icon aria-hidden=\"true\" name=\"chevron-right\" class=\"tx-table__row-toggle-icon\" [class.tx-table__row-toggle-icon--open]=\"!item.group.collapsed\" />\n </button>\n }\n @if (groupHeaderTemplate(); as header) {\n <ng-container [ngTemplateOutlet]=\"header.templateRef\" [ngTemplateOutletContext]=\"groupContext(item)\" />\n } @else {\n <span class=\"tx-table__group-title\">{{ item.group.value }}</span>\n <span class=\"tx-table__group-count\">{{ translations().rowGroup.replace('{count}', '' + item.group.size) }}</span>\n }\n </div>\n </td>\n </tr>\n }\n @if (!item.group?.collapsed || animatedGroups()) {\n <tr\n cdkDrag\n cdkDragLockAxis=\"y\"\n cdkDragPreviewContainer=\"parent\"\n class=\"tx-table__row\"\n [class]=\"[rowClassOf(item) ?? '', passThrough().row?.class ?? '']\"\n [style]=\"passThrough().row?.style\"\n [class.tx-table__row--odd]=\"odd\"\n [class.tx-table__row--selected]=\"item.selected\"\n [class.tx-table__row--selectable]=\"rowSelection() && item.selectable\"\n [class.tx-table__row--menu]=\"menuRowKey() === item.key && menuRowKey() !== undefined\"\n [attr.aria-selected]=\"rowSelection() ? item.selected : null\"\n [attr.tabindex]=\"rowSelection() ? (position === focusedRow() ? 0 : -1) : null\"\n [attr.data-key]=\"item.key\"\n [class.tx-table__row--editing]=\"isRowEditing(item)\"\n [class.tx-table__row--collapsed]=\"!!item.group?.collapsed\"\n [attr.inert]=\"item.group?.collapsed ? '' : null\"\n [attr.aria-hidden]=\"item.group?.collapsed ? true : null\"\n (click)=\"onRowClick(item, position, $event)\"\n (keydown)=\"onRowKeydown(item, position, $event)\"\n (contextmenu)=\"onRowContextMenu(item, $event)\"\n >\n <ng-container [ngTemplateOutlet]=\"rowCells\" [ngTemplateOutletContext]=\"{ $implicit: item, position }\" />\n </tr>\n @if ((item.expanded || isClosing(item.key)) && !item.group?.collapsed && expansionTemplate(); as expansion) {\n <tr class=\"tx-table__expansion\">\n <td class=\"tx-table__expansion-cell\" [attr.colspan]=\"dataColumnCount()\">\n <div\n class=\"tx-table__expansion-body\"\n [class.tx-table__expansion-body--open]=\"item.expanded\"\n (transitionend)=\"finishClosing(item.key, $event)\"\n >\n <div class=\"tx-table__expansion-inner\">\n <div class=\"tx-table__expansion-content\">\n <ng-container [ngTemplateOutlet]=\"expansion.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.row, index: item.index }\" />\n </div>\n </div>\n </div>\n </td>\n </tr>\n }\n @if (item.group?.last && rowGroupMode() === 'subheader' && groupFooterTemplate(); as footer) {\n <tr class=\"tx-table__group-footer\">\n <td class=\"tx-table__group-cell\" [attr.colspan]=\"dataColumnCount()\">\n <ng-container [ngTemplateOutlet]=\"footer.templateRef\" [ngTemplateOutletContext]=\"groupContext(item)\" />\n </td>\n </tr>\n }\n }\n }\n @if (spacerAfter()) {\n <tr class=\"tx-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"dataColumnCount()\" [style.height.px]=\"spacerAfter()\"></td>\n </tr>\n }\n </tbody>\n @if (hasFooter()) {\n <tfoot class=\"tx-table__tfoot\" [class]=\"passThrough().tfoot?.class\" [style]=\"passThrough().tfoot?.style\">\n <tr>\n @for (item of renderColumns(); track item.column.field) {\n <td\n class=\"tx-table__footer-cell\"\n [class]=\"passThrough().footerCell?.class\"\n [style]=\"passThrough().footerCell?.style\"\n [style.inset-inline-start]=\"frozenStyle(item)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(item)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!item.frozen\"\n [attr.data-align]=\"item.column.align ?? null\"\n >\n @if (footerTemplatesByField().get(item.column.field); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.column }\" />\n } @else {\n {{ item.column.footer }}\n }\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n </div>\n } @else if (!empty()) {\n <div class=\"tx-table__cards\" role=\"list\" [class]=\"passThrough().cards?.class\" [style]=\"passThrough().cards?.style\" [attr.aria-label]=\"ariaLabel() ?? null\">\n @for (item of renderRows(); track item.key) {\n <div\n role=\"listitem\"\n class=\"tx-table__card\"\n [class]=\"passThrough().card?.class\"\n [style]=\"passThrough().card?.style\"\n [class.tx-table__card--selected]=\"item.selected\"\n [class.tx-table__card--custom]=\"!!cardTemplate()\"\n >\n @if (cardTemplate(); as card) {\n <ng-container [ngTemplateOutlet]=\"card.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.row, index: item.index }\" />\n } @else {\n @if (hasSelectColumn()) {\n <div class=\"tx-table__card-select\">\n @if (selectionMode() === 'checkbox') {\n <tx-checkbox\n binary\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"item.selected\"\n (ngModelChange)=\"toggleRow(item)\"\n />\n } @else {\n <tx-radio-button\n [value]=\"item.key\"\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"radioValue()\"\n (ngModelChange)=\"selectRadio(item)\"\n />\n }\n </div>\n }\n @if (cardTitleColumn(); as title) {\n <div class=\"tx-table__card-title\" [class.tx-table__card-title--select]=\"hasSelectColumn()\">\n <ng-container [ngTemplateOutlet]=\"cellContent\" [ngTemplateOutletContext]=\"{ $implicit: item, column: title }\" />\n </div>\n }\n @for (column of cardFields(); track column.field) {\n <div class=\"tx-table__card-field\">\n <span class=\"tx-table__card-label\">{{ label(column) }}</span>\n <span class=\"tx-table__card-value\"><ng-container [ngTemplateOutlet]=\"cellContent\" [ngTemplateOutletContext]=\"{ $implicit: item, column }\" /></span>\n </div>\n }\n @if (actionsTemplate(); as actions) {\n <div class=\"tx-table__card-actions\">\n <ng-container [ngTemplateOutlet]=\"actions.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.row, index: item.index }\" />\n </div>\n }\n }\n </div>\n }\n </div>\n }\n\n @if (empty()) {\n <div class=\"tx-table__empty\" [class]=\"passThrough().empty?.class\" [style]=\"passThrough().empty?.style\">\n @if (emptyTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: dataColumnCount() }\" />\n } @else {\n {{ emptyMessage() ?? translations().emptyMessage }}\n }\n </div>\n }\n</div>\n\n@if (showPaginatorBottom()) {\n <ng-container [ngTemplateOutlet]=\"pager\" [ngTemplateOutletContext]=\"{ $implicit: 'bottom' }\" />\n}\n\n<ng-content />\n\n<tx-tiered-menu\n #rowMenu\n popup\n variant=\"context\"\n placement=\"bottom-start\"\n [offset]=\"0\"\n [model]=\"menuItems()\"\n [ariaLabel]=\"translations().rowActions\"\n [unstyled]=\"isUnstyled()\"\n (closed)=\"onMenuClosed()\"\n>\n <ng-template txMenuItem let-menuItem>\n @if (actionTemplate(menuItem); as action) {\n <span class=\"tx-table__menu-action\" aria-hidden=\"true\" [attr.data-action-id]=\"action.id()\">\n <ng-container [ngTemplateOutlet]=\"action.templateRef\" />\n </span>\n } @else if (menuItem.icon) {\n <tx-icon class=\"tx-table__menu-icon\" aria-hidden=\"true\" [name]=\"menuItem.icon\" />\n }\n <span class=\"tx-table__menu-label\">{{ menuItem.label }}</span>\n </ng-template>\n</tx-tiered-menu>\n\n<ng-template #cellContent let-item let-column=\"column\">\n @if (templatesByField().get(column.field); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item.row, row: item.row, index: item.index, column, value: cellValue(item.row, column) }\"\n />\n } @else {\n {{ displayValue(item.row, column) }}\n }\n</ng-template>\n\n<ng-template #pager let-position>\n <tx-paginator\n class=\"tx-table__paginator\"\n [class.tx-table__paginator--top]=\"position === 'top'\"\n [class]=\"passThrough().paginator?.class\"\n [style]=\"passThrough().paginator?.style\"\n [first]=\"first()\"\n [rows]=\"rows()\"\n [totalRecords]=\"total()\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [showTotal]=\"showTotal()\"\n [showCurrentPageReport]=\"showCurrentPageReport()\"\n [currentPageReportTemplate]=\"currentPageReportTemplate()\"\n [showFirstLastIcon]=\"showFirstLastIcon()\"\n [showPageLinks]=\"showPageLinks()\"\n [showJumpToPageDropdown]=\"showJumpToPageDropdown()\"\n [showJumpToPageInput]=\"showJumpToPageInput()\"\n [alwaysShow]=\"alwaysShowPaginator()\"\n [pageLinkSize]=\"pageLinks()\"\n [unstyled]=\"isUnstyled()\"\n (pageChange)=\"onPage($event)\"\n />\n</ng-template>\n\n<ng-template #rowCells let-item let-position=\"position\">\n @for (column of renderColumns(); track column.column.field) {\n @if (!isGroupedCellHidden(item, column)) {\n <td\n class=\"tx-table__td\"\n [class]=\"[column.column.cellClass ?? '', passThrough().cell?.class ?? '']\"\n [style]=\"passThrough().cell?.style\"\n [style.inset-inline-start]=\"frozenStyle(column)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(column)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!column.frozen\"\n [class.tx-table__cell--frozen-last]=\"column.lastFrozenStart\"\n [class.tx-table__cell--frozen-first-end]=\"column.firstFrozenEnd\"\n [class.tx-table__td--actions]=\"column.kind === 'actions'\"\n [class.tx-table__td--editable]=\"column.kind === 'data' && editMode() === 'cell' && !!column.column.editable\"\n [class.tx-table__td--editing]=\"column.kind === 'data' && isEditing(item, column.column)\"\n [attr.data-field]=\"column.column.field\"\n [attr.data-align]=\"column.column.align ?? null\"\n [attr.rowspan]=\"groupRowspan(item, column)\"\n [attr.tabindex]=\"column.kind === 'data' && editMode() === 'cell' && column.column.editable ? 0 : null\"\n (click)=\"onCellClick(item, column, $event)\"\n (keydown)=\"onCellKeydown(item, column, $event)\"\n (focusout)=\"onCellFocusOut(item, column, $event)\"\n >\n @if (animatedGroups()) {\n <div class=\"tx-table__cell-body\">\n <div class=\"tx-table__cell-inner\">\n <ng-container [ngTemplateOutlet]=\"cellBody\" [ngTemplateOutletContext]=\"{ $implicit: item, column, position }\" />\n </div>\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"cellBody\" [ngTemplateOutletContext]=\"{ $implicit: item, column, position }\" />\n }\n </td>\n }\n }\n</ng-template>\n\n<ng-template #cellBody let-item let-column=\"column\" let-position=\"position\">\n @switch (column.kind) {\n @case ('reorder') {\n <button\n type=\"button\"\n cdkDragHandle\n class=\"tx-table__row-handle\"\n [attr.aria-label]=\"translations().moveRow\"\n (keydown.alt.arrowup)=\"moveRowBy(position, -1, $event)\"\n (keydown.alt.arrowdown)=\"moveRowBy(position, 1, $event)\"\n >\n <tx-icon aria-hidden=\"true\" name=\"bars\" />\n </button>\n }\n @case ('select') {\n @if (selectionMode() === 'checkbox') {\n <tx-checkbox\n binary\n class=\"tx-table__select\"\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"item.selected\"\n (ngModelChange)=\"toggleRow(item)\"\n />\n } @else {\n <tx-radio-button\n class=\"tx-table__select\"\n [value]=\"item.key\"\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"radioValue()\"\n (ngModelChange)=\"selectRadio(item)\"\n />\n }\n }\n @case ('expand') {\n @if (canExpand(item)) {\n <button\n type=\"button\"\n class=\"tx-table__row-toggle\"\n [attr.aria-expanded]=\"item.expanded\"\n [attr.aria-label]=\"item.expanded ? translations().collapseRow : translations().expandRow\"\n (click)=\"toggleExpansion(item, $event)\"\n >\n <tx-icon aria-hidden=\"true\" name=\"chevron-right\" class=\"tx-table__row-toggle-icon\" [class.tx-table__row-toggle-icon--open]=\"item.expanded\" />\n </button>\n }\n }\n @case ('actions') {\n @if (actionsTemplate(); as actions) {\n <ng-container [ngTemplateOutlet]=\"actions.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.row, index: item.index }\" />\n }\n }\n @case ('editor') {\n <div class=\"tx-table__row-editor\">\n @if (isRowEditing(item)) {\n <button\n txButton\n type=\"button\"\n text\n rounded\n size=\"small\"\n severity=\"success\"\n icon=\"check\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"translations().saveRow\"\n (click)=\"saveRow(item)\"\n ></button>\n <button\n txButton\n type=\"button\"\n text\n rounded\n size=\"small\"\n severity=\"danger\"\n icon=\"times\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"translations().cancelEdit\"\n (click)=\"cancelRow(item)\"\n ></button>\n } @else {\n <button\n txButton\n type=\"button\"\n text\n rounded\n size=\"small\"\n severity=\"secondary\"\n icon=\"pencil\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"translations().editRow\"\n (click)=\"startRowEdit(item)\"\n ></button>\n }\n </div>\n }\n @default {\n @if (isEditing(item, column.column)) {\n <div class=\"tx-table__editor\">\n @if (editorTemplatesByField().get(column.column.field); as editor) {\n <ng-container [ngTemplateOutlet]=\"editor.templateRef\" [ngTemplateOutletContext]=\"editorContext(item, column.column)\" />\n } @else if (column.column.editOptions?.length) {\n <tx-select\n size=\"small\"\n optionLabel=\"label\"\n optionValue=\"value\"\n class=\"tx-table__editor-control\"\n [options]=\"column.column.editOptions\"\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"draftValue(item, column.column)\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n } @else {\n @switch (column.column.editType ?? 'text') {\n @case ('numeric') {\n <tx-input-number\n size=\"small\"\n class=\"tx-table__editor-control\"\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"draftValue(item, column.column)\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n }\n @case ('boolean') {\n <tx-checkbox\n binary\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"draftValue(item, column.column)\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n }\n @case ('date') {\n <input\n txInput\n type=\"date\"\n size=\"small\"\n class=\"tx-table__editor-control\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"label(column.column)\"\n [value]=\"dateInput(draftValue(item, column.column))\"\n (change)=\"setDraft(item, column.column, parseDateInput($any($event.target).value))\"\n />\n }\n @default {\n <input\n txInput\n type=\"text\"\n size=\"small\"\n class=\"tx-table__editor-control\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"label(column.column)\"\n [value]=\"draftValue(item, column.column) ?? ''\"\n (input)=\"setDraft(item, column.column, $any($event.target).value)\"\n />\n }\n }\n }\n </div>\n } @else if (templatesByField().get(column.column.field); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template.templateRef\"\n [ngTemplateOutletContext]=\"{\n $implicit: item.row,\n row: item.row,\n index: item.index,\n column: column.column,\n value: cellValue(item.row, column.column),\n }\"\n />\n } @else if (isLoadingRow(item)) {\n <tx-skeleton class=\"tx-table__loading-cell\" height=\"14px\" />\n } @else if (cellTooltip()) {\n <span class=\"tx-table__cell-text\" tooltipOverflowOnly [txTooltip]=\"displayValue(item.row, column.column)\">{{ displayValue(item.row, column.column) }}</span>\n } @else {\n {{ displayValue(item.row, column.column) }}\n }\n }\n }\n</ng-template>\n",
4868
- styles: [":host{display:block;min-width:0}.tx-table__toolbar{display:flex;align-items:center;justify-content:space-between}.tx-table__toolbar-slot{flex:1;min-width:0}.tx-table__frame{position:relative}.tx-table__scroller{position:relative;overflow:auto}.tx-table__scroller--empty{overflow:hidden}.tx-table__table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0}.tx-table__thead{position:sticky;inset-block-start:0;z-index:2}.tx-table__th,.tx-table__td,.tx-table__footer-cell{box-sizing:border-box;overflow:hidden;text-align:start;vertical-align:middle}.tx-table__th{position:relative;white-space:nowrap;text-overflow:ellipsis}.tx-table__td{white-space:nowrap;text-overflow:ellipsis;font-variant-numeric:tabular-nums}[data-align=center]{text-align:center}[data-align=end]{text-align:end}.tx-table__cell--frozen{position:sticky;z-index:1}.tx-table__sort{display:inline-flex;align-items:center;max-width:100%;margin:0;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:inherit;cursor:pointer}.tx-table__header-content{display:flex;align-items:center;min-width:0}.tx-table__header-content>.tx-table__sort,.tx-table__header-content>.tx-table__column-title{min-width:0}.tx-table__filter{flex-shrink:0;margin-inline-start:auto}.tx-table__filter-cell{overflow:visible}.tx-table__column-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-table__sort-icon{flex-shrink:0}.tx-table__sort-icon--desc{transform:rotate(180deg)}.tx-table__sort-badge{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.tx-table__resizer{position:absolute;inset-block:0;inset-inline-end:-5px;z-index:3;display:flex;align-items:center;justify-content:center;cursor:col-resize;touch-action:none}.tx-table__resizer:before{content:\"\";position:absolute;inset-block:0;inset-inline-start:-2px;width:14px}.tx-table__resizer-line{height:100%}.tx-table__th--draggable{cursor:grab}.tx-table__th--draggable:active{cursor:grabbing}.tx-table__row--selectable{cursor:pointer}.tx-table__row-toggle{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;margin:0;padding:0;border:0;background:transparent;cursor:pointer}.tx-table__row-toggle-icon:dir(rtl){transform:scaleX(-1)}.tx-table__row-toggle-icon--open,.tx-table__row-toggle-icon--open:dir(rtl){transform:rotate(90deg)}.tx-table__expansion-body{display:grid;grid-template-rows:0fr}.tx-table__expansion-body--open{grid-template-rows:1fr}.tx-table__expansion-inner{min-height:0;overflow:hidden}.tx-table__expansion-body:not(.tx-table__expansion-body--open)>.tx-table__expansion-inner{visibility:hidden}.tx-table__grip{position:absolute;inset-block-start:50%;inset-inline-start:1px;opacity:0;transform:translateY(-50%);pointer-events:none}.tx-table__th--draggable:hover .tx-table__grip,.tx-table__th--draggable:focus-within .tx-table__grip{opacity:1}.tx-table__select{display:inline-flex;vertical-align:middle}.tx-table__editor{display:flex;align-items:center;min-width:0}.tx-table__editor-control{flex:1;width:100%;min-width:0}.tx-table__row-editor{display:flex;align-items:center;justify-content:center}.tx-table__td--editable{cursor:text}.tx-table__td--editing{overflow:visible;text-overflow:clip}.tx-table__cell-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-table__spacer>td{padding:0;border:0}.tx-table__cell-body{display:grid;grid-template-rows:1fr}.tx-table__cell-inner{min-height:0;overflow:hidden;text-overflow:ellipsis}.tx-table__row--collapsed .tx-table__cell-body{grid-template-rows:0fr}.tx-table__row--collapsed .tx-table__cell-inner{visibility:hidden}.tx-table__frozen-tbody{position:sticky;z-index:2}.tx-table__row-handle{display:inline-flex;align-items:center;justify-content:center;margin:0;padding:0;border:0;background:transparent;color:inherit;cursor:grab;touch-action:none}.tx-table__tbody.cdk-drop-list-dragging .tx-table__row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.tx-table__row.cdk-drag-preview{display:table-row}.tx-table__group-content{display:flex;align-items:center}.tx-table__loading{position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center}.tx-table__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.tx-table__cards{display:grid}.tx-table__card{position:relative;display:flex;flex-direction:column;min-width:0}.tx-table__card-field,.tx-table__card-title{display:flex;align-items:center;min-width:0;overflow-wrap:break-word}.tx-table__card-field{text-align:end}.tx-table__card-label{flex-shrink:0;max-width:45%;margin-inline-end:auto;text-align:start}.tx-table__card-value{min-width:0}.tx-table__card-select{position:absolute;z-index:1}.tx-table__card-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;order:99;margin-top:auto}.tx-table--resizing{cursor:col-resize;-webkit-user-select:none;user-select:none}.tx-table--resizing *{cursor:col-resize}:host([data-styled]){color:var(--tx-table-color);font-size:var(--tx-table-font-size);line-height:var(--tx-table-line-height)}:host([data-styled]) .tx-table__toolbar{gap:var(--tx-table-toolbar-gap);margin-bottom:var(--tx-table-toolbar-margin-bottom)}:host([data-styled]) .tx-table__scroller{padding-bottom:var(--tx-table-scroller-padding-bottom);scrollbar-color:var(--tx-table-scroller-scrollbar-thumb) transparent}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar{width:var(--tx-table-scroller-scrollbar-size);height:var(--tx-table-scroller-scrollbar-size)}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-track,:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-corner{background:transparent}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:999px;background-color:var(--tx-table-scroller-scrollbar-thumb);background-clip:padding-box}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-thumb:hover{background-color:var(--tx-table-scroller-scrollbar-thumb-hover)}:host([data-styled]) .tx-table__scroller--empty{padding-bottom:0}:host([data-styled]) .tx-table__thead{background:var(--tx-table-header-cell-background)}:host([data-styled]) .tx-table__th{padding:var(--tx-table-header-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-header-cell-background);color:var(--tx-table-header-cell-color);font-size:var(--tx-table-header-cell-font-size);font-weight:var(--tx-table-header-cell-font-weight);transition:background var(--tx-table-transition-duration),color var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__header-content{gap:var(--tx-table-header-cell-gap)}:host([data-styled]) .tx-table__filter{margin-block:calc(var(--tx-table-filter-button-inset) * -1)}:host([data-styled]) .tx-table__filter-cell{padding:var(--tx-table-filter-cell-padding);font-weight:var(--tx-font-weight-regular)}:host([data-styled]) .tx-table__sort{gap:var(--tx-table-header-cell-gap);border-radius:var(--tx-radius-xs)}:host([data-styled]) .tx-table__sort:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-table__sort-icon{--tx-icon-size: var(--tx-table-sort-icon-size);color:var(--tx-table-sort-icon-color);transition:transform .3s ease}:host([data-styled]) .tx-table__sort-badge{min-width:var(--tx-table-sort-icon-badge-size);height:var(--tx-table-sort-icon-badge-size);border-radius:999px;background:var(--tx-table-sort-icon-badge-background);color:var(--tx-table-sort-icon-badge-color);font-size:var(--tx-table-sort-icon-badge-font-size)}:host([data-styled]) .tx-table__resizer{width:var(--tx-table-column-resizer-width)}:host([data-styled]) .tx-table__resizer-line{width:var(--tx-table-column-resizer-line-width);background-color:transparent;transition:background-color var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__resizer:hover .tx-table__resizer-line,:host([data-styled]) .tx-table__resizer--active .tx-table__resizer-line,:host([data-styled]) .tx-table__resizer:focus-visible .tx-table__resizer-line{background-color:var(--tx-table-column-resizer-color)}:host([data-styled]) .tx-table__resizer:focus-visible{outline:none}:host([data-styled]) .tx-table__header-row.cdk-drop-list-dragging{background:var(--tx-table-drop-point-background)}:host([data-styled]) .tx-table__header-row.cdk-drop-list-dragging .tx-table__th:hover{background:var(--tx-table-drop-point-hover-background)}:host([data-styled]) .tx-table__th.cdk-drag-placeholder{opacity:.6}:host([data-styled]) .tx-table__row{background:var(--tx-table-row-background);color:var(--tx-table-row-color);outline-color:transparent;transition:background var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__td{height:var(--tx-table-body-cell-height);padding:var(--tx-table-body-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px}:host([data-styled]) .tx-table__expansion-cell{padding:0;border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-row-background)}:host([data-styled]) .tx-table__expansion-content{padding:var(--tx-table-body-cell-padding)}:host([data-styled]) .tx-table__expansion-body{transition:grid-template-rows var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__expansion-body:not(.tx-table__expansion-body--open)>.tx-table__expansion-inner{transition:visibility 0s linear var(--tx-table-expansion-duration)}@starting-style{:host([data-styled]) .tx-table__expansion-body--open{grid-template-rows:0fr}}:host([data-styled]) .tx-table__row-toggle-icon{transition:transform var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__row--collapsed>.tx-table__td{height:0;padding-block:0;border-bottom-width:0}:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row{transition:visibility 0s linear}:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row--collapsed{visibility:collapse;transition-delay:var(--tx-table-expansion-duration)}:host([data-styled]) .tx-table__cell-body{transition:grid-template-rows var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__cell-inner{transition:visibility 0s linear}:host([data-styled]) .tx-table__row--collapsed .tx-table__cell-inner{transition-delay:var(--tx-table-expansion-duration)}:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row>.tx-table__td{transition:height var(--tx-table-expansion-duration) var(--tx-table-expansion-easing),padding-block var(--tx-table-expansion-duration) var(--tx-table-expansion-easing),border-bottom-width var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__grip{--tx-icon-size: var(--tx-table-grip-size);color:var(--tx-table-grip-color);transition:opacity var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__footer-cell{padding:var(--tx-table-footer-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-footer-cell-background);color:var(--tx-table-footer-cell-color);font-weight:var(--tx-table-footer-cell-font-weight)}:host([data-styled]) .tx-table__cell--frozen{background:var(--tx-table-row-background);box-shadow:var(--tx-table-frozen-column-shadow)}:host([data-styled]) .tx-table__th.tx-table__cell--frozen{background:var(--tx-table-header-cell-background)}:host([data-styled]) .tx-table__cell--frozen-last{border-inline-end:1px solid var(--tx-table-border-color)}:host([data-styled]) .tx-table__cell--frozen-first-end{border-inline-start:1px solid var(--tx-table-border-color)}:host([data-styled]) .tx-table__row .tx-table__cell--frozen{background:inherit}:host([data-styled]) .tx-table__row--selected{background:var(--tx-table-row-selected-background);color:var(--tx-table-row-selected-color)}:host([data-styled]) .tx-table__row--selected>.tx-table__td{border-block-end-color:var(--tx-table-body-cell-selected-border-color)}:host([data-styled]) .tx-table__row--menu>.tx-table__td{background:var(--tx-table-row-menu-background)}:host([data-styled]) .tx-table__row:focus-visible{outline:var(--tx-table-row-focus-ring-width) var(--tx-table-row-focus-ring-style) var(--tx-table-row-focus-ring-color);outline-offset:var(--tx-table-row-focus-ring-offset)}:host([data-styled]) .tx-table__row-handle{width:var(--tx-table-row-toggle-button-size);height:var(--tx-table-row-toggle-button-size);border-radius:var(--tx-radius-xs);color:var(--tx-table-grip-color)}:host([data-styled]) .tx-table__row-handle:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-table__row.cdk-drag-preview{box-shadow:var(--tx-table-drag-preview-shadow);background:var(--tx-table-row-background)}:host([data-styled]) .tx-table__row.cdk-drag-placeholder{opacity:.4}:host([data-styled]) .tx-table__group-cell{padding:var(--tx-table-body-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-group-background);font-weight:var(--tx-table-group-font-weight)}:host([data-styled]) .tx-table__group-content{gap:var(--tx-table-header-cell-gap)}:host([data-styled]) .tx-table__group-count{color:var(--tx-text-muted);font-weight:var(--tx-font-weight-regular)}:host([data-styled]) .tx-table__frozen-tbody .tx-table__td{background:var(--tx-table-row-background)}:host([data-styled]) .tx-table__td--editable:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}:host([data-styled]) .tx-table__td--editing{padding-block:var(--tx-table-editor-padding-block)}:host([data-styled]) .tx-table__row-editor{gap:var(--tx-table-actions-gap)}:host([data-styled]) .tx-table__row-toggle{width:var(--tx-table-row-toggle-button-size);height:var(--tx-table-row-toggle-button-size);border-radius:var(--tx-table-row-toggle-button-border-radius);color:var(--tx-table-row-toggle-button-color);transition:background var(--tx-table-transition-duration),color var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__row-toggle:hover{background:var(--tx-table-row-toggle-button-hover-background);color:var(--tx-table-row-toggle-button-hover-color)}:host([data-styled]) .tx-table__row-toggle:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-table__loading{background:var(--tx-table-loading-background);-webkit-backdrop-filter:blur(var(--tx-table-loading-blur));backdrop-filter:blur(var(--tx-table-loading-blur))}:host([data-styled]) .tx-table__empty{padding:var(--tx-table-empty-padding);border:1px solid var(--tx-table-border-color);border-top:0;color:var(--tx-table-empty-color)}:host([data-styled]) .tx-table__paginator{margin-top:var(--tx-table-paginator-margin-top)}:host([data-styled]) .tx-table__paginator--top{margin-top:0;margin-bottom:var(--tx-table-paginator-margin-top)}:host([data-styled]) .tx-table__select-all{margin-bottom:var(--tx-table-toolbar-margin-bottom)}:host([data-styled]) .tx-table__cards{grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--tx-table-card-min-width)),1fr));gap:var(--tx-table-card-gap)}:host([data-styled]) .tx-table__card{border-radius:var(--tx-table-card-border-radius);background:var(--tx-table-card-background);box-shadow:inset 0 0 0 1px var(--tx-table-card-border-color)}:host([data-styled]) .tx-table__card--selected{box-shadow:inset 0 0 0 1px var(--tx-table-row-focus-ring-color)}:host([data-styled]) .tx-table__card-field{gap:var(--tx-table-card-field-gap);padding:var(--tx-table-card-field-padding);border-bottom:1px solid var(--tx-table-card-border-color);font-size:var(--tx-table-card-field-font-size)}:host([data-styled]) .tx-table__card-field:last-child{border-bottom:0}:host([data-styled]) .tx-table__card-label{color:var(--tx-table-card-label-color);font-size:var(--tx-table-card-label-font-size)}:host([data-styled]) .tx-table__card-title{padding:var(--tx-table-card-title-padding);border-bottom:1px solid var(--tx-table-card-border-color);font-size:var(--tx-table-card-title-font-size);font-weight:var(--tx-table-card-title-font-weight)}:host([data-styled]) .tx-table__card-title--select{padding-inline-end:calc(var(--tx-table-card-select-inset) * 4)}:host([data-styled]) .tx-table__card-select{inset-block-start:var(--tx-table-card-select-inset);inset-inline-end:var(--tx-table-card-select-inset)}:host([data-styled]) .tx-table__card-actions{gap:var(--tx-table-actions-gap);padding:var(--tx-table-card-actions-padding)}:host([data-styled].tx-table--gridlines) .tx-table__th{border-width:1px 0 1px 1px}:host([data-styled].tx-table--gridlines) .tx-table__th:last-child{border-width:1px}:host([data-styled].tx-table--gridlines) .tx-table__thead>tr:not(:first-child)>.tx-table__th{border-top-width:0}:host([data-styled].tx-table--gridlines) .tx-table__td,:host([data-styled].tx-table--gridlines) .tx-table__footer-cell{border-width:0 0 1px 1px}:host([data-styled].tx-table--gridlines) .tx-table__td:last-child,:host([data-styled].tx-table--gridlines) .tx-table__footer-cell:last-child{border-width:0 1px 1px}:host([data-styled].tx-table--gridlines) .tx-table__expansion-cell,:host([data-styled].tx-table--gridlines) .tx-table__group-cell{border-width:0 1px 1px}:host([data-styled].tx-table--striped) .tx-table__row--odd:not(.tx-table__row--selected){background:var(--tx-table-row-striped-background)}:host([data-styled].tx-table--hoverable) .tx-table__row:not(.tx-table__row--selected):hover{background:var(--tx-table-row-hover-background)}:host([data-styled][data-size=small]) .tx-table__th{padding:var(--tx-table-header-cell-sm-padding)}:host([data-styled][data-size=small]) .tx-table__td{height:var(--tx-table-body-cell-sm-height);padding:var(--tx-table-body-cell-sm-padding)}:host([data-styled][data-size=large]) .tx-table__th{padding:var(--tx-table-header-cell-lg-padding)}:host([data-styled][data-size=large]) .tx-table__td{height:var(--tx-table-body-cell-lg-height);padding:var(--tx-table-body-cell-lg-padding)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-table__th,:host([data-styled]) .tx-table__row,:host([data-styled]) .tx-table__sort-icon,:host([data-styled]) .tx-table__resizer-line,:host([data-styled]) .tx-table__row-toggle,:host([data-styled]) .tx-table__row-toggle-icon,:host([data-styled]) .tx-table__grip,:host([data-styled]) .tx-table__expansion-body,:host([data-styled]) .tx-table__cell-body,:host([data-styled]) .tx-table__cell-inner,:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row>.tx-table__td,:host([data-styled]) .tx-table__expansion-inner{transition:none}}\n"]
4907
+ template: "@if (showToolbar()) {\n <div class=\"tx-table__toolbar\" [class]=\"passThrough().toolbar?.class\" [style]=\"passThrough().toolbar?.style\">\n <div class=\"tx-table__toolbar-slot\"><ng-content select=\"[txTableToolbar]\" /></div>\n @if (showSettings()) {\n <tx-table-settings\n [columns]=\"columns()\"\n [hidden]=\"hidden()\"\n [showColumns]=\"columnSettings()\"\n [showActions]=\"actionsSettings()\"\n [unstyled]=\"isUnstyled()\"\n (columnToggled)=\"toggleColumn($event.field, $event.visible)\"\n />\n }\n </div>\n}\n\n@if (showPaginatorTop()) {\n <ng-container [ngTemplateOutlet]=\"pager\" [ngTemplateOutletContext]=\"{ $implicit: 'top' }\" />\n}\n\n<div class=\"tx-table__frame\" [class]=\"passThrough().frame?.class\" [style]=\"passThrough().frame?.style\" [attr.aria-busy]=\"loading() || null\">\n @if (cardView() && selectionMode() === 'checkbox' && !empty()) {\n <div class=\"tx-table__select-all\">\n <tx-checkbox\n binary\n [label]=\"translations().selectAll\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"toggleAll($event)\"\n />\n </div>\n }\n\n @if (loading()) {\n <div class=\"tx-table__loading\" [class]=\"passThrough().loading?.class\" [style]=\"passThrough().loading?.style\">\n <tx-progress-spinner [ariaLabel]=\"translations().loading\" [unstyled]=\"isUnstyled()\" />\n </div>\n }\n\n @if (!cardView()) {\n <div\n class=\"tx-table__scroller\"\n [class.tx-table__scroller--empty]=\"empty()\"\n [class]=\"passThrough().scroller?.class\"\n [style]=\"passThrough().scroller?.style\"\n [style.max-height]=\"scrollHeight()\"\n (scroll)=\"onScroll($event)\"\n >\n <table\n class=\"tx-table__table\"\n [class]=\"passThrough().table?.class\"\n [style]=\"passThrough().table?.style\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-multiselectable]=\"rowSelection() || treeCheckbox() ? selectionMode() !== 'single' : null\"\n [attr.role]=\"isTree ? 'treegrid' : rowSelection() ? 'grid' : null\"\n >\n <thead class=\"tx-table__thead\" [class]=\"passThrough().thead?.class\" [style]=\"passThrough().thead?.style\">\n <tr\n #headerRow\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n class=\"tx-table__header-row\"\n [class]=\"passThrough().headerRow?.class\"\n [style]=\"passThrough().headerRow?.style\"\n [cdkDropListDisabled]=\"!reorderableColumns()\"\n (cdkDropListDropped)=\"dropColumn($event)\"\n >\n @for (item of renderColumns(); track item.column.field; let last = $last) {\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n cdkDragPreviewClass=\"tx-table__drag-preview\"\n [cdkDragBoundary]=\"headerRow\"\n scope=\"col\"\n class=\"tx-table__th\"\n [class]=\"[item.column.headerClass ?? '', passThrough().headerCell?.class ?? '']\"\n [style]=\"passThrough().headerCell?.style\"\n [style.width]=\"item.style['width']\"\n [style.min-width]=\"item.style['minWidth']\"\n [style.max-width]=\"item.style['maxWidth']\"\n [style.inset-inline-start]=\"frozenStyle(item)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(item)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!item.frozen\"\n [class.tx-table__cell--frozen-last]=\"item.lastFrozenStart\"\n [class.tx-table__cell--frozen-first-end]=\"item.firstFrozenEnd\"\n [class.tx-table__th--draggable]=\"reorderableColumns() && item.kind === 'data' && item.column.reorderable !== false\"\n [attr.data-field]=\"item.column.field\"\n [attr.data-align]=\"item.column.align ?? null\"\n [attr.aria-sort]=\"item.kind === 'data' ? ariaSort(item.column) : null\"\n [cdkDragDisabled]=\"!reorderableColumns() || item.kind !== 'data' || item.column.reorderable === false\"\n >\n @switch (item.kind) {\n @case ('select') {\n @if (selectionMode() === 'checkbox') {\n <tx-checkbox\n binary\n class=\"tx-table__select\"\n [ariaLabel]=\"translations().selectAll\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"toggleAll($event)\"\n />\n } @else {\n <span class=\"tx-table__sr-only\">{{ translations().selectRow }}</span>\n }\n }\n @case ('expand') {\n <span class=\"tx-table__sr-only\">{{ translations().expandRow }}</span>\n }\n @case ('actions') {\n <span class=\"tx-table__column-title\">{{ item.column.header }}</span>\n }\n @default {\n <div class=\"tx-table__header-content\">\n @if (treeCheckbox() && item.column.field === treeField()) {\n <tx-checkbox\n binary\n class=\"tx-table__select tx-table__tree-select-all\"\n [ariaLabel]=\"translations().selectAll\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"toggleAll($event)\"\n />\n }\n @if (headerTemplatesByField().get(item.column.field); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.column }\" />\n } @else if (isSortable(item.column)) {\n @if (reorderableColumns() && item.column.reorderable !== false) {\n <tx-icon class=\"tx-table__grip\" aria-hidden=\"true\" name=\"grip-vertical\" />\n }\n <button\n type=\"button\"\n class=\"tx-table__sort\"\n [class]=\"passThrough().sortButton?.class\"\n [style]=\"passThrough().sortButton?.style\"\n (click)=\"sort(item.column, $event)\"\n (keydown.alt.arrowleft)=\"moveColumnBy(item.column, -1, $event)\"\n (keydown.alt.arrowright)=\"moveColumnBy(item.column, 1, $event)\"\n >\n <span class=\"tx-table__column-title\">{{ label(item.column) }}</span>\n @if (sortOrderOf(item.column); as order) {\n <tx-icon\n class=\"tx-table__sort-icon\"\n aria-hidden=\"true\"\n name=\"sort-amount-down\"\n [class.tx-table__sort-icon--desc]=\"order === 'desc'\"\n [class]=\"passThrough().sortIcon?.class\"\n [style]=\"passThrough().sortIcon?.style\"\n />\n @if (sortMode() === 'multiple' && sortMeta().length > 1) {\n <span class=\"tx-table__sort-badge\" aria-hidden=\"true\">{{ sortIndexOf(item.column) + 1 }}</span>\n }\n }\n </button>\n } @else {\n @if (reorderableColumns() && item.column.reorderable !== false) {\n <tx-icon class=\"tx-table__grip\" aria-hidden=\"true\" name=\"grip-vertical\" />\n }\n <span class=\"tx-table__column-title\">{{ label(item.column) }}</span>\n }\n @if (item.column.filter && filterDisplay() === 'menu') {\n <tx-table-column-filter class=\"tx-table__filter\" [column]=\"item.column\" />\n }\n </div>\n }\n }\n @if (resizableColumns() && item.kind === 'data' && item.column.resizable !== false && item.column.width === undefined && !last) {\n <span\n class=\"tx-table__resizer\"\n role=\"separator\"\n tabindex=\"0\"\n aria-orientation=\"vertical\"\n [class.tx-table__resizer--active]=\"resizing() === item.column.field\"\n [attr.aria-label]=\"translations().resizeColumn.replace('{column}', label(item.column))\"\n [attr.aria-valuenow]=\"resizeValue(item.column)\"\n [attr.aria-valuemin]=\"resizeMin(item.column)\"\n [attr.aria-valuemax]=\"resizeMax(item.column)\"\n (pointerdown)=\"startResize(item, $event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown.arrowleft)=\"resizeByKey(item, -10, $event)\"\n (keydown.arrowright)=\"resizeByKey(item, 10, $event)\"\n >\n <span class=\"tx-table__resizer-line\"></span>\n </span>\n }\n </th>\n }\n </tr>\n @if (filterRow()) {\n <tr class=\"tx-table__filter-row\">\n @for (item of renderColumns(); track item.column.field) {\n <td\n class=\"tx-table__th tx-table__filter-cell\"\n [style.inset-inline-start]=\"frozenStyle(item)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(item)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!item.frozen\"\n [class.tx-table__cell--frozen-last]=\"item.lastFrozenStart\"\n [class.tx-table__cell--frozen-first-end]=\"item.firstFrozenEnd\"\n >\n @if (item.kind === 'data' && item.column.filter) {\n <tx-table-column-filter display=\"row\" [column]=\"item.column\" />\n }\n </td>\n }\n </tr>\n }\n </thead>\n @if (frozenRows().length) {\n <tbody class=\"tx-table__frozen-tbody\" [style.top.px]=\"headerHeight()\">\n @for (item of frozenRows(); track item.key; let position = $index) {\n <tr class=\"tx-table__row tx-table__row--frozen\">\n <ng-container [ngTemplateOutlet]=\"rowCells\" [ngTemplateOutletContext]=\"{ $implicit: item, position }\" />\n </tr>\n }\n </tbody>\n }\n <tbody\n #tbody\n cdkDropList\n class=\"tx-table__tbody\"\n [class]=\"passThrough().tbody?.class\"\n [style]=\"passThrough().tbody?.style\"\n [cdkDropListDisabled]=\"!reorderableRows()\"\n (cdkDropListDropped)=\"dropRow($event)\"\n >\n @if (spacerBefore()) {\n <tr class=\"tx-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"dataColumnCount()\" [style.height.px]=\"spacerBefore()\"></td>\n </tr>\n }\n @for (item of visibleRows(); track item.key; let windowIndex = $index) {\n @let position = windowRange().start + windowIndex;\n @let odd = position % 2 === 1;\n @if (item.group?.first && rowGroupMode() === 'subheader') {\n <tr class=\"tx-table__group-header\">\n <td class=\"tx-table__group-cell\" [attr.colspan]=\"dataColumnCount()\">\n <div class=\"tx-table__group-content\">\n @if (expandableRowGroups()) {\n <button\n type=\"button\"\n class=\"tx-table__row-toggle\"\n [attr.aria-expanded]=\"!item.group.collapsed\"\n [attr.aria-label]=\"item.group.collapsed ? translations().expandRow : translations().collapseRow\"\n (click)=\"toggleGroup(item)\"\n >\n <tx-icon aria-hidden=\"true\" name=\"chevron-right\" class=\"tx-table__row-toggle-icon\" [class.tx-table__row-toggle-icon--open]=\"!item.group.collapsed\" />\n </button>\n }\n @if (groupHeaderTemplate(); as header) {\n <ng-container [ngTemplateOutlet]=\"header.templateRef\" [ngTemplateOutletContext]=\"groupContext(item)\" />\n } @else {\n <span class=\"tx-table__group-title\">{{ item.group.value }}</span>\n <span class=\"tx-table__group-count\">{{ translations().rowGroup.replace('{count}', '' + item.group.size) }}</span>\n }\n </div>\n </td>\n </tr>\n }\n @if (!item.group?.collapsed || animatedGroups()) {\n <tr\n cdkDrag\n cdkDragLockAxis=\"y\"\n cdkDragPreviewContainer=\"parent\"\n class=\"tx-table__row\"\n [class]=\"[rowClassOf(item) ?? '', passThrough().row?.class ?? '']\"\n [style]=\"passThrough().row?.style\"\n [class.tx-table__row--odd]=\"odd\"\n [class.tx-table__row--selected]=\"item.selected\"\n [class.tx-table__row--selectable]=\"rowSelection() && item.selectable\"\n [class.tx-table__row--menu]=\"menuRowKey() === item.key && menuRowKey() !== undefined\"\n [attr.aria-selected]=\"rowSelection() ? item.selected : null\"\n [attr.aria-level]=\"item.tree?.level ?? null\"\n [attr.aria-expanded]=\"item.tree && !item.tree.leaf ? item.tree.expanded : null\"\n [attr.aria-setsize]=\"item.tree?.setSize ?? null\"\n [attr.aria-posinset]=\"item.tree?.posInSet ?? null\"\n [attr.aria-busy]=\"item.tree?.loading || null\"\n [attr.tabindex]=\"rowsFocusable() ? (position === focusedRow() ? 0 : -1) : null\"\n [attr.data-key]=\"item.key\"\n [class.tx-table__row--editing]=\"isRowEditing(item)\"\n [class.tx-table__row--collapsed]=\"isCollapsedRow(item)\"\n [attr.inert]=\"isCollapsedRow(item) ? '' : null\"\n [attr.aria-hidden]=\"isCollapsedRow(item) ? true : null\"\n (click)=\"onRowClick(item, position, $event)\"\n (keydown)=\"onRowKeydown(item, position, $event)\"\n (contextmenu)=\"onRowContextMenu(item, $event)\"\n >\n <ng-container [ngTemplateOutlet]=\"rowCells\" [ngTemplateOutletContext]=\"{ $implicit: item, position }\" />\n </tr>\n @if ((item.expanded || isClosing(item.key)) && !item.group?.collapsed && expansionTemplate(); as expansion) {\n <tr class=\"tx-table__expansion\">\n <td class=\"tx-table__expansion-cell\" [attr.colspan]=\"dataColumnCount()\">\n <div\n class=\"tx-table__expansion-body\"\n [class.tx-table__expansion-body--open]=\"item.expanded\"\n (transitionend)=\"finishClosing(item.key, $event)\"\n >\n <div class=\"tx-table__expansion-inner\">\n <div class=\"tx-table__expansion-content\">\n <ng-container [ngTemplateOutlet]=\"expansion.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: dataOf(item.row), node: item.row, index: item.index }\" />\n </div>\n </div>\n </div>\n </td>\n </tr>\n }\n @if (item.group?.last && rowGroupMode() === 'subheader' && groupFooterTemplate(); as footer) {\n <tr class=\"tx-table__group-footer\">\n <td class=\"tx-table__group-cell\" [attr.colspan]=\"dataColumnCount()\">\n <ng-container [ngTemplateOutlet]=\"footer.templateRef\" [ngTemplateOutletContext]=\"groupContext(item)\" />\n </td>\n </tr>\n }\n }\n }\n @if (spacerAfter()) {\n <tr class=\"tx-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"dataColumnCount()\" [style.height.px]=\"spacerAfter()\"></td>\n </tr>\n }\n </tbody>\n @if (hasFooter()) {\n <tfoot class=\"tx-table__tfoot\" [class]=\"passThrough().tfoot?.class\" [style]=\"passThrough().tfoot?.style\">\n <tr>\n @for (item of renderColumns(); track item.column.field) {\n <td\n class=\"tx-table__footer-cell\"\n [class]=\"passThrough().footerCell?.class\"\n [style]=\"passThrough().footerCell?.style\"\n [style.inset-inline-start]=\"frozenStyle(item)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(item)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!item.frozen\"\n [attr.data-align]=\"item.column.align ?? null\"\n >\n @if (footerTemplatesByField().get(item.column.field); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: item.column }\" />\n } @else {\n {{ item.column.footer }}\n }\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n </div>\n } @else if (!empty()) {\n <div class=\"tx-table__cards\" role=\"list\" [class]=\"passThrough().cards?.class\" [style]=\"passThrough().cards?.style\" [attr.aria-label]=\"ariaLabel() ?? null\">\n @for (item of renderRows(); track item.key) {\n <div\n role=\"listitem\"\n class=\"tx-table__card\"\n [class]=\"passThrough().card?.class\"\n [style]=\"passThrough().card?.style\"\n [class.tx-table__card--selected]=\"item.selected\"\n [class.tx-table__card--custom]=\"!!cardTemplate()\"\n >\n @if (cardTemplate(); as card) {\n <ng-container [ngTemplateOutlet]=\"card.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: dataOf(item.row), node: item.row, index: item.index }\" />\n } @else {\n @if (hasSelectColumn()) {\n <div class=\"tx-table__card-select\">\n @if (selectionMode() === 'checkbox') {\n <tx-checkbox\n binary\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"item.selected\"\n (ngModelChange)=\"toggleRow(item)\"\n />\n } @else {\n <tx-radio-button\n [value]=\"item.key\"\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"radioValue()\"\n (ngModelChange)=\"selectRadio(item)\"\n />\n }\n </div>\n }\n @if (cardTitleColumn(); as title) {\n <div class=\"tx-table__card-title\" [class.tx-table__card-title--select]=\"hasSelectColumn()\">\n <ng-container [ngTemplateOutlet]=\"cellContent\" [ngTemplateOutletContext]=\"{ $implicit: item, column: title }\" />\n </div>\n }\n @for (column of cardFields(); track column.field) {\n <div class=\"tx-table__card-field\">\n <span class=\"tx-table__card-label\">{{ label(column) }}</span>\n <span class=\"tx-table__card-value\"><ng-container [ngTemplateOutlet]=\"cellContent\" [ngTemplateOutletContext]=\"{ $implicit: item, column }\" /></span>\n </div>\n }\n @if (actionsTemplate(); as actions) {\n <div class=\"tx-table__card-actions\">\n <ng-container [ngTemplateOutlet]=\"actions.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: dataOf(item.row), node: item.row, index: item.index }\" />\n </div>\n }\n }\n </div>\n }\n </div>\n }\n\n @if (empty()) {\n <div class=\"tx-table__empty\" [class]=\"passThrough().empty?.class\" [style]=\"passThrough().empty?.style\">\n @if (emptyTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: dataColumnCount() }\" />\n } @else {\n {{ emptyMessage() ?? translations().emptyMessage }}\n }\n </div>\n }\n</div>\n\n@if (showPaginatorBottom()) {\n <ng-container [ngTemplateOutlet]=\"pager\" [ngTemplateOutletContext]=\"{ $implicit: 'bottom' }\" />\n}\n\n<ng-content />\n\n<tx-tiered-menu\n #rowMenu\n popup\n variant=\"context\"\n placement=\"bottom-start\"\n [offset]=\"0\"\n [model]=\"menuItems()\"\n [ariaLabel]=\"translations().rowActions\"\n [unstyled]=\"isUnstyled()\"\n (closed)=\"onMenuClosed()\"\n>\n <ng-template txMenuItem let-menuItem>\n @if (actionTemplate(menuItem); as action) {\n <span class=\"tx-table__menu-action\" aria-hidden=\"true\" [attr.data-action-id]=\"action.id()\">\n <ng-container [ngTemplateOutlet]=\"action.templateRef\" />\n </span>\n } @else if (menuItem.icon) {\n <tx-icon class=\"tx-table__menu-icon\" aria-hidden=\"true\" [name]=\"menuItem.icon\" />\n }\n <span class=\"tx-table__menu-label\">{{ menuItem.label }}</span>\n </ng-template>\n</tx-tiered-menu>\n\n<ng-template #cellContent let-item let-column=\"column\">\n @if (templatesByField().get(column.field); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: dataOf(item.row), row: dataOf(item.row), node: item.row, index: item.index, column, value: cellValue(item.row, column) }\"\n />\n } @else {\n {{ displayValue(item.row, column) }}\n }\n</ng-template>\n\n<ng-template #pager let-position>\n <tx-paginator\n class=\"tx-table__paginator\"\n [class.tx-table__paginator--top]=\"position === 'top'\"\n [class]=\"passThrough().paginator?.class\"\n [style]=\"passThrough().paginator?.style\"\n [first]=\"first()\"\n [rows]=\"rows()\"\n [totalRecords]=\"total()\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [showTotal]=\"showTotal()\"\n [showCurrentPageReport]=\"showCurrentPageReport()\"\n [currentPageReportTemplate]=\"currentPageReportTemplate()\"\n [showFirstLastIcon]=\"showFirstLastIcon()\"\n [showPageLinks]=\"showPageLinks()\"\n [showJumpToPageDropdown]=\"showJumpToPageDropdown()\"\n [showJumpToPageInput]=\"showJumpToPageInput()\"\n [alwaysShow]=\"alwaysShowPaginator()\"\n [pageLinkSize]=\"pageLinks()\"\n [unstyled]=\"isUnstyled()\"\n (pageChange)=\"onPage($event)\"\n />\n</ng-template>\n\n<ng-template #rowCells let-item let-position=\"position\">\n @for (column of renderColumns(); track column.column.field) {\n @if (!isGroupedCellHidden(item, column)) {\n <td\n class=\"tx-table__td\"\n [class]=\"[column.column.cellClass ?? '', passThrough().cell?.class ?? '']\"\n [style]=\"passThrough().cell?.style\"\n [style.inset-inline-start]=\"frozenStyle(column)['insetInlineStart']\"\n [style.inset-inline-end]=\"frozenStyle(column)['insetInlineEnd']\"\n [class.tx-table__cell--frozen]=\"!!column.frozen\"\n [class.tx-table__cell--frozen-last]=\"column.lastFrozenStart\"\n [class.tx-table__cell--frozen-first-end]=\"column.firstFrozenEnd\"\n [class.tx-table__td--actions]=\"column.kind === 'actions'\"\n [class.tx-table__td--editable]=\"column.kind === 'data' && editMode() === 'cell' && !!column.column.editable\"\n [class.tx-table__td--editing]=\"column.kind === 'data' && isEditing(item, column.column)\"\n [attr.data-field]=\"column.column.field\"\n [attr.data-align]=\"column.column.align ?? null\"\n [attr.rowspan]=\"groupRowspan(item, column)\"\n [attr.tabindex]=\"column.kind === 'data' && editMode() === 'cell' && column.column.editable ? 0 : null\"\n (click)=\"onCellClick(item, column, $event)\"\n (keydown)=\"onCellKeydown(item, column, $event)\"\n (focusout)=\"onCellFocusOut(item, column, $event)\"\n >\n @if (animatedRows()) {\n <div class=\"tx-table__cell-body\">\n <div class=\"tx-table__cell-inner\">\n <ng-container [ngTemplateOutlet]=\"cellBody\" [ngTemplateOutletContext]=\"{ $implicit: item, column, position }\" />\n </div>\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"cellBody\" [ngTemplateOutletContext]=\"{ $implicit: item, column, position }\" />\n }\n </td>\n }\n }\n</ng-template>\n\n<ng-template #cellBody let-item let-column=\"column\" let-position=\"position\">\n @switch (column.kind) {\n @case ('reorder') {\n <button\n type=\"button\"\n cdkDragHandle\n class=\"tx-table__row-handle\"\n [attr.aria-label]=\"translations().moveRow\"\n (keydown.alt.arrowup)=\"moveRowBy(position, -1, $event)\"\n (keydown.alt.arrowdown)=\"moveRowBy(position, 1, $event)\"\n >\n <tx-icon aria-hidden=\"true\" name=\"bars\" />\n </button>\n }\n @case ('select') {\n @if (selectionMode() === 'checkbox') {\n <tx-checkbox\n binary\n class=\"tx-table__select\"\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"item.selected\"\n (ngModelChange)=\"toggleRow(item)\"\n />\n } @else {\n <tx-radio-button\n class=\"tx-table__select\"\n [value]=\"item.key\"\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"radioValue()\"\n (ngModelChange)=\"selectRadio(item)\"\n />\n }\n }\n @case ('expand') {\n @if (canExpand(item)) {\n <button\n type=\"button\"\n class=\"tx-table__row-toggle\"\n [attr.aria-expanded]=\"item.expanded\"\n [attr.aria-label]=\"item.expanded ? translations().collapseRow : translations().expandRow\"\n (click)=\"toggleExpansion(item, $event)\"\n >\n <tx-icon aria-hidden=\"true\" name=\"chevron-right\" class=\"tx-table__row-toggle-icon\" [class.tx-table__row-toggle-icon--open]=\"item.expanded\" />\n </button>\n }\n }\n @case ('actions') {\n @if (actionsTemplate(); as actions) {\n <ng-container [ngTemplateOutlet]=\"actions.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: dataOf(item.row), node: item.row, index: item.index }\" />\n }\n }\n @case ('editor') {\n <div class=\"tx-table__row-editor\">\n @if (isRowEditing(item)) {\n <button\n txButton\n type=\"button\"\n text\n rounded\n size=\"small\"\n severity=\"success\"\n icon=\"check\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"translations().saveRow\"\n (click)=\"saveRow(item)\"\n ></button>\n <button\n txButton\n type=\"button\"\n text\n rounded\n size=\"small\"\n severity=\"danger\"\n icon=\"times\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"translations().cancelEdit\"\n (click)=\"cancelRow(item)\"\n ></button>\n } @else {\n <button\n txButton\n type=\"button\"\n text\n rounded\n size=\"small\"\n severity=\"secondary\"\n icon=\"pencil\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"translations().editRow\"\n (click)=\"startRowEdit(item)\"\n ></button>\n }\n </div>\n }\n @default {\n @if (item.tree && column.column.field === treeField()) {\n <div class=\"tx-table__tree-cell\" [style.--tx-table-tree-level]=\"item.tree.level - 1\">\n <button\n type=\"button\"\n class=\"tx-table__row-toggle tx-table__tree-toggle\"\n [class.tx-table__tree-toggle--hidden]=\"item.tree.leaf\"\n [attr.tabindex]=\"item.tree.leaf ? -1 : null\"\n [attr.aria-hidden]=\"item.tree.leaf || null\"\n [attr.aria-expanded]=\"item.tree.leaf ? null : item.tree.expanded\"\n [attr.aria-label]=\"item.tree.expanded ? translations().collapseRow : translations().expandRow\"\n [class]=\"passThrough().treeToggle?.class\"\n [style]=\"passThrough().treeToggle?.style\"\n (click)=\"toggleNode(item, $event)\"\n >\n @if (item.tree.loading) {\n <tx-icon aria-hidden=\"true\" name=\"spinner\" class=\"tx-table__tree-toggle-icon--loading\" />\n } @else {\n <tx-icon aria-hidden=\"true\" name=\"chevron-right\" class=\"tx-table__row-toggle-icon\" [class.tx-table__row-toggle-icon--open]=\"item.tree.expanded\" />\n }\n </button>\n @if (treeCheckbox()) {\n <tx-checkbox\n binary\n class=\"tx-table__tree-checkbox\"\n [ariaLabel]=\"translations().selectRow\"\n [disabled]=\"!item.selectable\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"item.selected\"\n [indeterminate]=\"item.tree.partial\"\n (ngModelChange)=\"toggleRow(item)\"\n />\n }\n <div class=\"tx-table__tree-content\">\n <ng-container [ngTemplateOutlet]=\"dataCell\" [ngTemplateOutletContext]=\"{ $implicit: item, column }\" />\n </div>\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"dataCell\" [ngTemplateOutletContext]=\"{ $implicit: item, column }\" />\n }\n }\n }\n</ng-template>\n\n<ng-template #dataCell let-item let-column=\"column\">\n @if (isEditing(item, column.column)) {\n <div class=\"tx-table__editor\">\n @if (editorTemplatesByField().get(column.column.field); as editor) {\n <ng-container [ngTemplateOutlet]=\"editor.templateRef\" [ngTemplateOutletContext]=\"editorContext(item, column.column)\" />\n } @else if (column.column.editOptions?.length) {\n <tx-select\n size=\"small\"\n optionLabel=\"label\"\n optionValue=\"value\"\n class=\"tx-table__editor-control\"\n [options]=\"column.column.editOptions\"\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"draftValue(item, column.column)\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n } @else {\n @switch (column.column.editType ?? 'text') {\n @case ('numeric') {\n <tx-input-number\n size=\"small\"\n class=\"tx-table__editor-control\"\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"draftValue(item, column.column)\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n }\n @case ('boolean') {\n <tx-checkbox\n binary\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"draftValue(item, column.column)\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n }\n @case ('date') {\n <input\n txInput\n type=\"date\"\n size=\"small\"\n class=\"tx-table__editor-control\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"label(column.column)\"\n [value]=\"dateInput(draftValue(item, column.column))\"\n (change)=\"setDraft(item, column.column, parseDateInput($any($event.target).value))\"\n />\n }\n @default {\n <input\n txInput\n type=\"text\"\n size=\"small\"\n class=\"tx-table__editor-control\"\n [unstyled]=\"isUnstyled()\"\n [attr.aria-label]=\"label(column.column)\"\n [value]=\"draftValue(item, column.column) ?? ''\"\n (input)=\"setDraft(item, column.column, $any($event.target).value)\"\n />\n }\n }\n }\n </div>\n } @else if (templatesByField().get(column.column.field); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template.templateRef\"\n [ngTemplateOutletContext]=\"{\n $implicit: dataOf(item.row),\n row: dataOf(item.row),\n node: item.row,\n index: item.index,\n column: column.column,\n value: cellValue(item.row, column.column),\n }\"\n />\n } @else if (isLoadingRow(item)) {\n <tx-skeleton class=\"tx-table__loading-cell\" height=\"14px\" />\n } @else if (cellTooltip()) {\n <span class=\"tx-table__cell-text\" tooltipOverflowOnly [txTooltip]=\"displayValue(item.row, column.column)\">{{ displayValue(item.row, column.column) }}</span>\n } @else {\n {{ displayValue(item.row, column.column) }}\n }\n</ng-template>\n",
4908
+ styles: [":host{display:block;min-width:0}.tx-table__toolbar{display:flex;align-items:center;justify-content:space-between}.tx-table__toolbar-slot{flex:1;min-width:0}.tx-table__frame{position:relative}.tx-table__scroller{position:relative;overflow:auto}.tx-table__scroller--empty{overflow:hidden}.tx-table__table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0}.tx-table__thead{position:sticky;inset-block-start:0;z-index:2}.tx-table__th,.tx-table__td,.tx-table__footer-cell{box-sizing:border-box;overflow:hidden;text-align:start;vertical-align:middle}.tx-table__th{position:relative;white-space:nowrap;text-overflow:ellipsis}.tx-table__td{white-space:nowrap;text-overflow:ellipsis;font-variant-numeric:tabular-nums}[data-align=center]{text-align:center}[data-align=end]{text-align:end}.tx-table__cell--frozen{position:sticky;z-index:1}.tx-table__sort{display:inline-flex;align-items:center;max-width:100%;margin:0;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:inherit;cursor:pointer}.tx-table__header-content{display:flex;align-items:center;min-width:0}.tx-table__header-content>.tx-table__sort,.tx-table__header-content>.tx-table__column-title{min-width:0}.tx-table__filter{flex-shrink:0;margin-inline-start:auto}.tx-table__filter-cell{overflow:visible}.tx-table__column-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-table__sort-icon{flex-shrink:0}.tx-table__sort-icon--desc{transform:rotate(180deg)}.tx-table__sort-badge{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.tx-table__resizer{position:absolute;inset-block:0;inset-inline-end:-5px;z-index:3;display:flex;align-items:center;justify-content:center;cursor:col-resize;touch-action:none}.tx-table__resizer:before{content:\"\";position:absolute;inset-block:0;inset-inline-start:-2px;width:14px}.tx-table__resizer-line{height:100%}.tx-table__th--draggable{cursor:grab}.tx-table__th--draggable:active{cursor:grabbing}.tx-table__row--selectable{cursor:pointer}.tx-table__row-toggle{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;margin:0;padding:0;border:0;background:transparent;cursor:pointer}.tx-table__row-toggle-icon:dir(rtl){transform:scaleX(-1)}.tx-table__row-toggle-icon--open,.tx-table__row-toggle-icon--open:dir(rtl){transform:rotate(90deg)}.tx-table__expansion-body{display:grid;grid-template-rows:0fr}.tx-table__expansion-body--open{grid-template-rows:1fr}.tx-table__expansion-inner{min-height:0;overflow:hidden}.tx-table__expansion-body:not(.tx-table__expansion-body--open)>.tx-table__expansion-inner{visibility:hidden}.tx-table__grip{position:absolute;inset-block-start:50%;inset-inline-start:1px;opacity:0;transform:translateY(-50%);pointer-events:none}.tx-table__th--draggable:hover .tx-table__grip,.tx-table__th--draggable:focus-within .tx-table__grip{opacity:1}.tx-table__select{display:inline-flex;vertical-align:middle}.tx-table__editor{display:flex;align-items:center;min-width:0}.tx-table__editor-control{flex:1;width:100%;min-width:0}.tx-table__row-editor{display:flex;align-items:center;justify-content:center}.tx-table__td--editable{cursor:text}.tx-table__td--editing{overflow:visible;text-overflow:clip}.tx-table__cell-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-table__spacer>td{padding:0;border:0}.tx-table__cell-body{display:grid;grid-template-rows:1fr}.tx-table__cell-inner{min-height:0;overflow:hidden;text-overflow:ellipsis}.tx-table__row--collapsed .tx-table__cell-body{grid-template-rows:0fr}.tx-table__row--collapsed .tx-table__cell-inner{visibility:hidden}.tx-table__frozen-tbody{position:sticky;z-index:2}.tx-table__row-handle{display:inline-flex;align-items:center;justify-content:center;margin:0;padding:0;border:0;background:transparent;color:inherit;cursor:grab;touch-action:none}.tx-table__tbody.cdk-drop-list-dragging .tx-table__row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.tx-table__row.cdk-drag-preview{display:table-row}.tx-table__group-content{display:flex;align-items:center}.tx-table__loading{position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center}.tx-table__sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.tx-table__cards{display:grid}.tx-table__card{position:relative;display:flex;flex-direction:column;min-width:0}.tx-table__card-field,.tx-table__card-title{display:flex;align-items:center;min-width:0;overflow-wrap:break-word}.tx-table__card-field{text-align:end}.tx-table__card-label{flex-shrink:0;max-width:45%;margin-inline-end:auto;text-align:start}.tx-table__card-value{min-width:0}.tx-table__card-select{position:absolute;z-index:1}.tx-table__card-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;order:99;margin-top:auto}.tx-table--resizing{cursor:col-resize;-webkit-user-select:none;user-select:none}.tx-table--resizing *{cursor:col-resize}.tx-table__tree-cell{display:flex;align-items:center;min-width:0}.tx-table__tree-content{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-table__tree-toggle{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;margin:0;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.tx-table__tree-toggle--hidden{visibility:hidden}.tx-table__tree-select-all{margin-inline-end:var(--tx-tree-table-node-gap)}:host([data-styled]){color:var(--tx-table-color);font-size:var(--tx-table-font-size);line-height:var(--tx-table-line-height)}:host([data-styled]) .tx-table__toolbar{gap:var(--tx-table-toolbar-gap);margin-bottom:var(--tx-table-toolbar-margin-bottom)}:host([data-styled]) .tx-table__scroller{padding-bottom:var(--tx-table-scroller-padding-bottom);scrollbar-color:var(--tx-table-scroller-scrollbar-thumb) transparent}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar{width:var(--tx-table-scroller-scrollbar-size);height:var(--tx-table-scroller-scrollbar-size)}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-track,:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-corner{background:transparent}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:999px;background-color:var(--tx-table-scroller-scrollbar-thumb);background-clip:padding-box}:host([data-styled]) .tx-table__scroller::-webkit-scrollbar-thumb:hover{background-color:var(--tx-table-scroller-scrollbar-thumb-hover)}:host([data-styled]) .tx-table__scroller--empty{padding-bottom:0}:host([data-styled]) .tx-table__thead{background:var(--tx-table-header-cell-background)}:host([data-styled]) .tx-table__th{padding:var(--tx-table-header-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-header-cell-background);color:var(--tx-table-header-cell-color);font-size:var(--tx-table-header-cell-font-size);font-weight:var(--tx-table-header-cell-font-weight);transition:background var(--tx-table-transition-duration),color var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__header-content{gap:var(--tx-table-header-cell-gap)}:host([data-styled]) .tx-table__filter{margin-block:calc(var(--tx-table-filter-button-inset) * -1)}:host([data-styled]) .tx-table__filter-cell{padding:var(--tx-table-filter-cell-padding);font-weight:var(--tx-font-weight-regular)}:host([data-styled]) .tx-table__sort{gap:var(--tx-table-header-cell-gap);border-radius:var(--tx-radius-xs)}:host([data-styled]) .tx-table__sort:focus-visible{outline:var(--tx-table-header-cell-focus-ring-width) var(--tx-table-header-cell-focus-ring-style) var(--tx-table-header-cell-focus-ring-color);outline-offset:var(--tx-table-header-cell-focus-ring-offset);box-shadow:var(--tx-table-header-cell-focus-ring-shadow)}:host([data-styled]) .tx-table__sort-icon{--tx-icon-size: var(--tx-table-sort-icon-size);color:var(--tx-table-sort-icon-color);transition:transform .3s ease}:host([data-styled]) .tx-table__sort-badge{min-width:var(--tx-table-sort-icon-badge-size);height:var(--tx-table-sort-icon-badge-size);border-radius:999px;background:var(--tx-table-sort-icon-badge-background);color:var(--tx-table-sort-icon-badge-color);font-size:var(--tx-table-sort-icon-badge-font-size)}:host([data-styled]) .tx-table__resizer{width:var(--tx-table-column-resizer-width)}:host([data-styled]) .tx-table__resizer-line{width:var(--tx-table-column-resizer-line-width);background-color:transparent;transition:background-color var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__resizer:hover .tx-table__resizer-line,:host([data-styled]) .tx-table__resizer--active .tx-table__resizer-line,:host([data-styled]) .tx-table__resizer:focus-visible .tx-table__resizer-line{background-color:var(--tx-table-column-resizer-color)}:host([data-styled]) .tx-table__resizer:focus-visible{outline:none}:host([data-styled]) .tx-table__header-row.cdk-drop-list-dragging{background:var(--tx-table-drop-point-background)}:host([data-styled]) .tx-table__header-row.cdk-drop-list-dragging .tx-table__th:hover{background:var(--tx-table-drop-point-hover-background)}:host([data-styled]) .tx-table__th.cdk-drag-placeholder{opacity:.6}:host([data-styled]) .tx-table__row{background:var(--tx-table-row-background);color:var(--tx-table-row-color);outline-color:transparent;transition:background var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__td{height:var(--tx-table-body-cell-height);padding:var(--tx-table-body-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px}:host([data-styled]) .tx-table__expansion-cell{padding:0;border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-row-background)}:host([data-styled]) .tx-table__expansion-content{padding:var(--tx-table-body-cell-padding)}:host([data-styled]) .tx-table__expansion-body{transition:grid-template-rows var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__expansion-body:not(.tx-table__expansion-body--open)>.tx-table__expansion-inner{transition:visibility 0s linear var(--tx-table-expansion-duration)}@starting-style{:host([data-styled]) .tx-table__expansion-body--open{grid-template-rows:0fr}}:host([data-styled]) .tx-table__row-toggle-icon{transition:transform var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__row--collapsed>.tx-table__td{height:0;padding-block:0;border-bottom-width:0}:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row{transition:visibility 0s linear}:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row--collapsed{visibility:collapse;transition-delay:var(--tx-table-expansion-duration)}:host([data-styled]) .tx-table__cell-body{transition:grid-template-rows var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__cell-inner{transition:visibility 0s linear}:host([data-styled]) .tx-table__row--collapsed .tx-table__cell-inner{transition-delay:var(--tx-table-expansion-duration)}:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row>.tx-table__td{transition:height var(--tx-table-expansion-duration) var(--tx-table-expansion-easing),padding-block var(--tx-table-expansion-duration) var(--tx-table-expansion-easing),border-bottom-width var(--tx-table-expansion-duration) var(--tx-table-expansion-easing)}:host([data-styled]) .tx-table__grip{--tx-icon-size: var(--tx-table-grip-size);color:var(--tx-table-grip-color);transition:opacity var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__footer-cell{padding:var(--tx-table-footer-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-footer-cell-background);color:var(--tx-table-footer-cell-color);font-weight:var(--tx-table-footer-cell-font-weight)}:host([data-styled]) .tx-table__cell--frozen{background:var(--tx-table-row-background);box-shadow:var(--tx-table-frozen-column-shadow)}:host([data-styled]) .tx-table__th.tx-table__cell--frozen{background:var(--tx-table-header-cell-background)}:host([data-styled]) .tx-table__cell--frozen-last{border-inline-end:1px solid var(--tx-table-border-color)}:host([data-styled]) .tx-table__cell--frozen-first-end{border-inline-start:1px solid var(--tx-table-border-color)}:host([data-styled]) .tx-table__row .tx-table__cell--frozen{background:inherit}:host([data-styled]) .tx-table__row--selected{background:var(--tx-table-row-selected-background);color:var(--tx-table-row-selected-color)}:host([data-styled]) .tx-table__row--selected>.tx-table__td{border-block-end-color:var(--tx-table-body-cell-selected-border-color)}:host([data-styled]) .tx-table__row--menu>.tx-table__td{background:var(--tx-table-row-menu-background)}:host([data-styled]) .tx-table__row:focus-visible{outline:var(--tx-table-row-focus-ring-width) var(--tx-table-row-focus-ring-style) var(--tx-table-row-focus-ring-color);outline-offset:var(--tx-table-row-focus-ring-offset);box-shadow:var(--tx-table-row-focus-ring-shadow)}:host([data-styled]) .tx-table__row-handle{width:var(--tx-table-row-toggle-button-size);height:var(--tx-table-row-toggle-button-size);border-radius:var(--tx-radius-xs);color:var(--tx-table-grip-color)}:host([data-styled]) .tx-table__row-handle:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-table__row.cdk-drag-preview{box-shadow:var(--tx-table-drag-preview-shadow);background:var(--tx-table-row-background)}:host([data-styled]) .tx-table__row.cdk-drag-placeholder{opacity:.4}:host([data-styled]) .tx-table__group-cell{padding:var(--tx-table-body-cell-padding);border-color:var(--tx-table-border-color);border-style:solid;border-width:0 0 1px;background:var(--tx-table-group-background);font-weight:var(--tx-table-group-font-weight)}:host([data-styled]) .tx-table__group-content{gap:var(--tx-table-header-cell-gap)}:host([data-styled]) .tx-table__group-count{color:var(--tx-text-muted);font-weight:var(--tx-font-weight-regular)}:host([data-styled]) .tx-table__frozen-tbody .tx-table__td{background:var(--tx-table-row-background)}:host([data-styled]) .tx-table__td--editable:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:-2px}:host([data-styled]) .tx-table__td--editing{padding-block:var(--tx-table-editor-padding-block)}:host([data-styled]) .tx-table__row-editor{gap:var(--tx-table-actions-gap)}:host([data-styled]) .tx-table__row-toggle{width:var(--tx-table-row-toggle-button-size);height:var(--tx-table-row-toggle-button-size);border-radius:var(--tx-table-row-toggle-button-border-radius);color:var(--tx-table-row-toggle-button-color);transition:background var(--tx-table-transition-duration),color var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__row-toggle:hover{background:var(--tx-table-row-toggle-button-hover-background);color:var(--tx-table-row-toggle-button-hover-color)}:host([data-styled]) .tx-table__row-toggle:focus-visible{outline:var(--tx-table-row-toggle-button-focus-ring-width) var(--tx-table-row-toggle-button-focus-ring-style) var(--tx-table-row-toggle-button-focus-ring-color);outline-offset:var(--tx-table-row-toggle-button-focus-ring-offset);box-shadow:var(--tx-table-row-toggle-button-focus-ring-shadow)}:host([data-styled]) .tx-table__tree-cell{gap:var(--tx-tree-table-node-gap);padding-inline-start:calc(var(--tx-table-tree-level, 0) * var(--tx-tree-table-node-indent))}:host([data-styled]) .tx-table__tree-toggle-icon--loading{animation:tx-table-tree-spin .8s linear infinite}:host([data-styled]) .tx-table__loading{background:var(--tx-table-loading-background);-webkit-backdrop-filter:blur(var(--tx-table-loading-blur));backdrop-filter:blur(var(--tx-table-loading-blur))}:host([data-styled]) .tx-table__empty{padding:var(--tx-table-empty-padding);border:1px solid var(--tx-table-border-color);border-top:0;color:var(--tx-table-empty-color)}:host([data-styled]) .tx-table__paginator{margin-top:var(--tx-table-paginator-margin-top)}:host([data-styled]) .tx-table__paginator--top{margin-top:0;margin-bottom:var(--tx-table-paginator-margin-top)}:host([data-styled]) .tx-table__select-all{margin-bottom:var(--tx-table-toolbar-margin-bottom)}:host([data-styled]) .tx-table__cards{grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--tx-table-card-min-width)),1fr));gap:var(--tx-table-card-gap)}:host([data-styled]) .tx-table__card{border-radius:var(--tx-table-card-border-radius);background:var(--tx-table-card-background);box-shadow:inset 0 0 0 1px var(--tx-table-card-border-color)}:host([data-styled]) .tx-table__card--selected{box-shadow:inset 0 0 0 1px var(--tx-table-row-focus-ring-color)}:host([data-styled]) .tx-table__card-field{gap:var(--tx-table-card-field-gap);padding:var(--tx-table-card-field-padding);border-bottom:1px solid var(--tx-table-card-border-color);font-size:var(--tx-table-card-field-font-size)}:host([data-styled]) .tx-table__card-field:last-child{border-bottom:0}:host([data-styled]) .tx-table__card-label{color:var(--tx-table-card-label-color);font-size:var(--tx-table-card-label-font-size)}:host([data-styled]) .tx-table__card-title{padding:var(--tx-table-card-title-padding);border-bottom:1px solid var(--tx-table-card-border-color);font-size:var(--tx-table-card-title-font-size);font-weight:var(--tx-table-card-title-font-weight)}:host([data-styled]) .tx-table__card-title--select{padding-inline-end:calc(var(--tx-table-card-select-inset) * 4)}:host([data-styled]) .tx-table__card-select{inset-block-start:var(--tx-table-card-select-inset);inset-inline-end:var(--tx-table-card-select-inset)}:host([data-styled]) .tx-table__card-actions{gap:var(--tx-table-actions-gap);padding:var(--tx-table-card-actions-padding)}:host([data-styled].tx-table--gridlines) .tx-table__th{border-width:1px 0 1px 1px}:host([data-styled].tx-table--gridlines) .tx-table__th:last-child{border-width:1px}:host([data-styled].tx-table--gridlines) .tx-table__thead>tr:not(:first-child)>.tx-table__th{border-top-width:0}:host([data-styled].tx-table--gridlines) .tx-table__td,:host([data-styled].tx-table--gridlines) .tx-table__footer-cell{border-width:0 0 1px 1px}:host([data-styled].tx-table--gridlines) .tx-table__td:last-child,:host([data-styled].tx-table--gridlines) .tx-table__footer-cell:last-child{border-width:0 1px 1px}:host([data-styled].tx-table--gridlines) .tx-table__expansion-cell,:host([data-styled].tx-table--gridlines) .tx-table__group-cell{border-width:0 1px 1px}:host([data-styled].tx-table--striped) .tx-table__row--odd:not(.tx-table__row--selected){background:var(--tx-table-row-striped-background)}:host([data-styled].tx-table--hoverable) .tx-table__row:not(.tx-table__row--selected):hover{background:var(--tx-table-row-hover-background)}:host([data-styled][data-size=small]) .tx-table__th{padding:var(--tx-table-header-cell-sm-padding)}:host([data-styled][data-size=small]) .tx-table__td{height:var(--tx-table-body-cell-sm-height);padding:var(--tx-table-body-cell-sm-padding)}:host([data-styled][data-size=large]) .tx-table__th{padding:var(--tx-table-header-cell-lg-padding)}:host([data-styled][data-size=large]) .tx-table__td{height:var(--tx-table-body-cell-lg-height);padding:var(--tx-table-body-cell-lg-padding)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-table__th,:host([data-styled]) .tx-table__row,:host([data-styled]) .tx-table__sort-icon,:host([data-styled]) .tx-table__resizer-line,:host([data-styled]) .tx-table__row-toggle,:host([data-styled]) .tx-table__row-toggle-icon,:host([data-styled]) .tx-table__grip,:host([data-styled]) .tx-table__expansion-body,:host([data-styled]) .tx-table__cell-body,:host([data-styled]) .tx-table__cell-inner,:host([data-styled]) .tx-table__tbody:has(.tx-table__cell-body)>.tx-table__row>.tx-table__td,:host([data-styled]) .tx-table__expansion-inner{transition:none}}@keyframes tx-table-tree-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-table__tree-toggle-icon--loading{animation-duration:2.4s}}\n"]
4869
4909
  }]
4870
4910
  }],
4871
4911
  ctorParameters: () => [],
@@ -5992,6 +6032,6 @@ i0.ɵɵngDeclareClassMetadata({
5992
6032
  }]
5993
6033
  }
5994
6034
  });
5995
- export { TX_TABLE, TX_TABLE_ACTIONS_FIELD, TX_TABLE_EDITOR_FIELD, TX_TABLE_EXPAND_FIELD, TX_TABLE_REORDER_FIELD, TX_TABLE_SELECT_FIELD, TxTable, TxTableAction, TxTableActions, TxTableActionsStore, TxTableActionsTemplate, TxTableCard, TxTableCell, TxTableEditor, TxTableEmpty, TxTableExpansion, TxTableFooterCell, TxTableGroupFooter, TxTableGroupHeader, TxTableHeaderCell, actionIdOf, columnLabel, compareValues, mergeColumnOrder, nextSortOrder, pxOf, resolveField, rowKeyOf, sortRows, writeField };
6035
+ export { TX_FILTER_MATCH_MODES, TX_TABLE, TX_TABLE_ACTIONS_FIELD, TX_TABLE_EDITOR_FIELD, TX_TABLE_EXPAND_FIELD, TX_TABLE_REORDER_FIELD, TX_TABLE_SELECT_FIELD, TxTable, TxTableAction, TxTableActions, TxTableActionsStore, TxTableActionsTemplate, TxTableCard, TxTableCell, TxTableColumnFilter, TxTableEditor, TxTableEmpty, TxTableExpansion, TxTableFooterCell, TxTableGroupFooter, TxTableGroupHeader, TxTableHeaderCell, TxTableSettings, actionIdOf, columnLabel, compareValues, defaultMatchMode, filterRows, isFilled, isFilterActive, matchesFilter, matchesRule, mergeColumnOrder, nextSortOrder, pxOf, resolveField, rowKeyOf, sortRows, writeField };
5996
6036
 
5997
6037
  //# sourceMappingURL=tectra-ng-ui-table.mjs.map