@fewangsit/wangsvue-fats 1.0.0-alpha.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.
Files changed (148) hide show
  1. package/components/animation/Animation.vue.d.ts +32 -0
  2. package/components/approverinfo/ApproverInfo.vue.d.ts +51 -0
  3. package/components/assetinfo/AssetInfo.vue.d.ts +44 -0
  4. package/components/badge/Badge.vue.d.ts +73 -0
  5. package/components/badgegroup/BadgeGroup.vue.d.ts +54 -0
  6. package/components/basecomponent/index.d.ts +28 -0
  7. package/components/basetree/BaseTree.vue.d.ts +596 -0
  8. package/components/basetree/TreeNode.vue.d.ts +35 -0
  9. package/components/breadcrumb/Breadcrumb.vue.d.ts +26 -0
  10. package/components/button/Button.vue.d.ts +189 -0
  11. package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +35 -0
  12. package/components/buttonaddbyscan/ButtonAddByScan.vue.d.ts +40 -0
  13. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +105 -0
  14. package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
  15. package/components/buttondownload/ButtonDownload.vue.d.ts +80 -0
  16. package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
  17. package/components/buttonradio/ButtonRadio.vue.d.ts +258 -0
  18. package/components/buttonscan/ButtonScan.vue.d.ts +202 -0
  19. package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
  20. package/components/buttonsearchbyscan/ButtonSearchByScan.vue.d.ts +46 -0
  21. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +201 -0
  22. package/components/buttonsplit/ButtonSplit.vue.d.ts +352 -0
  23. package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
  24. package/components/buttontoggle/ButtonToggle.vue.d.ts +19 -0
  25. package/components/buttonviewlog/ButtonViewLog.vue.d.ts +17 -0
  26. package/components/calendar/Calendar.vue.d.ts +598 -0
  27. package/components/card/Card.vue.d.ts +140 -0
  28. package/components/carousel/Carousel.vue.d.ts +28 -0
  29. package/components/checkbox/Checkbox.vue.d.ts +330 -0
  30. package/components/customcolumn/CustomColumn.vue.d.ts +37 -0
  31. package/components/datatable/DataTable.vue.d.ts +745 -0
  32. package/components/datepicker/DatePicker.vue.d.ts +52 -0
  33. package/components/daypicker/DayPicker.vue.d.ts +52 -0
  34. package/components/dialog/Dialog.vue.d.ts +465 -0
  35. package/components/dialogassetnamedetail/DialogAssetNameDetail.vue.d.ts +46 -0
  36. package/components/dialogassetnamedetail/options/columns.d.ts +2 -0
  37. package/components/dialogassetnamedetail/options/filter.d.ts +2 -0
  38. package/components/dialogconfirm/DialogConfirm.vue.d.ts +165 -0
  39. package/components/dialogform/DialogForm.vue.d.ts +350 -0
  40. package/components/dialoglinkedasset/DialogLinkedAsset.vue.d.ts +106 -0
  41. package/components/dialogprintqr/DialogPrintQR.vue.d.ts +18 -0
  42. package/components/dialogreportdamage/DialogReportDamage.vue.d.ts +34 -0
  43. package/components/dialogreportmissing/DialogReportMissing.vue.d.ts +33 -0
  44. package/components/dialogreporttag/DialogReportTag.vue.d.ts +31 -0
  45. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +137 -0
  46. package/components/dialogselectuser/DialogSelectUser.vue.d.ts +102 -0
  47. package/components/dialogselectuser/options/columns.d.ts +3 -0
  48. package/components/dialogtransferlog/DialogTransferLog.vue.d.ts +16 -0
  49. package/components/dropdown/Dropdown.vue.d.ts +288 -0
  50. package/components/editor/Editor.vue.d.ts +192 -0
  51. package/components/fieldwrapper/FieldWrapper.vue.d.ts +86 -0
  52. package/components/fileupload/FileUpload.vue.d.ts +170 -0
  53. package/components/filtercontainer/FilterContainer.vue.d.ts +217 -0
  54. package/components/form/Form.vue.d.ts +319 -0
  55. package/components/icon/Icon.vue.d.ts +260 -0
  56. package/components/image/Image.vue.d.ts +411 -0
  57. package/components/imagecompressor/ImageCompressor.vue.d.ts +237 -0
  58. package/components/index.d.ts +83 -0
  59. package/components/inlinemessage/InlineMessage.vue.d.ts +167 -0
  60. package/components/inputbadge/InputBadge.vue.d.ts +122 -0
  61. package/components/inputcurrency/InputCurrency.vue.d.ts +170 -0
  62. package/components/inputcurrency/helpers/currency.helper.d.ts +8 -0
  63. package/components/inputemail/InputEmail.vue.d.ts +26 -0
  64. package/components/inputnumber/InputNumber.vue.d.ts +288 -0
  65. package/components/inputotp/InputOtp.vue.d.ts +3 -0
  66. package/components/inputpassword/InputPassword.vue.d.ts +33 -0
  67. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
  68. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +121 -0
  69. package/components/inputsearch/InputSearch.vue.d.ts +36 -0
  70. package/components/inputtext/InputText.vue.d.ts +353 -0
  71. package/components/inputurl/InputURL.vue.d.ts +41 -0
  72. package/components/invisiblefield/InvisibleField.vue.d.ts +32 -0
  73. package/components/languagedropdown/LanguageDropdown.vue.d.ts +33 -0
  74. package/components/languageswitcher/LanguageSwitcher.vue.d.ts +15 -0
  75. package/components/litedropdown/LiteDropdown.vue.d.ts +98 -0
  76. package/components/loading/Loading.vue.d.ts +47 -0
  77. package/components/loading/store/loading.store.d.ts +8 -0
  78. package/components/menu/Menu.vue.d.ts +391 -0
  79. package/components/menuitem/index.d.ts +106 -0
  80. package/components/multiselect/MultiSelect.vue.d.ts +195 -0
  81. package/components/overlaypanel/OverlayPanel.vue.d.ts +302 -0
  82. package/components/paginator/Paginator.vue.d.ts +285 -0
  83. package/components/passthrough/index.d.ts +16 -0
  84. package/components/steps/Steps.vue.d.ts +20 -0
  85. package/components/tabmenu/TabMenu.vue.d.ts +104 -0
  86. package/components/tagtype/TagType.vue.d.ts +26 -0
  87. package/components/textarea/Textarea.vue.d.ts +171 -0
  88. package/components/timeline/Timeline.vue.d.ts +140 -0
  89. package/components/toast/Toast.vue.d.ts +368 -0
  90. package/components/toggleswitch/ToggleSwitch.vue.d.ts +282 -0
  91. package/components/transactionroles/TransactionRoles.vue.d.ts +58 -0
  92. package/components/tree/Tree.vue.d.ts +151 -0
  93. package/components/tree/helpers/filterNodeKeys.helper.d.ts +22 -0
  94. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +8 -0
  95. package/components/treesearchinput/TreeSearchInput.vue.d.ts +16 -0
  96. package/components/ts-helpers.d.ts +91 -0
  97. package/components/username/UserName.vue.d.ts +123 -0
  98. package/components/userwithicon/UserWithIcon.vue.d.ts +21 -0
  99. package/components/validatormessage/ValidatorMessage.vue.d.ts +12 -0
  100. package/config/defaultProps.d.ts +3 -0
  101. package/config/index.d.ts +3 -0
  102. package/config/locale.d.ts +3 -0
  103. package/directives/focus.d.ts +7 -0
  104. package/directives/index.d.ts +1 -0
  105. package/event-bus/index.d.ts +66 -0
  106. package/event-bus/mitt.d.ts +41 -0
  107. package/loading-page-BrQattYE.js +1 -0
  108. package/loading-page-CgfbWppy.js +1 -0
  109. package/loading-page-CoC9UhfC.js +4 -0
  110. package/loading-page-CoXtqoc9.js +4 -0
  111. package/loading-page-DbLuqCHa.js +1 -0
  112. package/loading-page-f8D03l3G.js +4 -0
  113. package/loading-plane-CgfbWppy.js +1 -0
  114. package/loading-plane-CoXtqoc9.js +4 -0
  115. package/loading-table-Bdr9ZhtP.js +1 -0
  116. package/loading-table-ByUoWqUo.js +4 -0
  117. package/loading-table-BygEMzFM.js +4 -0
  118. package/loading-table-BzrSQlA0.js +1 -0
  119. package/loading-table-D9bw9OcI.js +4 -0
  120. package/loading-table-chOgXi94.js +1 -0
  121. package/main.d.ts +34 -0
  122. package/no-data-CTKux8RI.js +4 -0
  123. package/no-data-Cgze_Rvp.js +1 -0
  124. package/no-data-DLHO1L_u.js +4 -0
  125. package/no-data-Dep79CBh.js +1 -0
  126. package/no-data-g0dJCy2p.js +4 -0
  127. package/no-data-y1X5WtcQ.js +1 -0
  128. package/package.json +27 -0
  129. package/plugins/VueHtmlToPaper.d.ts +11 -0
  130. package/plugins/WangsVue.d.ts +311 -0
  131. package/plugins/formValidation.d.ts +20 -0
  132. package/plugins/i18n-extension.d.ts +4 -0
  133. package/plugins/i18n.d.ts +103 -0
  134. package/stats.html +4949 -0
  135. package/style.css +1 -0
  136. package/utils/date.util.d.ts +79 -0
  137. package/utils/exportToExcel.util.d.ts +27 -0
  138. package/utils/formatTagCode.util.d.ts +1 -0
  139. package/utils/getStatusSeverity.util.d.ts +33 -0
  140. package/utils/index.d.ts +9 -0
  141. package/utils/isBasic.util.d.ts +1 -0
  142. package/utils/listenSidebarChanges.util.d.ts +16 -0
  143. package/utils/object.util.d.ts +27 -0
  144. package/utils/role.util.d.ts +70 -0
  145. package/utils/toast.util.d.ts +120 -0
  146. package/utils/xlsx.util.d.ts +19 -0
  147. package/wangsvue-fats.js +57238 -0
  148. package/wangsvue-fats.system.js +427 -0
