@mythpe/quasar-ui-qui 0.0.23 → 0.0.24-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.
Files changed (69) hide show
  1. package/index.d.ts +17 -0
  2. package/package.json +14 -9
  3. package/src/boot/register.ts +14 -0
  4. package/src/components/form/MAvatarViewer.vue +324 -0
  5. package/src/components/form/MBtn.vue +271 -93
  6. package/src/components/form/MCheckbox.vue +123 -0
  7. package/src/components/form/MColor.vue +122 -0
  8. package/src/components/form/MDate.vue +47 -0
  9. package/src/components/form/MEditor.vue +285 -0
  10. package/src/components/form/MEmail.vue +40 -0
  11. package/src/components/form/MField.vue +142 -0
  12. package/src/components/form/MFile.vue +209 -0
  13. package/src/components/form/MForm.vue +83 -0
  14. package/src/components/form/MHidden.vue +83 -0
  15. package/src/components/form/MHiddenInput.vue +55 -0
  16. package/src/components/form/MInput.vue +178 -0
  17. package/src/components/form/MInputFieldControl.vue +27 -0
  18. package/src/components/form/MInputLabel.vue +35 -0
  19. package/src/components/form/MMobile.vue +37 -0
  20. package/src/components/form/MPicker.vue +310 -0
  21. package/src/components/form/MRadio.vue +175 -0
  22. package/src/components/form/MSelect.vue +343 -0
  23. package/src/components/form/MTime.vue +45 -0
  24. package/src/components/form/index.ts +51 -0
  25. package/src/components/grid/MBlock.vue +40 -18
  26. package/src/components/grid/MCol.vue +11 -15
  27. package/src/components/grid/MColumn.vue +8 -0
  28. package/src/components/grid/MContainer.vue +22 -13
  29. package/src/components/grid/MHelpRow.vue +9 -12
  30. package/src/components/grid/MRow.vue +31 -10
  31. package/src/components/grid/index.ts +16 -0
  32. package/src/components/index.ts +12 -0
  33. package/src/components/transition/MFadeTransition.vue +27 -0
  34. package/src/components/transition/MFadeXTransition.vue +26 -0
  35. package/src/components/transition/MTransition.vue +41 -0
  36. package/src/components/transition/index.ts +13 -0
  37. package/src/components/typography/MTypingString.vue +8 -0
  38. package/src/components/typography/index.ts +11 -0
  39. package/src/composable/index.ts +12 -0
  40. package/src/composable/useBindInput.ts +209 -0
  41. package/src/composable/useError.ts +11 -0
  42. package/src/composable/useMyth.ts +294 -0
  43. package/src/composable/useValue.ts +12 -0
  44. package/src/index.common.js +19 -1
  45. package/src/index.esm.js +18 -3
  46. package/src/index.js +19 -0
  47. package/src/index.sass +8 -26
  48. package/src/index.ts +18 -4
  49. package/src/index.umd.js +16 -2
  50. package/src/style/m-container.sass +13 -0
  51. package/src/style/main.sass +42 -0
  52. package/src/types/api-helpers.d.ts +120 -0
  53. package/src/types/components.d.ts +682 -28
  54. package/src/types/dt.d.ts +142 -0
  55. package/src/types/index.d.ts +153 -1
  56. package/src/types/lodash.d.ts +26 -0
  57. package/src/types/quasar-helpers.d.ts +7 -0
  58. package/src/types/theme.d.ts +12 -0
  59. package/src/utils/Helpers.ts +321 -0
  60. package/src/utils/Str.ts +210 -0
  61. package/src/utils/index.ts +13 -0
  62. package/src/utils/myth.ts +90 -0
  63. package/src/utils/vee-rules.ts +32 -0
  64. package/src/utils/vue-plugin.ts +122 -0
  65. package/tsconfig.json +9 -13
  66. package/src/myth.ts +0 -30
  67. package/src/types/myth.ts +0 -42
  68. package/src/vue-plugin.ts +0 -41
  69. package/types.d.ts +0 -1
