@fewangsit/wangsvue-fats 1.0.0-alpha.31 → 1.0.0-alpha.32
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/components/animation/Animation.vue.d.ts +24 -0
- package/components/approverinfo/ApproverInfo.vue.d.ts +51 -0
- package/components/assetinfo/AssetInfo.vue.d.ts +34 -0
- package/components/badge/Badge.vue.d.ts +73 -0
- package/components/badgegroup/BadgeGroup.vue.d.ts +52 -0
- package/components/basecomponent/index.d.ts +28 -0
- package/components/basetree/BaseTree.vue.d.ts +591 -0
- package/components/basetree/TreeNode.vue.d.ts +35 -0
- package/components/breadcrumb/Breadcrumb.vue.d.ts +26 -0
- package/components/button/Button.vue.d.ts +188 -0
- package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +35 -0
- package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +104 -0
- package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
- package/components/buttondownload/ButtonDownload.vue.d.ts +49 -0
- package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
- package/components/buttonradio/ButtonRadio.vue.d.ts +257 -0
- package/components/buttonscan/ButtonScan.vue.d.ts +201 -0
- package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +200 -0
- package/components/buttonsplit/ButtonSplit.vue.d.ts +350 -0
- package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
- package/components/buttontoggle/ButtonToggle.vue.d.ts +18 -0
- package/components/buttonviewlog/ButtonViewLog.vue.d.ts +17 -0
- package/components/calendar/Calendar.vue.d.ts +570 -0
- package/components/card/Card.vue.d.ts +139 -0
- package/components/checkbox/Checkbox.vue.d.ts +329 -0
- package/components/customcolumn/CustomColumn.vue.d.ts +37 -0
- package/components/datatable/DataTable.vue.d.ts +735 -0
- package/components/dialog/Dialog.vue.d.ts +464 -0
- package/components/dialogconfirm/DialogConfirm.vue.d.ts +164 -0
- package/components/dialogform/DialogForm.vue.d.ts +349 -0
- package/components/dialogselecttree/DialogSelectTree.vue.d.ts +136 -0
- package/components/dropdown/Dropdown.vue.d.ts +274 -0
- package/components/editor/Editor.vue.d.ts +191 -0
- package/components/fieldwrapper/FieldWrapper.vue.d.ts +69 -0
- package/components/fileupload/FileUpload.vue.d.ts +169 -0
- package/components/filtercontainer/FilterContainer.vue.d.ts +184 -0
- package/components/form/Form.vue.d.ts +316 -0
- package/components/icon/Icon.vue.d.ts +256 -0
- package/components/image/Image.vue.d.ts +403 -0
- package/components/imagecompressor/ImageCompressor.vue.d.ts +229 -0
- package/components/index.d.ts +58 -0
- package/components/inputbadge/InputBadge.vue.d.ts +122 -0
- package/components/inputcurrency/InputCurrency.vue.d.ts +170 -0
- package/components/inputcurrency/helpers/currency.helper.d.ts +8 -0
- package/components/inputemail/InputEmail.vue.d.ts +25 -0
- package/components/inputnumber/InputNumber.vue.d.ts +282 -0
- package/components/inputpassword/InputPassword.vue.d.ts +32 -0
- package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
- package/components/inputrangenumber/InputRangeNumber.vue.d.ts +120 -0
- package/components/inputsearch/InputSearch.vue.d.ts +36 -0
- package/components/inputtext/InputText.vue.d.ts +352 -0
- package/components/inputurl/InputURL.vue.d.ts +39 -0
- package/components/invisiblefield/InvisibleField.vue.d.ts +32 -0
- package/components/languagedropdown/LanguageDropdown.vue.d.ts +32 -0
- package/components/litedropdown/LiteDropdown.vue.d.ts +96 -0
- package/components/loading/Loading.vue.d.ts +47 -0
- package/components/loading/store/loading.store.d.ts +8 -0
- package/components/menu/Menu.vue.d.ts +390 -0
- package/components/menuitem/index.d.ts +106 -0
- package/components/multiselect/MultiSelect.vue.d.ts +194 -0
- package/components/overlaypanel/OverlayPanel.vue.d.ts +301 -0
- package/components/passthrough/index.d.ts +16 -0
- package/components/tabmenu/TabMenu.vue.d.ts +288 -0
- package/components/textarea/Textarea.vue.d.ts +170 -0
- package/components/timeline/Timeline.vue.d.ts +121 -0
- package/components/toast/Toast.vue.d.ts +367 -0
- package/components/toggleswitch/ToggleSwitch.vue.d.ts +281 -0
- package/components/tree/Tree.vue.d.ts +148 -0
- package/components/tree/helpers/filterNodeKeys.helper.d.ts +22 -0
- package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +8 -0
- package/components/treesearchinput/TreeSearchInput.vue.d.ts +16 -0
- package/components/ts-helpers.d.ts +83 -0
- package/components/username/UserName.vue.d.ts +113 -0
- package/components/userwithicon/UserWithIcon.vue.d.ts +20 -0
- package/config/defaultProps.d.ts +3 -0
- package/config/index.d.ts +3 -0
- package/config/locale.d.ts +3 -0
- package/directives/focus.d.ts +1 -1
- package/event-bus/index.d.ts +51 -51
- package/event-bus/mitt.d.ts +29 -14
- package/main.d.ts +31 -0
- package/package.json +8 -4
- package/plugins/WangsVue.d.ts +249 -199
- package/plugins/formValidation.d.ts +15 -6
- package/plugins/i18n-extension.d.ts +4 -0
- package/plugins/i18n.d.ts +82 -78
- package/utils/date.util.d.ts +59 -30
- package/utils/getSeverityByAssetStatus.util.d.ts +3 -0
- package/utils/index.d.ts +8 -0
- package/utils/listenSidebarChanges.util.d.ts +16 -0
- package/utils/object.util.d.ts +14 -3
- package/utils/role.util.d.ts +68 -0
- package/utils/toast.util.d.ts +78 -78
- package/utils/addAttachment.util.d.ts +0 -43
- package/utils/exportToExcel.util.d.ts +0 -20
- package/utils/filterOptions.util.d.ts +0 -3
- package/utils/genPlaceholder.util.d.ts +0 -8
- package/utils/getAttachmentIcon.util.d.ts +0 -8
- package/utils/mergePropsWithDefaults.util.d.ts +0 -20
- package/utils/textFormatter.util.d.ts +0 -17
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Tree is used to display hierarchical data.
|
|
4
|
+
*
|
|
5
|
+
* [Live Demo](https://www.primevue.org/tree/)
|
|
6
|
+
*
|
|
7
|
+
* @module tree
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
import { VNode } from 'vue';
|
|
11
|
+
import { ComponentHooks } from '../basecomponent';
|
|
12
|
+
import { PassThroughOptions } from '../passthrough';
|
|
13
|
+
import {
|
|
14
|
+
ClassComponent,
|
|
15
|
+
GlobalComponentConstructor,
|
|
16
|
+
HintedString,
|
|
17
|
+
PassThrough,
|
|
18
|
+
} from '../ts-helpers';
|
|
19
|
+
import { MenuItem } from '../menuitem';
|
|
20
|
+
|
|
21
|
+
export declare type TreePassThroughOptionType<T = any> =
|
|
22
|
+
| TreePassThroughAttributes
|
|
23
|
+
| ((
|
|
24
|
+
options: TreePassThroughMethodOptions<T>,
|
|
25
|
+
) => TreePassThroughAttributes | string)
|
|
26
|
+
| string
|
|
27
|
+
| null
|
|
28
|
+
| undefined;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Custom TreeNode metadata.
|
|
32
|
+
*/
|
|
33
|
+
export interface TreeNode {
|
|
34
|
+
/**
|
|
35
|
+
* Mandatory unique key of the node.
|
|
36
|
+
*/
|
|
37
|
+
key: string | number;
|
|
38
|
+
/**
|
|
39
|
+
* Label of the node.
|
|
40
|
+
*/
|
|
41
|
+
label?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Data represented by the node.
|
|
44
|
+
*/
|
|
45
|
+
data?: any;
|
|
46
|
+
/**
|
|
47
|
+
* Type of the node to match a template.
|
|
48
|
+
*/
|
|
49
|
+
type?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Icon of the node to display next to content.
|
|
52
|
+
*/
|
|
53
|
+
icon?: string;
|
|
54
|
+
/**
|
|
55
|
+
* An array of treenodes as children.
|
|
56
|
+
*/
|
|
57
|
+
children?: TreeNode[];
|
|
58
|
+
/**
|
|
59
|
+
* Inline style of the node.
|
|
60
|
+
*/
|
|
61
|
+
style?: any;
|
|
62
|
+
/**
|
|
63
|
+
* Style class of the node.
|
|
64
|
+
*/
|
|
65
|
+
styleClass?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Whether the node is selectable when selection mode is enabled.
|
|
68
|
+
* @defaultValue false
|
|
69
|
+
*/
|
|
70
|
+
selectable?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Specifies if the node has children. Used in lazy loading.
|
|
73
|
+
* @defaultValue false
|
|
74
|
+
*/
|
|
75
|
+
leaf?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Specifies the node loading. Used in Tree and TreeTable.
|
|
78
|
+
*/
|
|
79
|
+
loading?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Icon to use in expanded state.
|
|
82
|
+
*/
|
|
83
|
+
expandedIcon?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Icon to use in collapsed state.
|
|
86
|
+
*/
|
|
87
|
+
collapsedIcon?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Optional
|
|
90
|
+
*/
|
|
91
|
+
[key: string]: any;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Custom passthrough(pt) option method.
|
|
96
|
+
*/
|
|
97
|
+
export interface TreePassThroughMethodOptions<T = any> {
|
|
98
|
+
/**
|
|
99
|
+
* Defines instance.
|
|
100
|
+
*/
|
|
101
|
+
instance: any;
|
|
102
|
+
/**
|
|
103
|
+
* Defines valid properties.
|
|
104
|
+
*/
|
|
105
|
+
props: BaseTreeProps;
|
|
106
|
+
/**
|
|
107
|
+
* Defines current inline state.
|
|
108
|
+
*/
|
|
109
|
+
state: TreeState;
|
|
110
|
+
/**
|
|
111
|
+
* Defines parent instance.
|
|
112
|
+
*/
|
|
113
|
+
parent: T;
|
|
114
|
+
/**
|
|
115
|
+
* Defines current options.
|
|
116
|
+
*/
|
|
117
|
+
context: TreeContext;
|
|
118
|
+
/**
|
|
119
|
+
* Defines passthrough(pt) options in global config.
|
|
120
|
+
*/
|
|
121
|
+
global: object | undefined;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Custom expanded keys metadata.
|
|
126
|
+
*/
|
|
127
|
+
export interface TreeExpandedKeys {
|
|
128
|
+
/**
|
|
129
|
+
* Optional
|
|
130
|
+
*/
|
|
131
|
+
[key: string]: any;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Custom selection keys metadata.
|
|
136
|
+
*/
|
|
137
|
+
export interface TreeSelectionKeys {
|
|
138
|
+
/**
|
|
139
|
+
* Optional
|
|
140
|
+
*/
|
|
141
|
+
[key: string]: any;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Custom filter event.
|
|
146
|
+
* @see {@link BaseTreeEmits.filter}
|
|
147
|
+
*/
|
|
148
|
+
export interface TreeFilterEvent {
|
|
149
|
+
/**
|
|
150
|
+
* Original event
|
|
151
|
+
*/
|
|
152
|
+
originalEvent: Event;
|
|
153
|
+
/**
|
|
154
|
+
* Filter value
|
|
155
|
+
*/
|
|
156
|
+
value: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface TreeCheckboxChangeEvent {
|
|
160
|
+
node: TreeNode;
|
|
161
|
+
check: boolean;
|
|
162
|
+
selectionKeys: TreeSelectionKeys;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface TreeNodeClickEvent {
|
|
166
|
+
node: TreeNode;
|
|
167
|
+
nodeTouched: boolean;
|
|
168
|
+
originalEvent: PointerEvent;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Custom passthrough(pt) options.
|
|
173
|
+
* @see {@link TreeProps.pt}
|
|
174
|
+
*/
|
|
175
|
+
export interface TreePassThroughOptions<T = any> {
|
|
176
|
+
/**
|
|
177
|
+
* Used to pass attributes to the root's DOM element.
|
|
178
|
+
*/
|
|
179
|
+
root?: TreePassThroughOptionType<T>;
|
|
180
|
+
/**
|
|
181
|
+
* Used to pass attributes to the filter container's DOM element.
|
|
182
|
+
*/
|
|
183
|
+
filterContainer?: TreePassThroughOptionType<T>;
|
|
184
|
+
/**
|
|
185
|
+
* Used to pass attributes to the input's DOM element.
|
|
186
|
+
*/
|
|
187
|
+
input?: TreePassThroughOptionType<T>;
|
|
188
|
+
/**
|
|
189
|
+
* Used to pass attributes to the search icon's DOM element.
|
|
190
|
+
*/
|
|
191
|
+
searchIcon?: TreePassThroughOptionType<T>;
|
|
192
|
+
/**
|
|
193
|
+
* Used to pass attributes to the wrapper's DOM element.
|
|
194
|
+
*/
|
|
195
|
+
wrapper?: TreePassThroughOptionType<T>;
|
|
196
|
+
/**
|
|
197
|
+
* Used to pass attributes to the container's DOM element.
|
|
198
|
+
*/
|
|
199
|
+
container?: TreePassThroughOptionType<T>;
|
|
200
|
+
/**
|
|
201
|
+
* Used to pass attributes to the node's DOM element.
|
|
202
|
+
*/
|
|
203
|
+
node?: TreePassThroughOptionType<T>;
|
|
204
|
+
/**
|
|
205
|
+
* Used to pass attributes to the content's DOM element.
|
|
206
|
+
*/
|
|
207
|
+
content?: TreePassThroughOptionType<T>;
|
|
208
|
+
/**
|
|
209
|
+
* Used to pass attributes to the toggler's DOM element.
|
|
210
|
+
*/
|
|
211
|
+
toggler?: TreePassThroughOptionType<T>;
|
|
212
|
+
/**
|
|
213
|
+
* Used to pass attributes to the toggler icon's DOM element.
|
|
214
|
+
*/
|
|
215
|
+
togglerIcon?: TreePassThroughOptionType<T>;
|
|
216
|
+
/**
|
|
217
|
+
* Used to pass attributes to the checkbox's DOM element.
|
|
218
|
+
*/
|
|
219
|
+
nodeCheckbox?: TreePassThroughOptionType<T>;
|
|
220
|
+
/**
|
|
221
|
+
* Used to pass attributes to the node icon's DOM element.
|
|
222
|
+
*/
|
|
223
|
+
nodeIcon?: TreePassThroughOptionType<T>;
|
|
224
|
+
/**
|
|
225
|
+
* Used to pass attributes to the label's DOM element.
|
|
226
|
+
*/
|
|
227
|
+
label?: TreePassThroughOptionType<T>;
|
|
228
|
+
/**
|
|
229
|
+
* Used to pass attributes to the subgroup's DOM element.
|
|
230
|
+
*/
|
|
231
|
+
subgroup?: TreePassThroughOptionType<T>;
|
|
232
|
+
/**
|
|
233
|
+
* Used to pass attributes to the loading overlay's DOM element.
|
|
234
|
+
*/
|
|
235
|
+
loadingOverlay?: TreePassThroughOptionType<T>;
|
|
236
|
+
/**
|
|
237
|
+
* Used to pass attributes to the loading icon's DOM element.
|
|
238
|
+
*/
|
|
239
|
+
loadingIcon?: TreePassThroughOptionType<T>;
|
|
240
|
+
/**
|
|
241
|
+
* Used to manage all lifecycle hooks.
|
|
242
|
+
* @see {@link BaseComponent.ComponentHooks}
|
|
243
|
+
*/
|
|
244
|
+
hooks?: ComponentHooks;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Custom passthrough attributes for each DOM elements
|
|
249
|
+
*/
|
|
250
|
+
export interface TreePassThroughAttributes {
|
|
251
|
+
[key: string]: any;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Defines current inline state in Tree component.
|
|
256
|
+
*/
|
|
257
|
+
export interface TreeState {
|
|
258
|
+
/**
|
|
259
|
+
* Current expanded keys state.
|
|
260
|
+
*/
|
|
261
|
+
d_expandedKeys: TreeExpandedKeys;
|
|
262
|
+
/**
|
|
263
|
+
* Current filter value state as a string.
|
|
264
|
+
*/
|
|
265
|
+
filterValue: string;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Defines current options in Tree component.
|
|
270
|
+
*/
|
|
271
|
+
export interface TreeContext {
|
|
272
|
+
/**
|
|
273
|
+
* Index of the node.
|
|
274
|
+
*/
|
|
275
|
+
index: number;
|
|
276
|
+
/**
|
|
277
|
+
* Current expanded state of the node as a boolean.
|
|
278
|
+
* @defaultValue false
|
|
279
|
+
*/
|
|
280
|
+
expanded: boolean;
|
|
281
|
+
/**
|
|
282
|
+
* Current selected state of the node as a boolean.
|
|
283
|
+
* @defaultValue false
|
|
284
|
+
*/
|
|
285
|
+
selected: boolean;
|
|
286
|
+
/**
|
|
287
|
+
* Current checked state of the node as a boolean.
|
|
288
|
+
* @defaultValue false
|
|
289
|
+
*/
|
|
290
|
+
checked: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Current leaf state of the node as a boolean.
|
|
293
|
+
* @defaultValue false
|
|
294
|
+
*/
|
|
295
|
+
leaf: boolean;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Defines valid properties in Tree component.
|
|
300
|
+
*/
|
|
301
|
+
export interface BaseTreeProps {
|
|
302
|
+
disableKeys?: number[];
|
|
303
|
+
disableNodeAll?: boolean;
|
|
304
|
+
exactDisableKeys?: number[];
|
|
305
|
+
level?: number;
|
|
306
|
+
/**
|
|
307
|
+
* List of labels that has no menu option
|
|
308
|
+
*/
|
|
309
|
+
listLabelsNoOption?: string[];
|
|
310
|
+
/**
|
|
311
|
+
* An array of treenodes.
|
|
312
|
+
*/
|
|
313
|
+
value?: TreeNode[] | undefined;
|
|
314
|
+
/**
|
|
315
|
+
* Determines whether the selection state of a node should propagate
|
|
316
|
+
* both upward to its parent node and downward to its child nodes.
|
|
317
|
+
*
|
|
318
|
+
* When enabled:
|
|
319
|
+
* - **Upward Propagation:** The parent node's selection state reflects the combined state
|
|
320
|
+
* of its child nodes:
|
|
321
|
+
* - Fully selected if all children are selected.
|
|
322
|
+
* - Partially selected if some, but not all, children are selected.
|
|
323
|
+
* - Deselected if no children are selected.
|
|
324
|
+
* - **Downward Propagation:** When a node's selection state changes, the same state is
|
|
325
|
+
* applied to all its descendant nodes.
|
|
326
|
+
*/
|
|
327
|
+
propagateSelection?: boolean;
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* A map of keys to represent the expansion state in controlled mode.
|
|
331
|
+
*/
|
|
332
|
+
expandedKeys?: TreeExpandedKeys;
|
|
333
|
+
/**
|
|
334
|
+
* A map of keys to control the selection state.
|
|
335
|
+
*/
|
|
336
|
+
selectionKeys?: TreeSelectionKeys;
|
|
337
|
+
treeNodeMenus?: MenuItem[];
|
|
338
|
+
/**
|
|
339
|
+
* Defines the selection mode.
|
|
340
|
+
*/
|
|
341
|
+
selectionMode?: 'single' | 'multiple' | 'checkbox' | undefined;
|
|
342
|
+
/**
|
|
343
|
+
* Defines how multiple items can be selected, when true metaKey needs to be pressed to select or unselect an item and when set to false selection of each item can be toggled individually.
|
|
344
|
+
* On touch enabled devices, metaKeySelection is turned off automatically.
|
|
345
|
+
* @defaultValue false
|
|
346
|
+
*/
|
|
347
|
+
metaKeySelection?: boolean | undefined;
|
|
348
|
+
/**
|
|
349
|
+
* Whether to display loading indicator.
|
|
350
|
+
* @defaultValue false
|
|
351
|
+
*/
|
|
352
|
+
loading?: boolean | undefined;
|
|
353
|
+
/**
|
|
354
|
+
* Icon to display when tree is loading.
|
|
355
|
+
* @deprecated since v3.27.0. Use 'loadingicon' slot.
|
|
356
|
+
*/
|
|
357
|
+
loadingIcon?: string | undefined;
|
|
358
|
+
/**
|
|
359
|
+
* Loading mode display.
|
|
360
|
+
* @defaultValue mask
|
|
361
|
+
*/
|
|
362
|
+
loadingMode?: 'mask' | 'icon' | undefined;
|
|
363
|
+
/**
|
|
364
|
+
* Filter text to be matched with node.
|
|
365
|
+
*/
|
|
366
|
+
filterText?: string;
|
|
367
|
+
/**
|
|
368
|
+
* When filtering is enabled, filterBy decides which field or fields (comma separated) to search against.
|
|
369
|
+
* @defaultValue label
|
|
370
|
+
*/
|
|
371
|
+
filterBy?: string | undefined;
|
|
372
|
+
/**
|
|
373
|
+
* Mode for filtering.
|
|
374
|
+
* @defaultValue lenient
|
|
375
|
+
*/
|
|
376
|
+
filterMode?: 'lenient' | 'strict' | undefined;
|
|
377
|
+
/**
|
|
378
|
+
* Placeholder text to show when filter input is empty.
|
|
379
|
+
*/
|
|
380
|
+
filterPlaceholder?: string | undefined;
|
|
381
|
+
/**
|
|
382
|
+
* Locale to use in filtering. The default locale is the host environment's current locale.
|
|
383
|
+
*/
|
|
384
|
+
filterLocale?: string | undefined;
|
|
385
|
+
/**
|
|
386
|
+
* Highlights automatically the first item.
|
|
387
|
+
* @defaultValue false
|
|
388
|
+
*/
|
|
389
|
+
highlightOnSelect?: boolean | undefined;
|
|
390
|
+
/**
|
|
391
|
+
* Height of the scroll viewport in fixed units or the 'flex' keyword for a dynamic size.
|
|
392
|
+
*/
|
|
393
|
+
scrollHeight?: HintedString<'flex'> | undefined;
|
|
394
|
+
/**
|
|
395
|
+
* Defines a string value that labels an interactive element.
|
|
396
|
+
*/
|
|
397
|
+
ariaLabel?: string | undefined;
|
|
398
|
+
/**
|
|
399
|
+
* Identifier of the underlying menu element.
|
|
400
|
+
*/
|
|
401
|
+
ariaLabelledby?: string | undefined;
|
|
402
|
+
/**
|
|
403
|
+
* Used to pass attributes to DOM elements inside the component.
|
|
404
|
+
* @type {TreePassThroughOptions}
|
|
405
|
+
*/
|
|
406
|
+
pt?: PassThrough<TreePassThroughOptions>;
|
|
407
|
+
/**
|
|
408
|
+
* Used to configure passthrough(pt) options of the component.
|
|
409
|
+
* @type {PassThroughOptions}
|
|
410
|
+
*/
|
|
411
|
+
ptOptions?: PassThroughOptions;
|
|
412
|
+
/**
|
|
413
|
+
* When enabled, it removes component related styles in the core.
|
|
414
|
+
* @defaultValue false
|
|
415
|
+
*/
|
|
416
|
+
unstyled?: boolean;
|
|
417
|
+
/**
|
|
418
|
+
* To determine whether tree node use option or not
|
|
419
|
+
*
|
|
420
|
+
* @default false
|
|
421
|
+
*/
|
|
422
|
+
useOption?: boolean;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* A function to determine when the node should be disabled,
|
|
426
|
+
* When true, it will disabled selection on current node and all level childrend
|
|
427
|
+
*
|
|
428
|
+
* @return true to disabled
|
|
429
|
+
*/
|
|
430
|
+
disableNodeWhen?: (node: TreeNode) => boolean;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* A function to determine when the node should be disabled
|
|
434
|
+
* It will only disable current node
|
|
435
|
+
*
|
|
436
|
+
* @return true to disabled
|
|
437
|
+
*/
|
|
438
|
+
exactDisableNodeWhen?: (node: TreeNode) => boolean;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* A function to determine when the node should selected
|
|
442
|
+
* It will only disable current node when propagateSelection false
|
|
443
|
+
*
|
|
444
|
+
* @return true to disabled
|
|
445
|
+
*/
|
|
446
|
+
nodeSelectedWhen?: (node: TreeNode) => boolean;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Defines valid slots in Tree component.
|
|
451
|
+
*/
|
|
452
|
+
export interface BaseTreeSlots {
|
|
453
|
+
/**
|
|
454
|
+
* Default content slot.
|
|
455
|
+
*/
|
|
456
|
+
default(scope: {
|
|
457
|
+
/**
|
|
458
|
+
* Tree node instance
|
|
459
|
+
*/
|
|
460
|
+
node: TreeNode;
|
|
461
|
+
}): VNode[];
|
|
462
|
+
/**
|
|
463
|
+
* Custom loading icon template.
|
|
464
|
+
* @param {Object} scope - loadingicon slot's params.
|
|
465
|
+
*/
|
|
466
|
+
loadingicon(scope: {
|
|
467
|
+
/**
|
|
468
|
+
* Style class of the icon.
|
|
469
|
+
*/
|
|
470
|
+
class: string;
|
|
471
|
+
}): VNode[];
|
|
472
|
+
/**
|
|
473
|
+
* Custom search icon template.
|
|
474
|
+
* @param {Object} scope - searchicon slot's params.
|
|
475
|
+
*/
|
|
476
|
+
searchicon(scope: {
|
|
477
|
+
/**
|
|
478
|
+
* Style class of the icon.
|
|
479
|
+
*/
|
|
480
|
+
class: string;
|
|
481
|
+
}): VNode[];
|
|
482
|
+
/**
|
|
483
|
+
* Custom toggler icon template.
|
|
484
|
+
* @param {Object} scope - togglericon slot's params.
|
|
485
|
+
*/
|
|
486
|
+
togglericon(scope: {
|
|
487
|
+
/**
|
|
488
|
+
* Tree node instance
|
|
489
|
+
*/
|
|
490
|
+
node: TreeNode;
|
|
491
|
+
/**
|
|
492
|
+
* Expanded state of the node
|
|
493
|
+
*/
|
|
494
|
+
expanded: boolean;
|
|
495
|
+
}): VNode[];
|
|
496
|
+
/**
|
|
497
|
+
* Custom node icon template.
|
|
498
|
+
* @param {Object} scope - nodeicon slot's params.
|
|
499
|
+
*/
|
|
500
|
+
nodeicon(scope: {
|
|
501
|
+
/**
|
|
502
|
+
* Tree node instance
|
|
503
|
+
*/
|
|
504
|
+
node: TreeNode;
|
|
505
|
+
/**
|
|
506
|
+
* Style class of the icon.
|
|
507
|
+
*/
|
|
508
|
+
class: string;
|
|
509
|
+
}): VNode[];
|
|
510
|
+
/**
|
|
511
|
+
* Custom checkbox icon
|
|
512
|
+
* @param {Object} scope - checkboxicon slot's params.
|
|
513
|
+
*/
|
|
514
|
+
checkboxicon(scope: {
|
|
515
|
+
/**
|
|
516
|
+
* Check state of the node
|
|
517
|
+
*/
|
|
518
|
+
checked: boolean;
|
|
519
|
+
/**
|
|
520
|
+
* Partial check state of the node
|
|
521
|
+
*/
|
|
522
|
+
partialChecked: boolean;
|
|
523
|
+
}): VNode[];
|
|
524
|
+
/**
|
|
525
|
+
* Optional slots.
|
|
526
|
+
* @todo
|
|
527
|
+
*/
|
|
528
|
+
[key: string]: (node: any) => VNode[];
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* Defines valid emits in Tree component.
|
|
533
|
+
*/
|
|
534
|
+
export interface BaseTreeEmits {
|
|
535
|
+
/**
|
|
536
|
+
* Emitted when the expanded keys change.
|
|
537
|
+
* @param {TreeNode} value - New expanded keys.
|
|
538
|
+
*/
|
|
539
|
+
'update:expandedKeys'(value: TreeExpandedKeys): void;
|
|
540
|
+
/**
|
|
541
|
+
* Emitted when the selection keys change.
|
|
542
|
+
* @param {TreeSelectionKeys} value - New selection keys.
|
|
543
|
+
*/
|
|
544
|
+
'update:selectionKeys'(value: TreeSelectionKeys): void;
|
|
545
|
+
/**
|
|
546
|
+
* Callback to invoke when a node is selected.
|
|
547
|
+
* @param {TreeNode} node - Node instance.
|
|
548
|
+
*/
|
|
549
|
+
'node-select'(node: TreeNode): void;
|
|
550
|
+
/**
|
|
551
|
+
* Callback to invoke when a node is unselected.
|
|
552
|
+
* @param {TreeNode} node - Node instance.
|
|
553
|
+
*/
|
|
554
|
+
'node-unselect'(node: TreeNode): void;
|
|
555
|
+
/**
|
|
556
|
+
* Callback to invoke when a node is expanded.
|
|
557
|
+
* @param {TreeNode} node - Node instance.
|
|
558
|
+
*/
|
|
559
|
+
'node-expand'(node: TreeNode): void;
|
|
560
|
+
/**
|
|
561
|
+
* Callback to invoke when a node is collapsed.
|
|
562
|
+
* @param {TreeNode} node - Node instance.
|
|
563
|
+
*/
|
|
564
|
+
'node-collapse'(node: TreeNode): void;
|
|
565
|
+
'toggle-menu': [node: TreeNode];
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* **PrimeVue - Tree**
|
|
570
|
+
*
|
|
571
|
+
* _Tree is used to display hierarchical data._
|
|
572
|
+
*
|
|
573
|
+
* [Live Demo](https://www.primevue.org/tree/)
|
|
574
|
+
* --- ---
|
|
575
|
+
* 
|
|
576
|
+
*
|
|
577
|
+
* @group Component
|
|
578
|
+
*/
|
|
579
|
+
declare class BaseTree extends ClassComponent<
|
|
580
|
+
BaseTreeProps,
|
|
581
|
+
BaseTreeSlots,
|
|
582
|
+
BaseTreeEmits
|
|
583
|
+
> {}
|
|
584
|
+
|
|
585
|
+
declare module 'vue' {
|
|
586
|
+
export interface GlobalComponents {
|
|
587
|
+
BaseTree: GlobalComponentConstructor<BaseTree>;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
export default BaseTree;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BaseTreeProps, TreeNode } from './BaseTree.vue.d';
|
|
2
|
+
|
|
3
|
+
export interface TreeSelectionKeys {
|
|
4
|
+
[key: string]: {
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
partialChecked?: boolean;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface TreeNodeProps extends BaseTreeProps {
|
|
11
|
+
node: TreeNode;
|
|
12
|
+
index?: number;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* List of labels that has no menu option
|
|
16
|
+
*/
|
|
17
|
+
listLabelsNoOption?: string[];
|
|
18
|
+
pt?: any;
|
|
19
|
+
templates?: any;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface TreeNodeEmits {
|
|
23
|
+
nodeToggle: [node: TreeNode];
|
|
24
|
+
nodeClick: [
|
|
25
|
+
data: { originalEvent: Event; nodeTouched: boolean; node: TreeNode },
|
|
26
|
+
];
|
|
27
|
+
checkboxChange: [
|
|
28
|
+
data: {
|
|
29
|
+
node: TreeNode;
|
|
30
|
+
check: boolean;
|
|
31
|
+
selectionKeys: TreeSelectionKeys;
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
toggleMenu: [node: TreeNode];
|
|
35
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
|
|
3
|
+
export type BreadcrumbMenu = {
|
|
4
|
+
name: string;
|
|
5
|
+
route?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export interface BreadcrumbProps {
|
|
10
|
+
/**
|
|
11
|
+
* The list of breadcrumb menu to display.
|
|
12
|
+
*/
|
|
13
|
+
menus: BreadcrumbMenu[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* **WangsVue - Breadcrumb**
|
|
18
|
+
*
|
|
19
|
+
* _Breadcrumb is a component for displaying a breadcrumb trail to help users navigate a website or application.
|
|
20
|
+
* It takes an array of menu items as a prop and displays each item as a link or label, with a separator between them._
|
|
21
|
+
*
|
|
22
|
+
* @group components
|
|
23
|
+
*/
|
|
24
|
+
declare const Breadcrumb: DefineComponent<BreadcrumbProps>;
|
|
25
|
+
|
|
26
|
+
export default Breadcrumb;
|