@fewangsit/wangsvue-fats 1.0.0-alpha.3 → 1.0.0-alpha.31

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 (160) hide show
  1. package/event-bus/index.d.ts +3 -1
  2. package/package.json +1 -1
  3. package/plugins/WangsVue.d.ts +120 -2
  4. package/plugins/i18n.d.ts +94 -0
  5. package/utils/filterOptions.util.d.ts +2 -2
  6. package/assets/json/currencies.json.d.ts +0 -1068
  7. package/assets/json/supported-official-langs.json.d.ts +0 -530
  8. package/assets/lottie/admin/loading-page.lottie +0 -0
  9. package/assets/lottie/admin/loading-table.lottie +0 -0
  10. package/assets/lottie/admin/no-data.lottie +0 -0
  11. package/assets/lottie/supplyasset/loading-page.lottie +0 -0
  12. package/assets/lottie/supplyasset/loading-table.lottie +0 -0
  13. package/assets/lottie/supplyasset/no-data.lottie +0 -0
  14. package/assets/lottie/workspace/loading-page.lottie +0 -0
  15. package/assets/lottie/workspace/loading-plane.lottie +0 -0
  16. package/assets/lottie/workspace/loading-table.lottie +0 -0
  17. package/assets/lottie/workspace/no-data.lottie +0 -0
  18. package/build-entry.d.ts +0 -14
  19. package/components/animation/Animation.vue.d.ts +0 -24
  20. package/components/approverinfo/ApproverInfo.vue.d.ts +0 -51
  21. package/components/badge/Badge.vue.d.ts +0 -73
  22. package/components/badgegroup/BadgeGroup.vue.d.ts +0 -52
  23. package/components/basecomponent/index.d.ts +0 -28
  24. package/components/basetree/BaseTree.vue.d.ts +0 -591
  25. package/components/basetree/TreeNode.vue.d.ts +0 -35
  26. package/components/breadcrumb/Breadcrumb.vue.d.ts +0 -26
  27. package/components/button/Button.vue.d.ts +0 -185
  28. package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +0 -35
  29. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +0 -104
  30. package/components/buttoncopy/ButtonCopy.vue.d.ts +0 -26
  31. package/components/buttondownload/ButtonDownload.vue.d.ts +0 -49
  32. package/components/buttonfilter/ButtonFilter.vue.d.ts +0 -12
  33. package/components/buttonradio/ButtonRadio.vue.d.ts +0 -257
  34. package/components/buttonsearch/ButtonSearch.vue.d.ts +0 -38
  35. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +0 -198
  36. package/components/buttonsplit/ButtonSplit.d.ts +0 -350
  37. package/components/buttonsplit/ButtonSplit.vue.d.ts +0 -34
  38. package/components/buttontoggle/ButtonToggle.vue.d.ts +0 -18
  39. package/components/calendar/BaseCalendar.vue.d.ts +0 -86
  40. package/components/calendar/Calendar.vue.d.ts +0 -570
  41. package/components/card/Card.vue.d.ts +0 -139
  42. package/components/checkbox/Checkbox.vue.d.ts +0 -329
  43. package/components/codesnippet/CodeSnippet.vue.d.ts +0 -14
  44. package/components/customcolumn/ColumnList.vue.d.ts +0 -27
  45. package/components/customcolumn/CustomColumn.vue.d.ts +0 -37
  46. package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +0 -12
  47. package/components/datatable/DataTable.vue.d.ts +0 -735
  48. package/components/datatable/MultiRow.vue.d.ts +0 -16
  49. package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +0 -1
  50. package/components/datatable/helpers/filter.helper.d.ts +0 -28
  51. package/components/datatable/helpers/index.d.ts +0 -3
  52. package/components/datatable/helpers/readConfig.helper.d.ts +0 -2
  53. package/components/datatable/store/dataTable.store.d.ts +0 -22
  54. package/components/dialog/Dialog.vue.d.ts +0 -464
  55. package/components/dialogconfirm/DialogConfirm.vue.d.ts +0 -164
  56. package/components/dialogform/DialogForm.vue.d.ts +0 -349
  57. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +0 -136
  58. package/components/dropdown/Dropdown.vue.d.ts +0 -264
  59. package/components/editor/CodeSnippetAdapter.vue.d.ts +0 -92
  60. package/components/editor/Editor.vue.d.ts +0 -191
  61. package/components/editor/EditorButton.vue.d.ts +0 -15
  62. package/components/editor/MentionList.vue.d.ts +0 -35
  63. package/components/editor/MentionSection.vue.d.ts +0 -92
  64. package/components/editor/codeSnippetExtension.d.ts +0 -3
  65. package/components/editor/mentionSectionExtension.d.ts +0 -3
  66. package/components/editor/suggestion.d.ts +0 -2
  67. package/components/fieldwrapper/FieldWrapper.vue.d.ts +0 -69
  68. package/components/fileupload/FileUpload.vue.d.ts +0 -169
  69. package/components/filtercontainer/FilterContainer.vue.d.ts +0 -181
  70. package/components/filtercontainer/helpers/applyFilter.helper.d.ts +0 -5
  71. package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +0 -7
  72. package/components/filtercontainer/helpers/getOption.helper.d.ts +0 -3
  73. package/components/form/Form.vue.d.ts +0 -316
  74. package/components/gallerypreview/GalleryPreview.vue.d.ts +0 -31
  75. package/components/helpers/convertToArrayClass.helper.d.ts +0 -2
  76. package/components/helpers/index.d.ts +0 -2
  77. package/components/helpers/label.d.ts +0 -15
  78. package/components/icon/Icon.vue.d.ts +0 -256
  79. package/components/image/Image.vue.d.ts +0 -403
  80. package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +0 -36
  81. package/components/imagecompressor/ImageCompressor.vue.d.ts +0 -223
  82. package/components/imagecompressor/ImageInputInfo.vue.d.ts +0 -30
  83. package/components/index.d.ts +0 -63
  84. package/components/inlinemessage/InlineMessage.vue.d.ts +0 -167
  85. package/components/inputbadge/InputBadge.vue.d.ts +0 -122
  86. package/components/inputcurrency/InputCurrency.vue.d.ts +0 -170
  87. package/components/inputcurrency/helpers/currency.helper.d.ts +0 -4
  88. package/components/inputemail/InputEmail.vue.d.ts +0 -25
  89. package/components/inputgroup/InputGroup.vue.d.ts +0 -141
  90. package/components/inputnumber/InputNumber.vue.d.ts +0 -282
  91. package/components/inputpassword/InputPassword.vue.d.ts +0 -32
  92. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +0 -99
  93. package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +0 -8
  94. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +0 -120
  95. package/components/inputtext/InputText.vue.d.ts +0 -352
  96. package/components/inputurl/InputURL.vue.d.ts +0 -39
  97. package/components/invisiblefield/InvisibleField.vue.d.ts +0 -36
  98. package/components/languagedropdown/LanguageDropdown.vue.d.ts +0 -50
  99. package/components/languagedropdown/LanguageDropdownOption.vue.d.ts +0 -18
  100. package/components/languageswitcher/LanguageSwitcher.vue.d.ts +0 -15
  101. package/components/litedropdown/LiteDropdown.vue.d.ts +0 -96
  102. package/components/loading/Loading.vue.d.ts +0 -47
  103. package/components/loading/store/loading.store.d.ts +0 -8
  104. package/components/menu/Menu.vue.d.ts +0 -390
  105. package/components/menu/helpers/filterMenu.helper.d.ts +0 -12
  106. package/components/menu/helpers/index.d.ts +0 -1
  107. package/components/menuitem/MenuItem.vue.d.ts +0 -19
  108. package/components/menuitem/index.d.ts +0 -106
  109. package/components/multiselect/MultiSelect.vue.d.ts +0 -192
  110. package/components/overlaypanel/OverlayPanel.vue.d.ts +0 -301
  111. package/components/passthrough/index.d.ts +0 -16
  112. package/components/progressbar/ProgressBar.vue.d.ts +0 -72
  113. package/components/quickfilter/QuickFilter.vue.d.ts +0 -25
  114. package/components/tabmenu/TabMenu.vue.d.ts +0 -288
  115. package/components/textarea/Textarea.vue.d.ts +0 -170
  116. package/components/timeline/Timeline.vue.d.ts +0 -115
  117. package/components/timeline/TimelineContentByType.vue.d.ts +0 -16
  118. package/components/toast/Toast.vue.d.ts +0 -367
  119. package/components/toggleswitch/ToggleSwitch.vue.d.ts +0 -281
  120. package/components/tooltipspan/TooltipSpan.vue.d.ts +0 -20
  121. package/components/tree/Tree.vue.d.ts +0 -148
  122. package/components/tree/helpers/filterNodeKeys.helper.d.ts +0 -16
  123. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +0 -6
  124. package/components/tree/helpers/index.d.ts +0 -3
  125. package/components/treesearchinput/TreeSearchInput.vue.d.ts +0 -16
  126. package/components/ts-helpers.d.ts +0 -83
  127. package/components/usergroup/UserGroup.vue.d.ts +0 -57
  128. package/components/username/UserName.vue.d.ts +0 -113
  129. package/components/validatormessage/ValidatorMessage.vue.d.ts +0 -12
  130. package/config/defaultProps.d.ts +0 -3
  131. package/config/index.d.ts +0 -3
  132. package/config/locale.d.ts +0 -3
  133. package/loading-page-BrQattYE.js +0 -1
  134. package/loading-page-CgfbWppy.js +0 -1
  135. package/loading-page-CoC9UhfC.js +0 -4
  136. package/loading-page-CoXtqoc9.js +0 -4
  137. package/loading-page-DbLuqCHa.js +0 -1
  138. package/loading-page-f8D03l3G.js +0 -4
  139. package/loading-plane-CgfbWppy.js +0 -1
  140. package/loading-plane-CoXtqoc9.js +0 -4
  141. package/loading-table-Bdr9ZhtP.js +0 -1
  142. package/loading-table-ByUoWqUo.js +0 -4
  143. package/loading-table-BygEMzFM.js +0 -4
  144. package/loading-table-BzrSQlA0.js +0 -1
  145. package/loading-table-D9bw9OcI.js +0 -4
  146. package/loading-table-chOgXi94.js +0 -1
  147. package/main.d.ts +0 -2
  148. package/no-data-CTKux8RI.js +0 -4
  149. package/no-data-Cgze_Rvp.js +0 -1
  150. package/no-data-DLHO1L_u.js +0 -4
  151. package/no-data-Dep79CBh.js +0 -1
  152. package/no-data-g0dJCy2p.js +0 -4
  153. package/no-data-y1X5WtcQ.js +0 -1
  154. package/plugins/translation.d.ts +0 -84
  155. package/style.css +0 -1
  156. package/types/options.type.d.ts +0 -16
  157. package/utils/index.d.ts +0 -20
  158. package/utils/role.util.d.ts +0 -2
  159. package/wangsvue-fats.es.js +0 -132744
  160. package/wangsvue-fats.system.js +0 -489
