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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) 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 +34 -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 +188 -0
  11. package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +35 -0
  12. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +104 -0
  13. package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
  14. package/components/buttondownload/ButtonDownload.vue.d.ts +49 -0
  15. package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
  16. package/components/buttonradio/ButtonRadio.vue.d.ts +257 -0
  17. package/components/buttonscan/ButtonScan.vue.d.ts +201 -0
  18. package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
  19. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +200 -0
  20. package/components/buttonsplit/ButtonSplit.vue.d.ts +350 -0
  21. package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
  22. package/components/buttontoggle/ButtonToggle.vue.d.ts +18 -0
  23. package/components/buttonviewlog/ButtonViewLog.vue.d.ts +17 -0
  24. package/components/calendar/Calendar.vue.d.ts +570 -0
  25. package/components/card/Card.vue.d.ts +139 -0
  26. package/components/checkbox/Checkbox.vue.d.ts +329 -0
  27. package/components/customcolumn/CustomColumn.vue.d.ts +37 -0
  28. package/components/datatable/DataTable.vue.d.ts +735 -0
  29. package/components/dialog/Dialog.vue.d.ts +464 -0
  30. package/components/dialogconfirm/DialogConfirm.vue.d.ts +164 -0
  31. package/components/dialogform/DialogForm.vue.d.ts +349 -0
  32. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +136 -0
  33. package/components/dropdown/Dropdown.vue.d.ts +274 -0
  34. package/components/editor/Editor.vue.d.ts +191 -0
  35. package/components/fieldwrapper/FieldWrapper.vue.d.ts +69 -0
  36. package/components/fileupload/FileUpload.vue.d.ts +169 -0
  37. package/components/filtercontainer/FilterContainer.vue.d.ts +184 -0
  38. package/components/form/Form.vue.d.ts +316 -0
  39. package/components/icon/Icon.vue.d.ts +256 -0
  40. package/components/image/Image.vue.d.ts +403 -0
  41. package/components/imagecompressor/ImageCompressor.vue.d.ts +229 -0
  42. package/components/index.d.ts +58 -0
  43. package/components/inputbadge/InputBadge.vue.d.ts +122 -0
  44. package/components/inputcurrency/InputCurrency.vue.d.ts +170 -0
  45. package/components/inputcurrency/helpers/currency.helper.d.ts +8 -0
  46. package/components/inputemail/InputEmail.vue.d.ts +25 -0
  47. package/components/inputnumber/InputNumber.vue.d.ts +282 -0
  48. package/components/inputpassword/InputPassword.vue.d.ts +32 -0
  49. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
  50. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +120 -0
  51. package/components/inputsearch/InputSearch.vue.d.ts +36 -0
  52. package/components/inputtext/InputText.vue.d.ts +352 -0
  53. package/components/inputurl/InputURL.vue.d.ts +39 -0
  54. package/components/invisiblefield/InvisibleField.vue.d.ts +32 -0
  55. package/components/languagedropdown/LanguageDropdown.vue.d.ts +32 -0
  56. package/components/litedropdown/LiteDropdown.vue.d.ts +96 -0
  57. package/components/loading/Loading.vue.d.ts +47 -0
  58. package/components/loading/store/loading.store.d.ts +8 -0
  59. package/components/menu/Menu.vue.d.ts +390 -0
  60. package/components/menuitem/index.d.ts +106 -0
  61. package/components/multiselect/MultiSelect.vue.d.ts +194 -0
  62. package/components/overlaypanel/OverlayPanel.vue.d.ts +301 -0
  63. package/components/passthrough/index.d.ts +16 -0
  64. package/components/tabmenu/TabMenu.vue.d.ts +288 -0
  65. package/components/textarea/Textarea.vue.d.ts +170 -0
  66. package/components/timeline/Timeline.vue.d.ts +121 -0
  67. package/components/toast/Toast.vue.d.ts +367 -0
  68. package/components/toggleswitch/ToggleSwitch.vue.d.ts +281 -0
  69. package/components/tree/Tree.vue.d.ts +148 -0
  70. package/components/tree/helpers/filterNodeKeys.helper.d.ts +22 -0
  71. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +8 -0
  72. package/components/treesearchinput/TreeSearchInput.vue.d.ts +16 -0
  73. package/components/ts-helpers.d.ts +83 -0
  74. package/components/username/UserName.vue.d.ts +113 -0
  75. package/components/userwithicon/UserWithIcon.vue.d.ts +20 -0
  76. package/config/defaultProps.d.ts +3 -0
  77. package/config/index.d.ts +3 -0
  78. package/config/locale.d.ts +3 -0
  79. package/directives/focus.d.ts +1 -1
  80. package/event-bus/index.d.ts +51 -51
  81. package/event-bus/mitt.d.ts +29 -14
  82. package/main.d.ts +31 -0
  83. package/package.json +8 -4
  84. package/plugins/WangsVue.d.ts +249 -199
  85. package/plugins/formValidation.d.ts +15 -6
  86. package/plugins/i18n-extension.d.ts +4 -0
  87. package/plugins/i18n.d.ts +82 -78
  88. package/utils/date.util.d.ts +59 -30
  89. package/utils/getSeverityByAssetStatus.util.d.ts +3 -0
  90. package/utils/index.d.ts +8 -0
  91. package/utils/listenSidebarChanges.util.d.ts +16 -0
  92. package/utils/object.util.d.ts +14 -3
  93. package/utils/role.util.d.ts +68 -0
  94. package/utils/toast.util.d.ts +78 -78
  95. package/utils/addAttachment.util.d.ts +0 -43
  96. package/utils/exportToExcel.util.d.ts +0 -20
  97. package/utils/filterOptions.util.d.ts +0 -3
  98. package/utils/genPlaceholder.util.d.ts +0 -8
  99. package/utils/getAttachmentIcon.util.d.ts +0 -8
  100. package/utils/mergePropsWithDefaults.util.d.ts +0 -20
  101. package/utils/textFormatter.util.d.ts +0 -17
