@mythpe/quasar-ui-qui 0.0.23-dev → 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.
- package/index.d.ts +4 -0
- package/package.json +8 -5
- package/src/components/form/MAvatarViewer.vue +324 -0
- package/src/components/form/MBtn.vue +258 -91
- package/src/components/form/MCheckbox.vue +123 -0
- package/src/components/form/MColor.vue +122 -0
- package/src/components/form/MDate.vue +47 -0
- package/src/components/form/MEditor.vue +285 -0
- package/src/components/form/MEmail.vue +40 -0
- package/src/components/form/MField.vue +142 -0
- package/src/components/form/MFile.vue +209 -0
- package/src/components/form/MForm.vue +83 -0
- package/src/components/form/MHidden.vue +83 -0
- package/src/components/form/MHiddenInput.vue +55 -0
- package/src/components/form/MInput.vue +62 -65
- package/src/components/form/MInputFieldControl.vue +4 -1
- package/src/components/form/MInputLabel.vue +6 -2
- package/src/components/form/MMobile.vue +37 -0
- package/src/components/form/MPicker.vue +310 -0
- package/src/components/form/MRadio.vue +175 -0
- package/src/components/form/MSelect.vue +343 -0
- package/src/components/form/MTime.vue +45 -0
- package/src/components/form/index.ts +38 -1
- package/src/components/grid/MBlock.vue +31 -17
- package/src/components/grid/MCol.vue +2 -14
- package/src/components/grid/MContainer.vue +21 -12
- package/src/components/grid/MHelpRow.vue +4 -9
- package/src/components/grid/MRow.vue +22 -9
- package/src/components/index.ts +1 -0
- package/src/components/transition/MFadeTransition.vue +27 -0
- package/src/components/transition/MFadeXTransition.vue +26 -0
- package/src/components/transition/MTransition.vue +41 -0
- package/src/components/transition/index.ts +13 -0
- package/src/components/typography/index.ts +1 -0
- package/src/composable/index.ts +3 -1
- package/src/composable/{useHelpersMyth.ts → useBindInput.ts} +92 -62
- package/src/composable/useError.ts +11 -0
- package/src/composable/useMyth.ts +280 -3
- package/src/composable/useValue.ts +12 -0
- package/src/index.sass +7 -33
- package/src/style/m-container.sass +13 -0
- package/src/style/main.sass +42 -0
- package/src/types/api-helpers.d.ts +120 -0
- package/src/types/components.d.ts +550 -52
- package/src/types/dt.d.ts +142 -0
- package/src/types/index.d.ts +128 -47
- package/src/types/lodash.d.ts +26 -0
- package/src/types/quasar-helpers.d.ts +7 -0
- package/src/types/theme.d.ts +12 -0
- package/src/utils/Helpers.ts +321 -0
- package/src/utils/Str.ts +210 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/myth.ts +75 -22
- package/src/utils/vee-rules.ts +2 -1
- package/src/utils/vue-plugin.ts +80 -3
- package/tsconfig.json +8 -11
package/src/index.sass
CHANGED
|
@@ -1,35 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/ Github: https://github.com/mythpe
|
|
7
|
-
/
|
|
1
|
+
// MyTh Ahmed Faiz Copyright © 2016-2024 All rights reserved.
|
|
2
|
+
// Email: mythpe@gmail.com
|
|
3
|
+
// Mobile: +966590470092
|
|
4
|
+
// Website: https://www.4myth.com
|
|
5
|
+
// Github: https://github.com/mythpe
|
|
8
6
|
|
|
9
7
|
@import 'quasar/src/css/variables.sass'
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
$m--row-margin-top: $m--container-padding !default
|
|
13
|
-
|
|
14
|
-
.flex-break
|
|
15
|
-
flex: 1 0 100% !important
|
|
16
|
-
|
|
17
|
-
.row
|
|
18
|
-
.flex-break
|
|
19
|
-
height: 0 !important
|
|
20
|
-
|
|
21
|
-
.column
|
|
22
|
-
.flex-break
|
|
23
|
-
width: 0 !important
|
|
24
|
-
|
|
25
|
-
.m--container
|
|
26
|
-
&__dense
|
|
27
|
-
padding: 0 !important
|
|
28
|
-
|
|
29
|
-
&__fluid
|
|
30
|
-
max-width: $m--container-fluid-width
|
|
31
|
-
margin-left: auto
|
|
32
|
-
margin-right: auto
|
|
33
|
-
|
|
34
|
-
.m--row + .m--row
|
|
35
|
-
margin-top: $m--row-margin-top
|
|
8
|
+
@import './style/main.sass'
|
|
9
|
+
@import './style/m-container'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@use "quasar/src/css/variables" as q
|
|
2
|
+
|
|
3
|
+
$m--container-padding: q.$space-base !default
|
|
4
|
+
$m--container-fluid-width: 1440px !default
|
|
5
|
+
|
|
6
|
+
.m--container
|
|
7
|
+
&__dense
|
|
8
|
+
padding: 0
|
|
9
|
+
|
|
10
|
+
&__fluid
|
|
11
|
+
max-width: $m--container-fluid-width
|
|
12
|
+
margin-left: auto
|
|
13
|
+
margin-right: auto
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Flex.
|
|
2
|
+
.flex-break
|
|
3
|
+
flex: 1 0 100% !important
|
|
4
|
+
padding: 0 !important
|
|
5
|
+
margin: 0 !important
|
|
6
|
+
|
|
7
|
+
.row
|
|
8
|
+
.flex-break
|
|
9
|
+
height: 0 !important
|
|
10
|
+
|
|
11
|
+
.column
|
|
12
|
+
.flex-break
|
|
13
|
+
width: 0 !important
|
|
14
|
+
|
|
15
|
+
$m--row-margin-top: 1rem !default
|
|
16
|
+
|
|
17
|
+
.m--row + .m--row
|
|
18
|
+
margin-top: $m--row-margin-top
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
// Directions.
|
|
22
|
+
.ltr
|
|
23
|
+
direction: ltr #{"/* rtl:ignore */"}
|
|
24
|
+
|
|
25
|
+
.rtl
|
|
26
|
+
direction: rtl #{"/* rtl:ignore */"}
|
|
27
|
+
|
|
28
|
+
// Colors.
|
|
29
|
+
$text-light-color: #111111 !default
|
|
30
|
+
$text-dark-color: #ffffff !default
|
|
31
|
+
|
|
32
|
+
.body--light
|
|
33
|
+
color: $text-light-color
|
|
34
|
+
|
|
35
|
+
.text-color
|
|
36
|
+
color: $text-light-color
|
|
37
|
+
|
|
38
|
+
.body--dark
|
|
39
|
+
color: $text-dark-color
|
|
40
|
+
|
|
41
|
+
.text-color
|
|
42
|
+
color: $text-dark-color
|
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
import type { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios'
|
|
10
|
+
import { ApiServiceParams } from './dt'
|
|
11
|
+
|
|
12
|
+
// Axios
|
|
13
|
+
type Generic = Record<any, any>;
|
|
14
|
+
|
|
15
|
+
export type ApiMetaInterface = {
|
|
16
|
+
// server current page
|
|
17
|
+
current_page: number | null;
|
|
18
|
+
// server last page
|
|
19
|
+
last_page: number | null;
|
|
20
|
+
// server total items
|
|
21
|
+
total: number | null;
|
|
22
|
+
[K: any]: any;
|
|
23
|
+
};
|
|
24
|
+
export type ApiErrorInterface = Record<string, string[]>;
|
|
25
|
+
export type ApiErrorsInterface = ApiErrorInterface[];
|
|
26
|
+
|
|
27
|
+
export type ApiModel<T extends Generic = Generic> = {
|
|
28
|
+
id: string | number;
|
|
29
|
+
value: string | number;
|
|
30
|
+
label?: string;
|
|
31
|
+
[K: keyof T]: any;
|
|
32
|
+
[s: string]: any;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
type ResponseAsMain = Generic & {
|
|
36
|
+
success: boolean;
|
|
37
|
+
errors: ApiErrorsInterface;
|
|
38
|
+
message: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
type ResponseAsModel<T extends Generic = Generic> = ResponseAsMain & {
|
|
42
|
+
data: ApiModel<T>
|
|
43
|
+
}
|
|
44
|
+
type ResponseAsList<T extends Generic = Generic> = ResponseAsMain & {
|
|
45
|
+
data: ResponseAsModel<T>[];
|
|
46
|
+
links: {
|
|
47
|
+
first: string;
|
|
48
|
+
last: string;
|
|
49
|
+
prev: string | null;
|
|
50
|
+
next: string | null;
|
|
51
|
+
}
|
|
52
|
+
meta: ApiMetaInterface;
|
|
53
|
+
}
|
|
54
|
+
type ResponseDataType = ResponseAsList | ResponseAsModel | Generic;
|
|
55
|
+
export type ApiFulfilledResponse = AxiosResponse<ResponseDataType>
|
|
56
|
+
export type ApiErrorResponse = AxiosError<ResponseDataType>;
|
|
57
|
+
|
|
58
|
+
export type ApiInterface = ApiFulfilledResponse & {
|
|
59
|
+
_data: ResponseDataType;
|
|
60
|
+
_message: ResponseAsMain['message'];
|
|
61
|
+
_meta: ResponseAsList['meta'];
|
|
62
|
+
_success: ResponseAsMain['success'];
|
|
63
|
+
_errors: ResponseAsMain['errors'];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Axios
|
|
67
|
+
|
|
68
|
+
export type DownloadFromResponse = {
|
|
69
|
+
status: boolean;
|
|
70
|
+
response: AxiosResponse;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export type DownloadFromResponseCode = 'no_response' | 'no_file_name' | 'no_file_url' | 'unknown' | string
|
|
74
|
+
export type DownloadFromResponseError = {
|
|
75
|
+
code: DownloadFromResponseCode
|
|
76
|
+
status: boolean;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type UrlType = string | number | any;
|
|
80
|
+
export type ParamsType = Record<string, any> | FormData | object
|
|
81
|
+
export type ConfigType = AxiosRequestConfig<ApiInterface> & Partial<{
|
|
82
|
+
params: Partial<ApiServiceParams> & Generic
|
|
83
|
+
}>
|
|
84
|
+
export type HelpersStubSchema = {
|
|
85
|
+
|
|
86
|
+
index (config?: ConfigType): Promise<ApiInterface>;
|
|
87
|
+
|
|
88
|
+
staticIndex (config?: ConfigType): Promise<ApiInterface>;
|
|
89
|
+
|
|
90
|
+
export (data?: ParamsType, config?: AxiosRequestConfig): Promise<ApiInterface>;
|
|
91
|
+
|
|
92
|
+
store (data?: ParamsType, config?: AxiosRequestConfig): Promise<ApiInterface>;
|
|
93
|
+
|
|
94
|
+
show (id: UrlType, config?: AxiosRequestConfig): Promise<ApiInterface>;
|
|
95
|
+
|
|
96
|
+
staticShow (id: UrlType, config?: AxiosRequestConfig): Promise<ApiInterface>;
|
|
97
|
+
|
|
98
|
+
update (id: UrlType, data?: ParamsType, config?: AxiosRequestConfig): Promise<ApiInterface>;
|
|
99
|
+
|
|
100
|
+
destroy (id: UrlType, config?: AxiosRequestConfig): Promise<ApiInterface>;
|
|
101
|
+
|
|
102
|
+
destroyAll (ids?: UrlType[], config?: AxiosRequestConfig): Promise<ApiInterface>;
|
|
103
|
+
|
|
104
|
+
getUploadAttachmentsUrl (id: UrlType): string;
|
|
105
|
+
|
|
106
|
+
uploadAttachments (id: UrlType, data: Generic, config?: AxiosRequestConfig): Promise<ApiInterface>;
|
|
107
|
+
|
|
108
|
+
deleteAttachment (id: UrlType, fileId: string | number, config?: AxiosRequestConfig): Promise<ApiInterface>;
|
|
109
|
+
|
|
110
|
+
updateAttachment (id: UrlType, fileId: string | number, data: Record<string, any>, config?: AxiosRequestConfig): Promise<ApiInterface>;
|
|
111
|
+
};
|
|
112
|
+
export type StubSchemaContext = HelpersStubSchema
|
|
113
|
+
& Record<string, ((...args: any) => Promise<ApiInterface>)>
|
|
114
|
+
& Record<string, Record<string, ((...args: any) => Promise<ApiInterface>)>>
|
|
115
|
+
& Record<string, Record<string, Record<string, ((...args: any) => Promise<ApiInterface>)>>>
|
|
116
|
+
export type StubSchema = StubSchemaContext
|
|
117
|
+
& ((...args: any) => Promise<ApiInterface>)
|
|
118
|
+
& string
|
|
119
|
+
& Record<string, StubSchemaContext>
|
|
120
|
+
export type MythApiServicesSchema = { [key: string | symbol | number]: StubSchema }
|