@fewangsit/wangsvue-fats 1.0.0-alpha.22 → 1.0.0-alpha.24

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 (134) hide show
  1. package/components/animation/Animation.vue.d.ts +24 -0
  2. package/components/approverinfo/ApproverInfo.vue.d.ts +51 -0
  3. package/components/assetinfo/AssetInfo.vue.d.ts +31 -0
  4. package/components/badge/Badge.vue.d.ts +73 -0
  5. package/components/badgegroup/BadgeGroup.vue.d.ts +52 -0
  6. package/components/basecomponent/index.d.ts +28 -0
  7. package/components/basetree/BaseTree.vue.d.ts +591 -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 +193 -0
  11. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +104 -0
  12. package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
  13. package/components/buttondownload/ButtonDownload.vue.d.ts +49 -0
  14. package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
  15. package/components/buttonradio/ButtonRadio.vue.d.ts +257 -0
  16. package/components/buttonscan/ButtonScan.vue.d.ts +201 -0
  17. package/components/buttonscan/helpers/getErrorCode.helper.d.ts +3 -0
  18. package/components/buttonscan/helpers/index.d.ts +1 -0
  19. package/components/buttonscan/workers/scanner.worker.d.ts +1 -0
  20. package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
  21. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +200 -0
  22. package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
  23. package/components/buttontoggle/ButtonToggle.vue.d.ts +18 -0
  24. package/components/buttonviewlog/ButtonViewLog.vue.d.ts +17 -0
  25. package/components/calendar/BaseCalendar.vue.d.ts +127 -0
  26. package/components/calendar/Calendar.vue.d.ts +570 -0
  27. package/components/card/Card.vue.d.ts +139 -0
  28. package/components/checkbox/Checkbox.vue.d.ts +329 -0
  29. package/components/customcolumn/ColumnList.vue.d.ts +47 -0
  30. package/components/customcolumn/CustomColumn.vue.d.ts +37 -0
  31. package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +16 -0
  32. package/components/datatable/DataTable.vue.d.ts +735 -0
  33. package/components/datatable/MultiRow.vue.d.ts +36 -0
  34. package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +1 -0
  35. package/components/datatable/helpers/filter.helper.d.ts +38 -0
  36. package/components/datatable/helpers/index.d.ts +6 -0
  37. package/components/datatable/helpers/readConfig.helper.d.ts +5 -0
  38. package/components/datatable/store/dataTable.store.d.ts +25 -0
  39. package/components/dialog/Dialog.vue.d.ts +464 -0
  40. package/components/dialogconfirm/DialogConfirm.vue.d.ts +164 -0
  41. package/components/dialogform/DialogForm.vue.d.ts +349 -0
  42. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +136 -0
  43. package/components/dropdown/Dropdown.vue.d.ts +274 -0
  44. package/components/editor/CodeSnippetAdapter.vue.d.ts +152 -0
  45. package/components/editor/Editor.vue.d.ts +191 -0
  46. package/components/editor/EditorButton.vue.d.ts +35 -0
  47. package/components/editor/MentionList.vue.d.ts +49 -0
  48. package/components/editor/MentionSection.vue.d.ts +152 -0
  49. package/components/editor/codeSnippetExtension.d.ts +3 -0
  50. package/components/editor/mentionSectionExtension.d.ts +3 -0
  51. package/components/editor/suggestion.d.ts +2 -0
  52. package/components/fieldwrapper/FieldWrapper.vue.d.ts +69 -0
  53. package/components/fileupload/FileUpload.vue.d.ts +169 -0
  54. package/components/filtercontainer/FilterContainer.vue.d.ts +181 -0
  55. package/components/filtercontainer/helpers/applyFilter.helper.d.ts +14 -0
  56. package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +7 -0
  57. package/components/filtercontainer/helpers/getOption.helper.d.ts +12 -0
  58. package/components/form/Form.vue.d.ts +316 -0
  59. package/components/icon/Icon.vue.d.ts +256 -0
  60. package/components/image/Image.vue.d.ts +403 -0
  61. package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +59 -0
  62. package/components/imagecompressor/ImageCompressor.vue.d.ts +229 -0
  63. package/components/imagecompressor/ImageInputInfo.vue.d.ts +55 -0
  64. package/components/index.d.ts +58 -0
  65. package/components/inputbadge/InputBadge.vue.d.ts +122 -0
  66. package/components/inputcurrency/InputCurrency.vue.d.ts +170 -0
  67. package/components/inputcurrency/helpers/currency.helper.d.ts +8 -0
  68. package/components/inputemail/InputEmail.vue.d.ts +25 -0
  69. package/components/inputnumber/InputNumber.vue.d.ts +282 -0
  70. package/components/inputpassword/InputPassword.vue.d.ts +32 -0
  71. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
  72. package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +8 -0
  73. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +120 -0
  74. package/components/inputsearch/InputSearch.vue.d.ts +33 -0
  75. package/components/inputtext/InputText.vue.d.ts +352 -0
  76. package/components/inputurl/InputURL.vue.d.ts +36 -0
  77. package/components/invisiblefield/InvisibleField.vue.d.ts +32 -0
  78. package/components/litedropdown/LiteDropdown.vue.d.ts +96 -0
  79. package/components/loading/Loading.vue.d.ts +47 -0
  80. package/components/loading/store/loading.store.d.ts +8 -0
  81. package/components/menu/Menu.vue.d.ts +390 -0
  82. package/components/menu/helpers/filterMenu.helper.d.ts +15 -0
  83. package/components/menu/helpers/index.d.ts +1 -0
  84. package/components/menuitem/MenuItem.vue +70 -0
  85. package/components/menuitem/MenuItem.vue.d.ts +39 -0
  86. package/components/menuitem/index.d.ts +106 -0
  87. package/components/multiselect/MultiSelect.vue.d.ts +194 -0
  88. package/components/overlaypanel/OverlayPanel.vue.d.ts +301 -0
  89. package/components/passthrough/index.d.ts +16 -0
  90. package/components/tabmenu/TabMenu.vue.d.ts +288 -0
  91. package/components/textarea/Textarea.vue.d.ts +170 -0
  92. package/components/timeline/Timeline.vue.d.ts +121 -0
  93. package/components/timeline/TimelineContentByType.vue.d.ts +64 -0
  94. package/components/toast/Toast.vue.d.ts +367 -0
  95. package/components/toggleswitch/ToggleSwitch.vue.d.ts +281 -0
  96. package/components/tree/Tree.vue.d.ts +148 -0
  97. package/components/tree/helpers/filterNodeKeys.helper.d.ts +22 -0
  98. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +8 -0
  99. package/components/tree/helpers/index.d.ts +3 -0
  100. package/components/ts-helpers.d.ts +85 -0
  101. package/components/username/UserName.vue.d.ts +113 -0
  102. package/components/userwithicon/UserWithIcon.vue.d.ts +20 -0
  103. package/config/defaultProps.d.ts +3 -0
  104. package/config/index.d.ts +3 -0
  105. package/config/locale.d.ts +3 -0
  106. package/loading-page-BrQattYE.js +1 -0
  107. package/loading-page-CgfbWppy.js +1 -0
  108. package/loading-page-CoC9UhfC.js +4 -0
  109. package/loading-page-CoXtqoc9.js +4 -0
  110. package/loading-page-DbLuqCHa.js +1 -0
  111. package/loading-page-f8D03l3G.js +4 -0
  112. package/loading-plane-CgfbWppy.js +1 -0
  113. package/loading-plane-CoXtqoc9.js +4 -0
  114. package/loading-table-Bdr9ZhtP.js +1 -0
  115. package/loading-table-ByUoWqUo.js +4 -0
  116. package/loading-table-BygEMzFM.js +4 -0
  117. package/loading-table-BzrSQlA0.js +1 -0
  118. package/loading-table-D9bw9OcI.js +4 -0
  119. package/loading-table-chOgXi94.js +1 -0
  120. package/main.d.ts +31 -0
  121. package/no-data-CTKux8RI.js +4 -0
  122. package/no-data-Cgze_Rvp.js +1 -0
  123. package/no-data-DLHO1L_u.js +4 -0
  124. package/no-data-Dep79CBh.js +1 -0
  125. package/no-data-g0dJCy2p.js +4 -0
  126. package/no-data-y1X5WtcQ.js +1 -0
  127. package/package.json +1 -1
  128. package/plugins/i18n-extension.d.ts +4 -0
  129. package/style.css +1 -0
  130. package/utils/getSeverityByAssetStatus.util.d.ts +3 -0
  131. package/utils/index.d.ts +22 -0
  132. package/utils/listenSidebarChanges.util.d.ts +16 -0
  133. package/wangsvue-fats.es.js +123684 -0
  134. package/wangsvue-fats.system.js +478 -0