@@ -0,0 +1,282 @@
1
+ /**
2
+ *
3
+ * ToggleSwitch is used to select a boolean value.
4
+ *
5
+ * @module ToggleSwitch
6
+ *
7
+ */
8
+ import { StyleValue } from 'vue';
9
+
10
+ import { ComponentHooks } from '../basecomponent';
11
+ import { PassThroughOptions } from '../passthrough';
12
+ import {
13
+ ClassComponent,
14
+ GlobalComponentConstructor,
15
+ PassThrough,
16
+ } from '../ts-helpers';
17
+
18
+ export declare type ToggleSwitchPassThroughOptionType =
19
+ | ToggleSwitchPassThroughAttributes
20
+ | ((
21
+ options: ToggleSwitchPassThroughMethodOptions,
22
+ ) => ToggleSwitchPassThroughAttributes | string)
23
+ | string
24
+ | null
25
+ | undefined;
26
+
27
+ /**
28
+ * Custom passthrough(pt) option method.
29
+ */
30
+ export interface ToggleSwitchPassThroughMethodOptions {
31
+ /**
32
+ * Defines instance.
33
+ */
34
+ instance: any;
35
+
36
+ /**
37
+ * Defines valid properties.
38
+ */
39
+ props: ToggleSwitchProps;
40
+
41
+ /**
42
+ * Defines current options.
43
+ */
44
+ context: ToggleSwitchContext;
45
+
46
+ /**
47
+ * Defines valid attributes.
48
+ */
49
+ attrs: any;
50
+
51
+ /**
52
+ * Defines parent options.
53
+ */
54
+ parent: any;
55
+
56
+ /**
57
+ * Defines passthrough(pt) options in global config.
58
+ */
59
+ global: object | undefined;
60
+ }
61
+
62
+ /**
63
+ * Custom passthrough(pt) options.
64
+ * @see {@link ToggleSwitchProps.pt}
65
+ */
66
+ export interface ToggleSwitchPassThroughOptions {
67
+ /**
68
+ * Used to pass attributes to the root's DOM element.
69
+ */
70
+ root?: ToggleSwitchPassThroughOptionType;
71
+
72
+ /**
73
+ * Used to pass attributes to the input's DOM element.
74
+ */
75
+ input?: ToggleSwitchPassThroughOptionType;
76
+
77
+ /**
78
+ * Used to pass attributes to the slider's DOM element.
79
+ */
80
+ slider?: ToggleSwitchPassThroughOptionType;
81
+
82
+ /**
83
+ * Used to manage all lifecycle hooks.
84
+ * @see {@link BaseComponent.ComponentHooks}
85
+ */
86
+ hooks?: ComponentHooks;
87
+ }
88
+
89
+ /**
90
+ * Custom passthrough attributes for each DOM elements
91
+ */
92
+ export interface ToggleSwitchPassThroughAttributes {
93
+ [key: string]: any;
94
+ }
95
+
96
+ /**
97
+ * Defines valid properties in ToggleSwitch component.
98
+ */
99
+ export interface ToggleSwitchProps {
100
+ /**
101
+ * Enables triple state mode where the value can be 'null', 'true', or 'false'.
102
+ *
103
+ * - null: not checked
104
+ * - true: checked
105
+ * - false: partially checked
106
+ *
107
+ * @defaultValue false
108
+ */
109
+ triState?: boolean;
110
+
111
+ /**
112
+ * Specifies whether a ToggleSwitch should be checked or not.
113
+ * @defaultValue false - when tristate = false
114
+ * @defaultValue null - when tristate = true
115
+ */
116
+ modelValue?: boolean | string | null | undefined;
117
+
118
+ /**
119
+ * Value in checked state.
120
+ * @defaultValue true
121
+ */
122
+ trueValue?: any;
123
+
124
+ /**
125
+ * Value in unchecked state.
126
+ * @defaultValue false
127
+ */
128
+ falseValue?: any;
129
+
130
+ /**
131
+ * A string that defines the name of the input field.
132
+ */
133
+ label?: string;
134
+
135
+ /**
136
+ * Tooltip info about the checkbox.
137
+ */
138
+ tooltip?: string;
139
+ /**
140
+ * Tooltip position.
141
+ *
142
+ * @default 'top'
143
+ */
144
+ tooltipPos?: 'top' | 'right' | 'left' | 'bottom';
145
+
146
+ /**
147
+ * When present, it specifies that the component should have invalid state style.
148
+ * @defaultValue false
149
+ */
150
+ invalid?: boolean | undefined;
151
+
152
+ /**
153
+ * When present, it specifies that the component should be disabled.
154
+ * @defaultValue false
155
+ */
156
+ disabled?: boolean | undefined;
157
+
158
+ /**
159
+ * When present, it specifies that an input field is read-only.
160
+ * @default false
161
+ */
162
+ readonly?: boolean | undefined;
163
+
164
+ /**
165
+ * Index of the element in tabbing order.
166
+ */
167
+ tabindex?: number | undefined;
168
+
169
+ /**
170
+ * Identifier of the underlying input element.
171
+ */
172
+ inputId?: string | undefined;
173
+
174
+ /**
175
+ * Style class of the input field.
176
+ */
177
+ inputClass?: string | object | undefined;
178
+
179
+ /**
180
+ * Inline style of the input field.
181
+ */
182
+ inputStyle?: StyleValue | undefined;
183
+
184
+ /**
185
+ * Establishes relationships between the component and label(s) where its value should be one or more element IDs.
186
+ */
187
+ ariaLabelledby?: string | undefined;
188
+
189
+ /**
190
+ * Establishes a string value that labels the component.
191
+ */
192
+ ariaLabel?: string | undefined;
193
+
194
+ /**
195
+ * Used to pass attributes to DOM elements inside the component.
196
+ * @type {ToggleSwitchPassThroughOptions}
197
+ */
198
+ pt?: PassThrough<ToggleSwitchPassThroughOptions>;
199
+
200
+ /**
201
+ * Used to configure passthrough(pt) options of the component.
202
+ * @type {PassThroughOptions}
203
+ */
204
+ ptOptions?: PassThroughOptions;
205
+
206
+ /**
207
+ * When enabled, it removes component related styles in the core.
208
+ * @defaultValue false
209
+ */
210
+ unstyled?: boolean;
211
+ }
212
+
213
+ /**
214
+ * Defines current options in ToggleSwitch component.
215
+ */
216
+ export interface ToggleSwitchContext {
217
+ /**
218
+ * Current checked state of the item as a boolean.
219
+ * @defaultValue false
220
+ */
221
+ checked: boolean;
222
+
223
+ /**
224
+ * Current disabled state of the item as a boolean.
225
+ * @defaultValue false
226
+ */
227
+ disabled: boolean;
228
+ }
229
+ /**
230
+ * Defines valid emits in ToggleSwitch component.
231
+ */
232
+ export type ToggleSwitchEmits = {
233
+ /**
234
+ * Emitted when the value changes.
235
+ * @param {boolean} value - New value.
236
+ */
237
+ 'update:modelValue': [value: boolean];
238
+
239
+ /**
240
+ * Callback to invoke on value change.
241
+ * @param {Event} event - Browser event.
242
+ */
243
+ 'change': [event: Event];
244
+
245
+ /**
246
+ * Callback to invoke when the component receives focus.
247
+ * @param {Event} event - Browser event.
248
+ */
249
+ 'focus': [event: Event];
250
+
251
+ /**
252
+ * Callback to invoke when the component loses focus.
253
+ * @param {Event} event - Browser event.
254
+ */
255
+ 'blur': [event: Event];
256
+ };
257
+
258
+ /**
259
+ * **PrimeVue - ToggleSwitch**
260
+ *
261
+ * _ToggleSwitch is used to select a boolean value._
262
+ *
263
+ * [Live Demo](https://fewangsit.github.io/wangsvue/toggle)
264
+ * --- ---
265
+ * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
266
+ *
267
+ * @group Component
268
+ *
269
+ */
270
+ declare class ToggleSwitch extends ClassComponent<
271
+ ToggleSwitchProps,
272
+ unknown,
273
+ ToggleSwitchEmits
274
+ > {}
275
+
276
+ declare module 'vue' {
277
+ export interface GlobalComponents {
278
+ ToggleSwitch: GlobalComponentConstructor<ToggleSwitch>;
279
+ }
280
+ }
281
+
282
+ export default ToggleSwitch;
@@ -0,0 +1,58 @@
1
+ import { DefineComponent } from 'vue';
2
+
3
+ export type TransactionRoles = Addon & {
4
+ borrowing: boolean;
5
+ assignment: boolean;
6
+ transfer: boolean;
7
+ disposal: boolean;
8
+ };
9
+
10
+ export type Addon = {
11
+ repairTicketing: boolean;
12
+ maintenance: boolean;
13
+ tracking: boolean;
14
+ audit: boolean;
15
+ assetControl: boolean;
16
+ };
17
+
18
+ type LicenseStatus = 'Managed' | 'Unmanaged' | null;
19
+
20
+ export type LicenseStatuses = {
21
+ fixedAsset: LicenseStatus;
22
+ repairTicketing: LicenseStatus;
23
+ maintenance: LicenseStatus;
24
+ tracking: LicenseStatus;
25
+ audit: LicenseStatus;
26
+ assetControl: LicenseStatus;
27
+ };
28
+
29
+ export type RoleData = {
30
+ [key: string]: unknown;
31
+ transactionRoles?: TransactionRoles;
32
+ addOn?: Addon;
33
+ transactions?: TransactionRoles; // For Policy Assets
34
+ licenseStatuses?: LicenseStatuses;
35
+ };
36
+
37
+ export interface TransactionRolesProps {
38
+ asset?: RoleData;
39
+ user?: Omit<RoleData, 'addon'>;
40
+ /**
41
+ * @default transaction
42
+ */
43
+ type?: 'transaction' | 'addon' | 'transaction-policy';
44
+ }
45
+
46
+ /**
47
+ * **TSVue V2 - TransactionRoles**
48
+ *
49
+ * _TransactionRoles is a component to show list of transaction role._
50
+ *
51
+ * --- ---
52
+ * ![TSVue](https://ik.imagekit.io/kurniadev/TS-HEAD-BLACK.png)
53
+ *
54
+ * @group buttons
55
+ */
56
+ declare const TransactionRoles: DefineComponent<TransactionRolesProps>;
57
+
58
+ export default TransactionRoles;
@@ -0,0 +1,151 @@
1
+ import { Slot } from 'vue';
2
+
3
+ import { MenuItem } from '../../components/menuitem';
4
+
5
+ import { BaseTreeProps, TreeNode } from '../basetree/BaseTree.vue.d';
6
+ import { QueryParams, ShortFetchResponse } from '../datatable/DataTable.vue.d';
7
+ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
8
+
9
+ import { TreeSelectionKeys } from 'primevue/tree';
10
+
11
+ export interface TreeProps extends BaseTreeProps {
12
+ /**
13
+ * Keyword to filter the Tree by name/label.
14
+ */
15
+ filter: string;
16
+ type: 'group' | 'category';
17
+ fetchTree?: (
18
+ type: 'group' | 'category',
19
+ params?: QueryParams,
20
+ ) => Promise<ShortFetchResponse<TreeNode> | undefined>;
21
+ params?: QueryParams;
22
+ selectedKeys?: TreeSelectionKeys | number[] | undefined;
23
+ selectedTreeNodes?: TreeNode[] | undefined;
24
+ selectionMode?: 'single' | 'checkbox' | undefined;
25
+ /**
26
+ * Wether show node button action or not.
27
+ *
28
+ * @default false;
29
+ */
30
+ useOption?: boolean;
31
+ /**
32
+ * List of labels that has no menu option
33
+ */
34
+ listLabelsNoOption?: string[];
35
+ treeNodeMenus?: MenuItem[];
36
+ /**
37
+ * Specify wether the all tree node should be auto checked once it rendered.
38
+ * @default false
39
+ */
40
+ autoSelectAll?: boolean;
41
+ selectLastNode?: boolean;
42
+ /**
43
+ * Disable node 'All' selection
44
+ */
45
+ disableNodeAll?: boolean;
46
+ /**
47
+ * Include node All key (-1) on Checkbox Selection
48
+ *
49
+ * @default false - (-1) is excluded
50
+ */
51
+ includeNodeAllKey?: boolean;
52
+ /**
53
+ * A list of node keys that should be disabled along with their children.
54
+ */
55
+ disableKeys?: number[];
56
+ /**
57
+ * A list of node keys that should be disabled, affecting only the specified nodes and not their children.
58
+ */
59
+ exactDisableKeys?: number[];
60
+ /**
61
+ * Defines the tree is readonly and disabled.
62
+ */
63
+ readonly?: boolean;
64
+ /**
65
+ * Defines the tree to select disposable group only.
66
+ */
67
+ selectDisposableOnly?: boolean;
68
+ /**
69
+ * Defines the tree to be flattened and shows disposable only
70
+ */
71
+ flattenDisposableNode?: boolean;
72
+ /**
73
+ * Defines the group tree to disable excluded keys
74
+ */
75
+ excludedKeys?: number[];
76
+ /**
77
+ * Will emit update selection when value is `true`
78
+ *
79
+ * @default false - to prevent auto emit in every possible unhandled way
80
+ */
81
+ shouldEmitEventOnChange?: boolean;
82
+ }
83
+
84
+ export type TreeEmits = {
85
+ 'update:selectedKeys': [keys: TreeSelectionKeys];
86
+ 'update:selectedTreeNodes': [nodes: TreeNode[] | undefined];
87
+ 'nodeSelect': [node: TreeNode];
88
+ 'nodeUnselect': [node: TreeNode];
89
+ 'toggleMenu': [node: TreeNode];
90
+ };
91
+
92
+ export interface TreeSlots {
93
+ default: Slot<{ node: TreeNode; checked: boolean; disabled: boolean }>;
94
+ }
95
+
96
+ /**
97
+ * **TSVue v2 - Tree**
98
+ *
99
+ * _Tree is used to display hierarchical data._
100
+ *
101
+ * --- ---
102
+ * ![TSVue](https://ik.imagekit.io/kurniadev/TS-HEAD-BLACK.png)
103
+ *
104
+ * @group Component
105
+ */
106
+ declare class Tree extends ClassComponent<TreeProps, TreeSlots, TreeEmits> {
107
+ /**
108
+ * The Tree Node array.
109
+ */
110
+ treeNodes: TreeNode[];
111
+ /**
112
+ * The Flat Tree Node array.
113
+ */
114
+ flatNodes: TreeNode[];
115
+ /**
116
+ * Tree Nodes loading state.
117
+ */
118
+ isLoading: boolean;
119
+ /**
120
+ * Show disposable group icon.
121
+ */
122
+ showDisposableGroups: boolean;
123
+ /**
124
+ * State where all tree node expanded.
125
+ */
126
+ isExpandedAll: boolean;
127
+ /**
128
+ * Method to collapse all node.
129
+ */
130
+ collapseAll: () => void;
131
+ /**
132
+ * Method to expand all node.
133
+ */
134
+ expandAll: () => void;
135
+ /**
136
+ * Expand the All node to show all Parent Group
137
+ */
138
+ expandNodeAll: () => void;
139
+ /**
140
+ * Trigger fetch tree list
141
+ */
142
+ fetchTreeList: () => void;
143
+ }
144
+
145
+ declare module '@vue/runtime-core' {
146
+ interface GlobalComponents {
147
+ Tree: GlobalComponentConstructor<Tree>;
148
+ }
149
+ }
150
+
151
+ export default Tree;
@@ -0,0 +1,22 @@
1
+ import { TreeSelectionKeys } from 'primevue/tree';
2
+ /**
3
+ * Parse selection keys into array of keys.
4
+ *
5
+ * @param nodeKeys - A collection of selected node keys.
6
+ * @param includeNodeAllKey - Whether to include the "-1" key (representing "All").
7
+ */
8
+ export declare const parseNodeKeys: (
9
+ nodeKeys: TreeSelectionKeys,
10
+ includeNodeAllKey?: boolean,
11
+ ) => number[];
12
+ /**
13
+ * Filters a collection of selected node keys based on specific criteria.
14
+ *
15
+ * @param nodeKeys - A collection of selected node keys.
16
+ * @param includeNodeAllKey - Whether to include the "-1" key (representing "All").
17
+ * @returns A new collection of filtered node keys.
18
+ */
19
+ export declare const filterNodeKeys: (
20
+ nodeKeys: TreeSelectionKeys,
21
+ includeNodeAllKey?: boolean,
22
+ ) => TreeSelectionKeys;
@@ -0,0 +1,8 @@
1
+ import { TreeNode } from '../../basetree/BaseTree.vue.d';
2
+ /**
3
+ * Covert deeply nested tree node into one level array.
4
+ */
5
+ declare const flattenTreeNodeChildren: (
6
+ nodes: TreeNode[] | undefined,
7
+ ) => TreeNode[];
8
+ export default flattenTreeNodeChildren;
@@ -0,0 +1,16 @@
1
+ import { DefineComponent } from 'vue';
2
+
3
+ export type TreeSearchInputProps = {
4
+ modelValue?: string;
5
+ };
6
+
7
+ export type TreeSearchInputEmits = {
8
+ 'update:modelValue': [payload: string];
9
+ };
10
+
11
+ declare const TreeSearchInput: DefineComponent<
12
+ TreeSearchInputProps,
13
+ TreeSearchInputEmits
14
+ >;
15
+
16
+ export default TreeSearchInput;
@@ -0,0 +1,91 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import {
3
+ AllowedComponentProps,
4
+ ComponentCustomProps,
5
+ ObjectEmitsOptions,
6
+ VNode,
7
+ VNodeProps,
8
+ } from 'vue';
9
+
10
+ declare type PublicProps = VNodeProps &
11
+ AllowedComponentProps &
12
+ ComponentCustomProps;
13
+
14
+ declare type UnionToIntersection<U> = (
15
+ U extends any ? (k: U) => void : never
16
+ ) extends (k: infer I) => void
17
+ ? I
18
+ : never;
19
+
20
+ declare type EmitFn<
21
+ Options = ObjectEmitsOptions,
22
+ Event extends keyof Options = keyof Options,
23
+ > =
24
+ Options extends Array<infer V>
25
+ ? (event: V, ...args: any[]) => void
26
+ : object extends Options
27
+ ? (event: string, ...args: any[]) => void
28
+ : UnionToIntersection<
29
+ {
30
+ [key in Event]: Options[key] extends (...args: infer Args) => any
31
+ ? (event: key, ...args: Args) => void
32
+ : (event: key, ...args: any[]) => void;
33
+ }[Event]
34
+ >;
35
+
36
+ export class ClassComponent<Props, Slots, Emits> {
37
+ $props: Props & PublicProps;
38
+ $slots: Slots;
39
+ $emit: EmitFn<Emits>;
40
+ }
41
+
42
+ export type GlobalComponentConstructor<T> = {
43
+ new (): T;
44
+ };
45
+
46
+ /**
47
+ * Custom types
48
+ */
49
+ export declare type Booleanish = boolean | 'true' | 'false';
50
+
51
+ export declare type Numberish = number | string;
52
+
53
+ export declare type Nullable<T = void> = T | null | undefined;
54
+
55
+ export declare type PassThrough<T = void> = T | object | undefined;
56
+ export declare type Preset<T = void> = T | object | undefined;
57
+
58
+ export declare type DefaultPassThrough<T = void> =
59
+ | T
60
+ | ((instance?: VNode) => T | undefined)
61
+ | undefined;
62
+
63
+ export declare type HintedString<T extends string> = (string & {}) | T;
64
+
65
+ export declare type PresetAttributes = {
66
+ class?: any;
67
+ style?: any;
68
+ [key: string]: any;
69
+ };
70
+
71
+ export declare type PresetMethodOptions = {
72
+ instance: any;
73
+ props: any;
74
+ state: any;
75
+ context: any;
76
+ attrs: any;
77
+ parent: any;
78
+ global: object | undefined;
79
+ };
80
+
81
+ export declare type PresetOptionMethodType<Opt = PresetMethodOptions> = (
82
+ options: Partial<Opt>,
83
+ ) => PresetAttributes;
84
+
85
+ export type StringKeyOf<T> = Extract<keyof T, string>;
86
+
87
+ declare const TypeException: unique symbol;
88
+
89
+ export type TypeError<T extends string> = {
90
+ [TypeException]: T;
91
+ };