@fewangsit/wangsvue-fats 1.0.0-alpha.22 → 1.0.0-alpha.23
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.
- package/components/animation/Animation.vue.d.ts +24 -0
- package/components/approverinfo/ApproverInfo.vue.d.ts +51 -0
- package/components/assetinfo/AssetInfo.vue.d.ts +31 -0
- package/components/badge/Badge.vue.d.ts +73 -0
- package/components/badgegroup/BadgeGroup.vue.d.ts +52 -0
- package/components/basecomponent/index.d.ts +28 -0
- package/components/basetree/BaseTree.vue.d.ts +591 -0
- package/components/basetree/TreeNode.vue.d.ts +35 -0
- package/components/breadcrumb/Breadcrumb.vue.d.ts +26 -0
- package/components/button/Button.vue.d.ts +193 -0
- package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +104 -0
- package/components/buttoncopy/ButtonCopy.vue.d.ts +26 -0
- package/components/buttondownload/ButtonDownload.vue.d.ts +49 -0
- package/components/buttonfilter/ButtonFilter.vue.d.ts +12 -0
- package/components/buttonradio/ButtonRadio.vue.d.ts +257 -0
- package/components/buttonscan/ButtonScan.vue.d.ts +201 -0
- package/components/buttonscan/helpers/getErrorCode.helper.d.ts +3 -0
- package/components/buttonscan/helpers/index.d.ts +1 -0
- package/components/buttonscan/workers/scanner.worker.d.ts +1 -0
- package/components/buttonsearch/ButtonSearch.vue.d.ts +38 -0
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +200 -0
- package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
- package/components/buttontoggle/ButtonToggle.vue.d.ts +18 -0
- package/components/buttonviewlog/ButtonViewLog.vue.d.ts +17 -0
- package/components/calendar/BaseCalendar.vue.d.ts +127 -0
- package/components/calendar/Calendar.vue.d.ts +570 -0
- package/components/card/Card.vue.d.ts +139 -0
- package/components/checkbox/Checkbox.vue.d.ts +329 -0
- package/components/customcolumn/ColumnList.vue.d.ts +47 -0
- package/components/customcolumn/CustomColumn.vue.d.ts +37 -0
- package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +16 -0
- package/components/datatable/DataTable.vue.d.ts +735 -0
- package/components/datatable/MultiRow.vue.d.ts +36 -0
- package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +1 -0
- package/components/datatable/helpers/filter.helper.d.ts +38 -0
- package/components/datatable/helpers/index.d.ts +6 -0
- package/components/datatable/helpers/readConfig.helper.d.ts +5 -0
- package/components/datatable/store/dataTable.store.d.ts +25 -0
- package/components/dialog/Dialog.vue.d.ts +464 -0
- package/components/dialogconfirm/DialogConfirm.vue.d.ts +164 -0
- package/components/dialogform/DialogForm.vue.d.ts +349 -0
- package/components/dialogselecttree/DialogSelectTree.vue.d.ts +136 -0
- package/components/dropdown/Dropdown.vue.d.ts +274 -0
- package/components/editor/CodeSnippetAdapter.vue.d.ts +152 -0
- package/components/editor/Editor.vue.d.ts +191 -0
- package/components/editor/EditorButton.vue.d.ts +35 -0
- package/components/editor/MentionList.vue.d.ts +49 -0
- package/components/editor/MentionSection.vue.d.ts +152 -0
- package/components/editor/codeSnippetExtension.d.ts +3 -0
- package/components/editor/mentionSectionExtension.d.ts +3 -0
- package/components/editor/suggestion.d.ts +2 -0
- package/components/fieldwrapper/FieldWrapper.vue.d.ts +69 -0
- package/components/fileupload/FileUpload.vue.d.ts +169 -0
- package/components/filtercontainer/FilterContainer.vue.d.ts +181 -0
- package/components/filtercontainer/helpers/applyFilter.helper.d.ts +14 -0
- package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +7 -0
- package/components/filtercontainer/helpers/getOption.helper.d.ts +12 -0
- package/components/form/Form.vue.d.ts +316 -0
- package/components/icon/Icon.vue.d.ts +256 -0
- package/components/image/Image.vue.d.ts +403 -0
- package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +59 -0
- package/components/imagecompressor/ImageCompressor.vue.d.ts +229 -0
- package/components/imagecompressor/ImageInputInfo.vue.d.ts +55 -0
- package/components/index.d.ts +58 -0
- package/components/inputbadge/InputBadge.vue.d.ts +122 -0
- package/components/inputcurrency/InputCurrency.vue.d.ts +170 -0
- package/components/inputcurrency/helpers/currency.helper.d.ts +8 -0
- package/components/inputemail/InputEmail.vue.d.ts +25 -0
- package/components/inputnumber/InputNumber.vue.d.ts +282 -0
- package/components/inputpassword/InputPassword.vue.d.ts +32 -0
- package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +99 -0
- package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +8 -0
- package/components/inputrangenumber/InputRangeNumber.vue.d.ts +120 -0
- package/components/inputsearch/InputSearch.vue.d.ts +33 -0
- package/components/inputtext/InputText.vue.d.ts +352 -0
- package/components/inputurl/InputURL.vue.d.ts +36 -0
- package/components/invisiblefield/InvisibleField.vue.d.ts +32 -0
- package/components/litedropdown/LiteDropdown.vue.d.ts +96 -0
- package/components/loading/Loading.vue.d.ts +47 -0
- package/components/loading/store/loading.store.d.ts +8 -0
- package/components/menu/Menu.vue.d.ts +390 -0
- package/components/menu/helpers/filterMenu.helper.d.ts +15 -0
- package/components/menu/helpers/index.d.ts +1 -0
- package/components/menuitem/MenuItem.vue +70 -0
- package/components/menuitem/MenuItem.vue.d.ts +39 -0
- package/components/menuitem/index.d.ts +106 -0
- package/components/multiselect/MultiSelect.vue.d.ts +194 -0
- package/components/overlaypanel/OverlayPanel.vue.d.ts +301 -0
- package/components/passthrough/index.d.ts +16 -0
- package/components/tabmenu/TabMenu.vue.d.ts +288 -0
- package/components/textarea/Textarea.vue.d.ts +170 -0
- package/components/timeline/Timeline.vue.d.ts +121 -0
- package/components/timeline/TimelineContentByType.vue.d.ts +64 -0
- package/components/toast/Toast.vue.d.ts +367 -0
- package/components/toggleswitch/ToggleSwitch.vue.d.ts +281 -0
- package/components/tree/Tree.vue.d.ts +148 -0
- package/components/tree/helpers/filterNodeKeys.helper.d.ts +22 -0
- package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +8 -0
- package/components/tree/helpers/index.d.ts +3 -0
- package/components/ts-helpers.d.ts +85 -0
- package/components/username/UserName.vue.d.ts +113 -0
- package/components/userwithicon/UserWithIcon.vue.d.ts +20 -0
- package/config/defaultProps.d.ts +3 -0
- package/config/index.d.ts +3 -0
- package/config/locale.d.ts +3 -0
- package/loading-page-BrQattYE.js +1 -0
- package/loading-page-CgfbWppy.js +1 -0
- package/loading-page-CoC9UhfC.js +4 -0
- package/loading-page-CoXtqoc9.js +4 -0
- package/loading-page-DbLuqCHa.js +1 -0
- package/loading-page-f8D03l3G.js +4 -0
- package/loading-plane-CgfbWppy.js +1 -0
- package/loading-plane-CoXtqoc9.js +4 -0
- package/loading-table-Bdr9ZhtP.js +1 -0
- package/loading-table-ByUoWqUo.js +4 -0
- package/loading-table-BygEMzFM.js +4 -0
- package/loading-table-BzrSQlA0.js +1 -0
- package/loading-table-D9bw9OcI.js +4 -0
- package/loading-table-chOgXi94.js +1 -0
- package/main.d.ts +31 -0
- package/no-data-CTKux8RI.js +4 -0
- package/no-data-Cgze_Rvp.js +1 -0
- package/no-data-DLHO1L_u.js +4 -0
- package/no-data-Dep79CBh.js +1 -0
- package/no-data-g0dJCy2p.js +4 -0
- package/no-data-y1X5WtcQ.js +1 -0
- package/package.json +1 -1
- package/plugins/i18n-extension.d.ts +4 -0
- package/style.css +1 -0
- package/utils/getSeverityByAssetStatus.util.d.ts +3 -0
- package/utils/index.d.ts +22 -0
- package/utils/listenSidebarChanges.util.d.ts +16 -0
- package/wangsvue-fats.es.js +123684 -0
- package/wangsvue-fats.system.js +478 -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,36 @@
|
|
|
1
|
+
import { Slot } from 'vue';
|
|
2
|
+
import { ClassComponent } from '../ts-helpers';
|
|
3
|
+
import { InputTextEmits, InputTextProps } from '../inputtext/InputText.vue.d';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* InputURL component props
|
|
7
|
+
*/
|
|
8
|
+
export type InputURLProps = Omit<InputTextProps, 'type'>;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* InputURL component emits
|
|
12
|
+
*/
|
|
13
|
+
export type InputURLEmits = InputTextEmits;
|
|
14
|
+
|
|
15
|
+
export type InputURLSlots = {
|
|
16
|
+
'addon-left': Slot;
|
|
17
|
+
'addon-right': Slot;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* **WangsVue - InputURL**
|
|
22
|
+
*
|
|
23
|
+
* _Handle input url with form validation._
|
|
24
|
+
*
|
|
25
|
+
* --- ---
|
|
26
|
+
* 
|
|
27
|
+
*
|
|
28
|
+
* @group form
|
|
29
|
+
*/
|
|
30
|
+
declare class InputURL extends ClassComponent<
|
|
31
|
+
InputURLProps,
|
|
32
|
+
InputURLSlots,
|
|
33
|
+
InputURLEmits
|
|
34
|
+
> {}
|
|
35
|
+
|
|
36
|
+
export default InputURL;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ClassComponent, Nullable } from '../ts-helpers';
|
|
2
|
+
|
|
3
|
+
export type FieldValue =
|
|
4
|
+
| Nullable<string>
|
|
5
|
+
| Nullable<number>
|
|
6
|
+
| string
|
|
7
|
+
| string[]
|
|
8
|
+
| number
|
|
9
|
+
| number[]
|
|
10
|
+
| boolean
|
|
11
|
+
| undefined
|
|
12
|
+
| null
|
|
13
|
+
| object;
|
|
14
|
+
|
|
15
|
+
export interface InvisibleFieldProps {
|
|
16
|
+
value?: FieldValue;
|
|
17
|
+
fieldName?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare class InvisibleField extends ClassComponent<
|
|
21
|
+
InvisibleFieldProps,
|
|
22
|
+
unknown,
|
|
23
|
+
unknown
|
|
24
|
+
> {}
|
|
25
|
+
|
|
26
|
+
declare module 'vue' {
|
|
27
|
+
export interface GlobalComponents {
|
|
28
|
+
InvisibleField: typeof InvisibleField;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default InvisibleField;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Option, OptionValue } from '../dropdown/Dropdown.vue.d';
|
|
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: Option[] | 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
|
+
* 
|
|
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
|
+
* 
|
|
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;
|