@tectra-ng/ui 0.1.0 → 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.
- package/country/README.md +14 -4
- package/data-view/README.md +71 -0
- package/fesm2022/tectra-ng-ui-autocomplete.mjs +2 -2
- package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-cascade-select.mjs +2 -2
- package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-chip.mjs +2 -2
- package/fesm2022/tectra-ng-ui-chip.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-chips-input.mjs +2 -2
- package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-color-picker.mjs +2 -2
- package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-country.mjs +47 -6
- package/fesm2022/tectra-ng-ui-country.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-data-view.mjs +1370 -0
- package/fesm2022/tectra-ng-ui-data-view.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-fieldset.mjs +2 -2
- package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input-number.mjs +2 -2
- package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input.mjs +2 -2
- package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-listbox.mjs +2 -2
- package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-menu.mjs +2 -2
- package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-message.mjs +2 -2
- package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-multiselect.mjs +2 -2
- package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-paginator.mjs +2 -2
- package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-select.mjs +4 -4
- package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-slider.mjs +2 -2
- package/fesm2022/tectra-ng-ui-slider.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-table.mjs +1373 -1333
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tag.mjs +2 -2
- package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-toggle-switch.mjs +2 -2
- package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-select.mjs +7 -46
- package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-table.mjs +901 -0
- package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-tree.mjs +1940 -0
- package/fesm2022/tectra-ng-ui-tree.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-virtual-scroller.mjs +928 -0
- package/fesm2022/tectra-ng-ui-virtual-scroller.mjs.map +1 -0
- package/package.json +17 -1
- package/tree/README.md +93 -0
- package/tree-table/README.md +84 -0
- package/types/tectra-ng-ui-autocomplete.d.ts +11 -0
- package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -1
- package/types/tectra-ng-ui-chip.d.ts +3 -0
- package/types/tectra-ng-ui-chip.d.ts.map +1 -1
- package/types/tectra-ng-ui-country-select.d.ts +11 -0
- package/types/tectra-ng-ui-country-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-country.d.ts +9 -3
- package/types/tectra-ng-ui-country.d.ts.map +1 -1
- package/types/tectra-ng-ui-data-view.d.ts +363 -0
- package/types/tectra-ng-ui-data-view.d.ts.map +1 -0
- package/types/tectra-ng-ui-fieldset.d.ts +8 -0
- package/types/tectra-ng-ui-fieldset.d.ts.map +1 -1
- package/types/tectra-ng-ui-input-number.d.ts +1 -0
- package/types/tectra-ng-ui-input-number.d.ts.map +1 -1
- package/types/tectra-ng-ui-input.d.ts +4 -0
- package/types/tectra-ng-ui-input.d.ts.map +1 -1
- package/types/tectra-ng-ui-menu.d.ts +2 -0
- package/types/tectra-ng-ui-menu.d.ts.map +1 -1
- package/types/tectra-ng-ui-message.d.ts +5 -0
- package/types/tectra-ng-ui-message.d.ts.map +1 -1
- package/types/tectra-ng-ui-multiselect.d.ts +11 -0
- package/types/tectra-ng-ui-multiselect.d.ts.map +1 -1
- package/types/tectra-ng-ui-paginator.d.ts +1 -0
- package/types/tectra-ng-ui-paginator.d.ts.map +1 -1
- package/types/tectra-ng-ui-select.d.ts +11 -0
- package/types/tectra-ng-ui-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-slider.d.ts +1 -0
- package/types/tectra-ng-ui-slider.d.ts.map +1 -1
- package/types/tectra-ng-ui-table.d.ts +181 -15
- package/types/tectra-ng-ui-table.d.ts.map +1 -1
- package/types/tectra-ng-ui-tag.d.ts +8 -0
- package/types/tectra-ng-ui-tag.d.ts.map +1 -1
- package/types/tectra-ng-ui-toggle-switch.d.ts +5 -0
- package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -1
- package/types/tectra-ng-ui-tree-select.d.ts +19 -22
- package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-tree-table.d.ts +94 -0
- package/types/tectra-ng-ui-tree-table.d.ts.map +1 -0
- package/types/tectra-ng-ui-tree.d.ts +571 -0
- package/types/tectra-ng-ui-tree.d.ts.map +1 -0
- package/types/tectra-ng-ui-virtual-scroller.d.ts +297 -0
- package/types/tectra-ng-ui-virtual-scroller.d.ts.map +1 -0
- package/virtual-scroller/README.md +60 -0
|
@@ -0,0 +1,901 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, afterNextRender, booleanAttribute, computed, effect, input, linkedSignal, model, output, signal, untracked } from "@angular/core";
|
|
3
|
+
import { injectPassThrough } from "@tectra-ng/core/config";
|
|
4
|
+
import { CdkDrag, CdkDragHandle, CdkDropList } from "@angular/cdk/drag-drop";
|
|
5
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
6
|
+
import * as i1 from "@angular/forms";
|
|
7
|
+
import { FormsModule } from "@angular/forms";
|
|
8
|
+
import { TxIcon } from "@tectra-ng/icons";
|
|
9
|
+
import { TxButton } from "@tectra-ng/ui/button";
|
|
10
|
+
import { TxCheckbox } from "@tectra-ng/ui/checkbox";
|
|
11
|
+
import { TxInput } from "@tectra-ng/ui/input";
|
|
12
|
+
import { TxInputNumber } from "@tectra-ng/ui/input-number";
|
|
13
|
+
import { TxMenu, TxMenuItemTemplate } from "@tectra-ng/ui/menu";
|
|
14
|
+
import { TxPaginator } from "@tectra-ng/ui/paginator";
|
|
15
|
+
import { TxProgressSpinner } from "@tectra-ng/ui/progress-spinner";
|
|
16
|
+
import { TxRadioButton } from "@tectra-ng/ui/radio-button";
|
|
17
|
+
import { TxSelect } from "@tectra-ng/ui/select";
|
|
18
|
+
import { TxSkeleton } from "@tectra-ng/ui/skeleton";
|
|
19
|
+
import { TX_TABLE, TxTable, TxTableActionsStore, TxTableColumnFilter, TxTableSettings, filterRows, resolveField, sortRows } from "@tectra-ng/ui/table";
|
|
20
|
+
import { TxTooltip } from "@tectra-ng/ui/tooltip";
|
|
21
|
+
const COLLAPSE_DURATION = 400;
|
|
22
|
+
function flattenTreeTable(nodes) {
|
|
23
|
+
const result = [];
|
|
24
|
+
const walk = (items) => items.forEach((node) => {
|
|
25
|
+
result.push(node);
|
|
26
|
+
walk(node.children ?? []);
|
|
27
|
+
});
|
|
28
|
+
walk(nodes);
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
function filterTreeTable(nodes, matches, mode = "lenient") {
|
|
32
|
+
const visit = (node) => {
|
|
33
|
+
const own = matches(node);
|
|
34
|
+
const children = node.children ?? [];
|
|
35
|
+
if (own && (mode === "lenient" || !children.length)) return node;
|
|
36
|
+
const kept = children.map(visit).filter((child) => child !== null);
|
|
37
|
+
if (kept.length) return {
|
|
38
|
+
...node,
|
|
39
|
+
children: kept
|
|
40
|
+
};
|
|
41
|
+
return own ? {
|
|
42
|
+
...node,
|
|
43
|
+
children: []
|
|
44
|
+
} : null;
|
|
45
|
+
};
|
|
46
|
+
return nodes.map(visit).filter((node) => node !== null);
|
|
47
|
+
}
|
|
48
|
+
var TxTreeTable = class TxTreeTable extends TxTable {
|
|
49
|
+
isTree = true;
|
|
50
|
+
responsive = input(false, {
|
|
51
|
+
...ngDevMode ? { debugName: "responsive" } : /* istanbul ignore next */ {},
|
|
52
|
+
transform: booleanAttribute
|
|
53
|
+
});
|
|
54
|
+
expandedKeys = model([], ...ngDevMode ? [{ debugName: "expandedKeys" }] : /* istanbul ignore next */ []);
|
|
55
|
+
filterMode = input("lenient", ...ngDevMode ? [{ debugName: "filterMode" }] : /* istanbul ignore next */ []);
|
|
56
|
+
propagateSelectionUp = input(true, {
|
|
57
|
+
...ngDevMode ? { debugName: "propagateSelectionUp" } : /* istanbul ignore next */ {},
|
|
58
|
+
transform: booleanAttribute
|
|
59
|
+
});
|
|
60
|
+
propagateSelectionDown = input(true, {
|
|
61
|
+
...ngDevMode ? { debugName: "propagateSelectionDown" } : /* istanbul ignore next */ {},
|
|
62
|
+
transform: booleanAttribute
|
|
63
|
+
});
|
|
64
|
+
nodeExpand = output();
|
|
65
|
+
nodeCollapse = output();
|
|
66
|
+
passThrough = injectPassThrough("treeTable", this, this.pt, this.ptOptions);
|
|
67
|
+
seenKeys = /* @__PURE__ */ new Set();
|
|
68
|
+
pendingKeys = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "pendingKeys" }] : /* istanbul ignore next */ []);
|
|
69
|
+
mountedKeys = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "mountedKeys" }] : /* istanbul ignore next */ []);
|
|
70
|
+
allNodes = computed(() => flattenTreeTable(this.value() ?? []), ...ngDevMode ? [{ debugName: "allNodes" }] : /* istanbul ignore next */ []);
|
|
71
|
+
selectedIds = computed(() => {
|
|
72
|
+
const selection = this.selection();
|
|
73
|
+
if (!selection) return /* @__PURE__ */ new Set();
|
|
74
|
+
return new Set((Array.isArray(selection) ? selection : [selection]).map((node) => this.identityOf(node)));
|
|
75
|
+
}, ...ngDevMode ? [{ debugName: "selectedIds" }] : /* istanbul ignore next */ []);
|
|
76
|
+
matchedData = computed(() => {
|
|
77
|
+
if (this.lazy()) return null;
|
|
78
|
+
const data = this.allNodes().map((node) => node.data);
|
|
79
|
+
const fields = this.globalFilterFields() ?? this.visibleColumns().map((column) => column.filterField ?? column.field);
|
|
80
|
+
const matched = filterRows(data, this.filters(), this.columns(), this.globalFilter(), fields, this.localeService.locale().intl);
|
|
81
|
+
return matched.length === data.length ? null : new Set(matched);
|
|
82
|
+
}, ...ngDevMode ? [{ debugName: "matchedData" }] : /* istanbul ignore next */ []);
|
|
83
|
+
filteredRows = computed(() => {
|
|
84
|
+
const roots = [...this.allRows()];
|
|
85
|
+
const matched = this.matchedData();
|
|
86
|
+
return matched ? filterTreeTable(roots, (node) => matched.has(node.data), this.filterMode()) : roots;
|
|
87
|
+
}, ...ngDevMode ? [{ debugName: "filteredRows" }] : /* istanbul ignore next */ []);
|
|
88
|
+
filterOpen = linkedSignal(() => {
|
|
89
|
+
if (!this.matchedData()) return /* @__PURE__ */ new Set();
|
|
90
|
+
return new Set(flattenTreeTable(this.filteredRows()).filter((node) => node.children?.length).map((node) => this.identityOf(node)));
|
|
91
|
+
}, ...ngDevMode ? [{ debugName: "filterOpen" }] : /* istanbul ignore next */ []);
|
|
92
|
+
expandedSet = computed(() => this.matchedData() ? this.filterOpen() : new Set(this.expandedKeys()), ...ngDevMode ? [{ debugName: "expandedSet" }] : /* istanbul ignore next */ []);
|
|
93
|
+
sortedRows = computed(() => {
|
|
94
|
+
const roots = this.filteredRows();
|
|
95
|
+
const meta = this.sortMeta();
|
|
96
|
+
if (this.lazy() || this.customSort() || !meta.length) return [...roots];
|
|
97
|
+
const dataMeta = meta.map((item) => ({
|
|
98
|
+
...item,
|
|
99
|
+
field: `data.${item.field}`
|
|
100
|
+
}));
|
|
101
|
+
const intl = this.localeService.locale().intl;
|
|
102
|
+
const sort = (nodes) => sortRows(nodes, dataMeta, intl).map((node) => node.children?.length ? {
|
|
103
|
+
...node,
|
|
104
|
+
children: sort(node.children)
|
|
105
|
+
} : node);
|
|
106
|
+
return sort(roots);
|
|
107
|
+
}, ...ngDevMode ? [{ debugName: "sortedRows" }] : /* istanbul ignore next */ []);
|
|
108
|
+
renderRows = computed(() => {
|
|
109
|
+
this.editVersion();
|
|
110
|
+
const expanded = this.expandedSet();
|
|
111
|
+
const mounted = this.animatedRows() ? this.mountedKeys() : /* @__PURE__ */ new Set();
|
|
112
|
+
const pending = this.pendingKeys();
|
|
113
|
+
const selected = this.selectedIds();
|
|
114
|
+
const partialOn = this.treeCheckbox() && this.propagateSelectionUp();
|
|
115
|
+
const rowSelectable = this.rowSelectable();
|
|
116
|
+
const offset = this.paginator() && !this.lazy() && this.totalRecords() === void 0 ? this.first() : 0;
|
|
117
|
+
const rows = [];
|
|
118
|
+
const walk = (nodes, level, parentKey, hidden) => nodes.forEach((node, position) => {
|
|
119
|
+
const key = this.identityOf(node);
|
|
120
|
+
const leaf = node.leaf === false ? false : !node.children?.length;
|
|
121
|
+
const open = !leaf && expanded.has(key);
|
|
122
|
+
const index = offset + rows.length;
|
|
123
|
+
const isSelected = selected.has(key);
|
|
124
|
+
rows.push({
|
|
125
|
+
row: node,
|
|
126
|
+
index,
|
|
127
|
+
key,
|
|
128
|
+
selected: isSelected,
|
|
129
|
+
selectable: node.selectable !== false && (!rowSelectable || rowSelectable(node, index)),
|
|
130
|
+
expanded: false,
|
|
131
|
+
group: null,
|
|
132
|
+
tree: {
|
|
133
|
+
level,
|
|
134
|
+
leaf,
|
|
135
|
+
expanded: open,
|
|
136
|
+
hidden,
|
|
137
|
+
loading: !!node.loading || pending.has(key) && node.children === void 0,
|
|
138
|
+
partial: partialOn && !isSelected && this.hasSelectedDescendant(node, selected),
|
|
139
|
+
setSize: nodes.length,
|
|
140
|
+
posInSet: position + 1,
|
|
141
|
+
parentKey
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
if ((open || mounted.has(key)) && node.children?.length) walk(node.children, level + 1, key, hidden || !open);
|
|
145
|
+
});
|
|
146
|
+
walk(this.pageRows(), 1, null, false);
|
|
147
|
+
return rows;
|
|
148
|
+
}, ...ngDevMode ? [{ debugName: "renderRows" }] : /* istanbul ignore next */ []);
|
|
149
|
+
allSelected = computed(() => {
|
|
150
|
+
const own = this.selectAll();
|
|
151
|
+
if (own !== void 0) return own;
|
|
152
|
+
const nodes = this.allNodes().filter((node) => node.selectable !== false);
|
|
153
|
+
const selected = this.selectedIds();
|
|
154
|
+
return nodes.length > 0 && nodes.every((node) => selected.has(this.identityOf(node)));
|
|
155
|
+
}, ...ngDevMode ? [{ debugName: "allSelected" }] : /* istanbul ignore next */ []);
|
|
156
|
+
someSelected = computed(() => {
|
|
157
|
+
if (this.allSelected()) return false;
|
|
158
|
+
const selected = this.selectedIds();
|
|
159
|
+
return this.allNodes().some((node) => selected.has(this.identityOf(node)));
|
|
160
|
+
}, ...ngDevMode ? [{ debugName: "someSelected" }] : /* istanbul ignore next */ []);
|
|
161
|
+
treeRowKey = (item, position, event) => {
|
|
162
|
+
const tree = item.tree;
|
|
163
|
+
if (!tree) return false;
|
|
164
|
+
const rows = this.renderRows();
|
|
165
|
+
const shown = rows.map((row, index) => row.tree?.hidden ? -1 : index).filter((index) => index >= 0);
|
|
166
|
+
const at = shown.indexOf(position);
|
|
167
|
+
const step = {
|
|
168
|
+
ArrowDown: shown[at + 1],
|
|
169
|
+
ArrowUp: shown[at - 1],
|
|
170
|
+
Home: shown[0],
|
|
171
|
+
End: shown[shown.length - 1]
|
|
172
|
+
};
|
|
173
|
+
if (event.key in step) {
|
|
174
|
+
event.preventDefault();
|
|
175
|
+
const target = step[event.key];
|
|
176
|
+
if (target !== void 0) this.focusRowAt(target);
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
if (event.key === "ArrowRight") {
|
|
180
|
+
event.preventDefault();
|
|
181
|
+
if (!tree.leaf && !tree.expanded) this.expandNode(item, event);
|
|
182
|
+
else if (tree.expanded && shown[at + 1] !== void 0) this.focusRowAt(shown[at + 1]);
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
if (event.key === "ArrowLeft") {
|
|
186
|
+
event.preventDefault();
|
|
187
|
+
if (tree.expanded) this.collapseNode(item, event);
|
|
188
|
+
else if (tree.parentKey !== null) {
|
|
189
|
+
const parent = rows.findIndex((row) => row.key === tree.parentKey);
|
|
190
|
+
if (parent >= 0) this.focusRowAt(parent);
|
|
191
|
+
}
|
|
192
|
+
return true;
|
|
193
|
+
}
|
|
194
|
+
return false;
|
|
195
|
+
};
|
|
196
|
+
constructor() {
|
|
197
|
+
super();
|
|
198
|
+
effect(() => {
|
|
199
|
+
const fresh = [];
|
|
200
|
+
this.allNodes().forEach((node) => {
|
|
201
|
+
const key = this.identityOf(node);
|
|
202
|
+
if (this.seenKeys.has(key)) return;
|
|
203
|
+
this.seenKeys.add(key);
|
|
204
|
+
if (node.expanded) fresh.push(key);
|
|
205
|
+
});
|
|
206
|
+
if (fresh.length) untracked(() => this.expandedKeys.update((keys) => [...keys, ...fresh.filter((key) => !keys.includes(key))]));
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
dataOf(row) {
|
|
210
|
+
return row?.data;
|
|
211
|
+
}
|
|
212
|
+
identityOf(row) {
|
|
213
|
+
if (row?.key !== void 0) return row.key;
|
|
214
|
+
const dataKey = this.dataKey();
|
|
215
|
+
return dataKey ? resolveField(row?.data, dataKey) : row?.data;
|
|
216
|
+
}
|
|
217
|
+
rowsFocusable() {
|
|
218
|
+
return true;
|
|
219
|
+
}
|
|
220
|
+
toggleNode(item, event) {
|
|
221
|
+
event.stopPropagation();
|
|
222
|
+
if (!item.tree || item.tree.leaf) return;
|
|
223
|
+
if (item.tree.expanded) this.collapseNode(item, event);
|
|
224
|
+
else this.expandNode(item, event);
|
|
225
|
+
}
|
|
226
|
+
expandNode(item, event) {
|
|
227
|
+
if (!item.tree || item.tree.leaf || item.tree.expanded) return;
|
|
228
|
+
this.setOpen(item.key, true);
|
|
229
|
+
if (item.row.leaf === false && item.row.children === void 0) this.pendingKeys.update((keys) => /* @__PURE__ */ new Set([...keys, item.key]));
|
|
230
|
+
this.nodeExpand.emit({
|
|
231
|
+
node: item.row,
|
|
232
|
+
originalEvent: event
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
collapseNode(item, event) {
|
|
236
|
+
if (!item.tree?.expanded) return;
|
|
237
|
+
this.setOpen(item.key, false);
|
|
238
|
+
this.nodeCollapse.emit({
|
|
239
|
+
node: item.row,
|
|
240
|
+
originalEvent: event
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
expandAll() {
|
|
244
|
+
this.expandedKeys.set(this.allNodes().filter((node) => node.children?.length).map((node) => this.identityOf(node)));
|
|
245
|
+
}
|
|
246
|
+
collapseAll() {
|
|
247
|
+
this.expandedKeys.set([]);
|
|
248
|
+
}
|
|
249
|
+
toggleRow(item, event) {
|
|
250
|
+
if (!this.treeCheckbox()) {
|
|
251
|
+
super.toggleRow(item, event);
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
if (!item.selectable) return;
|
|
255
|
+
const ids = new Set(this.selectedIds());
|
|
256
|
+
const check = !item.selected;
|
|
257
|
+
(this.propagateSelectionDown() ? flattenTreeTable([item.row]).filter((node) => node.selectable !== false) : [item.row]).forEach((node) => check ? ids.add(this.identityOf(node)) : ids.delete(this.identityOf(node)));
|
|
258
|
+
if (this.propagateSelectionUp()) this.settle(this.value() ?? [], ids);
|
|
259
|
+
this.selection.set(this.allNodes().filter((node) => ids.has(this.identityOf(node))));
|
|
260
|
+
(check ? this.rowSelect : this.rowUnselect).emit({
|
|
261
|
+
row: item.row,
|
|
262
|
+
index: item.index,
|
|
263
|
+
originalEvent: event
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
toggleAll(checked) {
|
|
267
|
+
this.selectAllChange.emit(checked);
|
|
268
|
+
if (this.selectAll() !== void 0) return;
|
|
269
|
+
this.selection.set(checked ? this.allNodes().filter((node) => node.selectable !== false) : []);
|
|
270
|
+
}
|
|
271
|
+
exportRows() {
|
|
272
|
+
return flattenTreeTable(this.sortedRows());
|
|
273
|
+
}
|
|
274
|
+
setOpen(key, open) {
|
|
275
|
+
if (!this.animatedRows()) {
|
|
276
|
+
this.writeOpen(key, open);
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
if (open) {
|
|
280
|
+
if (this.mountedKeys().has(key)) {
|
|
281
|
+
this.writeOpen(key, true);
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
this.mountedKeys.update((keys) => /* @__PURE__ */ new Set([...keys, key]));
|
|
285
|
+
afterNextRender(() => {
|
|
286
|
+
this.host.nativeElement.getBoundingClientRect();
|
|
287
|
+
this.writeOpen(key, true);
|
|
288
|
+
}, { injector: this.injector });
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
this.mountedKeys.update((keys) => /* @__PURE__ */ new Set([...keys, key]));
|
|
292
|
+
this.writeOpen(key, false);
|
|
293
|
+
setTimeout(() => {
|
|
294
|
+
if (this.expandedSet().has(key)) return;
|
|
295
|
+
this.mountedKeys.update((keys) => new Set([...keys].filter((other) => other !== key)));
|
|
296
|
+
}, COLLAPSE_DURATION);
|
|
297
|
+
}
|
|
298
|
+
writeOpen(key, open) {
|
|
299
|
+
if (this.matchedData()) {
|
|
300
|
+
this.filterOpen.update((keys) => new Set(open ? [...keys, key] : [...keys].filter((other) => other !== key)));
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
this.expandedKeys.update((keys) => open ? [...keys, key] : keys.filter((other) => other !== key));
|
|
304
|
+
}
|
|
305
|
+
settle(nodes, ids) {
|
|
306
|
+
const visit = (node) => {
|
|
307
|
+
const children = (node.children ?? []).filter((child) => child.selectable !== false);
|
|
308
|
+
const key = this.identityOf(node);
|
|
309
|
+
if (!children.length) return ids.has(key);
|
|
310
|
+
const all = children.map(visit).every(Boolean);
|
|
311
|
+
if (all) ids.add(key);
|
|
312
|
+
else ids.delete(key);
|
|
313
|
+
return all;
|
|
314
|
+
};
|
|
315
|
+
nodes.forEach(visit);
|
|
316
|
+
}
|
|
317
|
+
hasSelectedDescendant(node, selected) {
|
|
318
|
+
return (node.children ?? []).some((child) => selected.has(this.identityOf(child)) || this.hasSelectedDescendant(child, selected));
|
|
319
|
+
}
|
|
320
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
321
|
+
minVersion: "12.0.0",
|
|
322
|
+
version: "22.2.3",
|
|
323
|
+
ngImport: i0,
|
|
324
|
+
type: TxTreeTable,
|
|
325
|
+
deps: [],
|
|
326
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
327
|
+
});
|
|
328
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
329
|
+
minVersion: "17.0.0",
|
|
330
|
+
version: "22.2.3",
|
|
331
|
+
type: TxTreeTable,
|
|
332
|
+
isStandalone: true,
|
|
333
|
+
selector: "tx-tree-table",
|
|
334
|
+
inputs: {
|
|
335
|
+
responsive: {
|
|
336
|
+
classPropertyName: "responsive",
|
|
337
|
+
publicName: "responsive",
|
|
338
|
+
isSignal: true,
|
|
339
|
+
isRequired: false,
|
|
340
|
+
transformFunction: null
|
|
341
|
+
},
|
|
342
|
+
expandedKeys: {
|
|
343
|
+
classPropertyName: "expandedKeys",
|
|
344
|
+
publicName: "expandedKeys",
|
|
345
|
+
isSignal: true,
|
|
346
|
+
isRequired: false,
|
|
347
|
+
transformFunction: null
|
|
348
|
+
},
|
|
349
|
+
filterMode: {
|
|
350
|
+
classPropertyName: "filterMode",
|
|
351
|
+
publicName: "filterMode",
|
|
352
|
+
isSignal: true,
|
|
353
|
+
isRequired: false,
|
|
354
|
+
transformFunction: null
|
|
355
|
+
},
|
|
356
|
+
propagateSelectionUp: {
|
|
357
|
+
classPropertyName: "propagateSelectionUp",
|
|
358
|
+
publicName: "propagateSelectionUp",
|
|
359
|
+
isSignal: true,
|
|
360
|
+
isRequired: false,
|
|
361
|
+
transformFunction: null
|
|
362
|
+
},
|
|
363
|
+
propagateSelectionDown: {
|
|
364
|
+
classPropertyName: "propagateSelectionDown",
|
|
365
|
+
publicName: "propagateSelectionDown",
|
|
366
|
+
isSignal: true,
|
|
367
|
+
isRequired: false,
|
|
368
|
+
transformFunction: null
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
outputs: {
|
|
372
|
+
expandedKeys: "expandedKeysChange",
|
|
373
|
+
nodeExpand: "nodeExpand",
|
|
374
|
+
nodeCollapse: "nodeCollapse"
|
|
375
|
+
},
|
|
376
|
+
host: { classAttribute: "tx-tree-table" },
|
|
377
|
+
providers: [TxTableActionsStore, {
|
|
378
|
+
provide: TX_TABLE,
|
|
379
|
+
useExisting: TxTreeTable
|
|
380
|
+
}],
|
|
381
|
+
usesInheritance: true,
|
|
382
|
+
ngImport: i0,
|
|
383
|
+
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",
|
|
384
|
+
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"],
|
|
385
|
+
dependencies: [
|
|
386
|
+
{
|
|
387
|
+
kind: "directive",
|
|
388
|
+
type: NgTemplateOutlet,
|
|
389
|
+
selector: "[ngTemplateOutlet]",
|
|
390
|
+
inputs: [
|
|
391
|
+
"ngTemplateOutletContext",
|
|
392
|
+
"ngTemplateOutlet",
|
|
393
|
+
"ngTemplateOutletInjector"
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
kind: "ngmodule",
|
|
398
|
+
type: FormsModule
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
kind: "directive",
|
|
402
|
+
type: i1.NgControlStatus,
|
|
403
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
kind: "directive",
|
|
407
|
+
type: i1.NgModel,
|
|
408
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
409
|
+
inputs: [
|
|
410
|
+
"name",
|
|
411
|
+
"disabled",
|
|
412
|
+
"ngModel",
|
|
413
|
+
"ngModelOptions"
|
|
414
|
+
],
|
|
415
|
+
outputs: ["ngModelChange"],
|
|
416
|
+
exportAs: ["ngModel"]
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
kind: "directive",
|
|
420
|
+
type: CdkDropList,
|
|
421
|
+
selector: "[cdkDropList], cdk-drop-list",
|
|
422
|
+
inputs: [
|
|
423
|
+
"cdkDropListConnectedTo",
|
|
424
|
+
"cdkDropListData",
|
|
425
|
+
"cdkDropListOrientation",
|
|
426
|
+
"id",
|
|
427
|
+
"cdkDropListLockAxis",
|
|
428
|
+
"cdkDropListDisabled",
|
|
429
|
+
"cdkDropListSortingDisabled",
|
|
430
|
+
"cdkDropListEnterPredicate",
|
|
431
|
+
"cdkDropListSortPredicate",
|
|
432
|
+
"cdkDropListAutoScrollDisabled",
|
|
433
|
+
"cdkDropListAutoScrollStep",
|
|
434
|
+
"cdkDropListElementContainer",
|
|
435
|
+
"cdkDropListHasAnchor"
|
|
436
|
+
],
|
|
437
|
+
outputs: [
|
|
438
|
+
"cdkDropListDropped",
|
|
439
|
+
"cdkDropListEntered",
|
|
440
|
+
"cdkDropListExited",
|
|
441
|
+
"cdkDropListSorted"
|
|
442
|
+
],
|
|
443
|
+
exportAs: ["cdkDropList"]
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
kind: "directive",
|
|
447
|
+
type: CdkDrag,
|
|
448
|
+
selector: "[cdkDrag]",
|
|
449
|
+
inputs: [
|
|
450
|
+
"cdkDragData",
|
|
451
|
+
"cdkDragLockAxis",
|
|
452
|
+
"cdkDragRootElement",
|
|
453
|
+
"cdkDragBoundary",
|
|
454
|
+
"cdkDragStartDelay",
|
|
455
|
+
"cdkDragFreeDragPosition",
|
|
456
|
+
"cdkDragDisabled",
|
|
457
|
+
"cdkDragConstrainPosition",
|
|
458
|
+
"cdkDragPreviewClass",
|
|
459
|
+
"cdkDragPreviewContainer",
|
|
460
|
+
"cdkDragScale"
|
|
461
|
+
],
|
|
462
|
+
outputs: [
|
|
463
|
+
"cdkDragStarted",
|
|
464
|
+
"cdkDragReleased",
|
|
465
|
+
"cdkDragEnded",
|
|
466
|
+
"cdkDragEntered",
|
|
467
|
+
"cdkDragExited",
|
|
468
|
+
"cdkDragDropped",
|
|
469
|
+
"cdkDragMoved"
|
|
470
|
+
],
|
|
471
|
+
exportAs: ["cdkDrag"]
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
kind: "directive",
|
|
475
|
+
type: CdkDragHandle,
|
|
476
|
+
selector: "[cdkDragHandle]",
|
|
477
|
+
inputs: ["cdkDragHandleDisabled"]
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
kind: "component",
|
|
481
|
+
type: TxIcon,
|
|
482
|
+
selector: "tx-icon",
|
|
483
|
+
inputs: ["name"]
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
kind: "directive",
|
|
487
|
+
type: TxTooltip,
|
|
488
|
+
selector: "[txTooltip]",
|
|
489
|
+
inputs: [
|
|
490
|
+
"txTooltip",
|
|
491
|
+
"tooltipPlacement",
|
|
492
|
+
"tooltipEvent",
|
|
493
|
+
"tooltipShowDelay",
|
|
494
|
+
"tooltipHideDelay",
|
|
495
|
+
"tooltipLife",
|
|
496
|
+
"tooltipOffset",
|
|
497
|
+
"tooltipArrow",
|
|
498
|
+
"tooltipInteractive",
|
|
499
|
+
"tooltipDisabled",
|
|
500
|
+
"tooltipOverflowOnly",
|
|
501
|
+
"tooltipMultiline",
|
|
502
|
+
"tooltipContext",
|
|
503
|
+
"tooltipClass",
|
|
504
|
+
"tooltipDt",
|
|
505
|
+
"tooltipPt",
|
|
506
|
+
"tooltipPtOptions",
|
|
507
|
+
"tooltipUnstyled"
|
|
508
|
+
],
|
|
509
|
+
outputs: ["tooltipShown", "tooltipHidden"],
|
|
510
|
+
exportAs: ["txTooltip"]
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
kind: "component",
|
|
514
|
+
type: TxSkeleton,
|
|
515
|
+
selector: "tx-skeleton",
|
|
516
|
+
inputs: [
|
|
517
|
+
"shape",
|
|
518
|
+
"size",
|
|
519
|
+
"width",
|
|
520
|
+
"height",
|
|
521
|
+
"borderRadius",
|
|
522
|
+
"lines",
|
|
523
|
+
"animation",
|
|
524
|
+
"dt",
|
|
525
|
+
"pt",
|
|
526
|
+
"ptOptions",
|
|
527
|
+
"unstyled"
|
|
528
|
+
]
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
kind: "component",
|
|
532
|
+
type: TxButton,
|
|
533
|
+
selector: "button[txButton], a[txButton]",
|
|
534
|
+
inputs: [
|
|
535
|
+
"label",
|
|
536
|
+
"severity",
|
|
537
|
+
"size",
|
|
538
|
+
"variant",
|
|
539
|
+
"outlined",
|
|
540
|
+
"text",
|
|
541
|
+
"link",
|
|
542
|
+
"rounded",
|
|
543
|
+
"raised",
|
|
544
|
+
"plain",
|
|
545
|
+
"fluid",
|
|
546
|
+
"disabled",
|
|
547
|
+
"tabindex",
|
|
548
|
+
"icon",
|
|
549
|
+
"iconPos",
|
|
550
|
+
"iconOnly",
|
|
551
|
+
"loading",
|
|
552
|
+
"loadingIcon",
|
|
553
|
+
"badge",
|
|
554
|
+
"badgeSeverity",
|
|
555
|
+
"dt",
|
|
556
|
+
"pt",
|
|
557
|
+
"ptOptions",
|
|
558
|
+
"unstyled"
|
|
559
|
+
]
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
kind: "component",
|
|
563
|
+
type: TxCheckbox,
|
|
564
|
+
selector: "tx-checkbox",
|
|
565
|
+
inputs: [
|
|
566
|
+
"label",
|
|
567
|
+
"description",
|
|
568
|
+
"value",
|
|
569
|
+
"binary",
|
|
570
|
+
"trueValue",
|
|
571
|
+
"falseValue",
|
|
572
|
+
"indeterminate",
|
|
573
|
+
"icon",
|
|
574
|
+
"indeterminateIcon",
|
|
575
|
+
"size",
|
|
576
|
+
"variant",
|
|
577
|
+
"tile",
|
|
578
|
+
"invalid",
|
|
579
|
+
"disabled",
|
|
580
|
+
"readonly",
|
|
581
|
+
"required",
|
|
582
|
+
"name",
|
|
583
|
+
"inputId",
|
|
584
|
+
"ariaLabel",
|
|
585
|
+
"ariaLabelledBy",
|
|
586
|
+
"tabindex",
|
|
587
|
+
"dt",
|
|
588
|
+
"pt",
|
|
589
|
+
"ptOptions",
|
|
590
|
+
"unstyled"
|
|
591
|
+
],
|
|
592
|
+
outputs: ["indeterminateChange", "changed"]
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
kind: "directive",
|
|
596
|
+
type: TxInput,
|
|
597
|
+
selector: "input[txInput], textarea[txInput]",
|
|
598
|
+
inputs: [
|
|
599
|
+
"invalid",
|
|
600
|
+
"size",
|
|
601
|
+
"variant",
|
|
602
|
+
"fluid",
|
|
603
|
+
"dt",
|
|
604
|
+
"pt",
|
|
605
|
+
"ptOptions",
|
|
606
|
+
"unstyled"
|
|
607
|
+
]
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
kind: "component",
|
|
611
|
+
type: TxInputNumber,
|
|
612
|
+
selector: "tx-input-number",
|
|
613
|
+
inputs: [
|
|
614
|
+
"mode",
|
|
615
|
+
"currency",
|
|
616
|
+
"currencyDisplay",
|
|
617
|
+
"locale",
|
|
618
|
+
"useGrouping",
|
|
619
|
+
"minFractionDigits",
|
|
620
|
+
"maxFractionDigits",
|
|
621
|
+
"prefix",
|
|
622
|
+
"suffix",
|
|
623
|
+
"min",
|
|
624
|
+
"max",
|
|
625
|
+
"step",
|
|
626
|
+
"showButtons",
|
|
627
|
+
"buttonLayout",
|
|
628
|
+
"incrementIcon",
|
|
629
|
+
"decrementIcon",
|
|
630
|
+
"allowEmpty",
|
|
631
|
+
"showClear",
|
|
632
|
+
"placeholder",
|
|
633
|
+
"size",
|
|
634
|
+
"variant",
|
|
635
|
+
"fluid",
|
|
636
|
+
"invalid",
|
|
637
|
+
"disabled",
|
|
638
|
+
"readonly",
|
|
639
|
+
"required",
|
|
640
|
+
"name",
|
|
641
|
+
"inputId",
|
|
642
|
+
"ariaLabel",
|
|
643
|
+
"ariaLabelledBy",
|
|
644
|
+
"tabindex",
|
|
645
|
+
"dt",
|
|
646
|
+
"pt",
|
|
647
|
+
"ptOptions",
|
|
648
|
+
"unstyled"
|
|
649
|
+
],
|
|
650
|
+
outputs: ["changed", "cleared"]
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
kind: "component",
|
|
654
|
+
type: TxSelect,
|
|
655
|
+
selector: "tx-select",
|
|
656
|
+
inputs: [
|
|
657
|
+
"options",
|
|
658
|
+
"editable",
|
|
659
|
+
"checkmark",
|
|
660
|
+
"dropdownIcon",
|
|
661
|
+
"dt",
|
|
662
|
+
"pt",
|
|
663
|
+
"ptOptions",
|
|
664
|
+
"unstyled"
|
|
665
|
+
],
|
|
666
|
+
outputs: ["changed"]
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
kind: "component",
|
|
670
|
+
type: TxRadioButton,
|
|
671
|
+
selector: "tx-radio-button",
|
|
672
|
+
inputs: [
|
|
673
|
+
"value",
|
|
674
|
+
"label",
|
|
675
|
+
"description",
|
|
676
|
+
"size",
|
|
677
|
+
"variant",
|
|
678
|
+
"tile",
|
|
679
|
+
"invalid",
|
|
680
|
+
"disabled",
|
|
681
|
+
"readonly",
|
|
682
|
+
"required",
|
|
683
|
+
"name",
|
|
684
|
+
"inputId",
|
|
685
|
+
"ariaLabel",
|
|
686
|
+
"ariaLabelledBy",
|
|
687
|
+
"tabindex",
|
|
688
|
+
"dt",
|
|
689
|
+
"pt",
|
|
690
|
+
"ptOptions",
|
|
691
|
+
"unstyled"
|
|
692
|
+
],
|
|
693
|
+
outputs: ["changed"]
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
kind: "component",
|
|
697
|
+
type: TxPaginator,
|
|
698
|
+
selector: "tx-paginator",
|
|
699
|
+
inputs: [
|
|
700
|
+
"first",
|
|
701
|
+
"rows",
|
|
702
|
+
"totalRecords",
|
|
703
|
+
"pageLinkSize",
|
|
704
|
+
"compactPageLinkSize",
|
|
705
|
+
"compactBreakpoint",
|
|
706
|
+
"rowsPerPageOptions",
|
|
707
|
+
"alwaysShow",
|
|
708
|
+
"showFirstLastIcon",
|
|
709
|
+
"showPageLinks",
|
|
710
|
+
"showCurrentPageReport",
|
|
711
|
+
"currentPageReportTemplate",
|
|
712
|
+
"showJumpToPageDropdown",
|
|
713
|
+
"showJumpToPageInput",
|
|
714
|
+
"showTotal",
|
|
715
|
+
"disabled",
|
|
716
|
+
"locale",
|
|
717
|
+
"dropdownScrollHeight",
|
|
718
|
+
"firstPageIcon",
|
|
719
|
+
"previousPageIcon",
|
|
720
|
+
"nextPageIcon",
|
|
721
|
+
"lastPageIcon",
|
|
722
|
+
"ariaLabel",
|
|
723
|
+
"dt",
|
|
724
|
+
"pt",
|
|
725
|
+
"ptOptions",
|
|
726
|
+
"unstyled"
|
|
727
|
+
],
|
|
728
|
+
outputs: [
|
|
729
|
+
"firstChange",
|
|
730
|
+
"rowsChange",
|
|
731
|
+
"pageChange"
|
|
732
|
+
]
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
kind: "component",
|
|
736
|
+
type: TxProgressSpinner,
|
|
737
|
+
selector: "tx-progress-spinner",
|
|
738
|
+
inputs: [
|
|
739
|
+
"size",
|
|
740
|
+
"strokeWidth",
|
|
741
|
+
"fill",
|
|
742
|
+
"animationDuration",
|
|
743
|
+
"color",
|
|
744
|
+
"ariaLabel",
|
|
745
|
+
"dt",
|
|
746
|
+
"pt",
|
|
747
|
+
"ptOptions",
|
|
748
|
+
"unstyled"
|
|
749
|
+
]
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
kind: "component",
|
|
753
|
+
type: TxMenu,
|
|
754
|
+
selector: "tx-menu, tx-tiered-menu",
|
|
755
|
+
inputs: [
|
|
756
|
+
"model",
|
|
757
|
+
"popup",
|
|
758
|
+
"tiered",
|
|
759
|
+
"placement",
|
|
760
|
+
"offset",
|
|
761
|
+
"variant",
|
|
762
|
+
"ariaLabel",
|
|
763
|
+
"ariaLabelledBy",
|
|
764
|
+
"dt",
|
|
765
|
+
"pt",
|
|
766
|
+
"ptOptions",
|
|
767
|
+
"unstyled"
|
|
768
|
+
],
|
|
769
|
+
outputs: [
|
|
770
|
+
"itemSelected",
|
|
771
|
+
"opened",
|
|
772
|
+
"closed"
|
|
773
|
+
]
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
kind: "directive",
|
|
777
|
+
type: TxMenuItemTemplate,
|
|
778
|
+
selector: "ng-template[txMenuItem]"
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
kind: "component",
|
|
782
|
+
type: TxTableSettings,
|
|
783
|
+
selector: "tx-table-settings",
|
|
784
|
+
inputs: [
|
|
785
|
+
"columns",
|
|
786
|
+
"hidden",
|
|
787
|
+
"showColumns",
|
|
788
|
+
"showActions",
|
|
789
|
+
"unstyled"
|
|
790
|
+
],
|
|
791
|
+
outputs: ["columnToggled"]
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
kind: "component",
|
|
795
|
+
type: TxTableColumnFilter,
|
|
796
|
+
selector: "tx-table-column-filter",
|
|
797
|
+
inputs: ["column", "display"]
|
|
798
|
+
}
|
|
799
|
+
],
|
|
800
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
801
|
+
});
|
|
802
|
+
};
|
|
803
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
804
|
+
minVersion: "12.0.0",
|
|
805
|
+
version: "22.2.3",
|
|
806
|
+
ngImport: i0,
|
|
807
|
+
type: TxTreeTable,
|
|
808
|
+
decorators: [{
|
|
809
|
+
type: Component,
|
|
810
|
+
args: [{
|
|
811
|
+
selector: "tx-tree-table",
|
|
812
|
+
imports: [
|
|
813
|
+
NgTemplateOutlet,
|
|
814
|
+
FormsModule,
|
|
815
|
+
CdkDropList,
|
|
816
|
+
CdkDrag,
|
|
817
|
+
CdkDragHandle,
|
|
818
|
+
TxIcon,
|
|
819
|
+
TxTooltip,
|
|
820
|
+
TxSkeleton,
|
|
821
|
+
TxButton,
|
|
822
|
+
TxCheckbox,
|
|
823
|
+
TxInput,
|
|
824
|
+
TxInputNumber,
|
|
825
|
+
TxSelect,
|
|
826
|
+
TxRadioButton,
|
|
827
|
+
TxPaginator,
|
|
828
|
+
TxProgressSpinner,
|
|
829
|
+
TxMenu,
|
|
830
|
+
TxMenuItemTemplate,
|
|
831
|
+
TxTableSettings,
|
|
832
|
+
TxTableColumnFilter
|
|
833
|
+
],
|
|
834
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
835
|
+
providers: [TxTableActionsStore, {
|
|
836
|
+
provide: TX_TABLE,
|
|
837
|
+
useExisting: TxTreeTable
|
|
838
|
+
}],
|
|
839
|
+
host: { class: "tx-tree-table" },
|
|
840
|
+
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",
|
|
841
|
+
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"]
|
|
842
|
+
}]
|
|
843
|
+
}],
|
|
844
|
+
ctorParameters: () => [],
|
|
845
|
+
propDecorators: {
|
|
846
|
+
responsive: [{
|
|
847
|
+
type: i0.Input,
|
|
848
|
+
args: [{
|
|
849
|
+
isSignal: true,
|
|
850
|
+
alias: "responsive",
|
|
851
|
+
required: false
|
|
852
|
+
}]
|
|
853
|
+
}],
|
|
854
|
+
expandedKeys: [{
|
|
855
|
+
type: i0.Input,
|
|
856
|
+
args: [{
|
|
857
|
+
isSignal: true,
|
|
858
|
+
alias: "expandedKeys",
|
|
859
|
+
required: false
|
|
860
|
+
}]
|
|
861
|
+
}, {
|
|
862
|
+
type: i0.Output,
|
|
863
|
+
args: ["expandedKeysChange"]
|
|
864
|
+
}],
|
|
865
|
+
filterMode: [{
|
|
866
|
+
type: i0.Input,
|
|
867
|
+
args: [{
|
|
868
|
+
isSignal: true,
|
|
869
|
+
alias: "filterMode",
|
|
870
|
+
required: false
|
|
871
|
+
}]
|
|
872
|
+
}],
|
|
873
|
+
propagateSelectionUp: [{
|
|
874
|
+
type: i0.Input,
|
|
875
|
+
args: [{
|
|
876
|
+
isSignal: true,
|
|
877
|
+
alias: "propagateSelectionUp",
|
|
878
|
+
required: false
|
|
879
|
+
}]
|
|
880
|
+
}],
|
|
881
|
+
propagateSelectionDown: [{
|
|
882
|
+
type: i0.Input,
|
|
883
|
+
args: [{
|
|
884
|
+
isSignal: true,
|
|
885
|
+
alias: "propagateSelectionDown",
|
|
886
|
+
required: false
|
|
887
|
+
}]
|
|
888
|
+
}],
|
|
889
|
+
nodeExpand: [{
|
|
890
|
+
type: i0.Output,
|
|
891
|
+
args: ["nodeExpand"]
|
|
892
|
+
}],
|
|
893
|
+
nodeCollapse: [{
|
|
894
|
+
type: i0.Output,
|
|
895
|
+
args: ["nodeCollapse"]
|
|
896
|
+
}]
|
|
897
|
+
}
|
|
898
|
+
});
|
|
899
|
+
export { TxTreeTable, filterTreeTable, flattenTreeTable };
|
|
900
|
+
|
|
901
|
+
//# sourceMappingURL=tectra-ng-ui-tree-table.mjs.map
|