@@ -1,390 +0,0 @@
1
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
2
- /* eslint-disable @typescript-eslint/no-explicit-any */
3
- /**
4
- *
5
- * Menu is a navigation / command component that supports dynamic and static positioning.
6
- *
7
- * [Live Demo](https://www.WangsVue.org/menu/)
8
- *
9
- * @module menu
10
- *
11
- */
12
- import { TransitionProps, VNode } from 'vue';
13
- import { ComponentHooks } from '../basecomponent';
14
- import { PassThroughOptions } from '../passthrough';
15
- import { MenuItem } from '../menuitem';
16
- import {
17
- ClassComponent,
18
- GlobalComponentConstructor,
19
- PassThrough,
20
- } from '../ts-helpers';
21
-
22
- export declare type MenuPassThroughOptionType =
23
- | MenuPassThroughAttributes
24
- | ((
25
- options: MenuPassThroughMethodOptions,
26
- ) => MenuPassThroughAttributes | string)
27
- | string
28
- | null
29
- | undefined;
30
-
31
- export declare type MenuPassThroughTransitionType =
32
- | TransitionProps
33
- | ((options: MenuPassThroughMethodOptions) => TransitionProps)
34
- | undefined;
35
-
36
- export interface MenuLocaleConfig {
37
- /**
38
- * The label of menu when no selectable menu available.
39
- */
40
- noOptionLabel?: string;
41
- }
42
-
43
- /**
44
- * Custom passthrough(pt) option method.
45
- */
46
- export interface MenuPassThroughMethodOptions {
47
- /**
48
- * Defines instance.
49
- */
50
- instance: any;
51
- /**
52
- * Defines valid properties.
53
- */
54
- props: MenuProps;
55
- /**
56
- * Defines current inline state.
57
- */
58
- state: MenuState;
59
- /**
60
- * Defines current options.
61
- */
62
- context: MenuContext;
63
- /**
64
- * Defines valid attributes.
65
- */
66
- attrs: any;
67
- /**
68
- * Defines parent options.
69
- */
70
- parent: any;
71
- /**
72
- * Defines passthrough(pt) options in global config.
73
- */
74
- global: object | undefined;
75
- }
76
-
77
- /**
78
- * Custom passthrough(pt) options.
79
- * @see {@link MenuProps.pt}
80
- */
81
- export interface MenuPassThroughOptions {
82
- /**
83
- * Used to pass attributes to the root's DOM element.
84
- */
85
- root?: MenuPassThroughOptionType;
86
- /**
87
- * Used to pass attributes to the list's DOM element.
88
- */
89
- menu?: MenuPassThroughOptionType;
90
- /**
91
- * Used to pass attributes to the submenu header's DOM element.
92
- */
93
- submenuHeader?: MenuPassThroughOptionType;
94
- /**
95
- * Used to pass attributes to the list item's DOM element.
96
- */
97
- menuitem?: MenuPassThroughOptionType;
98
- /**
99
- * Used to pass attributes to the content's DOM element.
100
- */
101
- content?: MenuPassThroughOptionType;
102
- /**
103
- * Used to pass attributes to the action's DOM element.
104
- */
105
- action?: MenuPassThroughOptionType;
106
- /**
107
- * Used to pass attributes to the icon's DOM element.
108
- */
109
- icon?: MenuPassThroughOptionType;
110
- /**
111
- * Used to pass attributes to the label's DOM element.
112
- */
113
- label?: MenuPassThroughOptionType;
114
- /**
115
- * Used to pass attributes to the separator's DOM element.
116
- */
117
- separator?: MenuPassThroughOptionType;
118
- /**
119
- * Used to pass attributes to the start of the component.
120
- */
121
- start?: MenuPassThroughOptionType;
122
- /**
123
- * Used to pass attributes to the end of the component.
124
- */
125
- end?: MenuPassThroughOptionType;
126
- /**
127
- * Used to manage all lifecycle hooks.
128
- * @see {@link basecomponent.ComponentHooks}
129
- */
130
- hooks?: ComponentHooks;
131
- /**
132
- * Used to control Vue Transition API.
133
- */
134
- transition?: MenuPassThroughTransitionType;
135
- }
136
-
137
- /**
138
- * Custom passthrough attributes for each DOM elements
139
- */
140
- export interface MenuPassThroughAttributes {
141
- [key: string]: any;
142
- }
143
-
144
- /**
145
- * Defines current inline state in Menu component.
146
- */
147
- export interface MenuState {
148
- /**
149
- * Current id state as a string.
150
- */
151
- id: string;
152
- /**
153
- * Current visible state as a boolean.
154
- * @defaultValue false
155
- */
156
- overlayVisible: boolean;
157
- /**
158
- * Current focus state as a boolean.
159
- * @defaultValue false
160
- */
161
- focused: boolean;
162
- /**
163
- * Focused option index.
164
- */
165
- focusedOptionIndex: number;
166
- /**
167
- * Selected option index.
168
- */
169
- selectedOptionIndex: number;
170
- }
171
-
172
- /**
173
- * Defines current options in Menu component.
174
- */
175
- export interface MenuContext {
176
- /**
177
- * Current menuitem
178
- */
179
- item: any;
180
- /**
181
- * Current index of the menuitem.
182
- */
183
- index: number;
184
- /**
185
- * Current focused state of menuitem as a boolean.
186
- * @defaultValue false
187
- */
188
- focused: boolean;
189
- /**
190
- * Current disabled state of menuitem as a boolean.
191
- * @defaultValue false
192
- */
193
- disabled: boolean;
194
- }
195
-
196
- /**
197
- * Defines valid router binding props in Menu component.
198
- */
199
- export interface MenuRouterBindProps {
200
- /**
201
- * Action element binding
202
- */
203
- action: object;
204
- /**
205
- * Icon element binding
206
- */
207
- icon: object;
208
- /**
209
- * Label element binding
210
- */
211
- label: object;
212
- }
213
-
214
- /**
215
- * Defines valid properties in Menu component.
216
- */
217
- export interface MenuProps {
218
- /**
219
- * An array of menuitems.
220
- */
221
- model?: MenuItem[] | undefined;
222
- /**
223
- * Defines if menu would displayed as a popup.
224
- * @defaultValue true
225
- */
226
- popup?: boolean | undefined;
227
- /**
228
- * A valid query selector or an HTMLElement to specify where the overlay gets attached.
229
- * @defaultValue body
230
- */
231
- appendTo?: 'body' | 'self' | string | undefined | HTMLElement;
232
- /**
233
- * Whether to automatically manage layering.
234
- * @defaultValue true
235
- */
236
- autoZIndex?: boolean | undefined;
237
- /**
238
- * Base zIndex value to use in layering.
239
- * @defaultValue 0
240
- */
241
- baseZIndex?: number | undefined;
242
- /**
243
- * Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
244
- * @deprecated since v3.40.0.
245
- * @defaultValue true
246
- */
247
- exact?: boolean | undefined;
248
- /**
249
- * Index of the element in tabbing order.
250
- */
251
- tabindex?: number | string | undefined;
252
- /**
253
- * Defines a string value that labels an interactive element.
254
- */
255
- ariaLabel?: string | undefined;
256
- /**
257
- * Identifier of the underlying input element.
258
- */
259
- ariaLabelledby?: string | undefined;
260
- /**
261
- * Used to pass attributes to DOM elements inside the component.
262
- * @type {MenuPassThroughOptions}
263
- */
264
- pt?: PassThrough<MenuPassThroughOptions>;
265
- /**
266
- * Used to configure passthrough(pt) options of the component.
267
- * @type {PassThroughOptions}
268
- */
269
- ptOptions?: PassThroughOptions;
270
- /**
271
- * When enabled, it removes component related styles in the core.
272
- * @defaultValue false
273
- */
274
- unstyled?: boolean;
275
- }
276
-
277
- /**
278
- * Defines valid slots in Menu component.
279
- */
280
- export interface MenuSlots {
281
- /**
282
- * Custom start template.
283
- */
284
- start(): VNode[];
285
- /**
286
- * Custom end template.
287
- */
288
- end(): VNode[];
289
- /**
290
- * Custom item template.
291
- * @param {Object} scope - item slot's params.
292
- */
293
- item(scope: {
294
- /**
295
- * Menuitem instance
296
- */
297
- item: MenuItem;
298
- /**
299
- * Label property of the menuitem
300
- */
301
- label: string | ((...args: any) => string) | undefined;
302
- /**
303
- * Binding properties of the menuitem
304
- */
305
- props: MenuRouterBindProps;
306
- }): VNode[];
307
- /**
308
- * Custom item icon template.
309
- * @param {Object} scope - item icon slot's params.
310
- */
311
- itemicon(scope: {
312
- /**
313
- * Menuitem instance
314
- */
315
- item: MenuItem;
316
- /**
317
- * Style class of the item icon element.
318
- */
319
- class: any;
320
- }): VNode[];
321
- /**
322
- * Custom item template.
323
- * @param {Object} scope - submenuheader slot's params.
324
- */
325
- submenuheader(scope: {
326
- /**
327
- * Menuitem instance
328
- */
329
- item: MenuItem;
330
- }): VNode[];
331
- }
332
-
333
- /**
334
- * Defines valid emits in Menu component.
335
- */
336
- export type MenuEmits = {
337
- /**
338
- * Callback to invoke when the component receives focus.
339
- * @param {Event} event - Browser event.
340
- */
341
- focus: [event: Event];
342
- /**
343
- * Callback to invoke when the component loses focus.
344
- * @param {Event} event - Browser event.
345
- */
346
- blur: [event: Event];
347
- };
348
-
349
- /**
350
- * **WangsVue - Menu**
351
- *
352
- * _Menu is a navigation / command component that supports dynamic and static positioning._
353
- *
354
- * --- ---
355
- * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
356
- *
357
- * @group Component
358
- *
359
- */
360
- declare class Menu extends ClassComponent<MenuProps, MenuSlots, MenuEmits> {
361
- /**
362
- * Toggles the visibility of the overlay.
363
- * @param {Event} event - Browser event.
364
- *
365
- * @memberof Menu
366
- */
367
- toggle(event: Event): void;
368
- /**
369
- * Shows the overlay.
370
- * @param {Event} event - Browser event.
371
- * @param {*} [target] - Target element
372
- *
373
- * @memberof Menu
374
- */
375
- show(event: Event, target?: any): void;
376
- /**
377
- * Hides the overlay.
378
- *
379
- * @memberof Menu
380
- */
381
- hide(): void;
382
- }
383
-
384
- declare module '@vue/runtime-core' {
385
- interface GlobalComponents {
386
- Menu: GlobalComponentConstructor<Menu>;
387
- }
388
- }
389
-
390
- export default Menu;
@@ -1,12 +0,0 @@
1
- import { MenuItem } from '../../menuitem';
2
- /**
3
- * Filters the menu items to return only the visible ones.
4
- * If no visible menu items are found, it returns a menu with a label 'No Option Available'.
5
- *
6
- * @param menuItems - The array of menu items to filter.
7
- * @param noOptionLabel - The label of menu to be shown when no available option. The value is from locale configuration each project.
8
- *
9
- * @returns - The array of visible menu items or an array with a single menu item with label 'No Option Available'.
10
- */
11
- declare const filterVisibleMenu: (menuItems: MenuItem[], noOptionLabel?: string) => MenuItem[];
12
- export default filterVisibleMenu;
@@ -1 +0,0 @@
1
- export { default as filterVisibleMenu } from './filterMenu.helper';
@@ -1,19 +0,0 @@
1
- import { MenuRouterBindProps } from '../menu/Menu.vue.d';
2
- import { MenuItem } from '.';
3
- declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
4
- item: MenuItem;
5
- routerProps: MenuRouterBindProps;
6
- }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<{
7
- item: MenuItem;
8
- routerProps: MenuRouterBindProps;
9
- }>>>, {}, {}>;
10
- export default _default;
11
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
- type __VLS_TypePropsToOption<T> = {
13
- [K in keyof T]-?: {} extends Pick<T, K> ? {
14
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
- } : {
16
- type: import('vue').PropType<T[K]>;
17
- required: true;
18
- };
19
- };
@@ -1,106 +0,0 @@
1
- import { WangsIcons } from '../icon/Icon.vue.d';
2
-
3
- /**
4
- *
5
- * WangsVue menu components share a common api to specify the menuitems and submenus.
6
- *
7
- * @module menuitem
8
- *
9
- */
10
-
11
- /**
12
- * Custom command event.
13
- * @todo next release should be able to change see menuItem.command
14
- */
15
- export interface MenuItemCommandEvent {
16
- /**
17
- * Browser event.
18
- */
19
- originalEvent: Event;
20
- /**
21
- * Menuitem instance.
22
- */
23
- item: MenuItem;
24
- /**
25
- * Optional
26
- */
27
- [key: string]: any;
28
- }
29
-
30
- /**
31
- * Defines model of MenuItem API.
32
- */
33
- export interface MenuItem {
34
- /**
35
- * Property name or getter function to use as the label of an item.
36
- */
37
- label?: string | ((...args: any) => string) | undefined;
38
- /**
39
- * Icon of the item.
40
- */
41
- icon?: WangsIcons | undefined;
42
- /**
43
- * Callback to execute when item is clicked.
44
- * @param {MenuItemCommandEvent} event - Custom command event.
45
- * @todo next release should be able to change
46
- */
47
- command?: (event: MenuItemCommandEvent) => void;
48
- /**
49
- * External link to navigate when item is clicked.
50
- */
51
- url?: string | undefined;
52
- /**
53
- * Specifies where to open the linked document.
54
- */
55
- target?: string | undefined;
56
- /**
57
- * Internal/ vue router link to navigate when item is clicked.
58
- */
59
- route?: string | undefined;
60
- /**
61
- * An array of children menuitems.
62
- */
63
- items?: MenuItem[] | undefined;
64
- /**
65
- * A boolean or a function to return a boolean to specify if the item is disabled.
66
- * @defaultValue false
67
- */
68
- disabled?: boolean | ((...args: any) => boolean) | undefined;
69
- /**
70
- * A boolean or a function to return a boolean to specify if the item is visible.
71
- * @defaultValue true
72
- */
73
- visible?: boolean | ((...args: any) => boolean) | undefined;
74
- /**
75
- * A boolean or to specify if the item has danger severity.
76
- * @defaultValue false
77
- */
78
- danger?: boolean | undefined;
79
- /**
80
- * Defines the item as a separator.
81
- * @defaultValue false
82
- */
83
- separator?: boolean | undefined;
84
- /**
85
- * Inline style of the menuitem.
86
- */
87
- style?: any;
88
- /**
89
- * Style class of the menuitem.
90
- */
91
- class?: any;
92
- /**
93
- * Unique identifier of an item.
94
- */
95
- key?: string | undefined;
96
- /**
97
- * Specify if the there is additional slot for the selected menuitem.
98
- * Only work on BulkAction when BulkActionProps.selectMenuType is "dropdown".
99
- *
100
- */
101
- useAdditionSlot?: boolean;
102
- /**
103
- * Optional
104
- */
105
- [key: string]: any;
106
- }
@@ -1,192 +0,0 @@
1
- import { DropdownLocaleConfig } from '../dropdown/Dropdown.vue.d';
2
- import { CustomValidation } from '../form/Form.vue.d';
3
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
4
-
5
- import { MultiSelectOption, OptionValue } from 'lib/types/options.type';
6
-
7
- export type MultiSelectLocaleConfig = DropdownLocaleConfig & {};
8
-
9
- /**
10
- * MultiSelect component props
11
- */
12
- export interface MultiSelectProps {
13
- modelValue?: OptionValue[];
14
-
15
- /**
16
- * If you deals with form validation on edit form action, you can set the initial value of the field.
17
- */
18
- initialValue?: OptionValue[];
19
-
20
- /**
21
- * The field label. Tell the user what field input is this.
22
- */
23
- label?: string;
24
-
25
- /**
26
- * List of options to display.
27
- */
28
- options?: MultiSelectOption[] | string[];
29
-
30
- /**
31
- * Specify the property name of option to be used as label.
32
- *
33
- * @default undefined - the label will be sets to the option itself.
34
- */
35
- optionLabel?: string;
36
-
37
- /**
38
- * Specify the property name of option to be used as value.
39
- *
40
- * @default undefined - the value will be sets to the option itself.
41
- */
42
- optionValue?: string;
43
-
44
- /**
45
- * Determines if the field uses a validator
46
- */
47
- useValidator?: boolean;
48
-
49
- /**
50
- * Determines if the field is mandatory
51
- */
52
- mandatory?: boolean;
53
-
54
- /**
55
- * Show the text (opsional)
56
- *
57
- * @default true if mandatory true
58
- */
59
- showOptionalText?: boolean;
60
-
61
- /**
62
- * Set custom validator message.
63
- * It is rarely use, this component has handled the validator message.
64
- *
65
- * @example: 'This field is required'
66
- * @example: { empty: 'This field is required' }
67
- */
68
- validatorMessage?: string | CustomValidation<'empty'>;
69
-
70
- /**
71
- * This prop is required if you use this component in a form input.
72
- * Specify the unique field name, match with your needs for API request.
73
- *
74
- * @default 'multiSelect'
75
- */
76
- fieldName?: string;
77
-
78
- /**
79
- * Default text to display when no option is selected.
80
- *
81
- * @default `Select ${label}`
82
- */
83
- placeholder?: string;
84
-
85
- /**
86
- * Whether the MultiSelect is in loading state.
87
- * @defaultValue false
88
- */
89
- loading?: boolean;
90
-
91
- /**
92
- * Show icon 'info' on the right side of label.
93
- * Show information to user about the field on icon hover.
94
- */
95
- fieldInfo?: string;
96
-
97
- /**
98
- * Hide the input and controls the overlay state from parent component.
99
- */
100
- controls?: boolean;
101
-
102
- /**
103
- * Disabled state.
104
- */
105
- disabled?: boolean;
106
-
107
- /**
108
- * Wether show the Dropdown option search or not.
109
- *
110
- * @default true,
111
- */
112
- filter?: boolean;
113
-
114
- /**
115
- * The filter input Placeholder
116
- *
117
- * @default 'Search' from Global Locale Config
118
- */
119
- filterPlaceholder?: string;
120
-
121
- /**
122
- * Defines how the selected items are displayed.
123
- *
124
- * @default 'chip'
125
- */
126
- display?: 'comma' | 'chip';
127
-
128
- /**
129
- * Label to display after exceeding max selected labels.
130
- */
131
- selectedItemsLabel?: string;
132
-
133
- /**
134
- * Decides how many selected item labels to show at most.
135
- */
136
- maxSelectedLabels?: number;
137
- }
138
-
139
- /**
140
- * MultiSelect component emits
141
- */
142
- export type MultiSelectEmits = {
143
- /**
144
- * Emits when an option selected.
145
- */
146
- 'update:modelValue': [value: OptionValue[] | undefined];
147
-
148
- /**
149
- * Emits when overlay shown.
150
- */
151
- 'show': [];
152
-
153
- /**
154
- * Emits when overlay hidden.
155
- */
156
- 'hide': [];
157
- };
158
-
159
- /**
160
- * **WangsVue - MultiSelect**
161
- *
162
- * _MultiSelect also known as Select, is used to choose an item from a collection of options._
163
- *
164
- * @group Component
165
- */
166
- declare class MultiSelect extends ClassComponent<
167
- MultiSelectProps,
168
- unknown,
169
- MultiSelectEmits
170
- > {
171
- /**
172
- * Shows the overlay.
173
- *
174
- * @memberof MultiSelect
175
- */
176
- showOverlay(): void;
177
-
178
- /**
179
- * Hides the overlay.
180
- *
181
- * @memberof MultiSelect
182
- */
183
- hideHideOverlay(): void;
184
- }
185
-
186
- declare module '@vue/runtime-core' {
187
- interface GlobalComponents {
188
- MultiSelect: GlobalComponentConstructor<MultiSelect>;
189
- }
190
- }
191
-
192
- export default MultiSelect;