@tectra-ng/ui 0.4.1 → 0.4.3
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/README.md +1 -1
- package/amount/README.md +2 -2
- package/analog-clock/README.md +3 -2
- package/autocomplete/README.md +1 -1
- package/avatar/README.md +1 -1
- package/breadcrumb/README.md +1 -1
- package/button-group/README.md +34 -2
- package/carousel/README.md +7 -0
- package/chips-input/README.md +10 -0
- package/color-swatches/README.md +53 -0
- package/data-view/README.md +11 -0
- package/fesm2022/tectra-ng-ui-amount.mjs +11 -9
- package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-analog-clock.mjs +12 -6
- package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-autocomplete.mjs +17 -6
- package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-avatar.mjs +11 -4
- package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-breadcrumb.mjs +5 -5
- package/fesm2022/tectra-ng-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-button-group.mjs +139 -6
- package/fesm2022/tectra-ng-ui-button-group.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-card.mjs +4 -2
- package/fesm2022/tectra-ng-ui-card.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-carousel.mjs +21 -2
- package/fesm2022/tectra-ng-ui-carousel.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-checkbox.mjs +7 -4
- package/fesm2022/tectra-ng-ui-checkbox.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-chips-input.mjs +41 -8
- 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-color-swatches.mjs +378 -0
- package/fesm2022/tectra-ng-ui-color-swatches.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-country-select.mjs +6 -4
- package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-data-view.mjs +61 -10
- package/fesm2022/tectra-ng-ui-data-view.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-datepicker.mjs +14 -2
- package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-dialog.mjs +7 -2
- package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-export.mjs +19 -20
- package/fesm2022/tectra-ng-ui-export.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-file-upload.mjs +44 -30
- package/fesm2022/tectra-ng-ui-file-upload.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-galleria.mjs +63 -6
- package/fesm2022/tectra-ng-ui-galleria.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-image.mjs +6 -2
- package/fesm2022/tectra-ng-ui-image.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input-otp.mjs +6 -2
- package/fesm2022/tectra-ng-ui-input-otp.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-knob.mjs +15 -4
- package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-list-input.mjs +2 -2
- package/fesm2022/tectra-ng-ui-list-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-menu.mjs +110 -10
- package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-message.mjs +62 -19
- package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-multiselect.mjs +14 -6
- package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-paginator.mjs +11 -22
- package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-panel-menu.mjs +32 -8
- package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-panel.mjs +4 -2
- package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-password.mjs +9 -0
- package/fesm2022/tectra-ng-ui-password.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-pill.mjs +3 -2
- package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-popover.mjs +16 -9
- package/fesm2022/tectra-ng-ui-popover.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-progress-bar.mjs +3 -0
- package/fesm2022/tectra-ng-ui-progress-bar.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-radio-button.mjs +28 -8
- package/fesm2022/tectra-ng-ui-radio-button.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-rating.mjs +6 -0
- package/fesm2022/tectra-ng-ui-rating.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-scroll-panel.mjs +4 -4
- package/fesm2022/tectra-ng-ui-scroll-panel.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-select-button.mjs +748 -0
- package/fesm2022/tectra-ng-ui-select-button.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-select.mjs +193 -10
- package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-speed-dial.mjs +91 -60
- package/fesm2022/tectra-ng-ui-speed-dial.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-split-button.mjs +22 -8
- package/fesm2022/tectra-ng-ui-split-button.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs +8 -5
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-stepper.mjs +72 -29
- package/fesm2022/tectra-ng-ui-stepper.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-table.mjs +323 -190
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tabs.mjs +10 -7
- package/fesm2022/tectra-ng-ui-tabs.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-timeline.mjs +87 -10
- package/fesm2022/tectra-ng-ui-timeline.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-toast.mjs +24 -7
- package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-toggle-button.mjs +2 -2
- package/fesm2022/tectra-ng-ui-toggle-button.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-toggle-switch.mjs +7 -4
- package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tooltip.mjs +5 -4
- package/fesm2022/tectra-ng-ui-tooltip.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-select.mjs +31 -9
- package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-table.mjs +7 -5
- package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree.mjs +47 -14
- package/fesm2022/tectra-ng-ui-tree.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-truncate-text.mjs +2 -2
- package/fesm2022/tectra-ng-ui-truncate-text.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-virtual-scroller.mjs +45 -4
- package/fesm2022/tectra-ng-ui-virtual-scroller.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui.mjs +1 -1
- package/field/README.md +2 -2
- package/file-upload/README.md +2 -1
- package/galleria/README.md +9 -0
- package/input-otp/README.md +1 -1
- package/knob/README.md +1 -1
- package/menu/README.md +10 -2
- package/message/README.md +6 -5
- package/multiselect/README.md +1 -1
- package/package.json +12 -4
- package/paginator/README.md +1 -1
- package/panel-menu/README.md +1 -1
- package/pill/README.md +1 -1
- package/popover/README.md +2 -2
- package/select/README.md +9 -0
- package/select-button/README.md +70 -0
- package/speed-dial/README.md +2 -1
- package/split-button/README.md +1 -1
- package/stat-tiles/README.md +3 -3
- package/stepper/README.md +3 -2
- package/table/README.md +23 -7
- package/tabs/README.md +2 -2
- package/timeline/README.md +10 -2
- package/tree/README.md +7 -0
- package/tree-select/README.md +2 -2
- package/tree-table/README.md +1 -1
- package/truncate-text/README.md +1 -1
- package/types/tectra-ng-ui-amount.d.ts +6 -3
- package/types/tectra-ng-ui-amount.d.ts.map +1 -1
- package/types/tectra-ng-ui-analog-clock.d.ts +9 -4
- package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -1
- package/types/tectra-ng-ui-autocomplete.d.ts +2 -1
- package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -1
- package/types/tectra-ng-ui-avatar.d.ts +4 -2
- package/types/tectra-ng-ui-avatar.d.ts.map +1 -1
- package/types/tectra-ng-ui-breadcrumb.d.ts +3 -3
- package/types/tectra-ng-ui-button-group.d.ts +58 -5
- package/types/tectra-ng-ui-button-group.d.ts.map +1 -1
- package/types/tectra-ng-ui-card.d.ts.map +1 -1
- package/types/tectra-ng-ui-carousel.d.ts +14 -5
- package/types/tectra-ng-ui-carousel.d.ts.map +1 -1
- package/types/tectra-ng-ui-checkbox.d.ts +1 -0
- package/types/tectra-ng-ui-checkbox.d.ts.map +1 -1
- package/types/tectra-ng-ui-chips-input.d.ts +15 -1
- package/types/tectra-ng-ui-chips-input.d.ts.map +1 -1
- package/types/tectra-ng-ui-color-swatches.d.ts +141 -0
- package/types/tectra-ng-ui-color-swatches.d.ts.map +1 -0
- package/types/tectra-ng-ui-data-view.d.ts +31 -12
- package/types/tectra-ng-ui-data-view.d.ts.map +1 -1
- package/types/tectra-ng-ui-datepicker.d.ts +6 -0
- package/types/tectra-ng-ui-datepicker.d.ts.map +1 -1
- package/types/tectra-ng-ui-dialog.d.ts +1 -0
- package/types/tectra-ng-ui-dialog.d.ts.map +1 -1
- package/types/tectra-ng-ui-field.d.ts +2 -2
- package/types/tectra-ng-ui-file-upload.d.ts +10 -7
- package/types/tectra-ng-ui-file-upload.d.ts.map +1 -1
- package/types/tectra-ng-ui-galleria.d.ts +42 -15
- package/types/tectra-ng-ui-galleria.d.ts.map +1 -1
- package/types/tectra-ng-ui-image.d.ts.map +1 -1
- package/types/tectra-ng-ui-input-otp.d.ts +1 -1
- package/types/tectra-ng-ui-input-otp.d.ts.map +1 -1
- package/types/tectra-ng-ui-knob.d.ts +3 -1
- package/types/tectra-ng-ui-knob.d.ts.map +1 -1
- package/types/tectra-ng-ui-menu.d.ts +35 -12
- package/types/tectra-ng-ui-menu.d.ts.map +1 -1
- package/types/tectra-ng-ui-message.d.ts +17 -8
- package/types/tectra-ng-ui-message.d.ts.map +1 -1
- package/types/tectra-ng-ui-multiselect.d.ts +2 -2
- package/types/tectra-ng-ui-multiselect.d.ts.map +1 -1
- package/types/tectra-ng-ui-paginator.d.ts +4 -21
- package/types/tectra-ng-ui-paginator.d.ts.map +1 -1
- package/types/tectra-ng-ui-panel-menu.d.ts +9 -9
- package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -1
- package/types/tectra-ng-ui-panel.d.ts.map +1 -1
- package/types/tectra-ng-ui-password.d.ts +3 -0
- package/types/tectra-ng-ui-password.d.ts.map +1 -1
- package/types/tectra-ng-ui-pill.d.ts +7 -3
- package/types/tectra-ng-ui-pill.d.ts.map +1 -1
- package/types/tectra-ng-ui-popover.d.ts +4 -2
- package/types/tectra-ng-ui-popover.d.ts.map +1 -1
- package/types/tectra-ng-ui-progress-bar.d.ts +1 -0
- package/types/tectra-ng-ui-progress-bar.d.ts.map +1 -1
- package/types/tectra-ng-ui-radio-button.d.ts +3 -1
- package/types/tectra-ng-ui-radio-button.d.ts.map +1 -1
- package/types/tectra-ng-ui-rating.d.ts +2 -0
- package/types/tectra-ng-ui-rating.d.ts.map +1 -1
- package/types/tectra-ng-ui-select-button.d.ts +256 -0
- package/types/tectra-ng-ui-select-button.d.ts.map +1 -0
- package/types/tectra-ng-ui-select.d.ts +85 -20
- package/types/tectra-ng-ui-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-speed-dial.d.ts.map +1 -1
- package/types/tectra-ng-ui-split-button.d.ts.map +1 -1
- package/types/tectra-ng-ui-stat-tiles.d.ts +4 -3
- package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -1
- package/types/tectra-ng-ui-stepper.d.ts +25 -10
- package/types/tectra-ng-ui-stepper.d.ts.map +1 -1
- package/types/tectra-ng-ui-table.d.ts +147 -75
- package/types/tectra-ng-ui-table.d.ts.map +1 -1
- package/types/tectra-ng-ui-tabs.d.ts +7 -5
- package/types/tectra-ng-ui-tabs.d.ts.map +1 -1
- package/types/tectra-ng-ui-timeline.d.ts +46 -9
- package/types/tectra-ng-ui-timeline.d.ts.map +1 -1
- package/types/tectra-ng-ui-toast.d.ts +3 -0
- package/types/tectra-ng-ui-toast.d.ts.map +1 -1
- package/types/tectra-ng-ui-toggle-switch.d.ts +1 -0
- package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -1
- package/types/tectra-ng-ui-tooltip.d.ts.map +1 -1
- package/types/tectra-ng-ui-tree-select.d.ts +4 -2
- package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-tree.d.ts +18 -7
- package/types/tectra-ng-ui-tree.d.ts.map +1 -1
- package/types/tectra-ng-ui-truncate-text.d.ts +1 -1
- package/types/tectra-ng-ui-virtual-scroller.d.ts +29 -10
- package/types/tectra-ng-ui-virtual-scroller.d.ts.map +1 -1
- package/types/tectra-ng-ui.d.ts +1 -1
- package/virtual-scroller/README.md +8 -0
|
@@ -2,11 +2,11 @@ import { BreakpointObserver } from "@angular/cdk/layout";
|
|
|
2
2
|
import * as i3 from "@angular/cdk/drag-drop";
|
|
3
3
|
import { CdkDrag, CdkDragHandle, CdkDropList, moveItemInArray } from "@angular/cdk/drag-drop";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, Injector, TemplateRef, ViewEncapsulation, afterNextRender, afterRenderEffect, booleanAttribute, computed, contentChild, contentChildren, effect, inject, input, model, numberAttribute, output, signal, untracked, viewChild } from "@angular/core";
|
|
5
|
+
import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, Injector, Renderer2, TemplateRef, ViewEncapsulation, afterNextRender, afterRenderEffect, booleanAttribute, computed, contentChild, contentChildren, effect, inject, input, model, numberAttribute, output, signal, untracked, viewChild } from "@angular/core";
|
|
6
6
|
import { toObservable, toSignal } from "@angular/core/rxjs-interop";
|
|
7
7
|
import { injectPassThrough, injectTokens, injectUnstyled } from "@tectra-ng/core/config";
|
|
8
8
|
import { TxLocaleService, injectTranslations } from "@tectra-ng/core/i18n";
|
|
9
|
-
import { optionalBoolean, optionalNumber } from "@tectra-ng/core/utils";
|
|
9
|
+
import { isFilled, matchesRule, optionalBoolean, optionalNumber, resolveField, resolveField as resolveField$1 } from "@tectra-ng/core/utils";
|
|
10
10
|
import { iconTokens, tableTokens, toStyleObject, treeTableTokens } from "@tectra-ng/themes";
|
|
11
11
|
import { map, of, switchMap } from "rxjs";
|
|
12
12
|
import { csvCell, downloadCsv } from "@tectra-ng/ui/export";
|
|
@@ -143,9 +143,59 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
143
143
|
type: TxTableActionsStore,
|
|
144
144
|
decorators: [{ type: Injectable }]
|
|
145
145
|
});
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
const TX_FILTER_MATCH_MODES = {
|
|
147
|
+
text: [
|
|
148
|
+
"startsWith",
|
|
149
|
+
"contains",
|
|
150
|
+
"notContains",
|
|
151
|
+
"endsWith",
|
|
152
|
+
"equals",
|
|
153
|
+
"notEquals"
|
|
154
|
+
],
|
|
155
|
+
numeric: [
|
|
156
|
+
"equals",
|
|
157
|
+
"notEquals",
|
|
158
|
+
"lt",
|
|
159
|
+
"lte",
|
|
160
|
+
"gt",
|
|
161
|
+
"gte"
|
|
162
|
+
],
|
|
163
|
+
date: [
|
|
164
|
+
"dateIs",
|
|
165
|
+
"dateIsNot",
|
|
166
|
+
"dateBefore",
|
|
167
|
+
"dateAfter"
|
|
168
|
+
],
|
|
169
|
+
boolean: ["equals"]
|
|
170
|
+
};
|
|
171
|
+
function defaultMatchMode(column) {
|
|
172
|
+
if (column.filterOptions?.length) return "in";
|
|
173
|
+
return (column.filterMatchModes ?? TX_FILTER_MATCH_MODES[column.filterType ?? "text"])[0];
|
|
174
|
+
}
|
|
175
|
+
function isFilterActive(filter) {
|
|
176
|
+
return !!filter?.rules.some((rule) => isFilled(rule.value));
|
|
177
|
+
}
|
|
178
|
+
function normalize(value, locale) {
|
|
179
|
+
return String(value).normalize("NFD").replace(/\p{Diacritic}/gu, "").toLocaleLowerCase(locale);
|
|
180
|
+
}
|
|
181
|
+
function matchesFilter(value, filter, locale) {
|
|
182
|
+
const rules = filter.rules.filter((rule) => isFilled(rule.value));
|
|
183
|
+
if (!rules.length) return true;
|
|
184
|
+
return filter.operator === "or" ? rules.some((rule) => matchesRule(value, rule, locale)) : rules.every((rule) => matchesRule(value, rule, locale));
|
|
185
|
+
}
|
|
186
|
+
function filterRows(rows, filters, columns, globalFilter, globalFields, locale) {
|
|
187
|
+
const active = Object.entries(filters).filter(([, filter]) => isFilterActive(filter));
|
|
188
|
+
const query = globalFilter.trim() ? normalize(globalFilter.trim(), locale) : "";
|
|
189
|
+
if (!active.length && !query) return [...rows];
|
|
190
|
+
const fieldOf = (key) => columns.find((column) => column.field === key)?.filterField ?? key;
|
|
191
|
+
return rows.filter((row) => {
|
|
192
|
+
if (!active.every(([key, filter]) => matchesFilter(resolveField$1(row, fieldOf(key)), filter, locale))) return false;
|
|
193
|
+
if (!query) return true;
|
|
194
|
+
return globalFields.some((field) => {
|
|
195
|
+
const value = resolveField$1(row, field);
|
|
196
|
+
return value !== null && value !== void 0 && normalize(value, locale).includes(query);
|
|
197
|
+
});
|
|
198
|
+
});
|
|
149
199
|
}
|
|
150
200
|
function writeField(row, field, value) {
|
|
151
201
|
const keys = field.split(".");
|
|
@@ -217,139 +267,6 @@ function mergeColumnOrder(columns, order, visible) {
|
|
|
217
267
|
});
|
|
218
268
|
return result;
|
|
219
269
|
}
|
|
220
|
-
const TX_FILTER_MATCH_MODES = {
|
|
221
|
-
text: [
|
|
222
|
-
"startsWith",
|
|
223
|
-
"contains",
|
|
224
|
-
"notContains",
|
|
225
|
-
"endsWith",
|
|
226
|
-
"equals",
|
|
227
|
-
"notEquals"
|
|
228
|
-
],
|
|
229
|
-
numeric: [
|
|
230
|
-
"equals",
|
|
231
|
-
"notEquals",
|
|
232
|
-
"lt",
|
|
233
|
-
"lte",
|
|
234
|
-
"gt",
|
|
235
|
-
"gte"
|
|
236
|
-
],
|
|
237
|
-
date: [
|
|
238
|
-
"dateIs",
|
|
239
|
-
"dateIsNot",
|
|
240
|
-
"dateBefore",
|
|
241
|
-
"dateAfter"
|
|
242
|
-
],
|
|
243
|
-
boolean: ["equals"]
|
|
244
|
-
};
|
|
245
|
-
function defaultMatchMode(column) {
|
|
246
|
-
if (column.filterOptions?.length) return "in";
|
|
247
|
-
return (column.filterMatchModes ?? TX_FILTER_MATCH_MODES[column.filterType ?? "text"])[0];
|
|
248
|
-
}
|
|
249
|
-
function isFilled(value) {
|
|
250
|
-
if (value === null || value === void 0) return false;
|
|
251
|
-
if (typeof value === "string") return value.trim() !== "";
|
|
252
|
-
if (Array.isArray(value)) return value.length > 0;
|
|
253
|
-
return true;
|
|
254
|
-
}
|
|
255
|
-
function isFilterActive(filter) {
|
|
256
|
-
return !!filter?.rules.some((rule) => isFilled(rule.value));
|
|
257
|
-
}
|
|
258
|
-
function normalize(value, locale) {
|
|
259
|
-
return String(value).normalize("NFD").replace(/\p{Diacritic}/gu, "").toLocaleLowerCase(locale);
|
|
260
|
-
}
|
|
261
|
-
function toTime(value) {
|
|
262
|
-
if (value === null || value === void 0 || value === "") return null;
|
|
263
|
-
const date = value instanceof Date ? value : new Date(value);
|
|
264
|
-
return Number.isNaN(date.getTime()) ? null : date.getTime();
|
|
265
|
-
}
|
|
266
|
-
function dayOf(value) {
|
|
267
|
-
const time = toTime(value);
|
|
268
|
-
return time === null ? null : new Date(time).toDateString();
|
|
269
|
-
}
|
|
270
|
-
function compare(value, filter) {
|
|
271
|
-
if (value === null || value === void 0) return null;
|
|
272
|
-
if (typeof value === "number" || typeof filter === "number") {
|
|
273
|
-
const left = Number(value);
|
|
274
|
-
const right = Number(filter);
|
|
275
|
-
return Number.isNaN(left) || Number.isNaN(right) ? null : left - right;
|
|
276
|
-
}
|
|
277
|
-
const left = toTime(value);
|
|
278
|
-
const right = toTime(filter);
|
|
279
|
-
if (value instanceof Date && left !== null && right !== null) return left - right;
|
|
280
|
-
return String(value).localeCompare(String(filter), void 0, {
|
|
281
|
-
numeric: true,
|
|
282
|
-
sensitivity: "base"
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
function matchesRule(value, rule, locale) {
|
|
286
|
-
const filter = rule.value;
|
|
287
|
-
if (!isFilled(filter)) return true;
|
|
288
|
-
const text = value === null || value === void 0 ? "" : normalize(value, locale);
|
|
289
|
-
const needle = typeof filter === "string" || typeof filter === "number" ? normalize(filter, locale) : "";
|
|
290
|
-
switch (rule.matchMode) {
|
|
291
|
-
case "startsWith": return text.startsWith(needle);
|
|
292
|
-
case "contains": return text.includes(needle);
|
|
293
|
-
case "notContains": return !text.includes(needle);
|
|
294
|
-
case "endsWith": return text.endsWith(needle);
|
|
295
|
-
case "equals":
|
|
296
|
-
if (typeof filter === "boolean") return value === filter;
|
|
297
|
-
if (typeof filter === "number") return Number(value) === filter;
|
|
298
|
-
if (filter instanceof Date) return toTime(value) === toTime(filter);
|
|
299
|
-
return text === needle;
|
|
300
|
-
case "notEquals":
|
|
301
|
-
if (typeof filter === "boolean") return value !== filter;
|
|
302
|
-
if (typeof filter === "number") return Number(value) !== filter;
|
|
303
|
-
if (filter instanceof Date) return toTime(value) !== toTime(filter);
|
|
304
|
-
return text !== needle;
|
|
305
|
-
case "in": return Array.isArray(filter) && filter.some((item) => item === value || item !== null && value !== null && normalize(item, locale) === text);
|
|
306
|
-
case "lt":
|
|
307
|
-
case "lte":
|
|
308
|
-
case "gt":
|
|
309
|
-
case "gte": {
|
|
310
|
-
const result = compare(value, filter);
|
|
311
|
-
if (result === null) return false;
|
|
312
|
-
return rule.matchMode === "lt" ? result < 0 : rule.matchMode === "lte" ? result <= 0 : rule.matchMode === "gt" ? result > 0 : result >= 0;
|
|
313
|
-
}
|
|
314
|
-
case "between": {
|
|
315
|
-
const [from, to] = Array.isArray(filter) ? filter : [];
|
|
316
|
-
const fromResult = isFilled(from) ? compare(value, from) : 0;
|
|
317
|
-
const toResult = isFilled(to) ? compare(value, to) : 0;
|
|
318
|
-
return fromResult !== null && toResult !== null && fromResult >= 0 && toResult <= 0;
|
|
319
|
-
}
|
|
320
|
-
case "dateIs": return dayOf(value) !== null && dayOf(value) === dayOf(filter);
|
|
321
|
-
case "dateIsNot": return dayOf(value) !== dayOf(filter);
|
|
322
|
-
case "dateBefore": {
|
|
323
|
-
const left = toTime(value);
|
|
324
|
-
const right = toTime(filter);
|
|
325
|
-
return left !== null && right !== null && left < right;
|
|
326
|
-
}
|
|
327
|
-
case "dateAfter": {
|
|
328
|
-
const left = toTime(value);
|
|
329
|
-
const right = toTime(filter);
|
|
330
|
-
return left !== null && right !== null && left > right;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
function matchesFilter(value, filter, locale) {
|
|
335
|
-
const rules = filter.rules.filter((rule) => isFilled(rule.value));
|
|
336
|
-
if (!rules.length) return true;
|
|
337
|
-
return filter.operator === "or" ? rules.some((rule) => matchesRule(value, rule, locale)) : rules.every((rule) => matchesRule(value, rule, locale));
|
|
338
|
-
}
|
|
339
|
-
function filterRows(rows, filters, columns, globalFilter, globalFields, locale) {
|
|
340
|
-
const active = Object.entries(filters).filter(([, filter]) => isFilterActive(filter));
|
|
341
|
-
const query = globalFilter.trim() ? normalize(globalFilter.trim(), locale) : "";
|
|
342
|
-
if (!active.length && !query) return [...rows];
|
|
343
|
-
const fieldOf = (key) => columns.find((column) => column.field === key)?.filterField ?? key;
|
|
344
|
-
return rows.filter((row) => {
|
|
345
|
-
if (!active.every(([key, filter]) => matchesFilter(resolveField(row, fieldOf(key)), filter, locale))) return false;
|
|
346
|
-
if (!query) return true;
|
|
347
|
-
return globalFields.some((field) => {
|
|
348
|
-
const value = resolveField(row, field);
|
|
349
|
-
return value !== null && value !== void 0 && normalize(value, locale).includes(query);
|
|
350
|
-
});
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
270
|
function toCsv(rows, columns, options = {}) {
|
|
354
271
|
const separator = options.separator ?? ",";
|
|
355
272
|
const read = options.value ?? ((row, column) => resolveField(row, column.field));
|
|
@@ -636,6 +553,7 @@ var TxTableColumnFilter = class TxTableColumnFilter {
|
|
|
636
553
|
[ariaLabel]="valueLabel()"
|
|
637
554
|
[placeholder]="column().filterPlaceholder"
|
|
638
555
|
[ngModel]="rule.value"
|
|
556
|
+
[ngModelOptions]="{ standalone: true }"
|
|
639
557
|
(ngModelChange)="setValue(index, $event, live)"
|
|
640
558
|
/>
|
|
641
559
|
} @placeholder {
|
|
@@ -651,6 +569,7 @@ var TxTableColumnFilter = class TxTableColumnFilter {
|
|
|
651
569
|
[placeholder]="column().filterPlaceholder"
|
|
652
570
|
[showClear]="true"
|
|
653
571
|
[ngModel]="dateValue(rule.value)"
|
|
572
|
+
[ngModelOptions]="{ standalone: true }"
|
|
654
573
|
(ngModelChange)="setValue(index, $event, live)"
|
|
655
574
|
/>
|
|
656
575
|
} @placeholder {
|
|
@@ -666,6 +585,7 @@ var TxTableColumnFilter = class TxTableColumnFilter {
|
|
|
666
585
|
[options]="booleanOptions()"
|
|
667
586
|
[ariaLabel]="valueLabel()"
|
|
668
587
|
[ngModel]="rule.value"
|
|
588
|
+
[ngModelOptions]="{ standalone: true }"
|
|
669
589
|
(ngModelChange)="setValue(index, $event, true)"
|
|
670
590
|
/>
|
|
671
591
|
}
|
|
@@ -681,6 +601,7 @@ var TxTableColumnFilter = class TxTableColumnFilter {
|
|
|
681
601
|
[ariaLabel]="valueLabel()"
|
|
682
602
|
[placeholder]="column().filterPlaceholder ?? translations().filterAny"
|
|
683
603
|
[ngModel]="rule.value ?? []"
|
|
604
|
+
[ngModelOptions]="{ standalone: true }"
|
|
684
605
|
(ngModelChange)="setValue(index, $event, live)"
|
|
685
606
|
/>
|
|
686
607
|
} @placeholder {
|
|
@@ -751,6 +672,7 @@ var TxTableColumnFilter = class TxTableColumnFilter {
|
|
|
751
672
|
[options]="operatorOptions()"
|
|
752
673
|
[ariaLabel]="translations().filterMatchAll + ' / ' + translations().filterMatchAny"
|
|
753
674
|
[ngModel]="draft().operator"
|
|
675
|
+
[ngModelOptions]="{ standalone: true }"
|
|
754
676
|
(ngModelChange)="setOperator($event)"
|
|
755
677
|
/>
|
|
756
678
|
}
|
|
@@ -764,6 +686,7 @@ var TxTableColumnFilter = class TxTableColumnFilter {
|
|
|
764
686
|
[options]="modeOptions()"
|
|
765
687
|
[ariaLabel]="translations().filterMatchMode"
|
|
766
688
|
[ngModel]="rule.matchMode"
|
|
689
|
+
[ngModelOptions]="{ standalone: true }"
|
|
767
690
|
(ngModelChange)="setMode(index, $event)"
|
|
768
691
|
/>
|
|
769
692
|
}
|
|
@@ -937,6 +860,7 @@ var TxTableColumnFilter = class TxTableColumnFilter {
|
|
|
937
860
|
"tiered",
|
|
938
861
|
"placement",
|
|
939
862
|
"offset",
|
|
863
|
+
"arrow",
|
|
940
864
|
"variant",
|
|
941
865
|
"ariaLabel",
|
|
942
866
|
"ariaLabelledBy",
|
|
@@ -1023,6 +947,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
1023
947
|
[ariaLabel]="valueLabel()"
|
|
1024
948
|
[placeholder]="column().filterPlaceholder"
|
|
1025
949
|
[ngModel]="rule.value"
|
|
950
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1026
951
|
(ngModelChange)="setValue(index, $event, live)"
|
|
1027
952
|
/>
|
|
1028
953
|
} @placeholder {
|
|
@@ -1038,6 +963,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
1038
963
|
[placeholder]="column().filterPlaceholder"
|
|
1039
964
|
[showClear]="true"
|
|
1040
965
|
[ngModel]="dateValue(rule.value)"
|
|
966
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1041
967
|
(ngModelChange)="setValue(index, $event, live)"
|
|
1042
968
|
/>
|
|
1043
969
|
} @placeholder {
|
|
@@ -1053,6 +979,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
1053
979
|
[options]="booleanOptions()"
|
|
1054
980
|
[ariaLabel]="valueLabel()"
|
|
1055
981
|
[ngModel]="rule.value"
|
|
982
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1056
983
|
(ngModelChange)="setValue(index, $event, true)"
|
|
1057
984
|
/>
|
|
1058
985
|
}
|
|
@@ -1068,6 +995,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
1068
995
|
[ariaLabel]="valueLabel()"
|
|
1069
996
|
[placeholder]="column().filterPlaceholder ?? translations().filterAny"
|
|
1070
997
|
[ngModel]="rule.value ?? []"
|
|
998
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1071
999
|
(ngModelChange)="setValue(index, $event, live)"
|
|
1072
1000
|
/>
|
|
1073
1001
|
} @placeholder {
|
|
@@ -1138,6 +1066,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
1138
1066
|
[options]="operatorOptions()"
|
|
1139
1067
|
[ariaLabel]="translations().filterMatchAll + ' / ' + translations().filterMatchAny"
|
|
1140
1068
|
[ngModel]="draft().operator"
|
|
1069
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1141
1070
|
(ngModelChange)="setOperator($event)"
|
|
1142
1071
|
/>
|
|
1143
1072
|
}
|
|
@@ -1151,6 +1080,7 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
1151
1080
|
[options]="modeOptions()"
|
|
1152
1081
|
[ariaLabel]="translations().filterMatchMode"
|
|
1153
1082
|
[ngModel]="rule.matchMode"
|
|
1083
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1154
1084
|
(ngModelChange)="setMode(index, $event)"
|
|
1155
1085
|
/>
|
|
1156
1086
|
}
|
|
@@ -1415,6 +1345,7 @@ var TxTableSettings = class TxTableSettings {
|
|
|
1415
1345
|
[label]="label(column)"
|
|
1416
1346
|
[disabled]="column.hideable === false"
|
|
1417
1347
|
[ngModel]="!hidden().has(column.field)"
|
|
1348
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1418
1349
|
(ngModelChange)="columnToggled.emit({ field: column.field, visible: $event })"
|
|
1419
1350
|
(keydown.alt.arrowup)="moveColumn(column, -1, $event)"
|
|
1420
1351
|
(keydown.alt.arrowdown)="moveColumn(column, 1, $event)"
|
|
@@ -1433,6 +1364,7 @@ var TxTableSettings = class TxTableSettings {
|
|
|
1433
1364
|
binary
|
|
1434
1365
|
[label]="action.label"
|
|
1435
1366
|
[ngModel]="store.isPinned(action.id)"
|
|
1367
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1436
1368
|
(ngModelChange)="store.setPinned(action.id, $event)"
|
|
1437
1369
|
(keydown.alt.arrowup)="moveAction(index, -1, $event)"
|
|
1438
1370
|
(keydown.alt.arrowdown)="moveAction(index, 1, $event)"
|
|
@@ -1769,6 +1701,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1769
1701
|
[label]="label(column)"
|
|
1770
1702
|
[disabled]="column.hideable === false"
|
|
1771
1703
|
[ngModel]="!hidden().has(column.field)"
|
|
1704
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1772
1705
|
(ngModelChange)="columnToggled.emit({ field: column.field, visible: $event })"
|
|
1773
1706
|
(keydown.alt.arrowup)="moveColumn(column, -1, $event)"
|
|
1774
1707
|
(keydown.alt.arrowdown)="moveColumn(column, 1, $event)"
|
|
@@ -1787,6 +1720,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1787
1720
|
binary
|
|
1788
1721
|
[label]="action.label"
|
|
1789
1722
|
[ngModel]="store.isPinned(action.id)"
|
|
1723
|
+
[ngModelOptions]="{ standalone: true }"
|
|
1790
1724
|
(ngModelChange)="store.setPinned(action.id, $event)"
|
|
1791
1725
|
(keydown.alt.arrowup)="moveAction(index, -1, $event)"
|
|
1792
1726
|
(keydown.alt.arrowdown)="moveAction(index, 1, $event)"
|
|
@@ -1876,6 +1810,10 @@ const TX_TABLE_IMPORTS = [
|
|
|
1876
1810
|
var TxTableCell = class TxTableCell {
|
|
1877
1811
|
templateRef = inject(TemplateRef);
|
|
1878
1812
|
txTableCell = input.required(...ngDevMode ? [{ debugName: "txTableCell" }] : /* istanbul ignore next */ []);
|
|
1813
|
+
txTableCellOf = input(void 0, ...ngDevMode ? [{ debugName: "txTableCellOf" }] : /* istanbul ignore next */ []);
|
|
1814
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
1815
|
+
return !!context;
|
|
1816
|
+
}
|
|
1879
1817
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1880
1818
|
minVersion: "12.0.0",
|
|
1881
1819
|
version: "22.2.5",
|
|
@@ -1890,13 +1828,22 @@ var TxTableCell = class TxTableCell {
|
|
|
1890
1828
|
type: TxTableCell,
|
|
1891
1829
|
isStandalone: true,
|
|
1892
1830
|
selector: "ng-template[txTableCell]",
|
|
1893
|
-
inputs: {
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1831
|
+
inputs: {
|
|
1832
|
+
txTableCell: {
|
|
1833
|
+
classPropertyName: "txTableCell",
|
|
1834
|
+
publicName: "txTableCell",
|
|
1835
|
+
isSignal: true,
|
|
1836
|
+
isRequired: true,
|
|
1837
|
+
transformFunction: null
|
|
1838
|
+
},
|
|
1839
|
+
txTableCellOf: {
|
|
1840
|
+
classPropertyName: "txTableCellOf",
|
|
1841
|
+
publicName: "txTableCellOf",
|
|
1842
|
+
isSignal: true,
|
|
1843
|
+
isRequired: false,
|
|
1844
|
+
transformFunction: null
|
|
1845
|
+
}
|
|
1846
|
+
},
|
|
1900
1847
|
ngImport: i0
|
|
1901
1848
|
});
|
|
1902
1849
|
};
|
|
@@ -1909,18 +1856,32 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1909
1856
|
type: Directive,
|
|
1910
1857
|
args: [{ selector: "ng-template[txTableCell]" }]
|
|
1911
1858
|
}],
|
|
1912
|
-
propDecorators: {
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1859
|
+
propDecorators: {
|
|
1860
|
+
txTableCell: [{
|
|
1861
|
+
type: i0.Input,
|
|
1862
|
+
args: [{
|
|
1863
|
+
isSignal: true,
|
|
1864
|
+
alias: "txTableCell",
|
|
1865
|
+
required: true
|
|
1866
|
+
}]
|
|
1867
|
+
}],
|
|
1868
|
+
txTableCellOf: [{
|
|
1869
|
+
type: i0.Input,
|
|
1870
|
+
args: [{
|
|
1871
|
+
isSignal: true,
|
|
1872
|
+
alias: "txTableCellOf",
|
|
1873
|
+
required: false
|
|
1874
|
+
}]
|
|
1918
1875
|
}]
|
|
1919
|
-
}
|
|
1876
|
+
}
|
|
1920
1877
|
});
|
|
1921
1878
|
var TxTableEditor = class TxTableEditor {
|
|
1922
1879
|
templateRef = inject(TemplateRef);
|
|
1923
1880
|
txTableEditor = input.required(...ngDevMode ? [{ debugName: "txTableEditor" }] : /* istanbul ignore next */ []);
|
|
1881
|
+
txTableEditorOf = input(void 0, ...ngDevMode ? [{ debugName: "txTableEditorOf" }] : /* istanbul ignore next */ []);
|
|
1882
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
1883
|
+
return !!context;
|
|
1884
|
+
}
|
|
1924
1885
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1925
1886
|
minVersion: "12.0.0",
|
|
1926
1887
|
version: "22.2.5",
|
|
@@ -1935,13 +1896,22 @@ var TxTableEditor = class TxTableEditor {
|
|
|
1935
1896
|
type: TxTableEditor,
|
|
1936
1897
|
isStandalone: true,
|
|
1937
1898
|
selector: "ng-template[txTableEditor]",
|
|
1938
|
-
inputs: {
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1899
|
+
inputs: {
|
|
1900
|
+
txTableEditor: {
|
|
1901
|
+
classPropertyName: "txTableEditor",
|
|
1902
|
+
publicName: "txTableEditor",
|
|
1903
|
+
isSignal: true,
|
|
1904
|
+
isRequired: true,
|
|
1905
|
+
transformFunction: null
|
|
1906
|
+
},
|
|
1907
|
+
txTableEditorOf: {
|
|
1908
|
+
classPropertyName: "txTableEditorOf",
|
|
1909
|
+
publicName: "txTableEditorOf",
|
|
1910
|
+
isSignal: true,
|
|
1911
|
+
isRequired: false,
|
|
1912
|
+
transformFunction: null
|
|
1913
|
+
}
|
|
1914
|
+
},
|
|
1945
1915
|
ngImport: i0
|
|
1946
1916
|
});
|
|
1947
1917
|
};
|
|
@@ -1954,18 +1924,31 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1954
1924
|
type: Directive,
|
|
1955
1925
|
args: [{ selector: "ng-template[txTableEditor]" }]
|
|
1956
1926
|
}],
|
|
1957
|
-
propDecorators: {
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1927
|
+
propDecorators: {
|
|
1928
|
+
txTableEditor: [{
|
|
1929
|
+
type: i0.Input,
|
|
1930
|
+
args: [{
|
|
1931
|
+
isSignal: true,
|
|
1932
|
+
alias: "txTableEditor",
|
|
1933
|
+
required: true
|
|
1934
|
+
}]
|
|
1935
|
+
}],
|
|
1936
|
+
txTableEditorOf: [{
|
|
1937
|
+
type: i0.Input,
|
|
1938
|
+
args: [{
|
|
1939
|
+
isSignal: true,
|
|
1940
|
+
alias: "txTableEditorOf",
|
|
1941
|
+
required: false
|
|
1942
|
+
}]
|
|
1963
1943
|
}]
|
|
1964
|
-
}
|
|
1944
|
+
}
|
|
1965
1945
|
});
|
|
1966
1946
|
var TxTableHeaderCell = class TxTableHeaderCell {
|
|
1967
1947
|
templateRef = inject(TemplateRef);
|
|
1968
1948
|
txTableHeaderCell = input.required(...ngDevMode ? [{ debugName: "txTableHeaderCell" }] : /* istanbul ignore next */ []);
|
|
1949
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
1950
|
+
return !!context;
|
|
1951
|
+
}
|
|
1969
1952
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1970
1953
|
minVersion: "12.0.0",
|
|
1971
1954
|
version: "22.2.5",
|
|
@@ -2011,6 +1994,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2011
1994
|
var TxTableFooterCell = class TxTableFooterCell {
|
|
2012
1995
|
templateRef = inject(TemplateRef);
|
|
2013
1996
|
txTableFooterCell = input.required(...ngDevMode ? [{ debugName: "txTableFooterCell" }] : /* istanbul ignore next */ []);
|
|
1997
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
1998
|
+
return !!context;
|
|
1999
|
+
}
|
|
2014
2000
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2015
2001
|
minVersion: "12.0.0",
|
|
2016
2002
|
version: "22.2.5",
|
|
@@ -2055,6 +2041,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2055
2041
|
});
|
|
2056
2042
|
var TxTableCard = class TxTableCard {
|
|
2057
2043
|
templateRef = inject(TemplateRef);
|
|
2044
|
+
txTableCardOf = input(void 0, ...ngDevMode ? [{ debugName: "txTableCardOf" }] : /* istanbul ignore next */ []);
|
|
2045
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
2046
|
+
return !!context;
|
|
2047
|
+
}
|
|
2058
2048
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2059
2049
|
minVersion: "12.0.0",
|
|
2060
2050
|
version: "22.2.5",
|
|
@@ -2064,11 +2054,18 @@ var TxTableCard = class TxTableCard {
|
|
|
2064
2054
|
target: i0.ɵɵFactoryTarget.Directive
|
|
2065
2055
|
});
|
|
2066
2056
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
2067
|
-
minVersion: "
|
|
2057
|
+
minVersion: "17.1.0",
|
|
2068
2058
|
version: "22.2.5",
|
|
2069
2059
|
type: TxTableCard,
|
|
2070
2060
|
isStandalone: true,
|
|
2071
2061
|
selector: "ng-template[txTableCard]",
|
|
2062
|
+
inputs: { txTableCardOf: {
|
|
2063
|
+
classPropertyName: "txTableCardOf",
|
|
2064
|
+
publicName: "txTableCardOf",
|
|
2065
|
+
isSignal: true,
|
|
2066
|
+
isRequired: false,
|
|
2067
|
+
transformFunction: null
|
|
2068
|
+
} },
|
|
2072
2069
|
ngImport: i0
|
|
2073
2070
|
});
|
|
2074
2071
|
};
|
|
@@ -2080,10 +2077,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2080
2077
|
decorators: [{
|
|
2081
2078
|
type: Directive,
|
|
2082
2079
|
args: [{ selector: "ng-template[txTableCard]" }]
|
|
2083
|
-
}]
|
|
2080
|
+
}],
|
|
2081
|
+
propDecorators: { txTableCardOf: [{
|
|
2082
|
+
type: i0.Input,
|
|
2083
|
+
args: [{
|
|
2084
|
+
isSignal: true,
|
|
2085
|
+
alias: "txTableCardOf",
|
|
2086
|
+
required: false
|
|
2087
|
+
}]
|
|
2088
|
+
}] }
|
|
2084
2089
|
});
|
|
2085
2090
|
var TxTableExpansion = class TxTableExpansion {
|
|
2086
2091
|
templateRef = inject(TemplateRef);
|
|
2092
|
+
txTableExpansionOf = input(void 0, ...ngDevMode ? [{ debugName: "txTableExpansionOf" }] : /* istanbul ignore next */ []);
|
|
2093
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
2094
|
+
return !!context;
|
|
2095
|
+
}
|
|
2087
2096
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2088
2097
|
minVersion: "12.0.0",
|
|
2089
2098
|
version: "22.2.5",
|
|
@@ -2093,11 +2102,18 @@ var TxTableExpansion = class TxTableExpansion {
|
|
|
2093
2102
|
target: i0.ɵɵFactoryTarget.Directive
|
|
2094
2103
|
});
|
|
2095
2104
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
2096
|
-
minVersion: "
|
|
2105
|
+
minVersion: "17.1.0",
|
|
2097
2106
|
version: "22.2.5",
|
|
2098
2107
|
type: TxTableExpansion,
|
|
2099
2108
|
isStandalone: true,
|
|
2100
2109
|
selector: "ng-template[txTableExpansion]",
|
|
2110
|
+
inputs: { txTableExpansionOf: {
|
|
2111
|
+
classPropertyName: "txTableExpansionOf",
|
|
2112
|
+
publicName: "txTableExpansionOf",
|
|
2113
|
+
isSignal: true,
|
|
2114
|
+
isRequired: false,
|
|
2115
|
+
transformFunction: null
|
|
2116
|
+
} },
|
|
2101
2117
|
ngImport: i0
|
|
2102
2118
|
});
|
|
2103
2119
|
};
|
|
@@ -2109,10 +2125,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2109
2125
|
decorators: [{
|
|
2110
2126
|
type: Directive,
|
|
2111
2127
|
args: [{ selector: "ng-template[txTableExpansion]" }]
|
|
2112
|
-
}]
|
|
2128
|
+
}],
|
|
2129
|
+
propDecorators: { txTableExpansionOf: [{
|
|
2130
|
+
type: i0.Input,
|
|
2131
|
+
args: [{
|
|
2132
|
+
isSignal: true,
|
|
2133
|
+
alias: "txTableExpansionOf",
|
|
2134
|
+
required: false
|
|
2135
|
+
}]
|
|
2136
|
+
}] }
|
|
2113
2137
|
});
|
|
2114
2138
|
var TxTableActionsTemplate = class TxTableActionsTemplate {
|
|
2115
2139
|
templateRef = inject(TemplateRef);
|
|
2140
|
+
txTableActionsOf = input(void 0, ...ngDevMode ? [{ debugName: "txTableActionsOf" }] : /* istanbul ignore next */ []);
|
|
2141
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
2142
|
+
return !!context;
|
|
2143
|
+
}
|
|
2116
2144
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2117
2145
|
minVersion: "12.0.0",
|
|
2118
2146
|
version: "22.2.5",
|
|
@@ -2122,11 +2150,18 @@ var TxTableActionsTemplate = class TxTableActionsTemplate {
|
|
|
2122
2150
|
target: i0.ɵɵFactoryTarget.Directive
|
|
2123
2151
|
});
|
|
2124
2152
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
2125
|
-
minVersion: "
|
|
2153
|
+
minVersion: "17.1.0",
|
|
2126
2154
|
version: "22.2.5",
|
|
2127
2155
|
type: TxTableActionsTemplate,
|
|
2128
2156
|
isStandalone: true,
|
|
2129
2157
|
selector: "ng-template[txTableActions]",
|
|
2158
|
+
inputs: { txTableActionsOf: {
|
|
2159
|
+
classPropertyName: "txTableActionsOf",
|
|
2160
|
+
publicName: "txTableActionsOf",
|
|
2161
|
+
isSignal: true,
|
|
2162
|
+
isRequired: false,
|
|
2163
|
+
transformFunction: null
|
|
2164
|
+
} },
|
|
2130
2165
|
ngImport: i0
|
|
2131
2166
|
});
|
|
2132
2167
|
};
|
|
@@ -2138,10 +2173,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2138
2173
|
decorators: [{
|
|
2139
2174
|
type: Directive,
|
|
2140
2175
|
args: [{ selector: "ng-template[txTableActions]" }]
|
|
2141
|
-
}]
|
|
2176
|
+
}],
|
|
2177
|
+
propDecorators: { txTableActionsOf: [{
|
|
2178
|
+
type: i0.Input,
|
|
2179
|
+
args: [{
|
|
2180
|
+
isSignal: true,
|
|
2181
|
+
alias: "txTableActionsOf",
|
|
2182
|
+
required: false
|
|
2183
|
+
}]
|
|
2184
|
+
}] }
|
|
2142
2185
|
});
|
|
2143
2186
|
var TxTableGroupHeader = class TxTableGroupHeader {
|
|
2144
2187
|
templateRef = inject(TemplateRef);
|
|
2188
|
+
txTableGroupHeaderOf = input(void 0, ...ngDevMode ? [{ debugName: "txTableGroupHeaderOf" }] : /* istanbul ignore next */ []);
|
|
2189
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
2190
|
+
return !!context;
|
|
2191
|
+
}
|
|
2145
2192
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2146
2193
|
minVersion: "12.0.0",
|
|
2147
2194
|
version: "22.2.5",
|
|
@@ -2151,11 +2198,18 @@ var TxTableGroupHeader = class TxTableGroupHeader {
|
|
|
2151
2198
|
target: i0.ɵɵFactoryTarget.Directive
|
|
2152
2199
|
});
|
|
2153
2200
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
2154
|
-
minVersion: "
|
|
2201
|
+
minVersion: "17.1.0",
|
|
2155
2202
|
version: "22.2.5",
|
|
2156
2203
|
type: TxTableGroupHeader,
|
|
2157
2204
|
isStandalone: true,
|
|
2158
2205
|
selector: "ng-template[txTableGroupHeader]",
|
|
2206
|
+
inputs: { txTableGroupHeaderOf: {
|
|
2207
|
+
classPropertyName: "txTableGroupHeaderOf",
|
|
2208
|
+
publicName: "txTableGroupHeaderOf",
|
|
2209
|
+
isSignal: true,
|
|
2210
|
+
isRequired: false,
|
|
2211
|
+
transformFunction: null
|
|
2212
|
+
} },
|
|
2159
2213
|
ngImport: i0
|
|
2160
2214
|
});
|
|
2161
2215
|
};
|
|
@@ -2167,10 +2221,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2167
2221
|
decorators: [{
|
|
2168
2222
|
type: Directive,
|
|
2169
2223
|
args: [{ selector: "ng-template[txTableGroupHeader]" }]
|
|
2170
|
-
}]
|
|
2224
|
+
}],
|
|
2225
|
+
propDecorators: { txTableGroupHeaderOf: [{
|
|
2226
|
+
type: i0.Input,
|
|
2227
|
+
args: [{
|
|
2228
|
+
isSignal: true,
|
|
2229
|
+
alias: "txTableGroupHeaderOf",
|
|
2230
|
+
required: false
|
|
2231
|
+
}]
|
|
2232
|
+
}] }
|
|
2171
2233
|
});
|
|
2172
2234
|
var TxTableGroupFooter = class TxTableGroupFooter {
|
|
2173
2235
|
templateRef = inject(TemplateRef);
|
|
2236
|
+
txTableGroupFooterOf = input(void 0, ...ngDevMode ? [{ debugName: "txTableGroupFooterOf" }] : /* istanbul ignore next */ []);
|
|
2237
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
2238
|
+
return !!context;
|
|
2239
|
+
}
|
|
2174
2240
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2175
2241
|
minVersion: "12.0.0",
|
|
2176
2242
|
version: "22.2.5",
|
|
@@ -2180,11 +2246,18 @@ var TxTableGroupFooter = class TxTableGroupFooter {
|
|
|
2180
2246
|
target: i0.ɵɵFactoryTarget.Directive
|
|
2181
2247
|
});
|
|
2182
2248
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
2183
|
-
minVersion: "
|
|
2249
|
+
minVersion: "17.1.0",
|
|
2184
2250
|
version: "22.2.5",
|
|
2185
2251
|
type: TxTableGroupFooter,
|
|
2186
2252
|
isStandalone: true,
|
|
2187
2253
|
selector: "ng-template[txTableGroupFooter]",
|
|
2254
|
+
inputs: { txTableGroupFooterOf: {
|
|
2255
|
+
classPropertyName: "txTableGroupFooterOf",
|
|
2256
|
+
publicName: "txTableGroupFooterOf",
|
|
2257
|
+
isSignal: true,
|
|
2258
|
+
isRequired: false,
|
|
2259
|
+
transformFunction: null
|
|
2260
|
+
} },
|
|
2188
2261
|
ngImport: i0
|
|
2189
2262
|
});
|
|
2190
2263
|
};
|
|
@@ -2196,10 +2269,21 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2196
2269
|
decorators: [{
|
|
2197
2270
|
type: Directive,
|
|
2198
2271
|
args: [{ selector: "ng-template[txTableGroupFooter]" }]
|
|
2199
|
-
}]
|
|
2272
|
+
}],
|
|
2273
|
+
propDecorators: { txTableGroupFooterOf: [{
|
|
2274
|
+
type: i0.Input,
|
|
2275
|
+
args: [{
|
|
2276
|
+
isSignal: true,
|
|
2277
|
+
alias: "txTableGroupFooterOf",
|
|
2278
|
+
required: false
|
|
2279
|
+
}]
|
|
2280
|
+
}] }
|
|
2200
2281
|
});
|
|
2201
2282
|
var TxTableEmpty = class TxTableEmpty {
|
|
2202
2283
|
templateRef = inject(TemplateRef);
|
|
2284
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
2285
|
+
return !!context;
|
|
2286
|
+
}
|
|
2203
2287
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2204
2288
|
minVersion: "12.0.0",
|
|
2205
2289
|
version: "22.2.5",
|
|
@@ -2229,9 +2313,12 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2229
2313
|
});
|
|
2230
2314
|
var TxTableAction = class TxTableAction {
|
|
2231
2315
|
templateRef = inject(TemplateRef);
|
|
2232
|
-
txTableAction = input
|
|
2233
|
-
id = computed(() =>
|
|
2234
|
-
|
|
2316
|
+
txTableAction = input(void 0, ...ngDevMode ? [{ debugName: "txTableAction" }] : /* istanbul ignore next */ []);
|
|
2317
|
+
id = computed(() => {
|
|
2318
|
+
const config = this.txTableAction();
|
|
2319
|
+
return config ? actionIdOf(config) : "";
|
|
2320
|
+
}, ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
|
|
2321
|
+
label = computed(() => this.txTableAction()?.label ?? "", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
2235
2322
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2236
2323
|
minVersion: "12.0.0",
|
|
2237
2324
|
version: "22.2.5",
|
|
@@ -2250,7 +2337,7 @@ var TxTableAction = class TxTableAction {
|
|
|
2250
2337
|
classPropertyName: "txTableAction",
|
|
2251
2338
|
publicName: "txTableAction",
|
|
2252
2339
|
isSignal: true,
|
|
2253
|
-
isRequired:
|
|
2340
|
+
isRequired: false,
|
|
2254
2341
|
transformFunction: null
|
|
2255
2342
|
} },
|
|
2256
2343
|
ngImport: i0
|
|
@@ -2270,7 +2357,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2270
2357
|
args: [{
|
|
2271
2358
|
isSignal: true,
|
|
2272
2359
|
alias: "txTableAction",
|
|
2273
|
-
required:
|
|
2360
|
+
required: false
|
|
2274
2361
|
}]
|
|
2275
2362
|
}] }
|
|
2276
2363
|
});
|
|
@@ -2534,6 +2621,7 @@ var TxTable = class TxTable {
|
|
|
2534
2621
|
menuRowKey = signal(void 0, ...ngDevMode ? [{ debugName: "menuRowKey" }] : /* istanbul ignore next */ []);
|
|
2535
2622
|
menuItems = signal([], ...ngDevMode ? [{ debugName: "menuItems" }] : /* istanbul ignore next */ []);
|
|
2536
2623
|
closingKeys = signal([], ...ngDevMode ? [{ debugName: "closingKeys" }] : /* istanbul ignore next */ []);
|
|
2624
|
+
cardIdBase = uniqueId("tx-table-card");
|
|
2537
2625
|
cellEdit = signal(null, ...ngDevMode ? [{ debugName: "cellEdit" }] : /* istanbul ignore next */ []);
|
|
2538
2626
|
rowDrafts = signal(/* @__PURE__ */ new Map(), ...ngDevMode ? [{ debugName: "rowDrafts" }] : /* istanbul ignore next */ []);
|
|
2539
2627
|
editVersion = signal(0, ...ngDevMode ? [{ debugName: "editVersion" }] : /* istanbul ignore next */ []);
|
|
@@ -2542,6 +2630,7 @@ var TxTable = class TxTable {
|
|
|
2542
2630
|
scrollTop = signal(0, ...ngDevMode ? [{ debugName: "scrollTop" }] : /* istanbul ignore next */ []);
|
|
2543
2631
|
viewportHeight = signal(0, ...ngDevMode ? [{ debugName: "viewportHeight" }] : /* istanbul ignore next */ []);
|
|
2544
2632
|
lastRange = "";
|
|
2633
|
+
lastLazyLoad = "";
|
|
2545
2634
|
rowActionSources = /* @__PURE__ */ new Map();
|
|
2546
2635
|
restored = false;
|
|
2547
2636
|
anchor = null;
|
|
@@ -2908,8 +2997,14 @@ var TxTable = class TxTable {
|
|
|
2908
2997
|
}
|
|
2909
2998
|
emitLazyLoad() {
|
|
2910
2999
|
if (!this.lazy()) return;
|
|
3000
|
+
const event = this.lazyEvent();
|
|
3001
|
+
if (JSON.stringify(event) === this.lastLazyLoad) return;
|
|
2911
3002
|
this.lastRange = "";
|
|
2912
|
-
this.
|
|
3003
|
+
this.sendLazyLoad(event);
|
|
3004
|
+
}
|
|
3005
|
+
sendLazyLoad(event) {
|
|
3006
|
+
this.lastLazyLoad = JSON.stringify(event);
|
|
3007
|
+
this.lazyLoad.emit(event);
|
|
2913
3008
|
}
|
|
2914
3009
|
lazyEvent() {
|
|
2915
3010
|
return {
|
|
@@ -3437,7 +3532,7 @@ var TxTable = class TxTable {
|
|
|
3437
3532
|
const range = `${start}:${end}`;
|
|
3438
3533
|
if (!missing || range === this.lastRange) return;
|
|
3439
3534
|
this.lastRange = range;
|
|
3440
|
-
this.
|
|
3535
|
+
this.sendLazyLoad({
|
|
3441
3536
|
...this.lazyEvent(),
|
|
3442
3537
|
first: start,
|
|
3443
3538
|
rows: end - start
|
|
@@ -3458,6 +3553,9 @@ var TxTable = class TxTable {
|
|
|
3458
3553
|
exportRows() {
|
|
3459
3554
|
return this.sortedRows().filter((row) => row !== null && row !== void 0);
|
|
3460
3555
|
}
|
|
3556
|
+
cardExpansionId(item) {
|
|
3557
|
+
return `${this.cardIdBase}-${item.index}-expansion`;
|
|
3558
|
+
}
|
|
3461
3559
|
canExpand(item) {
|
|
3462
3560
|
const expandable = this.expandableRows();
|
|
3463
3561
|
return !expandable || expandable(item.row, item.index);
|
|
@@ -4473,8 +4571,8 @@ var TxTable = class TxTable {
|
|
|
4473
4571
|
isSignal: true
|
|
4474
4572
|
}],
|
|
4475
4573
|
ngImport: i0,
|
|
4476
|
-
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 @if (caption(); as caption) {\n <caption class=\"tx-table__sr-only\">{{ caption }}</caption>\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 @defer (on immediate) {\n <tx-input-number\n txTableEditorFocus\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 } @placeholder {\n <ng-container [ngTemplateOutlet]=\"pendingEditor\" [ngTemplateOutletContext]=\"{ $implicit: draftValue(item, column.column) }\" />\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 @defer (on immediate) {\n <tx-datepicker\n txTableEditorFocus\n size=\"small\"\n class=\"tx-table__editor-control\"\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"dateDraft(draftValue(item, column.column))\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n } @placeholder {\n <ng-container [ngTemplateOutlet]=\"pendingEditor\" [ngTemplateOutletContext]=\"{ $implicit: displayValue(item.row, column.column) }\" />\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\n<ng-template #pendingEditor let-value>\n <input txInput type=\"text\" size=\"small\" class=\"tx-table__editor-control tx-table__editor-pending\" readonly tabindex=\"-1\" aria-hidden=\"true\" [unstyled]=\"isUnstyled()\" [value]=\"value ?? ''\" />\n</ng-template>\n",
|
|
4477
|
-
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"],
|
|
4574
|
+
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 [ngModelOptions]=\"{ standalone: true }\"\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 @if (caption(); as caption) {\n <caption class=\"tx-table__sr-only\">{{ caption }}</caption>\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 [ngModelOptions]=\"{ standalone: true }\"\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 [ngModelOptions]=\"{ standalone: true }\"\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 @if (item.group?.first && rowGroupMode() === 'subheader') {\n <div role=\"listitem\" class=\"tx-table__card-group\">\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 </div>\n }\n @if (!item.group?.collapsed) {\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 [attr.data-key]=\"item.key\"\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 [ngModelOptions]=\"{ standalone: true }\"\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 [ngModelOptions]=\"{ standalone: true }\"\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 }\n @if (expansionTemplate(); as expansion) {\n @if (canExpand(item)) {\n @let expansionId = cardExpansionId(item);\n <button\n type=\"button\"\n class=\"tx-table__card-toggle\"\n [attr.aria-expanded]=\"item.expanded\"\n [attr.aria-controls]=\"expansionId\"\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 <span>{{ item.expanded ? translations().collapseRow : translations().expandRow }}</span>\n </button>\n <div\n class=\"tx-table__expansion-body tx-table__card-expansion\"\n [id]=\"expansionId\"\n [class.tx-table__expansion-body--open]=\"item.expanded\"\n (transitionend)=\"finishClosing(item.key, $event)\"\n >\n @if (item.expanded || isClosing(item.key)) {\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 }\n </div>\n }\n }\n @if (!cardTemplate()) {\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 @if (item.group?.last && rowGroupMode() === 'subheader' && groupFooterTemplate(); as footer) {\n <div role=\"listitem\" class=\"tx-table__card-group tx-table__card-group--footer\">\n <ng-container [ngTemplateOutlet]=\"footer.templateRef\" [ngTemplateOutletContext]=\"groupContext(item)\" />\n </div>\n }\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 [ngModelOptions]=\"{ standalone: true }\"\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 [ngModelOptions]=\"{ standalone: true }\"\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 [ngModelOptions]=\"{ standalone: true }\"\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 [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n } @else {\n @switch (column.column.editType ?? 'text') {\n @case ('numeric') {\n @defer (on immediate) {\n <tx-input-number\n txTableEditorFocus\n size=\"small\"\n class=\"tx-table__editor-control\"\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"draftValue(item, column.column)\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n } @placeholder {\n <ng-container [ngTemplateOutlet]=\"pendingEditor\" [ngTemplateOutletContext]=\"{ $implicit: draftValue(item, column.column) }\" />\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 [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n }\n @case ('date') {\n @defer (on immediate) {\n <tx-datepicker\n txTableEditorFocus\n size=\"small\"\n class=\"tx-table__editor-control\"\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"dateDraft(draftValue(item, column.column))\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n } @placeholder {\n <ng-container [ngTemplateOutlet]=\"pendingEditor\" [ngTemplateOutletContext]=\"{ $implicit: displayValue(item.row, column.column) }\" />\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\n<ng-template #pendingEditor let-value>\n <input txInput type=\"text\" size=\"small\" class=\"tx-table__editor-control tx-table__editor-pending\" readonly tabindex=\"-1\" aria-hidden=\"true\" [unstyled]=\"isUnstyled()\" [value]=\"value ?? ''\" />\n</ng-template>\n",
|
|
4575
|
+
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}[data-align=center]>.tx-table__header-content{justify-content:center}[data-align=end]>.tx-table__header-content{justify-content:flex-end}[data-align=center]>.tx-table__header-content>.tx-table__filter,[data-align=end]>.tx-table__header-content>.tx-table__filter{margin-inline-start: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-group{grid-column:1/-1;min-width:0}.tx-table__card-toggle{display:flex;align-items:center;width:100%;margin:0;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:start;cursor:pointer}.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__card-group{padding:var(--tx-table-card-field-padding);border-radius:var(--tx-table-card-border-radius);background:var(--tx-table-group-background);font-weight:var(--tx-table-group-font-weight)}:host([data-styled]) .tx-table__card-group--footer{background:none;font-weight:var(--tx-font-weight-regular)}:host([data-styled]) .tx-table__card-toggle{gap:var(--tx-table-card-field-gap);padding:var(--tx-table-card-field-padding);border-radius:var(--tx-table-card-border-radius);color:var(--tx-table-row-toggle-button-color);font-size:var(--tx-table-card-field-font-size);transition:color var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__card-toggle:hover{color:var(--tx-table-row-toggle-button-hover-color)}:host([data-styled]) .tx-table__card-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:calc(var(--tx-table-row-toggle-button-focus-ring-width) * -1);box-shadow:var(--tx-table-row-toggle-button-focus-ring-shadow)}:host([data-styled]) .tx-table__card--custom>.tx-table__card-toggle{border-top:1px solid var(--tx-table-card-border-color)}:host([data-styled]) .tx-table__card-expansion .tx-table__expansion-content{padding:var(--tx-table-card-field-padding);border-top:1px solid var(--tx-table-card-border-color)}: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__card-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"],
|
|
4478
4576
|
dependencies: [
|
|
4479
4577
|
{
|
|
4480
4578
|
kind: "directive",
|
|
@@ -4808,6 +4906,7 @@ var TxTable = class TxTable {
|
|
|
4808
4906
|
"tiered",
|
|
4809
4907
|
"placement",
|
|
4810
4908
|
"offset",
|
|
4909
|
+
"arrow",
|
|
4811
4910
|
"variant",
|
|
4812
4911
|
"ariaLabel",
|
|
4813
4912
|
"ariaLabelledBy",
|
|
@@ -4825,7 +4924,8 @@ var TxTable = class TxTable {
|
|
|
4825
4924
|
{
|
|
4826
4925
|
kind: "directive",
|
|
4827
4926
|
type: i14.TxMenuItemTemplate,
|
|
4828
|
-
selector: "ng-template[txMenuItem]"
|
|
4927
|
+
selector: "ng-template[txMenuItem]",
|
|
4928
|
+
inputs: ["txMenuItemOf"]
|
|
4829
4929
|
},
|
|
4830
4930
|
{
|
|
4831
4931
|
kind: "component",
|
|
@@ -4902,8 +5002,8 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
4902
5002
|
"[class.tx-table--loading]": "loading()"
|
|
4903
5003
|
},
|
|
4904
5004
|
viewProviders: [provideTxIconDefaults(TABLE_ICON_DEFAULTS)],
|
|
4905
|
-
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 @if (caption(); as caption) {\n <caption class=\"tx-table__sr-only\">{{ caption }}</caption>\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 @defer (on immediate) {\n <tx-input-number\n txTableEditorFocus\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 } @placeholder {\n <ng-container [ngTemplateOutlet]=\"pendingEditor\" [ngTemplateOutletContext]=\"{ $implicit: draftValue(item, column.column) }\" />\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 @defer (on immediate) {\n <tx-datepicker\n txTableEditorFocus\n size=\"small\"\n class=\"tx-table__editor-control\"\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"dateDraft(draftValue(item, column.column))\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n } @placeholder {\n <ng-container [ngTemplateOutlet]=\"pendingEditor\" [ngTemplateOutletContext]=\"{ $implicit: displayValue(item.row, column.column) }\" />\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\n<ng-template #pendingEditor let-value>\n <input txInput type=\"text\" size=\"small\" class=\"tx-table__editor-control tx-table__editor-pending\" readonly tabindex=\"-1\" aria-hidden=\"true\" [unstyled]=\"isUnstyled()\" [value]=\"value ?? ''\" />\n</ng-template>\n",
|
|
4906
|
-
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"]
|
|
5005
|
+
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 [ngModelOptions]=\"{ standalone: true }\"\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 @if (caption(); as caption) {\n <caption class=\"tx-table__sr-only\">{{ caption }}</caption>\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 [ngModelOptions]=\"{ standalone: true }\"\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 [ngModelOptions]=\"{ standalone: true }\"\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 @if (item.group?.first && rowGroupMode() === 'subheader') {\n <div role=\"listitem\" class=\"tx-table__card-group\">\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 </div>\n }\n @if (!item.group?.collapsed) {\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 [attr.data-key]=\"item.key\"\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 [ngModelOptions]=\"{ standalone: true }\"\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 [ngModelOptions]=\"{ standalone: true }\"\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 }\n @if (expansionTemplate(); as expansion) {\n @if (canExpand(item)) {\n @let expansionId = cardExpansionId(item);\n <button\n type=\"button\"\n class=\"tx-table__card-toggle\"\n [attr.aria-expanded]=\"item.expanded\"\n [attr.aria-controls]=\"expansionId\"\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 <span>{{ item.expanded ? translations().collapseRow : translations().expandRow }}</span>\n </button>\n <div\n class=\"tx-table__expansion-body tx-table__card-expansion\"\n [id]=\"expansionId\"\n [class.tx-table__expansion-body--open]=\"item.expanded\"\n (transitionend)=\"finishClosing(item.key, $event)\"\n >\n @if (item.expanded || isClosing(item.key)) {\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 }\n </div>\n }\n }\n @if (!cardTemplate()) {\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 @if (item.group?.last && rowGroupMode() === 'subheader' && groupFooterTemplate(); as footer) {\n <div role=\"listitem\" class=\"tx-table__card-group tx-table__card-group--footer\">\n <ng-container [ngTemplateOutlet]=\"footer.templateRef\" [ngTemplateOutletContext]=\"groupContext(item)\" />\n </div>\n }\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 [ngModelOptions]=\"{ standalone: true }\"\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 [ngModelOptions]=\"{ standalone: true }\"\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 [ngModelOptions]=\"{ standalone: true }\"\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 [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n } @else {\n @switch (column.column.editType ?? 'text') {\n @case ('numeric') {\n @defer (on immediate) {\n <tx-input-number\n txTableEditorFocus\n size=\"small\"\n class=\"tx-table__editor-control\"\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"draftValue(item, column.column)\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n } @placeholder {\n <ng-container [ngTemplateOutlet]=\"pendingEditor\" [ngTemplateOutletContext]=\"{ $implicit: draftValue(item, column.column) }\" />\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 [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n }\n @case ('date') {\n @defer (on immediate) {\n <tx-datepicker\n txTableEditorFocus\n size=\"small\"\n class=\"tx-table__editor-control\"\n [ariaLabel]=\"label(column.column)\"\n [unstyled]=\"isUnstyled()\"\n [ngModel]=\"dateDraft(draftValue(item, column.column))\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setDraft(item, column.column, $event)\"\n />\n } @placeholder {\n <ng-container [ngTemplateOutlet]=\"pendingEditor\" [ngTemplateOutletContext]=\"{ $implicit: displayValue(item.row, column.column) }\" />\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\n<ng-template #pendingEditor let-value>\n <input txInput type=\"text\" size=\"small\" class=\"tx-table__editor-control tx-table__editor-pending\" readonly tabindex=\"-1\" aria-hidden=\"true\" [unstyled]=\"isUnstyled()\" [value]=\"value ?? ''\" />\n</ng-template>\n",
|
|
5006
|
+
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}[data-align=center]>.tx-table__header-content{justify-content:center}[data-align=end]>.tx-table__header-content{justify-content:flex-end}[data-align=center]>.tx-table__header-content>.tx-table__filter,[data-align=end]>.tx-table__header-content>.tx-table__filter{margin-inline-start: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-group{grid-column:1/-1;min-width:0}.tx-table__card-toggle{display:flex;align-items:center;width:100%;margin:0;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:start;cursor:pointer}.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__card-group{padding:var(--tx-table-card-field-padding);border-radius:var(--tx-table-card-border-radius);background:var(--tx-table-group-background);font-weight:var(--tx-table-group-font-weight)}:host([data-styled]) .tx-table__card-group--footer{background:none;font-weight:var(--tx-font-weight-regular)}:host([data-styled]) .tx-table__card-toggle{gap:var(--tx-table-card-field-gap);padding:var(--tx-table-card-field-padding);border-radius:var(--tx-table-card-border-radius);color:var(--tx-table-row-toggle-button-color);font-size:var(--tx-table-card-field-font-size);transition:color var(--tx-table-transition-duration)}:host([data-styled]) .tx-table__card-toggle:hover{color:var(--tx-table-row-toggle-button-hover-color)}:host([data-styled]) .tx-table__card-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:calc(var(--tx-table-row-toggle-button-focus-ring-width) * -1);box-shadow:var(--tx-table-row-toggle-button-focus-ring-shadow)}:host([data-styled]) .tx-table__card--custom>.tx-table__card-toggle{border-top:1px solid var(--tx-table-card-border-color)}:host([data-styled]) .tx-table__card-expansion .tx-table__expansion-content{padding:var(--tx-table-card-field-padding);border-top:1px solid var(--tx-table-card-border-color)}: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__card-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"]
|
|
4907
5007
|
}]
|
|
4908
5008
|
}],
|
|
4909
5009
|
ctorParameters: () => [],
|
|
@@ -5754,6 +5854,7 @@ var TxTableActions = class TxTableActions {
|
|
|
5754
5854
|
tableTheme = injectTokens(TABLE_THEME);
|
|
5755
5855
|
table = inject(TX_TABLE, { optional: true });
|
|
5756
5856
|
host = inject(ElementRef);
|
|
5857
|
+
renderer = inject(Renderer2);
|
|
5757
5858
|
row = null;
|
|
5758
5859
|
inlineCount = input(void 0, {
|
|
5759
5860
|
...ngDevMode ? { debugName: "inlineCount" } : /* istanbul ignore next */ {},
|
|
@@ -5763,6 +5864,8 @@ var TxTableActions = class TxTableActions {
|
|
|
5763
5864
|
...ngDevMode ? { debugName: "actions" } : /* istanbul ignore next */ {},
|
|
5764
5865
|
descendants: true
|
|
5765
5866
|
});
|
|
5867
|
+
overflow = viewChild("overflow", ...ngDevMode ? [{ debugName: "overflow" }] : /* istanbul ignore next */ []);
|
|
5868
|
+
overflowPanel = viewChild("overflowPanel", ...ngDevMode ? [{ debugName: "overflowPanel" }] : /* istanbul ignore next */ []);
|
|
5766
5869
|
translations = injectTranslations();
|
|
5767
5870
|
present = computed(() => this.actions().filter((action) => !!action.id()), ...ngDevMode ? [{ debugName: "present" }] : /* istanbul ignore next */ []);
|
|
5768
5871
|
ordered = computed(() => {
|
|
@@ -5796,6 +5899,11 @@ var TxTableActions = class TxTableActions {
|
|
|
5796
5899
|
}));
|
|
5797
5900
|
this.table?.actionsStore.register(items);
|
|
5798
5901
|
});
|
|
5902
|
+
effect((onCleanup) => {
|
|
5903
|
+
const panel = this.overflowPanel()?.nativeElement;
|
|
5904
|
+
if (!panel) return;
|
|
5905
|
+
onCleanup(this.renderer.listen(panel, "click", (event) => this.closeAfterAction(panel, event), { capture: true }));
|
|
5906
|
+
});
|
|
5799
5907
|
afterNextRender(() => {
|
|
5800
5908
|
this.row = this.host.nativeElement.closest("tr, .tx-table__card");
|
|
5801
5909
|
if (this.row) this.table?.registerRowActions(this.row, this);
|
|
@@ -5804,6 +5912,10 @@ var TxTableActions = class TxTableActions {
|
|
|
5804
5912
|
if (this.row) this.table?.unregisterRowActions(this.row, this);
|
|
5805
5913
|
});
|
|
5806
5914
|
}
|
|
5915
|
+
closeAfterAction(panel, event) {
|
|
5916
|
+
const control = event.target?.closest("button, a[href], [role=\"button\"], [role=\"menuitem\"]");
|
|
5917
|
+
if (control && panel.contains(control)) this.overflow()?.hide();
|
|
5918
|
+
}
|
|
5807
5919
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
5808
5920
|
minVersion: "12.0.0",
|
|
5809
5921
|
version: "22.2.5",
|
|
@@ -5832,6 +5944,19 @@ var TxTableActions = class TxTableActions {
|
|
|
5832
5944
|
descendants: true,
|
|
5833
5945
|
isSignal: true
|
|
5834
5946
|
}],
|
|
5947
|
+
viewQueries: [{
|
|
5948
|
+
propertyName: "overflow",
|
|
5949
|
+
first: true,
|
|
5950
|
+
predicate: ["overflow"],
|
|
5951
|
+
descendants: true,
|
|
5952
|
+
isSignal: true
|
|
5953
|
+
}, {
|
|
5954
|
+
propertyName: "overflowPanel",
|
|
5955
|
+
first: true,
|
|
5956
|
+
predicate: ["overflowPanel"],
|
|
5957
|
+
descendants: true,
|
|
5958
|
+
isSignal: true
|
|
5959
|
+
}],
|
|
5835
5960
|
ngImport: i0,
|
|
5836
5961
|
template: `
|
|
5837
5962
|
@for (action of inlineActions(); track action.id()) {
|
|
@@ -5849,7 +5974,7 @@ var TxTableActions = class TxTableActions {
|
|
|
5849
5974
|
[txPopoverTrigger]="overflow"
|
|
5850
5975
|
></button>
|
|
5851
5976
|
<tx-popover #overflow placement="bottom-end">
|
|
5852
|
-
<div class="tx-table-actions__overflow">
|
|
5977
|
+
<div #overflowPanel class="tx-table-actions__overflow">
|
|
5853
5978
|
@for (action of overflowActions(); track action.id()) {
|
|
5854
5979
|
<ng-container [ngTemplateOutlet]="action.templateRef" />
|
|
5855
5980
|
}
|
|
@@ -6001,7 +6126,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6001
6126
|
[txPopoverTrigger]="overflow"
|
|
6002
6127
|
></button>
|
|
6003
6128
|
<tx-popover #overflow placement="bottom-end">
|
|
6004
|
-
<div class="tx-table-actions__overflow">
|
|
6129
|
+
<div #overflowPanel class="tx-table-actions__overflow">
|
|
6005
6130
|
@for (action of overflowActions(); track action.id()) {
|
|
6006
6131
|
<ng-container [ngTemplateOutlet]="action.templateRef" />
|
|
6007
6132
|
}
|
|
@@ -6031,6 +6156,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6031
6156
|
descendants: true,
|
|
6032
6157
|
isSignal: true
|
|
6033
6158
|
}]
|
|
6159
|
+
}],
|
|
6160
|
+
overflow: [{
|
|
6161
|
+
type: i0.ViewChild,
|
|
6162
|
+
args: ["overflow", { isSignal: true }]
|
|
6163
|
+
}],
|
|
6164
|
+
overflowPanel: [{
|
|
6165
|
+
type: i0.ViewChild,
|
|
6166
|
+
args: ["overflowPanel", { isSignal: true }]
|
|
6034
6167
|
}]
|
|
6035
6168
|
}
|
|
6036
6169
|
});
|