@@ -0,0 +1,229 @@
1
+ import { CustomValidation } from '../form/Form.vue.d';
2
+ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
3
+
4
+ export interface ImageCompressorLocaleConfig {
5
+ cropDialogHeader: string;
6
+ /**
7
+ * @example 'Gunakan Ctrl + Scroll untuk perbesar atau perkecil gambar'
8
+ */
9
+ cropperCtrlScrollInfo: string;
10
+ /**
11
+ * @example 'Gunakan dua jari untuk untuk perbesar atau perkecil gambar'
12
+ */
13
+ cropperTwoFingerInfo: string;
14
+
15
+ /**
16
+ * @example 'Maks. 1 MB'
17
+ */
18
+ maxSizeRequirement: string;
19
+
20
+ /**
21
+ * @example 'Hanya mendukung format gambar'
22
+ */
23
+ imageTypeRequirement: string;
24
+
25
+ cancelCropLabel: string;
26
+ changeImageLabel: string;
27
+ applyCropLabel: string;
28
+ }
29
+
30
+ export type Image = {
31
+ src: string | null;
32
+ type: string | null;
33
+ };
34
+
35
+ export type ImageCompressorPayload = {
36
+ canvas: HTMLCanvasElement | undefined;
37
+ compressed: {
38
+ blob: string | Blob;
39
+ base64: string;
40
+ fileName: string;
41
+ file: File;
42
+ size: string;
43
+ type: 'image/webp' | 'image/jpeg' | 'image/jpg';
44
+ };
45
+ message?: string;
46
+ };
47
+
48
+ export interface ImageCompressorProps {
49
+ /**
50
+ * Specify the user initial name for the Image Placeholder
51
+ *
52
+ * max-length: 3
53
+ */
54
+ initialName?: string;
55
+ /**
56
+ * Specify the input type, wether single ro multiple image input.
57
+ *
58
+ * @default false - single input.
59
+ */
60
+ multiple?: boolean;
61
+ /**
62
+ * The default image index 0 / 1
63
+ */
64
+ defaultImage?: number;
65
+ /**
66
+ * Disable the image input.
67
+ *
68
+ * @todo add disabled state.
69
+ */
70
+ disabled?: boolean;
71
+ /**
72
+ * Display a compressed Blob image or a string objectURL of a Blob when mounted.
73
+ */
74
+ compressedBlob?: string | Blob | (string | Blob)[];
75
+ /**
76
+ * Display an image with the URL instead.
77
+ */
78
+ imagePreviewUrl?: string | string[];
79
+ /**
80
+ * Specify the size image input and preview size.
81
+ *
82
+ * - small: 30px
83
+ * - medium: 80px
84
+ * - big: 125*125 px
85
+ *
86
+ * @todo Add small size. Currently only support big size.
87
+ * @default 'big'
88
+ */
89
+ imagePreviewSize?: 'small' | 'medium' | 'big';
90
+ /**
91
+ * Specify the rounded level.
92
+ *
93
+ * If true, the image will be full rounded.
94
+ *
95
+ * @default 'false'
96
+ */
97
+ rounded?: boolean;
98
+ /**
99
+ * Specify whether the image able to be deleted or not (in case image only able to added and edited)
100
+ *
101
+ * @default true
102
+ */
103
+ useDeleteButton?: boolean;
104
+ /**
105
+ * Specify whether the image input will be used as field within Form validation.
106
+ *
107
+ */
108
+ useValidator?: boolean;
109
+ /**
110
+ * Specify if the field is required or not.
111
+ */
112
+ mandatory?: boolean;
113
+ /**
114
+ * Set the invalid state and display the custom validator message.
115
+ */
116
+ invalid?: boolean;
117
+ /**
118
+ * Set custom validation message.
119
+ */
120
+ validatorMessage?: string | CustomValidation;
121
+ /**
122
+ * The field label.
123
+ *
124
+ * @default undefined - if props.useValidator not presents.
125
+ * @default 'Photo' - if props.useValidator presents.
126
+ */
127
+ label?: string;
128
+ /**
129
+ * Specify the field name to make the input available on form validation payload.
130
+ *
131
+ * @default 'imageInput'
132
+ */
133
+ fieldName?: string;
134
+ /**
135
+ * Display field information as tooltip.
136
+ */
137
+ fieldInfo?: string;
138
+ /**
139
+ * Show the image requirement info section.
140
+ *
141
+ * @default true
142
+ */
143
+ showInfo?: boolean;
144
+ /**
145
+ * Change the requirements of the photo
146
+ *
147
+ * @default undefined - will use maxSizeRequirement, imageTypeRequirement from LocaleConfig
148
+ */
149
+ customRequirements?: string[];
150
+ /**
151
+ * Show dialog confirmation before delete the image.
152
+ */
153
+ confirmOnDelete?: boolean;
154
+ /**
155
+ * On clicking delete button, emit the delete function instead of deleting the image.
156
+ * Useful when showing custom dialog confirmation.
157
+ */
158
+ emitDeleteFn?: boolean;
159
+ /**
160
+ * Show the validation message section.
161
+ *
162
+ * @default true
163
+ */
164
+ showValidatorMessage?: boolean;
165
+ /**
166
+ * Specify the file type for the uploaded image result.
167
+ *
168
+ * @default 'webp'
169
+ */
170
+ fileType?: 'webp' | 'jpeg' | 'jpg';
171
+ }
172
+
173
+ export interface ImageCompressorSlots {
174
+ [key: string]: unknown;
175
+ }
176
+
177
+ export type ImageCompressorEmits = {
178
+ /**
179
+ * On apply the image cropper.
180
+ */
181
+ 'apply': [value: ImageCompressorPayload];
182
+ /**
183
+ * On apply image from props.
184
+ */
185
+ 'applyProp': [];
186
+ 'update:defaultImage': [index?: number];
187
+ /**
188
+ * On delete button clicked.
189
+ *
190
+ * When confirmOnDelete / emitDelete is true, this emit will be emitted with a delete function.
191
+ * You need to call the function inside your own delete funcition to clear the image.
192
+ *
193
+ * @param deleteFn - the function delete
194
+ * @param index - the index of image to be deleted
195
+ */
196
+ 'delete': [deleteFn?: (index?: number) => void, index?: number];
197
+ };
198
+
199
+ /**
200
+ * **WangsVue - ImageCompressor**
201
+ *
202
+ * _Handle image input and compression._
203
+ *
204
+ * --- ---
205
+ * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
206
+ *
207
+ * @group Component
208
+ *
209
+ */
210
+ declare class ImageCompressor extends ClassComponent<
211
+ ImageCompressorProps,
212
+ ImageCompressorSlots,
213
+ ImageCompressorEmits
214
+ > {
215
+ /**
216
+ * Exposed function to assign image from props.
217
+ *
218
+ * @param isDelete
219
+ */
220
+ assignPreviewImagesFromProp(isDelete?: boolean): Promise<void>;
221
+ }
222
+
223
+ declare module '@vue/runtime-core' {
224
+ interface GlobalComponents {
225
+ ImageCompressor: GlobalComponentConstructor<ImageCompressor>;
226
+ }
227
+ }
228
+
229
+ export default ImageCompressor;
@@ -0,0 +1,58 @@
1
+ export { default as ApproverInfo } from './approverinfo/ApproverInfo.vue';
2
+ export { default as Badge } from './badge/Badge.vue';
3
+ export { default as BadgeGroup } from './badgegroup/BadgeGroup.vue';
4
+ export { default as BaseTree } from './basetree/BaseTree.vue';
5
+ export { default as Breadcrumb } from './breadcrumb/Breadcrumb.vue';
6
+ export { default as Button } from './button/Button.vue';
7
+ export { default as ButtonBulkAction } from './buttonbulkaction/ButtonBulkAction.vue';
8
+ export { default as ButtonCopy } from './buttoncopy/ButtonCopy.vue';
9
+ export { default as ButtonDownload } from './buttondownload/ButtonDownload.vue';
10
+ export { default as ButtonFilter } from './buttonfilter/ButtonFilter.vue';
11
+ export { default as ButtonRadio } from './buttonradio/ButtonRadio.vue';
12
+ export { default as ButtonScan } from './buttonscan/ButtonScan.vue';
13
+ export { default as ButtonSearch } from './buttonsearch/ButtonSearch.vue';
14
+ export { default as ButtonSelectTree } from './buttonselecttree/ButtonSelectTree.vue';
15
+ export { default as ButtonSync } from './buttonsync/ButtonSync.vue';
16
+ export { default as ButtonToggle } from './buttontoggle/ButtonToggle.vue';
17
+ export { default as Calendar } from './calendar/Calendar.vue';
18
+ export { default as Card } from './card/Card.vue';
19
+ export { default as Checkbox } from './checkbox/Checkbox.vue';
20
+ export { default as DataTable } from './datatable/DataTable.vue';
21
+ export { default as Dialog } from './dialog/Dialog.vue';
22
+ export { default as DialogConfirm } from './dialogconfirm/DialogConfirm.vue';
23
+ export { default as DialogForm } from './dialogform/DialogForm.vue';
24
+ export { default as DialogSelectTree } from './dialogselecttree/DialogSelectTree.vue';
25
+ export { default as Dropdown } from './dropdown/Dropdown.vue';
26
+ export { default as FileUpload } from './fileupload/FileUpload.vue';
27
+ export { default as Form } from './form/Form.vue';
28
+ export { default as Icon } from './icon/Icon.vue';
29
+ export { default as Image } from './image/Image.vue';
30
+ export { default as ImageCompressor } from './imagecompressor/ImageCompressor.vue';
31
+ export { default as InputBadge } from './inputbadge/InputBadge.vue';
32
+ export { default as InputCurrency } from './inputcurrency/InputCurrency.vue';
33
+ export { default as InputEmail } from './inputemail/InputEmail.vue';
34
+ export { default as InputNumber } from './inputnumber/InputNumber.vue';
35
+ export { default as InputPassword } from './inputpassword/InputPassword.vue';
36
+ export { default as InputPhoneNumber } from './inputphonenumber/InputPhoneNumber.vue';
37
+ export { default as InputRangeNumber } from './inputrangenumber/InputRangeNumber.vue';
38
+ export { default as InputText } from './inputtext/InputText.vue';
39
+ export { default as InputURL } from './inputurl/InputURL.vue';
40
+ export { default as InvisibleField } from './invisiblefield/InvisibleField.vue';
41
+ export { default as LiteDropdown } from './litedropdown/LiteDropdown.vue';
42
+ export { default as Loading } from './loading/Loading.vue';
43
+ export { default as Menu } from './menu/Menu.vue';
44
+ export { default as MultiSelect } from './multiselect/MultiSelect.vue';
45
+ export { default as OverlayPanel } from './overlaypanel/OverlayPanel.vue';
46
+ export { default as TabMenu } from './tabmenu/TabMenu.vue';
47
+ export { default as Textarea } from './textarea/Textarea.vue';
48
+ export { default as Timeline } from './timeline/Timeline.vue';
49
+ export { default as Toast } from './toast/Toast.vue';
50
+ export { default as ToggleSwitch } from './toggleswitch/ToggleSwitch.vue';
51
+ export { default as Tree } from './tree/Tree.vue';
52
+ export { default as UserName } from './username/UserName.vue';
53
+
54
+ export { default as AssetInfo } from './assetinfo/AssetInfo.vue';
55
+ export { default as ButtonViewLog } from './buttonviewlog/ButtonViewLog.vue';
56
+ export { default as UserWithIcon } from './userwithicon/UserWithIcon.vue';
57
+ export { default as FilterContainer } from './filtercontainer/FilterContainer.vue';
58
+ export { default as InputSearch } from './inputsearch/InputSearch.vue';
@@ -0,0 +1,122 @@
1
+ import { CustomValidation } from '../form/Form.vue.d';
2
+ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
3
+
4
+ /**
5
+ * InputBadge component props
6
+ */
7
+ export interface InputBadgeProps {
8
+ /**
9
+ * The type of input, whether input text or input email
10
+ *
11
+ * @default text
12
+ */
13
+ type?: 'text' | 'email';
14
+ /**
15
+ * The model value. Used for input without validation.
16
+ */
17
+ modelValue?: string[];
18
+ /**
19
+ * Sets the initial value of the field.
20
+ * This will only available with option 'useValidator'.
21
+ *
22
+ * In use case like edit form, you need to display the previous inputted value.
23
+ */
24
+ initialValue?: string[];
25
+ /**
26
+ * Determines if the field uses a validator
27
+ */
28
+ useValidator?: boolean;
29
+ /**
30
+ * Exisitng values to be checkeed with validation 'exist' - check the validatorMessage props
31
+ *
32
+ * - Need to specify the custom validation : { empty: 'Error message when empty' } within props validatorMessage
33
+ */
34
+ existingValues?: string[];
35
+ /**
36
+ * Determines if the field is mandatory
37
+ */
38
+ mandatory?: boolean;
39
+ /**
40
+ * Set custom validator message.
41
+ */
42
+ validatorMessage?: string | CustomValidation;
43
+ /**
44
+ * Whether shows the invalid message or not.
45
+ * The validator message will be shown if useValidator true and the field label is specified.
46
+ *
47
+ * Sets this props to 'false' to force the validator message always hidden.
48
+ *
49
+ * @default true
50
+ */
51
+ showValidatorMessage?: boolean;
52
+ /**
53
+ * Set the invalid state.
54
+ *
55
+ * @default - If field is mandatory, the field will be considered invalid if the input is empty.
56
+ */
57
+ invalid?: boolean;
58
+ /**
59
+ * This prop is required if you use this component in a form input.
60
+ * Specify the unique field name, match with your needs for API request.
61
+ *
62
+ * @default 'inputBadge'
63
+ */
64
+ fieldName?: string;
65
+ /**
66
+ * The text input placholder.
67
+ *
68
+ * @default 'Enter value'
69
+ */
70
+ placeholder?: string;
71
+ /**
72
+ * Disabled state.
73
+ */
74
+ disabled?: boolean;
75
+ /**
76
+ * The field input label. Tell the user what input is this.
77
+ */
78
+ label?: string;
79
+ /**
80
+ * Show information to user about the field.
81
+ */
82
+ fieldInfo?: string;
83
+ /**
84
+ * If true, deleted badges will be replaced with `null` to preserve their index position.
85
+ * Otherwise, the badge will be fully removed, shifting subsequent items.
86
+ */
87
+ preserveDeletedIndex?: boolean;
88
+ }
89
+
90
+ /**
91
+ * InputBadge component emits
92
+ */
93
+ export type InputBadgeEmits = {
94
+ /**
95
+ * Emits when a new label added.
96
+ */
97
+ 'update:modelValue': [value: string[] | undefined];
98
+ };
99
+
100
+ /**
101
+ * **WangsVue - InputBadge**
102
+ *
103
+ * _InputBadge is input text that changes it value into Badge component on Enter key pressed._
104
+ *
105
+ * --- ---
106
+ * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
107
+ *
108
+ * @group Component
109
+ */
110
+ declare class InputBadge extends ClassComponent<
111
+ InputBadgeProps,
112
+ Record<string, unknown>,
113
+ InputBadgeEmits
114
+ > {}
115
+
116
+ declare module '@vue/runtime-core' {
117
+ interface GlobalComponents {
118
+ InputBadge: GlobalComponentConstructor<InputBadge>;
119
+ }
120
+ }
121
+
122
+ export default InputBadge;
@@ -0,0 +1,170 @@
1
+ import { CustomValidation } from '../form/Form.vue.d';
2
+ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
3
+
4
+ export type CurrencyFormat = {
5
+ name?: string;
6
+ label: string;
7
+ currency: string;
8
+ symbol: string;
9
+ locale: string;
10
+ };
11
+
12
+ export interface CurrencyValue {
13
+ currency: string; // Currency ISO Code
14
+ value?: number;
15
+ }
16
+
17
+ /**
18
+ * Configuration interface for locale-specific settings of the InputCurrency component.
19
+ */
20
+ export interface InputCurrencyLocaleConfig {
21
+ /**
22
+ * Error message to display when the input is empty.
23
+ *
24
+ * @example '{label} must not be empty' - 'Amount must not be empty'
25
+ */
26
+ emptyInputErrorMessage?: string;
27
+ }
28
+
29
+ /**
30
+ * InputCurrency component props
31
+ */
32
+ export interface InputCurrencyProps {
33
+ /**
34
+ * Number modelValue of the input.
35
+ */
36
+ modelValue?: CurrencyValue;
37
+
38
+ /**
39
+ * Sets the initial value of the field.
40
+ * This will only available with option 'useValidator'.
41
+ *
42
+ * In usecase like edit form, you need to display the previous inputted value.
43
+ */
44
+ value?: number;
45
+
46
+ /**
47
+ * The input label. Tell the user what input is this.
48
+ */
49
+ label?: string;
50
+
51
+ /**
52
+ * Max input number value.
53
+ */
54
+ max?: number;
55
+
56
+ /**
57
+ * Wether the input should be validated with vee-validator or not.
58
+ * If you use this component within form input, you need to set this props as true.
59
+ */
60
+ useValidator?: boolean;
61
+
62
+ /**
63
+ * This prop is required if you use this component in a form input.
64
+ * Specify the unique field name, match with your needs for API request.
65
+ *
66
+ * @default 'numberInput'
67
+ */
68
+ fieldName?: string;
69
+
70
+ /**
71
+ * Wether this input field is required or not.
72
+ */
73
+ mandatory?: boolean;
74
+
75
+ /**
76
+ * Set custom validator message.
77
+ * It is rarely use, this component has handled the validator message.
78
+ *
79
+ * @example: '{label} is required'
80
+ * @example: { empty: '{label} field is required' }
81
+ */
82
+ validatorMessage?: string | CustomValidation<'empty'>;
83
+
84
+ /**
85
+ * Custom invalid state.
86
+ */
87
+ invalid?: boolean;
88
+
89
+ /**
90
+ * Specify the input placeholder.
91
+ *
92
+ * @default 'Enter {label}' or 'Enter number'
93
+ */
94
+ placeholder?: string;
95
+
96
+ /**
97
+ * Disabled the input.
98
+ */
99
+ disabled?: boolean;
100
+
101
+ /**
102
+ * Displays increment/decrement buttons.
103
+ */
104
+ showButtons?: boolean;
105
+
106
+ /**
107
+ * The width of input.
108
+ */
109
+ size?: 'small' | 'normal' | 'full';
110
+
111
+ /**
112
+ * Defines the behavior of the component.
113
+ * @defaultValue currency
114
+ */
115
+ mode?: 'decimal' | 'currency';
116
+
117
+ /**
118
+ * Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators.
119
+ * @defaultValue true
120
+ */
121
+ useGrouping?: boolean;
122
+
123
+ /**
124
+ * Show information about the field.
125
+ */
126
+ fieldInfo?: string;
127
+ inputnNumberId?: string;
128
+ }
129
+
130
+ /**
131
+ * InputCurrency component emits
132
+ */
133
+ export type InputCurrencyEmits = {
134
+ /**
135
+ * Emits when the input has loosen focus.
136
+ * The model value is the valid value from given min and max number.
137
+ *
138
+ * If the inputted number is above max, return the max. And vice versa.
139
+ */
140
+ 'update:modelValue': [payload?: CurrencyValue];
141
+
142
+ /**
143
+ * If you need to check validation, you can use this events.
144
+ */
145
+ 'input': [payload?: number];
146
+ };
147
+
148
+ /**
149
+ * **WangsVue - InputCurrency**
150
+ *
151
+ * _Handle input Currency with form validation._
152
+ *
153
+ * --- ---
154
+ * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
155
+ *
156
+ * @group form
157
+ */
158
+ declare class InputCurrency extends ClassComponent<
159
+ InputCurrencyProps,
160
+ unknown,
161
+ InputCurrencyEmits
162
+ > {}
163
+
164
+ declare module '@vue/runtime-core' {
165
+ interface GlobalComponents {
166
+ InputCurrency: GlobalComponentConstructor<InputCurrency>;
167
+ }
168
+ }
169
+
170
+ export default InputCurrency;
@@ -0,0 +1,8 @@
1
+ import { CurrencyFormat } from '../InputCurrency.vue.d';
2
+ declare const getCurrency: (code?: string) => CurrencyFormat;
3
+ declare const formatCurrency: (
4
+ value?: number | string | null,
5
+ currency?: string,
6
+ prefix?: boolean,
7
+ ) => string;
8
+ export { getCurrency, formatCurrency };
@@ -0,0 +1,25 @@
1
+ import { DefineComponent } from 'vue';
2
+ import { InputTextEmits, InputTextProps } from '../inputtext/InputText.vue.d';
3
+
4
+ /**
5
+ * InputEmail component props
6
+ */
7
+ export type InputEmailProps = Omit<InputTextProps, 'type'>;
8
+
9
+ /**
10
+ * InputEmail component emits
11
+ */
12
+ export type InputEmailEmits = InputTextEmits;
13
+ /**
14
+ * **WangsVue - InputEmail**
15
+ *
16
+ * _Handle input email with form validation._
17
+ *
18
+ * --- ---
19
+ * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
20
+ *
21
+ * @group form
22
+ */
23
+ declare const InputEmail: DefineComponent<InputEmailProps, InputEmailEmits>;
24
+
25
+ export default InputEmail;