@@ -1,8 +1,54 @@
1
- import type { GlobalComponentConstructor, QBtnProps, QBtnSlots, QItemProps } from 'quasar'
2
- import type { VNode } from 'vue'
3
- import { TypedOptions } from 'typed.js'
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
- export type StyleSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'none';
9
+ import type {
10
+ GlobalComponentConstructor,
11
+ QAvatarProps,
12
+ QAvatarSlots,
13
+ QBtnProps,
14
+ QBtnSlots,
15
+ QCheckboxProps,
16
+ QDateProps, QEditorProps, QEditorSlots,
17
+ QFieldSlots,
18
+ QFileProps,
19
+ QFileSlots,
20
+ QImgProps,
21
+ QInputProps,
22
+ QInputSlots,
23
+ QItemProps,
24
+ QRadioProps, QSelectProps, QTableProps,
25
+ QTimeProps
26
+ } from 'quasar'
27
+ import type { MaybeRefOrGetter, TransitionGroupProps, TransitionProps, UnwrapNestedRefs, VNode } from 'vue'
28
+ import type { TypedOptions } from 'typed.js'
29
+ import type { FieldContext, FieldOptions, FormContext, FormOptions, FormState } from 'vee-validate'
30
+
31
+ import type { ThemeShadow, ThemeSize } from './theme'
32
+ import type {
33
+ GenericMDtBtn, MDtExportOptions,
34
+ MDtItem,
35
+ MDtRequestParamsCallbackProp,
36
+ MDtRequestParamsObjectProp,
37
+ MDtServiceNameCallbackProp,
38
+ MDtServiceNameStringProp
39
+ } from './dt'
40
+ import type { RouteLocationRaw } from 'vue-router'
41
+
42
+ export type MTransitionProps = TransitionGroupProps & {
43
+ enterIn?: string;
44
+ enterOut?: string;
45
+ slowIn?: boolean;
46
+ slowOut?: boolean;
47
+ }
48
+
49
+ export type MTransitionsSlots = {
50
+ default: () => VNode[];
51
+ }
6
52
 
