@soybeanjs/headless 0.16.0 → 0.17.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/dist/components/_icon/types.d.ts +9 -0
- package/dist/components/accordion/types.d.ts +87 -0
- package/dist/components/affix/types.d.ts +39 -0
- package/dist/components/alert/types.d.ts +78 -0
- package/dist/components/anchor/anchor-compact.js +1 -1
- package/dist/components/anchor/{anchor-compact-item.js → anchor-item-compact.js} +1 -1
- package/dist/components/anchor/anchor-item-compact.vue.d.ts +8 -0
- package/dist/components/anchor/anchor-link.js +1 -1
- package/dist/components/anchor/anchor-root.vue.d.ts +1 -1
- package/dist/components/anchor/index.d.ts +5 -4
- package/dist/components/anchor/index.js +1 -1
- package/dist/components/anchor/types.d.ts +122 -10
- package/dist/components/arrow/types.d.ts +3 -0
- package/dist/components/aspect-ratio/types.d.ts +3 -0
- package/dist/components/autocomplete/autocomplete-compact.vue.d.ts +2 -2
- package/dist/components/autocomplete/autocomplete-root.vue.d.ts +3 -3
- package/dist/components/autocomplete/types.d.ts +141 -0
- package/dist/components/avatar/types.d.ts +18 -0
- package/dist/components/backtop/backtop.vue.d.ts +9 -3
- package/dist/components/backtop/index.d.ts +2 -2
- package/dist/components/backtop/types.d.ts +19 -12
- package/dist/components/badge/types.d.ts +21 -0
- package/dist/components/bottom-sheet/bottom-sheet-compact.js +1 -1
- package/dist/components/bottom-sheet/bottom-sheet-root-nested.js +1 -1
- package/dist/components/bottom-sheet/bottom-sheet-root-nested.vue.d.ts +2 -2
- package/dist/components/bottom-sheet/bottom-sheet-root.js +1 -1
- package/dist/components/bottom-sheet/types.d.ts +99 -0
- package/dist/components/breadcrumb/index.d.ts +2 -2
- package/dist/components/breadcrumb/types.d.ts +103 -1
- package/dist/components/button/types.d.ts +16 -1
- package/dist/components/calendar/calendar-root.js +1 -1
- package/dist/components/calendar/types.d.ts +363 -0
- package/dist/components/card/types.d.ts +90 -0
- package/dist/components/carousel/types.d.ts +42 -0
- package/dist/components/checkbox/types.d.ts +111 -0
- package/dist/components/clipboard/types.d.ts +42 -0
- package/dist/components/collapsible/types.d.ts +18 -0
- package/dist/components/color-area/color-area-root.vue.d.ts +1 -1
- package/dist/components/color-area/types.d.ts +60 -0
- package/dist/components/color-field/color-field-root.vue.d.ts +2 -2
- package/dist/components/color-field/types.d.ts +51 -0
- package/dist/components/color-picker/color-picker-root.vue.d.ts +1 -1
- package/dist/components/color-picker/types.d.ts +39 -0
- package/dist/components/color-slider/color-slider-root.vue.d.ts +1 -1
- package/dist/components/color-slider/types.d.ts +60 -0
- package/dist/components/color-swatch/types.d.ts +9 -0
- package/dist/components/color-swatch-picker/types.d.ts +27 -0
- package/dist/components/combobox/combobox-compact.vue.d.ts +2 -2
- package/dist/components/combobox/combobox-root.vue.d.ts +2 -2
- package/dist/components/combobox/types.d.ts +237 -0
- package/dist/components/command/types.d.ts +147 -0
- package/dist/components/config-provider/config-provider.vue.d.ts +1 -1
- package/dist/components/config-provider/types.d.ts +3 -0
- package/dist/components/context-menu/context-menu-checkbox-compact.js +1 -1
- package/dist/components/context-menu/context-menu-compact.js +1 -1
- package/dist/components/context-menu/context-menu-radio-compact.js +1 -1
- package/dist/components/context-menu/context-menu-root.js +1 -1
- package/dist/components/context-menu/context-menu-wrapper-compact.js +1 -1
- package/dist/components/context-menu/types.d.ts +78 -0
- package/dist/components/date-field/date-field-root.vue.d.ts +2 -2
- package/dist/components/date-field/types.d.ts +147 -0
- package/dist/components/date-picker/context.js +1 -1
- package/dist/components/date-picker/date-picker-compact.js +1 -0
- package/dist/components/date-picker/date-picker-compact.vue.d.ts +27 -0
- package/dist/components/date-picker/date-picker-content.js +1 -0
- package/dist/components/date-picker/date-picker-content.vue.d.ts +33 -0
- package/dist/components/date-picker/date-picker-root.js +1 -1
- package/dist/components/date-picker/date-picker-root.vue.d.ts +9 -14
- package/dist/components/date-picker/index.d.ts +8 -5
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-picker/types.d.ts +236 -10
- package/dist/components/date-range-field/date-range-field-root.vue.d.ts +2 -2
- package/dist/components/date-range-field/types.d.ts +192 -0
- package/dist/components/date-range-picker/date-range-picker-compact.vue.d.ts +2 -2
- package/dist/components/date-range-picker/date-range-picker-root.vue.d.ts +7 -7
- package/dist/components/date-range-picker/types.d.ts +189 -0
- package/dist/components/dialog/dialog-compact.js +1 -1
- package/dist/components/dialog/dialog-compact.vue.d.ts +5 -5
- package/dist/components/dialog/dialog-root.js +1 -1
- package/dist/components/dialog/types.d.ts +196 -2
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-compact.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-compact.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-radio-compact.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-root.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-root.vue.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-wrapper-compact.js +1 -1
- package/dist/components/dropdown-menu/types.d.ts +84 -0
- package/dist/components/editable/types.d.ts +123 -0
- package/dist/components/empty/types.d.ts +24 -0
- package/dist/components/form/core/types.d.ts +396 -13
- package/dist/components/form/types.d.ts +27 -0
- package/dist/components/hover-card/hover-card-positioner-impl.js +1 -1
- package/dist/components/hover-card/types.d.ts +57 -0
- package/dist/components/input/types.d.ts +21 -0
- package/dist/components/input-number/types.d.ts +30 -0
- package/dist/components/input-otp/index.d.ts +1 -2
- package/dist/components/input-otp/index.js +1 -1
- package/dist/components/input-otp/input-otp-compact.vue.d.ts +4 -4
- package/dist/components/input-otp/input-otp-root.vue.d.ts +5 -5
- package/dist/components/input-otp/types.d.ts +186 -0
- package/dist/components/kbd/types.d.ts +6 -0
- package/dist/components/label/types.d.ts +3 -0
- package/dist/components/layout/layout-root.vue.d.ts +1 -1
- package/dist/components/layout/types.d.ts +124 -10
- package/dist/components/link/types.d.ts +12 -0
- package/dist/components/list/types.d.ts +21 -0
- package/dist/components/listbox/types.d.ts +66 -0
- package/dist/components/menu/menu-option-compact.js +1 -1
- package/dist/components/menu/menu-options-compact.js +1 -1
- package/dist/components/menu/menu-root.js +1 -1
- package/dist/components/menu/types.d.ts +266 -2
- package/dist/components/menubar/menubar-compact.js +1 -1
- package/dist/components/menubar/types.d.ts +72 -0
- package/dist/components/month-picker/month-picker-root.vue.d.ts +4 -4
- package/dist/components/month-picker/types.d.ts +141 -0
- package/dist/components/month-range-picker/month-range-picker-root.vue.d.ts +4 -4
- package/dist/components/month-range-picker/types.d.ts +165 -0
- package/dist/components/navigation-menu/types.d.ts +87 -0
- package/dist/components/page-tabs/types.d.ts +24 -0
- package/dist/components/pagination/types.d.ts +96 -0
- package/dist/components/popover/context.d.ts +9 -0
- package/dist/components/popover/context.js +1 -1
- package/dist/components/popover/index.d.ts +6 -6
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/popover-compact.js +1 -1
- package/dist/components/popover/popover-root.js +1 -1
- package/dist/components/popover/popover-root.vue.d.ts +0 -2
- package/dist/components/popover/popover-trigger.js +1 -1
- package/dist/components/popover/types.d.ts +94 -6
- package/dist/components/popper/popper-positioner.vue.d.ts +2 -2
- package/dist/components/popper/types.d.ts +21 -0
- package/dist/components/portal/types.d.ts +3 -0
- package/dist/components/primitive/types.d.ts +6 -0
- package/dist/components/progress/types.d.ts +81 -0
- package/dist/components/radio-group/types.d.ts +66 -0
- package/dist/components/range-calendar/range-calendar-root.vue.d.ts +2 -2
- package/dist/components/range-calendar/types.d.ts +330 -0
- package/dist/components/roving-focus/roving-focus-group.vue.d.ts +1 -1
- package/dist/components/roving-focus/types.d.ts +18 -0
- package/dist/components/scroll-area/types.d.ts +33 -0
- package/dist/components/segment/types.d.ts +36 -0
- package/dist/components/select/select-content.vue.d.ts +1 -1
- package/dist/components/select/types.d.ts +240 -0
- package/dist/components/separator/types.d.ts +12 -0
- package/dist/components/skeleton/types.d.ts +3 -0
- package/dist/components/slider/slider-root.vue.d.ts +1 -1
- package/dist/components/slider/types.d.ts +90 -0
- package/dist/components/splitter/splitter-panel.vue.d.ts +2 -2
- package/dist/components/splitter/types.d.ts +114 -0
- package/dist/components/stepper/stepper-root.vue.d.ts +1 -1
- package/dist/components/stepper/types.d.ts +96 -0
- package/dist/components/switch/types.d.ts +21 -0
- package/dist/components/table/types.d.ts +819 -0
- package/dist/components/tabs/tabs-root.vue.d.ts +1 -1
- package/dist/components/tabs/types.d.ts +75 -0
- package/dist/components/tag/types.d.ts +12 -0
- package/dist/components/tags-input/tags-input-root.vue.d.ts +2 -2
- package/dist/components/tags-input/types.d.ts +63 -0
- package/dist/components/textarea/types.d.ts +27 -0
- package/dist/components/time-field/time-field-root.vue.d.ts +1 -1
- package/dist/components/time-field/types.d.ts +138 -0
- package/dist/components/time-picker/time-picker-root.vue.d.ts +6 -6
- package/dist/components/time-picker/types.d.ts +156 -0
- package/dist/components/time-range-field/time-range-field-root.vue.d.ts +2 -2
- package/dist/components/time-range-field/types.d.ts +192 -0
- package/dist/components/time-range-picker/time-range-picker-compact.vue.d.ts +2 -2
- package/dist/components/time-range-picker/time-range-picker-root.vue.d.ts +6 -6
- package/dist/components/time-range-picker/types.d.ts +201 -0
- package/dist/components/toast/toaster.vue.d.ts +2 -2
- package/dist/components/toast/types.d.ts +224 -4
- package/dist/components/toggle/toggle.vue.d.ts +1 -1
- package/dist/components/toggle/types.d.ts +9 -0
- package/dist/components/toggle-group/types.d.ts +15 -0
- package/dist/components/toolbar/types.d.ts +48 -0
- package/dist/components/tooltip/types.d.ts +27 -0
- package/dist/components/tree/types.d.ts +75 -0
- package/dist/components/tree-menu/tree-menu-root.vue.d.ts +1 -1
- package/dist/components/tree-menu/types.d.ts +60 -0
- package/dist/components/virtualizer/types.d.ts +33 -0
- package/dist/components/visually-hidden/types.d.ts +30 -0
- package/dist/components/year-picker/types.d.ts +144 -0
- package/dist/components/year-picker/year-picker-root.vue.d.ts +4 -4
- package/dist/components/year-range-picker/types.d.ts +168 -0
- package/dist/components/year-range-picker/year-range-picker-root.vue.d.ts +4 -4
- package/dist/composables/use-collection.js +1 -1
- package/dist/constants/components.d.ts +5 -5
- package/dist/constants/components.js +1 -1
- package/dist/constants/index.d.ts +2 -1
- package/dist/constants/index.js +1 -1
- package/dist/{components/input-otp → constants}/regexp.d.ts +1 -1
- package/dist/date/parts.d.ts +1 -1
- package/dist/index.d.ts +418 -417
- package/dist/index.js +1 -1
- package/dist/namespaced/index.d.ts +877 -872
- package/dist/namespaced/index.js +1 -1
- package/dist/node_modules/.pnpm/@soybeanjs_utils@0.1.1/node_modules/@soybeanjs/utils/dist/index.js +1 -1
- package/dist/resolver/index.js +1 -1
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +1 -1
- package/dist/shared/string.d.ts +1 -34
- package/dist/shared/string.js +1 -1
- package/dist/types/common.d.ts +9 -1
- package/dist/types/dom.d.ts +3 -1
- package/dist/types/event.d.ts +10 -1
- package/dist/types/index.d.ts +5 -4
- package/dist/types/index.js +0 -0
- package/dist/types/vue.d.ts +4 -1
- package/package.json +6 -1
- package/dist/components/date-picker/date-picker-popup.js +0 -1
- package/dist/components/date-picker/date-picker-popup.vue.d.ts +0 -21
- package/dist/components/date-picker/date-picker-trigger.js +0 -1
- package/dist/components/date-picker/date-picker-trigger.vue.d.ts +0 -21
- /package/dist/{components/input-otp → constants}/regexp.js +0 -0
|
@@ -5,71 +5,236 @@ import { VirtualizerOptions } from "../virtualizer/types.js";
|
|
|
5
5
|
import { ComputedRef, HTMLAttributes, ShallowRef, TableHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes } from "vue";
|
|
6
6
|
|
|
7
7
|
//#region src/components/table/types.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Props for the table root component.
|
|
10
|
+
*/
|
|
8
11
|
interface TableRootProps extends /** @vue-ignore */HTMLAttributes {
|
|
12
|
+
/**
|
|
13
|
+
* Reading direction of the component.
|
|
14
|
+
*/
|
|
9
15
|
dir?: Direction;
|
|
10
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Props for the table scroll component.
|
|
19
|
+
*/
|
|
11
20
|
interface TableScrollProps extends /** @vue-ignore */HTMLAttributes {}
|
|
21
|
+
/**
|
|
22
|
+
* Props for the table content component.
|
|
23
|
+
*/
|
|
12
24
|
interface TableContentProps extends /** @vue-ignore */TableHTMLAttributes {}
|
|
25
|
+
/**
|
|
26
|
+
* Props for the table header component.
|
|
27
|
+
*/
|
|
13
28
|
interface TableHeaderProps extends /** @vue-ignore */HTMLAttributes {}
|
|
29
|
+
/**
|
|
30
|
+
* Props for the table body component.
|
|
31
|
+
*/
|
|
14
32
|
interface TableBodyProps extends /** @vue-ignore */HTMLAttributes {}
|
|
33
|
+
/**
|
|
34
|
+
* Props for the table footer component.
|
|
35
|
+
*/
|
|
15
36
|
interface TableFooterProps extends /** @vue-ignore */HTMLAttributes {}
|
|
37
|
+
/**
|
|
38
|
+
* Props for the table row component.
|
|
39
|
+
*/
|
|
16
40
|
interface TableRowProps extends /** @vue-ignore */HTMLAttributes {}
|
|
41
|
+
/**
|
|
42
|
+
* Props for the table head component.
|
|
43
|
+
*/
|
|
17
44
|
interface TableHeadProps extends /** @vue-ignore */ThHTMLAttributes {}
|
|
45
|
+
/**
|
|
46
|
+
* Props for the table cell component.
|
|
47
|
+
*/
|
|
18
48
|
interface TableCellProps extends /** @vue-ignore */TdHTMLAttributes {}
|
|
49
|
+
/**
|
|
50
|
+
* Available UI slots for the table component.
|
|
51
|
+
*/
|
|
19
52
|
type TableUiSlot = 'root' | 'scroll' | 'content' | 'header' | 'body' | 'footer' | 'row' | 'head' | 'cell' | 'fixed' | 'sortTrigger' | 'filterInput' | 'resizeHandle' | 'treeCell' | 'treeToggle' | 'treeTogglePlaceholder';
|
|
53
|
+
/**
|
|
54
|
+
* UI class overrides for the table component.
|
|
55
|
+
*/
|
|
20
56
|
type TableUi = UiClass<TableUiSlot>;
|
|
57
|
+
/**
|
|
58
|
+
* Type information for the table base data component.
|
|
59
|
+
*/
|
|
21
60
|
type TableBaseData = Record<string, any>;
|
|
61
|
+
/**
|
|
62
|
+
* Type information for the table row value component.
|
|
63
|
+
*/
|
|
22
64
|
type TableRowValue<T extends TableBaseData = TableBaseData> = Omit<T, 'children'>;
|
|
65
|
+
/**
|
|
66
|
+
* Type information for the table align component.
|
|
67
|
+
*/
|
|
23
68
|
type TableAlign = 'start' | 'center' | 'end';
|
|
69
|
+
/**
|
|
70
|
+
* Supported table column values.
|
|
71
|
+
*/
|
|
24
72
|
type TableColumnType = 'index' | 'selection' | 'expand';
|
|
73
|
+
/**
|
|
74
|
+
* Type information for the table sort order component.
|
|
75
|
+
*/
|
|
25
76
|
type TableSortOrder = 'asc' | 'desc';
|
|
77
|
+
/**
|
|
78
|
+
* Type information for the table unified key component.
|
|
79
|
+
*/
|
|
26
80
|
type TableUnifiedKey = string | number;
|
|
81
|
+
/**
|
|
82
|
+
* State values for the table component.
|
|
83
|
+
*/
|
|
27
84
|
interface TableSortState {
|
|
85
|
+
/**
|
|
86
|
+
* Key.
|
|
87
|
+
*/
|
|
28
88
|
key: string;
|
|
89
|
+
/**
|
|
90
|
+
* Order.
|
|
91
|
+
*/
|
|
29
92
|
order: TableSortOrder;
|
|
30
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Type information for the table column filter value component.
|
|
96
|
+
*/
|
|
31
97
|
interface TableColumnFilterValue {
|
|
98
|
+
/**
|
|
99
|
+
* Keyword.
|
|
100
|
+
*/
|
|
32
101
|
keyword?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Values.
|
|
104
|
+
*/
|
|
33
105
|
values?: string[];
|
|
34
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Type information for the table filter value component.
|
|
109
|
+
*/
|
|
35
110
|
type TableFilterValue = string | TableColumnFilterValue;
|
|
111
|
+
/**
|
|
112
|
+
* State values for the table component.
|
|
113
|
+
*/
|
|
36
114
|
type TableFilterState = Record<string, TableFilterValue>;
|
|
115
|
+
/**
|
|
116
|
+
* State values for the table component.
|
|
117
|
+
*/
|
|
37
118
|
type TableColumnWidthState = Record<string, string>;
|
|
119
|
+
/**
|
|
120
|
+
* Type information for the table row children resolver component.
|
|
121
|
+
*/
|
|
38
122
|
type TableRowChildrenResolver<T extends TableBaseData = TableBaseData> = (row: T) => T[] | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* Type information for the table virtual measurement component.
|
|
125
|
+
*/
|
|
39
126
|
interface TableVirtualMeasurement {
|
|
127
|
+
/**
|
|
128
|
+
* Index of the current item.
|
|
129
|
+
*/
|
|
40
130
|
index: number;
|
|
131
|
+
/**
|
|
132
|
+
* Start.
|
|
133
|
+
*/
|
|
41
134
|
start: number;
|
|
135
|
+
/**
|
|
136
|
+
* End.
|
|
137
|
+
*/
|
|
42
138
|
end: number;
|
|
43
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Type information for the table virtual range component.
|
|
142
|
+
*/
|
|
44
143
|
interface TableVirtualRange {
|
|
144
|
+
/**
|
|
145
|
+
* Start index.
|
|
146
|
+
*/
|
|
45
147
|
startIndex: number;
|
|
148
|
+
/**
|
|
149
|
+
* End index.
|
|
150
|
+
*/
|
|
46
151
|
endIndex: number;
|
|
47
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Type information for the table tree node component.
|
|
155
|
+
*/
|
|
48
156
|
interface TableTreeNode<T extends TableBaseData = TableBaseData, R extends TableUnifiedKey = TableUnifiedKey> {
|
|
157
|
+
/**
|
|
158
|
+
* Key.
|
|
159
|
+
*/
|
|
49
160
|
key: R;
|
|
161
|
+
/**
|
|
162
|
+
* Row.
|
|
163
|
+
*/
|
|
50
164
|
row: T;
|
|
165
|
+
/**
|
|
166
|
+
* Level.
|
|
167
|
+
*/
|
|
51
168
|
level: number;
|
|
169
|
+
/**
|
|
170
|
+
* Parent key.
|
|
171
|
+
*/
|
|
52
172
|
parentKey?: R;
|
|
173
|
+
/**
|
|
174
|
+
* Nested child items.
|
|
175
|
+
*/
|
|
53
176
|
children: TableTreeNode<T, R>[];
|
|
177
|
+
/**
|
|
178
|
+
* Whether the component has children.
|
|
179
|
+
*/
|
|
54
180
|
hasChildren: boolean;
|
|
55
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* Type information for the table tree row component.
|
|
184
|
+
*/
|
|
56
185
|
interface TableTreeRow<T extends TableBaseData = TableBaseData, R extends TableUnifiedKey = TableUnifiedKey> {
|
|
186
|
+
/**
|
|
187
|
+
* Key.
|
|
188
|
+
*/
|
|
57
189
|
key: R;
|
|
190
|
+
/**
|
|
191
|
+
* Row.
|
|
192
|
+
*/
|
|
58
193
|
row: T;
|
|
194
|
+
/**
|
|
195
|
+
* Level.
|
|
196
|
+
*/
|
|
59
197
|
level: number;
|
|
198
|
+
/**
|
|
199
|
+
* Parent key.
|
|
200
|
+
*/
|
|
60
201
|
parentKey?: R;
|
|
202
|
+
/**
|
|
203
|
+
* Whether the component has children.
|
|
204
|
+
*/
|
|
61
205
|
hasChildren: boolean;
|
|
62
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* Type information for the table visible row component.
|
|
209
|
+
*/
|
|
63
210
|
interface TableVisibleRow<T extends TableBaseData = TableBaseData, R extends TableUnifiedKey = TableUnifiedKey> {
|
|
211
|
+
/**
|
|
212
|
+
* Index of the current item.
|
|
213
|
+
*/
|
|
64
214
|
index: number;
|
|
215
|
+
/**
|
|
216
|
+
* Current item data.
|
|
217
|
+
*/
|
|
65
218
|
item: TableTreeRow<T, R>;
|
|
66
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Type information for the table column filter component.
|
|
222
|
+
*/
|
|
67
223
|
interface TableColumnFilter<T extends TableBaseData = TableBaseData> {
|
|
224
|
+
/**
|
|
225
|
+
* Placeholder.
|
|
226
|
+
*/
|
|
68
227
|
placeholder?: string;
|
|
228
|
+
/**
|
|
229
|
+
* Options.
|
|
230
|
+
*/
|
|
69
231
|
options?: TableColumnFilterOption[] | ((params: {
|
|
70
232
|
rows: T[];
|
|
71
233
|
column: TableDataColumn<T>;
|
|
72
234
|
}) => TableColumnFilterOption[]);
|
|
235
|
+
/**
|
|
236
|
+
* Match.
|
|
237
|
+
*/
|
|
73
238
|
match?: (params: {
|
|
74
239
|
filterValue: TableColumnFilterValue;
|
|
75
240
|
keyword: string;
|
|
@@ -79,256 +244,910 @@ interface TableColumnFilter<T extends TableBaseData = TableBaseData> {
|
|
|
79
244
|
column: TableDataColumn<T>;
|
|
80
245
|
}) => boolean;
|
|
81
246
|
}
|
|
247
|
+
/**
|
|
248
|
+
* Type information for the table column filter option component.
|
|
249
|
+
*/
|
|
82
250
|
interface TableColumnFilterOption {
|
|
251
|
+
/**
|
|
252
|
+
* Label text rendered by the component.
|
|
253
|
+
*/
|
|
83
254
|
label: string;
|
|
255
|
+
/**
|
|
256
|
+
* Value associated with the current item.
|
|
257
|
+
*/
|
|
84
258
|
value: string;
|
|
259
|
+
/**
|
|
260
|
+
* Whether the component is disabled.
|
|
261
|
+
*/
|
|
85
262
|
disabled?: boolean;
|
|
86
263
|
}
|
|
264
|
+
/**
|
|
265
|
+
* Type information for the table column base component.
|
|
266
|
+
*/
|
|
87
267
|
interface TableColumnBase {
|
|
268
|
+
/**
|
|
269
|
+
* Key.
|
|
270
|
+
*/
|
|
88
271
|
key?: string;
|
|
272
|
+
/**
|
|
273
|
+
* Title text rendered by the component.
|
|
274
|
+
*/
|
|
89
275
|
title?: string;
|
|
276
|
+
/**
|
|
277
|
+
* Type.
|
|
278
|
+
*/
|
|
90
279
|
type?: TableColumnType;
|
|
280
|
+
/**
|
|
281
|
+
* Align.
|
|
282
|
+
*/
|
|
91
283
|
align?: TableAlign;
|
|
284
|
+
/**
|
|
285
|
+
* Width.
|
|
286
|
+
*/
|
|
92
287
|
width?: string;
|
|
288
|
+
/**
|
|
289
|
+
* Min width.
|
|
290
|
+
*/
|
|
93
291
|
minWidth?: string;
|
|
292
|
+
/**
|
|
293
|
+
* Whether the item is hidden.
|
|
294
|
+
*/
|
|
94
295
|
hidden?: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Fixed.
|
|
298
|
+
*/
|
|
95
299
|
fixed?: 'start' | 'end';
|
|
300
|
+
/**
|
|
301
|
+
* Whether resizable.
|
|
302
|
+
*/
|
|
96
303
|
resizable?: boolean;
|
|
97
304
|
}
|
|
305
|
+
/**
|
|
306
|
+
* Type information for the table type column component.
|
|
307
|
+
*/
|
|
98
308
|
interface TableTypeColumn extends TableColumnBase {
|
|
309
|
+
/**
|
|
310
|
+
* Type.
|
|
311
|
+
*/
|
|
99
312
|
type: TableColumnType;
|
|
313
|
+
/**
|
|
314
|
+
* Data index.
|
|
315
|
+
*/
|
|
100
316
|
dataIndex?: never;
|
|
317
|
+
/**
|
|
318
|
+
* Nested child items.
|
|
319
|
+
*/
|
|
101
320
|
children?: never;
|
|
321
|
+
/**
|
|
322
|
+
* Sorter.
|
|
323
|
+
*/
|
|
102
324
|
sorter?: never;
|
|
325
|
+
/**
|
|
326
|
+
* Filter.
|
|
327
|
+
*/
|
|
103
328
|
filter?: never;
|
|
104
329
|
}
|
|
330
|
+
/**
|
|
331
|
+
* Type information for the table data column component.
|
|
332
|
+
*/
|
|
105
333
|
interface TableDataColumn<T extends TableBaseData = TableBaseData> extends TableColumnBase {
|
|
334
|
+
/**
|
|
335
|
+
* Data index.
|
|
336
|
+
*/
|
|
106
337
|
dataIndex: Path<TableRowValue<T>>;
|
|
338
|
+
/**
|
|
339
|
+
* Type.
|
|
340
|
+
*/
|
|
107
341
|
type?: never;
|
|
342
|
+
/**
|
|
343
|
+
* Nested child items.
|
|
344
|
+
*/
|
|
108
345
|
children?: never;
|
|
346
|
+
/**
|
|
347
|
+
* Sorter.
|
|
348
|
+
*/
|
|
109
349
|
sorter?: boolean | ((a: T, b: T) => number);
|
|
350
|
+
/**
|
|
351
|
+
* Filter.
|
|
352
|
+
*/
|
|
110
353
|
filter?: boolean | TableColumnFilter<T>;
|
|
111
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* Type information for the table group column component.
|
|
357
|
+
*/
|
|
112
358
|
interface TableGroupColumn<T extends TableBaseData = TableBaseData> extends TableColumnBase {
|
|
359
|
+
/**
|
|
360
|
+
* Nested child items.
|
|
361
|
+
*/
|
|
113
362
|
children: TableColumn<T>[];
|
|
363
|
+
/**
|
|
364
|
+
* Type.
|
|
365
|
+
*/
|
|
114
366
|
type?: never;
|
|
367
|
+
/**
|
|
368
|
+
* Data index.
|
|
369
|
+
*/
|
|
115
370
|
dataIndex?: never;
|
|
371
|
+
/**
|
|
372
|
+
* Sorter.
|
|
373
|
+
*/
|
|
116
374
|
sorter?: never;
|
|
375
|
+
/**
|
|
376
|
+
* Filter.
|
|
377
|
+
*/
|
|
117
378
|
filter?: never;
|
|
118
379
|
}
|
|
380
|
+
/**
|
|
381
|
+
* Type information for the table column component.
|
|
382
|
+
*/
|
|
119
383
|
type TableColumn<T extends TableBaseData = TableBaseData> = TableTypeColumn | TableDataColumn<T> | TableGroupColumn<T>;
|
|
384
|
+
/**
|
|
385
|
+
* Type information for the table header cell component.
|
|
386
|
+
*/
|
|
120
387
|
interface TableHeaderCell<T extends TableBaseData = TableBaseData> {
|
|
388
|
+
/**
|
|
389
|
+
* Key.
|
|
390
|
+
*/
|
|
121
391
|
key: string;
|
|
392
|
+
/**
|
|
393
|
+
* Column.
|
|
394
|
+
*/
|
|
122
395
|
column: TableColumn<T>;
|
|
396
|
+
/**
|
|
397
|
+
* Col span.
|
|
398
|
+
*/
|
|
123
399
|
colSpan: number;
|
|
400
|
+
/**
|
|
401
|
+
* Row span.
|
|
402
|
+
*/
|
|
124
403
|
rowSpan: number;
|
|
125
404
|
}
|
|
405
|
+
/**
|
|
406
|
+
* State values for the table component.
|
|
407
|
+
*/
|
|
126
408
|
interface TableFixedState {
|
|
409
|
+
/**
|
|
410
|
+
* Side placement of the component.
|
|
411
|
+
*/
|
|
127
412
|
side: 'start' | 'end';
|
|
413
|
+
/**
|
|
414
|
+
* Offset.
|
|
415
|
+
*/
|
|
128
416
|
offset: number;
|
|
417
|
+
/**
|
|
418
|
+
* Whether a last start.
|
|
419
|
+
*/
|
|
129
420
|
isLastStart: boolean;
|
|
421
|
+
/**
|
|
422
|
+
* Whether a first end.
|
|
423
|
+
*/
|
|
130
424
|
isFirstEnd: boolean;
|
|
131
425
|
}
|
|
426
|
+
/**
|
|
427
|
+
* Type information for the table fixed column offsets component.
|
|
428
|
+
*/
|
|
132
429
|
interface TableFixedColumnOffsets {
|
|
430
|
+
/**
|
|
431
|
+
* Start offsets.
|
|
432
|
+
*/
|
|
133
433
|
startOffsets: Record<string, number>;
|
|
434
|
+
/**
|
|
435
|
+
* End offsets.
|
|
436
|
+
*/
|
|
134
437
|
endOffsets: Record<string, number>;
|
|
438
|
+
/**
|
|
439
|
+
* Last start key.
|
|
440
|
+
*/
|
|
135
441
|
lastStartKey?: string;
|
|
442
|
+
/**
|
|
443
|
+
* First end key.
|
|
444
|
+
*/
|
|
136
445
|
firstEndKey?: string;
|
|
137
446
|
}
|
|
447
|
+
/**
|
|
448
|
+
* Props for the table selection component.
|
|
449
|
+
*/
|
|
138
450
|
interface TableSelectionProps<R extends TableUnifiedKey = TableUnifiedKey, M extends boolean = false> {
|
|
451
|
+
/**
|
|
452
|
+
* Default selected.
|
|
453
|
+
*/
|
|
139
454
|
defaultSelected?: M extends true ? R[] : R;
|
|
455
|
+
/**
|
|
456
|
+
* Whether the item is selected.
|
|
457
|
+
*/
|
|
140
458
|
selected?: M extends true ? R[] : R;
|
|
459
|
+
/**
|
|
460
|
+
* Whether multiple values are supported.
|
|
461
|
+
*/
|
|
141
462
|
multiple?: M;
|
|
142
463
|
}
|
|
464
|
+
/**
|
|
465
|
+
* Props for the table compact cell component.
|
|
466
|
+
*/
|
|
143
467
|
interface TableCompactCellProps {
|
|
468
|
+
/**
|
|
469
|
+
* Column.
|
|
470
|
+
*/
|
|
144
471
|
column: TableColumn;
|
|
472
|
+
/**
|
|
473
|
+
* Row.
|
|
474
|
+
*/
|
|
145
475
|
row: TableTreeRow;
|
|
476
|
+
/**
|
|
477
|
+
* Index of the current item.
|
|
478
|
+
*/
|
|
146
479
|
index: number;
|
|
147
480
|
}
|
|
481
|
+
/**
|
|
482
|
+
* Props for the table compact expanded row component.
|
|
483
|
+
*/
|
|
148
484
|
interface TableCompactExpandedRowProps {
|
|
485
|
+
/**
|
|
486
|
+
* Row.
|
|
487
|
+
*/
|
|
149
488
|
row: TableTreeRow;
|
|
489
|
+
/**
|
|
490
|
+
* Index of the current item.
|
|
491
|
+
*/
|
|
150
492
|
index: number;
|
|
493
|
+
/**
|
|
494
|
+
* Colspan.
|
|
495
|
+
*/
|
|
151
496
|
colspan: number;
|
|
152
497
|
}
|
|
498
|
+
/**
|
|
499
|
+
* Props for the table compact head component.
|
|
500
|
+
*/
|
|
153
501
|
interface TableCompactHeadProps extends Omit<TableHeaderCell, 'key'> {}
|
|
502
|
+
/**
|
|
503
|
+
* Props for the table compact row component.
|
|
504
|
+
*/
|
|
154
505
|
interface TableCompactRowProps {
|
|
506
|
+
/**
|
|
507
|
+
* Row.
|
|
508
|
+
*/
|
|
155
509
|
row: TableTreeRow;
|
|
510
|
+
/**
|
|
511
|
+
* Index of the current item.
|
|
512
|
+
*/
|
|
156
513
|
index: number;
|
|
514
|
+
/**
|
|
515
|
+
* Leaf columns.
|
|
516
|
+
*/
|
|
157
517
|
leafColumns: TableColumn[];
|
|
158
518
|
}
|
|
519
|
+
/**
|
|
520
|
+
* Slots for the table compact cell component.
|
|
521
|
+
*/
|
|
159
522
|
type TableCompactCellSlots<T extends TableBaseData> = { [K in Path<TableRowValue<T>>]?: (props: TableDataCellSlotProps<T, K>) => any } & {
|
|
523
|
+
/**
|
|
524
|
+
* Custom content for the index slot.
|
|
525
|
+
*/
|
|
160
526
|
index?: (props: TableIndexSlotProps<T>) => any;
|
|
527
|
+
/**
|
|
528
|
+
* Custom content for the selection slot.
|
|
529
|
+
*/
|
|
161
530
|
selection?: (props: TableSelectionSlotProps<T>) => any;
|
|
531
|
+
/**
|
|
532
|
+
* Custom content for the expand slot.
|
|
533
|
+
*/
|
|
162
534
|
expand?: (props: TableExpandSlotProps<T>) => any;
|
|
535
|
+
/**
|
|
536
|
+
* Custom content for the tree toggle slot.
|
|
537
|
+
*/
|
|
163
538
|
'tree-toggle'?: (props: TableTreeToggleSlotProps<T>) => any;
|
|
164
539
|
};
|
|
540
|
+
/**
|
|
541
|
+
* Slot props for the table header component.
|
|
542
|
+
*/
|
|
165
543
|
interface TableHeaderSlotProps<T extends TableBaseData = TableBaseData> {
|
|
544
|
+
/**
|
|
545
|
+
* Column exposed in the slot scope.
|
|
546
|
+
*/
|
|
166
547
|
column: TableColumn<T>;
|
|
548
|
+
/**
|
|
549
|
+
* Col span exposed in the slot scope.
|
|
550
|
+
*/
|
|
167
551
|
colSpan: number;
|
|
552
|
+
/**
|
|
553
|
+
* Row span exposed in the slot scope.
|
|
554
|
+
*/
|
|
168
555
|
rowSpan: number;
|
|
556
|
+
/**
|
|
557
|
+
* Whether sortable.
|
|
558
|
+
*/
|
|
169
559
|
sortable: boolean;
|
|
560
|
+
/**
|
|
561
|
+
* Whether filterable.
|
|
562
|
+
*/
|
|
170
563
|
filterable: boolean;
|
|
564
|
+
/**
|
|
565
|
+
* Whether filtered.
|
|
566
|
+
*/
|
|
171
567
|
filtered: boolean;
|
|
568
|
+
/**
|
|
569
|
+
* Whether resizable.
|
|
570
|
+
*/
|
|
172
571
|
resizable: boolean;
|
|
572
|
+
/**
|
|
573
|
+
* Sort order exposed in the slot scope.
|
|
574
|
+
*/
|
|
173
575
|
sortOrder?: TableSortOrder;
|
|
576
|
+
/**
|
|
577
|
+
* Whether multiple values are supported.
|
|
578
|
+
*/
|
|
174
579
|
multiple?: boolean;
|
|
580
|
+
/**
|
|
581
|
+
* Whether the item is checked.
|
|
582
|
+
*/
|
|
175
583
|
checked?: CheckedState;
|
|
584
|
+
/**
|
|
585
|
+
* Whether the component is disabled.
|
|
586
|
+
*/
|
|
176
587
|
disabled?: boolean;
|
|
588
|
+
/**
|
|
589
|
+
* Update checked exposed in the slot scope.
|
|
590
|
+
*/
|
|
177
591
|
updateChecked?: (value: CheckedState | null) => void;
|
|
592
|
+
/**
|
|
593
|
+
* Toggle sort exposed in the slot scope.
|
|
594
|
+
*/
|
|
178
595
|
toggleSort: () => void;
|
|
596
|
+
/**
|
|
597
|
+
* Filter value exposed in the slot scope.
|
|
598
|
+
*/
|
|
179
599
|
filterValue: string;
|
|
600
|
+
/**
|
|
601
|
+
* Filter values exposed in the slot scope.
|
|
602
|
+
*/
|
|
180
603
|
filterValues: string[];
|
|
604
|
+
/**
|
|
605
|
+
* Filter state exposed in the slot scope.
|
|
606
|
+
*/
|
|
181
607
|
filterState?: TableFilterValue;
|
|
608
|
+
/**
|
|
609
|
+
* Filter options exposed in the slot scope.
|
|
610
|
+
*/
|
|
182
611
|
filterOptions: TableColumnFilterOption[];
|
|
612
|
+
/**
|
|
613
|
+
* Set filter value exposed in the slot scope.
|
|
614
|
+
*/
|
|
183
615
|
setFilterValue: (value: string) => void;
|
|
616
|
+
/**
|
|
617
|
+
* Set filter values exposed in the slot scope.
|
|
618
|
+
*/
|
|
184
619
|
setFilterValues: (values: string[]) => void;
|
|
620
|
+
/**
|
|
621
|
+
* Set filter state exposed in the slot scope.
|
|
622
|
+
*/
|
|
185
623
|
setFilterState: (value: TableFilterValue | undefined) => void;
|
|
624
|
+
/**
|
|
625
|
+
* Toggle filter option exposed in the slot scope.
|
|
626
|
+
*/
|
|
186
627
|
toggleFilterOption: (value: string) => void;
|
|
628
|
+
/**
|
|
629
|
+
* Whether the filter option is selected.
|
|
630
|
+
*/
|
|
187
631
|
isFilterOptionSelected: (value: string) => boolean;
|
|
632
|
+
/**
|
|
633
|
+
* Clear filter exposed in the slot scope.
|
|
634
|
+
*/
|
|
188
635
|
clearFilter: () => void;
|
|
189
636
|
}
|
|
637
|
+
/**
|
|
638
|
+
* Slot props for the table header selection component.
|
|
639
|
+
*/
|
|
190
640
|
interface TableHeaderSelectionSlotProps<T extends TableBaseData = TableBaseData> {
|
|
641
|
+
/**
|
|
642
|
+
* Column exposed in the slot scope.
|
|
643
|
+
*/
|
|
191
644
|
column: TableColumn<T>;
|
|
645
|
+
/**
|
|
646
|
+
* Whether multiple values are supported.
|
|
647
|
+
*/
|
|
192
648
|
multiple: boolean;
|
|
649
|
+
/**
|
|
650
|
+
* Whether the item is checked.
|
|
651
|
+
*/
|
|
193
652
|
checked: CheckedState;
|
|
653
|
+
/**
|
|
654
|
+
* Whether the component is disabled.
|
|
655
|
+
*/
|
|
194
656
|
disabled: boolean;
|
|
657
|
+
/**
|
|
658
|
+
* Update checked exposed in the slot scope.
|
|
659
|
+
*/
|
|
195
660
|
updateChecked: (value: CheckedState | null) => void;
|
|
196
661
|
}
|
|
662
|
+
/**
|
|
663
|
+
* Slot props for the table header filter component.
|
|
664
|
+
*/
|
|
197
665
|
interface TableHeaderFilterSlotProps<T extends TableBaseData = TableBaseData> extends Pick<TableHeaderSlotProps<T>, 'column' | 'filterValue' | 'filterValues' | 'filterState' | 'filtered' | 'filterOptions' | 'setFilterValue' | 'setFilterValues' | 'setFilterState' | 'toggleFilterOption' | 'isFilterOptionSelected' | 'clearFilter'> {}
|
|
666
|
+
/**
|
|
667
|
+
* Slot props for the table header sort component.
|
|
668
|
+
*/
|
|
198
669
|
interface TableHeaderSortSlotProps<T extends TableBaseData = TableBaseData> {
|
|
670
|
+
/**
|
|
671
|
+
* Aria label exposed in the slot scope.
|
|
672
|
+
*/
|
|
199
673
|
ariaLabel: string;
|
|
674
|
+
/**
|
|
675
|
+
* Column exposed in the slot scope.
|
|
676
|
+
*/
|
|
200
677
|
column: TableColumn<T>;
|
|
678
|
+
/**
|
|
679
|
+
* Sort order exposed in the slot scope.
|
|
680
|
+
*/
|
|
201
681
|
sortOrder?: TableSortOrder;
|
|
682
|
+
/**
|
|
683
|
+
* Toggle sort exposed in the slot scope.
|
|
684
|
+
*/
|
|
202
685
|
toggleSort: () => void;
|
|
203
686
|
}
|
|
687
|
+
/**
|
|
688
|
+
* Slot props for the table header resize component.
|
|
689
|
+
*/
|
|
204
690
|
interface TableHeaderResizeSlotProps<T extends TableBaseData = TableBaseData> {
|
|
691
|
+
/**
|
|
692
|
+
* Column exposed in the slot scope.
|
|
693
|
+
*/
|
|
205
694
|
column: TableColumn<T>;
|
|
695
|
+
/**
|
|
696
|
+
* Whether resizing.
|
|
697
|
+
*/
|
|
206
698
|
resizing: boolean;
|
|
699
|
+
/**
|
|
700
|
+
* Aria label exposed in the slot scope.
|
|
701
|
+
*/
|
|
207
702
|
ariaLabel: string;
|
|
703
|
+
/**
|
|
704
|
+
* Callback invoked when the pointerdown event fires.
|
|
705
|
+
*/
|
|
208
706
|
onPointerdown: (event: PointerEvent) => void;
|
|
707
|
+
/**
|
|
708
|
+
* Callback invoked when the keydown event fires.
|
|
709
|
+
*/
|
|
209
710
|
onKeydown: (event: KeyboardEvent) => void;
|
|
210
711
|
}
|
|
712
|
+
/**
|
|
713
|
+
* Slot props for the table index component.
|
|
714
|
+
*/
|
|
211
715
|
interface TableIndexSlotProps<T extends TableBaseData = TableBaseData> {
|
|
716
|
+
/**
|
|
717
|
+
* Index of the current item.
|
|
718
|
+
*/
|
|
212
719
|
index: number;
|
|
720
|
+
/**
|
|
721
|
+
* Column exposed in the slot scope.
|
|
722
|
+
*/
|
|
213
723
|
column: TableColumn<T>;
|
|
724
|
+
/**
|
|
725
|
+
* Row exposed in the slot scope.
|
|
726
|
+
*/
|
|
214
727
|
row: T;
|
|
728
|
+
/**
|
|
729
|
+
* Level exposed in the slot scope.
|
|
730
|
+
*/
|
|
215
731
|
level: number;
|
|
732
|
+
/**
|
|
733
|
+
* Whether the component has children.
|
|
734
|
+
*/
|
|
216
735
|
hasChildren: boolean;
|
|
217
736
|
}
|
|
737
|
+
/**
|
|
738
|
+
* Slot props for the table cell component.
|
|
739
|
+
*/
|
|
218
740
|
interface TableCellSlotProps<T extends TableBaseData = TableBaseData> {
|
|
741
|
+
/**
|
|
742
|
+
* Index of the current item.
|
|
743
|
+
*/
|
|
219
744
|
index: number;
|
|
745
|
+
/**
|
|
746
|
+
* Column exposed in the slot scope.
|
|
747
|
+
*/
|
|
220
748
|
column: TableColumn<T>;
|
|
749
|
+
/**
|
|
750
|
+
* Row exposed in the slot scope.
|
|
751
|
+
*/
|
|
221
752
|
row: T;
|
|
753
|
+
/**
|
|
754
|
+
* Level exposed in the slot scope.
|
|
755
|
+
*/
|
|
222
756
|
level: number;
|
|
757
|
+
/**
|
|
758
|
+
* Whether the component has children.
|
|
759
|
+
*/
|
|
223
760
|
hasChildren: boolean;
|
|
761
|
+
/**
|
|
762
|
+
* Whether expanded.
|
|
763
|
+
*/
|
|
224
764
|
expanded: boolean;
|
|
765
|
+
/**
|
|
766
|
+
* Toggle expand exposed in the slot scope.
|
|
767
|
+
*/
|
|
225
768
|
toggleExpand: () => void;
|
|
226
769
|
}
|
|
770
|
+
/**
|
|
771
|
+
* Slot props for the table selection component.
|
|
772
|
+
*/
|
|
227
773
|
interface TableSelectionSlotProps<T extends TableBaseData = TableBaseData> extends TableCellSlotProps<T> {
|
|
774
|
+
/**
|
|
775
|
+
* Whether multiple values are supported.
|
|
776
|
+
*/
|
|
228
777
|
multiple: boolean;
|
|
778
|
+
/**
|
|
779
|
+
* Whether the item is checked.
|
|
780
|
+
*/
|
|
229
781
|
checked: boolean;
|
|
782
|
+
/**
|
|
783
|
+
* Aria label exposed in the slot scope.
|
|
784
|
+
*/
|
|
230
785
|
ariaLabel: string;
|
|
786
|
+
/**
|
|
787
|
+
* Toggle select exposed in the slot scope.
|
|
788
|
+
*/
|
|
231
789
|
toggleSelect: () => void;
|
|
232
790
|
}
|
|
791
|
+
/**
|
|
792
|
+
* Slot props for the table expand component.
|
|
793
|
+
*/
|
|
233
794
|
interface TableExpandSlotProps<T extends TableBaseData = TableBaseData> extends TableCellSlotProps<T> {
|
|
795
|
+
/**
|
|
796
|
+
* Aria label exposed in the slot scope.
|
|
797
|
+
*/
|
|
234
798
|
ariaLabel: string;
|
|
235
799
|
}
|
|
800
|
+
/**
|
|
801
|
+
* Slot props for the table tree toggle component.
|
|
802
|
+
*/
|
|
236
803
|
type TableTreeToggleSlotProps<T extends TableBaseData = TableBaseData> = TableExpandSlotProps<T>;
|
|
804
|
+
/**
|
|
805
|
+
* Slot props for the table expanded row component.
|
|
806
|
+
*/
|
|
237
807
|
interface TableExpandedRowSlotProps<T extends TableBaseData = TableBaseData> {
|
|
808
|
+
/**
|
|
809
|
+
* Index of the current item.
|
|
810
|
+
*/
|
|
238
811
|
index: number;
|
|
812
|
+
/**
|
|
813
|
+
* Row exposed in the slot scope.
|
|
814
|
+
*/
|
|
239
815
|
row: T;
|
|
816
|
+
/**
|
|
817
|
+
* Level exposed in the slot scope.
|
|
818
|
+
*/
|
|
240
819
|
level: number;
|
|
820
|
+
/**
|
|
821
|
+
* Whether the component has children.
|
|
822
|
+
*/
|
|
241
823
|
hasChildren: boolean;
|
|
242
824
|
}
|
|
825
|
+
/**
|
|
826
|
+
* Slot props for the table empty component.
|
|
827
|
+
*/
|
|
243
828
|
interface TableEmptySlotProps {
|
|
829
|
+
/**
|
|
830
|
+
* Column size exposed in the slot scope.
|
|
831
|
+
*/
|
|
244
832
|
columnSize: number;
|
|
245
833
|
}
|
|
834
|
+
/**
|
|
835
|
+
* Slot props for the table data cell component.
|
|
836
|
+
*/
|
|
246
837
|
interface TableDataCellSlotProps<T extends TableBaseData = TableBaseData, K extends Path<TableRowValue<T>> = Path<TableRowValue<T>>> extends TableCellSlotProps<T> {
|
|
838
|
+
/**
|
|
839
|
+
* Value associated with the current item.
|
|
840
|
+
*/
|
|
247
841
|
value: PathValue<TableRowValue<T>, K>;
|
|
248
842
|
}
|
|
843
|
+
/**
|
|
844
|
+
* Props for the table compact component.
|
|
845
|
+
*/
|
|
249
846
|
interface TableCompactProps<T extends TableBaseData = TableBaseData, R extends TableUnifiedKey = TableUnifiedKey, M extends boolean = false> extends TableRootProps, TableSelectionProps<R, M> {
|
|
847
|
+
/**
|
|
848
|
+
* Columns.
|
|
849
|
+
*/
|
|
250
850
|
columns: TableColumn<T>[];
|
|
851
|
+
/**
|
|
852
|
+
* Data.
|
|
853
|
+
*/
|
|
251
854
|
data: T[];
|
|
855
|
+
/**
|
|
856
|
+
* Row key.
|
|
857
|
+
*/
|
|
252
858
|
rowKey: (row: T) => R;
|
|
859
|
+
/**
|
|
860
|
+
* Default sort state.
|
|
861
|
+
*/
|
|
253
862
|
defaultSortState?: TableSortState;
|
|
863
|
+
/**
|
|
864
|
+
* Sort state.
|
|
865
|
+
*/
|
|
254
866
|
sortState?: TableSortState;
|
|
867
|
+
/**
|
|
868
|
+
* Default filter state.
|
|
869
|
+
*/
|
|
255
870
|
defaultFilterState?: TableFilterState;
|
|
871
|
+
/**
|
|
872
|
+
* Filter state.
|
|
873
|
+
*/
|
|
256
874
|
filterState?: TableFilterState;
|
|
875
|
+
/**
|
|
876
|
+
* Default column widths.
|
|
877
|
+
*/
|
|
257
878
|
defaultColumnWidths?: TableColumnWidthState;
|
|
879
|
+
/**
|
|
880
|
+
* Column widths.
|
|
881
|
+
*/
|
|
258
882
|
columnWidths?: TableColumnWidthState;
|
|
883
|
+
/**
|
|
884
|
+
* Get children.
|
|
885
|
+
*/
|
|
259
886
|
getChildren?: TableRowChildrenResolver<T>;
|
|
887
|
+
/**
|
|
888
|
+
* Indent width applied to nested items.
|
|
889
|
+
*/
|
|
260
890
|
indent?: number;
|
|
891
|
+
/**
|
|
892
|
+
* Whether virtual.
|
|
893
|
+
*/
|
|
261
894
|
virtual?: boolean;
|
|
895
|
+
/**
|
|
896
|
+
* Height.
|
|
897
|
+
*/
|
|
262
898
|
height?: number | string;
|
|
899
|
+
/**
|
|
900
|
+
* Estimate size.
|
|
901
|
+
*/
|
|
263
902
|
estimateSize?: number | ((index: number, row: T) => number);
|
|
903
|
+
/**
|
|
904
|
+
* Virtualizer options.
|
|
905
|
+
*/
|
|
264
906
|
virtualizerOptions?: VirtualizerOptions;
|
|
907
|
+
/**
|
|
908
|
+
* Default expanded.
|
|
909
|
+
*/
|
|
265
910
|
defaultExpanded?: R[];
|
|
911
|
+
/**
|
|
912
|
+
* Expanded.
|
|
913
|
+
*/
|
|
266
914
|
expanded?: R[];
|
|
915
|
+
/**
|
|
916
|
+
* Whether default expand all.
|
|
917
|
+
*/
|
|
267
918
|
defaultExpandAll?: boolean;
|
|
919
|
+
/**
|
|
920
|
+
* Props forwarded to the content element.
|
|
921
|
+
*/
|
|
268
922
|
contentProps?: TableContentProps;
|
|
923
|
+
/**
|
|
924
|
+
* Props forwarded to the header element.
|
|
925
|
+
*/
|
|
269
926
|
headerProps?: TableHeaderProps;
|
|
927
|
+
/**
|
|
928
|
+
* Props forwarded to the body element.
|
|
929
|
+
*/
|
|
270
930
|
bodyProps?: TableBodyProps;
|
|
931
|
+
/**
|
|
932
|
+
* Props forwarded to the footer element.
|
|
933
|
+
*/
|
|
271
934
|
footerProps?: TableFooterProps;
|
|
935
|
+
/**
|
|
936
|
+
* Props forwarded to the head element.
|
|
937
|
+
*/
|
|
272
938
|
headProps?: TableHeadProps;
|
|
939
|
+
/**
|
|
940
|
+
* Props forwarded to the row element.
|
|
941
|
+
*/
|
|
273
942
|
rowProps?: TableRowProps;
|
|
943
|
+
/**
|
|
944
|
+
* Props forwarded to the cell element.
|
|
945
|
+
*/
|
|
274
946
|
cellProps?: TableCellProps;
|
|
275
947
|
}
|
|
948
|
+
/**
|
|
949
|
+
* Emits for the table compact component.
|
|
950
|
+
*/
|
|
276
951
|
type TableCompactEmits<R extends TableUnifiedKey = TableUnifiedKey, M extends boolean = false> = {
|
|
952
|
+
/**
|
|
953
|
+
* Emitted when the sort state value changes.
|
|
954
|
+
*/
|
|
277
955
|
'update:sortState': [state: TableSortState | undefined];
|
|
956
|
+
/**
|
|
957
|
+
* Emitted when the filter state value changes.
|
|
958
|
+
*/
|
|
278
959
|
'update:filterState': [state: TableFilterState];
|
|
960
|
+
/**
|
|
961
|
+
* Emitted when the column widths value changes.
|
|
962
|
+
*/
|
|
279
963
|
'update:columnWidths': [state: TableColumnWidthState];
|
|
964
|
+
/**
|
|
965
|
+
* Emitted when the expanded state changes.
|
|
966
|
+
*/
|
|
280
967
|
'update:expanded': [expanded: R[]];
|
|
968
|
+
/**
|
|
969
|
+
* Emitted when the selected state changes.
|
|
970
|
+
*/
|
|
281
971
|
'update:selected': [selected: M extends true ? R[] : R | undefined];
|
|
282
972
|
};
|
|
973
|
+
/**
|
|
974
|
+
* Slots for the table compact component.
|
|
975
|
+
*/
|
|
283
976
|
type TableCompactSlots<T extends TableBaseData> = { [K in `header-${Path<TableRowValue<T>>}`]?: (props: TableHeaderSlotProps<T>) => any } & { [K in Path<TableRowValue<T>>]?: (props: TableDataCellSlotProps<T, K>) => any } & {
|
|
977
|
+
/**
|
|
978
|
+
* Custom content for the bottom slot.
|
|
979
|
+
*/
|
|
284
980
|
bottom?: () => any;
|
|
981
|
+
/**
|
|
982
|
+
* Custom content for the header slot.
|
|
983
|
+
*/
|
|
285
984
|
header?: (props: TableHeaderSlotProps<T>) => any;
|
|
985
|
+
/**
|
|
986
|
+
* Custom content for the header index slot.
|
|
987
|
+
*/
|
|
286
988
|
'header-index'?: (props: {
|
|
287
989
|
column: TableColumn<T>;
|
|
288
990
|
}) => any;
|
|
991
|
+
/**
|
|
992
|
+
* Custom content for the header selection slot.
|
|
993
|
+
*/
|
|
289
994
|
'header-selection'?: (props: TableHeaderSelectionSlotProps<T>) => any;
|
|
995
|
+
/**
|
|
996
|
+
* Custom content for the header expand slot.
|
|
997
|
+
*/
|
|
290
998
|
'header-expand'?: (props: {
|
|
291
999
|
column: TableColumn<T>;
|
|
292
1000
|
}) => any;
|
|
1001
|
+
/**
|
|
1002
|
+
* Custom content for the header filter slot.
|
|
1003
|
+
*/
|
|
293
1004
|
'header-filter'?: (props: TableHeaderFilterSlotProps<T>) => any;
|
|
1005
|
+
/**
|
|
1006
|
+
* Custom content for the header sort slot.
|
|
1007
|
+
*/
|
|
294
1008
|
'header-sort'?: (props: TableHeaderSortSlotProps<T>) => any;
|
|
1009
|
+
/**
|
|
1010
|
+
* Custom content for the header resize slot.
|
|
1011
|
+
*/
|
|
295
1012
|
'header-resize'?: (props: TableHeaderResizeSlotProps<T>) => any;
|
|
1013
|
+
/**
|
|
1014
|
+
* Custom content for the index slot.
|
|
1015
|
+
*/
|
|
296
1016
|
index?: (props: TableIndexSlotProps<T>) => any;
|
|
1017
|
+
/**
|
|
1018
|
+
* Custom content for the selection slot.
|
|
1019
|
+
*/
|
|
297
1020
|
selection?: (props: TableSelectionSlotProps<T>) => any;
|
|
1021
|
+
/**
|
|
1022
|
+
* Custom content for the expand slot.
|
|
1023
|
+
*/
|
|
298
1024
|
expand?: (props: TableExpandSlotProps<T>) => any;
|
|
1025
|
+
/**
|
|
1026
|
+
* Custom content for the expanded row slot.
|
|
1027
|
+
*/
|
|
299
1028
|
'expanded-row'?: (props: TableExpandedRowSlotProps<T>) => any;
|
|
1029
|
+
/**
|
|
1030
|
+
* Custom content for the tree toggle slot.
|
|
1031
|
+
*/
|
|
300
1032
|
'tree-toggle'?: (props: TableTreeToggleSlotProps<T>) => any;
|
|
1033
|
+
/**
|
|
1034
|
+
* Custom content for the empty slot.
|
|
1035
|
+
*/
|
|
301
1036
|
empty?: (props: TableEmptySlotProps) => any;
|
|
1037
|
+
/**
|
|
1038
|
+
* Custom content for the footer slot.
|
|
1039
|
+
*/
|
|
302
1040
|
footer?: (props: {
|
|
303
1041
|
columnSize: number;
|
|
304
1042
|
}) => any;
|
|
305
1043
|
};
|
|
1044
|
+
/**
|
|
1045
|
+
* Context for the table compact component.
|
|
1046
|
+
*/
|
|
306
1047
|
interface TableCompactContext extends PropsToContext<TableCompactProps, 'indent' | 'headProps' | 'rowProps' | 'cellProps'> {
|
|
1048
|
+
/**
|
|
1049
|
+
* Reading direction of the component.
|
|
1050
|
+
*/
|
|
307
1051
|
dir: ComputedRef<Direction>;
|
|
1052
|
+
/**
|
|
1053
|
+
* Row key used by the component context.
|
|
1054
|
+
*/
|
|
308
1055
|
rowKey: (row: TableBaseData) => TableUnifiedKey;
|
|
1056
|
+
/**
|
|
1057
|
+
* Expanded used by the component context.
|
|
1058
|
+
*/
|
|
309
1059
|
expanded: ShallowRef<TableUnifiedKey[]>;
|
|
1060
|
+
/**
|
|
1061
|
+
* Sort state used by the component context.
|
|
1062
|
+
*/
|
|
310
1063
|
sortState: ShallowRef<TableSortState | undefined>;
|
|
1064
|
+
/**
|
|
1065
|
+
* Filter state used by the component context.
|
|
1066
|
+
*/
|
|
311
1067
|
filterState: ShallowRef<TableFilterState>;
|
|
1068
|
+
/**
|
|
1069
|
+
* Column widths used by the component context.
|
|
1070
|
+
*/
|
|
312
1071
|
columnWidths: ShallowRef<TableColumnWidthState>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Whether the item is selected.
|
|
1074
|
+
*/
|
|
313
1075
|
selected: ShallowRef<TableUnifiedKey[] | TableUnifiedKey | undefined>;
|
|
1076
|
+
/**
|
|
1077
|
+
* Callback invoked when the selected changes.
|
|
1078
|
+
*/
|
|
314
1079
|
onSelectedChange: (value: TableUnifiedKey) => void;
|
|
1080
|
+
/**
|
|
1081
|
+
* Set selected used by the component context.
|
|
1082
|
+
*/
|
|
315
1083
|
setSelected: (value: TableUnifiedKey[] | TableUnifiedKey | undefined) => void;
|
|
1084
|
+
/**
|
|
1085
|
+
* Reset selected used by the component context.
|
|
1086
|
+
*/
|
|
316
1087
|
resetSelected: () => void;
|
|
1088
|
+
/**
|
|
1089
|
+
* Whether the value is selected.
|
|
1090
|
+
*/
|
|
317
1091
|
isValueSelected: (value: TableUnifiedKey) => boolean;
|
|
1092
|
+
/**
|
|
1093
|
+
* Whether multiple values are supported.
|
|
1094
|
+
*/
|
|
318
1095
|
multiple: ComputedRef<boolean>;
|
|
1096
|
+
/**
|
|
1097
|
+
* Leaf columns used by the component context.
|
|
1098
|
+
*/
|
|
319
1099
|
leafColumns: ComputedRef<TableColumn[]>;
|
|
1100
|
+
/**
|
|
1101
|
+
* Source rows used by the component context.
|
|
1102
|
+
*/
|
|
320
1103
|
sourceRows: ComputedRef<TableBaseData[]>;
|
|
1104
|
+
/**
|
|
1105
|
+
* Whether the component has tree rows.
|
|
1106
|
+
*/
|
|
321
1107
|
hasTreeRows: ComputedRef<boolean>;
|
|
1108
|
+
/**
|
|
1109
|
+
* Tree column key used by the component context.
|
|
1110
|
+
*/
|
|
322
1111
|
treeColumnKey: ComputedRef<string | undefined>;
|
|
1112
|
+
/**
|
|
1113
|
+
* Whether the component has expand column.
|
|
1114
|
+
*/
|
|
323
1115
|
hasExpandColumn: ComputedRef<boolean>;
|
|
1116
|
+
/**
|
|
1117
|
+
* Whether the component has expanded row slot.
|
|
1118
|
+
*/
|
|
324
1119
|
hasExpandedRowSlot: ComputedRef<boolean>;
|
|
1120
|
+
/**
|
|
1121
|
+
* Visible expanded keys used by the component context.
|
|
1122
|
+
*/
|
|
325
1123
|
visibleExpandedKeys: ComputedRef<TableUnifiedKey[]>;
|
|
1124
|
+
/**
|
|
1125
|
+
* Visible row keys used by the component context.
|
|
1126
|
+
*/
|
|
326
1127
|
visibleRowKeys: ComputedRef<TableUnifiedKey[]>;
|
|
1128
|
+
/**
|
|
1129
|
+
* Whether the header selection is disabled.
|
|
1130
|
+
*/
|
|
327
1131
|
isHeaderSelectionDisabled: ComputedRef<boolean>;
|
|
1132
|
+
/**
|
|
1133
|
+
* Header selection used by the component context.
|
|
1134
|
+
*/
|
|
328
1135
|
headerSelection: ComputedRef<CheckedState>;
|
|
1136
|
+
/**
|
|
1137
|
+
* Fixed column states used by the component context.
|
|
1138
|
+
*/
|
|
329
1139
|
fixedColumnStates: ComputedRef<TableFixedColumnOffsets>;
|
|
1140
|
+
/**
|
|
1141
|
+
* Resizing column key used by the component context.
|
|
1142
|
+
*/
|
|
330
1143
|
resizingColumnKey: ShallowRef<string | null>;
|
|
1144
|
+
/**
|
|
1145
|
+
* Measured column widths used by the component context.
|
|
1146
|
+
*/
|
|
331
1147
|
measuredColumnWidths: ShallowRef<Record<string, number>>;
|
|
1148
|
+
/**
|
|
1149
|
+
* Head cell elements used by the component context.
|
|
1150
|
+
*/
|
|
332
1151
|
headCellElements: Record<string, HTMLElement | null>;
|
|
333
1152
|
}
|
|
334
1153
|
//#endregion
|