@mythpe/quasar-ui-qui 0.2.43 → 0.2.44
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 +3 -1
- package/src/boot/register.ts +1 -2
- package/src/components/index.ts +2 -1
- package/src/components/map/MMap.vue +69 -0
- package/src/components/map/index.ts +12 -0
- package/src/global.d.ts +16 -0
- package/src/plugin/defineAsyncComponents.ts +2 -0
- package/src/types/api/MAvatarViewer.d.ts +2 -1
- package/src/types/api/MBlock.d.ts +29 -0
- package/src/types/api/MBtn.d.ts +25 -0
- package/src/types/api/MCheckbox.d.ts +33 -0
- package/src/types/api/MCkeditor.d.ts +40 -0
- package/src/types/api/MCol.d.ts +55 -0
- package/src/types/api/MColumn.d.ts +16 -0
- package/src/types/api/MContainer.d.ts +19 -0
- package/src/types/api/MDate.d.ts +15 -0
- package/src/types/api/MDialog.d.ts +18 -0
- package/src/types/api/MEditor.d.ts +13 -0
- package/src/types/api/MField.d.ts +12 -0
- package/src/types/api/MFile.d.ts +21 -0
- package/src/types/api/MForm.d.ts +55 -0
- package/src/types/api/MHelpRow.d.ts +19 -0
- package/src/types/api/MHidden.d.ts +20 -0
- package/src/types/api/MHiddenInput.d.ts +26 -0
- package/src/types/api/MInput.d.ts +159 -0
- package/src/types/api/MInputFieldControl.d.ts +16 -0
- package/src/types/api/MInputLabel.d.ts +17 -0
- package/src/types/api/MMap.d.ts +24 -0
- package/src/types/api/MModalMenu.d.ts +17 -0
- package/src/types/api/MOptions.d.ts +62 -0
- package/src/types/api/MOtp.d.ts +52 -0
- package/src/types/api/MPassword.d.ts +20 -0
- package/src/types/api/MPicker.d.ts +41 -0
- package/src/types/api/MRadio.d.ts +13 -0
- package/src/types/api/MRow.d.ts +24 -0
- package/src/types/api/MSar.d.ts +25 -0
- package/src/types/api/MSelect.d.ts +1 -1
- package/src/types/api/MSignaturePad.d.ts +2 -1
- package/src/types/api/MTime.d.ts +12 -0
- package/src/types/api/MToggle.d.ts +39 -0
- package/src/types/api/MTooltip.d.ts +136 -0
- package/src/types/api/MTypingString.d.ts +24 -0
- package/src/types/api/MUploader.d.ts +163 -0
- package/src/types/components.d.ts +38 -984
- package/src/types/google.d.ts +19 -0
- package/src/types/index.d.ts +86 -2
- package/src/types/m-datatable.d.ts +3 -1
- package/src/types/{myth-api.ts → myth-api.d.ts} +9 -2
- package/src/types/plugin-props-option.d.ts +24 -26
- package/src/types/theme.d.ts +3 -1
- package/src/utils/createMyth.ts +13 -15
- package/src/utils/vue-plugin.ts +5 -3
- package/tsconfig.json +5 -1
- package/src/types/install-options.d.ts +0 -14
- package/src/types/m-geolocation.d.ts +0 -16
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MyTh Ahmed Faiz Copyright © 2016-2025 All rights reserved.
|
|
3
|
+
* Email: mythpe@gmail.com
|
|
4
|
+
* Mobile: +966590470092
|
|
5
|
+
* Website: https://www.4myth.com
|
|
6
|
+
* Github: https://github.com/mythpe
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { MapOptions } from 'google.maps'
|
|
10
|
+
|
|
11
|
+
export interface CoordsLatLng {
|
|
12
|
+
lat: number;
|
|
13
|
+
lng: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface InstallGoogleMap {
|
|
17
|
+
apiKey: string;
|
|
18
|
+
mapsOptions?: MapOptions;
|
|
19
|
+
}
|
package/src/types/index.d.ts
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
export * from './api-helpers'
|
|
10
10
|
export * from './components'
|
|
11
|
-
export * from './install-options'
|
|
12
11
|
export * from './m-datatable'
|
|
13
|
-
export * from './
|
|
12
|
+
export * from './google'
|
|
13
|
+
export * from '../global'
|
|
14
14
|
export * from './myth-api'
|
|
15
15
|
export * from './plugin-props-option'
|
|
16
16
|
export * from './m-helpers'
|
|
@@ -22,3 +22,87 @@ export * from './api/MAxios'
|
|
|
22
22
|
export * from './api/MSelect'
|
|
23
23
|
export * from './api/MSignaturePad'
|
|
24
24
|
export * from './api/MTransition'
|
|
25
|
+
export { MSarStringSlots } from './api/MSar'
|
|
26
|
+
export { MSarStringProps } from './api/MSar'
|
|
27
|
+
export { MSarIconSlots } from './api/MSar'
|
|
28
|
+
export { MSarIconProps } from './api/MSar'
|
|
29
|
+
export { MCkeditorSlots } from './api/MCkeditor'
|
|
30
|
+
export { MCkeditorProps } from './api/MCkeditor'
|
|
31
|
+
export { MDialogSlots } from './api/MDialog'
|
|
32
|
+
export { MDialogProps } from './api/MDialog'
|
|
33
|
+
export { MTooltipSlots } from './api/MTooltip'
|
|
34
|
+
export { MTooltipProps } from './api/MTooltip'
|
|
35
|
+
export { MModalMenuSlots } from './api/MModalMenu'
|
|
36
|
+
export { MModalMenuProps } from './api/MModalMenu'
|
|
37
|
+
export { MUploaderXhrInfo } from './api/MUploader'
|
|
38
|
+
export { MUploaderSlots } from './api/MUploader'
|
|
39
|
+
export { MUploaderProps } from './api/MUploader'
|
|
40
|
+
export { MUploaderServiceType } from './api/MUploader'
|
|
41
|
+
export { MUploaderMediaItem } from './api/MUploader'
|
|
42
|
+
export { MToggleSlots } from './api/MToggle'
|
|
43
|
+
export { MToggleProps } from './api/MToggle'
|
|
44
|
+
export { MOptionsSlots } from './api/MOptions'
|
|
45
|
+
export { MOptionsProps } from './api/MOptions'
|
|
46
|
+
export { MOptionsOptionContext } from './api/MOptions'
|
|
47
|
+
export { MOtpSlots } from './api/MOtp'
|
|
48
|
+
export { MOtpProps } from './api/MOtp'
|
|
49
|
+
export { MFormSlots } from './api/MForm'
|
|
50
|
+
export { MFormProps } from './api/MForm'
|
|
51
|
+
export { MFormScope } from './api/MForm'
|
|
52
|
+
export { MBtnSlots } from './api/MBtn'
|
|
53
|
+
export { MBtnProps } from './api/MBtn'
|
|
54
|
+
export { MBlockSlots } from './api/MBlock'
|
|
55
|
+
export { MBlockProps } from './api/MBlock'
|
|
56
|
+
export { MColSlots } from './api/MCol'
|
|
57
|
+
export { MColProps } from './api/MCol'
|
|
58
|
+
export { ColStyleType } from './api/MCol'
|
|
59
|
+
export { MColumnSlots } from './api/MColumn'
|
|
60
|
+
export { MColumnProps } from './api/MColumn'
|
|
61
|
+
export { MContainerSlots } from './api/MContainer'
|
|
62
|
+
export { MContainerProps } from './api/MContainer'
|
|
63
|
+
export { MRowSlots } from './api/MRow'
|
|
64
|
+
export { MRowProps } from './api/MRow'
|
|
65
|
+
export { MHelpRowSlots } from './api/MHelpRow'
|
|
66
|
+
export { MHelpRowProps } from './api/MHelpRow'
|
|
67
|
+
export { MTypingStringSlots } from './api/MTypingString'
|
|
68
|
+
export { MTypingStringProps } from './api/MTypingString'
|
|
69
|
+
export { MInputFieldControlSlots } from './api/MInputFieldControl'
|
|
70
|
+
export { MInputFieldControlProps } from './api/MInputFieldControl'
|
|
71
|
+
export { MHiddenSlots } from './api/MHidden'
|
|
72
|
+
export { MHiddenProps } from './api/MHidden'
|
|
73
|
+
export { MHiddenInputProps } from './api/MHiddenInput'
|
|
74
|
+
export { MHiddenInputSlots } from './api/MHiddenInput'
|
|
75
|
+
export { MFieldSlots } from './api/MField'
|
|
76
|
+
export { MFieldProps } from './api/MField'
|
|
77
|
+
export { MTimeSlots } from './api/MTime'
|
|
78
|
+
export { MTimeProps } from './api/MTime'
|
|
79
|
+
export { MDateSlots } from './api/MDate'
|
|
80
|
+
export { MDateProps } from './api/MDate'
|
|
81
|
+
export { MPickerSlots } from './api/MPicker'
|
|
82
|
+
export { MPickerProps } from './api/MPicker'
|
|
83
|
+
export { MRadioSlots } from './api/MRadio'
|
|
84
|
+
export { MRadioProps } from './api/MRadio'
|
|
85
|
+
export { MCheckboxSlots } from './api/MCheckbox'
|
|
86
|
+
export { MCheckboxProps } from './api/MCheckbox'
|
|
87
|
+
export { BaseCheckboxProps } from './api/MCheckbox'
|
|
88
|
+
export { MFileSlots } from './api/MFile'
|
|
89
|
+
export { MFileProps } from './api/MFile'
|
|
90
|
+
export { MEditorSlots } from './api/MEditor'
|
|
91
|
+
export { MEditorProps } from './api/MEditor'
|
|
92
|
+
export { MPasswordProps } from './api/MPassword'
|
|
93
|
+
export { MInputLabelSlots } from './api/MInputLabel'
|
|
94
|
+
export { MInputLabelProps } from './api/MInputLabel'
|
|
95
|
+
export { MInputSlots } from './api/MInput'
|
|
96
|
+
export { MInputProps } from './api/MInput'
|
|
97
|
+
export { GenericFormValues } from './api/MInput'
|
|
98
|
+
export { BaseInputsSlots } from './api/MInput'
|
|
99
|
+
export { BaseInputsProps } from './api/MInput'
|
|
100
|
+
export { BaseInputFormProps } from './api/MInput'
|
|
101
|
+
export { InputFormErrorsContext } from './api/MInput'
|
|
102
|
+
export { InputErrorsContext } from './api/MInput'
|
|
103
|
+
export { InputRulesContext } from './api/MInput'
|
|
104
|
+
export { InputHelpSlots } from './api/MInput'
|
|
105
|
+
export { InputHelpProps } from './api/MInput'
|
|
106
|
+
export { ViewModeProps } from './api/MInput'
|
|
107
|
+
export { BaseInputFieldProps } from './api/MInput'
|
|
108
|
+
export { BaseInputFieldPropContext } from './api/MInput'
|
|
@@ -10,9 +10,11 @@ import type { AxiosResponse } from 'axios'
|
|
|
10
10
|
import type { NamedColor, QAvatarProps, QAvatarSlots, QTableProps, QTableSlots } from 'quasar'
|
|
11
11
|
import type { ComputedRef, MaybeRef, MaybeRefOrGetter, Ref, UnwrapNestedRefs, UnwrapRef, VNode } from 'vue'
|
|
12
12
|
import type { RouteLocationRaw } from 'vue-router'
|
|
13
|
-
import type { GenericFormValues, MBtnProps, MBtnSlots, MFormSlots } from './components'
|
|
14
13
|
import type { StubSchema } from './api-helpers'
|
|
15
14
|
import type { ApiMetaInterface, Generic } from './m-helpers'
|
|
15
|
+
import type { MFormSlots } from './api/MForm'
|
|
16
|
+
import type { MBtnProps, MBtnSlots } from './api/MBtn'
|
|
17
|
+
import type { GenericFormValues } from './api/MInput'
|
|
16
18
|
|
|
17
19
|
export type MDtItem<T extends object = Record<keyof T, any>> = T & {
|
|
18
20
|
id: string | number;
|
|
@@ -2,7 +2,8 @@ import type { AxiosInstance } from 'axios'
|
|
|
2
2
|
import type { HelpersStubSchema } from './api-helpers'
|
|
3
3
|
import type { ThemeContext } from './theme'
|
|
4
4
|
import type { MythComponentsProps } from './plugin-props-option'
|
|
5
|
-
import type {
|
|
5
|
+
import type { InstallGoogleMap } from './google'
|
|
6
|
+
import type { MInputProps } from './api/MInput'
|
|
6
7
|
|
|
7
8
|
export interface ApiContext {
|
|
8
9
|
url: string;
|
|
@@ -40,5 +41,11 @@ export interface MythApi {
|
|
|
40
41
|
* The Length must be 10.
|
|
41
42
|
*/
|
|
42
43
|
mobileRule: MInputProps['mobile'];
|
|
43
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Ckeditor Auth key.
|
|
46
|
+
*/
|
|
47
|
+
ckeditorKey: string | undefined;
|
|
48
|
+
google: InstallGoogleMap;
|
|
44
49
|
}
|
|
50
|
+
|
|
51
|
+
export type InstallOptions = Partial<Omit<MythApi, 'api'>> & Required<Pick<MythApi, 'api'>>
|
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
MBlockProps,
|
|
3
|
-
MBtnProps,
|
|
4
|
-
MCheckboxProps,
|
|
5
|
-
MCkeditorProps,
|
|
6
|
-
MColProps,
|
|
7
|
-
MColumnProps,
|
|
8
|
-
MContainerProps,
|
|
9
|
-
MDateProps,
|
|
10
|
-
MDialogProps,
|
|
11
|
-
MEditorProps,
|
|
12
|
-
MFileProps,
|
|
13
|
-
MHelpRowProps,
|
|
14
|
-
MInputProps,
|
|
15
|
-
MModalMenuProps,
|
|
16
|
-
MOptionsProps,
|
|
17
|
-
MOtpProps,
|
|
18
|
-
MPickerProps,
|
|
19
|
-
MRadioProps,
|
|
20
|
-
MRowProps,
|
|
21
|
-
MTimeProps,
|
|
22
|
-
MToggleProps,
|
|
23
|
-
MTooltipProps,
|
|
24
|
-
MTypingStringProps,
|
|
25
|
-
MUploaderProps
|
|
26
|
-
} from './components'
|
|
27
1
|
import type {
|
|
28
2
|
QBtnDropdownProps,
|
|
29
3
|
QBtnProps,
|
|
@@ -45,6 +19,30 @@ import type { MDatatableProps, MDtBtnProps } from './m-datatable'
|
|
|
45
19
|
import type { MAvatarViewerProps } from './api/MAvatarViewer'
|
|
46
20
|
import type { MSelectProps } from './api/MSelect'
|
|
47
21
|
import type { MSignaturePadProps } from './api/MSignaturePad'
|
|
22
|
+
import type { MCkeditorProps } from './api/MCkeditor'
|
|
23
|
+
import type { MDialogProps } from './api/MDialog'
|
|
24
|
+
import type { MTooltipProps } from './api/MTooltip'
|
|
25
|
+
import type { MModalMenuProps } from './api/MModalMenu'
|
|
26
|
+
import type { MUploaderProps } from './api/MUploader'
|
|
27
|
+
import type { MToggleProps } from './api/MToggle'
|
|
28
|
+
import type { MOptionsProps } from './api/MOptions'
|
|
29
|
+
import type { MOtpProps } from './api/MOtp'
|
|
30
|
+
import type { MBtnProps } from './api/MBtn'
|
|
31
|
+
import type { MBlockProps } from './api/MBlock'
|
|
32
|
+
import type { MColProps } from './api/MCol'
|
|
33
|
+
import type { MColumnProps } from './api/MColumn'
|
|
34
|
+
import type { MContainerProps } from './api/MContainer'
|
|
35
|
+
import type { MRowProps } from './api/MRow'
|
|
36
|
+
import type { MHelpRowProps } from './api/MHelpRow'
|
|
37
|
+
import type { MTypingStringProps } from './api/MTypingString'
|
|
38
|
+
import type { MTimeProps } from './api/MTime'
|
|
39
|
+
import type { MDateProps } from './api/MDate'
|
|
40
|
+
import type { MPickerProps } from './api/MPicker'
|
|
41
|
+
import type { MRadioProps } from './api/MRadio'
|
|
42
|
+
import type { MCheckboxProps } from './api/MCheckbox'
|
|
43
|
+
import type { MFileProps } from './api/MFile'
|
|
44
|
+
import type { MEditorProps } from './api/MEditor'
|
|
45
|
+
import type { MInputProps } from './api/MInput'
|
|
48
46
|
|
|
49
47
|
export interface MythComponentsProps {
|
|
50
48
|
// Grid.
|
package/src/types/theme.d.ts
CHANGED
|
@@ -109,6 +109,8 @@ export interface Theme {
|
|
|
109
109
|
input: ThemeInput
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
export type ButtonLoadingStyle = ButtonLoadingOptions | false
|
|
113
|
+
|
|
112
114
|
/**
|
|
113
115
|
* Theme context with default values
|
|
114
116
|
*/
|
|
@@ -156,5 +158,5 @@ export interface ThemeContext {
|
|
|
156
158
|
* Default loading configuration for buttons
|
|
157
159
|
* Set to false to disable
|
|
158
160
|
*/
|
|
159
|
-
buttonLoading:
|
|
161
|
+
buttonLoading: ButtonLoadingStyle;
|
|
160
162
|
}
|
package/src/utils/createMyth.ts
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import type { InstallOptions, MythApi } from '../types'
|
|
1
|
+
import type { ButtonLoadingStyle, InstallOptions, MythApi, ThemeBtn } from '../types'
|
|
2
2
|
import { reactive, toRefs } from 'vue'
|
|
3
|
-
import type { AxiosInstance } from 'axios'
|
|
4
3
|
import { extend } from 'quasar'
|
|
5
4
|
|
|
6
|
-
export const
|
|
5
|
+
export const extendOptions = (options: InstallOptions): MythApi => {
|
|
7
6
|
const defaultOptions = {
|
|
8
|
-
|
|
9
|
-
asyncComponents: !1,
|
|
10
|
-
api: {
|
|
11
|
-
url: '',
|
|
12
|
-
services: {},
|
|
13
|
-
axios: {} as AxiosInstance
|
|
14
|
-
},
|
|
7
|
+
asyncComponents: !0,
|
|
15
8
|
theme: {
|
|
16
9
|
inTransition: 'fadeIn',
|
|
17
10
|
outTransition: 'fadeOut',
|
|
@@ -30,15 +23,20 @@ export const createMyth = (options: InstallOptions) => {
|
|
|
30
23
|
label: !1,
|
|
31
24
|
color: undefined,
|
|
32
25
|
size: undefined
|
|
33
|
-
} as
|
|
26
|
+
} as ButtonLoadingStyle
|
|
34
27
|
},
|
|
35
28
|
props: {},
|
|
36
29
|
rules: [],
|
|
37
|
-
mobileRule:
|
|
38
|
-
}
|
|
39
|
-
|
|
30
|
+
mobileRule: false
|
|
31
|
+
}
|
|
32
|
+
return extend<MythApi>(!0, {}, defaultOptions, options)
|
|
33
|
+
}
|
|
34
|
+
export const createMyth = (options: InstallOptions) => {
|
|
35
|
+
// const opts = reactive<MythApi>(extend<MythApi>(!0, { ...defaultOptions }, options))
|
|
36
|
+
const extOpt = extendOptions(options)
|
|
37
|
+
const opts = reactive(extOpt)
|
|
40
38
|
const functions = {
|
|
41
|
-
btnStyle (value:
|
|
39
|
+
btnStyle (value: ThemeBtn) {
|
|
42
40
|
opts.theme.buttons = value
|
|
43
41
|
}
|
|
44
42
|
}
|
package/src/utils/vue-plugin.ts
CHANGED
|
@@ -11,13 +11,15 @@ import type { InstallOptions } from '../types'
|
|
|
11
11
|
import { defineAsyncComponents } from '../plugin/defineAsyncComponents'
|
|
12
12
|
import { defineComponents } from '../plugin/defineComponents'
|
|
13
13
|
|
|
14
|
-
import { createMyth } from './createMyth'
|
|
14
|
+
import { createMyth, extendOptions } from './createMyth'
|
|
15
15
|
import { MythKey } from './const'
|
|
16
16
|
|
|
17
17
|
function install (app: App, options: InstallOptions) {
|
|
18
|
-
const
|
|
18
|
+
const opts = extendOptions(options)
|
|
19
|
+
const myth = createMyth(opts)
|
|
19
20
|
app.provide(MythKey, myth)
|
|
20
|
-
|
|
21
|
+
console.log(opts)
|
|
22
|
+
if (opts?.asyncComponents) {
|
|
21
23
|
defineAsyncComponents(app)
|
|
22
24
|
} else {
|
|
23
25
|
defineComponents(app)
|
package/tsconfig.json
CHANGED
|
@@ -22,7 +22,11 @@
|
|
|
22
22
|
"exactOptionalPropertyTypes": false,
|
|
23
23
|
"noUncheckedIndexedAccess": true,
|
|
24
24
|
"types": [
|
|
25
|
-
"vite/client"
|
|
25
|
+
"vite/client",
|
|
26
|
+
"google.maps"
|
|
27
|
+
],
|
|
28
|
+
"typeRoots": [
|
|
29
|
+
"node_modules/@types"
|
|
26
30
|
],
|
|
27
31
|
"noImplicitAny": false,
|
|
28
32
|
"moduleResolution": "node",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ThemeContext } from './theme'
|
|
2
|
-
import type { MythComponentsProps } from './plugin-props-option'
|
|
3
|
-
import type { ApiContext, MythApi } from './myth-api'
|
|
4
|
-
import type { MInputProps } from './components'
|
|
5
|
-
|
|
6
|
-
export interface InstallOptions extends MythApi {
|
|
7
|
-
api: ApiContext;
|
|
8
|
-
asyncComponents?: boolean;
|
|
9
|
-
props?: Partial<MythComponentsProps>;
|
|
10
|
-
theme?: Partial<ThemeContext>;
|
|
11
|
-
rules?: string[];
|
|
12
|
-
mobileRule?: MInputProps['mobile'];
|
|
13
|
-
ckeditorKey?: string;
|
|
14
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
*/
|
|
8
|
-
|
|
9
|
-
/// <reference types="google.maps" />
|
|
10
|
-
|
|
11
|
-
export interface CoordsProps {
|
|
12
|
-
latitude: number;
|
|
13
|
-
longitude: number;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export {}
|