@mythpe/quasar-ui-qui 0.0.75 → 0.0.76
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/package.json +1 -1
- package/src/components/form/MAxios.vue +2 -3
- package/src/types/api/MAvatarViewer.d.ts +114 -0
- package/src/types/api/MAxios.d.ts +40 -0
- package/src/types/api/MSelect.d.ts +183 -0
- package/src/types/api/MTransition.d.ts +12 -0
- package/src/types/components.d.ts +6 -213
- package/src/types/index.d.ts +5 -0
- package/src/types/plugin-props-option.d.ts +2 -2
package/package.json
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
setup
|
|
12
12
|
>
|
|
13
13
|
|
|
14
|
-
import type { MAxiosProps as Props, MSelectModelEmit } from '../../types'
|
|
15
|
-
import type { QSelectSlots } from 'quasar'
|
|
14
|
+
import type { MAxiosProps as Props, MSelectModelEmit, MSelectSlots } from '../../types'
|
|
16
15
|
import { computed, onMounted, toValue, useTemplateRef, watch } from 'vue'
|
|
17
16
|
import { useSetFieldValue } from 'vee-validate'
|
|
18
17
|
import MSelect from './MSelect.vue'
|
|
@@ -131,7 +130,7 @@ defineOptions({ name: 'MAxios', inheritAttrs: !1 })
|
|
|
131
130
|
v-on="listeners"
|
|
132
131
|
>
|
|
133
132
|
<template
|
|
134
|
-
v-for="(_,slot) in $slots as Readonly<
|
|
133
|
+
v-for="(_,slot) in $slots as Readonly<MSelectSlots>"
|
|
135
134
|
:key="slot"
|
|
136
135
|
#[slot]="inputSlot"
|
|
137
136
|
>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { QAvatarProps, QAvatarSlots, QImgProps } from 'quasar'
|
|
2
|
+
import type { VNode } from 'vue'
|
|
3
|
+
import type { InputErrorsContext, InputFormErrorsContext, InputRulesContext, MColProps } from '../components'
|
|
4
|
+
|
|
5
|
+
export type MAvatarViewerModelValue = File | null | undefined;
|
|
6
|
+
|
|
7
|
+
export interface MAvatarViewerProps extends QAvatarProps, MColProps {
|
|
8
|
+
/**
|
|
9
|
+
* Comma separated list of unique file type specifiers. Maps to 'accept' attribute of native input type=file element
|
|
10
|
+
*/
|
|
11
|
+
accept?: string | string [] | null | Record<string, string>;
|
|
12
|
+
/**
|
|
13
|
+
* Add accept file type.
|
|
14
|
+
*/
|
|
15
|
+
images?: boolean | string;
|
|
16
|
+
/**
|
|
17
|
+
* Add accept svg type.
|
|
18
|
+
*/
|
|
19
|
+
svg?: boolean | string;
|
|
20
|
+
/**
|
|
21
|
+
* Add accept video type.
|
|
22
|
+
*/
|
|
23
|
+
video?: boolean | string;
|
|
24
|
+
/**
|
|
25
|
+
* Add accept pdf type.
|
|
26
|
+
*/
|
|
27
|
+
pdf?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Add accept excel type.
|
|
30
|
+
*/
|
|
31
|
+
excel?: boolean | string;
|
|
32
|
+
/**
|
|
33
|
+
* Show text if no image
|
|
34
|
+
*/
|
|
35
|
+
avatarText?: string;
|
|
36
|
+
/**
|
|
37
|
+
* How the image will fit into the container; Equivalent of the object-fit prop; Can be coordinated with 'position' prop
|
|
38
|
+
* Default value: cover
|
|
39
|
+
*/
|
|
40
|
+
fit?: QImgProps['fit'];
|
|
41
|
+
/**
|
|
42
|
+
* Can clear the input & not required
|
|
43
|
+
*/
|
|
44
|
+
clearable?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The label that will appear above the image
|
|
47
|
+
*/
|
|
48
|
+
label?: string;
|
|
49
|
+
/**
|
|
50
|
+
* List of error messages.
|
|
51
|
+
*/
|
|
52
|
+
errors?: InputErrorsContext;
|
|
53
|
+
/**
|
|
54
|
+
* List of form errors.
|
|
55
|
+
*/
|
|
56
|
+
formErrors?: InputFormErrorsContext;
|
|
57
|
+
/**
|
|
58
|
+
* Model of the component;
|
|
59
|
+
* Must be FileList or Array if using 'multiple' prop;
|
|
60
|
+
* Either use this property (along with a listener for 'update:modelValue' event) OR use v-model directive
|
|
61
|
+
*/
|
|
62
|
+
modelValue?: MAvatarViewerModelValue;
|
|
63
|
+
/**
|
|
64
|
+
* The name of the file for the image used and the field.
|
|
65
|
+
* Example: name='avatar' { avatar: https://4myth.com, avatarBlob: Blob, avatarRemoved: !0 | !1 }
|
|
66
|
+
*/
|
|
67
|
+
name?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Avatar url.
|
|
70
|
+
* (along with a listener for 'update:url' event) OR use v-model directive
|
|
71
|
+
*/
|
|
72
|
+
url?: string;
|
|
73
|
+
/**
|
|
74
|
+
* value if user remove the image
|
|
75
|
+
* (along with a listener for 'update:removed' event) OR use v-model directive
|
|
76
|
+
*/
|
|
77
|
+
removed?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Input hint.
|
|
80
|
+
*/
|
|
81
|
+
hint?: string;
|
|
82
|
+
hintProps?: Record<string, any>;
|
|
83
|
+
|
|
84
|
+
caption?: string;
|
|
85
|
+
captionProps?: Record<string, any>;
|
|
86
|
+
/**
|
|
87
|
+
* Help text after label.
|
|
88
|
+
*/
|
|
89
|
+
help?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Set input to readonly.
|
|
92
|
+
*/
|
|
93
|
+
readonly?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Loading for skeleton.
|
|
96
|
+
*/
|
|
97
|
+
loading?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Input Required validation.
|
|
100
|
+
*/
|
|
101
|
+
required?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Input Validation Rules.
|
|
104
|
+
*/
|
|
105
|
+
rules?: InputRulesContext;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface MAvatarViewerSlots extends QAvatarSlots {
|
|
109
|
+
/**
|
|
110
|
+
* Field main content
|
|
111
|
+
*/
|
|
112
|
+
default: () => VNode[];
|
|
113
|
+
hint: () => VNode[];
|
|
114
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { AxiosRequestConfig } from 'axios'
|
|
2
|
+
import type { ComputedRef, MaybeRefOrGetter, Ref, ShallowRef, WritableComputedRef } from 'vue'
|
|
3
|
+
import type { MSelectProps, MSelectSlots } from './MSelect'
|
|
4
|
+
|
|
5
|
+
type ParamsReq = Record<string, any>;
|
|
6
|
+
|
|
7
|
+
export interface MAxiosProps extends Omit<MSelectProps, 'options' | 'axiosMode'> {
|
|
8
|
+
/**
|
|
9
|
+
* Request method. Default is GET.
|
|
10
|
+
*/
|
|
11
|
+
service: ((config?: AxiosRequestConfig) => Promise<any>) | string;
|
|
12
|
+
/**
|
|
13
|
+
* Send request as guest request. If false, send request as authenticated user. Default is true.
|
|
14
|
+
*/
|
|
15
|
+
guest?: boolean | MaybeRefOrGetter<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Request params.
|
|
18
|
+
*/
|
|
19
|
+
params?: Ref<ParamsReq> | ShallowRef<ParamsReq> | WritableComputedRef<ParamsReq> | ComputedRef<ParamsReq> | (() => ParamsReq);
|
|
20
|
+
/**
|
|
21
|
+
* Request relations.
|
|
22
|
+
*/
|
|
23
|
+
requestWith?: MaybeRefOrGetter<string> | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Component items.
|
|
26
|
+
*/
|
|
27
|
+
items?: any[];
|
|
28
|
+
/**
|
|
29
|
+
* The name of the attribute to be used as a label
|
|
30
|
+
*/
|
|
31
|
+
attributeName?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Do fetch asynchronous
|
|
34
|
+
*/
|
|
35
|
+
lazy?: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface MAxiosSlots extends MSelectSlots {
|
|
39
|
+
[ k : keyof MSelectSlots ]
|
|
40
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import type { QFieldSlots, QSelectProps, QSelectSlots } from 'quasar'
|
|
2
|
+
import type { BaseInputsProps, BaseInputsSlots } from '../components'
|
|
3
|
+
import type { VNode } from 'vue'
|
|
4
|
+
|
|
5
|
+
export interface MSelectModelEmit {
|
|
6
|
+
value: any | null;
|
|
7
|
+
model: object | null;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface MSelectProps extends Omit<QSelectProps, 'rules' | 'name' | 'modelValue' | 'label' | 'hint' | 'autocomplete'>, BaseInputsProps {
|
|
11
|
+
/**
|
|
12
|
+
* Input search functionality. useInput prop for this feature.
|
|
13
|
+
*/
|
|
14
|
+
search?: string | null | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Minimum characters to start searching. Default is 1.
|
|
17
|
+
*/
|
|
18
|
+
searchLength?: string | number;
|
|
19
|
+
/**
|
|
20
|
+
* hide the default empty list message.
|
|
21
|
+
*/
|
|
22
|
+
hideEmptyList?: boolean | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Disable filter functionality.
|
|
25
|
+
*/
|
|
26
|
+
noFilter?: boolean | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Set mode of component to axios of filter & search.
|
|
29
|
+
* if set to true, component will fetch data from api and don't do filter functionality.
|
|
30
|
+
*/
|
|
31
|
+
axiosMode?: boolean | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Fetch Data on mounted
|
|
34
|
+
*/
|
|
35
|
+
// iniData?: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type ItemsScope = { items: any[], value: any };
|
|
39
|
+
|
|
40
|
+
export interface MSelectSlots extends QSelectSlots, QFieldSlots, BaseInputsSlots {
|
|
41
|
+
/**
|
|
42
|
+
* Field main content
|
|
43
|
+
*/
|
|
44
|
+
default: () => VNode[];
|
|
45
|
+
/**
|
|
46
|
+
* Prepend inner field; Suggestions: QIcon, QBtn
|
|
47
|
+
*/
|
|
48
|
+
prepend: (scope: ItemsScope) => VNode[];
|
|
49
|
+
/**
|
|
50
|
+
* Append to inner field; Suggestions: QIcon, QBtn
|
|
51
|
+
*/
|
|
52
|
+
append: (scope: ItemsScope) => VNode[];
|
|
53
|
+
/**
|
|
54
|
+
* Prepend outer field; Suggestions: QIcon, QBtn
|
|
55
|
+
*/
|
|
56
|
+
before: (scope: ItemsScope) => VNode[];
|
|
57
|
+
/**
|
|
58
|
+
* Append outer field; Suggestions: QIcon, QBtn
|
|
59
|
+
*/
|
|
60
|
+
after: (scope: ItemsScope) => VNode[];
|
|
61
|
+
/**
|
|
62
|
+
* Slot for label; Used only if 'label-slot' prop is set or the 'label' prop is set; When it is used the text in the 'label' prop is ignored
|
|
63
|
+
*/
|
|
64
|
+
label: (scope: ItemsScope) => VNode[];
|
|
65
|
+
/**
|
|
66
|
+
* Slot for errors; Enabled only if 'bottom-slots' prop is used; Suggestion: <div>
|
|
67
|
+
*/
|
|
68
|
+
error: (scope: ItemsScope) => VNode[];
|
|
69
|
+
/**
|
|
70
|
+
* Slot for hint text; Enabled only if 'bottom-slots' prop is used; Suggestion: <div>
|
|
71
|
+
*/
|
|
72
|
+
hint: (scope: ItemsScope) => VNode[];
|
|
73
|
+
/**
|
|
74
|
+
* Slot for counter text; Enabled only if 'bottom-slots' prop is used; Suggestion: <div>
|
|
75
|
+
*/
|
|
76
|
+
counter: (scope: ItemsScope) => VNode[];
|
|
77
|
+
/**
|
|
78
|
+
* Override default spinner when component is in loading mode; Suggestion: spinners
|
|
79
|
+
*/
|
|
80
|
+
loading: (scope: ItemsScope) => VNode[];
|
|
81
|
+
/**
|
|
82
|
+
* Override default selection slot; Suggestion: QChip
|
|
83
|
+
*/
|
|
84
|
+
selected: (scope: ItemsScope) => VNode[];
|
|
85
|
+
/**
|
|
86
|
+
* Template slot for the elements that should be rendered before the list of options
|
|
87
|
+
*/
|
|
88
|
+
'before-options': (scope: ItemsScope) => VNode[];
|
|
89
|
+
/**
|
|
90
|
+
* Template slot for the elements that should be rendered after the list of options
|
|
91
|
+
*/
|
|
92
|
+
'after-options': (scope: ItemsScope) => VNode[];
|
|
93
|
+
/**
|
|
94
|
+
* What should the menu display after filtering options and none are left to be displayed; Suggestion: <div>
|
|
95
|
+
* @param scope
|
|
96
|
+
*/
|
|
97
|
+
'no-option': (scope: {
|
|
98
|
+
/**
|
|
99
|
+
* Input textfield value, if any (not QSelect model)
|
|
100
|
+
*/
|
|
101
|
+
inputValue: string;
|
|
102
|
+
}) => VNode[];
|
|
103
|
+
/**
|
|
104
|
+
* Override default selection slot; Suggestion: QChip
|
|
105
|
+
* @param scope
|
|
106
|
+
*/
|
|
107
|
+
'selected-item': (scope: {
|
|
108
|
+
/**
|
|
109
|
+
* Selection index
|
|
110
|
+
*/
|
|
111
|
+
index: number;
|
|
112
|
+
/**
|
|
113
|
+
* Selected option -- its value is taken from model
|
|
114
|
+
*/
|
|
115
|
+
opt: any;
|
|
116
|
+
/**
|
|
117
|
+
* Always true -- passed down as prop to QItem (when using QItem)
|
|
118
|
+
*/
|
|
119
|
+
selected: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Is the content HTML?
|
|
122
|
+
*/
|
|
123
|
+
html: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Remove selected option located at specific index
|
|
126
|
+
* @param index Index at which to remove selection
|
|
127
|
+
*/
|
|
128
|
+
removeAtIndex: (index: number) => void;
|
|
129
|
+
/**
|
|
130
|
+
* Add/remove option from model
|
|
131
|
+
* @param opt Option to add to model
|
|
132
|
+
*/
|
|
133
|
+
toggleOption: (opt: any) => void;
|
|
134
|
+
/**
|
|
135
|
+
* Tabindex HTML attribute value associated with respective option
|
|
136
|
+
*/
|
|
137
|
+
tabindex: number;
|
|
138
|
+
}) => VNode[];
|
|
139
|
+
/**
|
|
140
|
+
* Customize how options are rendered; Suggestion: QItem
|
|
141
|
+
* @param scope
|
|
142
|
+
*/
|
|
143
|
+
option: (scope: {
|
|
144
|
+
/**
|
|
145
|
+
* Option index
|
|
146
|
+
*/
|
|
147
|
+
index: number;
|
|
148
|
+
/**
|
|
149
|
+
* Option -- its value is taken from 'options' prop
|
|
150
|
+
*/
|
|
151
|
+
opt: any;
|
|
152
|
+
/**
|
|
153
|
+
* Is the content HTML?
|
|
154
|
+
*/
|
|
155
|
+
html: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Label of the option
|
|
158
|
+
*/
|
|
159
|
+
label: string;
|
|
160
|
+
/**
|
|
161
|
+
* Is option selected?
|
|
162
|
+
*/
|
|
163
|
+
selected: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Is option focused?
|
|
166
|
+
*/
|
|
167
|
+
focused: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Add/remove option from model
|
|
170
|
+
* @param opt Option to add to model
|
|
171
|
+
*/
|
|
172
|
+
toggleOption: (opt: any) => void;
|
|
173
|
+
/**
|
|
174
|
+
* Sets option from menu as 'focused'
|
|
175
|
+
* @param index Index of option from menu
|
|
176
|
+
*/
|
|
177
|
+
setOptionIndex: (index: number) => void;
|
|
178
|
+
/**
|
|
179
|
+
* Computed properties passed down to QItem
|
|
180
|
+
*/
|
|
181
|
+
itemProps: any;
|
|
182
|
+
}) => VNode[];
|
|
183
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TransitionGroupProps, VNode } from 'vue'
|
|
2
|
+
|
|
3
|
+
export interface MTransitionProps extends TransitionGroupProps {
|
|
4
|
+
enterIn?: string;
|
|
5
|
+
enterOut?: string;
|
|
6
|
+
slowIn?: boolean;
|
|
7
|
+
slowOut?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface MTransitionsSlots {
|
|
11
|
+
default: () => VNode[];
|
|
12
|
+
}
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
import type {
|
|
10
10
|
GlobalComponentConstructor,
|
|
11
|
-
QAvatarProps,
|
|
12
|
-
QAvatarSlots,
|
|
13
11
|
QBtnProps,
|
|
14
12
|
QBtnSlots,
|
|
15
13
|
QCheckboxProps,
|
|
@@ -20,7 +18,6 @@ import type {
|
|
|
20
18
|
QFieldSlots,
|
|
21
19
|
QFileProps,
|
|
22
20
|
QFileSlots,
|
|
23
|
-
QImgProps,
|
|
24
21
|
QInputProps,
|
|
25
22
|
QInputSlots,
|
|
26
23
|
QItemProps,
|
|
@@ -29,28 +26,16 @@ import type {
|
|
|
29
26
|
QOptionGroupSlots,
|
|
30
27
|
QPopupProxyProps,
|
|
31
28
|
QRadioProps,
|
|
32
|
-
QSelectProps, QSelectSlots,
|
|
33
29
|
QTimeProps,
|
|
34
30
|
QToggleProps,
|
|
35
31
|
QTooltipProps,
|
|
36
32
|
QUploaderProps,
|
|
37
33
|
QUploaderSlots
|
|
38
34
|
} from 'quasar'
|
|
39
|
-
import type {
|
|
40
|
-
ComputedRef,
|
|
41
|
-
MaybeRefOrGetter,
|
|
42
|
-
Ref,
|
|
43
|
-
ShallowRef,
|
|
44
|
-
TransitionGroupProps,
|
|
45
|
-
TransitionProps,
|
|
46
|
-
UnwrapNestedRefs,
|
|
47
|
-
VNode,
|
|
48
|
-
WritableComputedRef
|
|
49
|
-
} from 'vue'
|
|
35
|
+
import type { MaybeRefOrGetter, TransitionProps, UnwrapNestedRefs, VNode } from 'vue'
|
|
50
36
|
import type { TypedOptions } from 'typed.js'
|
|
51
37
|
import type { FieldContext, FieldOptions, FormContext, FormOptions, FormState } from 'vee-validate'
|
|
52
38
|
import type { ThemeShadow, ThemeSize } from './theme'
|
|
53
|
-
import type { AxiosRequestConfig } from 'axios'
|
|
54
39
|
import type { ApiInterface, HelpersStubSchema } from './api-helpers'
|
|
55
40
|
import type {
|
|
56
41
|
MDatatableProps,
|
|
@@ -63,17 +48,10 @@ import type {
|
|
|
63
48
|
MDtContextmenuItemsSlots
|
|
64
49
|
} from './m-datatable'
|
|
65
50
|
import type { EditorConfig } from 'ckeditor5'
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
slowIn?: boolean;
|
|
71
|
-
slowOut?: boolean;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface MTransitionsSlots {
|
|
75
|
-
default: () => VNode[];
|
|
76
|
-
}
|
|
51
|
+
import type { MAvatarViewerProps, MAvatarViewerSlots } from './api/MAvatarViewer'
|
|
52
|
+
import type { MTransitionProps, MTransitionsSlots } from './api/MTransition'
|
|
53
|
+
import type { MAxiosProps, MAxiosSlots } from './api/MAxios'
|
|
54
|
+
import type { MSelectProps, MSelectSlots } from './api/MSelect'
|
|
77
55
|
|
|
78
56
|
export interface MBtnProps extends QBtnProps {
|
|
79
57
|
ariaLabel?: boolean | string | null | undefined;
|
|
@@ -274,117 +252,6 @@ export type InputRulesContext = string | string[] | Record<string, any> | undefi
|
|
|
274
252
|
export type InputErrorsContext = string[];
|
|
275
253
|
export type InputFormErrorsContext = Record<string, InputErrorsContext> | undefined;
|
|
276
254
|
|
|
277
|
-
export type MAvatarViewerModelValue = File | null | undefined;
|
|
278
|
-
|
|
279
|
-
export interface MAvatarViewerProps extends QAvatarProps, MColProps {
|
|
280
|
-
/**
|
|
281
|
-
* Comma separated list of unique file type specifiers. Maps to 'accept' attribute of native input type=file element
|
|
282
|
-
*/
|
|
283
|
-
accept?: string | string [] | null | Record<string, string>;
|
|
284
|
-
/**
|
|
285
|
-
* Add accept file type.
|
|
286
|
-
*/
|
|
287
|
-
images?: boolean | string;
|
|
288
|
-
/**
|
|
289
|
-
* Add accept svg type.
|
|
290
|
-
*/
|
|
291
|
-
svg?: boolean | string;
|
|
292
|
-
/**
|
|
293
|
-
* Add accept video type.
|
|
294
|
-
*/
|
|
295
|
-
video?: boolean | string;
|
|
296
|
-
/**
|
|
297
|
-
* Add accept pdf type.
|
|
298
|
-
*/
|
|
299
|
-
pdf?: boolean;
|
|
300
|
-
/**
|
|
301
|
-
* Add accept excel type.
|
|
302
|
-
*/
|
|
303
|
-
excel?: boolean | string;
|
|
304
|
-
/**
|
|
305
|
-
* Show text if no image
|
|
306
|
-
*/
|
|
307
|
-
avatarText?: string;
|
|
308
|
-
/**
|
|
309
|
-
* How the image will fit into the container; Equivalent of the object-fit prop; Can be coordinated with 'position' prop
|
|
310
|
-
* Default value: cover
|
|
311
|
-
*/
|
|
312
|
-
fit?: QImgProps['fit'];
|
|
313
|
-
/**
|
|
314
|
-
* Can clear the input & not required
|
|
315
|
-
*/
|
|
316
|
-
clearable?: boolean;
|
|
317
|
-
/**
|
|
318
|
-
* The label that will appear above the image
|
|
319
|
-
*/
|
|
320
|
-
label?: string;
|
|
321
|
-
/**
|
|
322
|
-
* List of error messages.
|
|
323
|
-
*/
|
|
324
|
-
errors?: InputErrorsContext;
|
|
325
|
-
/**
|
|
326
|
-
* List of form errors.
|
|
327
|
-
*/
|
|
328
|
-
formErrors?: InputFormErrorsContext;
|
|
329
|
-
/**
|
|
330
|
-
* Model of the component;
|
|
331
|
-
* Must be FileList or Array if using 'multiple' prop;
|
|
332
|
-
* Either use this property (along with a listener for 'update:modelValue' event) OR use v-model directive
|
|
333
|
-
*/
|
|
334
|
-
modelValue?: MAvatarViewerModelValue;
|
|
335
|
-
/**
|
|
336
|
-
* The name of the file for the image used and the field.
|
|
337
|
-
* Example: name='avatar' { avatar: https://4myth.com, avatarBlob: Blob, avatarRemoved: !0 | !1 }
|
|
338
|
-
*/
|
|
339
|
-
name?: string;
|
|
340
|
-
/**
|
|
341
|
-
* Avatar url.
|
|
342
|
-
* (along with a listener for 'update:url' event) OR use v-model directive
|
|
343
|
-
*/
|
|
344
|
-
url?: string;
|
|
345
|
-
/**
|
|
346
|
-
* value if user remove the image
|
|
347
|
-
* (along with a listener for 'update:removed' event) OR use v-model directive
|
|
348
|
-
*/
|
|
349
|
-
removed?: boolean;
|
|
350
|
-
/**
|
|
351
|
-
* Input hint.
|
|
352
|
-
*/
|
|
353
|
-
hint?: string;
|
|
354
|
-
hintProps?: Record<string, any>;
|
|
355
|
-
|
|
356
|
-
caption?: string;
|
|
357
|
-
captionProps?: Record<string, any>;
|
|
358
|
-
/**
|
|
359
|
-
* Help text after label.
|
|
360
|
-
*/
|
|
361
|
-
help?: string;
|
|
362
|
-
/**
|
|
363
|
-
* Set input to readonly.
|
|
364
|
-
*/
|
|
365
|
-
readonly?: boolean;
|
|
366
|
-
/**
|
|
367
|
-
* Loading for skeleton.
|
|
368
|
-
*/
|
|
369
|
-
loading?: boolean;
|
|
370
|
-
/**
|
|
371
|
-
* Input Required validation.
|
|
372
|
-
*/
|
|
373
|
-
required?: boolean;
|
|
374
|
-
/**
|
|
375
|
-
* Input Validation Rules.
|
|
376
|
-
*/
|
|
377
|
-
rules?: InputRulesContext;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
export interface MAvatarViewerSlots extends QAvatarSlots {
|
|
381
|
-
/**
|
|
382
|
-
* Field main content
|
|
383
|
-
*/
|
|
384
|
-
default: () => VNode[];
|
|
385
|
-
hint: () => VNode[];
|
|
386
|
-
}
|
|
387
|
-
|
|
388
255
|
export interface BaseInputFormProps {
|
|
389
256
|
/**
|
|
390
257
|
* Input name.
|
|
@@ -515,43 +382,6 @@ export interface MEditorSlots extends QEditorSlots, BaseInputsSlots {
|
|
|
515
382
|
//
|
|
516
383
|
}
|
|
517
384
|
|
|
518
|
-
export interface MSelectModelEmit {
|
|
519
|
-
value: any | null;
|
|
520
|
-
model: object | null;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
export interface MSelectProps extends Omit<QSelectProps, 'rules' | 'name' | 'modelValue' | 'label' | 'hint' | 'autocomplete'>, BaseInputsProps {
|
|
524
|
-
/**
|
|
525
|
-
* Input search functionality. useInput prop for this feature.
|
|
526
|
-
*/
|
|
527
|
-
search?: string | null | undefined;
|
|
528
|
-
/**
|
|
529
|
-
* Minimum characters to start searching. Default is 1.
|
|
530
|
-
*/
|
|
531
|
-
searchLength?: string | number;
|
|
532
|
-
/**
|
|
533
|
-
* hide the default empty list message.
|
|
534
|
-
*/
|
|
535
|
-
hideEmptyList?: boolean | undefined;
|
|
536
|
-
/**
|
|
537
|
-
* Disable filter functionality.
|
|
538
|
-
*/
|
|
539
|
-
noFilter?: boolean | undefined;
|
|
540
|
-
/**
|
|
541
|
-
* Set mode of component to axios of filter & search.
|
|
542
|
-
* if set to true, component will fetch data from api and don't do filter functionality.
|
|
543
|
-
*/
|
|
544
|
-
axiosMode?: boolean | undefined;
|
|
545
|
-
/**
|
|
546
|
-
* Fetch Data on mounted
|
|
547
|
-
*/
|
|
548
|
-
// iniData?: boolean;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
export interface MSelectSlots extends QSelectSlots, QFieldSlots, BaseInputsSlots {
|
|
552
|
-
//
|
|
553
|
-
}
|
|
554
|
-
|
|
555
385
|
export interface MFileProps extends Omit<QFileProps, 'modelValue' | 'rules' | 'name' | 'label' | 'hint'>, Omit<BaseInputsProps, 'autocomplete'> {
|
|
556
386
|
accept?: string | undefined;
|
|
557
387
|
images?: boolean | string;
|
|
@@ -678,7 +508,7 @@ export interface MHiddenSlots {
|
|
|
678
508
|
default: () => VNode[];
|
|
679
509
|
}
|
|
680
510
|
|
|
681
|
-
export type MFormScope = FormContext
|
|
511
|
+
export type MFormScope = FormContext;
|
|
682
512
|
|
|
683
513
|
export interface MFormProps {
|
|
684
514
|
/**
|
|
@@ -727,43 +557,6 @@ export interface MFormSlots {
|
|
|
727
557
|
|
|
728
558
|
export declare type GenericFormValues = Record<any, any>;
|
|
729
559
|
|
|
730
|
-
type ParamsReq = Record<string, any>;
|
|
731
|
-
|
|
732
|
-
export interface MAxiosProps extends Omit<MSelectProps, 'options' | 'axiosMode'> {
|
|
733
|
-
/**
|
|
734
|
-
* Request method. Default is GET.
|
|
735
|
-
*/
|
|
736
|
-
service: ((config?: AxiosRequestConfig) => Promise<any>) | string;
|
|
737
|
-
/**
|
|
738
|
-
* Send request as guest request. If false, send request as authenticated user. Default is true.
|
|
739
|
-
*/
|
|
740
|
-
guest?: boolean | MaybeRefOrGetter<boolean>;
|
|
741
|
-
/**
|
|
742
|
-
* Request params.
|
|
743
|
-
*/
|
|
744
|
-
params?: Ref<ParamsReq> | ShallowRef<ParamsReq> | WritableComputedRef<ParamsReq> | ComputedRef<ParamsReq> | (() => ParamsReq);
|
|
745
|
-
/**
|
|
746
|
-
* Request relations.
|
|
747
|
-
*/
|
|
748
|
-
requestWith?: MaybeRefOrGetter<string> | undefined;
|
|
749
|
-
/**
|
|
750
|
-
* Component items.
|
|
751
|
-
*/
|
|
752
|
-
items?: any[];
|
|
753
|
-
/**
|
|
754
|
-
* The name of the attribute to be used as a label
|
|
755
|
-
*/
|
|
756
|
-
attributeName?: string;
|
|
757
|
-
/**
|
|
758
|
-
* Do fetch asynchronous
|
|
759
|
-
*/
|
|
760
|
-
lazy?: boolean;
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
export interface MAxiosSlots extends MSelectSlots {
|
|
764
|
-
//
|
|
765
|
-
}
|
|
766
|
-
|
|
767
560
|
export interface MOptionsOptionContext extends Omit<QToggleProps, 'modelValue'>, Omit<QRadioProps, 'modelValue'>, Omit<QCheckboxProps, 'modelValue'> {
|
|
768
561
|
/**
|
|
769
562
|
* Label to display along the component
|
package/src/types/index.d.ts
CHANGED
|
@@ -17,3 +17,8 @@ export * from './plugin-props-option'
|
|
|
17
17
|
export * from './m-helpers'
|
|
18
18
|
export * from './quasar-helpers'
|
|
19
19
|
export * from './theme'
|
|
20
|
+
|
|
21
|
+
export * from './api/MAvatarViewer'
|
|
22
|
+
export * from './api/MAxios'
|
|
23
|
+
export * from './api/MSelect'
|
|
24
|
+
export * from './api/MTransition'
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
MAvatarViewerProps,
|
|
3
2
|
MBlockProps,
|
|
4
3
|
MBtnProps,
|
|
5
4
|
MCheckboxProps,
|
|
@@ -19,7 +18,6 @@ import type {
|
|
|
19
18
|
MPickerProps,
|
|
20
19
|
MRadioProps,
|
|
21
20
|
MRowProps,
|
|
22
|
-
MSelectProps,
|
|
23
21
|
MTimeProps,
|
|
24
22
|
MToggleProps,
|
|
25
23
|
MTooltipProps,
|
|
@@ -44,6 +42,8 @@ import type {
|
|
|
44
42
|
QPopupProxyProps
|
|
45
43
|
} from 'quasar'
|
|
46
44
|
import type { MDatatableProps, MDtBtnProps } from './m-datatable'
|
|
45
|
+
import type { MAvatarViewerProps } from './api/MAvatarViewer'
|
|
46
|
+
import type { MSelectProps } from './api/MSelect'
|
|
47
47
|
|
|
48
48
|
export interface MythComponentsProps {
|
|
49
49
|
// Grid.
|