@4sh/ui-kit 0.1.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/LICENSE +201 -0
- package/NOTICE +7 -0
- package/README.md +229 -0
- package/fesm2022/4sh-ui-kit-forms.mjs +501 -0
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-motion.mjs +155 -0
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-overlay.mjs +61 -0
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-theming.mjs +120 -0
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-types.mjs +12 -0
- package/fesm2022/4sh-ui-kit-types.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-accordion.mjs +244 -0
- package/fesm2022/4sh-ui-kit-ui-accordion.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-alert.mjs +160 -0
- package/fesm2022/4sh-ui-kit-ui-alert.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs +926 -0
- package/fesm2022/4sh-ui-kit-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs +34 -0
- package/fesm2022/4sh-ui-kit-ui-avatar-group.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-avatar.mjs +122 -0
- package/fesm2022/4sh-ui-kit-ui-avatar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-badge.mjs +95 -0
- package/fesm2022/4sh-ui-kit-ui-badge.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs +190 -0
- package/fesm2022/4sh-ui-kit-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-button-split.mjs +151 -0
- package/fesm2022/4sh-ui-kit-ui-button-split.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-button.mjs +222 -0
- package/fesm2022/4sh-ui-kit-ui-button.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-card.mjs +164 -0
- package/fesm2022/4sh-ui-kit-ui-card.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-checkbox.mjs +118 -0
- package/fesm2022/4sh-ui-kit-ui-checkbox.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-chip.mjs +205 -0
- package/fesm2022/4sh-ui-kit-ui-chip.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-context-menu.mjs +219 -0
- package/fesm2022/4sh-ui-kit-ui-context-menu.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-datepicker.mjs +1508 -0
- package/fesm2022/4sh-ui-kit-ui-datepicker.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-drawer.mjs +300 -0
- package/fesm2022/4sh-ui-kit-ui-drawer.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-empty-state.mjs +148 -0
- package/fesm2022/4sh-ui-kit-ui-empty-state.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-field.mjs +102 -0
- package/fesm2022/4sh-ui-kit-ui-field.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-file-upload.mjs +568 -0
- package/fesm2022/4sh-ui-kit-ui-file-upload.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-helper.mjs +85 -0
- package/fesm2022/4sh-ui-kit-ui-helper.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-icon.mjs +98 -0
- package/fesm2022/4sh-ui-kit-ui-icon.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-image.mjs +201 -0
- package/fesm2022/4sh-ui-kit-ui-image.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-group.mjs +119 -0
- package/fesm2022/4sh-ui-kit-ui-input-group.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-mask.mjs +125 -0
- package/fesm2022/4sh-ui-kit-ui-input-mask.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-number.mjs +234 -0
- package/fesm2022/4sh-ui-kit-ui-input-number.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-otp.mjs +288 -0
- package/fesm2022/4sh-ui-kit-ui-input-otp.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input-tags.mjs +679 -0
- package/fesm2022/4sh-ui-kit-ui-input-tags.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-input.mjs +121 -0
- package/fesm2022/4sh-ui-kit-ui-input.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-label.mjs +61 -0
- package/fesm2022/4sh-ui-kit-ui-label.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-link.mjs +147 -0
- package/fesm2022/4sh-ui-kit-ui-link.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-menu.mjs +484 -0
- package/fesm2022/4sh-ui-kit-ui-menu.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-modal.mjs +555 -0
- package/fesm2022/4sh-ui-kit-ui-modal.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-nudger.mjs +168 -0
- package/fesm2022/4sh-ui-kit-ui-nudger.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-paginator.mjs +245 -0
- package/fesm2022/4sh-ui-kit-ui-paginator.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-popover.mjs +296 -0
- package/fesm2022/4sh-ui-kit-ui-popover.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs +124 -0
- package/fesm2022/4sh-ui-kit-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-radio.mjs +92 -0
- package/fesm2022/4sh-ui-kit-ui-radio.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-rating.mjs +185 -0
- package/fesm2022/4sh-ui-kit-ui-rating.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-read-only.mjs +146 -0
- package/fesm2022/4sh-ui-kit-ui-read-only.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-segment-control.mjs +386 -0
- package/fesm2022/4sh-ui-kit-ui-segment-control.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-select.mjs +868 -0
- package/fesm2022/4sh-ui-kit-ui-select.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-separator.mjs +77 -0
- package/fesm2022/4sh-ui-kit-ui-separator.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-sidebar.mjs +577 -0
- package/fesm2022/4sh-ui-kit-ui-sidebar.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-skeleton.mjs +81 -0
- package/fesm2022/4sh-ui-kit-ui-skeleton.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-slider.mjs +340 -0
- package/fesm2022/4sh-ui-kit-ui-slider.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-spinner.mjs +132 -0
- package/fesm2022/4sh-ui-kit-ui-spinner.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-stepper.mjs +389 -0
- package/fesm2022/4sh-ui-kit-ui-stepper.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-table.mjs +1406 -0
- package/fesm2022/4sh-ui-kit-ui-table.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tabs.mjs +503 -0
- package/fesm2022/4sh-ui-kit-ui-tabs.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tag.mjs +84 -0
- package/fesm2022/4sh-ui-kit-ui-tag.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-textarea.mjs +119 -0
- package/fesm2022/4sh-ui-kit-ui-textarea.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-toast.mjs +424 -0
- package/fesm2022/4sh-ui-kit-ui-toast.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-toggle.mjs +120 -0
- package/fesm2022/4sh-ui-kit-ui-toggle.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-ui-tooltip.mjs +445 -0
- package/fesm2022/4sh-ui-kit-ui-tooltip.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit.mjs +16 -0
- package/fesm2022/4sh-ui-kit.mjs.map +1 -0
- package/package.json +287 -0
- package/styles/base/_base.scss +19 -0
- package/styles/base/_motion.scss +144 -0
- package/styles/base/_typography.scss +99 -0
- package/styles/generated/_tokens-breakpoint.scss +8 -0
- package/styles/generated/_tokens-metrics.scss +37 -0
- package/styles/generated/_tokens-primitives.scss +284 -0
- package/styles/generated/_tokens-responsive.scss +99 -0
- package/styles/generated/_tokens-semantics.scss +1274 -0
- package/styles/generated/_tokens-styles.scss +35 -0
- package/styles/generated/_tokens-transitions.scss +11 -0
- package/styles/generated/_tokens-typography.scss +14 -0
- package/styles/generated/_tokens.scss +10 -0
- package/styles/index.scss +25 -0
- package/styles/settings/_ui-config.scss +67 -0
- package/styles/utils/_functions.scss +67 -0
- package/styles/utils/_helpers.scss +129 -0
- package/styles/utils/_mixins.scss +186 -0
- package/styles/utils/_motion.scss +47 -0
- package/styles/utils/_overlay.scss +26 -0
- package/styles/utils.scss +15 -0
- package/styles.css +1 -0
- package/types/4sh-ui-kit-forms.d.ts +259 -0
- package/types/4sh-ui-kit-motion.d.ts +111 -0
- package/types/4sh-ui-kit-overlay.d.ts +31 -0
- package/types/4sh-ui-kit-theming.d.ts +54 -0
- package/types/4sh-ui-kit-types.d.ts +13 -0
- package/types/4sh-ui-kit-ui-accordion.d.ts +140 -0
- package/types/4sh-ui-kit-ui-alert.d.ts +89 -0
- package/types/4sh-ui-kit-ui-autocomplete.d.ts +411 -0
- package/types/4sh-ui-kit-ui-avatar-group.d.ts +17 -0
- package/types/4sh-ui-kit-ui-avatar.d.ts +55 -0
- package/types/4sh-ui-kit-ui-badge.d.ts +38 -0
- package/types/4sh-ui-kit-ui-breadcrumb.d.ts +131 -0
- package/types/4sh-ui-kit-ui-button-split.d.ts +102 -0
- package/types/4sh-ui-kit-ui-button.d.ts +91 -0
- package/types/4sh-ui-kit-ui-card.d.ts +102 -0
- package/types/4sh-ui-kit-ui-checkbox.d.ts +54 -0
- package/types/4sh-ui-kit-ui-chip.d.ts +114 -0
- package/types/4sh-ui-kit-ui-context-menu.d.ts +105 -0
- package/types/4sh-ui-kit-ui-datepicker.d.ts +539 -0
- package/types/4sh-ui-kit-ui-drawer.d.ts +147 -0
- package/types/4sh-ui-kit-ui-empty-state.d.ts +93 -0
- package/types/4sh-ui-kit-ui-field.d.ts +53 -0
- package/types/4sh-ui-kit-ui-file-upload.d.ts +268 -0
- package/types/4sh-ui-kit-ui-helper.d.ts +46 -0
- package/types/4sh-ui-kit-ui-icon.d.ts +69 -0
- package/types/4sh-ui-kit-ui-image.d.ts +88 -0
- package/types/4sh-ui-kit-ui-input-group.d.ts +54 -0
- package/types/4sh-ui-kit-ui-input-mask.d.ts +63 -0
- package/types/4sh-ui-kit-ui-input-number.d.ts +96 -0
- package/types/4sh-ui-kit-ui-input-otp.d.ts +130 -0
- package/types/4sh-ui-kit-ui-input-tags.d.ts +350 -0
- package/types/4sh-ui-kit-ui-input.d.ts +78 -0
- package/types/4sh-ui-kit-ui-label.d.ts +36 -0
- package/types/4sh-ui-kit-ui-link.d.ts +72 -0
- package/types/4sh-ui-kit-ui-menu.d.ts +235 -0
- package/types/4sh-ui-kit-ui-modal.d.ts +241 -0
- package/types/4sh-ui-kit-ui-nudger.d.ts +79 -0
- package/types/4sh-ui-kit-ui-paginator.d.ts +150 -0
- package/types/4sh-ui-kit-ui-popover.d.ts +125 -0
- package/types/4sh-ui-kit-ui-progress-bar.d.ts +82 -0
- package/types/4sh-ui-kit-ui-radio.d.ts +44 -0
- package/types/4sh-ui-kit-ui-rating.d.ts +90 -0
- package/types/4sh-ui-kit-ui-read-only.d.ts +70 -0
- package/types/4sh-ui-kit-ui-segment-control.d.ts +184 -0
- package/types/4sh-ui-kit-ui-select.d.ts +392 -0
- package/types/4sh-ui-kit-ui-separator.d.ts +43 -0
- package/types/4sh-ui-kit-ui-sidebar.d.ts +358 -0
- package/types/4sh-ui-kit-ui-skeleton.d.ts +52 -0
- package/types/4sh-ui-kit-ui-slider.d.ts +127 -0
- package/types/4sh-ui-kit-ui-spinner.d.ts +67 -0
- package/types/4sh-ui-kit-ui-stepper.d.ts +220 -0
- package/types/4sh-ui-kit-ui-table.d.ts +570 -0
- package/types/4sh-ui-kit-ui-tabs.d.ts +225 -0
- package/types/4sh-ui-kit-ui-tag.d.ts +46 -0
- package/types/4sh-ui-kit-ui-textarea.d.ts +61 -0
- package/types/4sh-ui-kit-ui-toast.d.ts +247 -0
- package/types/4sh-ui-kit-ui-toggle.d.ts +67 -0
- package/types/4sh-ui-kit-ui-tooltip.d.ts +167 -0
- package/types/4sh-ui-kit.d.ts +4 -0
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { UiPaginatorPageEvent } from '@4sh/ui-kit/ui-paginator';
|
|
4
|
+
|
|
5
|
+
/** Cell padding density. */
|
|
6
|
+
type TableSize = 'default' | 'small' | 'large';
|
|
7
|
+
/** Row selection behavior (null = no selection). */
|
|
8
|
+
type TableSelectionMode = 'single' | 'multiple' | null;
|
|
9
|
+
/** Sorting behavior: one column at a time, or several (Ctrl/Cmd + click). */
|
|
10
|
+
type TableSortMode = 'single' | 'multiple';
|
|
11
|
+
/** Edge a frozen column sticks to. */
|
|
12
|
+
type TableFrozenAlign = 'left' | 'right';
|
|
13
|
+
/** One (field, direction) pair of a multiple sort. */
|
|
14
|
+
interface UiTableSortMeta {
|
|
15
|
+
field: string;
|
|
16
|
+
/** 1 = ascending, -1 = descending. */
|
|
17
|
+
order: number;
|
|
18
|
+
}
|
|
19
|
+
/** Payload of `sortFunction` (emitted when `customSort` is enabled). */
|
|
20
|
+
interface UiTableSortEvent<T = unknown> {
|
|
21
|
+
/** The data array to sort in place. */
|
|
22
|
+
data: T[];
|
|
23
|
+
mode: TableSortMode;
|
|
24
|
+
field?: string;
|
|
25
|
+
order?: number;
|
|
26
|
+
multiSortMeta?: UiTableSortMeta[];
|
|
27
|
+
}
|
|
28
|
+
/** Payload of `sortChange` — the sort state after a header interaction (no data: lazy consumers refetch). */
|
|
29
|
+
interface UiTableSortChangeEvent {
|
|
30
|
+
mode: TableSortMode;
|
|
31
|
+
/** Single mode: sorted field (`undefined` when the sort was removed). */
|
|
32
|
+
field?: string;
|
|
33
|
+
/** Single mode: `1` asc, `-1` desc, `0` when unsorted. */
|
|
34
|
+
order?: number;
|
|
35
|
+
/** Multiple mode: composed sort metas. */
|
|
36
|
+
multiSortMeta?: UiTableSortMeta[];
|
|
37
|
+
}
|
|
38
|
+
/** Payload of `rowSelect` / `rowUnselect`. */
|
|
39
|
+
interface UiTableRowSelectEvent<T = unknown> {
|
|
40
|
+
originalEvent?: Event;
|
|
41
|
+
data: T;
|
|
42
|
+
index?: number;
|
|
43
|
+
/** Interaction that triggered the (un)selection. */
|
|
44
|
+
type: 'row' | 'checkbox' | 'radio';
|
|
45
|
+
}
|
|
46
|
+
/** Payload of `headerCheckboxToggle`. */
|
|
47
|
+
interface UiTableHeaderCheckboxToggleEvent {
|
|
48
|
+
originalEvent?: Event;
|
|
49
|
+
checked: boolean;
|
|
50
|
+
}
|
|
51
|
+
/** Payload of `pageChange` (same shape as the standalone `ui-paginator`). */
|
|
52
|
+
type UiTablePageEvent = UiPaginatorPageEvent;
|
|
53
|
+
/** Payload of `rowReorder` (drag & drop). */
|
|
54
|
+
interface UiTableRowReorderEvent<T = unknown> {
|
|
55
|
+
dragIndex: number;
|
|
56
|
+
dropIndex: number;
|
|
57
|
+
/** Reordered copy of `value` — rebind it to the table. */
|
|
58
|
+
value: T[];
|
|
59
|
+
}
|
|
60
|
+
/** Payload of `lazyLoad` (virtual scroll in lazy mode). */
|
|
61
|
+
interface UiTableLazyLoadEvent {
|
|
62
|
+
/** Index of the first row of the rendered window. */
|
|
63
|
+
first: number;
|
|
64
|
+
/** Index right after the last rendered row. */
|
|
65
|
+
last: number;
|
|
66
|
+
}
|
|
67
|
+
/** Payload of `rowExpand` / `rowCollapse`. */
|
|
68
|
+
interface UiTableRowExpandEvent<T = unknown> {
|
|
69
|
+
originalEvent?: Event;
|
|
70
|
+
data: T;
|
|
71
|
+
}
|
|
72
|
+
/** Payload of `colResize`. */
|
|
73
|
+
interface UiTableColResizeEvent {
|
|
74
|
+
/** The resized header cell. */
|
|
75
|
+
element: HTMLElement;
|
|
76
|
+
/** Applied horizontal delta in px. */
|
|
77
|
+
delta: number;
|
|
78
|
+
}
|
|
79
|
+
/** Context handed to the `#body` (and frozen body) row template. */
|
|
80
|
+
interface UiTableBodyContext<T = unknown> {
|
|
81
|
+
$implicit: T;
|
|
82
|
+
/** Absolute row index in the (sorted) dataset. */
|
|
83
|
+
rowIndex: number;
|
|
84
|
+
/** Even position within the rendered page (for manual striping needs). */
|
|
85
|
+
even: boolean;
|
|
86
|
+
selected: boolean;
|
|
87
|
+
expanded: boolean;
|
|
88
|
+
/** True when the row comes from `frozenValue`. */
|
|
89
|
+
frozen: boolean;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* ui-table — headless data table.
|
|
93
|
+
*
|
|
94
|
+
* The consumer owns the markup of the rows (`#header` / `#body` / `#footer`
|
|
95
|
+
* templates rendering real `<tr>/<th>/<td>`); the component owns the data
|
|
96
|
+
* pipeline (sort → pagination — unless `lazy`, where the consumer owns it and
|
|
97
|
+
* refetches on `pageChange`/`sortChange`), the selection / expansion state,
|
|
98
|
+
* the scroll shell and the paginator. Column-level behaviors are opt-in via the
|
|
99
|
+
* companion directives (`uiSortableColumn`, `uiSelectableRow`,
|
|
100
|
+
* `uiFrozenColumn`, `uiResizableColumn`, `uiRowToggler`) and sub-components
|
|
101
|
+
* (`ui-table-sort-icon`, `ui-table-checkbox`, `ui-table-header-checkbox`,
|
|
102
|
+
* `ui-table-radio`).
|
|
103
|
+
*
|
|
104
|
+
* Styles are global (`ViewEncapsulation.None`, everything nested under
|
|
105
|
+
* `.ui-table`) because the row markup is projected from the consumer and
|
|
106
|
+
* would not match emulated-encapsulation selectors.
|
|
107
|
+
*/
|
|
108
|
+
declare class UiTable<T = unknown> {
|
|
109
|
+
/** Rows to display. */
|
|
110
|
+
value: _angular_core.InputSignal<T[]>;
|
|
111
|
+
/** Property (dotted path allowed) uniquely identifying a row — required for expansion, recommended for selection. */
|
|
112
|
+
dataKey: _angular_core.InputSignal<string | undefined>;
|
|
113
|
+
/** Cell padding density. */
|
|
114
|
+
size: _angular_core.InputSignal<TableSize>;
|
|
115
|
+
/** Displays borders between cells. */
|
|
116
|
+
showGridlines: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
117
|
+
/** Alternates the background of even rows. */
|
|
118
|
+
stripedRows: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
119
|
+
/** Highlights the hovered row (implicit when a selection mode is active). */
|
|
120
|
+
rowHover: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
121
|
+
/** Inline styles applied to the inner `<table>` (e.g. `{'min-width': '60rem'}` for horizontal scroll). */
|
|
122
|
+
tableStyle: _angular_core.InputSignal<Record<string, string> | undefined>;
|
|
123
|
+
/** Row selection behavior. `single` keeps one row, `multiple` an array. */
|
|
124
|
+
selectionMode: _angular_core.InputSignal<TableSelectionMode>;
|
|
125
|
+
/** Selected row (single) or rows (multiple). Two-way bindable. */
|
|
126
|
+
selection: _angular_core.ModelSignal<T | T[] | null>;
|
|
127
|
+
/** Desktop-like selection: plain click replaces, Ctrl/Cmd+click toggles, Shift+click ranges. */
|
|
128
|
+
metaKeySelection: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
129
|
+
/** One column at a time, or several with Ctrl/Cmd + click. */
|
|
130
|
+
sortMode: _angular_core.InputSignal<TableSortMode>;
|
|
131
|
+
/** Initial sorted field (presort). */
|
|
132
|
+
sortField: _angular_core.InputSignal<string | undefined>;
|
|
133
|
+
/** Initial sort direction (1 asc, -1 desc). */
|
|
134
|
+
sortOrder: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
135
|
+
/** Initial multiple-sort state (presort, `sortMode="multiple"`). */
|
|
136
|
+
multiSortMeta: _angular_core.InputSignal<UiTableSortMeta[] | undefined>;
|
|
137
|
+
/** Direction applied when a column becomes sorted. */
|
|
138
|
+
defaultSortOrder: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
139
|
+
/** Delegates sorting: the table stops sorting itself and emits `sortFunction`. */
|
|
140
|
+
customSort: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
141
|
+
/** Splits rows into pages and renders the paginator bar. */
|
|
142
|
+
paginator: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
143
|
+
/** Rows per page. */
|
|
144
|
+
rows: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
145
|
+
/** Index of the first displayed row. Two-way bindable (programmatic pagination). */
|
|
146
|
+
first: _angular_core.ModelSignal<number>;
|
|
147
|
+
/** Choices offered in the rows-per-page select (omit to hide it). */
|
|
148
|
+
rowsPerPageOptions: _angular_core.InputSignal<number[] | undefined>;
|
|
149
|
+
/** Maximum number of page-number buttons. */
|
|
150
|
+
pageLinks: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
151
|
+
/** Total row count on the server (lazy mode) — drives the paginator; ignored otherwise. */
|
|
152
|
+
totalRecords: _angular_core.InputSignal<number | undefined>;
|
|
153
|
+
/** Enables the scroll shell (sticky header inside the scrollable viewport). */
|
|
154
|
+
scrollable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
155
|
+
/** Viewport height: a CSS size (e.g. `'400px'`) or `'flex'` to fill the flex parent. */
|
|
156
|
+
scrollHeight: _angular_core.InputSignal<string | undefined>;
|
|
157
|
+
/** Rows pinned above the body while scrolling. */
|
|
158
|
+
frozenValue: _angular_core.InputSignal<T[] | undefined>;
|
|
159
|
+
/** Expanded rows, keyed by `dataKey` value. Two-way bindable. */
|
|
160
|
+
expandedRowKeys: _angular_core.ModelSignal<Record<string, boolean>>;
|
|
161
|
+
/** Enables column resizing (fit mode: the next column absorbs the delta). */
|
|
162
|
+
resizableColumns: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
163
|
+
/** Displays a mask + spinner over the table while data is being fetched. */
|
|
164
|
+
loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
165
|
+
/** Accessible name of the loading indicator. */
|
|
166
|
+
loadingAriaLabel: _angular_core.InputSignal<string>;
|
|
167
|
+
/** Title of the default empty state (rendered with `ui-empty-state`; `#emptymessage` overrides it). */
|
|
168
|
+
emptyMessage: _angular_core.InputSignal<string>;
|
|
169
|
+
/** Icon of the default empty state. */
|
|
170
|
+
emptyIcon: _angular_core.InputSignal<string>;
|
|
171
|
+
/** Windows the rendered rows to the visible viewport (requires `scrollable` + a fixed `scrollHeight`). */
|
|
172
|
+
virtualScroll: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
173
|
+
/** Fixed row height in px (also apply it to the `<tr>` of the body template). */
|
|
174
|
+
virtualScrollItemSize: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
175
|
+
/**
|
|
176
|
+
* Lazy/server mode: the consumer owns sorting and pagination — `value` is the
|
|
177
|
+
* currently loaded page (with `paginator` + `totalRecords`, listen to
|
|
178
|
+
* `pageChange`/`sortChange` to refetch) or the loaded window (with
|
|
179
|
+
* `virtualScroll`, `lazyLoad` emits the rendered range). No client-side
|
|
180
|
+
* sorting or page slicing is applied.
|
|
181
|
+
*/
|
|
182
|
+
lazy: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
183
|
+
/** Emitted when a row becomes selected. */
|
|
184
|
+
rowSelect: _angular_core.OutputEmitterRef<UiTableRowSelectEvent<T>>;
|
|
185
|
+
/** Emitted when a row becomes unselected. */
|
|
186
|
+
rowUnselect: _angular_core.OutputEmitterRef<UiTableRowSelectEvent<T>>;
|
|
187
|
+
/** Emitted when the header select-all checkbox is toggled. */
|
|
188
|
+
headerCheckboxToggle: _angular_core.OutputEmitterRef<UiTableHeaderCheckboxToggleEvent>;
|
|
189
|
+
/** Emitted instead of sorting internally when `customSort` is enabled. */
|
|
190
|
+
sortFunction: _angular_core.OutputEmitterRef<UiTableSortEvent<T>>;
|
|
191
|
+
/** Emitted whenever the sort state changes from a header interaction (lazy mode: refetch with it). */
|
|
192
|
+
sortChange: _angular_core.OutputEmitterRef<UiTableSortChangeEvent>;
|
|
193
|
+
/** Emitted on any pagination change (navigation or rows-per-page). */
|
|
194
|
+
pageChange: _angular_core.OutputEmitterRef<UiPaginatorPageEvent>;
|
|
195
|
+
/** Emitted when a row expands. */
|
|
196
|
+
rowExpand: _angular_core.OutputEmitterRef<UiTableRowExpandEvent<T>>;
|
|
197
|
+
/** Emitted when a row collapses. */
|
|
198
|
+
rowCollapse: _angular_core.OutputEmitterRef<UiTableRowExpandEvent<T>>;
|
|
199
|
+
/** Emitted after a column resize. */
|
|
200
|
+
colResize: _angular_core.OutputEmitterRef<UiTableColResizeEvent>;
|
|
201
|
+
/** Emitted after a row drag & drop, with the reordered copy of `value`. */
|
|
202
|
+
rowReorder: _angular_core.OutputEmitterRef<UiTableRowReorderEvent<T>>;
|
|
203
|
+
/** Emitted when the virtual-scroll window changes (lazy mode). */
|
|
204
|
+
lazyLoad: _angular_core.OutputEmitterRef<UiTableLazyLoadEvent>;
|
|
205
|
+
/** @ignore Free content rendered above the table. */
|
|
206
|
+
protected readonly captionTemplate: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
207
|
+
/** @ignore `<tr>` of header cells. */
|
|
208
|
+
protected readonly headerTemplate: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
209
|
+
/** @ignore Row template (context: row, rowIndex, even, selected, expanded, frozen). */
|
|
210
|
+
protected readonly bodyTemplate: _angular_core.Signal<TemplateRef<UiTableBodyContext<T>> | undefined>;
|
|
211
|
+
/** @ignore `<tr>` of footer cells. */
|
|
212
|
+
protected readonly footerTemplate: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
213
|
+
/** @ignore Extra `<tr>` rendered under an expanded row. */
|
|
214
|
+
protected readonly expandedRowTemplate: _angular_core.Signal<TemplateRef<UiTableBodyContext<T>> | undefined>;
|
|
215
|
+
/** @ignore Content of the "no rows" cell. */
|
|
216
|
+
protected readonly emptyMessageTemplate: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
217
|
+
/** @ignore */
|
|
218
|
+
private readonly tableEl;
|
|
219
|
+
/** @ignore */
|
|
220
|
+
private readonly theadEl;
|
|
221
|
+
/** @ignore */
|
|
222
|
+
private readonly wrapperEl;
|
|
223
|
+
/** @ignore Scroll position of the wrapper (drives the virtual window). */
|
|
224
|
+
private readonly wrapperScrollTop;
|
|
225
|
+
/** @ignore Measured height of the scroll viewport. */
|
|
226
|
+
private readonly wrapperHeight;
|
|
227
|
+
/** @ignore Row index currently dragged (row reorder). */
|
|
228
|
+
draggedRowIndex: number | null;
|
|
229
|
+
/** @ignore Selectable-row directives currently rendered, by host element (keyboard range selection). */
|
|
230
|
+
readonly selectableRowRefs: Map<Element, {
|
|
231
|
+
data: T;
|
|
232
|
+
index: number;
|
|
233
|
+
}>;
|
|
234
|
+
/** @ignore Shift-selection anchor (absolute row index). */
|
|
235
|
+
private anchorRowIndex;
|
|
236
|
+
/** @ignore */
|
|
237
|
+
private readonly uid;
|
|
238
|
+
/** @ignore */
|
|
239
|
+
private readonly destroyRef;
|
|
240
|
+
/** @ignore Active single sort; reset when the `sortField`/`sortOrder` inputs change. */
|
|
241
|
+
readonly sortState: _angular_core.WritableSignal<{
|
|
242
|
+
field: string;
|
|
243
|
+
order: number;
|
|
244
|
+
} | null>;
|
|
245
|
+
/** @ignore Active multiple sort. */
|
|
246
|
+
readonly multiSortState: _angular_core.WritableSignal<UiTableSortMeta[]>;
|
|
247
|
+
/** @ignore Effective rows-per-page (user can change it via the paginator select). */
|
|
248
|
+
protected readonly rowsState: _angular_core.WritableSignal<number>;
|
|
249
|
+
/** @ignore Number of header cells (drives the colspan of the empty row). */
|
|
250
|
+
protected readonly columnCount: _angular_core.WritableSignal<number>;
|
|
251
|
+
/** @ignore Measured header height (sticky offset of frozen rows). */
|
|
252
|
+
protected readonly frozenRowsTop: _angular_core.WritableSignal<number>;
|
|
253
|
+
constructor();
|
|
254
|
+
/** @ignore Measures the header height + stacks the frozen-row sticky offsets. */
|
|
255
|
+
private measureStickyMetrics;
|
|
256
|
+
/** @ignore Sorted dataset (identity when `customSort` delegates sorting). */
|
|
257
|
+
readonly processedData: _angular_core.Signal<T[]>;
|
|
258
|
+
/** @ignore Paginator total: server-provided in lazy mode, client count otherwise. */
|
|
259
|
+
protected readonly effectiveTotalRecords: _angular_core.Signal<number>;
|
|
260
|
+
/** @ignore */
|
|
261
|
+
protected readonly pageCount: _angular_core.Signal<number>;
|
|
262
|
+
/** @ignore `first` clamped to the dataset (data may shrink under the cursor). */
|
|
263
|
+
protected readonly clampedFirst: _angular_core.Signal<number>;
|
|
264
|
+
/** @ignore Rendered window of the virtual scroll (with a small buffer). */
|
|
265
|
+
protected readonly virtualRange: _angular_core.Signal<{
|
|
266
|
+
start: number;
|
|
267
|
+
end: number;
|
|
268
|
+
}>;
|
|
269
|
+
/** @ignore Heights of the spacer rows keeping the scrollbar honest (virtual scroll). */
|
|
270
|
+
protected readonly virtualPadding: _angular_core.Signal<{
|
|
271
|
+
top: number;
|
|
272
|
+
bottom: number;
|
|
273
|
+
}>;
|
|
274
|
+
/** @ignore Absolute index of the first rendered row. */
|
|
275
|
+
protected readonly pageOffset: _angular_core.Signal<number>;
|
|
276
|
+
/** @ignore Rows actually rendered (page, virtual window, or whole dataset). */
|
|
277
|
+
protected readonly pageData: _angular_core.Signal<T[]>;
|
|
278
|
+
/** @ignore */
|
|
279
|
+
protected readonly isFlexScroll: _angular_core.Signal<boolean>;
|
|
280
|
+
/** @ignore Viewport max-height (fixed scrollHeight mode only). */
|
|
281
|
+
protected readonly scrollMaxHeight: _angular_core.Signal<string | null>;
|
|
282
|
+
/** @ignore */
|
|
283
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
284
|
+
/** @ignore Template context of a body row. */
|
|
285
|
+
protected rowContext(row: T, pageIndex: number, frozen?: boolean): UiTableBodyContext<T>;
|
|
286
|
+
/** Current direction of a column: 1, -1, or 0 when unsorted. */
|
|
287
|
+
getSortOrder(field: string): number;
|
|
288
|
+
/** @ignore Cycles the sort of a column (called by `uiSortableColumn`). */
|
|
289
|
+
toggleColumnSort(field: string, originalEvent: Event): void;
|
|
290
|
+
/** @ignore Row equality: by `dataKey` when provided, by reference otherwise. */
|
|
291
|
+
private rowEquals;
|
|
292
|
+
/** @ignore Selection normalized as an array. */
|
|
293
|
+
readonly selectionArray: _angular_core.Signal<T[]>;
|
|
294
|
+
/** True when the row is part of the current selection. */
|
|
295
|
+
isSelected(row: T): boolean;
|
|
296
|
+
/** @ignore Every processed row is selected (header checkbox state). */
|
|
297
|
+
readonly allSelected: _angular_core.Signal<boolean>;
|
|
298
|
+
/** @ignore Partial selection (header checkbox indeterminate state). */
|
|
299
|
+
readonly partiallySelected: _angular_core.Signal<boolean>;
|
|
300
|
+
/** @ignore Row click / Enter / Space (called by `uiSelectableRow`). */
|
|
301
|
+
handleRowClick(originalEvent: Event, data: T, index: number): void;
|
|
302
|
+
/** @ignore Maps an absolute row index onto `processedData` (page-local in lazy pagination). */
|
|
303
|
+
private dataIndex;
|
|
304
|
+
/** @ignore Shift+click / Shift+Arrow range selection (replaces the selection). */
|
|
305
|
+
selectRange(originalEvent: Event, index: number): void;
|
|
306
|
+
/** @ignore Checkbox-column toggle (called by `ui-table-checkbox`). */
|
|
307
|
+
toggleRowWithCheckbox(originalEvent: Event | undefined, data: T, index?: number): void;
|
|
308
|
+
/** @ignore Header checkbox toggle: selects / clears every processed row. */
|
|
309
|
+
toggleAllRows(originalEvent: Event | undefined, checked: boolean): void;
|
|
310
|
+
/** @ignore Radio-column selection (called by `ui-table-radio`). */
|
|
311
|
+
selectRowWithRadio(originalEvent: Event | undefined, data: T, index?: number): void;
|
|
312
|
+
/** @ignore */
|
|
313
|
+
private unselectRow;
|
|
314
|
+
/** @ignore Key of a row for the expansion map. */
|
|
315
|
+
rowKey(data: T): string | undefined;
|
|
316
|
+
/** True when the row is expanded. */
|
|
317
|
+
isRowExpanded(data: T): boolean;
|
|
318
|
+
/** Toggles the expansion of a row (used by `uiRowToggler`). */
|
|
319
|
+
toggleRow(data: T, originalEvent?: Event): void;
|
|
320
|
+
/** @ignore Rows-per-page picked in the paginator select. */
|
|
321
|
+
protected onPaginatorRows(rows: number): void;
|
|
322
|
+
/** @ignore Drop of a dragged row: emits the reordered copy of `value`. */
|
|
323
|
+
dropRow(dropIndex: number): void;
|
|
324
|
+
/** @ignore */
|
|
325
|
+
protected onWrapperScroll(): void;
|
|
326
|
+
/** @ignore Row receiving the tab stop (first selected row on the page, else the first row). */
|
|
327
|
+
private readonly tabbableRow;
|
|
328
|
+
/** @ignore Roving tabindex: only one row is tabbable (WAI-ARIA grid-like navigation). */
|
|
329
|
+
isRowTabbable(data: T): boolean;
|
|
330
|
+
/** @ignore Selects every processed row (Ctrl+A). */
|
|
331
|
+
selectAllRows(originalEvent: Event): void;
|
|
332
|
+
/** @ignore Selects from a row to the first / last processed row (Ctrl+Shift+Home / End). */
|
|
333
|
+
selectRangeToEdge(index: number, edge: 'start' | 'end'): void;
|
|
334
|
+
/** @ignore Freezes every column width in px so the drag only moves the shared edge. */
|
|
335
|
+
lockColumnWidths(): void;
|
|
336
|
+
/** @ignore Fit-mode resize: the delta moves the edge between `cell` and its next sibling. */
|
|
337
|
+
resizeColumnFit(cell: HTMLElement, startWidth: number, nextStartWidth: number, delta: number): boolean;
|
|
338
|
+
/** @ignore Forwarded from the resize directive once the drag ends. */
|
|
339
|
+
notifyColResize(element: HTMLElement, delta: number): void;
|
|
340
|
+
/** @ignore Stable id base for internal controls. */
|
|
341
|
+
protected readonly idBase: string;
|
|
342
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiTable<any>, never>;
|
|
343
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiTable<any>, "ui-table", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "showGridlines": { "alias": "showGridlines"; "required": false; "isSignal": true; }; "stripedRows": { "alias": "stripedRows"; "required": false; "isSignal": true; }; "rowHover": { "alias": "rowHover"; "required": false; "isSignal": true; }; "tableStyle": { "alias": "tableStyle"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "metaKeySelection": { "alias": "metaKeySelection"; "required": false; "isSignal": true; }; "sortMode": { "alias": "sortMode"; "required": false; "isSignal": true; }; "sortField": { "alias": "sortField"; "required": false; "isSignal": true; }; "sortOrder": { "alias": "sortOrder"; "required": false; "isSignal": true; }; "multiSortMeta": { "alias": "multiSortMeta"; "required": false; "isSignal": true; }; "defaultSortOrder": { "alias": "defaultSortOrder"; "required": false; "isSignal": true; }; "customSort": { "alias": "customSort"; "required": false; "isSignal": true; }; "paginator": { "alias": "paginator"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "first": { "alias": "first"; "required": false; "isSignal": true; }; "rowsPerPageOptions": { "alias": "rowsPerPageOptions"; "required": false; "isSignal": true; }; "pageLinks": { "alias": "pageLinks"; "required": false; "isSignal": true; }; "totalRecords": { "alias": "totalRecords"; "required": false; "isSignal": true; }; "scrollable": { "alias": "scrollable"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "frozenValue": { "alias": "frozenValue"; "required": false; "isSignal": true; }; "expandedRowKeys": { "alias": "expandedRowKeys"; "required": false; "isSignal": true; }; "resizableColumns": { "alias": "resizableColumns"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "loadingAriaLabel": { "alias": "loadingAriaLabel"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "emptyIcon": { "alias": "emptyIcon"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "virtualScrollItemSize": { "alias": "virtualScrollItemSize"; "required": false; "isSignal": true; }; "lazy": { "alias": "lazy"; "required": false; "isSignal": true; }; }, { "selection": "selectionChange"; "first": "firstChange"; "expandedRowKeys": "expandedRowKeysChange"; "rowSelect": "rowSelect"; "rowUnselect": "rowUnselect"; "headerCheckboxToggle": "headerCheckboxToggle"; "sortFunction": "sortFunction"; "sortChange": "sortChange"; "pageChange": "pageChange"; "rowExpand": "rowExpand"; "rowCollapse": "rowCollapse"; "colResize": "colResize"; "rowReorder": "rowReorder"; "lazyLoad": "lazyLoad"; }, ["captionTemplate", "headerTemplate", "bodyTemplate", "footerTemplate", "expandedRowTemplate", "emptyMessageTemplate"], never, true, never>;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* uiSortableColumn — makes a `<th>` sortable.
|
|
347
|
+
*
|
|
348
|
+
* Click / Enter / Space cycles ascending → descending → unsorted (single
|
|
349
|
+
* mode) or composes with Ctrl/Cmd in multiple mode. Exposes `aria-sort`.
|
|
350
|
+
*/
|
|
351
|
+
declare class UiTableSortableColumn {
|
|
352
|
+
/** @ignore */
|
|
353
|
+
private readonly table;
|
|
354
|
+
/** Field (dotted path allowed) this column sorts on. */
|
|
355
|
+
field: _angular_core.InputSignal<string>;
|
|
356
|
+
/** Disables the sort interaction. */
|
|
357
|
+
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
358
|
+
/** @ignore */
|
|
359
|
+
protected readonly sorted: _angular_core.Signal<boolean>;
|
|
360
|
+
/** @ignore */
|
|
361
|
+
protected readonly ariaSort: _angular_core.Signal<"none" | "ascending" | "descending">;
|
|
362
|
+
/** @ignore */
|
|
363
|
+
protected onTrigger(event: Event): void;
|
|
364
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiTableSortableColumn, never>;
|
|
365
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiTableSortableColumn, "[uiSortableColumn]", never, { "field": { "alias": "uiSortableColumn"; "required": true; "isSignal": true; }; "disabled": { "alias": "uiSortableColumnDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* ui-table-sort-icon — direction indicator of a sortable column.
|
|
369
|
+
* Decorative: the accessible state lives on the `<th>` (`aria-sort`).
|
|
370
|
+
*/
|
|
371
|
+
declare class UiTableSortIcon {
|
|
372
|
+
/** @ignore */
|
|
373
|
+
private readonly table;
|
|
374
|
+
/** Field of the column this icon reflects. */
|
|
375
|
+
field: _angular_core.InputSignal<string>;
|
|
376
|
+
/** @ignore */
|
|
377
|
+
protected readonly iconName: _angular_core.Signal<"sort" | "sort-up" | "sort-down">;
|
|
378
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiTableSortIcon, never>;
|
|
379
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiTableSortIcon, "ui-table-sort-icon", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* uiSelectableRow — makes a `<tr>` selectable.
|
|
383
|
+
*
|
|
384
|
+
* Click selects (composing with Ctrl/Cmd / Shift according to
|
|
385
|
+
* `metaKeySelection`); Arrow Up/Down moves the focus between rows, Space /
|
|
386
|
+
* Enter toggles, Shift+Arrow extends the range.
|
|
387
|
+
*/
|
|
388
|
+
declare class UiTableSelectableRow<T = unknown> {
|
|
389
|
+
/** @ignore */
|
|
390
|
+
private readonly table;
|
|
391
|
+
/** @ignore */
|
|
392
|
+
private readonly el;
|
|
393
|
+
/** Row data carried by this `<tr>`. */
|
|
394
|
+
data: _angular_core.InputSignal<T>;
|
|
395
|
+
/** Absolute row index (from the body template context). */
|
|
396
|
+
index: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
397
|
+
/** Disables the selection interaction. */
|
|
398
|
+
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
399
|
+
/** @ignore */
|
|
400
|
+
protected readonly selected: _angular_core.Signal<boolean>;
|
|
401
|
+
/** @ignore Roving tabindex: a single row carries the tab stop. */
|
|
402
|
+
protected readonly tabindex: _angular_core.Signal<0 | -1 | null>;
|
|
403
|
+
constructor();
|
|
404
|
+
/** @ignore */
|
|
405
|
+
protected onClick(event: MouseEvent): void;
|
|
406
|
+
/** @ignore */
|
|
407
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
408
|
+
/** @ignore Nearest selectable `<tr>` sibling (skips expansion rows). */
|
|
409
|
+
private findSiblingRow;
|
|
410
|
+
/** @ignore First / last selectable row of the table. */
|
|
411
|
+
private findEdgeRow;
|
|
412
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiTableSelectableRow<any>, never>;
|
|
413
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiTableSelectableRow<any>, "[uiSelectableRow]", never, { "data": { "alias": "uiSelectableRow"; "required": true; "isSignal": true; }; "index": { "alias": "uiSelectableRowIndex"; "required": false; "isSignal": true; }; "disabled": { "alias": "uiSelectableRowDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* ui-table-checkbox — row checkbox of a checkbox-based multiple selection.
|
|
417
|
+
* Instantiates `ui-checkbox` bound to the table selection.
|
|
418
|
+
*/
|
|
419
|
+
declare class UiTableCheckbox<T = unknown> {
|
|
420
|
+
/** @ignore */
|
|
421
|
+
private readonly table;
|
|
422
|
+
/** Row this checkbox (un)selects. */
|
|
423
|
+
value: _angular_core.InputSignal<T>;
|
|
424
|
+
/** Absolute row index (forwarded to the selection events). */
|
|
425
|
+
index: _angular_core.InputSignalWithTransform<number | undefined, unknown>;
|
|
426
|
+
/** Disables the checkbox. */
|
|
427
|
+
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
428
|
+
/** Accessible name of the checkbox. */
|
|
429
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
430
|
+
/** @ignore */
|
|
431
|
+
protected readonly checked: _angular_core.Signal<boolean>;
|
|
432
|
+
/** @ignore */
|
|
433
|
+
protected onToggle(_checked: unknown): void;
|
|
434
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiTableCheckbox<any>, never>;
|
|
435
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiTableCheckbox<any>, "ui-table-checkbox", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "index": { "alias": "index"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* ui-table-header-checkbox — header select-all checkbox (checkbox selection).
|
|
439
|
+
* Checked when every row is selected, indeterminate on partial selection.
|
|
440
|
+
*/
|
|
441
|
+
declare class UiTableHeaderCheckbox<T = unknown> {
|
|
442
|
+
/** @ignore */
|
|
443
|
+
protected readonly table: UiTable<T>;
|
|
444
|
+
/** Disables the checkbox. */
|
|
445
|
+
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
446
|
+
/** Accessible name of the checkbox. */
|
|
447
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
448
|
+
/** @ignore */
|
|
449
|
+
protected onToggle(checked: unknown): void;
|
|
450
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiTableHeaderCheckbox<any>, never>;
|
|
451
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiTableHeaderCheckbox<any>, "ui-table-header-checkbox", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* ui-table-radio — row radio button of a radio-based single selection.
|
|
455
|
+
* Instantiates `ui-radio` bound to the table selection.
|
|
456
|
+
*/
|
|
457
|
+
declare class UiTableRadio<T = unknown> {
|
|
458
|
+
/** @ignore */
|
|
459
|
+
protected readonly table: UiTable<T>;
|
|
460
|
+
/** Row this radio selects. */
|
|
461
|
+
value: _angular_core.InputSignal<T>;
|
|
462
|
+
/** Absolute row index (forwarded to the selection events). */
|
|
463
|
+
index: _angular_core.InputSignalWithTransform<number | undefined, unknown>;
|
|
464
|
+
/** Native group name (defaults to a per-table group). */
|
|
465
|
+
name: _angular_core.InputSignal<string>;
|
|
466
|
+
/** Disables the radio. */
|
|
467
|
+
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
468
|
+
/** Accessible name of the radio. */
|
|
469
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
470
|
+
/** @ignore */
|
|
471
|
+
protected onSelect(): void;
|
|
472
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiTableRadio<any>, never>;
|
|
473
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UiTableRadio<any>, "ui-table-radio", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "index": { "alias": "index"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* uiRowToggler — toggles the expansion of a row. Place it on the expand
|
|
477
|
+
* button (native `<button>` or `ui-button`); `aria-expanded` is reflected.
|
|
478
|
+
*/
|
|
479
|
+
declare class UiTableRowToggler<T = unknown> {
|
|
480
|
+
/** @ignore */
|
|
481
|
+
private readonly table;
|
|
482
|
+
/** Row whose expansion this button toggles. */
|
|
483
|
+
data: _angular_core.InputSignal<T>;
|
|
484
|
+
/** @ignore */
|
|
485
|
+
protected readonly expanded: _angular_core.Signal<boolean>;
|
|
486
|
+
/** @ignore */
|
|
487
|
+
protected onToggle(event: Event): void;
|
|
488
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiTableRowToggler<any>, never>;
|
|
489
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiTableRowToggler<any>, "[uiRowToggler]", never, { "data": { "alias": "uiRowToggler"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* uiFrozenColumn — pins a column while scrolling horizontally.
|
|
493
|
+
* Apply to every `<th>`/`<td>` of the column; `alignFrozen` picks the edge.
|
|
494
|
+
*/
|
|
495
|
+
declare class UiTableFrozenColumn {
|
|
496
|
+
/** @ignore */
|
|
497
|
+
private readonly el;
|
|
498
|
+
/** @ignore */
|
|
499
|
+
private readonly injector;
|
|
500
|
+
/** Enables the pinning (attribute presence defaults to true). */
|
|
501
|
+
frozen: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
502
|
+
/** Edge the column sticks to. */
|
|
503
|
+
alignFrozen: _angular_core.InputSignal<TableFrozenAlign>;
|
|
504
|
+
/** @ignore */
|
|
505
|
+
protected readonly isFrozen: _angular_core.Signal<boolean>;
|
|
506
|
+
constructor();
|
|
507
|
+
/** @ignore */
|
|
508
|
+
private updatePosition;
|
|
509
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiTableFrozenColumn, never>;
|
|
510
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiTableFrozenColumn, "[uiFrozenColumn]", never, { "frozen": { "alias": "uiFrozenColumn"; "required": false; "isSignal": true; }; "alignFrozen": { "alias": "alignFrozen"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* uiResizableColumn — drag handle on a `<th>` to resize the column.
|
|
514
|
+
* Fit mode: the next column absorbs the delta, the table width is preserved.
|
|
515
|
+
*/
|
|
516
|
+
declare class UiTableResizableColumn {
|
|
517
|
+
/** @ignore */
|
|
518
|
+
private readonly table;
|
|
519
|
+
/** @ignore */
|
|
520
|
+
private readonly el;
|
|
521
|
+
/** @ignore */
|
|
522
|
+
private readonly destroyRef;
|
|
523
|
+
/** @ignore */
|
|
524
|
+
private startX;
|
|
525
|
+
/** @ignore */
|
|
526
|
+
private startWidth;
|
|
527
|
+
/** @ignore */
|
|
528
|
+
private nextStartWidth;
|
|
529
|
+
/** @ignore */
|
|
530
|
+
private appliedDelta;
|
|
531
|
+
/** @ignore */
|
|
532
|
+
private cleanupDrag;
|
|
533
|
+
constructor();
|
|
534
|
+
/** @ignore */
|
|
535
|
+
private readonly onPointerDown;
|
|
536
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiTableResizableColumn, never>;
|
|
537
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiTableResizableColumn, "[uiResizableColumn]", never, {}, {}, never, never, true, never>;
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* uiReorderableRow — drag & drop a `<tr>` to reorder rows.
|
|
541
|
+
*
|
|
542
|
+
* Pass the absolute `rowIndex` from the body template context. On drop the
|
|
543
|
+
* table emits `rowReorder` with a reordered copy of `value` (rebind it).
|
|
544
|
+
* Intended for unsorted data (reordering a sorted view is ambiguous).
|
|
545
|
+
*/
|
|
546
|
+
declare class UiTableReorderableRow {
|
|
547
|
+
/** @ignore */
|
|
548
|
+
private readonly table;
|
|
549
|
+
/** @ignore */
|
|
550
|
+
private readonly el;
|
|
551
|
+
/** Absolute row index (from the body template context). */
|
|
552
|
+
index: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
553
|
+
/** @ignore Visual drop indicator (edge of the hovered row). */
|
|
554
|
+
protected readonly dropPosition: _angular_core.WritableSignal<"above" | "below" | null>;
|
|
555
|
+
/** @ignore */
|
|
556
|
+
protected onDragStart(event: DragEvent): void;
|
|
557
|
+
/** @ignore */
|
|
558
|
+
protected onDragOver(event: DragEvent): void;
|
|
559
|
+
/** @ignore */
|
|
560
|
+
protected onDragLeave(): void;
|
|
561
|
+
/** @ignore */
|
|
562
|
+
protected onDrop(event: DragEvent): void;
|
|
563
|
+
/** @ignore */
|
|
564
|
+
protected onDragEnd(): void;
|
|
565
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UiTableReorderableRow, never>;
|
|
566
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<UiTableReorderableRow, "[uiReorderableRow]", never, { "index": { "alias": "uiReorderableRow"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
export { UiTable, UiTableCheckbox, UiTableFrozenColumn, UiTableHeaderCheckbox, UiTableRadio, UiTableReorderableRow, UiTableResizableColumn, UiTableRowToggler, UiTableSelectableRow, UiTableSortIcon, UiTableSortableColumn };
|
|
570
|
+
export type { TableFrozenAlign, TableSelectionMode, TableSize, TableSortMode, UiTableBodyContext, UiTableColResizeEvent, UiTableHeaderCheckboxToggleEvent, UiTableLazyLoadEvent, UiTablePageEvent, UiTableRowExpandEvent, UiTableRowReorderEvent, UiTableRowSelectEvent, UiTableSortChangeEvent, UiTableSortEvent, UiTableSortMeta };
|