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