@fewangsit/wangsvue-fats 1.0.0-alpha.2

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 (172) hide show
  1. package/assets/json/currencies.json.d.ts +1068 -0
  2. package/assets/json/supported-official-langs.json.d.ts +530 -0
  3. package/assets/lottie/admin/loading-page.lottie +0 -0
  4. package/assets/lottie/admin/loading-table.lottie +0 -0
  5. package/assets/lottie/admin/no-data.lottie +0 -0
  6. package/assets/lottie/supplyasset/loading-page.lottie +0 -0
  7. package/assets/lottie/supplyasset/loading-table.lottie +0 -0
  8. package/assets/lottie/supplyasset/no-data.lottie +0 -0
  9. package/assets/lottie/workspace/loading-page.lottie +0 -0
  10. package/assets/lottie/workspace/loading-plane.lottie +0 -0
  11. package/assets/lottie/workspace/loading-table.lottie +0 -0
  12. package/assets/lottie/workspace/no-data.lottie +0 -0
  13. package/build-entry.d.ts +14 -0
  14. package/components/animation/Animation.vue.d.ts +24 -0
  15. package/components/approverinfo/ApproverInfo.vue.d.ts +51 -0
  16. package/components/badge/Badge.vue.d.ts +73 -0
  17. package/components/badgegroup/BadgeGroup.vue.d.ts +52 -0
  18. package/components/basecomponent/index.d.ts +28 -0
  19. package/components/basetree/BaseTree.vue.d.ts +591 -0
  20. package/components/basetree/TreeNode.vue.d.ts +35 -0
  21. package/components/breadcrumb/Breadcrumb.vue.d.ts +26 -0
  22. package/components/button/Button.vue.d.ts +185 -0
  23. package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +35 -0
  24. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +104 -0
  25. package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
  26. package/components/buttondownload/ButtonDownload.vue.d.ts +49 -0
  27. package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
  28. package/components/buttonradio/ButtonRadio.vue.d.ts +257 -0
  29. package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
  30. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +198 -0
  31. package/components/buttonsplit/ButtonSplit.d.ts +350 -0
  32. package/components/buttonsplit/ButtonSplit.vue.d.ts +34 -0
  33. package/components/buttontoggle/ButtonToggle.vue.d.ts +18 -0
  34. package/components/calendar/BaseCalendar.vue.d.ts +86 -0
  35. package/components/calendar/Calendar.vue.d.ts +570 -0
  36. package/components/card/Card.vue.d.ts +139 -0
  37. package/components/checkbox/Checkbox.vue.d.ts +329 -0
  38. package/components/codesnippet/CodeSnippet.vue.d.ts +14 -0
  39. package/components/customcolumn/ColumnList.vue.d.ts +27 -0
  40. package/components/customcolumn/CustomColumn.vue.d.ts +37 -0
  41. package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +12 -0
  42. package/components/datatable/DataTable.vue.d.ts +735 -0
  43. package/components/datatable/MultiRow.vue.d.ts +16 -0
  44. package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +1 -0
  45. package/components/datatable/helpers/filter.helper.d.ts +28 -0
  46. package/components/datatable/helpers/index.d.ts +3 -0
  47. package/components/datatable/helpers/readConfig.helper.d.ts +2 -0
  48. package/components/datatable/store/dataTable.store.d.ts +22 -0
  49. package/components/dialog/Dialog.vue.d.ts +464 -0
  50. package/components/dialogconfirm/DialogConfirm.vue.d.ts +164 -0
  51. package/components/dialogform/DialogForm.vue.d.ts +349 -0
  52. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +136 -0
  53. package/components/dropdown/Dropdown.vue.d.ts +264 -0
  54. package/components/editor/CodeSnippetAdapter.vue.d.ts +92 -0
  55. package/components/editor/Editor.vue.d.ts +191 -0
  56. package/components/editor/EditorButton.vue.d.ts +15 -0
  57. package/components/editor/MentionList.vue.d.ts +35 -0
  58. package/components/editor/MentionSection.vue.d.ts +92 -0
  59. package/components/editor/codeSnippetExtension.d.ts +3 -0
  60. package/components/editor/mentionSectionExtension.d.ts +3 -0
  61. package/components/editor/suggestion.d.ts +2 -0
  62. package/components/fieldwrapper/FieldWrapper.vue.d.ts +69 -0
  63. package/components/fileupload/FileUpload.vue.d.ts +169 -0
  64. package/components/filtercontainer/FilterContainer.vue.d.ts +181 -0
  65. package/components/filtercontainer/helpers/applyFilter.helper.d.ts +5 -0
  66. package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +7 -0
  67. package/components/filtercontainer/helpers/getOption.helper.d.ts +3 -0
  68. package/components/form/Form.vue.d.ts +316 -0
  69. package/components/gallerypreview/GalleryPreview.vue.d.ts +31 -0
  70. package/components/helpers/convertToArrayClass.helper.d.ts +2 -0
  71. package/components/helpers/index.d.ts +2 -0
  72. package/components/helpers/label.d.ts +15 -0
  73. package/components/icon/Icon.vue.d.ts +256 -0
  74. package/components/image/Image.vue.d.ts +403 -0
  75. package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +36 -0
  76. package/components/imagecompressor/ImageCompressor.vue.d.ts +223 -0
  77. package/components/imagecompressor/ImageInputInfo.vue.d.ts +30 -0
  78. package/components/index.d.ts +63 -0
  79. package/components/inlinemessage/InlineMessage.vue.d.ts +167 -0
  80. package/components/inputbadge/InputBadge.vue.d.ts +122 -0
  81. package/components/inputcurrency/InputCurrency.vue.d.ts +170 -0
  82. package/components/inputcurrency/helpers/currency.helper.d.ts +4 -0
  83. package/components/inputemail/InputEmail.vue.d.ts +25 -0
  84. package/components/inputgroup/InputGroup.vue.d.ts +141 -0
  85. package/components/inputnumber/InputNumber.vue.d.ts +282 -0
  86. package/components/inputpassword/InputPassword.vue.d.ts +32 -0
  87. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
  88. package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +8 -0
  89. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +120 -0
  90. package/components/inputtext/InputText.vue.d.ts +352 -0
  91. package/components/inputurl/InputURL.vue.d.ts +39 -0
  92. package/components/invisiblefield/InvisibleField.vue.d.ts +36 -0
  93. package/components/languagedropdown/LanguageDropdown.vue.d.ts +50 -0
  94. package/components/languagedropdown/LanguageDropdownOption.vue.d.ts +18 -0
  95. package/components/languageswitcher/LanguageSwitcher.vue.d.ts +15 -0
  96. package/components/litedropdown/LiteDropdown.vue.d.ts +96 -0
  97. package/components/loading/Loading.vue.d.ts +47 -0
  98. package/components/loading/store/loading.store.d.ts +8 -0
  99. package/components/menu/Menu.vue.d.ts +390 -0
  100. package/components/menu/helpers/filterMenu.helper.d.ts +12 -0
  101. package/components/menu/helpers/index.d.ts +1 -0
  102. package/components/menuitem/MenuItem.vue.d.ts +19 -0
  103. package/components/menuitem/index.d.ts +106 -0
  104. package/components/multiselect/MultiSelect.vue.d.ts +192 -0
  105. package/components/overlaypanel/OverlayPanel.vue.d.ts +301 -0
  106. package/components/passthrough/index.d.ts +16 -0
  107. package/components/progressbar/ProgressBar.vue.d.ts +72 -0
  108. package/components/quickfilter/QuickFilter.vue.d.ts +25 -0
  109. package/components/tabmenu/TabMenu.vue.d.ts +288 -0
  110. package/components/textarea/Textarea.vue.d.ts +170 -0
  111. package/components/timeline/Timeline.vue.d.ts +115 -0
  112. package/components/timeline/TimelineContentByType.vue.d.ts +16 -0
  113. package/components/toast/Toast.vue.d.ts +367 -0
  114. package/components/toggleswitch/ToggleSwitch.vue.d.ts +281 -0
  115. package/components/tooltipspan/TooltipSpan.vue.d.ts +20 -0
  116. package/components/tree/Tree.vue.d.ts +148 -0
  117. package/components/tree/helpers/filterNodeKeys.helper.d.ts +16 -0
  118. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +6 -0
  119. package/components/tree/helpers/index.d.ts +3 -0
  120. package/components/treesearchinput/TreeSearchInput.vue.d.ts +16 -0
  121. package/components/ts-helpers.d.ts +83 -0
  122. package/components/usergroup/UserGroup.vue.d.ts +57 -0
  123. package/components/username/UserName.vue.d.ts +113 -0
  124. package/components/validatormessage/ValidatorMessage.vue.d.ts +12 -0
  125. package/config/defaultProps.d.ts +3 -0
  126. package/config/index.d.ts +3 -0
  127. package/config/locale.d.ts +3 -0
  128. package/directives/focus.d.ts +7 -0
  129. package/directives/index.d.ts +1 -0
  130. package/event-bus/index.d.ts +58 -0
  131. package/event-bus/mitt.d.ts +26 -0
  132. package/loading-page-BrQattYE.js +1 -0
  133. package/loading-page-CgfbWppy.js +1 -0
  134. package/loading-page-CoC9UhfC.js +4 -0
  135. package/loading-page-CoXtqoc9.js +4 -0
  136. package/loading-page-DbLuqCHa.js +1 -0
  137. package/loading-page-f8D03l3G.js +4 -0
  138. package/loading-plane-CgfbWppy.js +1 -0
  139. package/loading-plane-CoXtqoc9.js +4 -0
  140. package/loading-table-Bdr9ZhtP.js +1 -0
  141. package/loading-table-ByUoWqUo.js +4 -0
  142. package/loading-table-BygEMzFM.js +4 -0
  143. package/loading-table-BzrSQlA0.js +1 -0
  144. package/loading-table-D9bw9OcI.js +4 -0
  145. package/loading-table-chOgXi94.js +1 -0
  146. package/main.d.ts +2 -0
  147. package/no-data-CTKux8RI.js +4 -0
  148. package/no-data-Cgze_Rvp.js +1 -0
  149. package/no-data-DLHO1L_u.js +4 -0
  150. package/no-data-Dep79CBh.js +1 -0
  151. package/no-data-g0dJCy2p.js +4 -0
  152. package/no-data-y1X5WtcQ.js +1 -0
  153. package/package.json +16 -0
  154. package/plugins/WangsVue.d.ts +131 -0
  155. package/plugins/formValidation.d.ts +10 -0
  156. package/plugins/translation.d.ts +84 -0
  157. package/style.css +1 -0
  158. package/types/options.type.d.ts +16 -0
  159. package/utils/addAttachment.util.d.ts +43 -0
  160. package/utils/date.util.d.ts +46 -0
  161. package/utils/exportToExcel.util.d.ts +20 -0
  162. package/utils/filterOptions.util.d.ts +3 -0
  163. package/utils/genPlaceholder.util.d.ts +8 -0
  164. package/utils/getAttachmentIcon.util.d.ts +8 -0
  165. package/utils/index.d.ts +21 -0
  166. package/utils/mergePropsWithDefaults.util.d.ts +20 -0
  167. package/utils/object.util.d.ts +16 -0
  168. package/utils/role.util.d.ts +2 -0
  169. package/utils/textFormatter.util.d.ts +17 -0
  170. package/utils/toast.util.d.ts +120 -0
  171. package/wangsvue-fats.es.js +132743 -0
  172. package/wangsvue-fats.system.js +489 -0
