@mythpe/quasar-ui-qui 0.0.26 → 0.0.27-dev
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/index.d.ts +13 -0
- package/package.json +15 -8
- package/src/boot/register.ts +14 -0
- package/src/components/datatable/MDatatable.vue +2305 -0
- package/src/components/datatable/MDtAvatar.vue +49 -0
- package/src/components/datatable/MDtBtn.vue +153 -0
- package/src/components/datatable/MDtContextmenuItems.vue +54 -0
- package/src/components/datatable/index.ts +6 -0
- package/src/components/form/MAvatarViewer.vue +327 -0
- package/src/components/form/MAxios.vue +144 -0
- package/src/components/form/MBtn.vue +271 -93
- package/src/components/form/MCheckbox.vue +150 -0
- package/src/components/form/MColor.vue +122 -0
- package/src/components/form/MDate.vue +50 -0
- package/src/components/form/MEditor.vue +285 -0
- package/src/components/form/MEmail.vue +43 -0
- package/src/components/form/MField.vue +148 -0
- package/src/components/form/MFile.vue +215 -0
- package/src/components/form/MForm.vue +89 -0
- package/src/components/form/MHidden.vue +86 -0
- package/src/components/form/MHiddenInput.vue +58 -0
- package/src/components/form/MInput.vue +178 -0
- package/src/components/form/MInputFieldControl.vue +27 -0
- package/src/components/form/MInputLabel.vue +38 -0
- package/src/components/form/MMobile.vue +43 -0
- package/src/components/form/MOptions.vue +255 -0
- package/src/components/form/MOtp.vue +292 -0
- package/src/components/form/MPassword.vue +73 -0
- package/src/components/form/MPicker.vue +313 -0
- package/src/components/form/MRadio.vue +181 -0
- package/src/components/form/MSelect.vue +352 -0
- package/src/components/form/MTime.vue +48 -0
- package/src/components/form/MToggle.vue +211 -0
- package/src/components/form/MUploader.vue +511 -0
- package/src/components/form/index.ts +63 -0
- package/src/components/grid/MBlock.vue +39 -18
- package/src/components/grid/MCol.vue +11 -15
- package/src/components/grid/MColumn.vue +12 -1
- package/src/components/grid/MContainer.vue +22 -13
- package/src/components/grid/MHelpRow.vue +13 -12
- package/src/components/grid/MRow.vue +31 -10
- package/src/components/grid/index.ts +16 -0
- package/src/components/index.ts +15 -0
- package/src/components/modal/MDialog.vue +58 -0
- package/src/components/modal/MModalMenu.vue +62 -0
- package/src/components/modal/MTooltip.vue +39 -0
- package/src/components/modal/index.ts +5 -0
- package/src/components/parials/UploaderItem.vue +298 -0
- package/src/components/parials/index.ts +3 -0
- package/src/components/transition/MFadeTransition.vue +27 -0
- package/src/components/transition/MFadeXTransition.vue +26 -0
- package/src/components/transition/MTransition.vue +44 -0
- package/src/components/transition/index.ts +13 -0
- package/src/components/typography/MTypingString.vue +8 -0
- package/src/components/typography/index.ts +11 -0
- package/src/composable/index.ts +12 -0
- package/src/composable/useBindInput.ts +209 -0
- package/src/composable/useError.ts +11 -0
- package/src/composable/useMyth.ts +311 -0
- package/src/composable/useValue.ts +12 -0
- package/src/index.common.js +19 -1
- package/src/index.esm.js +18 -3
- package/src/index.js +19 -0
- package/src/index.sass +9 -26
- package/src/index.ts +18 -4
- package/src/index.umd.js +17 -2
- package/src/style/m-container.sass +13 -0
- package/src/style/main.sass +146 -0
- package/src/style/print.sass +14 -0
- package/src/style/transition.sass +40 -0
- package/src/types/api-helpers.d.ts +62 -0
- package/src/types/components.d.ts +1075 -27
- package/src/types/index.d.ts +21 -1
- package/src/types/install-options.d.ts +19 -0
- package/src/types/lodash.d.ts +26 -0
- package/src/types/m-datatable.d.ts +316 -0
- package/src/types/m-geolocation.d.ts +16 -0
- package/src/types/m-helpers.d.ts +97 -0
- package/src/types/plugin-props-option.d.ts +301 -0
- package/src/types/quasar-helpers.d.ts +7 -0
- package/src/types/theme.d.ts +12 -0
- package/src/utils/Helpers.ts +293 -0
- package/src/utils/Str.ts +211 -0
- package/src/utils/index.ts +13 -0
- package/src/utils/myth.ts +109 -0
- package/src/utils/vee-rules.ts +32 -0
- package/src/utils/vue-plugin.ts +161 -0
- package/tsconfig.json +9 -13
- package/src/myth.ts +0 -30
- package/src/types/myth.ts +0 -42
- package/src/vue-plugin.ts +0 -41
- package/types.d.ts +0 -1
|
@@ -1,8 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/*
|
|
2
|
+
* MyTh Ahmed Faiz Copyright © 2016-2024 All rights reserved.
|
|
3
|
+
* Email: mythpe@gmail.com
|
|
4
|
+
* Mobile: +966590470092
|
|
5
|
+
* Website: https://www.4myth.com
|
|
6
|
+
* Github: https://github.com/mythpe
|
|
7
|
+
*/
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
import type {
|
|
10
|
+
GlobalComponentConstructor,
|
|
11
|
+
QAvatarProps,
|
|
12
|
+
QAvatarSlots,
|
|
13
|
+
QBtnProps,
|
|
14
|
+
QBtnSlots,
|
|
15
|
+
QCheckboxProps,
|
|
16
|
+
QDateProps,
|
|
17
|
+
QEditorProps,
|
|
18
|
+
QEditorSlots,
|
|
19
|
+
QFieldSlots,
|
|
20
|
+
QFileProps,
|
|
21
|
+
QFileSlots,
|
|
22
|
+
QImgProps,
|
|
23
|
+
QInputProps,
|
|
24
|
+
QInputSlots,
|
|
25
|
+
QItemProps,
|
|
26
|
+
QOptionGroupProps,
|
|
27
|
+
QOptionGroupSlots,
|
|
28
|
+
QRadioProps,
|
|
29
|
+
QSelectProps,
|
|
30
|
+
QTimeProps,
|
|
31
|
+
QToggleProps,
|
|
32
|
+
QUploaderProps,
|
|
33
|
+
QUploaderSlots
|
|
34
|
+
} from 'quasar'
|
|
35
|
+
import { QDialogProps, QMenuProps, QPopupProxyProps, QTooltipProps } from 'quasar'
|
|
36
|
+
import type {
|
|
37
|
+
ComputedRef,
|
|
38
|
+
MaybeRefOrGetter,
|
|
39
|
+
Ref,
|
|
40
|
+
ShallowRef,
|
|
41
|
+
TransitionGroupProps,
|
|
42
|
+
TransitionProps,
|
|
43
|
+
UnwrapNestedRefs,
|
|
44
|
+
VNode,
|
|
45
|
+
WritableComputedRef
|
|
46
|
+
} from 'vue'
|
|
47
|
+
import type { TypedOptions } from 'typed.js'
|
|
48
|
+
import type { FieldContext, FieldOptions, FormContext, FormOptions, FormState } from 'vee-validate'
|
|
49
|
+
import type { ThemeShadow, ThemeSize } from './theme'
|
|
50
|
+
import type { AxiosRequestConfig } from 'axios'
|
|
51
|
+
import { ApiInterface, HelpersStubSchema } from './api-helpers'
|
|
52
|
+
import {
|
|
53
|
+
MDatatableProps,
|
|
54
|
+
MDatatableSlots,
|
|
55
|
+
MDtAvatarProps,
|
|
56
|
+
MDtAvatarSlots,
|
|
57
|
+
MDtBtnProps,
|
|
58
|
+
MDtBtnSlots,
|
|
59
|
+
MDtContextmenuItemsProps,
|
|
60
|
+
MDtContextmenuItemsSlots
|
|
61
|
+
} from './m-datatable'
|
|
62
|
+
|
|
63
|
+
export interface MTransitionProps extends TransitionGroupProps {
|
|
64
|
+
enterIn?: string;
|
|
65
|
+
enterOut?: string;
|
|
66
|
+
slowIn?: boolean;
|
|
67
|
+
slowOut?: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface MTransitionsSlots {
|
|
71
|
+
default: () => VNode[];
|
|
72
|
+
}
|
|
6
73
|
|
|
7
74
|
export interface MBtnProps extends QBtnProps {
|
|
8
75
|
//
|
|
@@ -12,7 +79,7 @@ export interface MBtnSlots extends QBtnSlots {
|
|
|
12
79
|
/**
|
|
13
80
|
* Use for custom content, instead of relying on 'icon' and 'label' props
|
|
14
81
|
*/
|
|
15
|
-
default
|
|
82
|
+
default?: () => VNode[];
|
|
16
83
|
/**
|
|
17
84
|
* Override the default QSpinner when in 'loading' state
|
|
18
85
|
*/
|
|
@@ -24,19 +91,19 @@ export interface MBlockProps {
|
|
|
24
91
|
* Size of the padding block.
|
|
25
92
|
* Default: 'md'
|
|
26
93
|
*/
|
|
27
|
-
|
|
94
|
+
size?: ThemeSize | undefined;
|
|
28
95
|
/**
|
|
29
96
|
* Rounded block
|
|
30
97
|
*/
|
|
31
|
-
|
|
98
|
+
rounded?: boolean | undefined;
|
|
32
99
|
/**
|
|
33
100
|
* Shadow level
|
|
34
101
|
*/
|
|
35
|
-
|
|
102
|
+
shadow?: ThemeShadow | undefined;
|
|
36
103
|
}
|
|
37
104
|
|
|
38
105
|
export interface MBlockSlots {
|
|
39
|
-
default
|
|
106
|
+
default?: () => VNode[];
|
|
40
107
|
}
|
|
41
108
|
|
|
42
109
|
export type ColStyleType =
|
|
@@ -73,18 +140,18 @@ export type ColStyleType =
|
|
|
73
140
|
| 12
|
|
74
141
|
|
|
75
142
|
export interface MColProps {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
143
|
+
auto?: boolean | undefined;
|
|
144
|
+
col?: ColStyleType;
|
|
145
|
+
xs?: ColStyleType;
|
|
146
|
+
sm?: ColStyleType;
|
|
147
|
+
md?: ColStyleType;
|
|
148
|
+
lg?: ColStyleType;
|
|
149
|
+
xl?: ColStyleType;
|
|
150
|
+
name?: string;
|
|
84
151
|
}
|
|
85
152
|
|
|
86
153
|
export interface MColSlots {
|
|
87
|
-
default
|
|
154
|
+
default?: () => VNode[];
|
|
88
155
|
}
|
|
89
156
|
|
|
90
157
|
export interface MColumnProps {
|
|
@@ -92,32 +159,32 @@ export interface MColumnProps {
|
|
|
92
159
|
}
|
|
93
160
|
|
|
94
161
|
export interface MColumnSlots {
|
|
95
|
-
default
|
|
162
|
+
default?: () => VNode[];
|
|
96
163
|
}
|
|
97
164
|
|
|
98
165
|
export interface MContainerProps {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
166
|
+
size?: ThemeSize | string | undefined;
|
|
167
|
+
dense?: boolean | undefined;
|
|
168
|
+
fluid?: boolean | undefined;
|
|
102
169
|
}
|
|
103
170
|
|
|
104
171
|
export interface MContainerSlots {
|
|
105
|
-
default
|
|
172
|
+
default?: () => VNode[];
|
|
106
173
|
}
|
|
107
174
|
|
|
108
175
|
export interface MRowProps {
|
|
109
176
|
/**
|
|
110
177
|
* Default: false.
|
|
111
178
|
*/
|
|
112
|
-
gutter?: boolean |
|
|
179
|
+
gutter?: boolean | ThemeSize | undefined;
|
|
113
180
|
/**
|
|
114
181
|
* Default: false.
|
|
115
182
|
*/
|
|
116
|
-
col?: boolean |
|
|
183
|
+
col?: boolean | ThemeSize | undefined;
|
|
117
184
|
}
|
|
118
185
|
|
|
119
186
|
export interface MRowSlots {
|
|
120
|
-
default
|
|
187
|
+
default?: () => VNode[];
|
|
121
188
|
}
|
|
122
189
|
|
|
123
190
|
export interface MHelpRowProps extends Partial<QItemProps> {
|
|
@@ -127,7 +194,7 @@ export interface MHelpRowProps extends Partial<QItemProps> {
|
|
|
127
194
|
}
|
|
128
195
|
|
|
129
196
|
export interface MHelpRowSlots {
|
|
130
|
-
default
|
|
197
|
+
default?: () => VNode[];
|
|
131
198
|
}
|
|
132
199
|
|
|
133
200
|
export interface MTypingStringProps {
|
|
@@ -142,13 +209,979 @@ export interface MTypingStringProps {
|
|
|
142
209
|
}
|
|
143
210
|
|
|
144
211
|
export interface MTypingStringSlots {
|
|
212
|
+
default?: () => VNode[];
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export interface BaseInputFieldPropContext extends FieldContext<any> {
|
|
216
|
+
//
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface BaseInputFieldProps {
|
|
220
|
+
/**
|
|
221
|
+
* Context of field input.
|
|
222
|
+
*/
|
|
223
|
+
field: UnwrapNestedRefs<BaseInputFieldPropContext>;
|
|
224
|
+
label?: string | undefined;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface MInputFieldControlProps {
|
|
228
|
+
[k: string]: any;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface MInputFieldControlSlots {
|
|
232
|
+
default: () => VNode[];
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export interface MInputLabelProps extends BaseInputFieldProps {
|
|
236
|
+
//
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export interface MInputLabelSlots {
|
|
240
|
+
default?: () => VNode[];
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface ViewModeProps {
|
|
244
|
+
/**
|
|
245
|
+
* Set input to vie mode use q-field
|
|
246
|
+
*/
|
|
247
|
+
viewMode?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* View Mode value for input or modelValue.
|
|
250
|
+
*/
|
|
251
|
+
viewModeValue?: any | undefined;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export interface InputHelpProps {
|
|
255
|
+
/**
|
|
256
|
+
* Information text with Icon.
|
|
257
|
+
*/
|
|
258
|
+
help?: string;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface InputHelpSlots {
|
|
262
|
+
/**
|
|
263
|
+
* VNode bottom of input & before 'bottom-input slot'.
|
|
264
|
+
*/
|
|
265
|
+
help: () => VNode[];
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export type InputRulesContext = string | string[] | Record<string, any> | undefined;
|
|
269
|
+
export type InputErrorsContext = string[];
|
|
270
|
+
export type InputFormErrorsContext = Record<string, InputErrorsContext> | undefined;
|
|
271
|
+
|
|
272
|
+
export type MAvatarViewerModelValue = File | null | undefined;
|
|
273
|
+
|
|
274
|
+
export interface MAvatarViewerProps extends QAvatarProps, MColProps {
|
|
275
|
+
/**
|
|
276
|
+
* Comma separated list of unique file type specifiers. Maps to 'accept' attribute of native input type=file element
|
|
277
|
+
*/
|
|
278
|
+
accept?: string | string [] | null | Record<string, string>;
|
|
279
|
+
/**
|
|
280
|
+
* Add accept file type.
|
|
281
|
+
*/
|
|
282
|
+
images?: boolean | string;
|
|
283
|
+
/**
|
|
284
|
+
* Add accept svg type.
|
|
285
|
+
*/
|
|
286
|
+
svg?: boolean | string;
|
|
287
|
+
/**
|
|
288
|
+
* Add accept video type.
|
|
289
|
+
*/
|
|
290
|
+
video?: boolean | string;
|
|
291
|
+
/**
|
|
292
|
+
* Add accept pdf type.
|
|
293
|
+
*/
|
|
294
|
+
pdf?: boolean;
|
|
295
|
+
/**
|
|
296
|
+
* Add accept excel type.
|
|
297
|
+
*/
|
|
298
|
+
excel?: boolean | string;
|
|
299
|
+
/**
|
|
300
|
+
* Show text if no image
|
|
301
|
+
*/
|
|
302
|
+
avatarText?: string;
|
|
303
|
+
/**
|
|
304
|
+
* How the image will fit into the container; Equivalent of the object-fit prop; Can be coordinated with 'position' prop
|
|
305
|
+
* Default value: cover
|
|
306
|
+
*/
|
|
307
|
+
fit?: QImgProps['fit'];
|
|
308
|
+
/**
|
|
309
|
+
* Can clear the input & not required
|
|
310
|
+
*/
|
|
311
|
+
clearable?: boolean;
|
|
312
|
+
/**
|
|
313
|
+
* The label that will appear above the image
|
|
314
|
+
*/
|
|
315
|
+
label?: string;
|
|
316
|
+
/**
|
|
317
|
+
* List of error messages.
|
|
318
|
+
*/
|
|
319
|
+
errors?: InputErrorsContext;
|
|
320
|
+
/**
|
|
321
|
+
* List of form errors.
|
|
322
|
+
*/
|
|
323
|
+
formErrors?: InputFormErrorsContext;
|
|
324
|
+
/**
|
|
325
|
+
* Model of the component;
|
|
326
|
+
* Must be FileList or Array if using 'multiple' prop;
|
|
327
|
+
* Either use this property (along with a listener for 'update:modelValue' event) OR use v-model directive
|
|
328
|
+
*/
|
|
329
|
+
modelValue?: MAvatarViewerModelValue;
|
|
330
|
+
/**
|
|
331
|
+
* The name of the file for the image used and the field.
|
|
332
|
+
* Example: name='avatar' { avatar: https://4myth.com, avatarBlob: Blob, avatarRemoved: !0 | !1 }
|
|
333
|
+
*/
|
|
334
|
+
name?: string;
|
|
335
|
+
/**
|
|
336
|
+
* Avatar url.
|
|
337
|
+
* (along with a listener for 'update:url' event) OR use v-model directive
|
|
338
|
+
*/
|
|
339
|
+
url?: string;
|
|
340
|
+
/**
|
|
341
|
+
* value if user remove the image
|
|
342
|
+
* (along with a listener for 'update:removed' event) OR use v-model directive
|
|
343
|
+
*/
|
|
344
|
+
removed?: boolean;
|
|
345
|
+
/**
|
|
346
|
+
* Input hint.
|
|
347
|
+
*/
|
|
348
|
+
hint?: string;
|
|
349
|
+
hintProps?: Record<string, any>;
|
|
350
|
+
|
|
351
|
+
caption?: string;
|
|
352
|
+
captionProps?: Record<string, any>;
|
|
353
|
+
/**
|
|
354
|
+
* Help text after label.
|
|
355
|
+
*/
|
|
356
|
+
help?: string;
|
|
357
|
+
/**
|
|
358
|
+
* Set input to readonly.
|
|
359
|
+
*/
|
|
360
|
+
readonly?: boolean;
|
|
361
|
+
/**
|
|
362
|
+
* Loading for skeleton.
|
|
363
|
+
*/
|
|
364
|
+
loading?: boolean;
|
|
365
|
+
/**
|
|
366
|
+
* Input Required validation.
|
|
367
|
+
*/
|
|
368
|
+
required?: boolean;
|
|
369
|
+
/**
|
|
370
|
+
* Input Validation Rules.
|
|
371
|
+
*/
|
|
372
|
+
rules?: InputRulesContext;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export interface MAvatarViewerSlots extends QAvatarSlots {
|
|
376
|
+
/**
|
|
377
|
+
* Field main content
|
|
378
|
+
*/
|
|
379
|
+
default: () => VNode[];
|
|
380
|
+
hint: () => VNode[];
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
export interface BaseInputFormProps {
|
|
384
|
+
/**
|
|
385
|
+
* Input name.
|
|
386
|
+
*/
|
|
387
|
+
name: string;
|
|
388
|
+
/**
|
|
389
|
+
* Input model value.
|
|
390
|
+
* can be used instead of initialValue.
|
|
391
|
+
*/
|
|
392
|
+
modelValue?: any;
|
|
393
|
+
/**
|
|
394
|
+
* Input Label.
|
|
395
|
+
*/
|
|
396
|
+
label?: string | undefined;
|
|
397
|
+
/**
|
|
398
|
+
* Caption under label.
|
|
399
|
+
*/
|
|
400
|
+
caption?: string | undefined;
|
|
401
|
+
/**
|
|
402
|
+
* Input Hint.
|
|
403
|
+
*/
|
|
404
|
+
hint?: string | undefined;
|
|
405
|
+
/**
|
|
406
|
+
* Input Placeholder.
|
|
407
|
+
*/
|
|
408
|
+
placeholder?: string | undefined;
|
|
409
|
+
/**
|
|
410
|
+
* Input Required validation.
|
|
411
|
+
*/
|
|
412
|
+
required?: boolean;
|
|
413
|
+
/**
|
|
414
|
+
* Input Validation Rules.
|
|
415
|
+
*/
|
|
416
|
+
rules?: InputRulesContext;
|
|
417
|
+
/**
|
|
418
|
+
* Input Error Messages.
|
|
419
|
+
*/
|
|
420
|
+
// errors?: InputErrorsContext;
|
|
421
|
+
/**
|
|
422
|
+
* Form Error Messages.
|
|
423
|
+
*/
|
|
424
|
+
// formErrors?: InputFormErrorsContext;
|
|
425
|
+
/**
|
|
426
|
+
* Input autocomplete attribute.
|
|
427
|
+
* if true, will set from input name.
|
|
428
|
+
* if false, will set 'off'.
|
|
429
|
+
* else, will set the attribute value.
|
|
430
|
+
* Default: undefined.
|
|
431
|
+
*/
|
|
432
|
+
autocomplete?: boolean | string | undefined;
|
|
433
|
+
/**
|
|
434
|
+
* Inputs Top Label.
|
|
435
|
+
*/
|
|
436
|
+
topLabel?: boolean;
|
|
437
|
+
/**
|
|
438
|
+
* Mobile Rule.
|
|
439
|
+
*/
|
|
440
|
+
mobile?: boolean | string | number | undefined;
|
|
441
|
+
/**
|
|
442
|
+
* Email Rule.
|
|
443
|
+
*/
|
|
444
|
+
email?: boolean;
|
|
445
|
+
/**
|
|
446
|
+
* Number Rule.
|
|
447
|
+
*/
|
|
448
|
+
float?: boolean;
|
|
449
|
+
/**
|
|
450
|
+
* vee-validate Field Options.
|
|
451
|
+
*/
|
|
452
|
+
fieldOptions?: Partial<FieldOptions> | MaybeRefOrGetter<Partial<FieldOptions>>;
|
|
453
|
+
/**
|
|
454
|
+
* choice key of auto placeholder.
|
|
455
|
+
*/
|
|
456
|
+
useChoice?: boolean | string;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export interface BaseInputsProps extends ViewModeProps, InputHelpProps, Omit<MColProps, 'name'>, BaseInputFormProps {
|
|
460
|
+
//
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export interface BaseInputsSlots extends InputHelpSlots {
|
|
464
|
+
/**
|
|
465
|
+
* VNode top of input & top of 'top label slot'.
|
|
466
|
+
*/
|
|
467
|
+
'top-input': () => VNode[];
|
|
468
|
+
/**
|
|
469
|
+
* The label top on input
|
|
470
|
+
*/
|
|
471
|
+
'top-label': () => VNode[];
|
|
472
|
+
/**
|
|
473
|
+
* VNode top of input & after top label.
|
|
474
|
+
*/
|
|
475
|
+
caption: () => VNode[];
|
|
476
|
+
/**
|
|
477
|
+
* Field main content
|
|
478
|
+
*/
|
|
479
|
+
default: () => VNode[];
|
|
480
|
+
/**
|
|
481
|
+
* VNode bottom of input.
|
|
482
|
+
*/
|
|
483
|
+
'bottom-input': () => VNode[];
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
export interface MInputProps extends Omit<QInputProps, 'rules' | 'name' | 'modelValue' | 'label' | 'hint'>, BaseInputsProps {
|
|
487
|
+
//
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
export interface MInputSlots extends QInputSlots, QFieldSlots, BaseInputsSlots {
|
|
491
|
+
//
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export interface MPasswordProps extends MInputProps {
|
|
495
|
+
/**
|
|
496
|
+
* icon prepend it to password input.
|
|
497
|
+
*/
|
|
498
|
+
icon?: boolean | undefined;
|
|
499
|
+
/**
|
|
500
|
+
* toggle password append icon.
|
|
501
|
+
*/
|
|
502
|
+
noToggle?: boolean | undefined;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export interface MEditorProps extends Omit<QEditorProps, 'modelValue' | 'placeholder'>, BaseInputsProps {
|
|
506
|
+
//
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export interface MEditorSlots extends QEditorSlots, BaseInputsSlots {
|
|
510
|
+
//
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export interface MSelectModelEmit {
|
|
514
|
+
value: any | null;
|
|
515
|
+
model: object | null;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export interface MSelectProps extends Omit<QSelectProps, 'rules' | 'name' | 'modelValue' | 'label' | 'hint' | 'autocomplete'>, BaseInputsProps {
|
|
519
|
+
/**
|
|
520
|
+
* Input search functionality. useInput prop for this feature.
|
|
521
|
+
*/
|
|
522
|
+
search?: string | null | undefined;
|
|
523
|
+
/**
|
|
524
|
+
* Minimum characters to start searching. Default is 1.
|
|
525
|
+
*/
|
|
526
|
+
searchLength?: string | number;
|
|
527
|
+
/**
|
|
528
|
+
* hide the default empty list message.
|
|
529
|
+
*/
|
|
530
|
+
hideEmptyList?: boolean | undefined;
|
|
531
|
+
/**
|
|
532
|
+
* Disable filter functionality.
|
|
533
|
+
*/
|
|
534
|
+
noFilter?: boolean | undefined;
|
|
535
|
+
/**
|
|
536
|
+
* Set mode of component to axios of filter & search.
|
|
537
|
+
* if set to true, component will fetch data from api and don't do filter functionality.
|
|
538
|
+
*/
|
|
539
|
+
axiosMode?: boolean | undefined;
|
|
540
|
+
/**
|
|
541
|
+
* Fetch Data on mounted
|
|
542
|
+
*/
|
|
543
|
+
// iniData?: boolean;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
export interface MSelectSlots extends QInputSlots, QFieldSlots, BaseInputsSlots {
|
|
547
|
+
//
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
export interface MFileProps extends Omit<QFileProps, 'modelValue' | 'rules' | 'name' | 'label' | 'hint'>, Omit<BaseInputsProps, 'autocomplete'> {
|
|
551
|
+
accept?: string | undefined;
|
|
552
|
+
images?: boolean;
|
|
553
|
+
svg?: boolean;
|
|
554
|
+
video?: boolean;
|
|
555
|
+
pdf?: boolean;
|
|
556
|
+
excel?: boolean;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
export interface MFileSlots extends QFileSlots, BaseInputsSlots {
|
|
560
|
+
//
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export interface BaseCheckboxProps extends Omit<BaseInputsProps, 'topLabel'> {
|
|
564
|
+
/**
|
|
565
|
+
* Input row props.
|
|
566
|
+
*/
|
|
567
|
+
rowProps?: Record<string, any>;
|
|
568
|
+
/**
|
|
569
|
+
* Input column props.
|
|
570
|
+
*/
|
|
571
|
+
colProps?: Record<string, any>;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export interface MCheckboxProps extends Omit<QCheckboxProps, 'name' | 'modelValue' | 'label'>, BaseCheckboxProps {
|
|
575
|
+
//
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
export interface MCheckboxSlots extends Omit<BaseInputsSlots, 'top-label'> {
|
|
579
|
+
/**
|
|
580
|
+
* VNode before field main content.
|
|
581
|
+
*/
|
|
582
|
+
before: () => VNode[];
|
|
583
|
+
/**
|
|
584
|
+
* VNode after field main content.
|
|
585
|
+
*/
|
|
586
|
+
after: () => VNode[];
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
export interface MRadioProps extends Omit<QRadioProps, 'name' | 'modelValue' | 'label'>, BaseCheckboxProps {
|
|
590
|
+
//
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
export interface MRadioSlots extends MCheckboxSlots {
|
|
594
|
+
//
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
export interface MPickerProps extends BaseInputsProps,
|
|
598
|
+
Omit<QDateProps, 'modelValue' | 'options'>,
|
|
599
|
+
Omit<QTimeProps, 'modelValue'> {
|
|
600
|
+
/**
|
|
601
|
+
* Initial value of the picker.
|
|
602
|
+
* Default is: null.
|
|
603
|
+
*/
|
|
604
|
+
modelValue?: any;
|
|
605
|
+
/**
|
|
606
|
+
* Type of picker. 'date' or 'time'.
|
|
607
|
+
* Default is: 'date'.
|
|
608
|
+
*/
|
|
609
|
+
type?: 'date' | 'time';
|
|
610
|
+
/**
|
|
611
|
+
* QBtn props for append button.
|
|
612
|
+
*/
|
|
613
|
+
btnProps?: QBtnProps;
|
|
614
|
+
/**
|
|
615
|
+
* Value of separator for range picker.
|
|
616
|
+
* Default is: ' - '.
|
|
617
|
+
*/
|
|
618
|
+
rangeSeparator?: string;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
export interface MPickerSlots extends MInputSlots {
|
|
622
|
+
//
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
export interface MDateProps extends Omit<MPickerProps, 'type'> {
|
|
626
|
+
//
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
export interface MDateSlots extends MPickerSlots {
|
|
630
|
+
//
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
export interface MTimeProps extends Omit<MPickerProps, 'type'> {
|
|
634
|
+
//
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
export interface MTimeSlots extends MPickerSlots {
|
|
638
|
+
//
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
export interface MFieldProps extends Omit<MInputProps, 'viewMode' | 'viewModeValue' | 'fieldOptions'> {
|
|
642
|
+
//
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
export interface MFieldSlots extends MInputSlots {
|
|
646
|
+
//
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
export interface MHiddenInputSlots {
|
|
650
|
+
[key: string]: () => VNode[]
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
export interface MHiddenInputProps extends Pick<BaseInputFormProps, 'rules' | 'required'> {
|
|
654
|
+
/**
|
|
655
|
+
* Input name.
|
|
656
|
+
*/
|
|
657
|
+
name: string;
|
|
658
|
+
/**
|
|
659
|
+
* Input model value.
|
|
660
|
+
*/
|
|
661
|
+
modelValue?: any;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
export interface MHiddenProps extends MHiddenInputProps, Pick<ViewModeProps, 'viewMode'>, Omit<MColProps, 'name'> {
|
|
665
|
+
//
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
export interface MHiddenSlots {
|
|
669
|
+
/**
|
|
670
|
+
* Field main content
|
|
671
|
+
*/
|
|
672
|
+
default: () => VNode[];
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
export type MFormScope = FormContext<Record<string, any>>;
|
|
676
|
+
|
|
677
|
+
export interface MFormProps {
|
|
678
|
+
/**
|
|
679
|
+
* Form HTML element attributes.
|
|
680
|
+
*/
|
|
681
|
+
formProps?: Record<string, any>;
|
|
682
|
+
/**
|
|
683
|
+
* Default options of useForm.
|
|
684
|
+
*/
|
|
685
|
+
opts?: FormOptions<Record<string, any>>;
|
|
686
|
+
/**
|
|
687
|
+
* The target to which the page will be scrolled.
|
|
688
|
+
* Default is: Window.
|
|
689
|
+
*/
|
|
690
|
+
target?: HTMLElement | string | undefined;
|
|
691
|
+
/**
|
|
692
|
+
* Emit values instead controlled values.
|
|
693
|
+
* Default is: false.
|
|
694
|
+
*/
|
|
695
|
+
emitValues?: boolean;
|
|
696
|
+
/**
|
|
697
|
+
* Watch to reset form values.
|
|
698
|
+
*/
|
|
699
|
+
readonly state?: MaybeRefOrGetter<Partial<FormState<Record<string, any>>>>;
|
|
700
|
+
/**
|
|
701
|
+
* Watch to reset form values.
|
|
702
|
+
*/
|
|
703
|
+
readonly form?: MaybeRefOrGetter<Record<string, any>>;
|
|
704
|
+
/**
|
|
705
|
+
* Watch to set form values.
|
|
706
|
+
*/
|
|
707
|
+
readonly values?: MaybeRefOrGetter<Record<string, any>>;
|
|
708
|
+
/**
|
|
709
|
+
* Watch to set form errors.
|
|
710
|
+
*/
|
|
711
|
+
readonly errors?: MaybeRefOrGetter<Record<string, string | string[]>>;
|
|
712
|
+
/**
|
|
713
|
+
* Apply padding to form.
|
|
714
|
+
*/
|
|
715
|
+
readonly padding?: boolean;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
export interface MFormSlots {
|
|
719
|
+
default: (scope: MFormScope) => VNode[];
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
export declare type GenericFormValues = Record<any, any>;
|
|
723
|
+
|
|
724
|
+
type ParamsReq = Record<string, any>;
|
|
725
|
+
|
|
726
|
+
export interface MAxiosProps extends Omit<MSelectProps, 'options' | 'axiosMode'> {
|
|
727
|
+
/**
|
|
728
|
+
* Request method. Default is GET.
|
|
729
|
+
*/
|
|
730
|
+
service: ((config?: AxiosRequestConfig) => Promise<any>) | string;
|
|
731
|
+
/**
|
|
732
|
+
* Send request as guest request. If false, send request as authenticated user. Default is true.
|
|
733
|
+
*/
|
|
734
|
+
guest?: boolean | MaybeRefOrGetter<boolean>;
|
|
735
|
+
/**
|
|
736
|
+
* Request params.
|
|
737
|
+
*/
|
|
738
|
+
params?: Ref<ParamsReq> | ShallowRef<ParamsReq> | WritableComputedRef<ParamsReq> | ComputedRef<ParamsReq> | (() => ParamsReq);
|
|
739
|
+
/**
|
|
740
|
+
* Request relations.
|
|
741
|
+
*/
|
|
742
|
+
requestWith?: MaybeRefOrGetter<string> | undefined;
|
|
743
|
+
/**
|
|
744
|
+
* Component items.
|
|
745
|
+
*/
|
|
746
|
+
items?: any[];
|
|
747
|
+
/**
|
|
748
|
+
* The name of the attribute to be used as a label
|
|
749
|
+
*/
|
|
750
|
+
attributeName?: string;
|
|
751
|
+
/**
|
|
752
|
+
* Do fetch asynchronous
|
|
753
|
+
*/
|
|
754
|
+
lazy?: boolean;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
export interface MAxiosSlots extends MSelectSlots {
|
|
758
|
+
//
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
export interface MOptionsOptionContext extends Omit<QToggleProps, 'modelValue'>, Omit<QRadioProps, 'modelValue'>, Omit<QCheckboxProps, 'modelValue'> {
|
|
762
|
+
/**
|
|
763
|
+
* Label to display along the component
|
|
764
|
+
*/
|
|
765
|
+
label: string;
|
|
766
|
+
/**
|
|
767
|
+
* Value of the option that will be used by the component model
|
|
768
|
+
*/
|
|
769
|
+
value: any;
|
|
770
|
+
/**
|
|
771
|
+
* If true, the option will be disabled
|
|
772
|
+
*/
|
|
773
|
+
disable?: boolean;
|
|
774
|
+
/**
|
|
775
|
+
* Any other props from QToggle, QCheckbox, or QRadio
|
|
776
|
+
*/
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
export interface MOptionsProps extends Omit<QOptionGroupProps, 'name' | 'modelValue' | 'options'>,
|
|
780
|
+
Omit<BaseInputsProps, 'autocomplete' | 'modelValue'> {
|
|
781
|
+
modelValue?: any;
|
|
782
|
+
/**
|
|
783
|
+
* Array of objects with value, label, and disable (optional) props. The binary components will be created according to this array; Props from QToggle, QCheckbox or QRadio can also be added as key/value pairs to control the components singularly
|
|
784
|
+
*/
|
|
785
|
+
options?: MOptionsOptionContext[];
|
|
786
|
+
/**
|
|
787
|
+
* Get options by function. any send the current value to this function to get options.
|
|
788
|
+
*/
|
|
789
|
+
service?: ((value?: any) => Promise<ApiInterface>) | undefined;
|
|
790
|
+
/**
|
|
791
|
+
* Service loading.
|
|
792
|
+
*/
|
|
793
|
+
loading?: boolean | undefined;
|
|
794
|
+
/**
|
|
795
|
+
* Set content to be full width.
|
|
796
|
+
*/
|
|
797
|
+
fullWidth?: boolean;
|
|
798
|
+
/**
|
|
799
|
+
* Set width of content to be equals.
|
|
800
|
+
* Default is: 33.33333333%
|
|
801
|
+
*/
|
|
802
|
+
fitWidth?: boolean;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
export interface MOtpProps extends Omit<QInputProps, 'modelValue'> {
|
|
806
|
+
modelValue?: string | number;
|
|
807
|
+
inputLength?: string | number;
|
|
808
|
+
numeric?: boolean;
|
|
809
|
+
time?: string | number;
|
|
810
|
+
hideTime?: boolean;
|
|
811
|
+
hideSendAgain?: boolean;
|
|
812
|
+
topLabel?: string | undefined;
|
|
813
|
+
topLabelProps?: any | undefined;
|
|
814
|
+
errors?: string[];
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
export interface MOtpSlots extends QInputSlots {
|
|
818
|
+
default: () => VNode[];
|
|
819
|
+
'before-all': () => VNode[];
|
|
820
|
+
'after-all': () => VNode[];
|
|
821
|
+
'after-input': () => VNode[];
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
export interface MOptionsSlots extends QOptionGroupSlots, QFieldSlots, BaseInputsSlots {
|
|
825
|
+
//
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
export interface MToggleProps extends Omit<BaseInputsProps, 'placeholder' | 'topLabel' | 'autocomplete' | 'modelValue'>,
|
|
829
|
+
Omit<QToggleProps, 'modelValue' | 'label' | 'name'> {
|
|
830
|
+
modelValue?: number;
|
|
831
|
+
/**
|
|
832
|
+
* Customize the label when the toggle is true.
|
|
833
|
+
* Default is: Yes.
|
|
834
|
+
*/
|
|
835
|
+
activeLabel?: string;
|
|
836
|
+
/**
|
|
837
|
+
* Customize the label when the toggle is false.
|
|
838
|
+
* Default is: No.
|
|
839
|
+
*/
|
|
840
|
+
inactiveLabel?: string;
|
|
841
|
+
/**
|
|
842
|
+
* Set labels of toggle to status, Active & Inactive.
|
|
843
|
+
*/
|
|
844
|
+
status?: boolean;
|
|
845
|
+
/**
|
|
846
|
+
* Input row props.
|
|
847
|
+
*/
|
|
848
|
+
rowProps?: Record<string, any>;
|
|
849
|
+
/**
|
|
850
|
+
* Input column props.
|
|
851
|
+
*/
|
|
852
|
+
colProps?: Record<string, any>;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
export interface MToggleSlots extends MCheckboxSlots, Pick<BaseInputsProps, 'topLabel'> {
|
|
856
|
+
//
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
export type MUploaderMediaItem = {
|
|
860
|
+
id: number;
|
|
861
|
+
value: number;
|
|
862
|
+
name: string;
|
|
863
|
+
file_name: string;
|
|
864
|
+
type: string;
|
|
865
|
+
size: number;
|
|
866
|
+
size_to_string: string;
|
|
867
|
+
url: string;
|
|
868
|
+
download_url: string;
|
|
869
|
+
icon: string;
|
|
870
|
+
description: string;
|
|
871
|
+
attachment_type: string;
|
|
872
|
+
attachment_type_id: number;
|
|
873
|
+
attachment_type_id_to_string: string;
|
|
874
|
+
user_id: number | null;
|
|
875
|
+
user_id_to_string: string;
|
|
876
|
+
order_column: number;
|
|
877
|
+
[k: string]: any;
|
|
878
|
+
};
|
|
879
|
+
|
|
880
|
+
export type MUploaderServiceType = Pick<HelpersStubSchema, 'getUploadAttachmentsUrl' | 'updateAttachment' | 'uploadAttachments' | 'deleteAttachment'>
|
|
881
|
+
|
|
882
|
+
export interface MUploaderProps extends Omit<QUploaderProps, 'formFields' | 'headers' | 'url'>, MColProps, Pick<BaseInputsProps, 'fieldOptions'> {
|
|
883
|
+
/**
|
|
884
|
+
* Name fo field input, Attachments key name.
|
|
885
|
+
* Default is: 'attachments'
|
|
886
|
+
*/
|
|
887
|
+
name?: string;
|
|
888
|
+
/**
|
|
889
|
+
* Put component in disabled mode
|
|
890
|
+
*/
|
|
891
|
+
disable?: boolean;
|
|
892
|
+
/**
|
|
893
|
+
* Put component in readonly mode
|
|
894
|
+
*/
|
|
895
|
+
readonly?: boolean;
|
|
896
|
+
/**
|
|
897
|
+
* Comma separated list of unique file type specifiers. Maps to 'accept' attribute of native input type=file element
|
|
898
|
+
*/
|
|
899
|
+
accept?: string;
|
|
900
|
+
/**
|
|
901
|
+
* Support for uploading images
|
|
902
|
+
*/
|
|
903
|
+
images?: boolean;
|
|
904
|
+
/**
|
|
905
|
+
* Support for uploading svg
|
|
906
|
+
*/
|
|
907
|
+
svg?: boolean;
|
|
908
|
+
/**
|
|
909
|
+
* Support for uploading videos
|
|
910
|
+
*/
|
|
911
|
+
video?: boolean;
|
|
912
|
+
/**
|
|
913
|
+
* Support for uploading pdf
|
|
914
|
+
*/
|
|
915
|
+
pdf?: boolean;
|
|
916
|
+
/**
|
|
917
|
+
* Support for uploading excel
|
|
918
|
+
*/
|
|
919
|
+
excel?: boolean;
|
|
920
|
+
/**
|
|
921
|
+
* Upload files immediately when added
|
|
922
|
+
*/
|
|
923
|
+
autoUpload?: boolean;
|
|
924
|
+
/**
|
|
925
|
+
* Field name for each file upload; This goes into the following header: 'Content-Disposition: form-data; name="__HERE__"; filename="somefile.png"; If using a function then for best performance, reference it from your scope and do not define it inline
|
|
926
|
+
* Default value: (file) => file.name
|
|
927
|
+
* @param files The current file being processed
|
|
928
|
+
* @returns Field name for the current file upload
|
|
929
|
+
*/
|
|
930
|
+
fieldName?: string | ((files: File) => string);
|
|
931
|
+
/**
|
|
932
|
+
* Collection send to API
|
|
933
|
+
*/
|
|
934
|
+
collection?: string | number | symbol;
|
|
935
|
+
/**
|
|
936
|
+
* Field Attachment Type
|
|
937
|
+
*/
|
|
938
|
+
attachmentType?: any;
|
|
939
|
+
/**
|
|
940
|
+
* return attachments after upload;
|
|
941
|
+
* Default current collection name;
|
|
942
|
+
*/
|
|
943
|
+
returnType?: 'all' | 'current' | undefined;
|
|
944
|
+
/**
|
|
945
|
+
* Object with additional fields definitions (used by Form to be uploaded);
|
|
946
|
+
*/
|
|
947
|
+
formFields?: Record<string, any>;
|
|
948
|
+
/**
|
|
949
|
+
* Extra headers
|
|
950
|
+
*/
|
|
951
|
+
headers?: Record<string, any>;
|
|
952
|
+
/**
|
|
953
|
+
* Label for the uploader
|
|
954
|
+
*/
|
|
955
|
+
label?: string | null | undefined;
|
|
956
|
+
/**
|
|
957
|
+
* The Attachments list.
|
|
958
|
+
*/
|
|
959
|
+
modelValue?: MUploaderMediaItem[];
|
|
960
|
+
/**
|
|
961
|
+
* Hide delete media items from uploader, no delete media For API
|
|
962
|
+
*/
|
|
963
|
+
hideDeleteMedia?: boolean;
|
|
964
|
+
/**
|
|
965
|
+
* Show update button of media.
|
|
966
|
+
*/
|
|
967
|
+
updateBtn?: boolean;
|
|
968
|
+
/**
|
|
969
|
+
* User APi service for upload & delete
|
|
970
|
+
*/
|
|
971
|
+
service: string | MUploaderServiceType;
|
|
972
|
+
/**
|
|
973
|
+
* The ID of model will use in attachments
|
|
974
|
+
*/
|
|
975
|
+
modelId?: string | number | undefined;
|
|
976
|
+
uploading?: boolean | undefined;
|
|
977
|
+
defaultFileIcon?: string | undefined;
|
|
978
|
+
deleteMediaIcon?: string | undefined;
|
|
979
|
+
uploadFilesIcon?: string | undefined;
|
|
980
|
+
pickFilesIcon?: string | undefined;
|
|
981
|
+
removeUploadedIcon?: string | undefined;
|
|
982
|
+
removeQueuedIcon?: string | undefined;
|
|
983
|
+
abortUploadIcon?: string | undefined;
|
|
984
|
+
downloadFileIcon?: string | undefined;
|
|
985
|
+
errorsIcon?: string | undefined;
|
|
986
|
+
iconsSize?: string | undefined;
|
|
987
|
+
displayMode?: 'list' | 'card' | undefined;
|
|
988
|
+
shadow?: string | undefined;
|
|
989
|
+
/**
|
|
990
|
+
* Media Item Label Field.
|
|
991
|
+
* Default is: name.
|
|
992
|
+
*/
|
|
993
|
+
mediaLabel?: string | undefined;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
export interface MUploaderSlots extends QUploaderSlots {
|
|
997
|
+
/**
|
|
998
|
+
* Field main content
|
|
999
|
+
*/
|
|
1000
|
+
default: () => VNode[];
|
|
1001
|
+
/**
|
|
1002
|
+
* list of item will be display
|
|
1003
|
+
*/
|
|
1004
|
+
// list: (scope: { item: MUploaderMediaItem, index: number }) => VNode[];
|
|
1005
|
+
/**
|
|
1006
|
+
* list of item will be display
|
|
1007
|
+
*/
|
|
1008
|
+
'item-list': (scope: { item: MUploaderMediaItem, index: number }) => VNode[];
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
export type MUploaderXhrInfo = { files: readonly any[]; xhr: any; }
|
|
1012
|
+
|
|
1013
|
+
export type MModalMenuProps = Partial<QDialogProps> & Partial<QMenuProps> & Partial<QPopupProxyProps> & {
|
|
1014
|
+
noCloseBtn?: boolean;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
export type MModalMenuSlots = {
|
|
1018
|
+
default: () => VNode[];
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
export type MTooltipProps = Partial<QTooltipProps> & {
|
|
1022
|
+
/**
|
|
1023
|
+
* One of Quasar's embedded transitions
|
|
1024
|
+
* Default value: jump-down
|
|
1025
|
+
*/
|
|
1026
|
+
transitionShow?: string | undefined;
|
|
1027
|
+
/**
|
|
1028
|
+
* One of Quasar's embedded transitions
|
|
1029
|
+
* Default value: jump-up
|
|
1030
|
+
*/
|
|
1031
|
+
transitionHide?: string | undefined;
|
|
1032
|
+
/**
|
|
1033
|
+
* Transition duration (in milliseconds, without unit)
|
|
1034
|
+
* Default value: 300
|
|
1035
|
+
*/
|
|
1036
|
+
transitionDuration?: string | number | undefined;
|
|
1037
|
+
/**
|
|
1038
|
+
* Model of the component defining shown/hidden state; Either use this property (along with a listener for 'update:model-value' event) OR use v-model directive
|
|
1039
|
+
*/
|
|
1040
|
+
modelValue?: boolean;
|
|
1041
|
+
/**
|
|
1042
|
+
* The maximum height of the Tooltip; Size in CSS units, including unit name
|
|
1043
|
+
*/
|
|
1044
|
+
maxHeight?: string | undefined;
|
|
1045
|
+
/**
|
|
1046
|
+
* The maximum width of the Tooltip; Size in CSS units, including unit name
|
|
1047
|
+
*/
|
|
1048
|
+
maxWidth?: string | undefined;
|
|
1049
|
+
/**
|
|
1050
|
+
* Two values setting the starting position or anchor point of the Tooltip relative to its target
|
|
1051
|
+
* Default value: bottom middle
|
|
1052
|
+
*/
|
|
1053
|
+
anchor?:
|
|
1054
|
+
| 'top left'
|
|
1055
|
+
| 'top middle'
|
|
1056
|
+
| 'top right'
|
|
1057
|
+
| 'top start'
|
|
1058
|
+
| 'top end'
|
|
1059
|
+
| 'center left'
|
|
1060
|
+
| 'center middle'
|
|
1061
|
+
| 'center right'
|
|
1062
|
+
| 'center start'
|
|
1063
|
+
| 'center end'
|
|
1064
|
+
| 'bottom left'
|
|
1065
|
+
| 'bottom middle'
|
|
1066
|
+
| 'bottom right'
|
|
1067
|
+
| 'bottom start'
|
|
1068
|
+
| 'bottom end'
|
|
1069
|
+
| undefined;
|
|
1070
|
+
/**
|
|
1071
|
+
* Two values setting the Tooltip's own position relative to its target
|
|
1072
|
+
* Default value: top middle
|
|
1073
|
+
*/
|
|
1074
|
+
self?:
|
|
1075
|
+
| 'top left'
|
|
1076
|
+
| 'top middle'
|
|
1077
|
+
| 'top right'
|
|
1078
|
+
| 'top start'
|
|
1079
|
+
| 'top end'
|
|
1080
|
+
| 'center left'
|
|
1081
|
+
| 'center middle'
|
|
1082
|
+
| 'center right'
|
|
1083
|
+
| 'center start'
|
|
1084
|
+
| 'center end'
|
|
1085
|
+
| 'bottom left'
|
|
1086
|
+
| 'bottom middle'
|
|
1087
|
+
| 'bottom right'
|
|
1088
|
+
| 'bottom start'
|
|
1089
|
+
| 'bottom end'
|
|
1090
|
+
| undefined;
|
|
1091
|
+
/**
|
|
1092
|
+
* An array of two numbers to offset the Tooltip horizontally and vertically in pixels
|
|
1093
|
+
* Default value: [14, 14]
|
|
1094
|
+
*/
|
|
1095
|
+
offset?: readonly any[] | undefined;
|
|
1096
|
+
/**
|
|
1097
|
+
* CSS selector or DOM element to be used as a custom scroll container instead of the auto detected one
|
|
1098
|
+
*/
|
|
1099
|
+
scrollTarget?: Element | string | undefined;
|
|
1100
|
+
/**
|
|
1101
|
+
* Configure a target element to trigger Tooltip toggle; 'true' means it enables the parent DOM element, 'false' means it disables attaching events to any DOM elements; By using a String (CSS selector) it attaches the events to the specified DOM element (if it exists)
|
|
1102
|
+
* Default value: true
|
|
1103
|
+
*/
|
|
1104
|
+
target?: boolean | string | undefined;
|
|
1105
|
+
/**
|
|
1106
|
+
* Skips attaching events to the target DOM element (that trigger the element to get shown)
|
|
1107
|
+
*/
|
|
1108
|
+
noParentEvent?: boolean | undefined;
|
|
1109
|
+
/**
|
|
1110
|
+
* Configure Tooltip to appear with delay
|
|
1111
|
+
*/
|
|
1112
|
+
delay?: number | undefined;
|
|
1113
|
+
/**
|
|
1114
|
+
* Configure Tooltip to disappear with delay
|
|
1115
|
+
*/
|
|
1116
|
+
hideDelay?: number | undefined;
|
|
1117
|
+
/**
|
|
1118
|
+
* Emitted when showing/hidden state changes; Is also used by v-model
|
|
1119
|
+
* @param value New state (showing/hidden)
|
|
1120
|
+
*/
|
|
1121
|
+
'onUpdate:modelValue'?: (value: boolean) => void;
|
|
1122
|
+
/**
|
|
1123
|
+
* Emitted after component has triggered show()
|
|
1124
|
+
* @param evt JS event object
|
|
1125
|
+
*/
|
|
1126
|
+
onShow?: (evt: Event) => void;
|
|
1127
|
+
/**
|
|
1128
|
+
* Emitted when component triggers show() but before it finishes doing it
|
|
1129
|
+
* @param evt JS event object
|
|
1130
|
+
*/
|
|
1131
|
+
onBeforeShow?: (evt: Event) => void;
|
|
1132
|
+
/**
|
|
1133
|
+
* Emitted after component has triggered hide()
|
|
1134
|
+
* @param evt JS event object
|
|
1135
|
+
*/
|
|
1136
|
+
onHide?: (evt: Event) => void;
|
|
1137
|
+
/**
|
|
1138
|
+
* Emitted when component triggers hide() but before it finishes doing it
|
|
1139
|
+
* @param evt JS event object
|
|
1140
|
+
*/
|
|
1141
|
+
onBeforeHide?: (evt: Event) => void;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
export type MTooltipSlots = {
|
|
1145
|
+
default: () => VNode[];
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
export type MDialogProps = Partial<QDialogProps> & {
|
|
1149
|
+
slide?: boolean | undefined;
|
|
1150
|
+
from?: 'up' | 'down' | 'left' | 'right';
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
export type MDialogSlots = {
|
|
145
1154
|
default: () => VNode[];
|
|
146
1155
|
}
|
|
147
1156
|
|
|
148
1157
|
declare module '@vue/runtime-core' {
|
|
149
1158
|
interface GlobalComponents {
|
|
150
1159
|
// Form.
|
|
1160
|
+
MAvatarViewer: GlobalComponentConstructor<MAvatarViewerProps, MAvatarViewerSlots>;
|
|
1161
|
+
MAxios: GlobalComponentConstructor<MAxiosProps, MAxiosSlots>;
|
|
151
1162
|
MBtn: GlobalComponentConstructor<MBtnProps, MBtnSlots>;
|
|
1163
|
+
MCheckbox: GlobalComponentConstructor<MCheckboxProps, MCheckboxSlots>;
|
|
1164
|
+
MColor: GlobalComponentConstructor<MInputProps, MInputSlots>;
|
|
1165
|
+
MDate: GlobalComponentConstructor<MDateProps, MDateSlots>;
|
|
1166
|
+
MEditor: GlobalComponentConstructor<MEditorProps, MEditorSlots>;
|
|
1167
|
+
MEmail: GlobalComponentConstructor<MInputProps, MInputSlots>;
|
|
1168
|
+
MField: GlobalComponentConstructor<MFieldProps, MFieldSlots>;
|
|
1169
|
+
MFile: GlobalComponentConstructor<MFileProps, MFileSlots>;
|
|
1170
|
+
MForm: GlobalComponentConstructor<MFormProps, MFormSlots>;
|
|
1171
|
+
MHidden: GlobalComponentConstructor<MHiddenProps, MHiddenSlots>;
|
|
1172
|
+
MHiddenInput: GlobalComponentConstructor<MHiddenInputProps, MHiddenInputSlots>;
|
|
1173
|
+
MInputFieldControl: GlobalComponentConstructor<MInputFieldControlProps, MInputFieldControlSlots>;
|
|
1174
|
+
MInputLabel: GlobalComponentConstructor<MInputLabelProps, MInputLabelSlots>;
|
|
1175
|
+
MMobile: GlobalComponentConstructor<MInputProps, MInputSlots>;
|
|
1176
|
+
MOptions: GlobalComponentConstructor<MOptionsProps, MOptionsSlots>;
|
|
1177
|
+
MOtp: GlobalComponentConstructor<MOtpProps, MOtpSlots>;
|
|
1178
|
+
MPassword: GlobalComponentConstructor<MPasswordProps, MInputSlots>;
|
|
1179
|
+
MPicker: GlobalComponentConstructor<MPickerProps, MPickerSlots>;
|
|
1180
|
+
MRadio: GlobalComponentConstructor<MRadioProps, MRadioSlots>;
|
|
1181
|
+
MSelect: GlobalComponentConstructor<MSelectProps, MSelectSlots>;
|
|
1182
|
+
MTime: GlobalComponentConstructor<MTimeProps, MTimeSlots>;
|
|
1183
|
+
MToggle: GlobalComponentConstructor<MToggleProps, MToggleSlots>;
|
|
1184
|
+
MUploader: GlobalComponentConstructor<MUploaderProps, MUploaderSlots>;
|
|
152
1185
|
|
|
153
1186
|
// Grid.
|
|
154
1187
|
MBlock: GlobalComponentConstructor<MBlockProps, MBlockSlots>;
|
|
@@ -157,7 +1190,22 @@ declare module '@vue/runtime-core' {
|
|
|
157
1190
|
MContainer: GlobalComponentConstructor<MContainerProps, MContainerSlots>;
|
|
158
1191
|
MHelpRow: GlobalComponentConstructor<MHelpRowProps, MHelpRowSlots>;
|
|
159
1192
|
MRow: GlobalComponentConstructor<MRowProps, MRowSlots>;
|
|
1193
|
+
|
|
160
1194
|
// Typography.
|
|
161
1195
|
MTypingString: GlobalComponentConstructor<MTypingStringProps, MTypingStringSlots>;
|
|
1196
|
+
|
|
1197
|
+
// Transitions.
|
|
1198
|
+
MTransition: GlobalComponentConstructor<MTransitionProps, MTransitionsSlots>;
|
|
1199
|
+
MFadeTransition: GlobalComponentConstructor<TransitionProps, MTransitionsSlots>;
|
|
1200
|
+
MFadeXTransition: GlobalComponentConstructor<TransitionProps, MTransitionsSlots>;
|
|
1201
|
+
// Modals.
|
|
1202
|
+
MDialog: GlobalComponentConstructor<MDialogProps, MDialogSlots>;
|
|
1203
|
+
MModalMenu: GlobalComponentConstructor<MModalMenuProps, MModalMenuSlots>;
|
|
1204
|
+
MTooltip: GlobalComponentConstructor<MTooltipProps, MTooltipSlots>;
|
|
1205
|
+
// Datatable
|
|
1206
|
+
MDatatable: GlobalComponentConstructor<MDatatableProps, MDatatableSlots>;
|
|
1207
|
+
MDtAvatar: GlobalComponentConstructor<MDtAvatarProps, MDtAvatarSlots>;
|
|
1208
|
+
MDtBtn: GlobalComponentConstructor<MDtBtnProps, MDtBtnSlots>;
|
|
1209
|
+
MDtContextmenuItems: GlobalComponentConstructor<MDtContextmenuItemsProps, MDtContextmenuItemsSlots>;
|
|
162
1210
|
}
|
|
163
1211
|
}
|