7
53
  export interface MBtnProps extends QBtnProps {
8
54
  //
@@ -12,7 +58,7 @@ export interface MBtnSlots extends QBtnSlots {
12
58
  /**
13
59
  * Use for custom content, instead of relying on 'icon' and 'label' props
14
60
  */
15
- default: () => VNode[];
61
+ default?: () => VNode[];
16
62
  /**
17
63
  * Override the default QSpinner when in 'loading' state
18
64
  */
@@ -24,19 +70,19 @@ export interface MBlockProps {
24
70
  * Size of the padding block.
25
71
  * Default: 'md'
26
72
  */
27
- readonly size?: StyleSize | undefined;
73
+ size?: ThemeSize | undefined;
28
74
  /**
29
75
  * Rounded block
30
76
  */
31
- readonly rounded?: boolean | undefined;
77
+ rounded?: boolean | undefined;
32
78
  /**
33
79
  * Shadow level
34
80
  */
35
- readonly shadow?: string | number | 'transition' | 'none' | undefined;
81
+ shadow?: ThemeShadow | undefined;
36
82
  }
37
83
 
38
84
  export interface MBlockSlots {
39
- default: () => VNode[];
85
+ default?: () => VNode[];
40
86
  }
41
87
 
42
88
  export type ColStyleType =
@@ -73,18 +119,18 @@ export type ColStyleType =
73
119
  | 12
74
120
 
75
121
  export interface MColProps {
76
- readonly auto?: boolean | undefined;
77
- readonly col?: ColStyleType;
78
- readonly xs?: ColStyleType;
79
- readonly sm?: ColStyleType;
80
- readonly md?: ColStyleType;
81
- readonly lg?: ColStyleType;
82
- readonly xl?: ColStyleType;
83
- readonly name?: string;
122
+ auto?: boolean | undefined;
123
+ col?: ColStyleType;
124
+ xs?: ColStyleType;
125
+ sm?: ColStyleType;
126
+ md?: ColStyleType;
127
+ lg?: ColStyleType;
128
+ xl?: ColStyleType;
129
+ name?: string;
84
130
  }
85
131
 
86
132
  export interface MColSlots {
87
- default: () => VNode[];
133
+ default?: () => VNode[];
88
134
  }
89
135
 
90
136
  export interface MColumnProps {
@@ -92,32 +138,32 @@ export interface MColumnProps {
92
138
  }
93
139
 
94
140
  export interface MColumnSlots {
95
- default: () => VNode[];
141
+ default?: () => VNode[];
96
142
  }
97
143
 
98
- export interface MContainerProps {
99
- readonly size?: StyleSize | string | undefined;
100
- readonly dense?: boolean | undefined;
101
- readonly fluid?: boolean | undefined;
144
+ export type MContainerProps = {
145
+ size?: ThemeSize | string | undefined;
146
+ dense?: boolean | undefined;
147
+ fluid?: boolean | undefined;
102
148
  }
103
149
 
104
150
  export interface MContainerSlots {
105
- default: () => VNode[];
151
+ default?: () => VNode[];
106
152
  }
107
153
 
108
154
  export interface MRowProps {
109
155
  /**
110
156
  * Default: false.
111
157
  */
112
- gutter?: boolean | StyleSize | undefined;
158
+ gutter?: boolean | ThemeSize | undefined;
113
159
  /**
114
160
  * Default: false.
115
161
  */
116
- col?: boolean | StyleSize | undefined;
162
+ col?: boolean | ThemeSize | undefined;
117
163
  }
118
164
 
119
165
  export interface MRowSlots {
120
- default: () => VNode[];
166
+ default?: () => VNode[];
121
167
  }
122
168
 
123
169
  export interface MHelpRowProps extends Partial<QItemProps> {
@@ -127,7 +173,7 @@ export interface MHelpRowProps extends Partial<QItemProps> {
127
173
  }
128
174
 
129
175
  export interface MHelpRowSlots {
130
- default: () => VNode[];
176
+ default?: () => VNode[];
131
177
  }
132
178
 
133
179
  export interface MTypingStringProps {
@@ -142,13 +188,615 @@ export interface MTypingStringProps {
142
188
  }
143
189
 
144
190
  export interface MTypingStringSlots {
191
+ default?: () => VNode[];
192
+ }
193
+
194
+ export interface BaseInputFieldPropContext extends FieldContext<any> {
195
+ //
196
+ }
197
+
198
+ export interface BaseInputFieldProps {
199
+ /**
200
+ * Context of field input.
201
+ */
202
+ field: UnwrapNestedRefs<BaseInputFieldPropContext>;
203
+ label?: string | undefined;
204
+ }
205
+
206
+ export interface MInputFieldControlProps {
207
+ [k: string]: any;
208
+ }
209
+
210
+ export interface MInputFieldControlSlots {
211
+ default: () => VNode[];
212
+ }
213
+
214
+ export interface MInputLabelProps extends BaseInputFieldProps {
215
+ //
216
+ }
217
+
218
+ export interface MInputLabelSlots {
219
+ default?: () => VNode[];
220
+ }
221
+
222
+ export interface ViewModeProps {
223
+ /**
224
+ * Set input to vie mode use q-field
225
+ */
226
+ viewMode?: boolean;
227
+ /**
228
+ * View Mode value for input or modelValue.
229
+ */
230
+ viewModeValue?: any | undefined;
231
+ }
232
+
233
+ export interface InputHelpProps {
234
+ /**
235
+ * Information text with Icon.
236
+ */
237
+ help?: string;
238
+ }
239
+
240
+ export interface InputHelpSlots {
241
+ /**
242
+ * VNode bottom of input & before 'bottom-input slot'.
243
+ */
244
+ help: () => VNode[];
245
+ }
246
+
247
+ export type InputRulesContext = string | string[] | Record<string, any> | undefined;
248
+ export type InputErrorsContext = string[];
249
+ export type InputFormErrorsContext = Record<string, InputErrorsContext> | undefined;
250
+
251
+ export type MAvatarViewerModelValue = File | null | undefined;
252
+
253
+ export type MAvatarViewerProps = QAvatarProps & MColProps & {
254
+ /**
255
+ * Comma separated list of unique file type specifiers. Maps to 'accept' attribute of native input type=file element
256
+ */
257
+ accept?: string | string [] | null | Record<string, string>;
258
+ /**
259
+ * Add accept file type.
260
+ */
261
+ images?: boolean | string;
262
+ /**
263
+ * Add accept svg type.
264
+ */
265
+ svg?: boolean | string;
266
+ /**
267
+ * Add accept video type.
268
+ */
269
+ video?: boolean | string;
270
+ /**
271
+ * Add accept pdf type.
272
+ */
273
+ pdf?: boolean;
274
+ /**
275
+ * Add accept excel type.
276
+ */
277
+ excel?: boolean | string;
278
+ /**
279
+ * Show text if no image
280
+ */
281
+ avatarText?: string;
282
+ /**
283
+ * How the image will fit into the container; Equivalent of the object-fit prop; Can be coordinated with 'position' prop
284
+ * Default value: cover
285
+ */
286
+ fit?: QImgProps['fit'];
287
+ /**
288
+ * Can clear the input & not required
289
+ */
290
+ clearable?: boolean;
291
+ /**
292
+ * The label that will appear above the image
293
+ */
294
+ label?: string;
295
+ /**
296
+ * List of error messages.
297
+ */
298
+ errors?: InputErrorsContext;
299
+ /**
300
+ * List of form errors.
301
+ */
302
+ formErrors?: InputFormErrorsContext;
303
+ /**
304
+ * Model of the component;
305
+ * Must be FileList or Array if using 'multiple' prop;
306
+ * Either use this property (along with a listener for 'update:modelValue' event) OR use v-model directive
307
+ */
308
+ modelValue?: MAvatarViewerModelValue;
309
+ /**
310
+ * The name of the file for the image used and the field.
311
+ * Example: name='avatar' { avatar: https://4myth.com, avatarBlob: Blob, avatarRemoved: !0 | !1 }
312
+ */
313
+ name?: string;
314
+ /**
315
+ * Avatar url.
316
+ * (along with a listener for 'update:url' event) OR use v-model directive
317
+ */
318
+ url?: string;
319
+ /**
320
+ * value if user remove the image
321
+ * (along with a listener for 'update:removed' event) OR use v-model directive
322
+ */
323
+ removed?: boolean;
324
+ /**
325
+ * Input hint.
326
+ */
327
+ hint?: string;
328
+ hintProps?: Record<string, any>;
329
+
330
+ caption?: string;
331
+ captionProps?: Record<string, any>;
332
+ /**
333
+ * Help text after label.
334
+ */
335
+ help?: string;
336
+ /**
337
+ * Set input to readonly.
338
+ */
339
+ readonly?: boolean;
340
+ /**
341
+ * Loading for skeleton.
342
+ */
343
+ loading?: boolean;
344
+ /**
345
+ * Input Required validation.
346
+ */
347
+ required?: boolean;
348
+ /**
349
+ * Input Validation Rules.
350
+ */
351
+ rules?: InputRulesContext;
352
+ }
353
+
354
+ export interface MAvatarViewerSlots extends QAvatarSlots {
355
+ /**
356
+ * Field main content
357
+ */
145
358
  default: () => VNode[];
359
+ hint: () => VNode[];
360
+ }
361
+
362
+ export interface BaseInputFormProps {
363
+ /**
364
+ * Input name.
365
+ */
366
+ name: string;
367
+ /**
368
+ * Input model value.
369
+ * can be used instead of initialValue.
370
+ */
371
+ modelValue?: any;
372
+ /**
373
+ * Input Label.
374
+ */
375
+ label?: string | undefined;
376
+ /**
377
+ * Caption under label.
378
+ */
379
+ caption?: string | undefined;
380
+ /**
381
+ * Input Hint.
382
+ */
383
+ hint?: string | undefined;
384
+ /**
385
+ * Input Placeholder.
386
+ */
387
+ placeholder?: string | undefined;
388
+ /**
389
+ * Input Required validation.
390
+ */
391
+ required?: boolean;
392
+ /**
393
+ * Input Validation Rules.
394
+ */
395
+ rules?: InputRulesContext;
396
+ /**
397
+ * Input Error Messages.
398
+ */
399
+ // errors?: InputErrorsContext;
400
+ /**
401
+ * Form Error Messages.
402
+ */
403
+ // formErrors?: InputFormErrorsContext;
404
+ /**
405
+ * Input autocomplete attribute.
406
+ * if true, will set from input name.
407
+ * if false, will set 'off'.
408
+ * else, will set the attribute value.
409
+ * Default: undefined.
410
+ */
411
+ autocomplete?: boolean | string | undefined;
412
+ /**
413
+ * Inputs Top Label.
414
+ */
415
+ topLabel?: boolean;
416
+ /**
417
+ * Mobile Rule.
418
+ */
419
+ mobile?: boolean | string | number | undefined;
420
+ /**
421
+ * Email Rule.
422
+ */
423
+ email?: boolean;
424
+ /**
425
+ * Number Rule.
426
+ */
427
+ float?: boolean;
428
+ /**
429
+ * vee-validate Field Options.
430
+ */
431
+ fieldOptions?: Partial<FieldOptions> | MaybeRefOrGetter<Partial<FieldOptions>>;
432
+ /**
433
+ * choice key of auto placeholder.
434
+ */
435
+ useChoice?: boolean | string;
436
+ }
437
+
438
+ export interface BaseInputsProps extends ViewModeProps, InputHelpProps, Omit<MColProps, 'name'>, BaseInputFormProps {
439
+ //
440
+ }
441
+
442
+ export interface BaseInputsSlots extends InputHelpSlots {
443
+ /**
444
+ * VNode top of input & top of 'top label slot'.
445
+ */
446
+ 'top-input': () => VNode[];
447
+ /**
448
+ * The label top on input
449
+ */
450
+ 'top-label': () => VNode[];
451
+ /**
452
+ * VNode top of input & after top label.
453
+ */
454
+ caption: () => VNode[];
455
+ /**
456
+ * Field main content
457
+ */
458
+ default: () => VNode[];
459
+ /**
460
+ * VNode bottom of input.
461
+ */
462
+ 'bottom-input': () => VNode[];
463
+ }
464
+
465
+ export interface MInputProps extends Omit<QInputProps, 'rules' | 'name' | 'modelValue' | 'label' | 'hint'>, BaseInputsProps {
466
+ //
467
+ }
468
+
469
+ export interface MInputSlots extends QInputSlots, QFieldSlots, BaseInputsSlots {
470
+ //
471
+ }
472
+
473
+ export type MEditorProps = Omit<QEditorProps, 'modelValue' | 'placeholder'> & BaseInputsProps
474
+ export type MEditorSlots = QEditorSlots & BaseInputsSlots
475
+
476
+ export type MSelectModelEmit = { value: any | null; model: object | null }
477
+ export type MSelectProps = Omit<QSelectProps, 'rules' | 'name' | 'modelValue' | 'label' | 'hint' | 'autocomplete'> & BaseInputsProps & {
478
+ /**
479
+ * Input search functionality. useInput prop for this feature.
480
+ */
481
+ search?: string | null | undefined;
482
+ /**
483
+ * Minimum characters to start searching. Default is 1.
484
+ */
485
+ searchLength?: string | number;
486
+ /**
487
+ * hide the default empty list message.
488
+ */
489
+ hideEmptyList?: boolean | undefined;
490
+ /**
491
+ * Disable filter functionality.
492
+ */
493
+ noFilter?: boolean | undefined;
494
+ /**
495
+ * Set mode of component to axios of filter & search.
496
+ * if set to true, component will fetch data from api and don't do filter functionality.
497
+ */
498
+ axiosMode?: boolean | undefined;
499
+ /**
500
+ * Fetch Data on mounted
501
+ */
502
+ // iniData?: boolean;
503
+ }
504
+ export type MSelectSlots = QInputSlots & QFieldSlots & BaseInputsSlots
505
+
506
+ export type MFileProps =
507
+ Omit<QFileProps, 'modelValue' | 'rules' | 'name' | 'label' | 'hint'>
508
+ & Omit<BaseInputsProps, 'autocomplete'>
509
+ & {
510
+ accept?: string | undefined;
511
+ images?: boolean;
512
+ svg?: boolean;
513
+ video?: boolean;
514
+ pdf?: boolean;
515
+ excel?: boolean;
516
+ }
517
+
518
+ export type MFileSlots = QFileSlots & BaseInputsSlots
519
+
520
+ export interface BaseCheckboxProps extends Omit<BaseInputsProps, 'topLabel'> {
521
+ /**
522
+ * Input row props.
523
+ */
524
+ rowProps?: Record<string, any>;
525
+ /**
526
+ * Input column props.
527
+ */
528
+ colProps?: Record<string, any>;
529
+ }
530
+
531
+ export interface MCheckboxProps extends Omit<QCheckboxProps, 'name' | 'modelValue' | 'label'>, BaseCheckboxProps {
532
+ //
533
+ }
534
+
535
+ export interface MCheckboxSlots extends Omit<BaseInputsSlots, 'top-label'> {
536
+ /**
537
+ * VNode before field main content.
538
+ */
539
+ before: () => VNode[];
540
+ /**
541
+ * VNode after field main content.
542
+ */
543
+ after: () => VNode[];
544
+ }
545
+
546
+ export interface MRadioProps extends Omit<QRadioProps, 'name' | 'modelValue' | 'label'>, BaseCheckboxProps {
547
+ //
548
+ }
549
+
550
+ export interface MRadioSlots extends MCheckboxSlots {
551
+ //
552
+ }
553
+
554
+ export interface MPickerProps extends BaseInputsProps,
555
+ Omit<QDateProps, 'modelValue' | 'options'>,
556
+ Omit<QTimeProps, 'modelValue'> {
557
+ /**
558
+ * Initial value of the picker.
559
+ * Default is: null.
560
+ */
561
+ modelValue?: any;
562
+ /**
563
+ * Type of picker. 'date' or 'time'.
564
+ * Default is: 'date'.
565
+ */
566
+ type?: 'date' | 'time';
567
+ /**
568
+ * QBtn props for append button.
569
+ */
570
+ btnProps?: QBtnProps;
571
+ /**
572
+ * Value of separator for range picker.
573
+ * Default is: ' - '.
574
+ */
575
+ rangeSeparator?: string;
576
+ }
577
+
578
+ export interface MPickerSlots extends MInputSlots {
579
+ //
580
+ }
581
+
582
+ export interface MDateProps extends Omit<MPickerProps, 'type'> {
583
+ //
584
+ }
585
+
586
+ export interface MDateSlots extends MPickerSlots {
587
+ //
588
+ }
589
+
590
+ export interface MTimeProps extends Omit<MPickerProps, 'type'> {
591
+ //
592
+ }
593
+
594
+ export interface MTimeSlots extends MPickerSlots {
595
+ //
596
+ }
597
+
598
+ export type MFieldProps = Omit<MInputProps, 'viewMode' | 'viewModeValue' | 'fieldOptions'>
599
+ export type MFieldSlots = MInputSlots
600
+
601
+ export type MHiddenInputSlots = object
602
+ export type MHiddenInputProps = Pick<BaseInputFormProps, 'rules' | 'required'> & {
603
+ /**
604
+ * Input name.
605
+ */
606
+ name: string;
607
+ /**
608
+ * Input model value.
609
+ */
610
+ modelValue?: any;
611
+ }
612
+
613
+ export type MHiddenProps = MHiddenInputProps & Pick<ViewModeProps, 'viewMode'> & Omit<MColProps, 'name'>
614
+ export type MHiddenSlots = {
615
+ /**
616
+ * Field main content
617
+ */
618
+ default: () => VNode[];
619
+ }
620
+
621
+ export interface MFormProps {
622
+ /**
623
+ * Form HTML element attributes.
624
+ */
625
+ formProps?: Record<string, any>;
626
+ /**
627
+ * Default options of useForm.
628
+ */
629
+ opts?: FormOptions<Record<string, any>>;
630
+ /**
631
+ * The target to which the page will be scrolled.
632
+ * Default is: Window.
633
+ */
634
+ target?: HTMLElement | string | undefined;
635
+ /**
636
+ * Emit values instead controlled values.
637
+ * Default is: false.
638
+ */
639
+ emitValues?: boolean;
640
+ /**
641
+ * Watch to reset form values.
642
+ */
643
+ readonly state?: MaybeRefOrGetter<Partial<FormState<Record<string, any>>>>;
644
+ /**
645
+ * Watch to reset form values.
646
+ */
647
+ readonly form?: MaybeRefOrGetter<Record<string, any>>;
648
+ /**
649
+ * Watch to set form values.
650
+ */
651
+ readonly values?: MaybeRefOrGetter<Record<string, any>>;
652
+ /**
653
+ * Watch to set form errors.
654
+ */
655
+ readonly errors?: MaybeRefOrGetter<Record<string, string | string[]>>;
656
+ /**
657
+ * Apply padding to form.
658
+ */
659
+ readonly padding?: boolean;
660
+ }
661
+
662
+ export type MFormScope = FormContext<Record<string, any>>;
663
+
664
+ export interface MFormSlots {
665
+ default: (scope: MFormScope) => VNode[];
666
+ }
667
+ export declare type GenericFormValues = Record<any, any>;
668
+
669
+ export interface MDtBtnProps extends MBtnProps {
670
+ show?: boolean;
671
+ update?: boolean;
672
+ destroy?: boolean;
673
+ tooltip?: string | undefined;
674
+ color?: string;
675
+ icon?: string;
676
+ listItem?: boolean;
677
+ fabMini?: boolean;
678
+ flat?: boolean;
679
+ round?: boolean;
680
+ dense?: boolean;
681
+ label?: string | undefined;
682
+ }
683
+
684
+ export interface MDtBtnSlots extends MBtnSlots {
685
+ /**
686
+ * Use for custom content, instead of relying on 'icon' and 'label' props
687
+ */
688
+ default: () => VNode[];
689
+ /**
690
+ * Override the default QSpinner when in 'loading' state
691
+ */
692
+ loading: () => VNode[];
693
+ }
694
+
695
+ export type MDatatableProps<I extends GenericFormValues = GenericFormValues> = Omit<QTableProps, 'rows' | 'rowsPerPageOptions' | 'visibleColumns'> & {
696
+ rows?: any[];
697
+ controlKey?: string;
698
+ defaultItem?: Partial<MDtItem<I>>
699
+ contextItems?: GenericMDtBtn[];
700
+ hideAutoMessage?: boolean;
701
+ headers: string[] | Partial<QTableProps['columns']> | any[];
702
+ serviceName?: MDtServiceNameStringProp | MDtServiceNameCallbackProp;
703
+ requestParams?: MDtRequestParamsObjectProp | MDtRequestParamsCallbackProp;
704
+ pdf?: boolean;
705
+ excel?: boolean;
706
+ exportUrl?: MDtExportOptions | boolean;
707
+ hideSearch?: boolean;
708
+ searchDebounce?: string | number;
709
+ withIndex?: string | string[];
710
+ withStore?: string | string[];
711
+ withShow?: string | string[];
712
+ withUpdate?: string | string[];
713
+ hideAddBtn?: boolean;
714
+ hideUpdateBtn?: boolean;
715
+ hideShowBtn?: boolean;
716
+ hideDestroyBtn?: boolean;
717
+ storeRoute?: string | RouteLocationRaw;
718
+ storeQueryParams?: boolean;
719
+ updateRoute?: string | RouteLocationRaw;
720
+ updateQueryParams?: boolean;
721
+ showRoute?: string | RouteLocationRaw;
722
+ showQueryParams?: boolean;
723
+ mouse?: boolean;
724
+ noRefreshBtn?: boolean;
725
+ endReach?: boolean;
726
+ showSelection?: boolean;
727
+ hideSelection?: boolean;
728
+ multiSelection?: boolean;
729
+ multiDestroy?: boolean;
730
+ rowsPerPageOptions?: (string | number)[];
731
+ ignoreKeys?: string[] | ((form: Record<string, any>) => string[]) | any[];
732
+ manageColumns?: boolean;
733
+ visibleColumns?: (string | null | undefined)[] | any[];
734
+ searchColumns?: string[];
735
+ /**
736
+ * Show Add btn top of table,
737
+ */
738
+ addTopBtn?: boolean;
739
+ /**
740
+ * Show Add btn inside more list
741
+ */
742
+ addListBtn?: boolean;
743
+ /**
744
+ * Show Fab Add btn
745
+ */
746
+ addFabBtn?: boolean;
747
+ /**
748
+ * make datatable fullscreen mode
749
+ */
750
+ fullscreenBtn?: boolean;
751
+ /**
752
+ * Auto actions body headers 'control'
753
+ */
754
+ noBodyControl?: boolean;
755
+ /**
756
+ * Auto actions card 'control'
757
+ */
758
+ showCardControlHeader?: boolean;
759
+ /**
760
+ * Set datatable to fixed view
761
+ */
762
+ fixed?: boolean;
763
+ /**
764
+ * Names of image columns in the table.
765
+ */
766
+ imageColumns?: string[] | any[];
767
+ /**
768
+ * How to display image button in table.
769
+ */
770
+ imageMode?: 'icon' | 'image';
771
+ /**
772
+ * Image size in display
773
+ */
774
+ imageSize?: string;
775
+
146
776
  }
147
777
 
148
778
  declare module '@vue/runtime-core' {
149
779
  interface GlobalComponents {
150
780
  // Form.
781
+ MAvatarViewer: GlobalComponentConstructor<MAvatarViewerProps, MAvatarViewerSlots>;
151
782
  MBtn: GlobalComponentConstructor<MBtnProps, MBtnSlots>;
783
+ MCheckbox: GlobalComponentConstructor<MCheckboxProps, MCheckboxSlots>;
784
+ MColor: GlobalComponentConstructor<MInputProps, MInputSlots>;
785
+ MDate: GlobalComponentConstructor<MDateProps, MDateSlots>;
786
+ MEditor: GlobalComponentConstructor<MEditorProps, MEditorSlots>;
787
+ MEmail: GlobalComponentConstructor<MInputProps, MInputSlots>;
788
+ MField: GlobalComponentConstructor<MFieldProps, MFieldSlots>;
789
+ MFile: GlobalComponentConstructor<MFileProps, MFileSlots>;
790
+ MForm: GlobalComponentConstructor<MFormProps, MFormSlots>;
791
+ MHidden: GlobalComponentConstructor<MHiddenProps, MHiddenSlots>;
792
+ MHiddenInput: GlobalComponentConstructor<MHiddenInputProps, MHiddenInputSlots>;
793
+ MInputFieldControl: GlobalComponentConstructor<MInputFieldControlProps, MInputFieldControlSlots>;
794
+ MInputLabel: GlobalComponentConstructor<MInputLabelProps, MInputLabelSlots>;
795
+ MMobile: GlobalComponentConstructor<MInputProps, MInputSlots>;
796
+ MPicker: GlobalComponentConstructor<MPickerProps, MPickerSlots>;
797
+ MRadio: GlobalComponentConstructor<MRadioProps, MRadioSlots>;
798
+ MSelect: GlobalComponentConstructor<MSelectProps, MSelectSlots>;
799
+ MTime: GlobalComponentConstructor<MTimeProps, MTimeSlots>;
152
800
 
153
801
  // Grid.
154
802
  MBlock: GlobalComponentConstructor<MBlockProps, MBlockSlots>;
@@ -157,7 +805,13 @@ declare module '@vue/runtime-core' {
157
805
  MContainer: GlobalComponentConstructor<MContainerProps, MContainerSlots>;
158
806
  MHelpRow: GlobalComponentConstructor<MHelpRowProps, MHelpRowSlots>;
159
807
  MRow: GlobalComponentConstructor<MRowProps, MRowSlots>;
808
+
160
809
  // Typography.
161
810
  MTypingString: GlobalComponentConstructor<MTypingStringProps, MTypingStringSlots>;
811
+
812
+ // Transitions.
813
+ MTransition: GlobalComponentConstructor<MTransitionProps, MTransitionsSlots>;
814
+ MFadeTransition: GlobalComponentConstructor<TransitionProps, MTransitionsSlots>;
815
+ MFadeXTransition: GlobalComponentConstructor<TransitionProps, MTransitionsSlots>;
162
816
  }
163
817
  }