@shival99/z-ui 2.1.32 → 2.2.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/fesm2022/shival99-z-ui-components-z-accordion.mjs +41 -25
- package/fesm2022/shival99-z-ui-components-z-accordion.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +176 -97
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-avatar.mjs +71 -40
- package/fesm2022/shival99-z-ui-components-z-avatar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs +26 -15
- package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-button-group.mjs +33 -21
- package/fesm2022/shival99-z-ui-components-z-button-group.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-button.mjs +32 -19
- package/fesm2022/shival99-z-ui-components-z-button.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +289 -172
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-card.mjs +34 -24
- package/fesm2022/shival99-z-ui-components-z-card.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-chat.mjs +85 -47
- package/fesm2022/shival99-z-ui-components-z-chat.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs +56 -31
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-code.mjs +29 -16
- package/fesm2022/shival99-z-ui-components-z-code.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-command.mjs +34 -19
- package/fesm2022/shival99-z-ui-components-z-command.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs +310 -88
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs +32 -18
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-editor.mjs +118 -62
- package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-empty.mjs +31 -17
- package/fesm2022/shival99-z-ui-components-z-empty.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-filter.mjs +81 -54
- package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs +240 -132
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-icon.mjs +39 -21
- package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-input.mjs +173 -95
- package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs +88 -47
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-loading.mjs +31 -19
- package/fesm2022/shival99-z-ui-components-z-loading.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-marquee.mjs +42 -23
- package/fesm2022/shival99-z-ui-components-z-marquee.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-media-player.mjs +87 -45
- package/fesm2022/shival99-z-ui-components-z-media-player.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-menu.mjs +126 -67
- package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-metric-card.mjs +42 -23
- package/fesm2022/shival99-z-ui-components-z-metric-card.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-modal.mjs +144 -80
- package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs +45 -24
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-popover.mjs +90 -57
- package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-qrcode.mjs +51 -29
- package/fesm2022/shival99-z-ui-components-z-qrcode.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-radio.mjs +36 -20
- package/fesm2022/shival99-z-ui-components-z-radio.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs +27 -15
- package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-select.mjs +239 -138
- package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-show-more.mjs +38 -21
- package/fesm2022/shival99-z-ui-components-z-show-more.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs +42 -23
- package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-skeleton.mjs +35 -19
- package/fesm2022/shival99-z-ui-components-z-skeleton.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-steps.mjs +55 -31
- package/fesm2022/shival99-z-ui-components-z-steps.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-switch.mjs +60 -33
- package/fesm2022/shival99-z-ui-components-z-switch.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-table.mjs +10875 -0
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs +534 -0
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-tags.mjs +72 -46
- package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs +254 -0
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-toast.mjs +53 -31
- package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tooltip.mjs +133 -56
- package/fesm2022/shival99-z-ui-components-z-tooltip.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-upload.mjs +63 -36
- package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-i18n.mjs +2 -0
- package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-pipes.mjs +18 -18
- package/fesm2022/shival99-z-ui-services.mjs +35 -31
- package/fesm2022/shival99-z-ui-services.mjs.map +1 -1
- package/package.json +16 -16
- package/types/shival99-z-ui-components-z-autocomplete.d.ts +2 -2
- package/types/shival99-z-ui-components-z-card.d.ts +1 -2
- package/types/shival99-z-ui-components-z-drawer.d.ts +20 -2
- package/types/shival99-z-ui-components-z-gallery.d.ts +1 -2
- package/types/shival99-z-ui-components-z-select.d.ts +2 -2
- package/types/shival99-z-ui-components-z-table.d.ts +2293 -0
- package/types/shival99-z-ui-components-z-tabs.d.ts +92 -0
- package/types/shival99-z-ui-components-z-timeline.d.ts +71 -0
|
@@ -0,0 +1,2293 @@
|
|
|
1
|
+
import * as _tanstack_angular_virtual from '@tanstack/angular-virtual';
|
|
2
|
+
import * as _tanstack_angular_table from '@tanstack/angular-table';
|
|
3
|
+
import { RowSelectionState, FlexRenderComponent, SortingState, ColumnFiltersState, PaginationState, ExpandedState, RowPinningState, ColumnVisibilityState, Cell as Cell$1, CellContext as CellContext$1, Column as Column$1, ColumnDef as ColumnDef$1, Header as Header$1, HeaderContext as HeaderContext$1, Row as Row$1, Table as Table$1, ColumnOrderState, ColumnSizingState, columnResizingState } from '@tanstack/angular-table';
|
|
4
|
+
import * as _shival99_z_ui_components_z_input from '@shival99/z-ui/components/z-input';
|
|
5
|
+
import { ZInputAlign, ZInputSize } from '@shival99/z-ui/components/z-input';
|
|
6
|
+
import * as _angular_core from '@angular/core';
|
|
7
|
+
import { TemplateRef, Type, AfterViewInit, ElementRef, OnInit } from '@angular/core';
|
|
8
|
+
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
9
|
+
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
10
|
+
import { ZPopoverPosition, ZPopoverTrigger, ZPopoverControl, ZPopoverDirective } from '@shival99/z-ui/components/z-popover';
|
|
11
|
+
import { ClassValue } from 'clsx';
|
|
12
|
+
import { NgScrollbar } from 'ngx-scrollbar';
|
|
13
|
+
import { ZAutocompleteType, ZAutocompleteOption } from '@shival99/z-ui/components/z-autocomplete';
|
|
14
|
+
import { ZButtonVariants } from '@shival99/z-ui/components/z-button';
|
|
15
|
+
import { ZIcon, ZIconVariants } from '@shival99/z-ui/components/z-icon';
|
|
16
|
+
import { ZSelectOption, ZSelectConfig, ZSelectMode } from '@shival99/z-ui/components/z-select';
|
|
17
|
+
import * as _shival99_z_ui_components_z_tags from '@shival99/z-ui/components/z-tags';
|
|
18
|
+
import { ZTagColor } from '@shival99/z-ui/components/z-tags';
|
|
19
|
+
import * as _shival99_z_ui_components_z_tooltip from '@shival99/z-ui/components/z-tooltip';
|
|
20
|
+
import { ZTooltipConfig, ZTooltipContent, ZTooltipTrigger } from '@shival99/z-ui/components/z-tooltip';
|
|
21
|
+
import { ZExcelColumnConfig, ZExcelExportOptions } from '@shival99/z-ui/services';
|
|
22
|
+
import { ZDateRange } from '@shival99/z-ui/components/z-calendar';
|
|
23
|
+
import { ZDropdownMenuItem } from '@shival99/z-ui/components/z-dropdown-menu';
|
|
24
|
+
import * as _shival99_z_ui_components_z_table from '@shival99/z-ui/components/z-table';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Z-Table Type Definitions
|
|
28
|
+
*
|
|
29
|
+
* Central type file for the z-table component. Contains:
|
|
30
|
+
* - Column configuration types (header, body, footer)
|
|
31
|
+
* - Sort/filter/edit configuration interfaces
|
|
32
|
+
* - Event contracts for parent-component communication
|
|
33
|
+
* - Unified change event discriminated union
|
|
34
|
+
* - Virtual scrolling configuration
|
|
35
|
+
* - Settings persistence types
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/** Z-UI's backwards-compatible physical pinning contract. */
|
|
39
|
+
interface ColumnPinningState {
|
|
40
|
+
left?: string[];
|
|
41
|
+
right?: string[];
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A virtual group represents one or more consecutive rows that must be
|
|
45
|
+
* rendered together (e.g. rows sharing a rowSpan). The virtualizer operates
|
|
46
|
+
* on groups rather than individual rows to keep merged cells intact.
|
|
47
|
+
*/
|
|
48
|
+
interface ZVirtualGroup {
|
|
49
|
+
startIndex: number;
|
|
50
|
+
endIndex: number;
|
|
51
|
+
rowCount: number;
|
|
52
|
+
/** null when dynamicSize is enabled — height is measured after render */
|
|
53
|
+
height: number | null;
|
|
54
|
+
}
|
|
55
|
+
/** Parsed segment from the `[icon:name|size:16|class:text-red]` inline icon syntax */
|
|
56
|
+
interface ZTableIconPart {
|
|
57
|
+
type: 'text' | 'icon';
|
|
58
|
+
value: string;
|
|
59
|
+
size?: number;
|
|
60
|
+
class?: string;
|
|
61
|
+
strokeWidth?: number;
|
|
62
|
+
}
|
|
63
|
+
type ZTableAlign = 'left' | 'center' | 'right';
|
|
64
|
+
type ZTableBodyContentType = 'default' | 'tag';
|
|
65
|
+
type ZTableColumnType = 'data' | 'select' | 'expand' | 'rowDrag' | 'rowPin' | 'actions';
|
|
66
|
+
type ZTableTagColor = ZTagColor;
|
|
67
|
+
/**
|
|
68
|
+
* Body cell content — supports static values, Angular templates/components,
|
|
69
|
+
* or a function that receives the cell context and returns dynamic content.
|
|
70
|
+
*/
|
|
71
|
+
type ZTableCellContent<T> = string | number | TemplateRef<{
|
|
72
|
+
$implicit: CellContext<T, unknown>;
|
|
73
|
+
}> | Type<unknown> | FlexRenderComponent<unknown> | ((info: CellContext<T, unknown>) => string | number | TemplateRef<unknown> | FlexRenderComponent<unknown>);
|
|
74
|
+
/** Header/footer cell content — similar to body but uses HeaderContext */
|
|
75
|
+
type ZTableHeaderContent<T> = string | TemplateRef<unknown> | Type<unknown> | (() => string) | ((info: HeaderContext<T, unknown>) => string);
|
|
76
|
+
/** Alias for ZTableColumnConfig — kept for backward compatibility */
|
|
77
|
+
type ZTableColumn<T = unknown> = ZTableColumnConfig<T>;
|
|
78
|
+
interface ZTableGroupLabelContext<T> {
|
|
79
|
+
value: unknown;
|
|
80
|
+
columnId: string;
|
|
81
|
+
rows: Row<T>[];
|
|
82
|
+
}
|
|
83
|
+
type ZTableGroupLabelFormatter<T> = (context: ZTableGroupLabelContext<T>) => string;
|
|
84
|
+
type ZTablePopoverContent = string | TemplateRef<unknown>;
|
|
85
|
+
interface ZTablePopoverConfig {
|
|
86
|
+
content?: ZTablePopoverContent;
|
|
87
|
+
position?: ZPopoverPosition;
|
|
88
|
+
trigger?: ZPopoverTrigger;
|
|
89
|
+
class?: string;
|
|
90
|
+
showDelay?: number;
|
|
91
|
+
hideDelay?: number;
|
|
92
|
+
disabled?: boolean;
|
|
93
|
+
offset?: number;
|
|
94
|
+
width?: 'auto' | 'trigger' | number;
|
|
95
|
+
manualClose?: boolean;
|
|
96
|
+
outsideClickClose?: boolean;
|
|
97
|
+
scrollClose?: boolean;
|
|
98
|
+
sticky?: boolean;
|
|
99
|
+
showArrow?: boolean;
|
|
100
|
+
keyboardSafe?: boolean;
|
|
101
|
+
}
|
|
102
|
+
type ZTableBodyPopoverConfig<T> = string | ZTablePopoverConfig | TemplateRef<unknown> | ((info: CellContext<T, unknown>) => string | ZTablePopoverConfig | TemplateRef<unknown>);
|
|
103
|
+
interface ZTableGroupTotalContext<T> {
|
|
104
|
+
columnId: string;
|
|
105
|
+
rows: Row<T>[];
|
|
106
|
+
value: unknown;
|
|
107
|
+
depth: number;
|
|
108
|
+
}
|
|
109
|
+
type ZTableGroupTotalContent<T> = 'sum' | ((context: ZTableGroupTotalContext<T>) => unknown);
|
|
110
|
+
interface ZTableGroupTotalConfig<T = unknown> {
|
|
111
|
+
columnId: string;
|
|
112
|
+
content?: ZTableGroupTotalContent<T>;
|
|
113
|
+
class?: string;
|
|
114
|
+
tooltip?: string | TemplateRef<unknown> | ZTableTooltipConfig;
|
|
115
|
+
popover?: ZTablePopoverContent | ZTablePopoverConfig;
|
|
116
|
+
}
|
|
117
|
+
interface ZTableTooltipConfig extends ZTooltipConfig {
|
|
118
|
+
trigger?: ZTooltipTrigger;
|
|
119
|
+
}
|
|
120
|
+
type ZTableBodyTooltipConfig<T> = string | ZTableTooltipConfig | TemplateRef<unknown> | ((info: CellContext<T, unknown>) => string | ZTableTooltipConfig | TemplateRef<unknown>);
|
|
121
|
+
/** Available column filter value input hints */
|
|
122
|
+
type ZTableFilterValueType = 'text' | 'number';
|
|
123
|
+
type ZTableFilterUi = 'basic' | 'advanced' | 'custom';
|
|
124
|
+
type ZTableAdvancedFilterType = 'text' | 'number' | 'range' | 'date' | 'date-range' | 'time' | 'select' | 'multi-select' | 'tags';
|
|
125
|
+
type ZTableFilterOptionSource = 'faceted' | 'table';
|
|
126
|
+
/** Available column filter operators */
|
|
127
|
+
type ZTableFilterOperator = 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'equals' | 'notEquals' | 'greaterThan' | 'greaterThanOrEqual' | 'lessThan' | 'lessThanOrEqual' | 'empty' | 'notEmpty';
|
|
128
|
+
type ZTableFilterJoinOperator = 'and' | 'or';
|
|
129
|
+
interface ZTableFilterCondition {
|
|
130
|
+
joinWithPrev?: ZTableFilterJoinOperator;
|
|
131
|
+
operator: ZTableFilterOperator;
|
|
132
|
+
value?: unknown;
|
|
133
|
+
}
|
|
134
|
+
interface ZTableDraftFilterCondition {
|
|
135
|
+
readonly id: string;
|
|
136
|
+
readonly joinWithPrev?: ZTableFilterJoinOperator;
|
|
137
|
+
operator: ZTableFilterOperator | null;
|
|
138
|
+
value?: unknown;
|
|
139
|
+
}
|
|
140
|
+
interface ZTableFilterConditionView extends ZTableDraftFilterCondition {
|
|
141
|
+
readonly inputType: 'text' | 'number';
|
|
142
|
+
readonly isJoinGroupStart: boolean;
|
|
143
|
+
readonly isValueLess: boolean;
|
|
144
|
+
readonly joinLabelKey: string;
|
|
145
|
+
readonly joinTone: 'and' | 'or';
|
|
146
|
+
readonly operatorOptions: ZSelectOption<ZTableFilterOperator>[];
|
|
147
|
+
}
|
|
148
|
+
type ZTableLegacyAdvancedFilterType = Exclude<ZTableAdvancedFilterType, 'text' | 'number'>;
|
|
149
|
+
/** Available inline cell edit input types */
|
|
150
|
+
type ZTableEditType = 'text' | 'number' | 'select' | 'date' | 'checkbox' | 'textarea' | 'toggle' | 'autocomplete';
|
|
151
|
+
/**
|
|
152
|
+
* Table operation mode:
|
|
153
|
+
* - 'local': data is fully client-side (sort/filter/paginate handled by TanStack)
|
|
154
|
+
* - 'server': parent handles data fetching; table emits change events for server calls
|
|
155
|
+
*/
|
|
156
|
+
type ZTableMode = 'local' | 'server';
|
|
157
|
+
/** Per-column sort configuration; mode controls local vs server-side sorting */
|
|
158
|
+
interface ZTableSortConfig<T> {
|
|
159
|
+
enabled?: boolean;
|
|
160
|
+
/** 'local' = TanStack sorts in-memory; 'server' = emits event for API call */
|
|
161
|
+
mode?: ZTableMode;
|
|
162
|
+
/** Custom key sent with server-side sort events (defaults to column id) */
|
|
163
|
+
sortKey?: string;
|
|
164
|
+
/** Custom comparator for local sorting */
|
|
165
|
+
sortFn?: (rowA: Row<T>, rowB: Row<T>, columnId: string) => number;
|
|
166
|
+
}
|
|
167
|
+
type ZTableBuiltInFilterFn = 'equalsString' | 'includesString' | 'includesStringSensitive' | 'arrIncludes' | 'arrIncludesAll' | 'arrIncludesSome' | 'equals' | 'weakEquals' | 'inNumberRange';
|
|
168
|
+
type ZTableCustomFilterFn<T> = (row: Row<T>, columnId: string, filterValue: unknown, addMeta: (meta: unknown) => void) => boolean;
|
|
169
|
+
interface ZTableFilterConfig<T = unknown> {
|
|
170
|
+
enabled?: boolean;
|
|
171
|
+
mode?: ZTableMode;
|
|
172
|
+
valueType?: ZTableFilterValueType;
|
|
173
|
+
ui?: ZTableFilterUi;
|
|
174
|
+
advancedType?: ZTableAdvancedFilterType;
|
|
175
|
+
options?: ZSelectOption[];
|
|
176
|
+
selectConfig?: Partial<ZSelectConfig<unknown>>;
|
|
177
|
+
optionSource?: ZTableFilterOptionSource;
|
|
178
|
+
allowClear?: boolean;
|
|
179
|
+
label?: string;
|
|
180
|
+
placeholder?: string;
|
|
181
|
+
filterFn?: ZTableBuiltInFilterFn | ZTableCustomFilterFn<T>;
|
|
182
|
+
/**
|
|
183
|
+
* @deprecated Dùng `advancedType` thay thế.
|
|
184
|
+
*/
|
|
185
|
+
type?: ZTableAdvancedFilterType;
|
|
186
|
+
/**
|
|
187
|
+
* @deprecated Dùng `advancedType` thay thế.
|
|
188
|
+
*/
|
|
189
|
+
filterType?: ZTableAdvancedFilterType;
|
|
190
|
+
/**
|
|
191
|
+
* @deprecated Dùng `options` thay thế.
|
|
192
|
+
*/
|
|
193
|
+
filterOptions?: ZSelectOption[];
|
|
194
|
+
}
|
|
195
|
+
type ZTableEditSize = 'sm' | 'default' | 'lg';
|
|
196
|
+
type ZTableEditContentType = 'text' | 'number' | 'select' | 'date';
|
|
197
|
+
interface ZTableEditContentConfig<T = unknown> {
|
|
198
|
+
type?: ZTableEditContentType;
|
|
199
|
+
options?: unknown[] | ((row: T) => unknown[]);
|
|
200
|
+
placeholder?: string | ((row: T) => string);
|
|
201
|
+
class?: string | ((row: T) => string);
|
|
202
|
+
style?: Record<string, string> | ((row: T) => Record<string, string>);
|
|
203
|
+
size?: ZTableEditSize;
|
|
204
|
+
disabled?: boolean | ((row: T) => boolean);
|
|
205
|
+
readonly?: boolean | ((row: T) => boolean);
|
|
206
|
+
loading?: boolean | ((row: T) => boolean);
|
|
207
|
+
align?: ZInputAlign;
|
|
208
|
+
prefix?: string;
|
|
209
|
+
suffix?: string;
|
|
210
|
+
min?: number;
|
|
211
|
+
max?: number;
|
|
212
|
+
step?: number;
|
|
213
|
+
mask?: string;
|
|
214
|
+
decimalPlaces?: number;
|
|
215
|
+
allowNegative?: boolean;
|
|
216
|
+
thousandSeparator?: string;
|
|
217
|
+
decimalMarker?: '.' | ',' | ['.', ','];
|
|
218
|
+
optionLabelKey?: string;
|
|
219
|
+
optionValueKey?: string;
|
|
220
|
+
selectConfig?: Partial<ZSelectConfig<unknown>>;
|
|
221
|
+
selectMode?: ZSelectMode;
|
|
222
|
+
mode?: ZSelectMode;
|
|
223
|
+
selectShowSearch?: boolean;
|
|
224
|
+
selectWrap?: boolean;
|
|
225
|
+
maxTagCount?: number;
|
|
226
|
+
dateFormat?: string;
|
|
227
|
+
dateValueType?: 'date' | 'iso' | 'string';
|
|
228
|
+
minDate?: Date | null;
|
|
229
|
+
maxDate?: Date | null;
|
|
230
|
+
allowClear?: boolean;
|
|
231
|
+
}
|
|
232
|
+
interface ZTableEditConfig<T = unknown> {
|
|
233
|
+
enabled?: boolean;
|
|
234
|
+
/** Edit type - can be static or dynamic per row */
|
|
235
|
+
type?: ZTableEditType | ((row: T) => ZTableEditType);
|
|
236
|
+
/** Select options - can be static or dynamic per row */
|
|
237
|
+
options?: ZSelectOption[] | ((row: T) => ZSelectOption[]);
|
|
238
|
+
/** Placeholder - can be static or dynamic per row */
|
|
239
|
+
placeholder?: string | ((row: T) => string);
|
|
240
|
+
/** Allow clear for select input. Default: false */
|
|
241
|
+
allowClear?: boolean;
|
|
242
|
+
/**
|
|
243
|
+
* Custom option label key when using raw objects as options.
|
|
244
|
+
* Use this when your options don't have 'label' property.
|
|
245
|
+
* Example: optionLabelKey: 'tagName' for { tagName: 'Value', tagId: 1 }
|
|
246
|
+
*/
|
|
247
|
+
optionLabelKey?: string;
|
|
248
|
+
/**
|
|
249
|
+
* Custom option value key when using raw objects as options.
|
|
250
|
+
* Use this when your options don't have 'value' property.
|
|
251
|
+
* Example: optionValueKey: 'tagName' for { tagName: 'Value', tagId: 1 }
|
|
252
|
+
*/
|
|
253
|
+
optionValueKey?: string;
|
|
254
|
+
/**
|
|
255
|
+
* CSS class to apply to the edit cell input/select/etc component
|
|
256
|
+
*/
|
|
257
|
+
class?: string | ((row: T) => string);
|
|
258
|
+
style?: Record<string, string> | ((row: T) => Record<string, string>);
|
|
259
|
+
min?: number;
|
|
260
|
+
max?: number;
|
|
261
|
+
step?: number;
|
|
262
|
+
mask?: string;
|
|
263
|
+
decimalPlaces?: number;
|
|
264
|
+
allowNegative?: boolean;
|
|
265
|
+
rows?: number;
|
|
266
|
+
thousandSeparator?: string;
|
|
267
|
+
decimalMarker?: '.' | ',' | ['.', ','];
|
|
268
|
+
disabled?: boolean | ((row: T) => boolean);
|
|
269
|
+
/** Readonly mode - input is visible but not editable */
|
|
270
|
+
readonly?: boolean | ((row: T) => boolean);
|
|
271
|
+
/** Loading mode - shows control loading indicator when supported. */
|
|
272
|
+
loading?: boolean | ((row: T) => boolean);
|
|
273
|
+
debounceTime?: number;
|
|
274
|
+
/** Only emit change on blur (when user leaves the input). Default: false */
|
|
275
|
+
blurEdit?: boolean;
|
|
276
|
+
/** Size of the edit input. Default: 'sm' */
|
|
277
|
+
size?: ZTableEditSize;
|
|
278
|
+
/** Autocomplete type - default or addressbar */
|
|
279
|
+
autocompleteType?: ZAutocompleteType;
|
|
280
|
+
/** Autocomplete options - for autocomplete type */
|
|
281
|
+
autocompleteOptions?: ZAutocompleteOption[] | ((row: T) => ZAutocompleteOption[]);
|
|
282
|
+
/** Reset input after selecting an option in autocomplete. Default: false */
|
|
283
|
+
autocompleteResetOnSelect?: boolean;
|
|
284
|
+
/** Height of autocomplete dropdown in pixels. Default: 280 */
|
|
285
|
+
autocompleteHeight?: number;
|
|
286
|
+
/** Allow typing custom values when no options match. Default: false */
|
|
287
|
+
autocompleteAllowCustomValue?: boolean;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Imperative control handle emitted via `zControl` output.
|
|
291
|
+
* Allows parent components to programmatically manipulate table state
|
|
292
|
+
* (add/update/delete items, reset filters, toggle settings, etc.).
|
|
293
|
+
*/
|
|
294
|
+
interface ZTableControl<T> {
|
|
295
|
+
updateConfig: (config: Partial<ZTableConfig<T>>) => void;
|
|
296
|
+
toggleSettings: () => void;
|
|
297
|
+
resetFilters: () => void;
|
|
298
|
+
resetSorting: () => void;
|
|
299
|
+
clearSelection: () => void;
|
|
300
|
+
addItem: (item: T) => void;
|
|
301
|
+
updateItem: (id: string | number, updates: Partial<T>, fieldKey?: keyof T) => void;
|
|
302
|
+
deleteItem: (id: string | number, fieldKey?: keyof T) => void;
|
|
303
|
+
getItems: () => T[];
|
|
304
|
+
setColumnVisibility: (columnIds: string | string[], visible: boolean) => void;
|
|
305
|
+
}
|
|
306
|
+
/** Header cell configuration — applied to the <th> in the table header row */
|
|
307
|
+
interface ZTableHeaderColumnConfig<T> {
|
|
308
|
+
content?: ZTableHeaderContent<T>;
|
|
309
|
+
class?: string;
|
|
310
|
+
style?: Record<string, string>;
|
|
311
|
+
align?: ZTableAlign;
|
|
312
|
+
rowSpan?: number;
|
|
313
|
+
colSpan?: number;
|
|
314
|
+
/** Class applied to the inner content wrapper, not the <th> itself */
|
|
315
|
+
contentClass?: string | ((info: HeaderContext<T, unknown>) => string);
|
|
316
|
+
contentStyle?: Record<string, string> | ((info: HeaderContext<T, unknown>) => Record<string, string>);
|
|
317
|
+
tooltip?: string | ZTooltipConfig;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Body cell configuration — most properties accept a static value or
|
|
321
|
+
* a function receiving CellContext for per-row dynamic behavior.
|
|
322
|
+
*/
|
|
323
|
+
interface ZTableBodyColumnConfig<T> {
|
|
324
|
+
content?: ZTableCellContent<T>;
|
|
325
|
+
/** Built-in visual treatment for the rendered body content. */
|
|
326
|
+
type?: ZTableBodyContentType;
|
|
327
|
+
/** Semantic color used when type is "tag". */
|
|
328
|
+
tagColor?: ZTableTagColor | ((info: CellContext<T, unknown>) => ZTableTagColor);
|
|
329
|
+
class?: string | ((info: CellContext<T, unknown>) => string);
|
|
330
|
+
style?: Record<string, string> | ((info: CellContext<T, unknown>) => Record<string, string>);
|
|
331
|
+
align?: ZTableAlign;
|
|
332
|
+
/** Static rowSpan or function returning 0 to hide the cell (merged into neighbor) */
|
|
333
|
+
rowSpan?: number | ((info: CellContext<T, unknown>) => number);
|
|
334
|
+
colSpan?: number | ((info: CellContext<T, unknown>) => number);
|
|
335
|
+
contentClass?: string | ((info: CellContext<T, unknown>) => string);
|
|
336
|
+
contentStyle?: Record<string, string> | ((info: CellContext<T, unknown>) => Record<string, string>);
|
|
337
|
+
tooltip?: ZTableBodyTooltipConfig<T>;
|
|
338
|
+
popover?: ZTableBodyPopoverConfig<T>;
|
|
339
|
+
/**
|
|
340
|
+
* Action buttons rendered inside this cell.
|
|
341
|
+
*
|
|
342
|
+
* Preferred: pass an action array or `(row) => action[]` directly.
|
|
343
|
+
* Deprecated compatibility: `{ actions, maxVisible }` is still supported.
|
|
344
|
+
*/
|
|
345
|
+
actions?: ZTableActionBodyConfig<T>;
|
|
346
|
+
/** Maximum visible action buttons before rendering the overflow menu. */
|
|
347
|
+
actionMaxVisible?: number;
|
|
348
|
+
/** When true, clicking the cell emits a cellClick event */
|
|
349
|
+
enabledClick?: boolean;
|
|
350
|
+
/** Enable inline editing — true uses defaults, or pass full config */
|
|
351
|
+
edit?: ZTableEditConfig<T> | boolean;
|
|
352
|
+
/** Cho phép sửa trực tiếp trong cell theo kiểu Excel, không render editor component. */
|
|
353
|
+
editContent?: ZTableEditContentConfig<T> | boolean;
|
|
354
|
+
/** Control cell content visibility. When false, the cell is rendered but content is hidden. */
|
|
355
|
+
visible?: boolean | ((info: CellContext<T, unknown>) => boolean);
|
|
356
|
+
}
|
|
357
|
+
interface ZTableFooterColumnConfig<T> {
|
|
358
|
+
content?: ZTableHeaderContent<T>;
|
|
359
|
+
class?: string;
|
|
360
|
+
style?: Record<string, string>;
|
|
361
|
+
align?: ZTableAlign;
|
|
362
|
+
rowSpan?: number;
|
|
363
|
+
colSpan?: number;
|
|
364
|
+
contentClass?: string | ((info: HeaderContext<T, unknown>) => string);
|
|
365
|
+
contentStyle?: Record<string, string> | ((info: HeaderContext<T, unknown>) => Record<string, string>);
|
|
366
|
+
tooltip?: string | ZTooltipConfig;
|
|
367
|
+
}
|
|
368
|
+
type ZTableFooterConfig<T> = ZTableFooterColumnConfig<T> | ZTableHeaderContent<T>;
|
|
369
|
+
/**
|
|
370
|
+
* Primary column definition — the consumer-facing API.
|
|
371
|
+
* Converted to TanStack ColumnDef internally via `columnConfigToColumnDef()`.
|
|
372
|
+
*
|
|
373
|
+
* Shorthand: header/body/footer accept either a full config object or
|
|
374
|
+
* just the content directly (string/template/function).
|
|
375
|
+
*
|
|
376
|
+
* Nested columns: use `columns` for multi-level header groups.
|
|
377
|
+
*/
|
|
378
|
+
interface ZTableColumnConfig<T> {
|
|
379
|
+
/** Unique column identifier — must be stable across re-renders */
|
|
380
|
+
id: string;
|
|
381
|
+
/** Semantic column role. Falls back to legacy id/body detection when omitted. */
|
|
382
|
+
type?: ZTableColumnType;
|
|
383
|
+
/** Pre-filter visibility — unlike columnVisibility, this removes the column entirely */
|
|
384
|
+
visible?: boolean | (() => boolean);
|
|
385
|
+
/** Object property key for simple accessor — mutually exclusive with accessorFn */
|
|
386
|
+
accessorKey?: keyof T & string;
|
|
387
|
+
/** Custom accessor function for derived/computed cell values */
|
|
388
|
+
accessorFn?: (row: T) => unknown;
|
|
389
|
+
header?: ZTableHeaderColumnConfig<T> | ZTableHeaderContent<T>;
|
|
390
|
+
body?: ZTableBodyColumnConfig<T> | ZTableCellContent<T>;
|
|
391
|
+
/** Một cấu hình footer hoặc một cấu hình cho mỗi hàng footer. */
|
|
392
|
+
footer?: ZTableFooterConfig<T> | ZTableFooterConfig<T>[];
|
|
393
|
+
size?: number;
|
|
394
|
+
minSize?: number;
|
|
395
|
+
maxSize?: number;
|
|
396
|
+
width?: string;
|
|
397
|
+
/** true = local sort with defaults; object = full config */
|
|
398
|
+
sort?: ZTableSortConfig<T> | boolean;
|
|
399
|
+
/** true = local filter with defaults; object = full config */
|
|
400
|
+
filter?: ZTableFilterConfig<T> | boolean;
|
|
401
|
+
enableResizing?: boolean;
|
|
402
|
+
enablePinning?: boolean;
|
|
403
|
+
enableHiding?: boolean;
|
|
404
|
+
enableOrdering?: boolean;
|
|
405
|
+
/** Whether this column can be used from the header "Group by" menu */
|
|
406
|
+
enableGrouping?: boolean;
|
|
407
|
+
/** Field hoặc accessor dùng làm khóa nhóm thay cho giá trị của chính cột. */
|
|
408
|
+
groupKey?: keyof T | ((row: T) => unknown);
|
|
409
|
+
/** Format the displayed group header value for this column */
|
|
410
|
+
groupLabel?: ZTableGroupLabelFormatter<T>;
|
|
411
|
+
enableHeaderMenu?: boolean;
|
|
412
|
+
/** Initial pin position — applied on first render */
|
|
413
|
+
pinned?: 'left' | 'right' | false;
|
|
414
|
+
/** Child columns for multi-level header grouping */
|
|
415
|
+
columns?: ZTableColumnConfig<T>[];
|
|
416
|
+
}
|
|
417
|
+
interface ZTablePaginationConfig {
|
|
418
|
+
enabled?: boolean;
|
|
419
|
+
pageSize?: number;
|
|
420
|
+
pageIndex?: number;
|
|
421
|
+
pageSizeOptions?: number[];
|
|
422
|
+
showSizeChanger?: boolean;
|
|
423
|
+
showQuickJumper?: boolean;
|
|
424
|
+
showTotal?: boolean;
|
|
425
|
+
totalLabel?: string;
|
|
426
|
+
disabled?: boolean;
|
|
427
|
+
}
|
|
428
|
+
type ZTableGroupingMode = 'local' | 'server';
|
|
429
|
+
/**
|
|
430
|
+
* EN: Server-provided group descriptor. In server grouping the table does NOT compute groups from
|
|
431
|
+
* the current page rows; instead the parent supplies the ordered group list (label/count) and
|
|
432
|
+
* fills `config.data` with the child rows it has fetched. Rows are matched to a group by `value`
|
|
433
|
+
* (same key the grouping column would produce, including `groupKey` when configured).
|
|
434
|
+
* VI: Mô tả group do server cung cấp. Ở chế độ server, table KHÔNG tự group từ rows của trang hiện
|
|
435
|
+
* tại; parent cung cấp danh sách group (label/count) theo thứ tự và đổ child rows đã fetch vào
|
|
436
|
+
* `config.data`. Row được gán vào group qua `value`, cùng khóa mà cột group sinh ra, bao gồm
|
|
437
|
+
* `groupKey` nếu cột có cấu hình.
|
|
438
|
+
*/
|
|
439
|
+
interface ZTableServerGroup {
|
|
440
|
+
/** Giá trị nhóm — khớp với khóa group của row để gán row vào group. */
|
|
441
|
+
value: unknown;
|
|
442
|
+
/** Nhãn hiển thị; nếu bỏ trống table tự suy ra từ `value`. */
|
|
443
|
+
label?: string;
|
|
444
|
+
/** Tổng số dòng của group (server cung cấp) — hiển thị badge kể cả khi chưa expand/đủ data. */
|
|
445
|
+
count?: number;
|
|
446
|
+
/** Đang fetch rows cho group này (hiển thị loading trong group). */
|
|
447
|
+
loading?: boolean;
|
|
448
|
+
/** Tổng theo cột do server cung cấp, key là columnId. */
|
|
449
|
+
totals?: Record<string, unknown>;
|
|
450
|
+
}
|
|
451
|
+
interface ZTableGroupingConfig<T = unknown> {
|
|
452
|
+
enabled?: boolean;
|
|
453
|
+
mode?: ZTableGroupingMode;
|
|
454
|
+
/** Các cột được phép group từ header menu. */
|
|
455
|
+
columns?: string[];
|
|
456
|
+
/** Danh sách cột group ban đầu theo thứ tự từ ngoài vào trong. */
|
|
457
|
+
initialColumns?: string[];
|
|
458
|
+
allowHeaderMenu?: boolean;
|
|
459
|
+
defaultExpanded?: boolean;
|
|
460
|
+
showCount?: boolean;
|
|
461
|
+
/** Cấu hình các cột cần hiển thị tổng trên group row. */
|
|
462
|
+
totals?: ZTableGroupTotalConfig<T>[];
|
|
463
|
+
/**
|
|
464
|
+
* Cột đang group ở chế độ server (bắt buộc cho server grouping vì table không tự suy ra).
|
|
465
|
+
* Nếu bỏ trống, dùng phần tử đầu của `columns`.
|
|
466
|
+
*/
|
|
467
|
+
serverGroupColumnId?: string;
|
|
468
|
+
/** Danh sách group do server cung cấp (chỉ dùng khi mode = 'server'). */
|
|
469
|
+
serverGroups?: ZTableServerGroup[];
|
|
470
|
+
}
|
|
471
|
+
/** Payload emit khi expand/collapse một group ở chế độ server. */
|
|
472
|
+
interface ZTableGroupExpandEvent {
|
|
473
|
+
groupId: string;
|
|
474
|
+
columnId: string;
|
|
475
|
+
value: unknown;
|
|
476
|
+
expanded: boolean;
|
|
477
|
+
}
|
|
478
|
+
/** Distinguishes user-triggered vs programmatic pagination changes */
|
|
479
|
+
type ZTableEmitType = 'user' | 'auto';
|
|
480
|
+
interface ZTablePageChangeEvent {
|
|
481
|
+
pageIndex: number;
|
|
482
|
+
pageSize: number;
|
|
483
|
+
emitType: ZTableEmitType;
|
|
484
|
+
}
|
|
485
|
+
interface ZTableRowSelectEvent<T> {
|
|
486
|
+
row: T;
|
|
487
|
+
rowId: string;
|
|
488
|
+
selected: boolean;
|
|
489
|
+
selectedRows: T[];
|
|
490
|
+
selectedRowIds: string[];
|
|
491
|
+
}
|
|
492
|
+
interface ZTableRowSelectAllEvent<T> {
|
|
493
|
+
selected: boolean;
|
|
494
|
+
selectedRows: T[];
|
|
495
|
+
selectedRowIds: string[];
|
|
496
|
+
}
|
|
497
|
+
interface ZTableRowExpandEvent<T> {
|
|
498
|
+
row: T;
|
|
499
|
+
rowId: string;
|
|
500
|
+
expanded: boolean;
|
|
501
|
+
}
|
|
502
|
+
interface ZTableCellClickEvent<T> {
|
|
503
|
+
row: T;
|
|
504
|
+
rowId: string;
|
|
505
|
+
columnId: string;
|
|
506
|
+
value: unknown;
|
|
507
|
+
}
|
|
508
|
+
interface ZTableCellEditEvent<T> {
|
|
509
|
+
row: T;
|
|
510
|
+
rowId: string;
|
|
511
|
+
rowIndex: number;
|
|
512
|
+
columnId: string;
|
|
513
|
+
oldValue: unknown;
|
|
514
|
+
newValue: unknown;
|
|
515
|
+
}
|
|
516
|
+
interface ZTableRowDragEvent<T> {
|
|
517
|
+
row: T;
|
|
518
|
+
rowId: string;
|
|
519
|
+
previousIndex: number;
|
|
520
|
+
currentIndex: number;
|
|
521
|
+
data: T[];
|
|
522
|
+
}
|
|
523
|
+
type ZTableRowInsertPosition = 'above' | 'below';
|
|
524
|
+
interface ZTableRowInsertEvent<T> {
|
|
525
|
+
row: T;
|
|
526
|
+
rowId: string;
|
|
527
|
+
/** Index trong row model đang hiển thị. */
|
|
528
|
+
rowIndex: number;
|
|
529
|
+
/** Index trong mảng data gốc. */
|
|
530
|
+
sourceIndex: number;
|
|
531
|
+
position: ZTableRowInsertPosition;
|
|
532
|
+
}
|
|
533
|
+
interface ZTableRowDeleteEvent<T> {
|
|
534
|
+
rows: T[];
|
|
535
|
+
rowIds: string[];
|
|
536
|
+
/** Index trong row model đang hiển thị. */
|
|
537
|
+
rowIndexes: number[];
|
|
538
|
+
/** Index trong mảng data gốc. */
|
|
539
|
+
sourceIndexes: number[];
|
|
540
|
+
}
|
|
541
|
+
interface ZTableRowCopyEvent<T> {
|
|
542
|
+
rows: T[];
|
|
543
|
+
rowIds: string[];
|
|
544
|
+
/** Index trong row model đang hiển thị. */
|
|
545
|
+
rowIndexes: number[];
|
|
546
|
+
/** Index trong mảng data gốc. */
|
|
547
|
+
sourceIndexes: number[];
|
|
548
|
+
}
|
|
549
|
+
interface ZTableRowPasteEvent<T> {
|
|
550
|
+
rows: T[];
|
|
551
|
+
targetRow: T;
|
|
552
|
+
targetRowId: string;
|
|
553
|
+
/** Index trong row model đang hiển thị. */
|
|
554
|
+
targetRowIndex: number;
|
|
555
|
+
/** Index trong mảng data gốc. */
|
|
556
|
+
targetSourceIndex: number;
|
|
557
|
+
position: ZTableRowInsertPosition;
|
|
558
|
+
}
|
|
559
|
+
type ZTableRowMoveDirection = 'up' | 'down';
|
|
560
|
+
interface ZTableRowMoveEvent<T> {
|
|
561
|
+
row: T;
|
|
562
|
+
rowId: string;
|
|
563
|
+
direction: ZTableRowMoveDirection;
|
|
564
|
+
/** Index trong row model đang hiển thị. */
|
|
565
|
+
previousIndex: number;
|
|
566
|
+
currentIndex: number;
|
|
567
|
+
/** Index trong mảng data gốc. */
|
|
568
|
+
previousSourceIndex: number;
|
|
569
|
+
currentSourceIndex: number;
|
|
570
|
+
}
|
|
571
|
+
interface ZTableSortChangeEvent {
|
|
572
|
+
sorting: SortingState;
|
|
573
|
+
}
|
|
574
|
+
interface ZTableFilterChangeEvent {
|
|
575
|
+
filters: ColumnFiltersState;
|
|
576
|
+
search: string;
|
|
577
|
+
}
|
|
578
|
+
interface ZTableSearchChangeEvent {
|
|
579
|
+
search: string;
|
|
580
|
+
filters: ColumnFiltersState;
|
|
581
|
+
sorting: SortingState;
|
|
582
|
+
pagination: PaginationState;
|
|
583
|
+
}
|
|
584
|
+
interface ZActionTooltipState {
|
|
585
|
+
content: ZTooltipContent;
|
|
586
|
+
alwaysShow: boolean;
|
|
587
|
+
position?: string;
|
|
588
|
+
arrow?: boolean;
|
|
589
|
+
offset?: number;
|
|
590
|
+
maxWidth?: string;
|
|
591
|
+
}
|
|
592
|
+
interface ZTableActionItem<T = unknown> {
|
|
593
|
+
key: string;
|
|
594
|
+
label?: string;
|
|
595
|
+
icon?: ZIcon;
|
|
596
|
+
iconSize?: ZIconVariants['zSize'];
|
|
597
|
+
tooltip?: string | ZTooltipConfig;
|
|
598
|
+
type?: ZButtonVariants['zType'];
|
|
599
|
+
size?: ZButtonVariants['zSize'];
|
|
600
|
+
class?: string;
|
|
601
|
+
loading?: boolean | ((row: T) => boolean);
|
|
602
|
+
disabled?: boolean | ((row: T) => boolean);
|
|
603
|
+
hidden?: boolean | ((row: T) => boolean);
|
|
604
|
+
divide?: 'before' | 'after';
|
|
605
|
+
}
|
|
606
|
+
type ZTableActionList<T = unknown> = ZTableActionItem<T>[] | ((row: T) => ZTableActionItem<T>[]);
|
|
607
|
+
interface ZTableActionClickEvent<T = unknown> {
|
|
608
|
+
key: string;
|
|
609
|
+
row: T;
|
|
610
|
+
rowId: string;
|
|
611
|
+
action: ZTableActionItem<T>;
|
|
612
|
+
}
|
|
613
|
+
interface ZTableBulkActionContext<T = unknown> {
|
|
614
|
+
selectedRows: T[];
|
|
615
|
+
selectedRowIds: string[];
|
|
616
|
+
selection: RowSelectionState;
|
|
617
|
+
}
|
|
618
|
+
interface ZTableBulkActionHandlerContext<T = unknown> extends ZTableBulkActionContext<T> {
|
|
619
|
+
exportExcel: (config: ZTableExcelExportConfig<T>) => Promise<void>;
|
|
620
|
+
}
|
|
621
|
+
interface ZTableBulkActionItem<T = unknown> extends Omit<ZTableActionItem<ZTableBulkActionContext<T>>, 'disabled' | 'hidden'> {
|
|
622
|
+
disabled?: boolean | ((context: ZTableBulkActionContext<T>) => boolean);
|
|
623
|
+
hidden?: boolean | ((context: ZTableBulkActionContext<T>) => boolean);
|
|
624
|
+
handler?: (context: ZTableBulkActionHandlerContext<T>) => void | false | Promise<void | false>;
|
|
625
|
+
}
|
|
626
|
+
interface ZTableBulkActionViewItem<T = unknown> {
|
|
627
|
+
action: ZTableBulkActionItem<T>;
|
|
628
|
+
disabled: boolean;
|
|
629
|
+
}
|
|
630
|
+
type ZTableBulkActionRenderItem<T = unknown> = ZTableBulkActionViewItem<T> & {
|
|
631
|
+
buttonType: ZButtonVariants['zType'];
|
|
632
|
+
};
|
|
633
|
+
type ZTableBulkActionList<T = unknown> = ZTableBulkActionItem<T>[] | ((context: ZTableBulkActionContext<T>) => ZTableBulkActionItem<T>[]);
|
|
634
|
+
interface ZTableBulkActionOptions<T = unknown> {
|
|
635
|
+
enabled?: boolean;
|
|
636
|
+
/** Custom actions rendered when rows are selected. */
|
|
637
|
+
actions?: ZTableBulkActionList<T>;
|
|
638
|
+
maxVisible?: number;
|
|
639
|
+
selectedLabel?: string;
|
|
640
|
+
clearLabel?: string;
|
|
641
|
+
}
|
|
642
|
+
type ZTableBulkActionConfig<T = unknown> = ZTableBulkActionOptions<T> | ZTableBulkActionList<T>;
|
|
643
|
+
interface ZTableBulkActionClickEvent<T = unknown> extends ZTableBulkActionContext<T> {
|
|
644
|
+
key: string;
|
|
645
|
+
action: ZTableBulkActionItem<T>;
|
|
646
|
+
}
|
|
647
|
+
interface ZTableCellSelectionPredicateContext<T = unknown> {
|
|
648
|
+
row: T;
|
|
649
|
+
rowId: string;
|
|
650
|
+
rowIndex: number;
|
|
651
|
+
columnId: string;
|
|
652
|
+
column: ZTableColumnConfig<T> | undefined;
|
|
653
|
+
}
|
|
654
|
+
interface ZTableCellSelectionOptions<T = unknown> {
|
|
655
|
+
enabled?: boolean;
|
|
656
|
+
range?: boolean;
|
|
657
|
+
contextMenu?: boolean;
|
|
658
|
+
copyWithHeaders?: boolean;
|
|
659
|
+
/** Column ids that cannot be selected, used as range boundaries, or copied from a range. */
|
|
660
|
+
disabledColumnIds?: string[];
|
|
661
|
+
/** Disable selection for a specific custom cell. */
|
|
662
|
+
isCellDisabled?: (context: ZTableCellSelectionPredicateContext<T>) => boolean;
|
|
663
|
+
}
|
|
664
|
+
type ZTableCellSelectionConfig<T = unknown> = boolean | ZTableCellSelectionOptions<T>;
|
|
665
|
+
type ZTableExcelExportScope = 'selected' | 'filtered' | 'all';
|
|
666
|
+
interface ZTableExcelExportContext<T = unknown> extends ZTableBulkActionContext<T> {
|
|
667
|
+
data: T[];
|
|
668
|
+
columns: ZTableColumnConfig<T>[];
|
|
669
|
+
}
|
|
670
|
+
interface ZTableExcelExportConfig<T = unknown> {
|
|
671
|
+
enabled?: boolean;
|
|
672
|
+
/** Built-in action key. Use the same key in bulkAction to override the button. */
|
|
673
|
+
actionKey?: string;
|
|
674
|
+
actionLabel?: string;
|
|
675
|
+
actionIcon?: ZIcon;
|
|
676
|
+
actionIconSize?: string;
|
|
677
|
+
fileName?: string | ((context: ZTableExcelExportContext<T>) => string);
|
|
678
|
+
sheetName?: string;
|
|
679
|
+
/** Shortcut for `scope: 'all'`. */
|
|
680
|
+
exportAll?: boolean;
|
|
681
|
+
scope?: ZTableExcelExportScope;
|
|
682
|
+
excludeColumns?: string[];
|
|
683
|
+
excelOverrides?: Partial<Record<string, Partial<ZExcelColumnConfig<T>>>>;
|
|
684
|
+
headerResolver?: (col: ZTableColumnConfig<T>) => string;
|
|
685
|
+
options?: ZExcelExportOptions;
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* @deprecated Use `ZTableBodyColumnConfig.actions` directly with an action array
|
|
689
|
+
* or `(row) => action[]`, and set `actionMaxVisible` on the body config when needed.
|
|
690
|
+
*/
|
|
691
|
+
interface ZTableActionColumnConfig<T = unknown> {
|
|
692
|
+
/**
|
|
693
|
+
* @deprecated Put the action array/function directly in `body.actions` instead.
|
|
694
|
+
*/
|
|
695
|
+
actions: ZTableActionList<T>;
|
|
696
|
+
maxVisible?: number;
|
|
697
|
+
}
|
|
698
|
+
type ZTableActionBodyConfig<T = unknown> = ZTableActionColumnConfig<T> | (ZTableActionList<T> & Partial<ZTableActionColumnConfig<T>>);
|
|
699
|
+
/** All possible change event types — used as discriminant in ZTableChangeEvent */
|
|
700
|
+
type ZTableChangeType = 'page' | 'sort' | 'filter' | 'search' | 'select' | 'expand' | 'rowSelect' | 'rowSelectAll' | 'rowExpand' | 'rowDrag' | 'rowInsert' | 'rowDelete' | 'rowCopy' | 'rowPaste' | 'rowMove' | 'cellClick' | 'cellEdit' | 'action' | 'bulkAction' | 'grouping' | 'groupExpand';
|
|
701
|
+
interface ZTableChangeEventBase {
|
|
702
|
+
type: ZTableChangeType;
|
|
703
|
+
}
|
|
704
|
+
interface ZTablePageChange extends ZTableChangeEventBase {
|
|
705
|
+
type: 'page';
|
|
706
|
+
data: ZTablePageChangeEvent;
|
|
707
|
+
}
|
|
708
|
+
interface ZTableSortChange extends ZTableChangeEventBase {
|
|
709
|
+
type: 'sort';
|
|
710
|
+
data: ZTableSortChangeEvent;
|
|
711
|
+
}
|
|
712
|
+
interface ZTableFilterChange extends ZTableChangeEventBase {
|
|
713
|
+
type: 'filter';
|
|
714
|
+
data: ZTableFilterChangeEvent;
|
|
715
|
+
}
|
|
716
|
+
interface ZTableRowSelectChange<T> extends ZTableChangeEventBase {
|
|
717
|
+
type: 'rowSelect';
|
|
718
|
+
data: ZTableRowSelectEvent<T>;
|
|
719
|
+
}
|
|
720
|
+
interface ZTableRowSelectAllChange<T> extends ZTableChangeEventBase {
|
|
721
|
+
type: 'rowSelectAll';
|
|
722
|
+
data: ZTableRowSelectAllEvent<T>;
|
|
723
|
+
}
|
|
724
|
+
interface ZTableRowExpandChange<T> extends ZTableChangeEventBase {
|
|
725
|
+
type: 'rowExpand';
|
|
726
|
+
data: ZTableRowExpandEvent<T>;
|
|
727
|
+
}
|
|
728
|
+
interface ZTableRowDragChange<T> extends ZTableChangeEventBase {
|
|
729
|
+
type: 'rowDrag';
|
|
730
|
+
data: ZTableRowDragEvent<T>;
|
|
731
|
+
}
|
|
732
|
+
interface ZTableRowInsertChange<T> extends ZTableChangeEventBase {
|
|
733
|
+
type: 'rowInsert';
|
|
734
|
+
data: ZTableRowInsertEvent<T>;
|
|
735
|
+
}
|
|
736
|
+
interface ZTableRowDeleteChange<T> extends ZTableChangeEventBase {
|
|
737
|
+
type: 'rowDelete';
|
|
738
|
+
data: ZTableRowDeleteEvent<T>;
|
|
739
|
+
}
|
|
740
|
+
interface ZTableRowCopyChange<T> extends ZTableChangeEventBase {
|
|
741
|
+
type: 'rowCopy';
|
|
742
|
+
data: ZTableRowCopyEvent<T>;
|
|
743
|
+
}
|
|
744
|
+
interface ZTableRowPasteChange<T> extends ZTableChangeEventBase {
|
|
745
|
+
type: 'rowPaste';
|
|
746
|
+
data: ZTableRowPasteEvent<T>;
|
|
747
|
+
}
|
|
748
|
+
interface ZTableRowMoveChange<T> extends ZTableChangeEventBase {
|
|
749
|
+
type: 'rowMove';
|
|
750
|
+
data: ZTableRowMoveEvent<T>;
|
|
751
|
+
}
|
|
752
|
+
interface ZTableCellClickChange<T> extends ZTableChangeEventBase {
|
|
753
|
+
type: 'cellClick';
|
|
754
|
+
data: ZTableCellClickEvent<T>;
|
|
755
|
+
}
|
|
756
|
+
interface ZTableSearchChange extends ZTableChangeEventBase {
|
|
757
|
+
type: 'search';
|
|
758
|
+
data: ZTableSearchChangeEvent;
|
|
759
|
+
}
|
|
760
|
+
interface ZTableSelectChange extends ZTableChangeEventBase {
|
|
761
|
+
type: 'select';
|
|
762
|
+
data: {
|
|
763
|
+
selection: RowSelectionState;
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
interface ZTableExpandChange extends ZTableChangeEventBase {
|
|
767
|
+
type: 'expand';
|
|
768
|
+
data: {
|
|
769
|
+
expanded: ExpandedState;
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
interface ZTableGroupingChange extends ZTableChangeEventBase {
|
|
773
|
+
type: 'grouping';
|
|
774
|
+
data: {
|
|
775
|
+
grouping: string[];
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
interface ZTableGroupExpandChange extends ZTableChangeEventBase {
|
|
779
|
+
type: 'groupExpand';
|
|
780
|
+
data: ZTableGroupExpandEvent;
|
|
781
|
+
}
|
|
782
|
+
interface ZTableActionChange<T> extends ZTableChangeEventBase {
|
|
783
|
+
type: 'action';
|
|
784
|
+
data: ZTableActionClickEvent<T>;
|
|
785
|
+
}
|
|
786
|
+
interface ZTableBulkActionChange<T> extends ZTableChangeEventBase {
|
|
787
|
+
type: 'bulkAction';
|
|
788
|
+
data: ZTableBulkActionClickEvent<T>;
|
|
789
|
+
}
|
|
790
|
+
interface ZTableCellEditChange<T> extends ZTableChangeEventBase {
|
|
791
|
+
type: 'cellEdit';
|
|
792
|
+
data: ZTableCellEditEvent<T>;
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Unified change event emitted via `zChange` output.
|
|
796
|
+
* Parent components can use `event.type` to narrow the discriminated union.
|
|
797
|
+
*
|
|
798
|
+
* Example:
|
|
799
|
+
* ```ts
|
|
800
|
+
* onTableChange(event: ZTableChangeEvent<MyRow>) {
|
|
801
|
+
* if (event.type === 'page') {
|
|
802
|
+
* // event.data is ZTablePageChangeEvent
|
|
803
|
+
* }
|
|
804
|
+
* }
|
|
805
|
+
* ```
|
|
806
|
+
*/
|
|
807
|
+
type ZTableChangeEvent<T> = ZTablePageChange | ZTableSortChange | ZTableFilterChange | ZTableSearchChange | ZTableSelectChange | ZTableExpandChange | ZTableGroupingChange | ZTableGroupExpandChange | ZTableRowSelectChange<T> | ZTableRowSelectAllChange<T> | ZTableRowExpandChange<T> | ZTableRowDragChange<T> | ZTableRowInsertChange<T> | ZTableRowDeleteChange<T> | ZTableRowCopyChange<T> | ZTableRowPasteChange<T> | ZTableRowMoveChange<T> | ZTableCellClickChange<T> | ZTableCellEditChange<T> | ZTableActionChange<T> | ZTableBulkActionChange<T>;
|
|
808
|
+
/** Initial table state — applied on first render, before any cached config is loaded */
|
|
809
|
+
interface ZTableInitialState {
|
|
810
|
+
columnPinning?: ColumnPinningState;
|
|
811
|
+
rowPinning?: RowPinningState;
|
|
812
|
+
sorting?: SortingState;
|
|
813
|
+
columnFilters?: ColumnFiltersState;
|
|
814
|
+
globalFilter?: string;
|
|
815
|
+
expanded?: ExpandedState;
|
|
816
|
+
rowSelection?: RowSelectionState;
|
|
817
|
+
columnVisibility?: ColumnVisibilityState;
|
|
818
|
+
pagination?: PaginationState;
|
|
819
|
+
}
|
|
820
|
+
interface ZTableVirtualConfig {
|
|
821
|
+
/** Enable virtual scrolling */
|
|
822
|
+
enabled: boolean;
|
|
823
|
+
/** Row height in pixels (default: 40). Used as estimate for dynamic sizing. */
|
|
824
|
+
size?: number;
|
|
825
|
+
/** Number of items to render outside visible area (default: 5) */
|
|
826
|
+
overscan?: number;
|
|
827
|
+
/** Number of rows per virtual group (default: 1) */
|
|
828
|
+
groupSize?: number;
|
|
829
|
+
/**
|
|
830
|
+
* Enable dynamic row height measurement.
|
|
831
|
+
* When true, each row's height is measured dynamically after render.
|
|
832
|
+
* The virtualizer uses `height: auto` for all rows, allowing content
|
|
833
|
+
* to determine the actual height, which is then captured via measureElement().
|
|
834
|
+
* The `size` property is used as an initial estimate before measurement.
|
|
835
|
+
*/
|
|
836
|
+
dynamicSize?: boolean;
|
|
837
|
+
/**
|
|
838
|
+
* Initial scroll offset in pixels.
|
|
839
|
+
* Useful for restoring scroll position or starting at a specific offset.
|
|
840
|
+
* @default 0
|
|
841
|
+
*/
|
|
842
|
+
initialOffset?: number | (() => number);
|
|
843
|
+
/**
|
|
844
|
+
* The margin (in pixels) to apply to the start of the virtualizer.
|
|
845
|
+
* Useful when the virtualizer is not at the top of the scroll container.
|
|
846
|
+
* @default 0
|
|
847
|
+
*/
|
|
848
|
+
scrollMargin?: number;
|
|
849
|
+
/**
|
|
850
|
+
* Gap between items in pixels.
|
|
851
|
+
* Use this instead of CSS gap for proper virtual scroll calculations.
|
|
852
|
+
* @default 0
|
|
853
|
+
*/
|
|
854
|
+
gap?: number;
|
|
855
|
+
/**
|
|
856
|
+
* Delay in milliseconds before resetting isScrolling state.
|
|
857
|
+
* @default 150
|
|
858
|
+
*/
|
|
859
|
+
isScrollingResetDelay?: number;
|
|
860
|
+
/**
|
|
861
|
+
* Use native scrollend event instead of debounced scroll detection.
|
|
862
|
+
* Better performance on browsers that support it.
|
|
863
|
+
* @default true (if browser supports it)
|
|
864
|
+
*/
|
|
865
|
+
useScrollendEvent?: boolean;
|
|
866
|
+
/**
|
|
867
|
+
* Custom function to generate unique keys for each item.
|
|
868
|
+
* Useful for stable item identity across data updates.
|
|
869
|
+
*/
|
|
870
|
+
getItemKey?: (index: number) => string | number;
|
|
871
|
+
/**
|
|
872
|
+
* Custom range extractor function.
|
|
873
|
+
* Use to customize which items are rendered (e.g., for sticky headers).
|
|
874
|
+
*/
|
|
875
|
+
rangeExtractor?: (range: {
|
|
876
|
+
startIndex: number;
|
|
877
|
+
endIndex: number;
|
|
878
|
+
}) => number[];
|
|
879
|
+
}
|
|
880
|
+
interface ZTableSearchConfig {
|
|
881
|
+
enabled?: boolean;
|
|
882
|
+
placeholder?: string;
|
|
883
|
+
debounceTime?: number;
|
|
884
|
+
width?: string;
|
|
885
|
+
size?: ZInputSize;
|
|
886
|
+
}
|
|
887
|
+
interface ZTableVirtualColumnConfig {
|
|
888
|
+
/** Enable horizontal column virtualization for center columns only */
|
|
889
|
+
enabled: boolean;
|
|
890
|
+
/** Number of columns to render outside the visible range */
|
|
891
|
+
overscan?: number;
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* Top-level configuration passed via `[zConfig]` input.
|
|
895
|
+
* This is the primary API surface for consumers of z-table.
|
|
896
|
+
*/
|
|
897
|
+
interface ZTableConfig<T> {
|
|
898
|
+
/** 'local' = client-side operations; 'server' = parent handles data fetching */
|
|
899
|
+
mode?: ZTableMode;
|
|
900
|
+
/** Row data array — for server mode, this is the current page's data */
|
|
901
|
+
data: T[];
|
|
902
|
+
/** Enables drag-and-drop row reordering for compatible local-table states */
|
|
903
|
+
enableRowDragging?: boolean;
|
|
904
|
+
/** Total row count for server-side pagination (aliased as totalRows) */
|
|
905
|
+
totalCount?: number;
|
|
906
|
+
/** Column definitions */
|
|
907
|
+
columns: ZTableColumnConfig<T>[];
|
|
908
|
+
/** Custom row ID generator — critical for selection/expansion state stability */
|
|
909
|
+
getRowId?: (row: T, index: number, parent: T | undefined, data: T[]) => string;
|
|
910
|
+
/** Sub-row accessor for tree/hierarchical data */
|
|
911
|
+
getSubRows?: (row: T, index: number, parent: T | undefined, data: T[]) => T[] | undefined;
|
|
912
|
+
/** Class applied to the row and its cells. Cell body classes take precedence on conflicts. */
|
|
913
|
+
rowClass?: string | ((row: Row<T>) => string);
|
|
914
|
+
/**
|
|
915
|
+
* Style applied to the row and its cells. Cell body styles take precedence on conflicts.
|
|
916
|
+
* Fixed-size virtual rows keep the height configured by virtual.size.
|
|
917
|
+
*/
|
|
918
|
+
rowStyle?: Record<string, string> | ((row: Row<T>) => Record<string, string>);
|
|
919
|
+
/** @deprecated Use totalCount instead */
|
|
920
|
+
totalRows?: number;
|
|
921
|
+
/** true = enable with defaults; object = full virtual scroll config */
|
|
922
|
+
virtual?: ZTableVirtualConfig | boolean;
|
|
923
|
+
/** true = enable with defaults; object = full horizontal column virtualization config */
|
|
924
|
+
virtualColumns?: ZTableVirtualColumnConfig | boolean;
|
|
925
|
+
showHorizontalBorder?: boolean;
|
|
926
|
+
showVerticalBorder?: boolean;
|
|
927
|
+
showHeaderShadow?: boolean;
|
|
928
|
+
showFooterShadow?: boolean;
|
|
929
|
+
/** Show the settings drawer toggle button */
|
|
930
|
+
enableSettings?: boolean;
|
|
931
|
+
/** Show active search/column filters above the table with quick clear actions */
|
|
932
|
+
enableFilterHeader?: boolean;
|
|
933
|
+
enableColumnResizing?: boolean;
|
|
934
|
+
/** Giữ kích thước cột ban đầu và chỉ kéo giãn cột dữ liệu cuối để lấp đầy bảng. */
|
|
935
|
+
fitContentWidth?: boolean;
|
|
936
|
+
/** Multi-column sorting is enabled by default; set false for single-column sorting */
|
|
937
|
+
enableMultiSort?: boolean;
|
|
938
|
+
/** true = enable with defaults; object = full search bar config */
|
|
939
|
+
search?: ZTableSearchConfig | boolean;
|
|
940
|
+
/** Floating bulk action bar shown when rows are selected */
|
|
941
|
+
bulkAction?: ZTableBulkActionConfig<T> | boolean;
|
|
942
|
+
/** Bật chọn cell/range và copy giống spreadsheet. Mặc định tắt. */
|
|
943
|
+
enableCellSelection?: ZTableCellSelectionConfig<T>;
|
|
944
|
+
/** Bật menu chuột phải để chèn dòng khi bảng có cell editContent. */
|
|
945
|
+
enableContentRowInsert?: boolean;
|
|
946
|
+
enableRowPinning?: boolean;
|
|
947
|
+
/** Bật/tắt ghim cột toàn bảng. Mặc định `true`. Từng cột có thể override qua `enablePinning`. */
|
|
948
|
+
enableColumnPinning?: boolean;
|
|
949
|
+
enableColumnOrdering?: boolean;
|
|
950
|
+
enableColumnSorting?: boolean;
|
|
951
|
+
enableGrouping?: ZTableGroupingConfig<T> | boolean;
|
|
952
|
+
pagination?: ZTablePaginationConfig;
|
|
953
|
+
initialState?: ZTableInitialState;
|
|
954
|
+
loading?: boolean;
|
|
955
|
+
/** Template rendered when a row is expanded */
|
|
956
|
+
expandedRowTemplate?: TemplateRef<{
|
|
957
|
+
$implicit: Row<T>;
|
|
958
|
+
}>;
|
|
959
|
+
/** Render z-table con độc lập khi dòng mở rộng không dùng custom template. */
|
|
960
|
+
subTableConfig?: ZTableConfig<unknown> | ((row: Row<T>) => ZTableConfig<unknown> | undefined);
|
|
961
|
+
/** Template rendered when no data matches */
|
|
962
|
+
emptyTemplate?: TemplateRef<void>;
|
|
963
|
+
/** Template rendered during loading state */
|
|
964
|
+
loadingTemplate?: TemplateRef<void>;
|
|
965
|
+
getRowCanExpand?: (row: Row<T>) => boolean;
|
|
966
|
+
/** Fixed table width. Defaults to the available width of the parent container. */
|
|
967
|
+
width?: string;
|
|
968
|
+
/** Fixed table height. Keeps the horizontal scrollbar at the bottom when the table has few rows. */
|
|
969
|
+
height?: string;
|
|
970
|
+
maxHeight?: string;
|
|
971
|
+
minHeight?: string;
|
|
972
|
+
/** Debounce time (ms) for async state updates; defaults to Z_DEFAULT_DEBOUNCE_TIME */
|
|
973
|
+
debounceTime?: number;
|
|
974
|
+
/** Use skeleton rows instead of loading spinner */
|
|
975
|
+
useSkeleton?: boolean;
|
|
976
|
+
}
|
|
977
|
+
interface ZTableEditCellChangeEvent<T = unknown> {
|
|
978
|
+
row: T;
|
|
979
|
+
rowId: string;
|
|
980
|
+
rowIndex: number;
|
|
981
|
+
columnId: string;
|
|
982
|
+
oldValue: unknown;
|
|
983
|
+
newValue: unknown;
|
|
984
|
+
}
|
|
985
|
+
interface ZResolvedEditConfig {
|
|
986
|
+
type: ZTableEditType;
|
|
987
|
+
size: ZTableEditSize;
|
|
988
|
+
placeholder: string;
|
|
989
|
+
allowClear: boolean;
|
|
990
|
+
class: string;
|
|
991
|
+
style: Record<string, string>;
|
|
992
|
+
disabled: boolean;
|
|
993
|
+
readonly: boolean;
|
|
994
|
+
loading: boolean;
|
|
995
|
+
}
|
|
996
|
+
type ZTableDragEntity = 'row' | 'settings-column';
|
|
997
|
+
type ZTableDropEdge = 'top' | 'bottom';
|
|
998
|
+
interface ZTableDragData {
|
|
999
|
+
tableId: string;
|
|
1000
|
+
entity: ZTableDragEntity;
|
|
1001
|
+
itemId: string;
|
|
1002
|
+
}
|
|
1003
|
+
interface ZTableDragDropData {
|
|
1004
|
+
source: ZTableDragData;
|
|
1005
|
+
target: ZTableDragData;
|
|
1006
|
+
edge: ZTableDropEdge;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* TanStack v9 feature registry used by every ZTable instance.
|
|
1011
|
+
* Row-model factories live in the feature registry in v9; keeping this object
|
|
1012
|
+
* stable also prevents injectTable from rebuilding static feature references.
|
|
1013
|
+
*/
|
|
1014
|
+
declare const Z_TABLE_FEATURES: {
|
|
1015
|
+
expandedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1016
|
+
facetedMinMaxValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
1017
|
+
facetedRowModel: (table: _tanstack_angular_table.Table<any, any>, columnId: string) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1018
|
+
facetedUniqueValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
1019
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1020
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1021
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1022
|
+
cellSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1023
|
+
cellSpanningFeature: _tanstack_angular_table.TableFeature;
|
|
1024
|
+
columnFacetingFeature: _tanstack_angular_table.TableFeature;
|
|
1025
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1026
|
+
columnGroupingFeature: _tanstack_angular_table.TableFeature;
|
|
1027
|
+
columnOrderingFeature: _tanstack_angular_table.TableFeature;
|
|
1028
|
+
columnPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1029
|
+
columnResizingFeature: _tanstack_angular_table.TableFeature;
|
|
1030
|
+
columnSizingFeature: _tanstack_angular_table.TableFeature;
|
|
1031
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
1032
|
+
globalFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1033
|
+
rowAggregationFeature: _tanstack_angular_table.TableFeature;
|
|
1034
|
+
rowExpandingFeature: _tanstack_angular_table.TableFeature;
|
|
1035
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
1036
|
+
rowPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1037
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1038
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
1039
|
+
};
|
|
1040
|
+
|
|
1041
|
+
type ZTableTanStackFeatures = typeof Z_TABLE_FEATURES;
|
|
1042
|
+
type ZTableRowData<T> = T & Record<string, unknown>;
|
|
1043
|
+
/** TanStack v9 types with ZTable's data-first generic contract. */
|
|
1044
|
+
type Cell<T, TValue = unknown> = Cell$1<ZTableTanStackFeatures, ZTableRowData<T>, TValue>;
|
|
1045
|
+
type CellContext<T, TValue = unknown> = CellContext$1<ZTableTanStackFeatures, ZTableRowData<T>, TValue>;
|
|
1046
|
+
type Column<T, TValue = unknown> = Column$1<ZTableTanStackFeatures, ZTableRowData<T>, TValue>;
|
|
1047
|
+
type ColumnDef<T, TValue = unknown> = ColumnDef$1<ZTableTanStackFeatures, ZTableRowData<T>, TValue>;
|
|
1048
|
+
type Header<T, TValue = unknown> = Header$1<ZTableTanStackFeatures, ZTableRowData<T>, TValue>;
|
|
1049
|
+
type HeaderContext<T, TValue = unknown> = HeaderContext$1<ZTableTanStackFeatures, ZTableRowData<T>, TValue>;
|
|
1050
|
+
type Row<T> = Row$1<ZTableTanStackFeatures, ZTableRowData<T>>;
|
|
1051
|
+
type Table<T> = Table$1<ZTableTanStackFeatures, ZTableRowData<T>>;
|
|
1052
|
+
|
|
1053
|
+
interface ZTableAppliedFilterChip {
|
|
1054
|
+
type: 'filter' | 'sort';
|
|
1055
|
+
id: string;
|
|
1056
|
+
columnId: string;
|
|
1057
|
+
label: string;
|
|
1058
|
+
value: string;
|
|
1059
|
+
}
|
|
1060
|
+
interface ZTableGroupRowItem {
|
|
1061
|
+
type: 'group';
|
|
1062
|
+
id: string;
|
|
1063
|
+
columnId: string;
|
|
1064
|
+
depth: number;
|
|
1065
|
+
value: unknown;
|
|
1066
|
+
label: string;
|
|
1067
|
+
columnLabel: string;
|
|
1068
|
+
count: number;
|
|
1069
|
+
expanded: boolean;
|
|
1070
|
+
/** Server grouping: group đang fetch child rows. */
|
|
1071
|
+
loading?: boolean;
|
|
1072
|
+
totals?: Record<string, unknown>;
|
|
1073
|
+
}
|
|
1074
|
+
interface ZTableDataRowItem<T> {
|
|
1075
|
+
type: 'row';
|
|
1076
|
+
row: Row<T>;
|
|
1077
|
+
isGroupChild?: boolean;
|
|
1078
|
+
groupDepth?: number;
|
|
1079
|
+
}
|
|
1080
|
+
type ZTableGroupedRowItem<T> = ZTableGroupRowItem | ZTableDataRowItem<T>;
|
|
1081
|
+
interface ZVirtualFlatGroupHeader {
|
|
1082
|
+
type: 'group-header';
|
|
1083
|
+
groupItem: ZTableGroupRowItem;
|
|
1084
|
+
}
|
|
1085
|
+
interface ZVirtualFlatData<T> {
|
|
1086
|
+
type: 'data';
|
|
1087
|
+
rows: Row<T>[];
|
|
1088
|
+
isGroupChild: boolean;
|
|
1089
|
+
groupDepth: number;
|
|
1090
|
+
}
|
|
1091
|
+
type ZVirtualFlatItem<T> = ZVirtualFlatGroupHeader | ZVirtualFlatData<T>;
|
|
1092
|
+
type ZTableResolvedCellSelectionOptions<T> = Required<Pick<ZTableCellSelectionOptions<T>, 'enabled' | 'range' | 'contextMenu' | 'copyWithHeaders'>> & Pick<ZTableCellSelectionOptions<T>, 'disabledColumnIds' | 'isCellDisabled'>;
|
|
1093
|
+
|
|
1094
|
+
declare class ZTableComponent<T> implements AfterViewInit {
|
|
1095
|
+
private static _dragInstanceCount;
|
|
1096
|
+
/** Unified change event — parent listens to this for all table interactions */
|
|
1097
|
+
readonly zChange: _angular_core.OutputEmitterRef<ZTableChangeEvent<T>>;
|
|
1098
|
+
/** Emits an imperative control handle for programmatic table manipulation */
|
|
1099
|
+
readonly zControl: _angular_core.OutputEmitterRef<ZTableControl<T>>;
|
|
1100
|
+
/** Extra CSS classes merged onto the table container */
|
|
1101
|
+
readonly zClass: _angular_core.InputSignal<ClassValue>;
|
|
1102
|
+
/** Main configuration — data, columns, mode, features */
|
|
1103
|
+
readonly zConfig: _angular_core.InputSignal<ZTableConfig<T>>;
|
|
1104
|
+
/** External loading state (complementary to config.loading) */
|
|
1105
|
+
readonly zLoading: _angular_core.InputSignal<boolean>;
|
|
1106
|
+
/** Cache key for persisting column settings; no persistence when empty */
|
|
1107
|
+
readonly zKey: _angular_core.InputSignal<string>;
|
|
1108
|
+
/** Visual variant: 'default' has card shadow, 'borderless' has no container border */
|
|
1109
|
+
readonly zVariant: _angular_core.InputSignal<"default" | "borderless">;
|
|
1110
|
+
private readonly _destroy$;
|
|
1111
|
+
private readonly _dragService;
|
|
1112
|
+
private readonly _host;
|
|
1113
|
+
private readonly _document;
|
|
1114
|
+
private readonly _zExcel;
|
|
1115
|
+
private readonly _zTranslate;
|
|
1116
|
+
/** Prevents recursive scroll sync between thead/tbody/tfoot */
|
|
1117
|
+
private readonly _isSyncingScroll;
|
|
1118
|
+
/** Preserves horizontal scroll position across loading states */
|
|
1119
|
+
private readonly _savedScrollLeft;
|
|
1120
|
+
/** Observes tbody container height changes for skeleton row count calculation */
|
|
1121
|
+
private _resizeObserver;
|
|
1122
|
+
/** Debounces rapid settings changes (visibility/pin toggles) */
|
|
1123
|
+
private _settingsDebounceTimeout;
|
|
1124
|
+
private _visibilityDebounceTimeout;
|
|
1125
|
+
/** Debounces filter change emissions to server */
|
|
1126
|
+
private _filterEmitDebounceTimeout;
|
|
1127
|
+
/** Keeps the bulk bar mounted long enough for its exit animation */
|
|
1128
|
+
private _bulkBarTimer;
|
|
1129
|
+
private _contentRowMenuOutsideTimer;
|
|
1130
|
+
private _contentRowMenuOutsideCleanup;
|
|
1131
|
+
private _cellInteractionOutsideCleanup;
|
|
1132
|
+
private _pinnedRowHeightsFrame;
|
|
1133
|
+
private _virtualSpacerWidthFrame;
|
|
1134
|
+
private readonly _activeColumnVisibilityPopover;
|
|
1135
|
+
private _hasInitializedColumnPinning;
|
|
1136
|
+
private _initializedGroupingSchemaKey;
|
|
1137
|
+
private _initializedPaginationSchemaKey;
|
|
1138
|
+
private _isFitColumnScheduled;
|
|
1139
|
+
private _skipNextConfigSave;
|
|
1140
|
+
/** Merged loading state from both zLoading input and config.loading */
|
|
1141
|
+
protected readonly isLoading: _angular_core.Signal<boolean>;
|
|
1142
|
+
/** True during debounced async state transitions (sort/filter processing) */
|
|
1143
|
+
protected readonly isProcessing: _angular_core.WritableSignal<boolean>;
|
|
1144
|
+
protected readonly dragInstanceId: string;
|
|
1145
|
+
protected readonly theadWrapper: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
1146
|
+
protected readonly tableContainer: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
1147
|
+
protected readonly tbodyContainer: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
1148
|
+
protected readonly tbodyWrapper: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
1149
|
+
protected readonly tbodyScrollbar: _angular_core.Signal<NgScrollbar | undefined>;
|
|
1150
|
+
protected readonly tfootWrapper: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
1151
|
+
protected readonly expandedRowTemplate: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
1152
|
+
protected readonly virtualRowElements: _angular_core.Signal<readonly ElementRef<HTMLDivElement>[]>;
|
|
1153
|
+
protected readonly columnPinning: _angular_core.WritableSignal<ColumnPinningState>;
|
|
1154
|
+
protected readonly columnVisibility: _angular_core.WritableSignal<ColumnVisibilityState>;
|
|
1155
|
+
protected readonly columnOrder: _angular_core.WritableSignal<ColumnOrderState>;
|
|
1156
|
+
protected readonly expanded: _angular_core.WritableSignal<ExpandedState>;
|
|
1157
|
+
protected readonly groupingColumnIds: _angular_core.WritableSignal<string[]>;
|
|
1158
|
+
protected readonly collapsedGroupIds: _angular_core.WritableSignal<Set<string>>;
|
|
1159
|
+
protected readonly rowSelection: _angular_core.WritableSignal<RowSelectionState>;
|
|
1160
|
+
protected readonly rowPinning: _angular_core.WritableSignal<RowPinningState>;
|
|
1161
|
+
protected readonly columnFilters: _angular_core.WritableSignal<ColumnFiltersState>;
|
|
1162
|
+
protected readonly globalFilter: _angular_core.WritableSignal<string>;
|
|
1163
|
+
protected readonly filterResetVersion: _angular_core.WritableSignal<number>;
|
|
1164
|
+
protected readonly isFilterHeaderExpanded: _angular_core.WritableSignal<boolean>;
|
|
1165
|
+
protected readonly activeContentEditCell: _angular_core.WritableSignal<{
|
|
1166
|
+
rowId: string;
|
|
1167
|
+
columnId: string;
|
|
1168
|
+
} | null>;
|
|
1169
|
+
protected readonly contentRowMenu: _angular_core.WritableSignal<{
|
|
1170
|
+
row: Row<T>;
|
|
1171
|
+
columnId?: string;
|
|
1172
|
+
left: number;
|
|
1173
|
+
top: number;
|
|
1174
|
+
} | null>;
|
|
1175
|
+
protected readonly activeCell: _angular_core.WritableSignal<{
|
|
1176
|
+
rowId: string;
|
|
1177
|
+
columnId: string;
|
|
1178
|
+
} | null>;
|
|
1179
|
+
protected readonly cellSelectionAnchor: _angular_core.WritableSignal<{
|
|
1180
|
+
rowId: string;
|
|
1181
|
+
columnId: string;
|
|
1182
|
+
} | null>;
|
|
1183
|
+
protected readonly cellSelectionFocus: _angular_core.WritableSignal<{
|
|
1184
|
+
rowId: string;
|
|
1185
|
+
columnId: string;
|
|
1186
|
+
} | null>;
|
|
1187
|
+
private _cellDragArmed;
|
|
1188
|
+
private _isCellDragging;
|
|
1189
|
+
private _cellDragStart;
|
|
1190
|
+
private _cellDragCleanup;
|
|
1191
|
+
/** Pointer must move at least this many px before an armed press becomes a range drag. */
|
|
1192
|
+
private static readonly _cellDragThreshold;
|
|
1193
|
+
protected readonly cellMenu: _angular_core.WritableSignal<{
|
|
1194
|
+
rowId: string;
|
|
1195
|
+
columnId: string;
|
|
1196
|
+
left: number;
|
|
1197
|
+
top: number;
|
|
1198
|
+
} | null>;
|
|
1199
|
+
protected readonly contentRowMenuControl: _angular_core.WritableSignal<ZPopoverControl | null>;
|
|
1200
|
+
protected readonly cellMenuControl: _angular_core.WritableSignal<ZPopoverControl | null>;
|
|
1201
|
+
protected readonly contentRowClipboard: _angular_core.WritableSignal<T[]>;
|
|
1202
|
+
protected readonly columnSizingState: _angular_core.WritableSignal<ColumnSizingState>;
|
|
1203
|
+
protected readonly columnResizingState: _angular_core.WritableSignal<columnResizingState>;
|
|
1204
|
+
private readonly _columnBaseSizing;
|
|
1205
|
+
protected readonly appliedFilterChips: _angular_core.Signal<ZTableAppliedFilterChip[]>;
|
|
1206
|
+
protected readonly visibleAppliedFilterChips: _angular_core.Signal<ZTableAppliedFilterChip[]>;
|
|
1207
|
+
protected readonly overflowAppliedFilterChips: _angular_core.Signal<ZTableAppliedFilterChip[]>;
|
|
1208
|
+
protected readonly hiddenAppliedFilterChipCount: _angular_core.Signal<number>;
|
|
1209
|
+
/** Note: pageIndex is 1-based here; converted to 0-based for TanStack via _tanstackPagination */
|
|
1210
|
+
protected readonly pagination: _angular_core.WritableSignal<PaginationState>;
|
|
1211
|
+
protected readonly sorting: _angular_core.WritableSignal<SortingState>;
|
|
1212
|
+
/**
|
|
1213
|
+
* Caches the last server-provided total to avoid flickering to 0
|
|
1214
|
+
* during loading transitions in server-side pagination mode.
|
|
1215
|
+
*/
|
|
1216
|
+
private readonly _serverPaginationTotal;
|
|
1217
|
+
/** Container CSS classes combining variant + user-provided classes */
|
|
1218
|
+
protected readonly classTable: _angular_core.Signal<string>;
|
|
1219
|
+
/** Convert 1-based pagination to TanStack's 0-based pageIndex */
|
|
1220
|
+
private readonly _tanstackPagination;
|
|
1221
|
+
private readonly _configPagination;
|
|
1222
|
+
protected readonly paginationTotal: _angular_core.Signal<number>;
|
|
1223
|
+
protected readonly hasVerticalScroll: _angular_core.WritableSignal<boolean>;
|
|
1224
|
+
protected readonly hasHorizontalScroll: _angular_core.WritableSignal<boolean>;
|
|
1225
|
+
/** True when the last row touches or extends past the container bottom (no gap) */
|
|
1226
|
+
protected readonly lastRowTouchesBottom: _angular_core.WritableSignal<boolean>;
|
|
1227
|
+
protected readonly showSettingsDrawer: _angular_core.WritableSignal<boolean>;
|
|
1228
|
+
protected readonly showHorizontalBorder: _angular_core.WritableSignal<boolean>;
|
|
1229
|
+
protected readonly showVerticalBorder: _angular_core.WritableSignal<boolean>;
|
|
1230
|
+
protected readonly showHeaderFooterShadow: _angular_core.WritableSignal<boolean>;
|
|
1231
|
+
protected readonly bulkBarMounted: _angular_core.WritableSignal<boolean>;
|
|
1232
|
+
protected readonly bulkBarClosing: _angular_core.WritableSignal<boolean>;
|
|
1233
|
+
protected readonly bulkBarConfig: _angular_core.WritableSignal<ZTableBulkActionOptions<T> | null>;
|
|
1234
|
+
protected readonly bulkBarContext: _angular_core.WritableSignal<ZTableBulkActionContext<T> | null>;
|
|
1235
|
+
protected readonly bulkBarItems: _angular_core.WritableSignal<ZTableBulkActionRenderItem<T>[]>;
|
|
1236
|
+
/** True when table body is scrolled away from left edge (shows left pin shadow) */
|
|
1237
|
+
protected readonly hasScrollLeft: _angular_core.WritableSignal<boolean>;
|
|
1238
|
+
/** True when table has right-pinned columns and body isn't scrolled to the end */
|
|
1239
|
+
protected readonly hasScrollRight: _angular_core.WritableSignal<boolean>;
|
|
1240
|
+
/** True khi top-pinned rows đang đè lên nội dung body đã scroll qua đầu */
|
|
1241
|
+
protected readonly hasScrollTop: _angular_core.WritableSignal<boolean>;
|
|
1242
|
+
/** True khi bottom-pinned rows đang đè lên nội dung body còn scroll xuống được */
|
|
1243
|
+
protected readonly hasScrollBottom: _angular_core.WritableSignal<boolean>;
|
|
1244
|
+
/** Maps row IDs to measured DOM heights for pinned row offset calculations */
|
|
1245
|
+
protected readonly pinnedRowHeights: _angular_core.WritableSignal<Record<string, number>>;
|
|
1246
|
+
protected readonly virtualMeasuredLeftSpacerWidth: _angular_core.WritableSignal<number>;
|
|
1247
|
+
protected readonly virtualMeasuredRightSpacerWidth: _angular_core.WritableSignal<number>;
|
|
1248
|
+
private readonly _virtualMeasuredLeftSpacerSourceWidth;
|
|
1249
|
+
private readonly _virtualMeasuredRightSpacerSourceWidth;
|
|
1250
|
+
protected readonly defaultBulkActions: _angular_core.Signal<ZTableBulkActionItem<T>[]>;
|
|
1251
|
+
/** Bumped to force recomputation of pinned column IDs after programmatic pin changes */
|
|
1252
|
+
private readonly _columnPinVersion;
|
|
1253
|
+
/** Bumped to trigger data refresh (e.g., after addItem/deleteItem via control API) */
|
|
1254
|
+
private readonly _dataForceUpdate;
|
|
1255
|
+
/** Stores a temporary locally reordered dataset until parent pushes a new data reference */
|
|
1256
|
+
private readonly _rowDragDataOverride;
|
|
1257
|
+
/** Tracks the latest external data array reference to detect parent-driven refreshes */
|
|
1258
|
+
private _lastExternalDataRef;
|
|
1259
|
+
/** Set when a single row is updated via control API (for targeted re-render) */
|
|
1260
|
+
protected readonly _rowUpdate: _angular_core.WritableSignal<{
|
|
1261
|
+
rowId: string;
|
|
1262
|
+
updates: Record<string, unknown>;
|
|
1263
|
+
} | null>;
|
|
1264
|
+
/**
|
|
1265
|
+
* Column config lookup cache — cleared when column reference changes.
|
|
1266
|
+
* Avoids repeated recursive searches during render cycles.
|
|
1267
|
+
*/
|
|
1268
|
+
private _columnConfigCache;
|
|
1269
|
+
private _lastColumnsRef;
|
|
1270
|
+
protected readonly pinnedColumnIds: _angular_core.Signal<string[]>;
|
|
1271
|
+
protected readonly pinAvailabilityMap: _angular_core.Signal<Record<string, {
|
|
1272
|
+
left: boolean;
|
|
1273
|
+
right: boolean;
|
|
1274
|
+
}>>;
|
|
1275
|
+
protected readonly isPinnedLayoutWithinContainer: _angular_core.Signal<boolean>;
|
|
1276
|
+
protected readonly pendingVisibleColumns: _angular_core.WritableSignal<string[]>;
|
|
1277
|
+
protected readonly pendingColumnOrder: _angular_core.WritableSignal<string[]>;
|
|
1278
|
+
protected readonly pendingShowHeaderFooterShadow: _angular_core.WritableSignal<boolean>;
|
|
1279
|
+
/** True if ANY body column uses rowSpan — affects virtual grouping and expand column behavior */
|
|
1280
|
+
protected readonly hasBodyRowSpan: _angular_core.Signal<boolean>;
|
|
1281
|
+
protected readonly hasSelectColumn: _angular_core.Signal<boolean>;
|
|
1282
|
+
protected readonly hasExpandColumn: _angular_core.Signal<boolean>;
|
|
1283
|
+
protected readonly hasRowDragColumn: _angular_core.Signal<boolean>;
|
|
1284
|
+
protected readonly hasContentEditableColumns: _angular_core.Signal<boolean>;
|
|
1285
|
+
protected readonly canUseContentRowInsert: _angular_core.Signal<boolean>;
|
|
1286
|
+
protected readonly canUseRowSelection: _angular_core.Signal<boolean>;
|
|
1287
|
+
protected readonly cellSelectionOptions: _angular_core.Signal<ZTableResolvedCellSelectionOptions<T>>;
|
|
1288
|
+
protected readonly canUseCellSelection: _angular_core.Signal<boolean>;
|
|
1289
|
+
protected readonly selectedCellIds: _angular_core.Signal<Set<string>>;
|
|
1290
|
+
protected readonly visualSelectedCellIds: _angular_core.Signal<Set<string>>;
|
|
1291
|
+
protected readonly hasMultipleSelectedCells: _angular_core.Signal<boolean>;
|
|
1292
|
+
protected readonly canCopyCellMenuSelection: _angular_core.Signal<boolean>;
|
|
1293
|
+
protected readonly selectedCellRangeInsets: _angular_core.Signal<Map<string, {
|
|
1294
|
+
top: number;
|
|
1295
|
+
right: number;
|
|
1296
|
+
bottom: number;
|
|
1297
|
+
left: number;
|
|
1298
|
+
}>>;
|
|
1299
|
+
protected readonly selectedCellEdgeIds: _angular_core.Signal<{
|
|
1300
|
+
top: Set<string>;
|
|
1301
|
+
right: Set<string>;
|
|
1302
|
+
bottom: Set<string>;
|
|
1303
|
+
left: Set<string>;
|
|
1304
|
+
}>;
|
|
1305
|
+
protected readonly contentRowDeleteCount: _angular_core.Signal<number>;
|
|
1306
|
+
protected readonly canMoveContentRowUp: _angular_core.Signal<boolean>;
|
|
1307
|
+
protected readonly canMoveContentRowDown: _angular_core.Signal<boolean>;
|
|
1308
|
+
protected readonly canUseRowDrag: _angular_core.Signal<boolean>;
|
|
1309
|
+
protected readonly isVirtualRowDragEnabled: _angular_core.Signal<boolean>;
|
|
1310
|
+
protected readonly isRowDragEnabled: _angular_core.Signal<boolean>;
|
|
1311
|
+
protected readonly actionColumnInfo: _angular_core.Signal<{
|
|
1312
|
+
columnId: string;
|
|
1313
|
+
config: ZTableActionColumnConfig<T>;
|
|
1314
|
+
width: number;
|
|
1315
|
+
} | null>;
|
|
1316
|
+
private readonly _fixedColumnPinning;
|
|
1317
|
+
protected readonly hasFiltering: _angular_core.Signal<boolean>;
|
|
1318
|
+
protected readonly hasLocalFiltering: _angular_core.Signal<boolean>;
|
|
1319
|
+
protected readonly hasSorting: _angular_core.Signal<boolean>;
|
|
1320
|
+
protected readonly hasLocalSorting: _angular_core.Signal<boolean>;
|
|
1321
|
+
protected readonly hasServerFiltering: _angular_core.Signal<boolean>;
|
|
1322
|
+
protected readonly groupingConfig: _angular_core.Signal<ZTableGroupingConfig<T>>;
|
|
1323
|
+
/** EN/VI: true khi grouping chạy ở chế độ server (group meta do server cung cấp). */
|
|
1324
|
+
protected readonly isServerGrouping: _angular_core.Signal<boolean>;
|
|
1325
|
+
protected readonly canUseGrouping: _angular_core.Signal<boolean>;
|
|
1326
|
+
/** EN/VI: cột group hiệu lực cho chế độ server (config cung cấp, không suy ra từ data). */
|
|
1327
|
+
protected readonly serverGroupColumnId: _angular_core.Signal<string | null>;
|
|
1328
|
+
protected readonly activeGroupingColumnIds: _angular_core.Signal<string[]>;
|
|
1329
|
+
protected readonly activeGroupingColumnId: _angular_core.Signal<string>;
|
|
1330
|
+
protected readonly groupingColumnMap: _angular_core.Signal<Record<string, boolean>>;
|
|
1331
|
+
protected readonly groupTotalColumnMap: _angular_core.Signal<Record<string, boolean>>;
|
|
1332
|
+
protected readonly groupTotalConfigMap: _angular_core.Signal<Record<string, ZTableGroupTotalConfig<T>>>;
|
|
1333
|
+
protected readonly groupableColumnMap: _angular_core.Signal<Record<string, boolean>>;
|
|
1334
|
+
protected readonly groupingHeaderMenuMap: _angular_core.Signal<Record<string, boolean>>;
|
|
1335
|
+
protected readonly groupedCenterRowItems: _angular_core.Signal<ZTableGroupedRowItem<T>[]>;
|
|
1336
|
+
/** Local grouping: group được tính tại client từ rows của trang hiện tại. */
|
|
1337
|
+
private _buildLocalGroupedItems;
|
|
1338
|
+
private _appendLocalGroupedItems;
|
|
1339
|
+
/**
|
|
1340
|
+
* Server grouping: thứ tự & meta group do `config.enableGrouping.serverGroups` quyết định.
|
|
1341
|
+
* Child rows lấy từ `getCenterRows()` (data parent đã fetch) và gán vào group theo value.
|
|
1342
|
+
*/
|
|
1343
|
+
private _buildServerGroupedItems;
|
|
1344
|
+
private _getGroupTotals;
|
|
1345
|
+
private _sumGroupColumn;
|
|
1346
|
+
/**
|
|
1347
|
+
* EN: Flat list of body rows in the exact order they are rendered. When grouping is active the
|
|
1348
|
+
* center rows are re-ordered group-by-group, so the flat `table.getRowModel().rows` no longer
|
|
1349
|
+
* matches the visual order. The `z-at-bottom` border logic must use this visual order, otherwise
|
|
1350
|
+
* `border-bottom: none` is applied to whichever row happens to be last in the flat model — which
|
|
1351
|
+
* after grouping lands somewhere in the middle of the table.
|
|
1352
|
+
* VI: Danh sách phẳng các row body theo đúng thứ tự render. Khi đang group, center rows bị sắp xếp
|
|
1353
|
+
* lại theo từng group nên `table.getRowModel().rows` không còn khớp thứ tự hiển thị. Logic
|
|
1354
|
+
* border `z-at-bottom` phải dùng thứ tự hiển thị này, nếu không `border-bottom: none` sẽ bị gán
|
|
1355
|
+
* nhầm cho row đang nằm ở giữa bảng.
|
|
1356
|
+
*/
|
|
1357
|
+
protected readonly renderedBodyRows: _angular_core.Signal<Row<T>[]>;
|
|
1358
|
+
protected readonly bodyRowSpanRows: _angular_core.Signal<Row<T>[]>;
|
|
1359
|
+
protected readonly virtualGroupedFlatItems: _angular_core.Signal<ZVirtualFlatItem<T>[]>;
|
|
1360
|
+
protected _getVirtualGroupHeader(item: ZVirtualFlatItem<T> | undefined): ZTableGroupRowItem | null;
|
|
1361
|
+
protected _isVirtualGroupChild(item: ZVirtualFlatItem<T> | undefined): boolean;
|
|
1362
|
+
protected _getVirtualGroupDepth(item: ZVirtualFlatItem<T> | undefined): number;
|
|
1363
|
+
protected readonly searchConfig: _angular_core.Signal<{
|
|
1364
|
+
enabled: boolean;
|
|
1365
|
+
placeholder: string;
|
|
1366
|
+
debounceTime: number;
|
|
1367
|
+
width: string;
|
|
1368
|
+
size: _shival99_z_ui_components_z_input.ZInputSize;
|
|
1369
|
+
} | null>;
|
|
1370
|
+
protected readonly isSearchEnabled: _angular_core.Signal<boolean>;
|
|
1371
|
+
/** Data signal with force-update support for control API mutations */
|
|
1372
|
+
private readonly _data;
|
|
1373
|
+
/**
|
|
1374
|
+
* Converts ZTableColumnConfig[] into TanStack ColumnDef[].
|
|
1375
|
+
* Handles special columns (select, expand, actionRowPin), action column sizing,
|
|
1376
|
+
* and rowSpan/expand compatibility (expand column is removed when rowSpan is used).
|
|
1377
|
+
*/
|
|
1378
|
+
private readonly _columns;
|
|
1379
|
+
protected readonly isVirtual: _angular_core.Signal<boolean>;
|
|
1380
|
+
/** Normalized virtual config with defaults applied */
|
|
1381
|
+
private readonly _virtualConfig;
|
|
1382
|
+
protected readonly virtualRowHeight: _angular_core.Signal<number>;
|
|
1383
|
+
protected readonly dynamicSize: _angular_core.Signal<boolean>;
|
|
1384
|
+
private readonly _virtualColumnsConfig;
|
|
1385
|
+
protected readonly groupSize: _angular_core.Signal<number>;
|
|
1386
|
+
protected readonly groupHeight: _angular_core.Signal<number>;
|
|
1387
|
+
private readonly _dynamicGroupsVersion;
|
|
1388
|
+
/**
|
|
1389
|
+
* Groups rows for virtual scrolling. When rowSpan is used, rows that share
|
|
1390
|
+
* a merged cell are grouped together so the virtualizer treats them as
|
|
1391
|
+
* a single unit, preserving the visual merge across scroll boundaries.
|
|
1392
|
+
*/
|
|
1393
|
+
protected readonly dynamicGroups: _angular_core.Signal<ZVirtualGroup[]>;
|
|
1394
|
+
protected readonly hasFooter: _angular_core.Signal<boolean>;
|
|
1395
|
+
protected readonly isEmpty: _angular_core.Signal<boolean>;
|
|
1396
|
+
protected readonly isNoSearchResults: _angular_core.Signal<boolean>;
|
|
1397
|
+
protected readonly leftLeafColumns: _angular_core.Signal<_tanstack_angular_table.Column<{
|
|
1398
|
+
expandedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1399
|
+
facetedMinMaxValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
1400
|
+
facetedRowModel: (table: _tanstack_angular_table.Table<any, any>, columnId: string) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1401
|
+
facetedUniqueValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
1402
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1403
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1404
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1405
|
+
cellSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1406
|
+
cellSpanningFeature: _tanstack_angular_table.TableFeature;
|
|
1407
|
+
columnFacetingFeature: _tanstack_angular_table.TableFeature;
|
|
1408
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1409
|
+
columnGroupingFeature: _tanstack_angular_table.TableFeature;
|
|
1410
|
+
columnOrderingFeature: _tanstack_angular_table.TableFeature;
|
|
1411
|
+
columnPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1412
|
+
columnResizingFeature: _tanstack_angular_table.TableFeature;
|
|
1413
|
+
columnSizingFeature: _tanstack_angular_table.TableFeature;
|
|
1414
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
1415
|
+
globalFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1416
|
+
rowAggregationFeature: _tanstack_angular_table.TableFeature;
|
|
1417
|
+
rowExpandingFeature: _tanstack_angular_table.TableFeature;
|
|
1418
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
1419
|
+
rowPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1420
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1421
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
1422
|
+
}, T & Record<string, unknown>, unknown>[]>;
|
|
1423
|
+
protected readonly centerLeafColumns: _angular_core.Signal<_tanstack_angular_table.Column<{
|
|
1424
|
+
expandedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1425
|
+
facetedMinMaxValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
1426
|
+
facetedRowModel: (table: _tanstack_angular_table.Table<any, any>, columnId: string) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1427
|
+
facetedUniqueValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
1428
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1429
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1430
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1431
|
+
cellSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1432
|
+
cellSpanningFeature: _tanstack_angular_table.TableFeature;
|
|
1433
|
+
columnFacetingFeature: _tanstack_angular_table.TableFeature;
|
|
1434
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1435
|
+
columnGroupingFeature: _tanstack_angular_table.TableFeature;
|
|
1436
|
+
columnOrderingFeature: _tanstack_angular_table.TableFeature;
|
|
1437
|
+
columnPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1438
|
+
columnResizingFeature: _tanstack_angular_table.TableFeature;
|
|
1439
|
+
columnSizingFeature: _tanstack_angular_table.TableFeature;
|
|
1440
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
1441
|
+
globalFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1442
|
+
rowAggregationFeature: _tanstack_angular_table.TableFeature;
|
|
1443
|
+
rowExpandingFeature: _tanstack_angular_table.TableFeature;
|
|
1444
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
1445
|
+
rowPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1446
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1447
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
1448
|
+
}, T & Record<string, unknown>, unknown>[]>;
|
|
1449
|
+
protected readonly rightLeafColumns: _angular_core.Signal<_tanstack_angular_table.Column<{
|
|
1450
|
+
expandedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1451
|
+
facetedMinMaxValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
1452
|
+
facetedRowModel: (table: _tanstack_angular_table.Table<any, any>, columnId: string) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1453
|
+
facetedUniqueValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
1454
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1455
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1456
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1457
|
+
cellSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1458
|
+
cellSpanningFeature: _tanstack_angular_table.TableFeature;
|
|
1459
|
+
columnFacetingFeature: _tanstack_angular_table.TableFeature;
|
|
1460
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1461
|
+
columnGroupingFeature: _tanstack_angular_table.TableFeature;
|
|
1462
|
+
columnOrderingFeature: _tanstack_angular_table.TableFeature;
|
|
1463
|
+
columnPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1464
|
+
columnResizingFeature: _tanstack_angular_table.TableFeature;
|
|
1465
|
+
columnSizingFeature: _tanstack_angular_table.TableFeature;
|
|
1466
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
1467
|
+
globalFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1468
|
+
rowAggregationFeature: _tanstack_angular_table.TableFeature;
|
|
1469
|
+
rowExpandingFeature: _tanstack_angular_table.TableFeature;
|
|
1470
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
1471
|
+
rowPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1472
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1473
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
1474
|
+
}, T & Record<string, unknown>, unknown>[]>;
|
|
1475
|
+
protected readonly hasComplexColumnLayout: _angular_core.Signal<boolean>;
|
|
1476
|
+
protected readonly canUseVirtualColumns: _angular_core.Signal<boolean>;
|
|
1477
|
+
protected readonly columnVirtualizer: _tanstack_angular_virtual.AngularVirtualizer<HTMLElement, Element>;
|
|
1478
|
+
protected readonly virtualCenterColumnItems: _angular_core.Signal<_tanstack_angular_virtual.VirtualItem[]>;
|
|
1479
|
+
protected readonly virtualCenterColumns: _angular_core.Signal<Column<T, unknown>[]>;
|
|
1480
|
+
protected readonly virtualCenterColumnVisibilityMap: _angular_core.Signal<Record<string, boolean>>;
|
|
1481
|
+
protected readonly firstVirtualCenterColumnId: _angular_core.Signal<string>;
|
|
1482
|
+
protected readonly lastVirtualCenterColumnId: _angular_core.Signal<string>;
|
|
1483
|
+
protected readonly virtualLeftSpacerWidth: _angular_core.Signal<number>;
|
|
1484
|
+
protected readonly virtualRenderedLeftSpacerWidth: _angular_core.Signal<number>;
|
|
1485
|
+
protected readonly virtualCenterTotalWidth: _angular_core.Signal<number>;
|
|
1486
|
+
protected readonly virtualRightSpacerWidth: _angular_core.Signal<number>;
|
|
1487
|
+
protected readonly virtualRenderedRightSpacerWidth: _angular_core.Signal<number>;
|
|
1488
|
+
protected readonly renderedColumnCount: _angular_core.Signal<number>;
|
|
1489
|
+
protected readonly renderedNativeColumnWidth: _angular_core.Signal<number>;
|
|
1490
|
+
protected readonly renderedTableWidth: _angular_core.Signal<number>;
|
|
1491
|
+
protected readonly nativeRenderedColumnSizeMap: _angular_core.Signal<Record<string, number>>;
|
|
1492
|
+
protected readonly orderedLeafColumns: _angular_core.Signal<_tanstack_angular_table.Column<{
|
|
1493
|
+
expandedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1494
|
+
facetedMinMaxValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
1495
|
+
facetedRowModel: (table: _tanstack_angular_table.Table<any, any>, columnId: string) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1496
|
+
facetedUniqueValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
1497
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1498
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1499
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1500
|
+
cellSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1501
|
+
cellSpanningFeature: _tanstack_angular_table.TableFeature;
|
|
1502
|
+
columnFacetingFeature: _tanstack_angular_table.TableFeature;
|
|
1503
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1504
|
+
columnGroupingFeature: _tanstack_angular_table.TableFeature;
|
|
1505
|
+
columnOrderingFeature: _tanstack_angular_table.TableFeature;
|
|
1506
|
+
columnPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1507
|
+
columnResizingFeature: _tanstack_angular_table.TableFeature;
|
|
1508
|
+
columnSizingFeature: _tanstack_angular_table.TableFeature;
|
|
1509
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
1510
|
+
globalFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1511
|
+
rowAggregationFeature: _tanstack_angular_table.TableFeature;
|
|
1512
|
+
rowExpandingFeature: _tanstack_angular_table.TableFeature;
|
|
1513
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
1514
|
+
rowPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1515
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1516
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
1517
|
+
}, T & Record<string, unknown>, unknown>[]>;
|
|
1518
|
+
protected readonly fitColumnIds: _angular_core.Signal<string[]>;
|
|
1519
|
+
protected readonly hideableColumns: _angular_core.Signal<_tanstack_angular_table.Column<{
|
|
1520
|
+
expandedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1521
|
+
facetedMinMaxValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
1522
|
+
facetedRowModel: (table: _tanstack_angular_table.Table<any, any>, columnId: string) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1523
|
+
facetedUniqueValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
1524
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1525
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1526
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1527
|
+
cellSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1528
|
+
cellSpanningFeature: _tanstack_angular_table.TableFeature;
|
|
1529
|
+
columnFacetingFeature: _tanstack_angular_table.TableFeature;
|
|
1530
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1531
|
+
columnGroupingFeature: _tanstack_angular_table.TableFeature;
|
|
1532
|
+
columnOrderingFeature: _tanstack_angular_table.TableFeature;
|
|
1533
|
+
columnPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1534
|
+
columnResizingFeature: _tanstack_angular_table.TableFeature;
|
|
1535
|
+
columnSizingFeature: _tanstack_angular_table.TableFeature;
|
|
1536
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
1537
|
+
globalFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1538
|
+
rowAggregationFeature: _tanstack_angular_table.TableFeature;
|
|
1539
|
+
rowExpandingFeature: _tanstack_angular_table.TableFeature;
|
|
1540
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
1541
|
+
rowPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1542
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1543
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
1544
|
+
}, T & Record<string, unknown>, unknown>[]>;
|
|
1545
|
+
protected readonly pendingColumnVisibilityDisabledMap: _angular_core.Signal<Record<string, boolean>>;
|
|
1546
|
+
protected readonly orderedHeaderGroups: _angular_core.Signal<{
|
|
1547
|
+
id: string;
|
|
1548
|
+
headers: _tanstack_angular_table.Header<{
|
|
1549
|
+
expandedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1550
|
+
facetedMinMaxValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
1551
|
+
facetedRowModel: (table: _tanstack_angular_table.Table<any, any>, columnId: string) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1552
|
+
facetedUniqueValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
1553
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1554
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1555
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1556
|
+
cellSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1557
|
+
cellSpanningFeature: _tanstack_angular_table.TableFeature;
|
|
1558
|
+
columnFacetingFeature: _tanstack_angular_table.TableFeature;
|
|
1559
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1560
|
+
columnGroupingFeature: _tanstack_angular_table.TableFeature;
|
|
1561
|
+
columnOrderingFeature: _tanstack_angular_table.TableFeature;
|
|
1562
|
+
columnPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1563
|
+
columnResizingFeature: _tanstack_angular_table.TableFeature;
|
|
1564
|
+
columnSizingFeature: _tanstack_angular_table.TableFeature;
|
|
1565
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
1566
|
+
globalFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1567
|
+
rowAggregationFeature: _tanstack_angular_table.TableFeature;
|
|
1568
|
+
rowExpandingFeature: _tanstack_angular_table.TableFeature;
|
|
1569
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
1570
|
+
rowPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1571
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1572
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
1573
|
+
}, T & Record<string, unknown>, unknown>[];
|
|
1574
|
+
}[]>;
|
|
1575
|
+
protected readonly orderedFooterGroups: _angular_core.Signal<{
|
|
1576
|
+
id: string;
|
|
1577
|
+
depth: number;
|
|
1578
|
+
headers: _tanstack_angular_table.Header<{
|
|
1579
|
+
expandedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1580
|
+
facetedMinMaxValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
1581
|
+
facetedRowModel: (table: _tanstack_angular_table.Table<any, any>, columnId: string) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1582
|
+
facetedUniqueValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
1583
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1584
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1585
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1586
|
+
cellSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1587
|
+
cellSpanningFeature: _tanstack_angular_table.TableFeature;
|
|
1588
|
+
columnFacetingFeature: _tanstack_angular_table.TableFeature;
|
|
1589
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1590
|
+
columnGroupingFeature: _tanstack_angular_table.TableFeature;
|
|
1591
|
+
columnOrderingFeature: _tanstack_angular_table.TableFeature;
|
|
1592
|
+
columnPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1593
|
+
columnResizingFeature: _tanstack_angular_table.TableFeature;
|
|
1594
|
+
columnSizingFeature: _tanstack_angular_table.TableFeature;
|
|
1595
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
1596
|
+
globalFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1597
|
+
rowAggregationFeature: _tanstack_angular_table.TableFeature;
|
|
1598
|
+
rowExpandingFeature: _tanstack_angular_table.TableFeature;
|
|
1599
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
1600
|
+
rowPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1601
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1602
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
1603
|
+
}, T & Record<string, unknown>, unknown>[];
|
|
1604
|
+
}[]>;
|
|
1605
|
+
private _maxFooterArrayRows;
|
|
1606
|
+
protected readonly bottomRowsReversed: _angular_core.Signal<_tanstack_angular_table.Row<{
|
|
1607
|
+
expandedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1608
|
+
facetedMinMaxValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
1609
|
+
facetedRowModel: (table: _tanstack_angular_table.Table<any, any>, columnId: string) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1610
|
+
facetedUniqueValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
1611
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1612
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1613
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1614
|
+
cellSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1615
|
+
cellSpanningFeature: _tanstack_angular_table.TableFeature;
|
|
1616
|
+
columnFacetingFeature: _tanstack_angular_table.TableFeature;
|
|
1617
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1618
|
+
columnGroupingFeature: _tanstack_angular_table.TableFeature;
|
|
1619
|
+
columnOrderingFeature: _tanstack_angular_table.TableFeature;
|
|
1620
|
+
columnPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1621
|
+
columnResizingFeature: _tanstack_angular_table.TableFeature;
|
|
1622
|
+
columnSizingFeature: _tanstack_angular_table.TableFeature;
|
|
1623
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
1624
|
+
globalFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1625
|
+
rowAggregationFeature: _tanstack_angular_table.TableFeature;
|
|
1626
|
+
rowExpandingFeature: _tanstack_angular_table.TableFeature;
|
|
1627
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
1628
|
+
rowPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1629
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1630
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
1631
|
+
}, T & Record<string, unknown>>[]>;
|
|
1632
|
+
protected readonly leftHeaderRow: _angular_core.Signal<_tanstack_angular_table.Header<{
|
|
1633
|
+
expandedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1634
|
+
facetedMinMaxValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
1635
|
+
facetedRowModel: (table: _tanstack_angular_table.Table<any, any>, columnId: string) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1636
|
+
facetedUniqueValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
1637
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1638
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1639
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1640
|
+
cellSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1641
|
+
cellSpanningFeature: _tanstack_angular_table.TableFeature;
|
|
1642
|
+
columnFacetingFeature: _tanstack_angular_table.TableFeature;
|
|
1643
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1644
|
+
columnGroupingFeature: _tanstack_angular_table.TableFeature;
|
|
1645
|
+
columnOrderingFeature: _tanstack_angular_table.TableFeature;
|
|
1646
|
+
columnPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1647
|
+
columnResizingFeature: _tanstack_angular_table.TableFeature;
|
|
1648
|
+
columnSizingFeature: _tanstack_angular_table.TableFeature;
|
|
1649
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
1650
|
+
globalFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1651
|
+
rowAggregationFeature: _tanstack_angular_table.TableFeature;
|
|
1652
|
+
rowExpandingFeature: _tanstack_angular_table.TableFeature;
|
|
1653
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
1654
|
+
rowPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1655
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1656
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
1657
|
+
}, T & Record<string, unknown>, unknown>[]>;
|
|
1658
|
+
protected readonly centerHeaderRow: _angular_core.Signal<_tanstack_angular_table.Header<{
|
|
1659
|
+
expandedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1660
|
+
facetedMinMaxValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
1661
|
+
facetedRowModel: (table: _tanstack_angular_table.Table<any, any>, columnId: string) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1662
|
+
facetedUniqueValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
1663
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1664
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1665
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1666
|
+
cellSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1667
|
+
cellSpanningFeature: _tanstack_angular_table.TableFeature;
|
|
1668
|
+
columnFacetingFeature: _tanstack_angular_table.TableFeature;
|
|
1669
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1670
|
+
columnGroupingFeature: _tanstack_angular_table.TableFeature;
|
|
1671
|
+
columnOrderingFeature: _tanstack_angular_table.TableFeature;
|
|
1672
|
+
columnPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1673
|
+
columnResizingFeature: _tanstack_angular_table.TableFeature;
|
|
1674
|
+
columnSizingFeature: _tanstack_angular_table.TableFeature;
|
|
1675
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
1676
|
+
globalFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1677
|
+
rowAggregationFeature: _tanstack_angular_table.TableFeature;
|
|
1678
|
+
rowExpandingFeature: _tanstack_angular_table.TableFeature;
|
|
1679
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
1680
|
+
rowPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1681
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1682
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
1683
|
+
}, T & Record<string, unknown>, unknown>[]>;
|
|
1684
|
+
protected readonly rightHeaderRow: _angular_core.Signal<_tanstack_angular_table.Header<{
|
|
1685
|
+
expandedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1686
|
+
facetedMinMaxValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
1687
|
+
facetedRowModel: (table: _tanstack_angular_table.Table<any, any>, columnId: string) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1688
|
+
facetedUniqueValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
1689
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1690
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1691
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1692
|
+
cellSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1693
|
+
cellSpanningFeature: _tanstack_angular_table.TableFeature;
|
|
1694
|
+
columnFacetingFeature: _tanstack_angular_table.TableFeature;
|
|
1695
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1696
|
+
columnGroupingFeature: _tanstack_angular_table.TableFeature;
|
|
1697
|
+
columnOrderingFeature: _tanstack_angular_table.TableFeature;
|
|
1698
|
+
columnPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1699
|
+
columnResizingFeature: _tanstack_angular_table.TableFeature;
|
|
1700
|
+
columnSizingFeature: _tanstack_angular_table.TableFeature;
|
|
1701
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
1702
|
+
globalFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1703
|
+
rowAggregationFeature: _tanstack_angular_table.TableFeature;
|
|
1704
|
+
rowExpandingFeature: _tanstack_angular_table.TableFeature;
|
|
1705
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
1706
|
+
rowPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1707
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1708
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
1709
|
+
}, T & Record<string, unknown>, unknown>[]>;
|
|
1710
|
+
protected readonly virtualCenterHeaderRow: _angular_core.Signal<_tanstack_angular_table.Header<{
|
|
1711
|
+
expandedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1712
|
+
facetedMinMaxValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
1713
|
+
facetedRowModel: (table: _tanstack_angular_table.Table<any, any>, columnId: string) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1714
|
+
facetedUniqueValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
1715
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1716
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1717
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1718
|
+
cellSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1719
|
+
cellSpanningFeature: _tanstack_angular_table.TableFeature;
|
|
1720
|
+
columnFacetingFeature: _tanstack_angular_table.TableFeature;
|
|
1721
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1722
|
+
columnGroupingFeature: _tanstack_angular_table.TableFeature;
|
|
1723
|
+
columnOrderingFeature: _tanstack_angular_table.TableFeature;
|
|
1724
|
+
columnPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1725
|
+
columnResizingFeature: _tanstack_angular_table.TableFeature;
|
|
1726
|
+
columnSizingFeature: _tanstack_angular_table.TableFeature;
|
|
1727
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
1728
|
+
globalFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1729
|
+
rowAggregationFeature: _tanstack_angular_table.TableFeature;
|
|
1730
|
+
rowExpandingFeature: _tanstack_angular_table.TableFeature;
|
|
1731
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
1732
|
+
rowPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1733
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1734
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
1735
|
+
}, T & Record<string, unknown>, unknown>[]>;
|
|
1736
|
+
protected readonly shouldHeaderShowShadow: _angular_core.Signal<boolean>;
|
|
1737
|
+
protected readonly shouldFooterShowShadow: _angular_core.Signal<boolean>;
|
|
1738
|
+
protected readonly tbodyContainerWidth: _angular_core.WritableSignal<number>;
|
|
1739
|
+
protected readonly tbodyContainerHeight: _angular_core.WritableSignal<number>;
|
|
1740
|
+
protected readonly colDomWidthMap: _angular_core.WritableSignal<Record<string, number>>;
|
|
1741
|
+
private readonly _colDomWidthUpdater;
|
|
1742
|
+
protected readonly skeletonRowHeight: _angular_core.WritableSignal<number>;
|
|
1743
|
+
protected readonly skeletonRowCount: _angular_core.Signal<number>;
|
|
1744
|
+
protected readonly skeletonRows: _angular_core.Signal<number[]>;
|
|
1745
|
+
protected readonly dynamicGroupRows: _angular_core.Signal<Row<T>[][]>;
|
|
1746
|
+
/** Pinned top rows rendered separately from the virtualizer loop in virtual scroll mode. */
|
|
1747
|
+
protected readonly virtualPinnedTopRows: _angular_core.Signal<Row<T>[]>;
|
|
1748
|
+
protected readonly virtualPinnedTopHeight: _angular_core.Signal<number>;
|
|
1749
|
+
/** Pinned bottom rows rendered separately from the virtualizer loop in virtual scroll mode. */
|
|
1750
|
+
protected readonly virtualPinnedBottomRows: _angular_core.Signal<Row<T>[]>;
|
|
1751
|
+
protected readonly virtualPinnedBottomHeight: _angular_core.Signal<number>;
|
|
1752
|
+
protected readonly dynamicGroupHeights: _angular_core.Signal<any[]>;
|
|
1753
|
+
protected readonly columnSizing: _angular_core.Signal<ColumnSizingState>;
|
|
1754
|
+
protected readonly columnResizing: _angular_core.Signal<columnResizingState>;
|
|
1755
|
+
protected readonly columnSizeVars: _angular_core.Signal<Record<string, number>>;
|
|
1756
|
+
protected readonly table: _tanstack_angular_table.AngularTable<{
|
|
1757
|
+
expandedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1758
|
+
facetedMinMaxValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => undefined | [number, number];
|
|
1759
|
+
facetedRowModel: (table: _tanstack_angular_table.Table<any, any>, columnId: string) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1760
|
+
facetedUniqueValues: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, any>, columnId: string) => () => Map<any, number>;
|
|
1761
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1762
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1763
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<any, any>) => () => _tanstack_angular_table.RowModel<any, any>;
|
|
1764
|
+
cellSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1765
|
+
cellSpanningFeature: _tanstack_angular_table.TableFeature;
|
|
1766
|
+
columnFacetingFeature: _tanstack_angular_table.TableFeature;
|
|
1767
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1768
|
+
columnGroupingFeature: _tanstack_angular_table.TableFeature;
|
|
1769
|
+
columnOrderingFeature: _tanstack_angular_table.TableFeature;
|
|
1770
|
+
columnPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1771
|
+
columnResizingFeature: _tanstack_angular_table.TableFeature;
|
|
1772
|
+
columnSizingFeature: _tanstack_angular_table.TableFeature;
|
|
1773
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
1774
|
+
globalFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
1775
|
+
rowAggregationFeature: _tanstack_angular_table.TableFeature;
|
|
1776
|
+
rowExpandingFeature: _tanstack_angular_table.TableFeature;
|
|
1777
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
1778
|
+
rowPinningFeature: _tanstack_angular_table.TableFeature;
|
|
1779
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
1780
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
1781
|
+
}, T & Record<string, unknown>>;
|
|
1782
|
+
private readonly _virtualGroupCount;
|
|
1783
|
+
protected readonly selectedRowIds: _angular_core.Signal<string[]>;
|
|
1784
|
+
protected readonly selectedRows: _angular_core.Signal<(T & Record<string, unknown>)[]>;
|
|
1785
|
+
protected readonly bulkActionContext: _angular_core.Signal<ZTableBulkActionContext<T>>;
|
|
1786
|
+
protected readonly bulkActionConfig: _angular_core.Signal<ZTableBulkActionOptions<T> | null>;
|
|
1787
|
+
protected readonly bulkActionItems: _angular_core.Signal<ZTableBulkActionRenderItem<T>[]>;
|
|
1788
|
+
protected readonly showBulkBar: _angular_core.Signal<boolean>;
|
|
1789
|
+
protected readonly bulkBarPositions: ConnectedPosition[];
|
|
1790
|
+
private readonly _bulkBarExitDuration;
|
|
1791
|
+
/** Stable identity key per virtual index (row/group id, not array index) — prevents height jitter on fast scroll. */
|
|
1792
|
+
private readonly _virtualItemKeys;
|
|
1793
|
+
/** Estimate height learned from rendered rows (dynamicSize); falls back to `virtual.size`. Reduces layout shift. */
|
|
1794
|
+
private _dynamicEstimateHeight;
|
|
1795
|
+
protected readonly effectiveDynamicRowSizing: _angular_core.Signal<boolean>;
|
|
1796
|
+
/** Virtualizer instance — operates on groups rather than individual rows */
|
|
1797
|
+
protected readonly virtualizer: _tanstack_angular_virtual.AngularVirtualizer<HTMLElement, Element>;
|
|
1798
|
+
private readonly _measureVirtualItems;
|
|
1799
|
+
/** Learn estimate height from measured rows (reads the measurement cache, no reflow). Locks once. */
|
|
1800
|
+
private _learnDynamicEstimate;
|
|
1801
|
+
private readonly _rowDragAutoScroll;
|
|
1802
|
+
private readonly _rowDragCellSelectionCleanup;
|
|
1803
|
+
constructor();
|
|
1804
|
+
ngAfterViewInit(): void;
|
|
1805
|
+
/**
|
|
1806
|
+
* Syncs parent row selection state based on children.
|
|
1807
|
+
* If all children are selected, the parent is auto-selected;
|
|
1808
|
+
* if no children are selected, the parent is deselected.
|
|
1809
|
+
*/
|
|
1810
|
+
private _handleRowSelectionWithParents;
|
|
1811
|
+
protected clearSelection(): void;
|
|
1812
|
+
protected onBulkActionClick(item: ZTableBulkActionItem<T>): Promise<void>;
|
|
1813
|
+
private _resolveBulkActionList;
|
|
1814
|
+
private _createBulkActionHandlerContext;
|
|
1815
|
+
private _exportSelectionToExcel;
|
|
1816
|
+
private _createExcelExportContext;
|
|
1817
|
+
private _getExcelExportData;
|
|
1818
|
+
private _getExcelExportFileName;
|
|
1819
|
+
private _toExcelTableColumns;
|
|
1820
|
+
private _getExcelColumnHeader;
|
|
1821
|
+
private _getExcelColumnHeaderAlign;
|
|
1822
|
+
private _clearBulkBarTimer;
|
|
1823
|
+
private _clearContentRowMenuOutsideListener;
|
|
1824
|
+
/**
|
|
1825
|
+
* Wraps state mutations with a debounced processing indicator.
|
|
1826
|
+
* Shows a brief loading state to prevent UI flicker during
|
|
1827
|
+
* filter/sort recomputation on large datasets.
|
|
1828
|
+
*/
|
|
1829
|
+
private _runAsyncStateUpdate;
|
|
1830
|
+
private _emitFilterChangeDebounced;
|
|
1831
|
+
private _checkScrollState;
|
|
1832
|
+
private _refreshPinnedRowHeights;
|
|
1833
|
+
private _schedulePinnedRowHeightsRefresh;
|
|
1834
|
+
private _cancelPinnedRowHeightsRefresh;
|
|
1835
|
+
private _refreshVirtualSpacerWidths;
|
|
1836
|
+
private _setVirtualMeasuredSpacerWidths;
|
|
1837
|
+
private _scheduleVirtualSpacerWidthRefresh;
|
|
1838
|
+
private _cancelVirtualSpacerWidthRefresh;
|
|
1839
|
+
private _checkVerticalScroll;
|
|
1840
|
+
private _checkLastRowTouchesBottom;
|
|
1841
|
+
private _getTbodyViewportElement;
|
|
1842
|
+
private _handleColumnSizingChange;
|
|
1843
|
+
private _clampColumnSizing;
|
|
1844
|
+
private _syncColumnBaseSizing;
|
|
1845
|
+
private _scheduleFitColumnWidths;
|
|
1846
|
+
private _applyFitColumnWidths;
|
|
1847
|
+
private _setColumnSizingFromFit;
|
|
1848
|
+
/** Cập nhật state sizing ngoài và atom của TanStack v9 đồng thời. */
|
|
1849
|
+
private _setColumnSizingState;
|
|
1850
|
+
private _getColumnBaseSize;
|
|
1851
|
+
private _isSameColumnSizing;
|
|
1852
|
+
private _reconcileColumnSizing;
|
|
1853
|
+
private _checkHorizontalScroll;
|
|
1854
|
+
private _updateScrollShadowState;
|
|
1855
|
+
private _updateVerticalScrollShadowState;
|
|
1856
|
+
hasRightPinnedColumns(): boolean;
|
|
1857
|
+
onTbodyScroll(event: Event): void;
|
|
1858
|
+
/** Chặn wheel trực tiếp trên header; header chỉ nhận scrollLeft từ body. */
|
|
1859
|
+
onTheadWheel(event: WheelEvent): void;
|
|
1860
|
+
private _syncScrollLeft;
|
|
1861
|
+
/**
|
|
1862
|
+
* @deprecated Header sort now lives in the column filter popover.
|
|
1863
|
+
* Giữ tạm để các consumer/template cũ còn compile trong giai đoạn chuyển đổi.
|
|
1864
|
+
*/
|
|
1865
|
+
handleSort(event: Event, handler?: (event: unknown) => void): void;
|
|
1866
|
+
protected _handleDragDrop(event: ZTableDragDropData): void;
|
|
1867
|
+
private _handleRowDrop;
|
|
1868
|
+
onToggleAllColumns(): void;
|
|
1869
|
+
onPageChange(event: {
|
|
1870
|
+
pageIndex: number;
|
|
1871
|
+
pageSize: number;
|
|
1872
|
+
}, emitType?: 'user' | 'auto'): void;
|
|
1873
|
+
onSearchChange(value: string | number | null): void;
|
|
1874
|
+
clearAppliedFilterChip(chip: ZTableAppliedFilterChip): void;
|
|
1875
|
+
clearAppliedFilters(): void;
|
|
1876
|
+
toggleFilterHeaderExpanded(): void;
|
|
1877
|
+
toggleHeaderFooterShadow(): void;
|
|
1878
|
+
onActionClick(event: ZTableActionClickEvent<ZTableRowData<T>>): void;
|
|
1879
|
+
protected setContentRowMenuControl(control: ZPopoverControl): void;
|
|
1880
|
+
protected setCellMenuControl(control: ZPopoverControl): void;
|
|
1881
|
+
protected clearCellMenu(): void;
|
|
1882
|
+
protected clearContentRowMenu(): void;
|
|
1883
|
+
protected onCellPointerDown(event: PointerEvent, row: Row<T>, columnId: string): void;
|
|
1884
|
+
/** Arms a range-drag on cell pointerdown and starts document-level move/up tracking to confirm it. */
|
|
1885
|
+
private _armCellDrag;
|
|
1886
|
+
protected onCellPointerEnter(event: PointerEvent, row: Row<T>, columnId: string): void;
|
|
1887
|
+
protected openCellMenu(event: MouseEvent, row: Row<T>, columnId: string): void;
|
|
1888
|
+
protected openContentRowMenu(event: MouseEvent, row: Row<T>, columnId?: string): void;
|
|
1889
|
+
protected insertContentRow(position: ZTableRowInsertPosition): void;
|
|
1890
|
+
protected deleteContentRows(): void;
|
|
1891
|
+
private _removeDeletedRowsFromSelection;
|
|
1892
|
+
protected onContentTableKeydown(event: KeyboardEvent): void;
|
|
1893
|
+
protected copySelectedCells(includeHeaders: boolean): void;
|
|
1894
|
+
protected copyContentCell(): void;
|
|
1895
|
+
protected copyContentRows(rowId?: string): void;
|
|
1896
|
+
protected pasteContentRows(position: ZTableRowInsertPosition, rowId?: string): void;
|
|
1897
|
+
protected moveContentRow(direction: ZTableRowMoveDirection): void;
|
|
1898
|
+
private _getContentRowsToDelete;
|
|
1899
|
+
private _getRowSourceIndex;
|
|
1900
|
+
private _getRowVisibleIndex;
|
|
1901
|
+
private _getContentRowsForRowAction;
|
|
1902
|
+
private _getContentRowActionTarget;
|
|
1903
|
+
private _isEditableKeyboardTarget;
|
|
1904
|
+
private _isContentEditorTarget;
|
|
1905
|
+
private _getContentEditClipboardText;
|
|
1906
|
+
private _getSelectedTextFromEditor;
|
|
1907
|
+
protected isCellInSelectedRange(rowId: string, columnId: string): boolean;
|
|
1908
|
+
private _listenCellInteractionOutside;
|
|
1909
|
+
private _hasCellInteractionState;
|
|
1910
|
+
private _isInsideCellInteractionBoundary;
|
|
1911
|
+
private _clearCellInteractionState;
|
|
1912
|
+
private _getCellSelectionId;
|
|
1913
|
+
private _getSelectedCellRange;
|
|
1914
|
+
private _getSelectedCellVisualRects;
|
|
1915
|
+
private _getRenderedCellVisualRect;
|
|
1916
|
+
private _hasOutsideVisualNeighbor;
|
|
1917
|
+
private _getCellVisualSlotId;
|
|
1918
|
+
private _buildSelectedCellsText;
|
|
1919
|
+
private _getSelectableColumnIds;
|
|
1920
|
+
private _isSelectableCellColumn;
|
|
1921
|
+
private _isSelectableCell;
|
|
1922
|
+
private _isIgnoredCellSelectionTarget;
|
|
1923
|
+
private _isCellSelectionDragTarget;
|
|
1924
|
+
private _formatCellClipboardValue;
|
|
1925
|
+
private _getRenderedCellClipboardValue;
|
|
1926
|
+
private _getRenderedBodyCell;
|
|
1927
|
+
private _getColumnCopyHeader;
|
|
1928
|
+
private _getColumnDisplayHeader;
|
|
1929
|
+
private _formatFilterChipValue;
|
|
1930
|
+
private _formatFilterConditionChip;
|
|
1931
|
+
private _formatFilterJoinLabel;
|
|
1932
|
+
private _formatFilterOptionValue;
|
|
1933
|
+
private _formatRangeChipValue;
|
|
1934
|
+
private _formatDateRangeChipValue;
|
|
1935
|
+
private _formatDateChipValue;
|
|
1936
|
+
private _formatRawFilterChipValue;
|
|
1937
|
+
private _isFilterChipCondition;
|
|
1938
|
+
private _emitSearchChange;
|
|
1939
|
+
private _collapseFilterHeaderWhenNeeded;
|
|
1940
|
+
private _bumpFilterResetVersion;
|
|
1941
|
+
private _writeClipboardText;
|
|
1942
|
+
private _getContentEditTriggerTarget;
|
|
1943
|
+
private _clearContentEditCell;
|
|
1944
|
+
private _listenContentRowMenuOutside;
|
|
1945
|
+
onCellClick(row: Row<T>, columnId: string, value: unknown): void;
|
|
1946
|
+
onCellEdit(event: ZTableEditCellChangeEvent<T>): void;
|
|
1947
|
+
onContentEditStart(event: MouseEvent, rowId: string, columnId: string): void;
|
|
1948
|
+
onContentEditKeydown(event: KeyboardEvent, rowId: string, columnId: string): void;
|
|
1949
|
+
onContentEditCommit(newValue: unknown, row: Row<T>, columnId: string, oldValue: unknown): void;
|
|
1950
|
+
onContentEditCancel(): void;
|
|
1951
|
+
private _getContentEditDirection;
|
|
1952
|
+
private _findContentEditTarget;
|
|
1953
|
+
private _findHorizontalContentEditTarget;
|
|
1954
|
+
private _restoreContentEditFocus;
|
|
1955
|
+
openSettingsDrawer(): void;
|
|
1956
|
+
onPendingColumnDrop(event: CdkDragDrop<string[]>): void;
|
|
1957
|
+
onVisibleColumnsChange(values: (string | number)[]): void;
|
|
1958
|
+
onToggleColumnVisibility(columnId: string): void;
|
|
1959
|
+
onToggleColumnPin(columnId: string, position: 'left' | 'right'): void;
|
|
1960
|
+
handleColumnPin(columnId: string, position: 'left' | 'right' | false): void;
|
|
1961
|
+
private _canPinWithinViewport;
|
|
1962
|
+
private _getPinnedWidth;
|
|
1963
|
+
toggleColumnVisibility(columnId: string): void;
|
|
1964
|
+
refreshColumnPopoverPositions(...popovers: ZPopoverDirective[]): void;
|
|
1965
|
+
setActiveColumnVisibilityPopover(popover: ZPopoverDirective): void;
|
|
1966
|
+
clearActiveColumnVisibilityPopover(popover: ZPopoverDirective): void;
|
|
1967
|
+
hideActiveColumnVisibilityPopover(): void;
|
|
1968
|
+
hideColumnPopoversOnOutsideClick(optionsPopover: ZPopoverDirective): void;
|
|
1969
|
+
openSettingsDrawerFromColumnMenu(...popovers: ZPopoverDirective[]): void;
|
|
1970
|
+
canGroupColumn(columnId: string): boolean;
|
|
1971
|
+
isGroupingColumn(columnId: string): boolean;
|
|
1972
|
+
groupByColumn(columnId: string): void;
|
|
1973
|
+
clearGrouping(): void;
|
|
1974
|
+
removeGroupingColumn(columnId: string): void;
|
|
1975
|
+
toggleGroupRow(groupId: string): void;
|
|
1976
|
+
autosizeColumn(columnId: string): void;
|
|
1977
|
+
autosizeAllColumns(): void;
|
|
1978
|
+
resetColumns(): void;
|
|
1979
|
+
private _getDefaultColumnOrder;
|
|
1980
|
+
private _getInitialGroupingColumnIds;
|
|
1981
|
+
private _isColumnHiddenFromVisibilityMenu;
|
|
1982
|
+
private _setMeasuredColumnWidth;
|
|
1983
|
+
private _measureColumnContentWidth;
|
|
1984
|
+
private _defaultColumnPinning;
|
|
1985
|
+
private _setColumnPinning;
|
|
1986
|
+
private _sortColumnPinningByOrder;
|
|
1987
|
+
private _moveGroupingColumnsToLeadingDataPosition;
|
|
1988
|
+
private _areColumnIdListsEqual;
|
|
1989
|
+
moveColumnLeft(columnId: string): void;
|
|
1990
|
+
moveColumnRight(columnId: string): void;
|
|
1991
|
+
isFirstMovableColumn(columnId: string): boolean;
|
|
1992
|
+
isLastMovableColumn(columnId: string): boolean;
|
|
1993
|
+
private _isFixedLeadingColumnId;
|
|
1994
|
+
private _isRowPinColumnId;
|
|
1995
|
+
private _isSpecialColumnId;
|
|
1996
|
+
/** Saves current column layout, sizing, pinning, and visibility to ZCacheService */
|
|
1997
|
+
private _saveConfig;
|
|
1998
|
+
private _collectColumnInfo;
|
|
1999
|
+
/** Loads cached config from ZCacheService; validates schema compatibility first */
|
|
2000
|
+
private _loadConfigCache;
|
|
2001
|
+
private _getConfigCacheKey;
|
|
2002
|
+
/**
|
|
2003
|
+
* Validates cached column info against current config.
|
|
2004
|
+
* Returns false if columns have been added/removed/renamed since cache was saved,
|
|
2005
|
+
* which triggers cache invalidation.
|
|
2006
|
+
*/
|
|
2007
|
+
private _isColumnConfigValid;
|
|
2008
|
+
private _getChangedFilterColumnIds;
|
|
2009
|
+
private _getChangedSortColumnIds;
|
|
2010
|
+
private _isColumnFilterModeLocal;
|
|
2011
|
+
private _isColumnSortModeLocal;
|
|
2012
|
+
private _filterServerModeColumnFilters;
|
|
2013
|
+
private _filterServerModeSorting;
|
|
2014
|
+
private _getGroupId;
|
|
2015
|
+
private _getRowGroupValue;
|
|
2016
|
+
private _getColumnGroupLabel;
|
|
2017
|
+
private _getGroupDate;
|
|
2018
|
+
private _getGroupLabel;
|
|
2019
|
+
private _getActionColumnConfig;
|
|
2020
|
+
/**
|
|
2021
|
+
* Recursively finds a column config by ID with caching.
|
|
2022
|
+
* Cache is invalidated when the column array reference changes.
|
|
2023
|
+
*/
|
|
2024
|
+
private _findColumnConfig;
|
|
2025
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZTableComponent<any>, never>;
|
|
2026
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZTableComponent<any>, "z-table", ["zTable"], { "zClass": { "alias": "zClass"; "required": false; "isSignal": true; }; "zConfig": { "alias": "zConfig"; "required": false; "isSignal": true; }; "zLoading": { "alias": "zLoading"; "required": false; "isSignal": true; }; "zKey": { "alias": "zKey"; "required": false; "isSignal": true; }; "zVariant": { "alias": "zVariant"; "required": false; "isSignal": true; }; }, { "zChange": "zChange"; "zControl": "zControl"; }, never, never, true, never>;
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2029
|
+
declare class ZTableFilterComponent<T> {
|
|
2030
|
+
readonly zColumn: _angular_core.InputSignal<Column<unknown, unknown>>;
|
|
2031
|
+
readonly zTable: _angular_core.InputSignal<Table<T>>;
|
|
2032
|
+
readonly zResetVersion: _angular_core.InputSignal<number>;
|
|
2033
|
+
readonly zSortingState: _angular_core.InputSignal<SortingState>;
|
|
2034
|
+
readonly zEnableMultiSort: _angular_core.InputSignal<boolean>;
|
|
2035
|
+
private readonly _columnDef;
|
|
2036
|
+
private readonly _appliedFilterConditions;
|
|
2037
|
+
private readonly _appliedLegacyFilterValue;
|
|
2038
|
+
private readonly _appliedSortState;
|
|
2039
|
+
protected readonly sortOptions: _angular_core.Signal<ZSelectOption<string>[]>;
|
|
2040
|
+
protected readonly draftFilters: _angular_core.WritableSignal<ZTableDraftFilterCondition[]>;
|
|
2041
|
+
protected readonly draftLegacyFilterValue: _angular_core.WritableSignal<unknown>;
|
|
2042
|
+
protected readonly draftSortState: _angular_core.WritableSignal<false | "asc" | "desc">;
|
|
2043
|
+
protected readonly columnFilterValue: _angular_core.Signal<unknown>;
|
|
2044
|
+
protected readonly effectiveFilterValue: _angular_core.Signal<unknown>;
|
|
2045
|
+
protected readonly sortState: _angular_core.Signal<false | "asc" | "desc">;
|
|
2046
|
+
protected readonly effectiveSortState: _angular_core.Signal<false | "asc" | "desc">;
|
|
2047
|
+
protected readonly canSort: _angular_core.Signal<boolean>;
|
|
2048
|
+
protected readonly canFilter: _angular_core.Signal<boolean>;
|
|
2049
|
+
protected readonly filterUi: _angular_core.Signal<ZTableFilterUi>;
|
|
2050
|
+
protected readonly advancedType: _angular_core.Signal<ZTableAdvancedFilterType>;
|
|
2051
|
+
protected readonly isAdvancedUi: _angular_core.Signal<boolean>;
|
|
2052
|
+
protected readonly isBuilderMode: _angular_core.Signal<boolean>;
|
|
2053
|
+
protected readonly legacyAdvancedType: _angular_core.Signal<ZTableLegacyAdvancedFilterType>;
|
|
2054
|
+
protected readonly popoverContentClass: _angular_core.Signal<string>;
|
|
2055
|
+
protected readonly popoverWidth: _angular_core.Signal<number>;
|
|
2056
|
+
protected readonly sortLabelKey: _angular_core.Signal<string>;
|
|
2057
|
+
protected readonly legacyFilterLabelKey: _angular_core.Signal<string>;
|
|
2058
|
+
protected readonly filterConditions: _angular_core.Signal<ZTableFilterCondition[]>;
|
|
2059
|
+
protected readonly filterConditionViews: _angular_core.Signal<ZTableFilterConditionView[]>;
|
|
2060
|
+
protected readonly canAddFilterCondition: _angular_core.Signal<boolean>;
|
|
2061
|
+
protected readonly filterBadgeCount: _angular_core.Signal<number>;
|
|
2062
|
+
protected readonly hasFilterValue: _angular_core.Signal<boolean>;
|
|
2063
|
+
protected readonly isActive: _angular_core.Signal<boolean>;
|
|
2064
|
+
protected readonly draftSortValue: _angular_core.Signal<"none" | "asc" | "desc">;
|
|
2065
|
+
protected readonly rangeMinValue: _angular_core.Signal<any>;
|
|
2066
|
+
protected readonly rangeMaxValue: _angular_core.Signal<any>;
|
|
2067
|
+
protected readonly dateValue: _angular_core.Signal<Date | null>;
|
|
2068
|
+
protected readonly timeValue: _angular_core.Signal<Date | null>;
|
|
2069
|
+
protected readonly dateRangeValue: _angular_core.Signal<ZDateRange | null>;
|
|
2070
|
+
protected readonly selectValue: _angular_core.Signal<{} | null>;
|
|
2071
|
+
protected readonly multiSelectValue: _angular_core.Signal<any[]>;
|
|
2072
|
+
protected readonly selectOptions: _angular_core.Signal<{
|
|
2073
|
+
label: string;
|
|
2074
|
+
value: any;
|
|
2075
|
+
}[]>;
|
|
2076
|
+
protected readonly selectConfig: _angular_core.Signal<Partial<ZSelectConfig<unknown>>>;
|
|
2077
|
+
private readonly _syncExternalAppliedState;
|
|
2078
|
+
syncDraft(): void;
|
|
2079
|
+
toggleBasicSort(): void;
|
|
2080
|
+
addDraftFilter(joinWithPrev: ZTableFilterJoinOperator): void;
|
|
2081
|
+
removeDraftFilter(id: string): void;
|
|
2082
|
+
updateFilterOperator(id: string, operator: ZTableFilterOperator | null): void;
|
|
2083
|
+
updateFilterValue(id: string, value: unknown): void;
|
|
2084
|
+
updateDraftSort(value: string | null): void;
|
|
2085
|
+
resetFilters(): void;
|
|
2086
|
+
applyFilters(): void;
|
|
2087
|
+
onMinChangeDebounced(value: string | number | null): void;
|
|
2088
|
+
onMaxChangeDebounced(value: string | number | null): void;
|
|
2089
|
+
onDateChange(value: Date | null): void;
|
|
2090
|
+
onTimeChange(value: Date | null): void;
|
|
2091
|
+
onDateRangeChange(value: ZDateRange | null): void;
|
|
2092
|
+
onSelectChange(value: unknown): void;
|
|
2093
|
+
onMultiSelectChange(value: unknown[]): void;
|
|
2094
|
+
private _normalizeFilterUi;
|
|
2095
|
+
private _normalizeAdvancedType;
|
|
2096
|
+
private _defaultLegacyFilterLabelKey;
|
|
2097
|
+
private _normalizeFilterConditions;
|
|
2098
|
+
private _isFilterCondition;
|
|
2099
|
+
private _operatorDefinitions;
|
|
2100
|
+
private _operatorOptions;
|
|
2101
|
+
private _operatorOptionsForDraft;
|
|
2102
|
+
private _conditionJoinTone;
|
|
2103
|
+
private _withDraftId;
|
|
2104
|
+
private _createDraftId;
|
|
2105
|
+
private _isApplicableCondition;
|
|
2106
|
+
private _isValueLessOperator;
|
|
2107
|
+
private _applySortState;
|
|
2108
|
+
private _setColumnSorting;
|
|
2109
|
+
private _shouldPreserveOtherSorts;
|
|
2110
|
+
private _getColumnSortState;
|
|
2111
|
+
private _normalizeSortState;
|
|
2112
|
+
private _hasLegacyFilterValue;
|
|
2113
|
+
private _normalizeLegacyFilterValue;
|
|
2114
|
+
private _syncAppliedStateFromColumn;
|
|
2115
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZTableFilterComponent<any>, never>;
|
|
2116
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZTableFilterComponent<any>, "z-table-filter", never, { "zColumn": { "alias": "zColumn"; "required": true; "isSignal": true; }; "zTable": { "alias": "zTable"; "required": true; "isSignal": true; }; "zResetVersion": { "alias": "zResetVersion"; "required": false; "isSignal": true; }; "zSortingState": { "alias": "zSortingState"; "required": false; "isSignal": true; }; "zEnableMultiSort": { "alias": "zEnableMultiSort"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
declare class ZTableIconTextComponent {
|
|
2120
|
+
readonly zText: _angular_core.InputSignal<string>;
|
|
2121
|
+
readonly zTooltip: _angular_core.InputSignal<ZTooltipConfig | ZTooltipContent>;
|
|
2122
|
+
readonly zTriggerElement: _angular_core.InputSignal<HTMLElement | null>;
|
|
2123
|
+
private readonly _hostEl;
|
|
2124
|
+
private readonly _zTranslate;
|
|
2125
|
+
protected readonly triggerEl: _angular_core.Signal<any>;
|
|
2126
|
+
protected readonly translatedParts: _angular_core.Signal<ZTableIconPart[]>;
|
|
2127
|
+
protected readonly tooltipContent: _angular_core.Signal<ZTooltipContent>;
|
|
2128
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZTableIconTextComponent, never>;
|
|
2129
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZTableIconTextComponent, "z-table-icon-text", never, { "zText": { "alias": "zText"; "required": false; "isSignal": true; }; "zTooltip": { "alias": "zTooltip"; "required": false; "isSignal": true; }; "zTriggerElement": { "alias": "zTriggerElement"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
declare class ZTableActionsComponent<T = unknown> {
|
|
2133
|
+
readonly zConfig: _angular_core.InputSignal<ZTableActionColumnConfig<T>>;
|
|
2134
|
+
readonly zRow: _angular_core.InputSignal<T>;
|
|
2135
|
+
readonly zRowId: _angular_core.InputSignal<string>;
|
|
2136
|
+
readonly zDropdownButtonSize: _angular_core.InputSignal<"default" | "sm" | "lg" | "xs" | "xl" | null | undefined>;
|
|
2137
|
+
readonly zActionClick: _angular_core.OutputEmitterRef<ZTableActionClickEvent<T>>;
|
|
2138
|
+
protected readonly allActions: _angular_core.Signal<ZTableActionItem<T>[]>;
|
|
2139
|
+
protected readonly shouldShowAsButtons: _angular_core.Signal<boolean>;
|
|
2140
|
+
protected readonly actionStates: _angular_core.Signal<Record<string, {
|
|
2141
|
+
visible: boolean;
|
|
2142
|
+
loading: boolean;
|
|
2143
|
+
disabled: boolean;
|
|
2144
|
+
tooltipState: ZActionTooltipState;
|
|
2145
|
+
}>>;
|
|
2146
|
+
protected readonly dropdownItems: _angular_core.Signal<ZDropdownMenuItem[]>;
|
|
2147
|
+
private _getTooltipState;
|
|
2148
|
+
protected _onActionClick(action: ZTableActionItem<T>, event: Event): void;
|
|
2149
|
+
protected _onDropdownItemClick(item: ZDropdownMenuItem): void;
|
|
2150
|
+
private _emitActionClick;
|
|
2151
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZTableActionsComponent<any>, never>;
|
|
2152
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZTableActionsComponent<any>, "z-table-actions", never, { "zConfig": { "alias": "zConfig"; "required": true; "isSignal": true; }; "zRow": { "alias": "zRow"; "required": true; "isSignal": true; }; "zRowId": { "alias": "zRowId"; "required": true; "isSignal": true; }; "zDropdownButtonSize": { "alias": "zDropdownButtonSize"; "required": false; "isSignal": true; }; }, { "zActionClick": "zActionClick"; }, never, never, true, never>;
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
declare class ZTableEditCellComponent<T = unknown> implements OnInit {
|
|
2156
|
+
private readonly _destroyRef;
|
|
2157
|
+
readonly zRow: _angular_core.InputSignal<T>;
|
|
2158
|
+
readonly zRowId: _angular_core.InputSignal<string>;
|
|
2159
|
+
readonly zRowIndex: _angular_core.InputSignal<number>;
|
|
2160
|
+
readonly zColumnId: _angular_core.InputSignal<string>;
|
|
2161
|
+
readonly zValue: _angular_core.InputSignal<unknown>;
|
|
2162
|
+
readonly zEditConfig: _angular_core.InputSignal<ZTableEditConfig<T> | undefined>;
|
|
2163
|
+
readonly zRowUpdate: _angular_core.InputSignal<{
|
|
2164
|
+
rowId: string;
|
|
2165
|
+
updates: Record<string, unknown>;
|
|
2166
|
+
} | null>;
|
|
2167
|
+
readonly zChange: _angular_core.OutputEmitterRef<ZTableEditCellChangeEvent<T>>;
|
|
2168
|
+
private readonly _currentValue;
|
|
2169
|
+
private readonly _valueChange$;
|
|
2170
|
+
private _pendingBlurValue;
|
|
2171
|
+
private _hasPendingBlur;
|
|
2172
|
+
constructor();
|
|
2173
|
+
protected readonly editConfig: _angular_core.Signal<ZTableEditConfig<T>>;
|
|
2174
|
+
protected readonly cfg: _angular_core.Signal<ZResolvedEditConfig>;
|
|
2175
|
+
protected readonly selectOptions: _angular_core.Signal<ZSelectOption<unknown>[]>;
|
|
2176
|
+
protected readonly autocompleteOptions: _angular_core.Signal<ZAutocompleteOption<unknown>[]>;
|
|
2177
|
+
protected readonly value: _angular_core.Signal<unknown>;
|
|
2178
|
+
protected readonly stringValue: _angular_core.Signal<string>;
|
|
2179
|
+
protected readonly numericValue: _angular_core.Signal<number | null>;
|
|
2180
|
+
protected readonly booleanValue: _angular_core.Signal<boolean>;
|
|
2181
|
+
protected readonly dateValue: _angular_core.Signal<Date | null>;
|
|
2182
|
+
protected onValueChange(newValue: unknown): void;
|
|
2183
|
+
protected onInputBlur(): void;
|
|
2184
|
+
protected onImmediateChange(newValue: unknown): void;
|
|
2185
|
+
protected onSelectChange(newValue: unknown): void;
|
|
2186
|
+
protected onAutocompleteCommit(event: {
|
|
2187
|
+
value: string;
|
|
2188
|
+
source: 'enter' | 'blur';
|
|
2189
|
+
}): void;
|
|
2190
|
+
protected onAutocompleteSelect(option: ZAutocompleteOption): void;
|
|
2191
|
+
private _emitChange;
|
|
2192
|
+
ngOnInit(): void;
|
|
2193
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ZTableEditCellComponent<any>, never>;
|
|
2194
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ZTableEditCellComponent<any>, "z-table-edit-cell", never, { "zRow": { "alias": "zRow"; "required": true; "isSignal": true; }; "zRowId": { "alias": "zRowId"; "required": true; "isSignal": true; }; "zRowIndex": { "alias": "zRowIndex"; "required": true; "isSignal": true; }; "zColumnId": { "alias": "zColumnId"; "required": true; "isSignal": true; }; "zValue": { "alias": "zValue"; "required": false; "isSignal": true; }; "zEditConfig": { "alias": "zEditConfig"; "required": false; "isSignal": true; }; "zRowUpdate": { "alias": "zRowUpdate"; "required": false; "isSignal": true; }; }, { "zChange": "zChange"; }, never, never, true, never>;
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
/** Type guard: is this a full header config object (not just content shorthand)? */
|
|
2198
|
+
declare const isHeaderConfig: <T>(config: ZTableHeaderColumnConfig<T> | ZTableHeaderContent<T> | undefined) => config is ZTableHeaderColumnConfig<T>;
|
|
2199
|
+
/** Type guard: is this a full body config object (not just content shorthand)? */
|
|
2200
|
+
declare const isBodyConfig: <T>(config: ZTableBodyColumnConfig<T> | ZTableCellContent<T> | undefined) => config is ZTableBodyColumnConfig<T>;
|
|
2201
|
+
/** Type guard: is this a full footer config object (not just content shorthand)? */
|
|
2202
|
+
declare const isFooterConfig: <T>(config: ZTableFooterConfig<T> | undefined) => config is ZTableFooterColumnConfig<T>;
|
|
2203
|
+
/** Extract and normalize header config from a column definition */
|
|
2204
|
+
declare const getHeaderConfig: <T>(col: ZTableColumnConfig<T> | undefined) => {
|
|
2205
|
+
content: ZTableHeaderContent<T> | undefined;
|
|
2206
|
+
class: string | undefined;
|
|
2207
|
+
style: Record<string, string> | undefined;
|
|
2208
|
+
align: string | undefined;
|
|
2209
|
+
tooltip: string | object | undefined;
|
|
2210
|
+
rowSpan: number | undefined;
|
|
2211
|
+
colSpan: number | undefined;
|
|
2212
|
+
contentClass: string | ((info: unknown) => string) | undefined;
|
|
2213
|
+
contentStyle: Record<string, string> | ((info: unknown) => Record<string, string>) | undefined;
|
|
2214
|
+
} | {
|
|
2215
|
+
content: ZTableHeaderContent<T> | undefined;
|
|
2216
|
+
class: string | undefined;
|
|
2217
|
+
style: Record<string, string> | undefined;
|
|
2218
|
+
align: ZTableAlign | undefined;
|
|
2219
|
+
tooltip: string | _shival99_z_ui_components_z_tooltip.ZTooltipConfig | undefined;
|
|
2220
|
+
rowSpan: number | undefined;
|
|
2221
|
+
colSpan: number | undefined;
|
|
2222
|
+
contentClass: string | ((info: _shival99_z_ui_components_z_table.HeaderContext<T, unknown>) => string) | ((info: _shival99_z_ui_components_z_table.HeaderContext<T, unknown>) => string) | undefined;
|
|
2223
|
+
contentStyle: Record<string, string> | ((info: _shival99_z_ui_components_z_table.HeaderContext<T, unknown>) => Record<string, string>) | ((info: _shival99_z_ui_components_z_table.HeaderContext<T, unknown>) => Record<string, string>) | undefined;
|
|
2224
|
+
};
|
|
2225
|
+
/**
|
|
2226
|
+
* Extract and normalize body config from a column definition.
|
|
2227
|
+
* Resolves dynamic properties (class, style, rowSpan, etc.) when CellContext is provided.
|
|
2228
|
+
*/
|
|
2229
|
+
declare const getBodyConfig: <T>(col: ZTableColumnConfig<T> | undefined, ctx?: CellContext<T, unknown>) => {
|
|
2230
|
+
content: ZTableCellContent<T> | undefined;
|
|
2231
|
+
type: "default";
|
|
2232
|
+
tagColor: "primary";
|
|
2233
|
+
class: string | undefined;
|
|
2234
|
+
style: Record<string, string> | undefined;
|
|
2235
|
+
align: string | undefined;
|
|
2236
|
+
rowSpan: number | undefined;
|
|
2237
|
+
colSpan: number | undefined;
|
|
2238
|
+
contentClass: string | undefined;
|
|
2239
|
+
contentStyle: Record<string, string> | undefined;
|
|
2240
|
+
tooltip: string | object | undefined;
|
|
2241
|
+
popover: string | object | undefined;
|
|
2242
|
+
} | {
|
|
2243
|
+
content: ZTableCellContent<T> | undefined;
|
|
2244
|
+
type: _shival99_z_ui_components_z_table.ZTableBodyContentType;
|
|
2245
|
+
tagColor: _shival99_z_ui_components_z_tags.ZTagColor | ((info: CellContext<T, unknown>) => _shival99_z_ui_components_z_table.ZTableTagColor);
|
|
2246
|
+
class: string | ((info: CellContext<T, unknown>) => string) | undefined;
|
|
2247
|
+
style: Record<string, string> | undefined;
|
|
2248
|
+
align: ZTableAlign | undefined;
|
|
2249
|
+
rowSpan: number | undefined;
|
|
2250
|
+
colSpan: number | undefined;
|
|
2251
|
+
contentClass: string | ((info: CellContext<T, unknown>) => string) | undefined;
|
|
2252
|
+
contentStyle: Record<string, string> | undefined;
|
|
2253
|
+
tooltip: ZTableBodyTooltipConfig<T> | undefined;
|
|
2254
|
+
popover: ZTableBodyPopoverConfig<T> | undefined;
|
|
2255
|
+
};
|
|
2256
|
+
declare const getFooterConfig: <T>(col: ZTableColumnConfig<T> | undefined, footerRowIndex?: number) => {
|
|
2257
|
+
content: ZTableHeaderContent<T> | undefined;
|
|
2258
|
+
class: string | undefined;
|
|
2259
|
+
style: Record<string, string> | undefined;
|
|
2260
|
+
align: string | undefined;
|
|
2261
|
+
tooltip: string | object | undefined;
|
|
2262
|
+
rowSpan: number | undefined;
|
|
2263
|
+
colSpan: number | undefined;
|
|
2264
|
+
contentClass: string | ((info: unknown) => string) | undefined;
|
|
2265
|
+
contentStyle: Record<string, string> | ((info: unknown) => Record<string, string>) | undefined;
|
|
2266
|
+
} | {
|
|
2267
|
+
content: ZTableHeaderContent<T> | undefined;
|
|
2268
|
+
class: string | undefined;
|
|
2269
|
+
style: Record<string, string> | undefined;
|
|
2270
|
+
align: ZTableAlign | undefined;
|
|
2271
|
+
tooltip: string | _shival99_z_ui_components_z_tooltip.ZTooltipConfig | undefined;
|
|
2272
|
+
rowSpan: number | undefined;
|
|
2273
|
+
colSpan: number | undefined;
|
|
2274
|
+
contentClass: string | ((info: _shival99_z_ui_components_z_table.HeaderContext<T, unknown>) => string) | ((info: _shival99_z_ui_components_z_table.HeaderContext<T, unknown>) => string) | undefined;
|
|
2275
|
+
contentStyle: Record<string, string> | ((info: _shival99_z_ui_components_z_table.HeaderContext<T, unknown>) => Record<string, string>) | ((info: _shival99_z_ui_components_z_table.HeaderContext<T, unknown>) => Record<string, string>) | undefined;
|
|
2276
|
+
};
|
|
2277
|
+
/** Recursively search for a column config by ID within a (possibly nested) column array */
|
|
2278
|
+
declare const findColumnConfig: <T>(columnId: string, columns: ZTableColumnConfig<T>[]) => ZTableColumnConfig<T> | undefined;
|
|
2279
|
+
/**
|
|
2280
|
+
* Converts the consumer-facing ZTableColumnConfig into a TanStack ColumnDef.
|
|
2281
|
+
* This is the bridge between the z-table API and TanStack Table internals.
|
|
2282
|
+
*
|
|
2283
|
+
* Handles:
|
|
2284
|
+
* - Accessor mapping (accessorKey / accessorFn)
|
|
2285
|
+
* - Header/body/footer content resolution
|
|
2286
|
+
* - Sort and filter function wiring (local vs server mode)
|
|
2287
|
+
* - Built-in filter functions for each filter type
|
|
2288
|
+
* - Recursive nested column conversion
|
|
2289
|
+
*/
|
|
2290
|
+
declare function columnConfigToColumnDef<T>(config: ZTableColumnConfig<T>): ColumnDef<T>;
|
|
2291
|
+
|
|
2292
|
+
export { ZTableActionsComponent, ZTableComponent, ZTableEditCellComponent, ZTableFilterComponent, ZTableIconTextComponent, columnConfigToColumnDef, findColumnConfig, getBodyConfig, getFooterConfig, getHeaderConfig, isBodyConfig, isFooterConfig, isHeaderConfig };
|
|
2293
|
+
export type { Cell, CellContext, Column, ColumnDef, Header, HeaderContext, Row, Table, ZTableActionBodyConfig, ZTableActionClickEvent, ZTableActionColumnConfig, ZTableActionItem, ZTableActionList, ZTableAdvancedFilterType, ZTableBodyContentType, ZTableBulkActionClickEvent, ZTableBulkActionConfig, ZTableBulkActionContext, ZTableBulkActionHandlerContext, ZTableBulkActionItem, ZTableBulkActionList, ZTableBulkActionOptions, ZTableBulkActionViewItem, ZTableCellEditChange, ZTableCellEditEvent, ZTableChangeEvent, ZTableColumn, ZTableColumnConfig, ZTableConfig, ZTableControl, ZTableEditCellChangeEvent, ZTableEditConfig, ZTableEditContentConfig, ZTableEditContentType, ZTableEditSize, ZTableEditType, ZTableExcelExportConfig, ZTableExcelExportContext, ZTableExcelExportScope, ZTableFilterChangeEvent, ZTableFilterCondition, ZTableFilterConfig, ZTableFilterJoinOperator, ZTableFilterOperator, ZTableFilterOptionSource, ZTableFilterUi, ZTableFilterValueType, ZTableGroupExpandChange, ZTableGroupExpandEvent, ZTableGroupingConfig, ZTableGroupingMode, ZTablePageChangeEvent, ZTablePaginationConfig, ZTableRowCopyChange, ZTableRowCopyEvent, ZTableRowDeleteChange, ZTableRowDeleteEvent, ZTableRowExpandEvent, ZTableRowInsertChange, ZTableRowInsertEvent, ZTableRowInsertPosition, ZTableRowMoveChange, ZTableRowMoveDirection, ZTableRowMoveEvent, ZTableRowPasteChange, ZTableRowPasteEvent, ZTableRowSelectEvent, ZTableSearchChangeEvent, ZTableSearchConfig, ZTableServerGroup, ZTableSortChangeEvent, ZTableSortConfig, ZTableTagColor };
|