@mythpe/quasar-ui-qui 0.0.33 → 0.0.35

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 ADDED
@@ -0,0 +1,17 @@
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
+ export * from './src/types'
10
+
11
+ export * from './src/components'
12
+ export * from './src/composable'
13
+ export * from './src/utils'
14
+
15
+ import * as Plugin from './src/utils/vue-plugin'
16
+
17
+ export default Plugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mythpe/quasar-ui-qui",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -31,7 +31,10 @@
31
31
  "@vee-validate/i18n": "^4.14.0",
32
32
  "@vee-validate/rules": "^4.14.0",
33
33
  "axios": "^1.7.8",
34
+ "ckeditor": "^4.12.1",
34
35
  "ckeditor5": "^43.3.1",
36
+ "color-name": "^2.0.0",
37
+ "color-parse": "^2.0.2",
35
38
  "lodash": "^4.17.0",
36
39
  "lodash-inflection": "^1.5.0",
37
40
  "typed.js": "^2.1.0",
@@ -39,7 +42,7 @@
39
42
  "vue-i18n": "^10.0.0"
40
43
  },
41
44
  "devDependencies": {
42
- "color-name": "^2.0.0",
45
+ "@ckeditor/ckeditor5-vue": "^7.3.0",
43
46
  "@quasar/app-webpack": "^3.13.0",
44
47
  "@quasar/extras": "^1.16.4",
45
48
  "@rollup/plugin-buble": "^0.21.3",
@@ -53,6 +56,7 @@
53
56
  "@typescript-eslint/parser": "^7.16.0",
54
57
  "autoprefixer": "^10.0.2",
55
58
  "chalk": "^4.1.0",
59
+ "color-name": "^2.0.0",
56
60
  "core-js": "^3.0.0",
57
61
  "cssnano": "^7.0.6",
58
62
  "eslint": "^8.57.0",
@@ -62,6 +66,8 @@
62
66
  "eslint-plugin-promise": "^6.0.0",
63
67
  "eslint-plugin-vue": "^9.0.0",
64
68
  "fs-extra": "^8.1.0",
69
+ "lodash": "^4.17.0",
70
+ "lodash-inflection": "^1.5.0",
65
71
  "open": "^7.3.0",
66
72
  "postcss": "^8.1.9",
67
73
  "quasar": "^2.16.0",
@@ -1,8 +1,7 @@
1
1
  import type { MaybeRefOrGetter } from 'vue'
2
- import { computed, ref, toValue } from 'vue'
2
+ import { computed, ref, toValue, useAttrs } from 'vue'
3
3
  import { useI18n } from 'vue-i18n'
4
4
  import { useMyth } from './useMyth'
5
- import { useSplitAttrs } from 'quasar'
6
5
  import { myth } from '../utils'
7
6
  import { camelCase, kebabCase, snakeCase, uniq } from 'lodash'
8
7
  import type { PropsContext as UiOpt } from '../types/plugin-props-option'
@@ -12,7 +11,8 @@ type OptsContext = { choose?: boolean; };
12
11
  export const useBindInput = <P extends G = G> (Props: MaybeRefOrGetter<P>, key: keyof UiOpt, Opts: MaybeRefOrGetter<OptsContext> = {}) => {
13
12
  const { messages, locale } = useI18n({ useScope: 'global' })
14
13
  const { __ } = useMyth()
15
- const { attributes } = useSplitAttrs()
14
+ // const { attributes } = useSplitAttrs()
15
+ const attributes = useAttrs()
16
16
  const props = toValue<P>(Props)
17
17
  const opts = toValue<OptsContext>(Opts)
18
18
  const getProp = computed(() => (k: string) => {
@@ -50,7 +50,7 @@ export const useBindInput = <P extends G = G> (Props: MaybeRefOrGetter<P>, key:
50
50
  })
51
51
  const getPlaceholder = computed<string | undefined>(() => {
52
52
  const replace = computed(() => {
53
- const val = props.useChoice !== undefined ? props.useChoice : (attributes.value.useChoice !== undefined ? attributes.value.useChoice : opts?.choose)
53
+ const val = props.useChoice !== undefined ? props.useChoice : (attributes.useChoice !== undefined ? attributes.useChoice : opts?.choose)
54
54
  if (typeof val === 'string' && val?.length > 0) {
55
55
  return val
56
56
  }
@@ -175,7 +175,7 @@ export const useBindInput = <P extends G = G> (Props: MaybeRefOrGetter<P>, key:
175
175
 
176
176
  // eslint-disable-next-line no-labels
177
177
  mainFor: for (const c of cases) {
178
- for (const b of [attributes.value, props]) {
178
+ for (const b of [attributes, props]) {
179
179
  if (c in b && (b[c] === !0 || b[c] === '')) {
180
180
  rules[snakeCase(k)] = b[c] === !0 || b[c] === '' ? !0 : b[c]
181
181
  // eslint-disable-next-line no-labels
@@ -185,7 +185,7 @@ export const useBindInput = <P extends G = G> (Props: MaybeRefOrGetter<P>, key:
185
185
  }
186
186
  }
187
187
 
188
- const mobile = attributes.value?.mobile !== undefined ? attributes.value.mobile : props.mobile
188
+ const mobile = attributes?.mobile !== undefined ? attributes.mobile : props.mobile
189
189
  if (mobile !== undefined && mobile !== false) {
190
190
  const defLen = 10
191
191
  rules.digits = typeof mobile === 'boolean' ? defLen : (mobile || defLen)
@@ -194,7 +194,7 @@ export const useBindInput = <P extends G = G> (Props: MaybeRefOrGetter<P>, key:
194
194
  })
195
195
  const attrs = computed(() => ({
196
196
  ...props,
197
- ...attributes.value,
197
+ ...attributes,
198
198
  ...mergedTheme.value
199
199
  }))
200
200
  return {
package/src/utils/Str.ts CHANGED
@@ -7,10 +7,7 @@
7
7
  */
8
8
 
9
9
  import _ from 'lodash'
10
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
11
- // @ts-ignore
12
10
  import inflection from 'lodash-inflection'
13
-
14
11
  _.mixin(inflection)
15
12
 
16
13
  export const Str = {
package/types.d.ts CHANGED
@@ -11,3 +11,7 @@ export * from './src/types'
11
11
  export * from './src/components'
12
12
  export * from './src/composable'
13
13
  export * from './src/utils'
14
+
15
+ import * as Plugin from './src/utils/vue-plugin'
16
+
17
+ export default Plugin