@mythpe/quasar-ui-qui 0.0.29-dev → 0.0.30
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 +5 -1
- package/src/components/datatable/MDatatable.vue +1 -1
- package/src/components/datatable/MDtContextmenuItems.vue +2 -1
- package/src/components/form/MCkeditor.vue +4 -4
- package/src/components/form/MColor.vue +1 -1
- package/src/components/form/MField.vue +3 -2
- package/src/components/form/MFile.vue +2 -1
- package/src/components/form/MOtp.vue +2 -2
- package/src/components/form/MPicker.vue +2 -1
- package/src/components/parials/UploaderItem.vue +2 -1
- package/src/composable/useBindInput.ts +3 -2
- package/src/composable/useError.ts +2 -1
- package/src/composable/useMyth.ts +2 -1
- package/src/composable/useValue.ts +2 -1
- package/src/index.common.js +4 -8
- package/src/index.esm.js +4 -8
- package/src/index.js +4 -8
- package/src/index.umd.js +6 -8
- package/src/types/components.d.ts +3 -3
- package/src/types/index.d.ts +1 -1
- package/src/types/m-datatable.d.ts +3 -3
- package/src/types/plugin-props-option.d.ts +1 -1
- package/src/utils/vue-plugin.ts +14 -1
- package/src/index.ts +0 -19
- /package/{index.d.ts → types.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mythpe/quasar-ui-qui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.30",
|
|
4
4
|
"description": "MyTh Quasar UI Kit App Extension",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "MyTh Ahmed Faiz",
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
"type": "module",
|
|
13
13
|
"module": "src/index.esm.js",
|
|
14
14
|
"main": "src/index.common.js",
|
|
15
|
+
"types": "./types.d.ts",
|
|
15
16
|
"scripts": {
|
|
17
|
+
"lint": "eslint ./src --ext .js,.ts,.vue ./",
|
|
18
|
+
"lint:fix": "eslint --fix --ext .js,.ts,.vue ./src",
|
|
16
19
|
"dev": "cd ../dev && yarn dev && cd ..",
|
|
17
20
|
"dev:umd": "yarn build && node build/script.open-umd.js",
|
|
18
21
|
"dev:ssr": "cd ../dev && yarn 'dev:ssr' && cd ..",
|
|
@@ -36,6 +39,7 @@
|
|
|
36
39
|
"vue-i18n": "^10.0.0"
|
|
37
40
|
},
|
|
38
41
|
"devDependencies": {
|
|
42
|
+
"color-name": "^2.0.0",
|
|
39
43
|
"@quasar/app-webpack": "^3.13.0",
|
|
40
44
|
"@quasar/extras": "^1.16.4",
|
|
41
45
|
"@rollup/plugin-buble": "^0.21.3",
|
|
@@ -28,7 +28,7 @@ import type {
|
|
|
28
28
|
import type { AxiosRequestConfig } from 'axios'
|
|
29
29
|
import type { InvalidSubmissionHandler, SubmissionHandler } from 'vee-validate'
|
|
30
30
|
import { useForm } from 'vee-validate'
|
|
31
|
-
import { computed,
|
|
31
|
+
import { computed, nextTick, onMounted, reactive, ref, toRef, toValue, useSlots, watch } from 'vue'
|
|
32
32
|
import { is as quasarHelpers, QCardSection, QTable, useQuasar } from 'quasar'
|
|
33
33
|
import lodash from 'lodash'
|
|
34
34
|
import { useRoute, useRouter } from 'vue-router'
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
>
|
|
13
13
|
|
|
14
14
|
import type { MDatatableDialogsOptions, MDatatableProps } from '../../types'
|
|
15
|
-
import {
|
|
15
|
+
import type { UnwrapRef } from 'vue'
|
|
16
|
+
import { computed } from 'vue'
|
|
16
17
|
import { useMyth } from '../../composable'
|
|
17
18
|
|
|
18
19
|
interface Props {
|
|
@@ -16,6 +16,7 @@ import type { MCkeditorProps as Props } from '../../types'
|
|
|
16
16
|
import { computed, reactive, toValue, useTemplateRef } from 'vue'
|
|
17
17
|
import { useBindInput, useMyth } from '../../composable'
|
|
18
18
|
|
|
19
|
+
import type { EditorConfig } from 'ckeditor5'
|
|
19
20
|
import {
|
|
20
21
|
Alignment,
|
|
21
22
|
Autoformat,
|
|
@@ -28,7 +29,6 @@ import {
|
|
|
28
29
|
CloudServices,
|
|
29
30
|
Code,
|
|
30
31
|
CodeBlock,
|
|
31
|
-
EditorConfig,
|
|
32
32
|
Essentials,
|
|
33
33
|
FontBackgroundColor,
|
|
34
34
|
FontColor,
|
|
@@ -133,8 +133,8 @@ const inputScope = useField<Props['modelValue']>(() => props.name, inputRules, {
|
|
|
133
133
|
const { value, errorMessage, handleChange } = inputScope
|
|
134
134
|
|
|
135
135
|
const isRtl = computed(() => props.lang === 'ar')
|
|
136
|
-
const getConfig = computed<
|
|
137
|
-
const inpConfig = {
|
|
136
|
+
const getConfig = computed<any>(() => {
|
|
137
|
+
const inpConfig: EditorConfig = {
|
|
138
138
|
language: {
|
|
139
139
|
ui: props.lang as string,
|
|
140
140
|
content: props.lang as string,
|
|
@@ -301,7 +301,7 @@ const getConfig = computed<EditorConfig>(() => {
|
|
|
301
301
|
if (props.config) {
|
|
302
302
|
return props.config(inpConfig as EditorConfig)
|
|
303
303
|
}
|
|
304
|
-
return inpConfig
|
|
304
|
+
return inpConfig
|
|
305
305
|
})
|
|
306
306
|
const listeners = {
|
|
307
307
|
'update:modelValue': (v: Props['modelValue']) => handleChange(v, !!errorMessage.value)
|
|
@@ -14,7 +14,7 @@ import type { MInputProps as Props, MInputSlots } from '../../types'
|
|
|
14
14
|
import { reactive, toValue, useTemplateRef } from 'vue'
|
|
15
15
|
import { useField } from 'vee-validate'
|
|
16
16
|
import { useBindInput } from '../../composable'
|
|
17
|
-
import { QField, QInput } from 'quasar'
|
|
17
|
+
import type { QField, QInput } from 'quasar'
|
|
18
18
|
|
|
19
19
|
const props = withDefaults(defineProps<Props>(), {
|
|
20
20
|
name: () => '',
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
import { useFieldError, useFieldValue } from 'vee-validate'
|
|
15
15
|
import type { MFieldProps as Props } from '../../types'
|
|
16
16
|
import { useTemplateRef } from 'vue'
|
|
17
|
-
import {
|
|
17
|
+
import type { QFieldSlots } from 'quasar'
|
|
18
|
+
import { QField } from 'quasar'
|
|
18
19
|
import { useBindInput, useMyth } from '../../composable'
|
|
19
20
|
import { myth } from '../../utils'
|
|
20
21
|
|
|
@@ -63,7 +64,7 @@ const { __ } = useMyth()
|
|
|
63
64
|
const { props: options } = myth
|
|
64
65
|
const modelValue = defineModel<Props['modelValue']>({ required: !1, default: undefined })
|
|
65
66
|
const helper = useBindInput<P>(() => props, 'input')
|
|
66
|
-
const { hasTopLabel, getLabel, getPlaceholder, inputRules
|
|
67
|
+
const { hasTopLabel, getLabel, getPlaceholder, inputRules } = helper
|
|
67
68
|
const value = useFieldValue(() => props.name)
|
|
68
69
|
const errorMessage = useFieldError(() => props.name)
|
|
69
70
|
const input = useTemplateRef<InstanceType<typeof QField>>('input')
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
setup
|
|
12
12
|
>
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import type { QFileSlots } from 'quasar'
|
|
15
|
+
import { QField, QFile } from 'quasar'
|
|
15
16
|
import { useBindInput, useMyth } from '../../composable'
|
|
16
17
|
import { useField } from 'vee-validate'
|
|
17
18
|
import { reactive, toValue, useTemplateRef } from 'vue'
|
|
@@ -123,7 +123,7 @@ const onUpdate = (value: string | number | null, index: number) => {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
const onKeyDown = (evt: KeyboardEvent
|
|
126
|
+
const onKeyDown = (evt: KeyboardEvent/*, index: number */) => {
|
|
127
127
|
if (props.numeric !== !1 && evt.key && evt.key.toString() !== '0' && !parseInt(evt.key) && evt.key?.length === 1) {
|
|
128
128
|
evt.preventDefault()
|
|
129
129
|
}
|
|
@@ -253,7 +253,7 @@ defineOptions({
|
|
|
253
253
|
outlined
|
|
254
254
|
style="width: 6ch"
|
|
255
255
|
v-bind="{...pluginOptions.otp as any,...$attrs}"
|
|
256
|
-
@keydown="onKeyDown($event
|
|
256
|
+
@keydown="onKeyDown($event)"
|
|
257
257
|
@keyup="onKeyUp($event, i - 1)"
|
|
258
258
|
@paste.prevent="onPaste($event,i - 1)"
|
|
259
259
|
@update:model-value="onUpdate($event, i - 1)"
|
|
@@ -14,7 +14,8 @@ import { computed, reactive, ref, toValue, useTemplateRef } from 'vue'
|
|
|
14
14
|
import type { MPickerProps as Props } from '../../types'
|
|
15
15
|
import { useBindInput, useMyth } from '../../composable'
|
|
16
16
|
import { useField } from 'vee-validate'
|
|
17
|
-
import {
|
|
17
|
+
import type { QFieldSlots } from 'quasar'
|
|
18
|
+
import { QDate, QField, QTime } from 'quasar'
|
|
18
19
|
import { myth } from '../../utils'
|
|
19
20
|
|
|
20
21
|
const defSeparator = ' - '
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
import { computed, nextTick, reactive, ref } from 'vue'
|
|
15
15
|
import type { MUploaderMediaItem, MUploaderProps as Props, MUploaderServiceType } from '../../types'
|
|
16
|
-
import { QUploader
|
|
16
|
+
import type { QUploader } from 'quasar'
|
|
17
|
+
import { useQuasar } from 'quasar'
|
|
17
18
|
import { useMyth } from '../../composable'
|
|
18
19
|
import { useI18n } from 'vue-i18n'
|
|
19
20
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { MaybeRefOrGetter } from 'vue'
|
|
2
|
+
import { computed, ref, toValue } from 'vue'
|
|
2
3
|
import { useI18n } from 'vue-i18n'
|
|
3
4
|
import { useMyth } from './useMyth'
|
|
4
5
|
import { useSplitAttrs } from 'quasar'
|
|
5
6
|
import { myth } from '../utils'
|
|
6
7
|
import { camelCase, kebabCase, snakeCase, uniq } from 'lodash'
|
|
7
|
-
import { PropsContext as UiOpt } from '../types/plugin-props-option'
|
|
8
|
+
import type { PropsContext as UiOpt } from '../types/plugin-props-option'
|
|
8
9
|
|
|
9
10
|
type G = { name: string; [k: string]: any };
|
|
10
11
|
type OptsContext = { choose?: boolean; };
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
import lodash from 'lodash'
|
|
10
10
|
import { useI18n } from 'vue-i18n'
|
|
11
11
|
import type { RouteLocationNormalizedLoaded } from 'vue-router'
|
|
12
|
-
import {
|
|
12
|
+
import type { QDialogOptions, QNotifyCreateOptions } from 'quasar'
|
|
13
|
+
import { copyToClipboard, extend, useQuasar } from 'quasar'
|
|
13
14
|
import { Helpers, myth, Str, veeRules } from '../utils'
|
|
14
15
|
import type { MDtColumn, MDtHeadersParameter, ParseHeaderOptions, Vue3MAlertMessage, Vue3MAlertMessageOptions, Vue3MConfirmMessage } from '../types'
|
|
15
16
|
import { computed } from 'vue'
|
package/src/index.common.js
CHANGED
|
@@ -6,14 +6,10 @@
|
|
|
6
6
|
* Github: https://github.com/mythpe
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import * as composable from './composable'
|
|
10
|
-
import * as utils from './utils'
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
...composable,
|
|
14
|
-
...utils
|
|
15
|
-
}
|
|
16
|
-
|
|
17
9
|
export * from './components'
|
|
18
10
|
export * from './composable'
|
|
19
11
|
export * from './utils'
|
|
12
|
+
|
|
13
|
+
import * as Plugin from './utils'
|
|
14
|
+
|
|
15
|
+
export default Plugin
|
package/src/index.esm.js
CHANGED
|
@@ -6,14 +6,10 @@
|
|
|
6
6
|
* Github: https://github.com/mythpe
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import * as composable from './composable'
|
|
10
|
-
import * as utils from './utils'
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
...composable,
|
|
14
|
-
...utils
|
|
15
|
-
}
|
|
16
|
-
|
|
17
9
|
export * from './components'
|
|
18
10
|
export * from './composable'
|
|
19
11
|
export * from './utils'
|
|
12
|
+
|
|
13
|
+
import * as Plugin from './utils'
|
|
14
|
+
|
|
15
|
+
export default Plugin
|
package/src/index.js
CHANGED
|
@@ -6,14 +6,10 @@
|
|
|
6
6
|
* Github: https://github.com/mythpe
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import * as composable from './composable'
|
|
10
|
-
import * as utils from './utils'
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
...composable,
|
|
14
|
-
...utils
|
|
15
|
-
}
|
|
16
|
-
|
|
17
9
|
export * from './components'
|
|
18
10
|
export * from './composable'
|
|
19
11
|
export * from './utils'
|
|
12
|
+
|
|
13
|
+
import * as Plugin from './utils'
|
|
14
|
+
|
|
15
|
+
export default Plugin
|
package/src/index.umd.js
CHANGED
|
@@ -6,12 +6,10 @@
|
|
|
6
6
|
* Github: https://github.com/mythpe
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
export * from './components'
|
|
10
|
+
export * from './composable'
|
|
11
|
+
export * from './utils'
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
...utils
|
|
17
|
-
}
|
|
13
|
+
import * as Plugin from './utils'
|
|
14
|
+
|
|
15
|
+
export default Plugin
|
|
@@ -31,8 +31,8 @@ import type {
|
|
|
31
31
|
QToggleProps,
|
|
32
32
|
QUploaderProps,
|
|
33
33
|
QUploaderSlots
|
|
34
|
+
, QDialogProps, QMenuProps, QPopupProxyProps, QTooltipProps
|
|
34
35
|
} from 'quasar'
|
|
35
|
-
import { QDialogProps, QMenuProps, QPopupProxyProps, QTooltipProps } from 'quasar'
|
|
36
36
|
import type {
|
|
37
37
|
ComputedRef,
|
|
38
38
|
MaybeRefOrGetter,
|
|
@@ -48,8 +48,8 @@ import type { TypedOptions } from 'typed.js'
|
|
|
48
48
|
import type { FieldContext, FieldOptions, FormContext, FormOptions, FormState } from 'vee-validate'
|
|
49
49
|
import type { ThemeShadow, ThemeSize } from './theme'
|
|
50
50
|
import type { AxiosRequestConfig } from 'axios'
|
|
51
|
-
import { ApiInterface, HelpersStubSchema } from './api-helpers'
|
|
52
|
-
import {
|
|
51
|
+
import type { ApiInterface, HelpersStubSchema } from './api-helpers'
|
|
52
|
+
import type {
|
|
53
53
|
MDatatableProps,
|
|
54
54
|
MDatatableSlots,
|
|
55
55
|
MDtAvatarProps,
|
package/src/types/index.d.ts
CHANGED
|
@@ -10,9 +10,9 @@ import type { AxiosResponse } from 'axios'
|
|
|
10
10
|
import type { QAvatarProps, QAvatarSlots, QTableProps, QTableSlots } from 'quasar'
|
|
11
11
|
import type { ComputedRef, MaybeRef, Ref, UnwrapNestedRefs, UnwrapRef, VNode } from 'vue'
|
|
12
12
|
import type { RouteLocationRaw } from 'vue-router'
|
|
13
|
-
import { GenericFormValues, MBtnProps, MBtnSlots, MFormSlots } from './components'
|
|
14
|
-
import { StubSchema } from './api-helpers'
|
|
15
|
-
import { ApiMetaInterface, Generic } from './m-helpers'
|
|
13
|
+
import type { GenericFormValues, MBtnProps, MBtnSlots, MFormSlots } from './components'
|
|
14
|
+
import type { StubSchema } from './api-helpers'
|
|
15
|
+
import type { ApiMetaInterface, Generic } from './m-helpers'
|
|
16
16
|
|
|
17
17
|
export type MDtItem<T extends object = Record<keyof T, any>> = T & {
|
|
18
18
|
id: string | number;
|
package/src/utils/vue-plugin.ts
CHANGED
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
MDtContextmenuItems
|
|
57
57
|
} from '../components'
|
|
58
58
|
|
|
59
|
-
import { InstallOptions } from '../types
|
|
59
|
+
import type { InstallOptions } from '../types'
|
|
60
60
|
|
|
61
61
|
function install (app: App, options: InstallOptions = {}) {
|
|
62
62
|
if (options.rounded !== undefined) {
|
|
@@ -93,6 +93,19 @@ function install (app: App, options: InstallOptions = {}) {
|
|
|
93
93
|
myth.mAxios.value = options.mAxios
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
// const importList = import.meta.glob('./components/**/*.vue')
|
|
97
|
+
// const startIndex = '/components/'.length
|
|
98
|
+
// const routes = Object.keys(importList).map(key => {
|
|
99
|
+
// return {
|
|
100
|
+
// path: key.substring(startIndex, key.length - 4),
|
|
101
|
+
// component: importList[key]
|
|
102
|
+
// }
|
|
103
|
+
// })
|
|
104
|
+
// console.log(routes)
|
|
105
|
+
// for (const routesKey in routes) {
|
|
106
|
+
// console.log(routesKey)
|
|
107
|
+
// }
|
|
108
|
+
|
|
96
109
|
// Form.
|
|
97
110
|
app.component('MAvatarViewer', MAvatarViewer)
|
|
98
111
|
app.component('MAxios', MAxios)
|
package/src/index.ts
DELETED
|
@@ -1,19 +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
|
-
import * as composable from './composable'
|
|
10
|
-
import * as utils from './utils'
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
...composable,
|
|
14
|
-
...utils
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export * from './components'
|
|
18
|
-
export * from './composable'
|
|
19
|
-
export * from './utils'
|
|
File without changes
|