@@ -0,0 +1,352 @@
1
+ /**
2
+ *
3
+ * InputText renders a text field to enter data.
4
+ *
5
+ * [Live Demo](https://www.WangsVue.org/inputtext/)
6
+ *
7
+ * @module inputtext
8
+ *
9
+ */
10
+ import { InputHTMLAttributes, Slot } from 'vue';
11
+ import { ComponentHooks } from '../basecomponent';
12
+ import { ClassComponent, Nullable } from '../ts-helpers';
13
+ import { CustomValidation } from '../form/Form.vue.d';
14
+ export declare type InputTextPassThroughOptionType<T = any> =
15
+ | InputTextPassThroughAttributes
16
+ | ((
17
+ options: InputTextPassThroughMethodOptions<T>,
18
+ ) => InputTextPassThroughAttributes | string)
19
+ | string
20
+ | null
21
+ | undefined;
22
+
23
+ export interface InputTextLocaleConfig {
24
+ /**
25
+ * @example 'Email format is incorrect'
26
+ */
27
+ emailFormatInvalidText?: string;
28
+
29
+ /**
30
+ * @example 'URL format is incorrect'
31
+ */
32
+ urlFormatInvalidText?: string;
33
+
34
+ /**
35
+ * @example '{label} sudah ada' - label will be replaced with props.label
36
+ */
37
+ alreadyExistInvalidText?: string;
38
+
39
+ /**
40
+ * @example '{label} must not be empty' - label will be replaced with props.label
41
+ */
42
+ emptyInvalidText?: string;
43
+
44
+ /**
45
+ * @example 'Max. {maxLength} characters' - maxLength will be replaced with props.maxLength
46
+ */
47
+ exceedMaxLengthInvalidText?: string;
48
+
49
+ /**
50
+ * @example 'Cannot include any special characters'
51
+ */
52
+ includeSpecialCharsInvalidText?: string;
53
+
54
+ /**
55
+ * @example 'Tulis {label}' - label can be ommited, and if exist will be replaced with props.label
56
+ */
57
+ defaultPlaceholder?: string;
58
+ }
59
+
60
+ /**
61
+ * Custom passthrough(pt) option method.
62
+ */
63
+ export interface InputTextPassThroughMethodOptions<T = any> {
64
+ /**
65
+ * Defines instance.
66
+ */
67
+ instance: any;
68
+
69
+ /**
70
+ * Defines valid properties.
71
+ */
72
+ props: InputTextProps;
73
+
74
+ /**
75
+ * Defines current options.
76
+ */
77
+ context: InputTextContext;
78
+
79
+ /**
80
+ * Defines parent instance.
81
+ */
82
+ parent: T;
83
+
84
+ /**
85
+ * Defines passthrough(pt) options in global config.
86
+ */
87
+ global: object | undefined;
88
+ }
89
+
90
+ /**
91
+ * Custom passthrough(pt) options.
92
+ * @see {@link InputTextProps.pt}
93
+ */
94
+ export interface InputTextPassThroughOptions<T = any> {
95
+ /**
96
+ * Used to pass attributes to the root's DOM element.
97
+ */
98
+ root?: InputTextPassThroughOptionType<T>;
99
+
100
+ /**
101
+ * Used to manage all lifecycle hooks.
102
+ * @see {@link BaseComponent.ComponentHooks}
103
+ */
104
+ hooks?: ComponentHooks;
105
+ }
106
+
107
+ /**
108
+ * Custom passthrough attributes for each DOM elements
109
+ */
110
+ export interface InputTextPassThroughAttributes {
111
+ [key: string]: any;
112
+ }
113
+
114
+ /**
115
+ * Defines current options in InputText component.
116
+ */
117
+ export interface InputTextContext {
118
+ /**
119
+ * Current filled state of the component as a boolean.
120
+ * @defaultValue false
121
+ */
122
+ filled: boolean;
123
+
124
+ /**
125
+ * Current disabled state of the component as a boolean.
126
+ * @defaultValue false
127
+ */
128
+ disabled: boolean;
129
+ }
130
+
131
+ /**
132
+ * Defines valid properties in InputText component.
133
+ */
134
+ export interface InputTextProps extends /* @vue-ignore */ InputHTMLAttributes {
135
+ allowedCharacters?: RegExp;
136
+
137
+ /**
138
+ * Determine whether inputted text should be automatically converted to uppercase or not.
139
+ *
140
+ * @default false
141
+ */
142
+ autoUppercase?: boolean;
143
+
144
+ /**
145
+ * String modelValue of the input.
146
+ */
147
+ modelValue?: Nullable<string>;
148
+
149
+ /**
150
+ * Sets the initial value of the field.
151
+ * This will only available with option 'useValidator'.
152
+ *
153
+ * In usecase like edit form, you need to display the previous inputted value.
154
+ */
155
+ value?: string;
156
+
157
+ /**
158
+ * Exisitng values to be checkeed with validation 'exist' - check the validatorMessage props
159
+ *
160
+ * - Need to specify the custom validation : { empty: 'Error message when empty' } within props validatorMessage
161
+ */
162
+ existingValues?: string[];
163
+
164
+ /**
165
+ * Check avaialability of the value.
166
+ *
167
+ * @returns {boolean} - Return true if the value is available, otherwise false.
168
+ */
169
+ checkAvailability?: (value: string) => Promise<boolean> | boolean;
170
+
171
+ /**
172
+ * The maximun character length allowed.
173
+ *
174
+ * @default 30 - for inputText;
175
+ * @default unlimited - for textarea and inputurl;
176
+ * @default 60 - for InputEmail
177
+ *
178
+ * Pass Infinity to allow unlimited length.
179
+ * @example `:max-length="Infinity"`
180
+ */
181
+ maxLength?: number;
182
+
183
+ /**
184
+ * The input label. Tell the user what input is this.
185
+ */
186
+ label?: string;
187
+
188
+ /**
189
+ * Wether the input should be validated with vee-validator or not.
190
+ * If you use this component within form input, you need to set this props as true.
191
+ */
192
+ useValidator?: boolean;
193
+
194
+ /**
195
+ * This prop is required if you use this component in a form input.
196
+ * Specify the unique field name, match with your needs for API request.
197
+ *
198
+ * @default 'textInput'
199
+ */
200
+ fieldName?: string;
201
+
202
+ /**
203
+ * Wether this input field is required or not.
204
+ */
205
+ mandatory?: boolean;
206
+
207
+ /**
208
+ * Invalid input state.
209
+ */
210
+ invalid?: boolean;
211
+
212
+ /**
213
+ * Set manual invalid input container state.
214
+ *
215
+ * @todo: review the usage of this props
216
+ */
217
+ manualInvalidContainer?: boolean;
218
+
219
+ /**
220
+ * Set custom validator message.
221
+ * Will be show if invalid="true" or in some conditions. {@link Condition}
222
+ *
223
+ * @example: 'This field is required'
224
+ * @example: { empty: 'This field is required', invalidFormat: 'Email format incorrect' }
225
+ */
226
+ validatorMessage?:
227
+ | string
228
+ | CustomValidation<'empty' | 'exceed' | 'invalidFormat' | 'exist'>;
229
+
230
+ /**
231
+ * Classes for validator message in input field.
232
+ */
233
+ validatorMessageClass?: string;
234
+
235
+ /**
236
+ * Specify the input placeholder.
237
+ *
238
+ * @default 'Enter {label}' or 'Enter {type}'
239
+ */
240
+ placeholder?: string;
241
+
242
+ /**
243
+ * Specify the validation type. Wether 'email' or 'text' validation.
244
+ */
245
+ type?: 'email' | 'text' | 'url' | 'initialname' | 'repositoryname';
246
+
247
+ /**
248
+ * Disabled the input.
249
+ */
250
+ disabled?: boolean;
251
+
252
+ /**
253
+ * Show information to user about the field.
254
+ */
255
+ fieldInfo?: string;
256
+
257
+ /**
258
+ * Specify classes for input.
259
+ */
260
+ inputClass?: string;
261
+
262
+ /**
263
+ * Specify classes for input container.
264
+ */
265
+ inputContainerClass?: string;
266
+
267
+ /**
268
+ * Specify classes for label.
269
+ */
270
+ labelClass?: string;
271
+
272
+ /**
273
+ * Auto blur while input value has reached the max length.
274
+ *
275
+ * @deprecated This will be removed in the next major update. Use {@link preventInputOnMaxLength} instead.
276
+ */
277
+ blurOnReachMaxLength?: boolean;
278
+
279
+ /**
280
+ * Prevent input once the max length is reached, allowing only backspace.
281
+ *
282
+ * @default false
283
+ */
284
+ preventInputOnMaxLength?: boolean;
285
+
286
+ /**
287
+ * Validate the input on blur event.
288
+ *
289
+ * @default false - on input event
290
+ */
291
+ validateOnBlur?: boolean;
292
+
293
+ /**
294
+ * For Input URL, whether validate the protocol http/https
295
+ *
296
+ * @default true
297
+ */
298
+ useProtocol?: boolean;
299
+
300
+ /**
301
+ * Allow user to input special characters
302
+ *
303
+ * @default true
304
+ */
305
+ allowSpecialCharacters?: boolean;
306
+
307
+ /**
308
+ * Wether the input should be wrapped with InputGroup Component or not.
309
+ * Currently used for InputPhoneNumber.
310
+ */
311
+ useInputGroup?: boolean;
312
+
313
+ /**
314
+ * Unique id for input number element
315
+ */
316
+ inputId?: string;
317
+ }
318
+
319
+ /**
320
+ * Defines valid emits in InputText component.
321
+ */
322
+ export type InputTextEmits = {
323
+ /**
324
+ * Emitted when the value changes.
325
+ * @param {string} value - New value.
326
+ */
327
+ 'update:modelValue': [value: string | undefined];
328
+ 'blur': [payload?: Nullable<string>];
329
+ 'input': [payload?: Nullable<string>];
330
+ };
331
+
332
+ export type InputTextSlots = {
333
+ 'addon-left': Slot;
334
+ 'addon-right': Slot;
335
+ };
336
+
337
+ /**
338
+ * **WangsVue - InputText**
339
+ *
340
+ * _InputText renders a text field to enter data._
341
+ *
342
+ * --- ---
343
+ *
344
+ * @group Component
345
+ */
346
+ declare class InputText extends ClassComponent<
347
+ InputTextProps,
348
+ InputTextSlots,
349
+ InputTextEmits
350
+ > {}
351
+
352
+ export default InputText;
@@ -0,0 +1,39 @@
1
+ import { Slot } from 'vue';
2
+ import { ClassComponent } from '../ts-helpers';
3
+ import {
4
+ InputTextEmits,
5
+ InputTextProps,
6
+ } from 'lib/components/inputtext/InputText.vue.d';
7
+
8
+ /**
9
+ * InputURL component props
10
+ */
11
+ export type InputURLProps = Omit<InputTextProps, 'type'>;
12
+
13
+ /**
14
+ * InputURL component emits
15
+ */
16
+ export type InputURLEmits = InputTextEmits;
17
+
18
+ export type InputURLSlots = {
19
+ 'addon-left': Slot;
20
+ 'addon-right': Slot;
21
+ };
22
+
23
+ /**
24
+ * **WangsVue - InputURL**
25
+ *
26
+ * _Handle input url with form validation._
27
+ *
28
+ * --- ---
29
+ * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
30
+ *
31
+ * @group form
32
+ */
33
+ declare class InputURL extends ClassComponent<
34
+ InputURLProps,
35
+ InputURLSlots,
36
+ InputURLEmits
37
+ > {}
38
+
39
+ export default InputURL;
@@ -0,0 +1,36 @@
1
+ import { Nullable } from '../ts-helpers';
2
+ type FieldValue = Nullable<string> | Nullable<number> | string | string[] | number | number[] | boolean | undefined | null | object;
3
+ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
4
+ value?: FieldValue;
5
+ fieldName?: string;
6
+ }>, {
7
+ value: any;
8
+ fieldName: string;
9
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
10
+ value?: FieldValue;
11
+ fieldName?: string;
12
+ }>, {
13
+ value: any;
14
+ fieldName: string;
15
+ }>>>, {
16
+ value: FieldValue;
17
+ fieldName: string;
18
+ }, {}>;
19
+ export default _default;
20
+ type __VLS_WithDefaults<P, D> = {
21
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
22
+ default: D[K];
23
+ }> : P[K];
24
+ };
25
+ type __VLS_Prettify<T> = {
26
+ [K in keyof T]: T[K];
27
+ } & {};
28
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
29
+ type __VLS_TypePropsToOption<T> = {
30
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
31
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
32
+ } : {
33
+ type: import('vue').PropType<T[K]>;
34
+ required: true;
35
+ };
36
+ };
@@ -0,0 +1,50 @@
1
+ import { DropdownEmits, DropdownProps } from '../dropdown/Dropdown.vue.d';
2
+ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
3
+
4
+ export interface LanguageOption {
5
+ /**
6
+ * The name of the language, written in English for universal readability.
7
+ */
8
+ /**
9
+ * ISO 639-1 language code (e.g., "en" for English, "fr" for French).
10
+ */
11
+ language?: string;
12
+
13
+ /**
14
+ * The name of the language in English (e.g., "English", "Français").
15
+ */
16
+ name: string;
17
+
18
+ /**
19
+ * The URL of the country's flag image.
20
+ * Flags are sourced from https://flagcdn.com and are typically in SVG format for high-quality resolution.
21
+ */
22
+ flag?: string;
23
+ }
24
+
25
+ export type LanguageDropdownProps = DropdownProps & {};
26
+ export type LanguageDropdownEmits = DropdownEmits & {};
27
+
28
+ /**
29
+ * **WangsVue - Dropdown**
30
+ *
31
+ * _Dropdown also known as Select, is used to choose an item from a collection of options._
32
+ *
33
+ * --- ---
34
+ * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
35
+ *
36
+ * @group Component
37
+ */
38
+ declare class LanguageDropdown extends ClassComponent<
39
+ LanguageDropdownProps,
40
+ unknown,
41
+ LanguageDropdownEmits
42
+ > {}
43
+
44
+ declare module '@vue/runtime-core' {
45
+ interface GlobalComponents {
46
+ LanguageDropdown: GlobalComponentConstructor<LanguageDropdown>;
47
+ }
48
+ }
49
+
50
+ export default LanguageDropdown;
@@ -0,0 +1,18 @@
1
+ import { LanguageOption } from './LanguageDropdown.vue.d';
2
+ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
3
+ option: LanguageOption;
4
+ iconOnly?: boolean;
5
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<{
6
+ option: LanguageOption;
7
+ iconOnly?: boolean;
8
+ }>>>, {}, {}>;
9
+ export default _default;
10
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
+ type __VLS_TypePropsToOption<T> = {
12
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
13
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
14
+ } : {
15
+ type: import('vue').PropType<T[K]>;
16
+ required: true;
17
+ };
18
+ };
@@ -0,0 +1,15 @@
1
+ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
2
+
3
+ declare class LanguageSwitcher extends ClassComponent<
4
+ unknown,
5
+ unknown,
6
+ unknown
7
+ > {}
8
+
9
+ declare module '@vue/runtime-core' {
10
+ interface GlobalComponents {
11
+ LanguageSwitcher: GlobalComponentConstructor<LanguageSwitcher>;
12
+ }
13
+ }
14
+
15
+ export default LanguageSwitcher;
@@ -0,0 +1,96 @@
1
+ import { DropdownOption, OptionValue } from 'lib/types/options.type';
2
+ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
3
+ import { DropdownChangeEvent } from 'primevue/dropdown';
4
+
5
+ /**
6
+ * Lite dropdown component props
7
+ */
8
+ export interface LiteDropdownProps {
9
+ modelValue: OptionValue | undefined;
10
+ options: DropdownOption[] | undefined;
11
+ /**
12
+ * Specify the property name of option to be used as label.
13
+ *
14
+ * @default undefined - the label will be sets to the option itself.
15
+ */
16
+ optionLabel: string;
17
+ /**
18
+ * Specify the property name of option to be used as value.
19
+ *
20
+ * @default undefined - the value will be sets to the option itself.
21
+ */
22
+ optionValue: string;
23
+ /**
24
+ * Determines if the field is mandatory
25
+ */
26
+ mandatory?: boolean;
27
+ /**
28
+ * Default text to display when no option is selected.
29
+ *
30
+ * @default `Pilih data`
31
+ */
32
+ placeholder?: string;
33
+ /**
34
+ * Whether the dropdown is in loading state.
35
+ * @defaultValue false
36
+ */
37
+ loading?: boolean;
38
+ /**
39
+ * Set disabled state for input dropdown.
40
+ */
41
+ disabled?: boolean;
42
+ /**
43
+ * Wether show the Dropdown option search or not.
44
+ *
45
+ * @default true,
46
+ */
47
+ filter?: boolean;
48
+ /**
49
+ * The filter input Placeholder
50
+ *
51
+ * @default 'Cari'
52
+ */
53
+ filterPlaceholder?: string;
54
+ }
55
+
56
+ /**
57
+ * Lite dropdown component emits
58
+ */
59
+ export type LiteDropdownEmits = {
60
+ /**
61
+ * Emits when an option selected.
62
+ */
63
+ 'update:modelValue': [value: OptionValue | undefined];
64
+ /**
65
+ * Emits when overlay shown.
66
+ */
67
+ 'show': [];
68
+ /**
69
+ * Emits when there is a change on the dropdown value.
70
+ */
71
+ 'change': [value: DropdownChangeEvent];
72
+ };
73
+
74
+ /**
75
+ * **WangsVue - LiteDropwdown**
76
+ *
77
+ * _LiteDropdown, a lite version of the Dropdown component._
78
+ *
79
+ * --- ---
80
+ * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
81
+ *
82
+ * @group Component
83
+ */
84
+ declare class LiteDropdown extends ClassComponent<
85
+ LiteDropdownProps,
86
+ unknown,
87
+ LiteDropdownEmits
88
+ > {}
89
+
90
+ declare module '@vue/runtime-core' {
91
+ interface GlobalComponents {
92
+ Dropdown: GlobalComponentConstructor<LiteDropdown>;
93
+ }
94
+ }
95
+
96
+ export default LiteDropdown;
@@ -0,0 +1,47 @@
1
+ import { DefineComponent } from 'vue';
2
+
3
+ /**
4
+ * Attributes for Loading pass-through customization.
5
+ */
6
+ export interface LoadingPresetAttributes {
7
+ class?: any;
8
+ style?: any;
9
+ [key: string]: any;
10
+ }
11
+
12
+ export interface LoadingPresetOptions {
13
+ root: LoadingPresetAttributes;
14
+ animation: LoadingPresetAttributes;
15
+ }
16
+
17
+ /**
18
+ * **TSVue - Loading**
19
+ *
20
+ * _Tag Samurai Loading Overlay Animation._
21
+ *
22
+ * #### Example
23
+ *
24
+ * Script:
25
+ * ```ts
26
+ * import { Loading, useLoadingStore } from 'wangsvue';
27
+ *
28
+ * const { setLoading } = useLoadingStore();
29
+ *
30
+ * onMounted(() => {
31
+ * setLoading(true);
32
+ * });
33
+ * ```
34
+ * ---
35
+ * Template:
36
+ * ```html
37
+ * <Loading />
38
+ * ```
39
+ *
40
+ * --- ---
41
+ * ![TSVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
42
+ *
43
+ * @group form
44
+ */
45
+ declare const Loading: DefineComponent;
46
+
47
+ export default Loading;
@@ -0,0 +1,8 @@
1
+ import { Ref } from 'vue';
2
+ export interface LoadingStore {
3
+ loading: Ref<boolean>;
4
+ message: Ref<string | undefined>;
5
+ setLoading: (state: boolean, message?: string) => void;
6
+ }
7
+ declare const useLoadingStore: () => LoadingStore;
8
+ export default useLoadingStore;