@tectra-ng/ui 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data-view/README.md +9 -1
- package/dialog/README.md +3 -0
- package/fesm2022/tectra-ng-ui-accordion.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-carousel.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-checkbox.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-confirm.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-countdown.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-country.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-data-view.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-dialog.mjs +51 -0
- package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-email-suggestion.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-export-font.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-export.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-file-upload.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-galleria.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-highlight-text.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-image.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input-mask.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-key-filter.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-list-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-mention-textarea.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-month-calendar.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-password-generator.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-radio-button.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-sparkline.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-splitter.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-stepper.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-table.mjs +2 -2
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tabs.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-toolbar.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tooltip.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-select.mjs +20 -3
- package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-table.mjs +2 -2
- package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-virtual-scroller.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui.mjs +1 -1
- package/fesm2022/tectra-ng-ui.mjs.map +1 -1
- package/package.json +9 -9
- package/table/README.md +1 -0
- package/tree-select/README.md +1 -0
- package/types/tectra-ng-ui-accordion.d.ts +96 -65
- package/types/tectra-ng-ui-accordion.d.ts.map +1 -1
- package/types/tectra-ng-ui-amount.d.ts +40 -17
- package/types/tectra-ng-ui-amount.d.ts.map +1 -1
- package/types/tectra-ng-ui-analog-clock.d.ts +28 -41
- package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -1
- package/types/tectra-ng-ui-autocomplete.d.ts +35 -96
- package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -1
- package/types/tectra-ng-ui-avatar.d.ts +84 -259
- package/types/tectra-ng-ui-avatar.d.ts.map +1 -1
- package/types/tectra-ng-ui-badge.d.ts +18 -61
- package/types/tectra-ng-ui-badge.d.ts.map +1 -1
- package/types/tectra-ng-ui-breadcrumb.d.ts +53 -36
- package/types/tectra-ng-ui-breadcrumb.d.ts.map +1 -1
- package/types/tectra-ng-ui-button-group.d.ts +4 -0
- package/types/tectra-ng-ui-button-group.d.ts.map +1 -1
- package/types/tectra-ng-ui-button.d.ts +45 -266
- package/types/tectra-ng-ui-button.d.ts.map +1 -1
- package/types/tectra-ng-ui-card.d.ts +14 -16
- package/types/tectra-ng-ui-card.d.ts.map +1 -1
- package/types/tectra-ng-ui-carousel.d.ts +55 -27
- package/types/tectra-ng-ui-carousel.d.ts.map +1 -1
- package/types/tectra-ng-ui-cascade-select.d.ts +48 -8
- package/types/tectra-ng-ui-cascade-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-checkbox.d.ts +79 -119
- package/types/tectra-ng-ui-checkbox.d.ts.map +1 -1
- package/types/tectra-ng-ui-chip.d.ts +19 -22
- package/types/tectra-ng-ui-chip.d.ts.map +1 -1
- package/types/tectra-ng-ui-chips-input.d.ts +41 -11
- package/types/tectra-ng-ui-chips-input.d.ts.map +1 -1
- package/types/tectra-ng-ui-color-picker.d.ts +51 -47
- package/types/tectra-ng-ui-color-picker.d.ts.map +1 -1
- package/types/tectra-ng-ui-confirm.d.ts +45 -0
- package/types/tectra-ng-ui-confirm.d.ts.map +1 -1
- package/types/tectra-ng-ui-countdown.d.ts +42 -10
- package/types/tectra-ng-ui-countdown.d.ts.map +1 -1
- package/types/tectra-ng-ui-country-select.d.ts +41 -96
- package/types/tectra-ng-ui-country-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-country.d.ts +40 -17
- package/types/tectra-ng-ui-country.d.ts.map +1 -1
- package/types/tectra-ng-ui-data-view.d.ts +92 -34
- package/types/tectra-ng-ui-data-view.d.ts.map +1 -1
- package/types/tectra-ng-ui-datepicker.d.ts +186 -147
- package/types/tectra-ng-ui-datepicker.d.ts.map +1 -1
- package/types/tectra-ng-ui-dialog.d.ts +149 -67
- package/types/tectra-ng-ui-dialog.d.ts.map +1 -1
- package/types/tectra-ng-ui-divider.d.ts +17 -12
- package/types/tectra-ng-ui-divider.d.ts.map +1 -1
- package/types/tectra-ng-ui-drawer.d.ts +31 -67
- package/types/tectra-ng-ui-drawer.d.ts.map +1 -1
- package/types/tectra-ng-ui-email-suggestion.d.ts +25 -8
- package/types/tectra-ng-ui-email-suggestion.d.ts.map +1 -1
- package/types/tectra-ng-ui-export-font.d.ts +1 -0
- package/types/tectra-ng-ui-export-font.d.ts.map +1 -1
- package/types/tectra-ng-ui-export.d.ts +238 -0
- package/types/tectra-ng-ui-export.d.ts.map +1 -1
- package/types/tectra-ng-ui-field.d.ts +24 -11
- package/types/tectra-ng-ui-field.d.ts.map +1 -1
- package/types/tectra-ng-ui-fieldset.d.ts +14 -23
- package/types/tectra-ng-ui-fieldset.d.ts.map +1 -1
- package/types/tectra-ng-ui-file-upload.d.ts +127 -115
- package/types/tectra-ng-ui-file-upload.d.ts.map +1 -1
- package/types/tectra-ng-ui-galleria.d.ts +84 -84
- package/types/tectra-ng-ui-galleria.d.ts.map +1 -1
- package/types/tectra-ng-ui-highlight-text.d.ts +24 -10
- package/types/tectra-ng-ui-highlight-text.d.ts.map +1 -1
- package/types/tectra-ng-ui-icon-field.d.ts +20 -0
- package/types/tectra-ng-ui-icon-field.d.ts.map +1 -1
- package/types/tectra-ng-ui-image.d.ts +60 -36
- package/types/tectra-ng-ui-image.d.ts.map +1 -1
- package/types/tectra-ng-ui-input-group.d.ts +9 -0
- package/types/tectra-ng-ui-input-group.d.ts.map +1 -1
- package/types/tectra-ng-ui-input-mask.d.ts +39 -0
- package/types/tectra-ng-ui-input-mask.d.ts.map +1 -1
- package/types/tectra-ng-ui-input-number.d.ts +73 -15
- package/types/tectra-ng-ui-input-number.d.ts.map +1 -1
- package/types/tectra-ng-ui-input-otp.d.ts +28 -21
- package/types/tectra-ng-ui-input-otp.d.ts.map +1 -1
- package/types/tectra-ng-ui-input.d.ts +17 -50
- package/types/tectra-ng-ui-input.d.ts.map +1 -1
- package/types/tectra-ng-ui-key-filter.d.ts +14 -0
- package/types/tectra-ng-ui-key-filter.d.ts.map +1 -1
- package/types/tectra-ng-ui-knob.d.ts +38 -18
- package/types/tectra-ng-ui-knob.d.ts.map +1 -1
- package/types/tectra-ng-ui-label.d.ts +19 -0
- package/types/tectra-ng-ui-label.d.ts.map +1 -1
- package/types/tectra-ng-ui-link.d.ts +39 -34
- package/types/tectra-ng-ui-link.d.ts.map +1 -1
- package/types/tectra-ng-ui-list-input.d.ts +54 -45
- package/types/tectra-ng-ui-list-input.d.ts.map +1 -1
- package/types/tectra-ng-ui-listbox.d.ts +24 -14
- package/types/tectra-ng-ui-listbox.d.ts.map +1 -1
- package/types/tectra-ng-ui-mention-textarea.d.ts +36 -9
- package/types/tectra-ng-ui-mention-textarea.d.ts.map +1 -1
- package/types/tectra-ng-ui-menu.d.ts +92 -166
- package/types/tectra-ng-ui-menu.d.ts.map +1 -1
- package/types/tectra-ng-ui-menubar.d.ts +29 -58
- package/types/tectra-ng-ui-menubar.d.ts.map +1 -1
- package/types/tectra-ng-ui-message.d.ts +61 -126
- package/types/tectra-ng-ui-message.d.ts.map +1 -1
- package/types/tectra-ng-ui-month-calendar.d.ts +98 -87
- package/types/tectra-ng-ui-month-calendar.d.ts.map +1 -1
- package/types/tectra-ng-ui-multiselect.d.ts +26 -96
- package/types/tectra-ng-ui-multiselect.d.ts.map +1 -1
- package/types/tectra-ng-ui-overlay-badge.d.ts +20 -9
- package/types/tectra-ng-ui-overlay-badge.d.ts.map +1 -1
- package/types/tectra-ng-ui-paginator.d.ts +69 -47
- package/types/tectra-ng-ui-paginator.d.ts.map +1 -1
- package/types/tectra-ng-ui-panel-menu.d.ts +52 -105
- package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -1
- package/types/tectra-ng-ui-panel.d.ts +22 -30
- package/types/tectra-ng-ui-panel.d.ts.map +1 -1
- package/types/tectra-ng-ui-password-generator.d.ts +27 -0
- package/types/tectra-ng-ui-password-generator.d.ts.map +1 -1
- package/types/tectra-ng-ui-password.d.ts +55 -26
- package/types/tectra-ng-ui-password.d.ts.map +1 -1
- package/types/tectra-ng-ui-pill.d.ts +23 -70
- package/types/tectra-ng-ui-pill.d.ts.map +1 -1
- package/types/tectra-ng-ui-popover.d.ts +58 -46
- package/types/tectra-ng-ui-popover.d.ts.map +1 -1
- package/types/tectra-ng-ui-progress-bar.d.ts +32 -28
- package/types/tectra-ng-ui-progress-bar.d.ts.map +1 -1
- package/types/tectra-ng-ui-progress-spinner.d.ts +18 -16
- package/types/tectra-ng-ui-progress-spinner.d.ts.map +1 -1
- package/types/tectra-ng-ui-radio-button.d.ts +64 -115
- package/types/tectra-ng-ui-radio-button.d.ts.map +1 -1
- package/types/tectra-ng-ui-rating.d.ts +40 -29
- package/types/tectra-ng-ui-rating.d.ts.map +1 -1
- package/types/tectra-ng-ui-scroll-panel.d.ts +22 -17
- package/types/tectra-ng-ui-scroll-panel.d.ts.map +1 -1
- package/types/tectra-ng-ui-select.d.ts +169 -100
- package/types/tectra-ng-ui-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-skeleton.d.ts +34 -37
- package/types/tectra-ng-ui-skeleton.d.ts.map +1 -1
- package/types/tectra-ng-ui-slider.d.ts +37 -33
- package/types/tectra-ng-ui-slider.d.ts.map +1 -1
- package/types/tectra-ng-ui-sparkline.d.ts +22 -15
- package/types/tectra-ng-ui-sparkline.d.ts.map +1 -1
- package/types/tectra-ng-ui-speed-dial.d.ts +34 -11
- package/types/tectra-ng-ui-speed-dial.d.ts.map +1 -1
- package/types/tectra-ng-ui-split-button.d.ts +28 -7
- package/types/tectra-ng-ui-split-button.d.ts.map +1 -1
- package/types/tectra-ng-ui-splitter.d.ts +47 -23
- package/types/tectra-ng-ui-splitter.d.ts.map +1 -1
- package/types/tectra-ng-ui-stat-tiles.d.ts +39 -91
- package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -1
- package/types/tectra-ng-ui-status-icon.d.ts +19 -23
- package/types/tectra-ng-ui-status-icon.d.ts.map +1 -1
- package/types/tectra-ng-ui-stepper.d.ts +106 -133
- package/types/tectra-ng-ui-stepper.d.ts.map +1 -1
- package/types/tectra-ng-ui-table.d.ts +415 -183
- package/types/tectra-ng-ui-table.d.ts.map +1 -1
- package/types/tectra-ng-ui-tabs.d.ts +91 -133
- package/types/tectra-ng-ui-tabs.d.ts.map +1 -1
- package/types/tectra-ng-ui-tag.d.ts +46 -135
- package/types/tectra-ng-ui-tag.d.ts.map +1 -1
- package/types/tectra-ng-ui-textarea.d.ts +25 -31
- package/types/tectra-ng-ui-textarea.d.ts.map +1 -1
- package/types/tectra-ng-ui-timeline.d.ts +39 -27
- package/types/tectra-ng-ui-timeline.d.ts.map +1 -1
- package/types/tectra-ng-ui-toast.d.ts +84 -78
- package/types/tectra-ng-ui-toast.d.ts.map +1 -1
- package/types/tectra-ng-ui-toggle-button.d.ts +29 -55
- package/types/tectra-ng-ui-toggle-button.d.ts.map +1 -1
- package/types/tectra-ng-ui-toggle-switch.d.ts +41 -55
- package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -1
- package/types/tectra-ng-ui-toolbar.d.ts +15 -14
- package/types/tectra-ng-ui-toolbar.d.ts.map +1 -1
- package/types/tectra-ng-ui-tooltip.d.ts +72 -22
- package/types/tectra-ng-ui-tooltip.d.ts.map +1 -1
- package/types/tectra-ng-ui-tree-select.d.ts +65 -104
- package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-tree-table.d.ts +30 -0
- package/types/tectra-ng-ui-tree-table.d.ts.map +1 -1
- package/types/tectra-ng-ui-tree.d.ts +197 -69
- package/types/tectra-ng-ui-tree.d.ts.map +1 -1
- package/types/tectra-ng-ui-truncate-text.d.ts +21 -14
- package/types/tectra-ng-ui-truncate-text.d.ts.map +1 -1
- package/types/tectra-ng-ui-virtual-scroller.d.ts +97 -13
- package/types/tectra-ng-ui-virtual-scroller.d.ts.map +1 -1
- package/types/tectra-ng-ui.d.ts +2 -1
- package/types/tectra-ng-ui.d.ts.map +1 -1
|
@@ -3,206 +3,380 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
import { ElementRef, InjectionToken, Injector, Signal, TemplateRef } from "@angular/core";
|
|
4
4
|
import { TxPassThroughOptions, TxTranslations } from "@tectra-ng/core/config";
|
|
5
5
|
import { TxLocaleService } from "@tectra-ng/core/i18n";
|
|
6
|
-
import { TectraDeepPartial } from "@tectra-ng/themes";
|
|
6
|
+
import { TectraDeepPartial, TectraTableTokens } from "@tectra-ng/themes";
|
|
7
7
|
import { TxMenuItem } from "@tectra-ng/ui/menu";
|
|
8
8
|
import { TxPageState, TxRowsPerPageOption } from "@tectra-ng/ui/paginator";
|
|
9
|
+
/** Size of `tx-table`: `small`, `medium` or `large`. */
|
|
9
10
|
export type TxTableSize = 'small' | 'medium' | 'large';
|
|
11
|
+
/** Sort direction of a column: `asc`, `desc` or `null` for unsorted. */
|
|
10
12
|
export type TxSortOrder = 'asc' | 'desc' | null;
|
|
13
|
+
/** Whether one column (`single`) or several (`multiple`) can be sorted at once. */
|
|
11
14
|
export type TxTableSortMode = 'single' | 'multiple';
|
|
15
|
+
/** How rows are selected: `single`, `multiple`, `checkbox` or `radio`. */
|
|
12
16
|
export type TxTableSelectionMode = 'single' | 'multiple' | 'checkbox' | 'radio';
|
|
17
|
+
/** What a column resize does: `expand` changes only that column, `fit` takes the width from the next column. */
|
|
13
18
|
export type TxTableColumnResizeMode = 'fit' | 'expand';
|
|
19
|
+
/** Browser storage that keeps the table state: `local` or `session`. */
|
|
14
20
|
export type TxTableStateStorage = 'local' | 'session';
|
|
21
|
+
/** Side a frozen column sticks to: `start` or `end`. */
|
|
15
22
|
export type TxTableFrozen = 'start' | 'end';
|
|
23
|
+
/** Horizontal alignment of a column: `start`, `center` or `end`. */
|
|
16
24
|
export type TxTableAlign = 'start' | 'center' | 'end';
|
|
25
|
+
/** Where the paginator shows: `top`, `bottom` or `both`. */
|
|
17
26
|
export type TxTablePaginatorPosition = 'top' | 'bottom' | 'both';
|
|
27
|
+
/** Identifier of a row: a string or a number. */
|
|
18
28
|
export type TxTableRowKey = string | number;
|
|
29
|
+
/** How column filters are offered: in a `menu` or in a `row` under the headers. */
|
|
19
30
|
export type TxTableFilterDisplay = 'menu' | 'row';
|
|
31
|
+
/** Whether `cell` or the whole `row` goes into edit. */
|
|
20
32
|
export type TxTableEditMode = 'cell' | 'row';
|
|
33
|
+
/** How row groups show: a `subheader` row or a `rowspan` cell. */
|
|
21
34
|
export type TxTableRowGroupMode = 'subheader' | 'rowspan';
|
|
35
|
+
/** Editor of a column: `text`, `numeric`, `date` or `boolean`. */
|
|
22
36
|
export type TxTableEditType = 'text' | 'numeric' | 'date' | 'boolean';
|
|
37
|
+
/** Filter of a column: `text`, `numeric`, `date` or `boolean`. */
|
|
23
38
|
export type TxTableFilterType = 'text' | 'numeric' | 'date' | 'boolean';
|
|
39
|
+
/** How the rules of one column filter combine: `and` or `or`. */
|
|
24
40
|
export type TxFilterOperator = 'and' | 'or';
|
|
41
|
+
/** How a filter value is compared with a cell: text, number, list, range and date comparisons. */
|
|
25
42
|
export type TxFilterMatchMode = 'startsWith' | 'contains' | 'notContains' | 'endsWith' | 'equals' | 'notEquals' | 'in' | 'lt' | 'lte' | 'gt' | 'gte' | 'between' | 'dateIs' | 'dateIsNot' | 'dateBefore' | 'dateAfter';
|
|
43
|
+
/** One condition of a column filter: a value and how to compare it. */
|
|
26
44
|
export interface TxFilterRule {
|
|
45
|
+
/** Value to compare with; an empty value is ignored. */
|
|
27
46
|
value: unknown;
|
|
47
|
+
/** How the cell value is compared with the filter value. */
|
|
28
48
|
matchMode: TxFilterMatchMode;
|
|
29
49
|
}
|
|
50
|
+
/** The filter of one column: its rules and how they combine. */
|
|
30
51
|
export interface TxColumnFilter {
|
|
52
|
+
/** Whether all rules (`and`) or any rule (`or`) must match. */
|
|
31
53
|
operator: TxFilterOperator;
|
|
54
|
+
/** Conditions of the filter. */
|
|
32
55
|
rules: TxFilterRule[];
|
|
33
56
|
}
|
|
57
|
+
/** Column filters by column field. */
|
|
34
58
|
export type TxTableFilters = Record<string, TxColumnFilter>;
|
|
59
|
+
/** An option of a column filter or editor: label and value. */
|
|
35
60
|
export interface TxTableFilterOption {
|
|
61
|
+
/** Text shown for the option. */
|
|
36
62
|
label: string;
|
|
63
|
+
/** Value the option stands for. */
|
|
37
64
|
value: unknown;
|
|
38
65
|
}
|
|
66
|
+
/** Payload of the table filter event: the filters and the rows that pass them. */
|
|
39
67
|
export interface TxTableFilterEvent<T = unknown> {
|
|
68
|
+
/** Column filters by field. */
|
|
40
69
|
filters: TxTableFilters;
|
|
70
|
+
/** Text of the global search. */
|
|
41
71
|
globalFilter: string;
|
|
72
|
+
/** Rows that pass the filters. */
|
|
42
73
|
filteredValue: T[];
|
|
43
74
|
}
|
|
75
|
+
/** Parts of `tx-table` that `pt` can style. */
|
|
44
76
|
export type TxTablePart = 'root' | 'toolbar' | 'frame' | 'scroller' | 'table' | 'thead' | 'headerRow' | 'headerCell' | 'sortButton' | 'sortIcon' | 'tbody' | 'row' | 'cell' | 'tfoot' | 'footerCell' | 'loading' | 'empty' | 'paginator' | 'cards' | 'card' | 'treeToggle';
|
|
77
|
+
/** Definition of one table column: field, header, sorting, sizing, filtering and editing. */
|
|
45
78
|
export interface TxTableColumn {
|
|
79
|
+
/** Row field the column shows; a dot reads a nested value, e.g. `team.name`. */
|
|
46
80
|
field: string;
|
|
81
|
+
/** Header text; the field name without it. */
|
|
47
82
|
header?: string;
|
|
83
|
+
/** Whether the column can be sorted; on unless `false`. */
|
|
48
84
|
sortable?: boolean;
|
|
85
|
+
/** Field to sort by instead of `field`. */
|
|
49
86
|
sortField?: string;
|
|
87
|
+
/** Whether the column can be dragged to another position. */
|
|
50
88
|
reorderable?: boolean;
|
|
89
|
+
/** Whether the column width can be changed by dragging. */
|
|
51
90
|
resizable?: boolean;
|
|
91
|
+
/** Whether the user can hide the column in the settings. */
|
|
52
92
|
hideable?: boolean;
|
|
93
|
+
/** Whether the column starts hidden. */
|
|
53
94
|
hidden?: boolean;
|
|
95
|
+
/** Fixed width as a CSS length; the column is not resizable. */
|
|
54
96
|
width?: string;
|
|
97
|
+
/** Starting width as a CSS length, until the column is resized. */
|
|
55
98
|
initialWidth?: string;
|
|
99
|
+
/** Smallest width as a CSS length. */
|
|
56
100
|
minWidth?: string;
|
|
101
|
+
/** Largest width as a CSS length. */
|
|
57
102
|
maxWidth?: string;
|
|
103
|
+
/** Sticks the column to the `start` or `end` side while the table scrolls. */
|
|
58
104
|
frozen?: TxTableFrozen;
|
|
105
|
+
/** Horizontal alignment of the header and cells: `start`, `center` or `end`. */
|
|
59
106
|
align?: TxTableAlign;
|
|
107
|
+
/** CSS class added to the header cell. */
|
|
60
108
|
headerClass?: string;
|
|
109
|
+
/** CSS class added to the body cells. */
|
|
61
110
|
cellClass?: string;
|
|
111
|
+
/** Footer text of the column. */
|
|
62
112
|
footer?: string;
|
|
113
|
+
/** Makes this column the title of the card on narrow screens. */
|
|
63
114
|
cardTitle?: boolean;
|
|
115
|
+
/** Leaves the column out of the card on narrow screens. */
|
|
64
116
|
hideInCard?: boolean;
|
|
117
|
+
/** Turns on the filter of the column. */
|
|
65
118
|
filter?: boolean;
|
|
119
|
+
/** Field to filter by instead of `field`. */
|
|
66
120
|
filterField?: string;
|
|
121
|
+
/** Kind of filter: `text`, `numeric`, `date` or `boolean`. */
|
|
67
122
|
filterType?: TxTableFilterType;
|
|
123
|
+
/** Match modes the filter offers; the first one is the default. */
|
|
68
124
|
filterMatchModes?: TxFilterMatchMode[];
|
|
125
|
+
/** Options for a multi select filter that uses the `in` match mode. */
|
|
69
126
|
filterOptions?: TxTableFilterOption[];
|
|
127
|
+
/** Placeholder of the filter input. */
|
|
70
128
|
filterPlaceholder?: string;
|
|
129
|
+
/** Whether the cells of the column can be edited. */
|
|
71
130
|
editable?: boolean;
|
|
131
|
+
/** Kind of editor: `text`, `numeric`, `date` or `boolean`. */
|
|
72
132
|
editType?: TxTableEditType;
|
|
133
|
+
/** Options for a select editor. */
|
|
73
134
|
editOptions?: TxTableFilterOption[];
|
|
74
135
|
}
|
|
136
|
+
/** One sorted column: its field and direction. */
|
|
75
137
|
export interface TxSortMeta {
|
|
138
|
+
/** Field of the sorted column. */
|
|
76
139
|
field: string;
|
|
140
|
+
/** Sort direction: `asc` or `desc`. */
|
|
77
141
|
order: Exclude<TxSortOrder, null>;
|
|
78
142
|
}
|
|
143
|
+
/** Payload of the table sort event: the sorted column and the full multi-sort list. */
|
|
79
144
|
export interface TxTableSortEvent {
|
|
145
|
+
/** Field of the sorted column, or `null` when the sort was cleared. */
|
|
80
146
|
field: string | null;
|
|
147
|
+
/** Sort direction of that column. */
|
|
81
148
|
order: TxSortOrder;
|
|
149
|
+
/** All sorted columns, in sort order. */
|
|
82
150
|
multiSortMeta: TxSortMeta[];
|
|
83
151
|
}
|
|
152
|
+
/** Payload of the lazy load event: the page, sort and filters to load from the server. */
|
|
84
153
|
export interface TxTableLazyLoadEvent {
|
|
154
|
+
/** Index of the first row to load. */
|
|
85
155
|
first: number;
|
|
156
|
+
/** Number of rows to load. */
|
|
86
157
|
rows: number;
|
|
158
|
+
/** Field of the sorted column, or `null`. */
|
|
87
159
|
sortField: string | null;
|
|
160
|
+
/** Sort direction of that column. */
|
|
88
161
|
sortOrder: TxSortOrder;
|
|
162
|
+
/** All sorted columns, in sort order. */
|
|
89
163
|
multiSortMeta: TxSortMeta[];
|
|
164
|
+
/** Column filters by field. */
|
|
90
165
|
filters: TxTableFilters;
|
|
166
|
+
/** Text of the global search. */
|
|
91
167
|
globalFilter: string;
|
|
92
168
|
}
|
|
169
|
+
/** Payload of the table page event: the paginator state. */
|
|
93
170
|
export type TxTablePageEvent = TxPageState;
|
|
171
|
+
/** Payload of the row events: the row, its position and the DOM event. */
|
|
94
172
|
export interface TxTableRowEvent<T = unknown> {
|
|
173
|
+
/** The row. */
|
|
95
174
|
row: T;
|
|
175
|
+
/** Position of the row. */
|
|
96
176
|
index: number;
|
|
177
|
+
/** The DOM event that caused it, when there is one. */
|
|
97
178
|
originalEvent?: Event;
|
|
98
179
|
}
|
|
180
|
+
/** Payload of the row reorder event: the move and the new row order. */
|
|
99
181
|
export interface TxTableRowReorderEvent<T = unknown> {
|
|
182
|
+
/** Old position of the row. */
|
|
100
183
|
from: number;
|
|
184
|
+
/** New position of the row. */
|
|
101
185
|
to: number;
|
|
186
|
+
/** The rows in the new order; set it as `value`. */
|
|
102
187
|
value: T[];
|
|
103
188
|
}
|
|
189
|
+
/** Context of the group header and group footer templates. */
|
|
104
190
|
export interface TxTableGroupContext<T = unknown> {
|
|
191
|
+
/** First row of the group. */
|
|
105
192
|
$implicit: T;
|
|
193
|
+
/** Value of the field the rows are grouped by. */
|
|
106
194
|
value: unknown;
|
|
195
|
+
/** Number of rows in the group. */
|
|
107
196
|
count: number;
|
|
197
|
+
/** Rows of the group. */
|
|
108
198
|
rows: T[];
|
|
199
|
+
/** Whether the group is collapsed. */
|
|
109
200
|
collapsed: boolean;
|
|
201
|
+
/** Collapses or expands the group. */
|
|
110
202
|
toggle: () => void;
|
|
111
203
|
}
|
|
204
|
+
/** Payload of the column resize event. */
|
|
112
205
|
export interface TxTableColumnResizeEvent {
|
|
206
|
+
/** Field of the resized column. */
|
|
113
207
|
field: string;
|
|
208
|
+
/** New width of the column, in px. */
|
|
114
209
|
width: number;
|
|
115
210
|
}
|
|
211
|
+
/** Payload of the column reorder event: the new column order and the move. */
|
|
116
212
|
export interface TxTableColumnReorderEvent {
|
|
213
|
+
/** The columns in the new order. */
|
|
117
214
|
columns: TxTableColumn[];
|
|
215
|
+
/** Old position of the column. */
|
|
118
216
|
from: number;
|
|
217
|
+
/** New position of the column. */
|
|
119
218
|
to: number;
|
|
120
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* View state saved under `stateKey`: widths, order, hidden columns, sort, page, filters and action
|
|
222
|
+
* settings.
|
|
223
|
+
*/
|
|
121
224
|
export interface TxTableState {
|
|
225
|
+
/** Column widths in px by field. */
|
|
122
226
|
widths?: Record<string, number>;
|
|
227
|
+
/** Fields of the columns in display order. */
|
|
123
228
|
order?: string[];
|
|
229
|
+
/** Fields of the hidden columns. */
|
|
124
230
|
hidden?: string[];
|
|
231
|
+
/** Field of the sorted column, or `null`. */
|
|
125
232
|
sortField?: string | null;
|
|
233
|
+
/** Sort direction of that column. */
|
|
126
234
|
sortOrder?: TxSortOrder;
|
|
235
|
+
/** All sorted columns, in sort order. */
|
|
127
236
|
multiSortMeta?: TxSortMeta[];
|
|
237
|
+
/** Index of the first row of the current page. */
|
|
128
238
|
first?: number;
|
|
239
|
+
/** Number of rows per page. */
|
|
129
240
|
rows?: number;
|
|
241
|
+
/** Column filters by field. */
|
|
130
242
|
filters?: TxTableFilters;
|
|
243
|
+
/** Text of the global search. */
|
|
131
244
|
globalFilter?: string;
|
|
245
|
+
/** Ids of the row actions in display order. */
|
|
132
246
|
actionOrder?: string[];
|
|
247
|
+
/** Ids of the row actions shown inline instead of in the popover. */
|
|
133
248
|
pinnedActions?: string[];
|
|
134
249
|
}
|
|
250
|
+
/** Payload of the cell edit events. */
|
|
135
251
|
export interface TxTableCellEditEvent<T = unknown> {
|
|
252
|
+
/** The row being edited. */
|
|
136
253
|
row: T;
|
|
254
|
+
/** Position of the row. */
|
|
137
255
|
index: number;
|
|
256
|
+
/** Field of the edited cell. */
|
|
138
257
|
field: string;
|
|
258
|
+
/** Current value of the cell. */
|
|
139
259
|
value: unknown;
|
|
260
|
+
/** Value of the cell before the edit. */
|
|
140
261
|
previousValue: unknown;
|
|
141
262
|
}
|
|
263
|
+
/** Payload of the row edit events. */
|
|
142
264
|
export interface TxTableRowEditEvent<T = unknown> {
|
|
265
|
+
/** The row being edited. */
|
|
143
266
|
row: T;
|
|
267
|
+
/** Position of the row. */
|
|
144
268
|
index: number;
|
|
269
|
+
/** Changed values by field. */
|
|
145
270
|
changes: Record<string, unknown>;
|
|
271
|
+
/** Values before the edit by field. */
|
|
146
272
|
previous: Record<string, unknown>;
|
|
147
273
|
}
|
|
274
|
+
/** Context of the `txTableEditor` template of a column. */
|
|
148
275
|
export interface TxTableEditorContext<T = unknown> {
|
|
276
|
+
/** The row being edited. */
|
|
149
277
|
$implicit: T;
|
|
278
|
+
/** The row being edited. */
|
|
150
279
|
row: T;
|
|
280
|
+
/** Position of the row. */
|
|
151
281
|
index: number;
|
|
282
|
+
/** The column being edited. */
|
|
152
283
|
column: TxTableColumn;
|
|
284
|
+
/** Current value of the editor. */
|
|
153
285
|
value: unknown;
|
|
286
|
+
/** Sets the value of the editor. */
|
|
154
287
|
set: (value: unknown) => void;
|
|
288
|
+
/** Saves the edit. */
|
|
155
289
|
commit: () => void;
|
|
290
|
+
/** Cancels the edit. */
|
|
156
291
|
cancel: () => void;
|
|
157
292
|
}
|
|
293
|
+
/** Context of the `txTableCell` template of a column. */
|
|
158
294
|
export interface TxTableCellContext<T = unknown> {
|
|
295
|
+
/** The row. */
|
|
159
296
|
$implicit: T;
|
|
297
|
+
/** The row. */
|
|
160
298
|
row: T;
|
|
299
|
+
/** The tree node of the row, when the table shows a tree. */
|
|
161
300
|
node: unknown;
|
|
301
|
+
/** Position of the row. */
|
|
162
302
|
index: number;
|
|
303
|
+
/** The column of the cell. */
|
|
163
304
|
column: TxTableColumn;
|
|
305
|
+
/** Value of the column field in the row. */
|
|
164
306
|
value: unknown;
|
|
165
307
|
}
|
|
308
|
+
/** Context of the header and footer cell templates. */
|
|
166
309
|
export interface TxTableHeaderContext {
|
|
310
|
+
/** The column. */
|
|
167
311
|
$implicit: TxTableColumn;
|
|
168
312
|
}
|
|
313
|
+
/** Context of the row templates: actions, expansion and card. */
|
|
169
314
|
export interface TxTableRowContext<T = unknown> {
|
|
315
|
+
/** The row. */
|
|
170
316
|
$implicit: T;
|
|
317
|
+
/** The tree node of the row, when the table shows a tree. */
|
|
171
318
|
node: unknown;
|
|
319
|
+
/** Position of the row. */
|
|
172
320
|
index: number;
|
|
173
321
|
}
|
|
322
|
+
/** Context of the `txTableEmpty` template. */
|
|
174
323
|
export interface TxTableEmptyContext {
|
|
324
|
+
/** Number of data columns, e.g. for a `colspan`. */
|
|
175
325
|
$implicit: number;
|
|
176
326
|
}
|
|
327
|
+
/** Config of a `*txTableAction`: its label and id. */
|
|
177
328
|
export interface TxTableActionConfig {
|
|
329
|
+
/** Text of the action in the settings and the right-click menu. */
|
|
178
330
|
label: string;
|
|
331
|
+
/** Id of the action; a slug of the label by default. */
|
|
179
332
|
id?: string;
|
|
180
333
|
}
|
|
334
|
+
/** A registered row action as the settings list shows it. */
|
|
181
335
|
export interface TxTableActionItem {
|
|
336
|
+
/** Id of the action. */
|
|
182
337
|
id: string;
|
|
338
|
+
/** Text of the action. */
|
|
183
339
|
label: string;
|
|
184
340
|
}
|
|
341
|
+
/** Keeps the order and pinned state of the row actions of one table. */
|
|
185
342
|
export declare class TxTableActionsStore {
|
|
343
|
+
/** How many actions show inline until the user pins others. */
|
|
186
344
|
readonly inlineCount: import("@angular/core").WritableSignal<number>;
|
|
345
|
+
/** Ids of the actions in the order the user chose. */
|
|
187
346
|
readonly order: import("@angular/core").WritableSignal<string[]>;
|
|
347
|
+
/** Ids of the actions the user pinned inline; `null` while the user has not chosen. */
|
|
188
348
|
readonly pinned: import("@angular/core").WritableSignal<ReadonlySet<string> | null>;
|
|
189
349
|
private readonly registry;
|
|
190
350
|
private listener;
|
|
351
|
+
/** Registered actions in display order. */
|
|
191
352
|
readonly registeredActions: import("@angular/core").Signal<TxTableActionItem[]>;
|
|
192
353
|
private readonly defaultPinned;
|
|
354
|
+
/** Ids of the actions shown inline. */
|
|
193
355
|
readonly pinnedIds: import("@angular/core").Signal<ReadonlySet<string>>;
|
|
356
|
+
/** Width of the actions column that fits the inline buttons, as a CSS length. */
|
|
194
357
|
readonly columnWidth: import("@angular/core").Signal<string>;
|
|
358
|
+
/** Sets the function called after the user pins or reorders actions. */
|
|
195
359
|
onChange(listener: () => void): void;
|
|
360
|
+
/** Loads the saved action order and pinned ids. */
|
|
196
361
|
restore(order: readonly string[] | undefined, pinned: readonly string[] | undefined): void;
|
|
362
|
+
/** Adds actions, or updates the label of known ones. */
|
|
197
363
|
register(actions: readonly TxTableActionItem[]): void;
|
|
364
|
+
/** Whether the action with the given id is shown inline. */
|
|
198
365
|
isPinned(id: string): boolean;
|
|
366
|
+
/** Shows the action inline or moves it to the popover. */
|
|
199
367
|
setPinned(id: string, pinned: boolean): void;
|
|
368
|
+
/** Moves an action from one position to another. */
|
|
200
369
|
reorder(from: number, to: number): void;
|
|
201
370
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxTableActionsStore, never>;
|
|
202
371
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
203
372
|
}
|
|
373
|
+
/**
|
|
374
|
+
* `<ng-template txTableCell="field" let-row let-value="value" let-index="index">` — content of the cells of a column
|
|
375
|
+
* @see https://tectra-ng.com/components/table
|
|
376
|
+
*/
|
|
204
377
|
export declare class TxTableCell {
|
|
205
378
|
readonly templateRef: TemplateRef<TxTableCellContext<unknown>>;
|
|
379
|
+
/** `<ng-template txTableCell="field" let-row let-value="value" let-index="index">` — content of the cells of a column */
|
|
206
380
|
readonly txTableCell: import("@angular/core").InputSignal<string>;
|
|
207
381
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxTableCell, never>;
|
|
208
382
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TxTableCell, "ng-template[txTableCell]", never, {
|
|
@@ -213,8 +387,13 @@ export declare class TxTableCell {
|
|
|
213
387
|
};
|
|
214
388
|
}, {}, never, never, true, never>;
|
|
215
389
|
}
|
|
390
|
+
/**
|
|
391
|
+
* `<ng-template txTableEditor="field" let-value="value" let-set="set" let-commit="commit" let-cancel="cancel">` — own editor of a column
|
|
392
|
+
* @see https://tectra-ng.com/components/table
|
|
393
|
+
*/
|
|
216
394
|
export declare class TxTableEditor {
|
|
217
395
|
readonly templateRef: TemplateRef<TxTableEditorContext<unknown>>;
|
|
396
|
+
/** `<ng-template txTableEditor="field" let-value="value" let-set="set" let-commit="commit" let-cancel="cancel">` — own editor of a column */
|
|
218
397
|
readonly txTableEditor: import("@angular/core").InputSignal<string>;
|
|
219
398
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxTableEditor, never>;
|
|
220
399
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TxTableEditor, "ng-template[txTableEditor]", never, {
|
|
@@ -225,8 +404,13 @@ export declare class TxTableEditor {
|
|
|
225
404
|
};
|
|
226
405
|
}, {}, never, never, true, never>;
|
|
227
406
|
}
|
|
407
|
+
/**
|
|
408
|
+
* `<ng-template txTableHeaderCell="field" let-column>` — own header content
|
|
409
|
+
* @see https://tectra-ng.com/components/table
|
|
410
|
+
*/
|
|
228
411
|
export declare class TxTableHeaderCell {
|
|
229
412
|
readonly templateRef: TemplateRef<TxTableHeaderContext>;
|
|
413
|
+
/** `<ng-template txTableHeaderCell="field" let-column>` — own header content */
|
|
230
414
|
readonly txTableHeaderCell: import("@angular/core").InputSignal<string>;
|
|
231
415
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxTableHeaderCell, never>;
|
|
232
416
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TxTableHeaderCell, "ng-template[txTableHeaderCell]", never, {
|
|
@@ -237,8 +421,13 @@ export declare class TxTableHeaderCell {
|
|
|
237
421
|
};
|
|
238
422
|
}, {}, never, never, true, never>;
|
|
239
423
|
}
|
|
424
|
+
/**
|
|
425
|
+
* `<ng-template txTableFooterCell="field" let-column>` — footer content of a column
|
|
426
|
+
* @see https://tectra-ng.com/components/table
|
|
427
|
+
*/
|
|
240
428
|
export declare class TxTableFooterCell {
|
|
241
429
|
readonly templateRef: TemplateRef<TxTableHeaderContext>;
|
|
430
|
+
/** `<ng-template txTableFooterCell="field" let-column>` — footer content of a column */
|
|
242
431
|
readonly txTableFooterCell: import("@angular/core").InputSignal<string>;
|
|
243
432
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxTableFooterCell, never>;
|
|
244
433
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TxTableFooterCell, "ng-template[txTableFooterCell]", never, {
|
|
@@ -249,38 +438,67 @@ export declare class TxTableFooterCell {
|
|
|
249
438
|
};
|
|
250
439
|
}, {}, never, never, true, never>;
|
|
251
440
|
}
|
|
441
|
+
/**
|
|
442
|
+
* `<ng-template txTableCard let-row let-index="index">` — own card for a row on narrow screens
|
|
443
|
+
* @see https://tectra-ng.com/components/table
|
|
444
|
+
*/
|
|
252
445
|
export declare class TxTableCard {
|
|
253
446
|
readonly templateRef: TemplateRef<TxTableRowContext<unknown>>;
|
|
254
447
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxTableCard, never>;
|
|
255
448
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TxTableCard, "ng-template[txTableCard]", never, {}, {}, never, never, true, never>;
|
|
256
449
|
}
|
|
450
|
+
/**
|
|
451
|
+
* `<ng-template txTableExpansion let-row>` — content of an expanded row; adds the expand column
|
|
452
|
+
* @see https://tectra-ng.com/components/table
|
|
453
|
+
*/
|
|
257
454
|
export declare class TxTableExpansion {
|
|
258
455
|
readonly templateRef: TemplateRef<TxTableRowContext<unknown>>;
|
|
259
456
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxTableExpansion, never>;
|
|
260
457
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TxTableExpansion, "ng-template[txTableExpansion]", never, {}, {}, never, never, true, never>;
|
|
261
458
|
}
|
|
459
|
+
/**
|
|
460
|
+
* `<ng-template txTableActions let-row>` — actions column; put `tx-table-actions` with buttons marked `*txTableAction="{ label }"` inside
|
|
461
|
+
* @see https://tectra-ng.com/components/table
|
|
462
|
+
*/
|
|
262
463
|
export declare class TxTableActionsTemplate {
|
|
263
464
|
readonly templateRef: TemplateRef<TxTableRowContext<unknown>>;
|
|
264
465
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxTableActionsTemplate, never>;
|
|
265
466
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TxTableActionsTemplate, "ng-template[txTableActions]", never, {}, {}, never, never, true, never>;
|
|
266
467
|
}
|
|
468
|
+
/**
|
|
469
|
+
* `<ng-template txTableGroupHeader let-row let-value="value" let-count="count" let-toggle="toggle">` — content of a group header
|
|
470
|
+
* @see https://tectra-ng.com/components/table
|
|
471
|
+
*/
|
|
267
472
|
export declare class TxTableGroupHeader {
|
|
268
473
|
readonly templateRef: TemplateRef<TxTableGroupContext<unknown>>;
|
|
269
474
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxTableGroupHeader, never>;
|
|
270
475
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TxTableGroupHeader, "ng-template[txTableGroupHeader]", never, {}, {}, never, never, true, never>;
|
|
271
476
|
}
|
|
477
|
+
/**
|
|
478
|
+
* `<ng-template txTableGroupFooter let-value="value" let-count="count" let-rows="rows">` — row after a group, e.g. its total
|
|
479
|
+
* @see https://tectra-ng.com/components/table
|
|
480
|
+
*/
|
|
272
481
|
export declare class TxTableGroupFooter {
|
|
273
482
|
readonly templateRef: TemplateRef<TxTableGroupContext<unknown>>;
|
|
274
483
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxTableGroupFooter, never>;
|
|
275
484
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TxTableGroupFooter, "ng-template[txTableGroupFooter]", never, {}, {}, never, never, true, never>;
|
|
276
485
|
}
|
|
486
|
+
/**
|
|
487
|
+
* `<ng-template txTableEmpty>` — own content of an empty table
|
|
488
|
+
* @see https://tectra-ng.com/components/table
|
|
489
|
+
*/
|
|
277
490
|
export declare class TxTableEmpty {
|
|
278
491
|
readonly templateRef: TemplateRef<TxTableEmptyContext>;
|
|
279
492
|
static ɵfac: i0.ɵɵFactoryDeclaration<TxTableEmpty, never>;
|
|
280
493
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TxTableEmpty, "ng-template[txTableEmpty]", never, {}, {}, never, never, true, never>;
|
|
281
494
|
}
|
|
495
|
+
/**
|
|
496
|
+
* A row action button marked with `*txTableAction`; the table lists it in the settings and the right-
|
|
497
|
+
* click menu.
|
|
498
|
+
*/
|
|
282
499
|
export declare class TxTableAction {
|
|
283
500
|
readonly templateRef: TemplateRef<unknown>;
|
|
501
|
+
/** `{ label, id? }` — the label is used in the settings and the right-click menu; `id` defaults to a slug of the label */
|
|
284
502
|
readonly txTableAction: import("@angular/core").InputSignal<TxTableActionConfig>;
|
|
285
503
|
readonly id: import("@angular/core").Signal<string>;
|
|
286
504
|
readonly label: import("@angular/core").Signal<string>;
|
|
@@ -293,64 +511,120 @@ export declare class TxTableAction {
|
|
|
293
511
|
};
|
|
294
512
|
}, {}, never, never, true, never>;
|
|
295
513
|
}
|
|
514
|
+
/** Something that can offer the actions of a row for the right-click menu. */
|
|
296
515
|
export interface TxTableRowActionsSource {
|
|
516
|
+
/** Actions to show in the right-click menu, in display order. */
|
|
297
517
|
readonly menuActions: Signal<readonly TxTableAction[]>;
|
|
298
518
|
}
|
|
519
|
+
/** What `tx-table` gives its parts: view mode, actions, filters and editor hooks. */
|
|
299
520
|
export interface TxTableContext {
|
|
521
|
+
/** Whether the table shows cards on a narrow screen. */
|
|
300
522
|
readonly cardView: Signal<boolean>;
|
|
523
|
+
/** Store of the row actions. */
|
|
301
524
|
readonly actionsStore: TxTableActionsStore;
|
|
525
|
+
/** Whether columns can be reordered. */
|
|
302
526
|
readonly reorderableColumns: Signal<boolean>;
|
|
527
|
+
/** Moves a column to the position of another one. */
|
|
303
528
|
reorderColumn(field: string, targetField: string): void;
|
|
529
|
+
/** Current column filters by field. */
|
|
304
530
|
readonly filters: Signal<TxTableFilters>;
|
|
531
|
+
/** Milliseconds to wait after typing in a filter before it applies. */
|
|
305
532
|
readonly filterDelay: Signal<number>;
|
|
533
|
+
/** Sets the filter of a column, or clears it with `null`. */
|
|
306
534
|
applyFilter(field: string, filter: TxColumnFilter | null): void;
|
|
535
|
+
/** Registers the actions of a row element for the right-click menu. */
|
|
307
536
|
registerRowActions(row: Element, source: TxTableRowActionsSource): void;
|
|
537
|
+
/** Removes the actions of a row element from the right-click menu. */
|
|
308
538
|
unregisterRowActions(row: Element, source: TxTableRowActionsSource): void;
|
|
539
|
+
/** Tells the table that an editor element is ready, so it can take focus. */
|
|
309
540
|
editorLoaded(editor: HTMLElement): void;
|
|
310
541
|
}
|
|
542
|
+
/** Injection token through which the parts of a table reach its `tx-table`. */
|
|
311
543
|
export declare const TX_TABLE: InjectionToken<TxTableContext>;
|
|
544
|
+
/** Field name of the internal selection column. */
|
|
312
545
|
export declare const TX_TABLE_SELECT_FIELD = "__select";
|
|
546
|
+
/** Field name of the internal row expansion column. */
|
|
313
547
|
export declare const TX_TABLE_EXPAND_FIELD = "__expand";
|
|
548
|
+
/** Field name of the internal row actions column. */
|
|
314
549
|
export declare const TX_TABLE_ACTIONS_FIELD = "__actions";
|
|
550
|
+
/** Field name of the internal column with the edit buttons of a row. */
|
|
315
551
|
export declare const TX_TABLE_EDITOR_FIELD = "__editor";
|
|
552
|
+
/** Field name of the internal row reorder handle column. */
|
|
316
553
|
export declare const TX_TABLE_REORDER_FIELD = "__reorder";
|
|
554
|
+
/** A column as the table renders it: data or an internal column, with style and frozen position. */
|
|
317
555
|
interface TxTableRenderColumn {
|
|
556
|
+
/** The column definition. */
|
|
318
557
|
column: TxTableColumn;
|
|
558
|
+
/** Whether it is a data column or an internal one: selection, expansion, actions, editor or reorder. */
|
|
319
559
|
kind: 'data' | 'select' | 'expand' | 'actions' | 'editor' | 'reorder';
|
|
560
|
+
/** Inline styles of the column cells, such as widths. */
|
|
320
561
|
style: Record<string, string>;
|
|
562
|
+
/** Side the column is frozen to, or `null`. */
|
|
321
563
|
frozen: 'start' | 'end' | null;
|
|
564
|
+
/** Whether it is the last column frozen to the start; it gets the divider. */
|
|
322
565
|
lastFrozenStart: boolean;
|
|
566
|
+
/** Whether it is the first column frozen to the end; it gets the divider. */
|
|
323
567
|
firstFrozenEnd: boolean;
|
|
324
568
|
}
|
|
569
|
+
/** Position and state of a row in a tree table. */
|
|
325
570
|
export interface TxTableTreeInfo {
|
|
571
|
+
/** Nesting depth, from `0` at the top. */
|
|
326
572
|
level: number;
|
|
573
|
+
/** Whether the row has no children. */
|
|
327
574
|
leaf: boolean;
|
|
575
|
+
/** Whether the children are shown. */
|
|
328
576
|
expanded: boolean;
|
|
577
|
+
/** Whether the row is hidden because a parent is collapsed. */
|
|
329
578
|
hidden: boolean;
|
|
579
|
+
/** Whether the children are being loaded. */
|
|
330
580
|
loading: boolean;
|
|
581
|
+
/** Whether only some of the children are selected. */
|
|
331
582
|
partial: boolean;
|
|
583
|
+
/** Number of siblings, for `aria-setsize`. */
|
|
332
584
|
setSize: number;
|
|
585
|
+
/** Position among the siblings, for `aria-posinset`. */
|
|
333
586
|
posInSet: number;
|
|
587
|
+
/** Key of the parent row. */
|
|
334
588
|
parentKey: unknown;
|
|
335
589
|
}
|
|
590
|
+
/** A row as the table renders it: the data with its key, state and group. */
|
|
336
591
|
export interface TxTableRenderRow<T> {
|
|
592
|
+
/** The row data. */
|
|
337
593
|
row: T;
|
|
594
|
+
/** Position of the row. */
|
|
338
595
|
index: number;
|
|
596
|
+
/** Key of the row from `dataKey`. */
|
|
339
597
|
key: unknown;
|
|
598
|
+
/** Whether the row is selected. */
|
|
340
599
|
selected: boolean;
|
|
600
|
+
/** Whether the row can be selected. */
|
|
341
601
|
selectable: boolean;
|
|
602
|
+
/** Whether the row expansion is open. */
|
|
342
603
|
expanded: boolean;
|
|
604
|
+
/** Group the row belongs to, or `null`. */
|
|
343
605
|
group: TxTableRenderGroup | null;
|
|
606
|
+
/** Tree position of the row, when the table shows a tree. */
|
|
344
607
|
tree?: TxTableTreeInfo;
|
|
345
608
|
}
|
|
609
|
+
/** A row group as the table renders it. */
|
|
346
610
|
export interface TxTableRenderGroup {
|
|
611
|
+
/** Value of the field the rows are grouped by. */
|
|
347
612
|
value: unknown;
|
|
613
|
+
/** Key of the group. */
|
|
348
614
|
key: string;
|
|
615
|
+
/** Whether the row is the first of its group. */
|
|
349
616
|
first: boolean;
|
|
617
|
+
/** Whether the row is the last of its group. */
|
|
350
618
|
last: boolean;
|
|
619
|
+
/** Number of rows in the group. */
|
|
351
620
|
size: number;
|
|
621
|
+
/** Whether the group is collapsed. */
|
|
352
622
|
collapsed: boolean;
|
|
353
623
|
}
|
|
624
|
+
/**
|
|
625
|
+
* Data table for lists: sorting, pagination, server data, selection, row actions with a right-click menu, column resize, reorder and settings saved per table, frozen columns, row expansion and cards on narrow screens.
|
|
626
|
+
* @see https://tectra-ng.com/components/table
|
|
627
|
+
*/
|
|
354
628
|
export declare class TxTable<T = unknown> implements TxTableContext {
|
|
355
629
|
private readonly tableTheme;
|
|
356
630
|
private document;
|
|
@@ -359,294 +633,218 @@ export declare class TxTable<T = unknown> implements TxTableContext {
|
|
|
359
633
|
protected localeService: TxLocaleService;
|
|
360
634
|
private breakpointObserver;
|
|
361
635
|
readonly actionsStore: TxTableActionsStore;
|
|
636
|
+
/** Rows of the table */
|
|
362
637
|
readonly value: import("@angular/core").InputSignal<readonly T[] | null | undefined>;
|
|
638
|
+
/** Column definitions (`TxTableColumn[]`). Two-way: `[(columns)]` — dragging headers writes the new order */
|
|
363
639
|
readonly columns: import("@angular/core").ModelSignal<TxTableColumn[]>;
|
|
640
|
+
/** Field that identifies a row — for selection, expansion and stable rendering */
|
|
364
641
|
readonly dataKey: import("@angular/core").InputSignal<string | undefined>;
|
|
642
|
+
/** `small`, `medium` (default), `large` */
|
|
365
643
|
readonly size: import("@angular/core").InputSignal<TxTableSize>;
|
|
644
|
+
/** Borders between all cells (on by default) */
|
|
366
645
|
readonly showGridlines: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
646
|
+
/** Every second row is tinted */
|
|
367
647
|
readonly stripedRows: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
648
|
+
/** Highlights the row under the pointer (on by default) */
|
|
368
649
|
readonly rowHover: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
650
|
+
/** Maximum height of the scrolling area, e.g. `400px`; the header stays on top */
|
|
369
651
|
readonly scrollHeight: import("@angular/core").InputSignal<string | undefined>;
|
|
652
|
+
/** Blurs the table and shows a spinner; `aria-busy` on the table */
|
|
370
653
|
readonly loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
654
|
+
/** Text of an empty table; "No results found" by default (translated) */
|
|
371
655
|
readonly emptyMessage: import("@angular/core").InputSignal<string | undefined>;
|
|
656
|
+
/** Text of a `<caption>` hidden on screen: names the table for screen readers when there is no `ariaLabel`, or describes it in more words */
|
|
372
657
|
readonly caption: import("@angular/core").InputSignal<string | undefined>;
|
|
658
|
+
/** Name of the table */
|
|
373
659
|
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
660
|
+
/** Id of the element that names the table */
|
|
374
661
|
readonly ariaLabelledBy: import("@angular/core").InputSignal<string | undefined>;
|
|
662
|
+
/** Function `(row, index)` that returns classes for a row */
|
|
375
663
|
readonly rowClass: import("@angular/core").InputSignal<((row: T, index: number) => string | string[] | Record<string, boolean> | null | undefined) | undefined>;
|
|
664
|
+
/** `single` (default) or `multiple` — with `multiple`, Ctrl / ⌘ + click adds a column to the sort */
|
|
376
665
|
readonly sortMode: import("@angular/core").InputSignal<TxTableSortMode>;
|
|
666
|
+
/** Field the table is sorted by. Two-way: `[(sortField)]` */
|
|
377
667
|
readonly sortField: import("@angular/core").ModelSignal<string | null>;
|
|
668
|
+
/** `asc`, `desc` or `null`. Two-way: `[(sortOrder)]`; a click goes asc → desc → none */
|
|
378
669
|
readonly sortOrder: import("@angular/core").ModelSignal<TxSortOrder>;
|
|
670
|
+
/** Sort of `multiple` mode, `{ field, order }[]`. Two-way: `[(multiSortMeta)]` */
|
|
379
671
|
readonly multiSortMeta: import("@angular/core").ModelSignal<TxSortMeta[]>;
|
|
672
|
+
/** Rows are not sorted by the table — sort `value` yourself on `sortChange` */
|
|
380
673
|
readonly customSort: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
674
|
+
/** Rows come from a server: no local sorting or slicing, `lazyLoad` asks for data */
|
|
381
675
|
readonly lazy: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
676
|
+
/** `menu` (default) — a filter button in the header opens rules with match modes, and / or, add / remove rule, Clear and Apply; `row` — a row of filter fields under the headers with a match mode menu */
|
|
382
677
|
readonly filterDisplay: import("@angular/core").InputSignal<TxTableFilterDisplay>;
|
|
678
|
+
/** Column filters, `{ [field]: { operator, rules: { value, matchMode }[] } }`. Two-way: `[(filters)]` */
|
|
383
679
|
readonly filters: import("@angular/core").ModelSignal<TxTableFilters>;
|
|
680
|
+
/** Text searched in every column (or `globalFilterFields`). Two-way: `[(globalFilter)]` — bind it to an own search field */
|
|
384
681
|
readonly globalFilter: import("@angular/core").ModelSignal<string>;
|
|
682
|
+
/** Fields the global search looks in; the visible columns by default */
|
|
385
683
|
readonly globalFilterFields: import("@angular/core").InputSignal<string[] | undefined>;
|
|
684
|
+
/** Milliseconds to wait after typing in a text filter of the filter row (and before `lazyLoad` for the global search) */
|
|
386
685
|
readonly filterDelay: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
686
|
+
/** `lazy`: asks for the first page right away (on by default) */
|
|
387
687
|
readonly lazyLoadOnInit: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
688
|
+
/** Shows `tx-paginator` */
|
|
388
689
|
readonly paginator: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
690
|
+
/** `bottom` (default), `top` or `both` */
|
|
389
691
|
readonly paginatorPosition: import("@angular/core").InputSignal<TxTablePaginatorPosition>;
|
|
692
|
+
/** Index of the first row of the page. Two-way: `[(first)]` */
|
|
390
693
|
readonly first: import("@angular/core").ModelSignal<number>;
|
|
694
|
+
/** Rows per page. Two-way: `[(rows)]` */
|
|
391
695
|
readonly rows: import("@angular/core").ModelSignal<number>;
|
|
696
|
+
/** Number of rows of the whole list (server data) */
|
|
392
697
|
readonly totalRecords: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
|
|
698
|
+
/** Page sizes for the paginator select */
|
|
393
699
|
readonly rowsPerPageOptions: import("@angular/core").InputSignal<TxRowsPerPageOption[] | null | undefined>;
|
|
700
|
+
/** "Total: N" next to the paginator */
|
|
394
701
|
readonly showTotal: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
702
|
+
/** Page report of the paginator */
|
|
395
703
|
readonly showCurrentPageReport: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
704
|
+
/** Own page report text (`{currentPage}`, `{totalPages}`, `{first}`, `{last}`, `{rows}`, `{totalRecords}`) */
|
|
396
705
|
readonly currentPageReportTemplate: import("@angular/core").InputSignal<string | undefined>;
|
|
706
|
+
/** First and last page buttons (on by default) */
|
|
397
707
|
readonly showFirstLastIcon: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
708
|
+
/** Page number buttons (on by default) */
|
|
398
709
|
readonly showPageLinks: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
710
|
+
/** Page select of the paginator */
|
|
399
711
|
readonly showJumpToPageDropdown: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
712
|
+
/** Page field of the paginator */
|
|
400
713
|
readonly showJumpToPageInput: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
714
|
+
/** Shows the paginator also for one page (on by default) */
|
|
401
715
|
readonly alwaysShowPaginator: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
716
|
+
/** Number of page buttons */
|
|
402
717
|
readonly pageLinks: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
718
|
+
/** `single` / `multiple` — click and keys select rows; `checkbox` / `radio` — a selection column at the start */
|
|
403
719
|
readonly selectionMode: import("@angular/core").InputSignal<TxTableSelectionMode | null | undefined>;
|
|
720
|
+
/** Selected row (`single`, `radio`) or rows (`multiple`, `checkbox`). Two-way: `[(selection)]` */
|
|
404
721
|
readonly selection: import("@angular/core").ModelSignal<T | T[] | null>;
|
|
722
|
+
/** `multiple`: a click selects one row, Ctrl / ⌘ + click adds, Shift + click selects a range (on by default) */
|
|
405
723
|
readonly metaKeySelection: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
724
|
+
/** Function `(row, index)` — `false` makes a row not selectable */
|
|
406
725
|
readonly rowSelectable: import("@angular/core").InputSignal<((row: T, index: number) => boolean) | undefined>;
|
|
726
|
+
/** Own state of the "select all" checkbox — for selection across pages on the server; the table then only emits `selectAllChange` */
|
|
407
727
|
readonly selectAll: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
728
|
+
/** `cell` — a click, Enter or F2 edits a cell, Enter / Tab saves, Escape cancels; `row` — an edit column with edit, save and cancel buttons */
|
|
408
729
|
readonly editMode: import("@angular/core").InputSignal<TxTableEditMode | null | undefined>;
|
|
730
|
+
/** `dataKey` values of the rows in edit (`row` mode). Two-way: `[(editingRowKeys)]` */
|
|
409
731
|
readonly editingRowKeys: import("@angular/core").ModelSignal<unknown[]>;
|
|
732
|
+
/** `dataKey` values of the expanded rows. Two-way: `[(expandedRowKeys)]` */
|
|
410
733
|
readonly expandedRowKeys: import("@angular/core").ModelSignal<unknown[]>;
|
|
734
|
+
/** Renders only the rows in view — for long lists; needs `scrollHeight` and rows of one height. With `lazy`, rows that are `null` / `undefined` show skeletons and `lazyLoad` asks for the visible range */
|
|
411
735
|
readonly virtualScroll: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
736
|
+
/** Height of a row in px with `virtualScroll` */
|
|
412
737
|
readonly virtualScrollItemSize: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
738
|
+
/** Rows rendered above and below the view */
|
|
413
739
|
readonly virtualScrollTolerance: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
740
|
+
/** Text cut with an ellipsis shows a tooltip with the full text */
|
|
414
741
|
readonly cellTooltip: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
742
|
+
/** Separator of `exportCSV()` */
|
|
415
743
|
readonly csvSeparator: import("@angular/core").InputSignal<string>;
|
|
744
|
+
/** File name of `exportCSV()` */
|
|
416
745
|
readonly exportFilename: import("@angular/core").InputSignal<string>;
|
|
746
|
+
/** Function `(row, column)` that returns the value written to the CSV */
|
|
417
747
|
readonly exportFunction: import("@angular/core").InputSignal<((row: T, column: TxTableColumn) => unknown) | undefined>;
|
|
748
|
+
/** A drag handle column; rows move by drag or Alt + Arrow Up / Down on the handle, `rowReorder` gets the new order */
|
|
418
749
|
readonly reorderableRows: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
750
|
+
/** Rows pinned above the body; they stay under the header while the table scrolls */
|
|
419
751
|
readonly frozenValue: import("@angular/core").InputSignal<readonly T[] | null | undefined>;
|
|
752
|
+
/** Field the rows are grouped by; rows are sorted by it first */
|
|
420
753
|
readonly groupRowsBy: import("@angular/core").InputSignal<string | undefined>;
|
|
754
|
+
/** `subheader` (default) — a header row per group (and `txTableGroupFooter`); `rowspan` — the group cell spans its rows */
|
|
421
755
|
readonly rowGroupMode: import("@angular/core").InputSignal<TxTableRowGroupMode>;
|
|
756
|
+
/** Group headers get a toggle that collapses the group */
|
|
422
757
|
readonly expandableRowGroups: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
758
|
+
/** Values of the open groups; `null` (default) — all open. Two-way: `[(expandedRowGroups)]` */
|
|
423
759
|
readonly expandedRowGroups: import("@angular/core").ModelSignal<unknown[] | null>;
|
|
760
|
+
/** Function `(row, index)` — `false` hides the expand button of a row */
|
|
424
761
|
readonly expandableRows: import("@angular/core").InputSignal<((row: T, index: number) => boolean) | undefined>;
|
|
762
|
+
/** Drag handles between headers (keys: Arrow Left / Right on a handle) */
|
|
425
763
|
readonly resizableColumns: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
764
|
+
/** `expand` (default) — only the column changes, the table may scroll; `fit` — the next column gives the width */
|
|
426
765
|
readonly columnResizeMode: import("@angular/core").InputSignal<TxTableColumnResizeMode>;
|
|
766
|
+
/** Headers can be dragged to a new place (keys: Alt + Arrow Left / Right on a header) */
|
|
427
767
|
readonly reorderableColumns: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
768
|
+
/** Gear button with the visible columns; with `reorderableColumns` the list is also dragged (or Alt + Arrow Up / Down) to change the order */
|
|
428
769
|
readonly columnSettings: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
770
|
+
/** Adds the row actions tab to the settings: order (drag) and which are shown inline */
|
|
429
771
|
readonly actionsSettings: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
772
|
+
/** How many row actions are shown inline before the `…` button, until the user pins others */
|
|
430
773
|
readonly actionsInlineCount: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
774
|
+
/** Header of the actions column; "Actions" by default (translated) */
|
|
431
775
|
readonly actionsHeader: import("@angular/core").InputSignal<string | undefined>;
|
|
776
|
+
/** The actions column stays at the end while the table scrolls sideways (on by default) */
|
|
432
777
|
readonly actionsFrozen: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
778
|
+
/** Saves widths, order, hidden columns, sort, page and action settings under this key */
|
|
433
779
|
readonly stateKey: import("@angular/core").InputSignal<string | undefined>;
|
|
780
|
+
/** `local` (default) or `session` */
|
|
434
781
|
readonly stateStorage: import("@angular/core").InputSignal<TxTableStateStorage>;
|
|
782
|
+
/** Shows the toolbar row also without settings — for `[txTableToolbar]` content */
|
|
435
783
|
readonly toolbar: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
784
|
+
/** Own right-click menu (`TxMenuItem[]`); the row is in `contextMenuSelection` */
|
|
436
785
|
readonly contextMenu: import("@angular/core").InputSignal<TxMenuItem<unknown>[] | null | undefined>;
|
|
786
|
+
/** Row the context menu was opened on. Two-way: `[(contextMenuSelection)]` */
|
|
437
787
|
readonly contextMenuSelection: import("@angular/core").ModelSignal<T | null>;
|
|
788
|
+
/** Right-click opens the row actions as a menu (on by default) */
|
|
438
789
|
readonly rowContextMenu: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
790
|
+
/** Rows become cards below `breakpoint` (on by default) */
|
|
439
791
|
readonly responsive: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
792
|
+
/** Width below which rows are cards, `64rem` by default */
|
|
440
793
|
readonly breakpoint: import("@angular/core").InputSignal<string>;
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
transitionDuration: string;
|
|
445
|
-
color: string;
|
|
446
|
-
fontSize: string;
|
|
447
|
-
lineHeight: string;
|
|
448
|
-
};
|
|
449
|
-
toolbar: {
|
|
450
|
-
gap: string;
|
|
451
|
-
marginBottom: string;
|
|
452
|
-
};
|
|
453
|
-
scroller: {
|
|
454
|
-
paddingBottom: string;
|
|
455
|
-
scrollbarSize: string;
|
|
456
|
-
scrollbarThumb: string;
|
|
457
|
-
scrollbarThumbHover: string;
|
|
458
|
-
};
|
|
459
|
-
headerCell: {
|
|
460
|
-
background: string;
|
|
461
|
-
color: string;
|
|
462
|
-
padding: string;
|
|
463
|
-
fontSize: string;
|
|
464
|
-
fontWeight: string;
|
|
465
|
-
gap: string;
|
|
466
|
-
focusRing: {
|
|
467
|
-
width: string;
|
|
468
|
-
style: string;
|
|
469
|
-
color: string;
|
|
470
|
-
offset: string;
|
|
471
|
-
shadow: string;
|
|
472
|
-
};
|
|
473
|
-
sm: {
|
|
474
|
-
padding: string;
|
|
475
|
-
};
|
|
476
|
-
lg: {
|
|
477
|
-
padding: string;
|
|
478
|
-
};
|
|
479
|
-
};
|
|
480
|
-
sortIcon: {
|
|
481
|
-
size: string;
|
|
482
|
-
color: string;
|
|
483
|
-
badgeSize: string;
|
|
484
|
-
badgeFontSize: string;
|
|
485
|
-
badgeBackground: string;
|
|
486
|
-
badgeColor: string;
|
|
487
|
-
};
|
|
488
|
-
row: {
|
|
489
|
-
background: string;
|
|
490
|
-
hoverBackground: string;
|
|
491
|
-
color: string;
|
|
492
|
-
stripedBackground: string;
|
|
493
|
-
selectedBackground: string;
|
|
494
|
-
selectedColor: string;
|
|
495
|
-
menuBackground: string;
|
|
496
|
-
focusRing: {
|
|
497
|
-
width: string;
|
|
498
|
-
style: string;
|
|
499
|
-
color: string;
|
|
500
|
-
offset: string;
|
|
501
|
-
shadow: string;
|
|
502
|
-
};
|
|
503
|
-
};
|
|
504
|
-
bodyCell: {
|
|
505
|
-
padding: string;
|
|
506
|
-
height: string;
|
|
507
|
-
selectedBorderColor: string;
|
|
508
|
-
sm: {
|
|
509
|
-
padding: string;
|
|
510
|
-
height: string;
|
|
511
|
-
};
|
|
512
|
-
lg: {
|
|
513
|
-
padding: string;
|
|
514
|
-
height: string;
|
|
515
|
-
};
|
|
516
|
-
};
|
|
517
|
-
footerCell: {
|
|
518
|
-
background: string;
|
|
519
|
-
color: string;
|
|
520
|
-
padding: string;
|
|
521
|
-
fontWeight: string;
|
|
522
|
-
};
|
|
523
|
-
frozenColumn: {
|
|
524
|
-
shadow: string;
|
|
525
|
-
};
|
|
526
|
-
columnResizer: {
|
|
527
|
-
width: string;
|
|
528
|
-
lineWidth: string;
|
|
529
|
-
color: string;
|
|
530
|
-
};
|
|
531
|
-
dropPoint: {
|
|
532
|
-
color: string;
|
|
533
|
-
background: string;
|
|
534
|
-
hoverBackground: string;
|
|
535
|
-
};
|
|
536
|
-
dragPreview: {
|
|
537
|
-
background: string;
|
|
538
|
-
borderColor: string;
|
|
539
|
-
borderRadius: string;
|
|
540
|
-
shadow: string;
|
|
541
|
-
};
|
|
542
|
-
loading: {
|
|
543
|
-
blur: string;
|
|
544
|
-
background: string;
|
|
545
|
-
};
|
|
546
|
-
empty: {
|
|
547
|
-
padding: string;
|
|
548
|
-
color: string;
|
|
549
|
-
};
|
|
550
|
-
filter: {
|
|
551
|
-
gap: string;
|
|
552
|
-
minWidth: string;
|
|
553
|
-
buttonInset: string;
|
|
554
|
-
cellPadding: string;
|
|
555
|
-
};
|
|
556
|
-
group: {
|
|
557
|
-
background: string;
|
|
558
|
-
fontWeight: string;
|
|
559
|
-
};
|
|
560
|
-
editor: {
|
|
561
|
-
paddingBlock: string;
|
|
562
|
-
};
|
|
563
|
-
expansion: {
|
|
564
|
-
duration: string;
|
|
565
|
-
easing: string;
|
|
566
|
-
};
|
|
567
|
-
grip: {
|
|
568
|
-
size: string;
|
|
569
|
-
color: string;
|
|
570
|
-
};
|
|
571
|
-
rowToggleButton: {
|
|
572
|
-
size: string;
|
|
573
|
-
borderRadius: string;
|
|
574
|
-
color: string;
|
|
575
|
-
hoverColor: string;
|
|
576
|
-
hoverBackground: string;
|
|
577
|
-
focusRing: {
|
|
578
|
-
width: string;
|
|
579
|
-
style: string;
|
|
580
|
-
color: string;
|
|
581
|
-
offset: string;
|
|
582
|
-
shadow: string;
|
|
583
|
-
};
|
|
584
|
-
};
|
|
585
|
-
paginator: {
|
|
586
|
-
marginTop: string;
|
|
587
|
-
};
|
|
588
|
-
settings: {
|
|
589
|
-
width: string;
|
|
590
|
-
padding: string;
|
|
591
|
-
gap: string;
|
|
592
|
-
maxHeight: string;
|
|
593
|
-
titleGap: string;
|
|
594
|
-
titleFontWeight: string;
|
|
595
|
-
itemPadding: string;
|
|
596
|
-
itemRadius: string;
|
|
597
|
-
itemHoverBackground: string;
|
|
598
|
-
handleColor: string;
|
|
599
|
-
handleSize: string;
|
|
600
|
-
};
|
|
601
|
-
actions: {
|
|
602
|
-
gap: string;
|
|
603
|
-
overflowPadding: string;
|
|
604
|
-
};
|
|
605
|
-
card: {
|
|
606
|
-
minWidth: string;
|
|
607
|
-
gap: string;
|
|
608
|
-
borderRadius: string;
|
|
609
|
-
background: string;
|
|
610
|
-
borderColor: string;
|
|
611
|
-
fieldPadding: string;
|
|
612
|
-
fieldGap: string;
|
|
613
|
-
fieldFontSize: string;
|
|
614
|
-
labelFontSize: string;
|
|
615
|
-
labelColor: string;
|
|
616
|
-
titlePadding: string;
|
|
617
|
-
titleFontSize: string;
|
|
618
|
-
titleFontWeight: string;
|
|
619
|
-
selectInset: string;
|
|
620
|
-
actionsPadding: string;
|
|
621
|
-
};
|
|
622
|
-
}> | undefined>;
|
|
794
|
+
/** Design tokens (`table`) */
|
|
795
|
+
readonly dt: import("@angular/core").InputSignal<TectraDeepPartial<TectraTableTokens> | undefined>;
|
|
796
|
+
/** Classes and styles of the parts: `root`, `toolbar`, `frame`, `scroller`, `table`, `thead`, `headerRow`, `headerCell`, `sortButton`, `sortIcon`, `tbody`, `row`, `cell`, `tfoot`, `footerCell`, `loading`, `empty`, `paginator`, `cards`, `card` */
|
|
623
797
|
readonly pt: import("@angular/core").InputSignal<Partial<Record<TxTablePart, import("@tectra-ng/core/config").TxPassThroughValue<TxTable<T>>>> | undefined>;
|
|
798
|
+
/** How `pt` merges with the global pass-through */
|
|
624
799
|
readonly ptOptions: import("@angular/core").InputSignal<TxPassThroughOptions | undefined>;
|
|
800
|
+
/** Removes the tectra styles */
|
|
625
801
|
readonly unstyled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
802
|
+
/** Sort changed: `{ field, order, multiSortMeta }` */
|
|
626
803
|
readonly sortChange: import("@angular/core").OutputEmitterRef<TxTableSortEvent>;
|
|
804
|
+
/** Filters or the global search changed: `{ filters, globalFilter, filteredValue }` */
|
|
627
805
|
readonly filterChange: import("@angular/core").OutputEmitterRef<TxTableFilterEvent<T>>;
|
|
806
|
+
/** Page or page size changed (`TxPageState`) */
|
|
628
807
|
readonly pageChange: import("@angular/core").OutputEmitterRef<TxPageState>;
|
|
808
|
+
/** `lazy`: data is needed — `{ first, rows, sortField, sortOrder, multiSortMeta }` */
|
|
629
809
|
readonly lazyLoad: import("@angular/core").OutputEmitterRef<TxTableLazyLoadEvent>;
|
|
810
|
+
/** A row was clicked: `{ row, index, originalEvent }` */
|
|
630
811
|
readonly rowClick: import("@angular/core").OutputEmitterRef<TxTableRowEvent<T>>;
|
|
812
|
+
/** A row was selected */
|
|
631
813
|
readonly rowSelect: import("@angular/core").OutputEmitterRef<TxTableRowEvent<T>>;
|
|
814
|
+
/** A row was unselected */
|
|
632
815
|
readonly rowUnselect: import("@angular/core").OutputEmitterRef<TxTableRowEvent<T>>;
|
|
816
|
+
/** The "select all" checkbox changed (`true` / `false`) */
|
|
633
817
|
readonly selectAllChange: import("@angular/core").OutputEmitterRef<boolean>;
|
|
818
|
+
/** A row was expanded */
|
|
634
819
|
readonly rowExpand: import("@angular/core").OutputEmitterRef<TxTableRowEvent<T>>;
|
|
820
|
+
/** A row was collapsed */
|
|
635
821
|
readonly rowCollapse: import("@angular/core").OutputEmitterRef<TxTableRowEvent<T>>;
|
|
822
|
+
/** A column was resized: `{ field, width }` */
|
|
636
823
|
readonly columnResize: import("@angular/core").OutputEmitterRef<TxTableColumnResizeEvent>;
|
|
824
|
+
/** Columns were reordered: `{ columns, from, to }` */
|
|
637
825
|
readonly columnReorder: import("@angular/core").OutputEmitterRef<TxTableColumnReorderEvent>;
|
|
826
|
+
/** Hidden columns changed (their fields) */
|
|
638
827
|
readonly columnVisibilityChange: import("@angular/core").OutputEmitterRef<string[]>;
|
|
828
|
+
/** The own context menu opened on a row */
|
|
639
829
|
readonly contextMenuSelect: import("@angular/core").OutputEmitterRef<TxTableRowEvent<T>>;
|
|
830
|
+
/** A row was moved: `{ from, to, value }` — `value` is the new order, set it as `value` */
|
|
640
831
|
readonly rowReorder: import("@angular/core").OutputEmitterRef<TxTableRowReorderEvent<T>>;
|
|
832
|
+
/** A group was collapsed or expanded: `{ value, expanded }` */
|
|
641
833
|
readonly rowGroupToggle: import("@angular/core").OutputEmitterRef<{
|
|
642
834
|
value: unknown;
|
|
643
835
|
expanded: boolean;
|
|
644
836
|
}>;
|
|
837
|
+
/** A cell went into edit: `{ row, index, field, value, previousValue }` */
|
|
645
838
|
readonly cellEditInit: import("@angular/core").OutputEmitterRef<TxTableCellEditEvent<T>>;
|
|
839
|
+
/** A cell edit was saved — the table writes the value into the row */
|
|
646
840
|
readonly cellEditComplete: import("@angular/core").OutputEmitterRef<TxTableCellEditEvent<T>>;
|
|
841
|
+
/** A cell edit was cancelled */
|
|
647
842
|
readonly cellEditCancel: import("@angular/core").OutputEmitterRef<TxTableCellEditEvent<T>>;
|
|
843
|
+
/** A row went into edit: `{ row, index, changes, previous }` */
|
|
648
844
|
readonly rowEditInit: import("@angular/core").OutputEmitterRef<TxTableRowEditEvent<T>>;
|
|
845
|
+
/** A row edit was saved — the table writes `changes` into the row; `previous` holds the old values */
|
|
649
846
|
readonly rowEditSave: import("@angular/core").OutputEmitterRef<TxTableRowEditEvent<T>>;
|
|
847
|
+
/** A row edit was cancelled */
|
|
650
848
|
readonly rowEditCancel: import("@angular/core").OutputEmitterRef<TxTableRowEditEvent<T>>;
|
|
651
849
|
readonly cellTemplates: import("@angular/core").Signal<readonly TxTableCell[]>;
|
|
652
850
|
readonly headerTemplates: import("@angular/core").Signal<readonly TxTableHeaderCell[]>;
|
|
@@ -760,6 +958,7 @@ export declare class TxTable<T = unknown> implements TxTableContext {
|
|
|
760
958
|
emitLazyLoad(): void;
|
|
761
959
|
private lazyEvent;
|
|
762
960
|
applyFilter(field: string, filter: TxColumnFilter | null): void;
|
|
961
|
+
/** Clears the column filters and the global search */
|
|
763
962
|
clearFilters(): void;
|
|
764
963
|
isFiltered(field: string): boolean;
|
|
765
964
|
protected afterFilter(): void;
|
|
@@ -823,6 +1022,7 @@ export declare class TxTable<T = unknown> implements TxTableContext {
|
|
|
823
1022
|
isLoadingRow(item: TxTableRenderRow<T>): boolean;
|
|
824
1023
|
onScroll(event: Event): void;
|
|
825
1024
|
private requestVirtualRange;
|
|
1025
|
+
/** Downloads the visible columns of the filtered and sorted rows as CSV (UTF-8 with BOM, quoted, formulas guarded); `{ selectionOnly, filename }`; returns the text */
|
|
826
1026
|
exportCSV(options?: {
|
|
827
1027
|
selectionOnly?: boolean;
|
|
828
1028
|
filename?: string;
|
|
@@ -848,6 +1048,7 @@ export declare class TxTable<T = unknown> implements TxTableContext {
|
|
|
848
1048
|
actionTemplate(item: TxMenuItem): TxTableAction | null;
|
|
849
1049
|
private triggerAction;
|
|
850
1050
|
saveState(): void;
|
|
1051
|
+
/** Removes the saved state of `stateKey` */
|
|
851
1052
|
clearState(): void;
|
|
852
1053
|
private storage;
|
|
853
1054
|
private restoreState;
|
|
@@ -1307,11 +1508,13 @@ export declare class TxTable<T = unknown> implements TxTableContext {
|
|
|
1307
1508
|
"rowEditCancel": "rowEditCancel";
|
|
1308
1509
|
}, ["cellTemplates", "headerTemplates", "footerTemplates", "cardTemplate", "expansionTemplate", "actionsTemplate", "emptyTemplate", "editorTemplates", "groupHeaderTemplate", "groupFooterTemplate"], ["[txTableToolbar]", "*"], true, never>;
|
|
1309
1510
|
}
|
|
1511
|
+
/** Row action buttons of `tx-table`: some inline, the rest in a popover, shared with the right-click menu. */
|
|
1310
1512
|
export declare class TxTableActions implements TxTableRowActionsSource {
|
|
1311
1513
|
private readonly tableTheme;
|
|
1312
1514
|
private table;
|
|
1313
1515
|
private host;
|
|
1314
1516
|
private row;
|
|
1517
|
+
/** How many actions are shown inline outside a table, or before the user pins actions in its settings; the rest go to a `…` popover */
|
|
1315
1518
|
readonly inlineCount: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
|
|
1316
1519
|
readonly actions: import("@angular/core").Signal<readonly TxTableAction[]>;
|
|
1317
1520
|
readonly translations: import("@angular/core").Signal<import("@tectra-ng/core/config").TxTranslations>;
|
|
@@ -1332,32 +1535,59 @@ export declare class TxTableActions implements TxTableRowActionsSource {
|
|
|
1332
1535
|
};
|
|
1333
1536
|
}, {}, ["actions"], never, true, never>;
|
|
1334
1537
|
}
|
|
1538
|
+
/** Reads a row value by field name, with dots for nested fields; `undefined` when a step is missing. */
|
|
1335
1539
|
export declare function resolveField(row: unknown, field: string | undefined): unknown;
|
|
1540
|
+
/** Writes a value into a row by field name, with dots for nested fields. */
|
|
1336
1541
|
export declare function writeField(row: unknown, field: string, value: unknown): void;
|
|
1542
|
+
/**
|
|
1543
|
+
* Compares two cell values for sorting: numbers, dates, booleans and natural text order; empty values
|
|
1544
|
+
* go last.
|
|
1545
|
+
*/
|
|
1337
1546
|
export declare function compareValues(a: unknown, b: unknown, locale?: string): number;
|
|
1547
|
+
/**
|
|
1548
|
+
* Returns a sorted copy of the rows by the given sort meta; the sort is stable and empty values stay
|
|
1549
|
+
* last.
|
|
1550
|
+
*/
|
|
1338
1551
|
export declare function sortRows<T>(rows: readonly T[], meta: readonly TxSortMeta[], locale?: string): T[];
|
|
1552
|
+
/** The order a header click moves to: ascending, then descending, then none. */
|
|
1339
1553
|
export declare function nextSortOrder(current: 'asc' | 'desc' | null): 'asc' | 'desc' | null;
|
|
1554
|
+
/** Key of a row: the `dataKey` field, or the row itself or its index without one. */
|
|
1340
1555
|
export declare function rowKeyOf(row: unknown, dataKey: string | undefined, index: number): TxTableRowKey | unknown;
|
|
1556
|
+
/** Id of a row action: its `id`, or a slug of its label. */
|
|
1341
1557
|
export declare function actionIdOf(config: TxTableActionConfig): string;
|
|
1558
|
+
/** Reads a `px` length such as `120px` as a number; `null` for other units. */
|
|
1342
1559
|
export declare function pxOf(length: string | undefined): number | null;
|
|
1560
|
+
/** Text of a column: its `header`, or its `field` without one. */
|
|
1343
1561
|
export declare function columnLabel(column: TxTableColumn): string;
|
|
1562
|
+
/** Puts columns into a saved field order; columns missing from the order stay near their neighbours. */
|
|
1344
1563
|
export declare function mergeColumnOrder(columns: readonly TxTableColumn[], order: readonly string[], visible: (field: string) => boolean): TxTableColumn[];
|
|
1564
|
+
/** Match modes offered for each filter type; the first one is the default. */
|
|
1345
1565
|
export declare const TX_FILTER_MATCH_MODES: Record<TxTableFilterType, TxFilterMatchMode[]>;
|
|
1566
|
+
/** Match mode a column filter starts with: `in` with options, otherwise the first mode of its type. */
|
|
1346
1567
|
export declare function defaultMatchMode(column: TxTableColumn): TxFilterMatchMode;
|
|
1568
|
+
/** Whether a filter value is set: not empty, not blank text and not an empty list. */
|
|
1347
1569
|
export declare function isFilled(value: unknown): boolean;
|
|
1570
|
+
/** Whether a column filter has at least one rule with a value. */
|
|
1348
1571
|
export declare function isFilterActive(filter: TxColumnFilter | undefined): boolean;
|
|
1572
|
+
/** Whether a cell value passes one filter rule; an empty rule passes everything. */
|
|
1349
1573
|
export declare function matchesRule(value: unknown, rule: TxFilterRule, locale?: string): boolean;
|
|
1574
|
+
/** Whether a cell value passes the rules of a column filter, joined by its operator. */
|
|
1350
1575
|
export declare function matchesFilter(value: unknown, filter: TxColumnFilter, locale?: string): boolean;
|
|
1576
|
+
/** Returns the rows that pass the column filters and the global search; case and accents are ignored. */
|
|
1351
1577
|
export declare function filterRows<T>(rows: readonly T[], filters: TxTableFilters, columns: readonly TxTableColumn[], globalFilter: string, globalFields: readonly string[], locale?: string): T[];
|
|
1578
|
+
/** Tab of the table settings popover: `columns` or `actions`. */
|
|
1352
1579
|
type TxTableSettingsTab = 'columns' | 'actions';
|
|
1580
|
+
/** The settings popover of `tx-table`: show, hide and reorder columns and actions. */
|
|
1353
1581
|
export declare class TxTableSettings {
|
|
1354
1582
|
private readonly tableTheme;
|
|
1355
1583
|
private readonly table;
|
|
1356
1584
|
private readonly document;
|
|
1585
|
+
/** Column definitions (`TxTableColumn[]`). Two-way: `[(columns)]` — dragging headers writes the new order */
|
|
1357
1586
|
readonly columns: import("@angular/core").InputSignal<readonly TxTableColumn[]>;
|
|
1358
1587
|
readonly hidden: import("@angular/core").InputSignal<ReadonlySet<string>>;
|
|
1359
1588
|
readonly showColumns: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1360
1589
|
readonly showActions: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
1590
|
+
/** Removes the tectra styles */
|
|
1361
1591
|
readonly unstyled: import("@angular/core").InputSignal<boolean>;
|
|
1362
1592
|
readonly columnToggled: import("@angular/core").OutputEmitterRef<{
|
|
1363
1593
|
field: string;
|
|
@@ -1408,6 +1638,7 @@ export declare class TxTableSettings {
|
|
|
1408
1638
|
"columnToggled": "columnToggled";
|
|
1409
1639
|
}, never, never, true, never>;
|
|
1410
1640
|
}
|
|
1641
|
+
/** The filter editor of one column of `tx-table`, shown in a menu or in the filter row. */
|
|
1411
1642
|
export declare class TxTableColumnFilter {
|
|
1412
1643
|
private readonly tableTheme;
|
|
1413
1644
|
private readonly table;
|
|
@@ -1468,6 +1699,7 @@ export declare class TxTableColumnFilter {
|
|
|
1468
1699
|
};
|
|
1469
1700
|
}, {}, never, never, true, never>;
|
|
1470
1701
|
}
|
|
1702
|
+
/** Tells `tx-table` that an editor element is ready so it can take focus. */
|
|
1471
1703
|
export declare class TxTableEditorFocus {
|
|
1472
1704
|
private readonly tableTheme;
|
|
1473
1705
|
constructor();
|