@@ -0,0 +1,164 @@
1
+ import { Slot } from 'vue';
2
+ import { WangsIcons } from '../icon/Icon.vue.d';
3
+ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
4
+
5
+ type ConfirmDialogSeverity = 'success' | 'danger';
6
+
7
+ export interface DialogConfirmLocaleConfig {
8
+ actionableCloseButtonLabel?: string;
9
+ nonActionableCloseButtonLabel?: string;
10
+ /**
11
+ * @example Are you sure?
12
+ */
13
+ defaultConfirmMessage?: string;
14
+
15
+ /**
16
+ * @example Yakin
17
+ */
18
+ defaultConfirmLabel?: string;
19
+ }
20
+
21
+ /**
22
+ * Props for DialogConfirm component
23
+ */
24
+ export interface DialogConfirmProps {
25
+ /**
26
+ * The header of the dialog.
27
+ */
28
+ header: string;
29
+ /**
30
+ * The severity of the dialog.
31
+ * The severity will determine the dialog icons and color scheme.
32
+ */
33
+ severity: ConfirmDialogSeverity;
34
+ /**
35
+ * The severity of the confirm button.
36
+ * The severity will determine the confirm button color scheme in case button severity is different from header/dialog severity.
37
+ *
38
+ * @default undefined - to fallback to props.severity
39
+ */
40
+ confirmButtonSeverity?: ConfirmDialogSeverity | 'primary';
41
+ /**
42
+ * The boolean modelValue to show dialog.
43
+ */
44
+ visible: boolean;
45
+
46
+ /**
47
+ * Determines if the dialog should close after confirm.
48
+ * @default true
49
+ */
50
+ closeAfterConfirm?: boolean;
51
+ /**
52
+ * The label of the close/cancel button.
53
+ */
54
+ closeLabel?: string;
55
+ /**
56
+ * To hide/show the confirm button.
57
+ *
58
+ * Set to 'false' Make the confirm dialog cannot be confirmed.
59
+ *
60
+ * @default true;
61
+ */
62
+ actionable?: boolean;
63
+ /**
64
+ * The label of the confirm button.
65
+ */
66
+ confirmLabel?: string;
67
+ /**
68
+ * Props to disable confirm button.
69
+ */
70
+ disableConfirmButton?: boolean;
71
+ /**
72
+ * Custom header icon. Default is 'error' icon for danger severity, and 'checkbox-circle' for success severity.
73
+ */
74
+ headerIcon?: WangsIcons;
75
+ /**
76
+ * The lists to be displayed in the dialog.
77
+ */
78
+ list?: (string | object)[] | Set<string | object>;
79
+ /**
80
+ * The label of the list if your list item is an object.
81
+ * Choose a property from the item to be displayed on the list.
82
+ */
83
+ listLabel?: string;
84
+ /**
85
+ * The confirmation message.
86
+ */
87
+ message?: string;
88
+ /**
89
+ * Whether show icon header or not.
90
+ * @default true;
91
+ */
92
+ showIcon?: boolean;
93
+ /**
94
+ * Whether show close button or not (footer button that has label, not close button with icon 'X').
95
+ * @default true;
96
+ */
97
+ showCloseButton?: boolean;
98
+
99
+ /**
100
+ * Set class for content element.
101
+ */
102
+ contentClass?: any;
103
+ }
104
+
105
+ /**
106
+ * Slots for DialogConfirm component
107
+ */
108
+ export interface DialogConfirmSlots {
109
+ /**
110
+ * The body slot for the dialog. Here is where you can put your dialog body.
111
+ */
112
+ body?: Slot | string;
113
+ /**
114
+ * The footer slot for the dialog. Here is where you can put your dialog footer.
115
+ * Use this slot if you need to custom the dialog buttons.
116
+ */
117
+ footer?: Slot | string;
118
+ }
119
+
120
+ /**
121
+ * Emits for DialogConfirm component
122
+ */
123
+ export type DialogConfirmEmits = {
124
+ /**
125
+ * Emits when close button clicked.
126
+ */
127
+ 'close': [];
128
+ /**
129
+ * Emits when Confirm button clicked.
130
+ */
131
+ 'confirm': [];
132
+ /**
133
+ * Emits when dialog closed.
134
+ */
135
+ 'hide': [];
136
+ /**
137
+ * Emits when the dialog is closed. Wether from cancel button, close button, or ESC button pressed.
138
+ */
139
+ 'update:visible': [state: boolean];
140
+ };
141
+
142
+ /**
143
+ * **WangsVue - DialogConfirm**
144
+ *
145
+ * _DialogConfirm is a component for creating confirmation dialogs._
146
+ *
147
+ * --- ---
148
+ * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
149
+ *
150
+ * @group components
151
+ */
152
+ declare class DialogConfirm extends ClassComponent<
153
+ DialogConfirmProps,
154
+ DialogConfirmSlots,
155
+ DialogConfirmEmits
156
+ > {}
157
+
158
+ declare module '@vue/runtime-core' {
159
+ interface GlobalComponents {
160
+ DialogConfirm: GlobalComponentConstructor<DialogConfirm>;
161
+ }
162
+ }
163
+
164
+ export default DialogConfirm;
@@ -0,0 +1,349 @@
1
+ import { GenericObject } from 'vee-validate';
2
+ import { Slot } from 'vue';
3
+ import FormInstance, { FormPayload, FormProps } from '../form/Form.vue.d';
4
+ import { WangsIcons } from '../icon/Icon.vue.d';
5
+ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
6
+
7
+ export type DialogFormValue =
8
+ | string
9
+ | string[]
10
+ | number
11
+ | number[]
12
+ | boolean
13
+ | boolean[]
14
+ | Record<string, unknown>
15
+ | Record<string, unknown>[];
16
+
17
+ /**
18
+ * Generic form payload, able to receive types from outside
19
+ */
20
+ export type DialogFormPayload<
21
+ FormValuesType = Record<string, DialogFormValue>,
22
+ > = {
23
+ stayAfterSubmit: boolean;
24
+ formValues: FormValuesType;
25
+ };
26
+
27
+ export interface DialogFormLocaleConfig {
28
+ /**
29
+ * @example 'Cancel'
30
+ */
31
+ cancelBtnLabel?: string;
32
+
33
+ /**
34
+ * @example 'Clear Field'
35
+ */
36
+ clearBtnLabel?: string;
37
+
38
+ /**
39
+ * @example 'Stay after submit'
40
+ */
41
+ stayCheckboxLabel?: string;
42
+
43
+ /**
44
+ * @example 'Submit'
45
+ */
46
+ submitBtnLabel?: string;
47
+
48
+ /**
49
+ * Set the label for button expand sidebar right when it is expanded.
50
+ *
51
+ * @example 'Tutup <'
52
+ */
53
+ asideRightExpandedButtonLabel?: string;
54
+
55
+ /**
56
+ * Set the label for button expand sidebar right when it is collapsed.
57
+ *
58
+ * @example 'Lihat data yang ada >'
59
+ */
60
+ asideRightCollapsedButtonLabel?: string;
61
+ }
62
+
63
+ /**
64
+ * Props for DialogForm component
65
+ */
66
+ export interface DialogFormProps extends FormProps {
67
+ /**
68
+ * The template for form buttons.
69
+ */
70
+ buttonsTemplate: ('clear' | 'submit' | 'cancel')[];
71
+
72
+ /**
73
+ * The dialog header.
74
+ */
75
+ header: string;
76
+
77
+ /**
78
+ * Value binding to show/hide the dialog.
79
+ */
80
+ visible: boolean;
81
+
82
+ /**
83
+ * With in pixel
84
+ *
85
+ * @default 260
86
+ */
87
+ asideRightWidth?: number;
88
+ class?: string | string[];
89
+
90
+ /**
91
+ * Custom button cancel label.
92
+ *
93
+ * @default - The default value from locale configuration {@link DialogFormLocaleConfig.cancelBtnLabel}
94
+ *
95
+ */
96
+ cancelBtnLabel?: string;
97
+
98
+ /**
99
+ * Custom button clear label.
100
+ *
101
+ * @default - The default value from locale configuration {@link DialogFormLocaleConfig.clearBtnLabel}
102
+ */
103
+ clearBtnLabel?: string;
104
+
105
+ /**
106
+ * Wether show the Close icon or not.
107
+ */
108
+ closable?: boolean;
109
+
110
+ /**
111
+ * Close dialog after form validated and submitted.
112
+ *
113
+ * @default true
114
+ */
115
+ closeOnSubmit?: boolean;
116
+
117
+ /**
118
+ * @deprecated
119
+ */
120
+ contentClass?: string | string[];
121
+
122
+ /**
123
+ * Show Date time on header.
124
+ */
125
+ dateHeader?: string;
126
+
127
+ /**
128
+ * Set the header icon left beside of the title.
129
+ */
130
+ headerIcon?: WangsIcons;
131
+
132
+ /**
133
+ * Sets the invalid state.
134
+ *
135
+ * @default false
136
+ */
137
+ invalid?: boolean;
138
+
139
+ /**
140
+ * Prevent form resets after submitted. Default is resetted.
141
+ *
142
+ * @default true
143
+ */
144
+ resetAfterSubmit?: boolean;
145
+
146
+ /**
147
+ * The severity of the dialog.
148
+ * The severity will determine the dialog icons and color scheme.
149
+ */
150
+ severity?: 'success' | 'danger' | 'primary';
151
+
152
+ /**
153
+ * Show or hide the checkbox 'Stay after submit.'
154
+ *
155
+ * @default true - if the action is submit.
156
+ * @default false - if the action is save.
157
+ */
158
+ showStayCheckbox?: boolean;
159
+
160
+ /**
161
+ * Custom label for stay checkbox.
162
+ *
163
+ * @default - The default value from locale configuration {@link DialogFormLocaleConfig.stayCheckboxLabel}
164
+ */
165
+ stayCheckboxLabel?: string;
166
+
167
+ /**
168
+ * Custom button submit label.
169
+ * @default - The default value from locale configuration {@link DialogFormLocaleConfig.submitBtnLabel}
170
+ */
171
+ submitBtnLabel?: string;
172
+
173
+ /**
174
+ * Define the invalid message to be shown on invalid state above the Form submit button.
175
+ *
176
+ * @default undefined
177
+ */
178
+ validatorMessage?: string;
179
+
180
+ /**
181
+ * Additional validation function.
182
+ * Within this this function, you need to set the invalid props value.
183
+ *
184
+ * If after executing this function the props invalid is true, the form will not be submitted.
185
+ * Otherwise, 'submit' event will be emitted.
186
+ *
187
+ * @param values - the Form values
188
+ */
189
+ validationFunction?: (values: GenericObject) => void | Promise<void>;
190
+
191
+ /**
192
+ * Set the dialog size.
193
+ *
194
+ * - small: 400px
195
+ * - medium: 500px
196
+ * - large: 572px
197
+ * - semi-xlarge: 600px
198
+ * - xlarge: 800px
199
+ *
200
+ * @default 'small';
201
+ */
202
+ width?: 'small' | 'medium' | 'large' | 'semi-xlarge' | 'xlarge';
203
+ }
204
+
205
+ export interface ConfirmSlots {
206
+ /**
207
+ * The Visible state.
208
+ */
209
+ visible: boolean;
210
+
211
+ /**
212
+ * Hide the confirm dialog.
213
+ */
214
+ hide: () => void;
215
+
216
+ /**
217
+ * The submit function to be called after confirmation.
218
+ */
219
+ submit: (submitFn: (value: FormPayload) => Promise<void> | void) => void;
220
+ }
221
+
222
+ export interface ActionSlots {
223
+ /**
224
+ * The submit function to be called after confirmation.
225
+ */
226
+ submit: (submitFn: () => Promise<void> | void) => void;
227
+ }
228
+
229
+ /**
230
+ * Slots for DialogForm component
231
+ */
232
+ export interface DialogFormSlots {
233
+ /**
234
+ * Slot for action buttons.
235
+ */
236
+ 'actionButtons': Slot<ActionSlots>;
237
+
238
+ /**
239
+ * Slot for aside right expansion.
240
+ */
241
+ 'aside-right': Slot;
242
+
243
+ /**
244
+ * Slot for dialog confirm.
245
+ */
246
+ 'confirm': Slot<ConfirmSlots>;
247
+
248
+ /**
249
+ * The fields slot for the Dialogform. Here is where you can put your Dialogform fields.
250
+ */
251
+ 'fields': Slot<{ formValues: GenericObject; key?: number }>;
252
+
253
+ /**
254
+ * Slot for dialog header.
255
+ */
256
+ 'header': Slot;
257
+ }
258
+
259
+ /**
260
+ * Emits for DialogForm component
261
+ */
262
+ export type DialogFormEmits = {
263
+ /**
264
+ * Emits when 'Clear Field' button clicked.
265
+ */
266
+ 'clear': [];
267
+
268
+ /**
269
+ * When dialog is closed by close button.
270
+ */
271
+ 'close': [];
272
+
273
+ /**
274
+ * Callback to invoke when dialog is hidden.
275
+ */
276
+ 'hide': [];
277
+
278
+ /**
279
+ * Callback to invoke when dialog is shown.
280
+ */
281
+ 'show': [];
282
+
283
+ /**
284
+ * Emits when the form validation succes and props.invalid is 'false'.
285
+ */
286
+ 'submit': [values: DialogFormPayload];
287
+
288
+ /**
289
+ * When dialog is closed.
290
+ */
291
+ 'update:visible': [state: boolean];
292
+ };
293
+
294
+ /**
295
+ * **WangsVue - DialogForm**
296
+ *
297
+ * _DialogForm is combination of Form and Dialog. Handles validation on submit using vee-validate.
298
+ * You need to install vee-validate while using this component._
299
+ *
300
+ * --- ---
301
+ * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
302
+ *
303
+ * @group components
304
+ */
305
+ declare class DialogForm extends ClassComponent<
306
+ DialogFormProps,
307
+ DialogFormSlots,
308
+ DialogFormEmits
309
+ > {
310
+ /**
311
+ * Exposed function to clears the form fields.
312
+ */
313
+ clearField: () => void;
314
+
315
+ /**
316
+ * The ref of form element.
317
+ */
318
+ form: FormInstance;
319
+
320
+ /**
321
+ * Set initial values for all fields.
322
+ */
323
+ setValues: (values: GenericObject) => void;
324
+
325
+ /**
326
+ * Set value for specific field.
327
+ */
328
+ setFieldValue: <T extends string>(
329
+ field: T,
330
+ value: GenericObject[T],
331
+ shouldValidate?: boolean,
332
+ ) => void;
333
+
334
+ /**
335
+ * Set errors fields
336
+ * @param fields - {
337
+ * name: 'This name already exists'
338
+ * }
339
+ */
340
+ setErrors(fields: GenericObject): void;
341
+ }
342
+
343
+ declare module '@vue/runtime-core' {
344
+ interface GlobalComponents {
345
+ DialogForm: GlobalComponentConstructor<DialogForm>;
346
+ }
347
+ }
348
+
349
+ export default DialogForm;
@@ -0,0 +1,136 @@
1
+ import { TreeSelectionKeys } from 'primevue/tree';
2
+ import { TreeNode } from '../basetree/BaseTree.vue.d';
3
+ import { QueryParams, ShortFetchResponse } from '../datatable/DataTable.vue.d';
4
+ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
5
+ import TreeInstance, { TreeProps } from '../tree/Tree.vue.d';
6
+ import { Slot } from 'vue';
7
+
8
+ export interface DialogSelectTreeProps
9
+ extends Omit<TreeProps, 'type' | 'filter'> {
10
+ fetchTree?: (
11
+ type: 'group' | 'category',
12
+ params?: QueryParams,
13
+ ) => Promise<ShortFetchResponse<TreeNode> | undefined>;
14
+ params?: QueryParams;
15
+ visible?: boolean;
16
+ type?: 'group' | 'category';
17
+ /**
18
+ * Specify wether the all tree node should be auto checked once it rendered.
19
+ * @default false
20
+ */
21
+ autoSelectAll?: boolean;
22
+ header?: string;
23
+ subHeader?: string;
24
+ selectionMode?: 'single' | 'checkbox';
25
+ /**
26
+ * Current behavior is preventing select if there is no node selected.
27
+ *
28
+ * @default true
29
+ */
30
+ allowEmptySelection?: boolean;
31
+ /**
32
+ * The previously selected tree key to be displayed again.
33
+ */
34
+ keys?: number[];
35
+ /**
36
+ * The lists to be displayed in the dialog.
37
+ */
38
+ lists?: (string | object)[];
39
+ /**
40
+ * The label of the list if your list item is an object.
41
+ * Choose a property from the item to be displayed on the list.
42
+ */
43
+ listLabel?: string;
44
+ /**
45
+ * Disable node 'All' selection
46
+ */
47
+ disableNodeAll?: boolean;
48
+ /**
49
+ * @deprecated
50
+ */
51
+ exactDisableKey?: number;
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 group tree to showing disposable groups.
66
+ */
67
+ showDisposableGroups?: 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
+ * Render hidden dialog to trigger fetch tree
78
+ */
79
+ hidden?: boolean;
80
+
81
+ propagateSelection?: boolean;
82
+ }
83
+
84
+ export type TreeSelectPayload = {
85
+ keys: TreeSelectionKeys | undefined;
86
+ selectedNodes: TreeNode[] | undefined;
87
+ singleNode: TreeNode | undefined;
88
+ };
89
+
90
+ export type DialogSelectTreeEmits = {
91
+ select: [keys?: TreeSelectPayload];
92
+ hide: [];
93
+ };
94
+
95
+ export interface DialogSelectTreeSlots {
96
+ header: Slot<{
97
+ dialogHeader: string;
98
+ subHeader?: string;
99
+ lists?: (string | object)[];
100
+ listLabel?: string;
101
+ isLoading: boolean;
102
+ filter: string;
103
+ updateFilter: (newFilter?: string) => void; // Hooks to update internal state filter
104
+ }>;
105
+
106
+ /**
107
+ * Slot to customize tree node item
108
+ */
109
+ treenode: Slot<{ node: TreeNode; checked: boolean; disabled: boolean }>;
110
+
111
+ footer: Slot;
112
+ }
113
+
114
+ /**
115
+ * **TSVue v2 - DialogSelectTree**
116
+ *
117
+ * --- ---
118
+ * ![TSVue](https://ik.imagekit.io/kurniadev/TS-HEAD-BLACK.png)
119
+ *
120
+ * @group components
121
+ */
122
+ declare class DialogSelectTree extends ClassComponent<
123
+ DialogSelectTreeProps,
124
+ DialogSelectTreeSlots,
125
+ DialogSelectTreeEmits
126
+ > {
127
+ treeComponent: TreeInstance;
128
+ }
129
+
130
+ declare module '@vue/runtime-core' {
131
+ interface GlobalComponents {
132
+ DialogSelectTree: GlobalComponentConstructor<DialogSelectTree>;
133
+ }
134
+ }
135
+
136
+ export default DialogSelectTree;