@mythpe/quasar-ui-qui 0.1.79 → 0.1.81

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mythpe/quasar-ui-qui",
3
- "version": "0.1.79",
3
+ "version": "0.1.81",
4
4
  "description": "MyTh Quasar UI Kit App Extension",
5
5
  "author": {
6
6
  "name": "MyTh Ahmed Faiz",
@@ -12,7 +12,7 @@
12
12
  "type": "module",
13
13
  "module": "src/index.esm.js",
14
14
  "main": "src/index.common.js",
15
- "types": "types.d.ts",
15
+ "types": "./types.d.ts",
16
16
  "scripts": {
17
17
  "lint": "eslint ./src --ext .js,.ts,.vue ./",
18
18
  "lint:fix": "eslint --fix --ext .js,.ts,.vue ./src",
@@ -28,31 +28,21 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@ckeditor/ckeditor5-vue": "^7.3.0",
31
- "@vee-validate/i18n": "^4.15.0",
32
- "@vee-validate/rules": "^4.15.0",
33
- "axios": "^1.9.0",
34
- "ckeditor5": "^45.0.0",
35
- "lodash": "4.17.21",
31
+ "@vee-validate/i18n": "^4.14.7",
32
+ "@vee-validate/rules": "^4.14.7",
33
+ "axios": "^1.7.8",
34
+ "ckeditor5": "^43.3.1",
35
+ "lodash": "^4.17.21",
36
36
  "lodash-inflection": "^1.5.0",
37
- "qs": "^6.14.0",
37
+ "qs": "^6.13.1",
38
38
  "typed.js": "^2.1.0",
39
- "vee-validate": "^4.15.0",
40
- "vue-i18n": "^11.1.3",
39
+ "vee-validate": "^4.14.7",
40
+ "vue-i18n": "^11.0.0-beta.2",
41
41
  "vue3-signature": "^0.2.4"
42
42
  },
43
43
  "devDependencies": {
44
- "@capacitor/app": "^7.0.1",
45
- "@capacitor/cli": "^7.2.0",
46
- "@capacitor/core": "^7.2.0",
47
- "@capacitor/push-notifications": "^7.0.1",
48
- "@capacitor/splash-screen": "^7.0.1",
49
- "@eslint/js": "^9.14.0",
50
- "@intlify/unplugin-vue-i18n": "^4.0.0",
51
- "@originjs/vite-plugin-commonjs": "^1.0.3",
52
- "@quasar/app-vite": "^2.2.0",
53
44
  "@quasar/app-webpack": "^3.15.1",
54
- "@quasar/cli": "^2.5.0",
55
- "@quasar/extras": "^1.16.17",
45
+ "@quasar/extras": "^1.16.13",
56
46
  "@rollup/plugin-buble": "^1.0.3",
57
47
  "@rollup/plugin-json": "^6.1.0",
58
48
  "@rollup/plugin-node-resolve": "^15.3.0",
@@ -75,27 +65,17 @@
75
65
  "fs-extra": "^11.2.0",
76
66
  "open": "^10.1.0",
77
67
  "postcss": "^8.4.49",
78
- "quasar": "^2.17.0",
79
- "globals": "^15.12.0",
80
- "laravel-echo": "^2.0.2",
81
- "pusher-js": "^8.4.0",
68
+ "quasar": "^2.17.4",
82
69
  "rimraf": "^6.0.1",
83
70
  "rollup": "^4.27.4",
84
71
  "rtlcss": "^4.3.0",
85
- "sass": "^1.87.0",
72
+ "sass": "^1.81.0",
86
73
  "typescript": "~5.5.3",
87
74
  "uglify-js": "^3.19.3",
88
75
  "vite-plugin-checker": "^0.8.0",
89
76
  "vue": "^3.5.13",
90
- "vue-router": "^4.5.1",
91
- "vue-tsc": "^2.0.29",
92
- "workbox-build": "^7.0.0",
93
- "workbox-cacheable-response": "^7.0.0",
94
- "workbox-core": "^7.0.0",
95
- "workbox-expiration": "^7.0.0",
96
- "workbox-precaching": "^7.0.0",
97
- "workbox-routing": "^7.0.0",
98
- "workbox-strategies": "^7.0.0",
77
+ "vue-router": "^4.5.0",
78
+ "vue-tsc": "^2.1.10",
99
79
  "zlib": "^1.0.5"
100
80
  },
101
81
  "browserslist": [
@@ -109,7 +89,7 @@
109
89
  "last 4 iOS versions"
110
90
  ],
111
91
  "engines": {
112
- "node": "^28 || ^26 || ^24 || ^22 || ^20 || ^18",
92
+ "node": "^24 || ^22 || ^20 || ^18",
113
93
  "npm": ">= 6.13.4",
114
94
  "yarn": ">= 1.21.1"
115
95
  }
@@ -18,7 +18,7 @@ import type {
18
18
  import { useI18n } from 'vue-i18n'
19
19
  import { useMyth } from './useMyth'
20
20
  import { useQuasar } from 'quasar'
21
- import { isArray, isObject, isFunction, isPlainObject } from 'lodash'
21
+ import lodash from 'lodash'
22
22
  import { useRoute, useRouter } from 'vue-router'
23
23
  import type { AxiosRequestConfig } from 'axios'
24
24
  import { useResetForm, useSetFormValues } from 'vee-validate'
@@ -244,15 +244,15 @@ export const useDtHelpers = (options: MaybeRefOrGetter<MDatatableProps>) => {
244
244
  v = params.split(',')
245
245
  }
246
246
 
247
- if (isArray(params)) {
247
+ if (lodash.isArray(params)) {
248
248
  v = [...params]
249
- } else if (isObject(params) && typeof params !== 'function') {
249
+ } else if (lodash.isObject(params) && typeof params !== 'function') {
250
250
  let e
251
251
  for (const k in params) {
252
252
  e = params[k]
253
253
  v.push(`${k}=${e}`)
254
254
  }
255
- } else if (isFunction(params)) {
255
+ } else if (lodash.isFunction(params)) {
256
256
  const f = params()
257
257
  v = typeof f === 'string' ? f.split(',') : f
258
258
  }
@@ -277,7 +277,7 @@ export const useDtHelpers = (options: MaybeRefOrGetter<MDatatableProps>) => {
277
277
  if (Object.keys(filterForm.value).length > 0) {
278
278
  const TempFilter = { ...filterForm.value } as any
279
279
  for (const fKey in TempFilter) {
280
- if (isArray(TempFilter[fKey])) {
280
+ if (lodash.isArray(TempFilter[fKey])) {
281
281
  TempFilter[fKey] = TempFilter[fKey].map((elm: any) => {
282
282
  if (elm.id) {
283
283
  return elm.id
@@ -286,7 +286,7 @@ export const useDtHelpers = (options: MaybeRefOrGetter<MDatatableProps>) => {
286
286
  }
287
287
  return elm
288
288
  })
289
- } else if (isPlainObject(TempFilter[fKey])) {
289
+ } else if (lodash.isPlainObject(TempFilter[fKey])) {
290
290
  if (TempFilter[fKey].id) {
291
291
  TempFilter[fKey] = TempFilter[fKey].id
292
292
  } else if (TempFilter[fKey].value) {
@@ -338,7 +338,6 @@ export const useDtHelpers = (options: MaybeRefOrGetter<MDatatableProps>) => {
338
338
  sortBy: opts?.pagination?.sortBy || undefined,
339
339
  descending: opts?.pagination?.descending || undefined
340
340
  }
341
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
342
341
  _meta && (meta.value = _meta)
343
342
  if (props.endReach) {
344
343
  getRows.value = [...getRows.value, ...(_data || [])]
@@ -391,7 +390,6 @@ export const useDtHelpers = (options: MaybeRefOrGetter<MDatatableProps>) => {
391
390
  getMythApiServicesSchema().export(data, config)
392
391
  .then(async (response) => {
393
392
  const { _message } = response || {}
394
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
395
393
  _message && (alertSuccess(_message))
396
394
  try {
397
395
  await downloadFromResponse(response)
@@ -430,7 +428,6 @@ export const useDtHelpers = (options: MaybeRefOrGetter<MDatatableProps>) => {
430
428
  init[k] = attrs && k in attrs ? attrs[k] : defaultItem.value[k]
431
429
  }
432
430
  resetDialogForm({ values: init || {} }, { force: !0 })
433
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
434
431
  attrs && setValues(attrs, !1)
435
432
  }
436
433
  const openFilterDialog = () => {
@@ -504,7 +501,7 @@ export const useDtHelpers = (options: MaybeRefOrGetter<MDatatableProps>) => {
504
501
  })
505
502
  .catch((e: any) => {
506
503
  const message = e?._message || e?.message
507
- if (message) alertError(message)
504
+ message && alertError(message)
508
505
  })
509
506
  .finally(() => (loading.value = !1))
510
507
  }
@@ -6,7 +6,7 @@
6
6
  * Github: https://github.com/mythpe
7
7
  */
8
8
 
9
- import { camelCase, filter, isString, pascalCase, pluralize, singularize, snakeCase, startsWith, uniq, uniqBy } from 'lodash'
9
+ import lodash from 'lodash'
10
10
  import { useI18n } from 'vue-i18n'
11
11
  import type { RouteLocationNormalizedLoaded } from 'vue-router'
12
12
  import { useRoute } from 'vue-router'
@@ -52,22 +52,22 @@ export const useMyth = () => {
52
52
  const s = routeName.split('.')
53
53
  lastRouteName = s[s.length - 2] ?? lastRouteName
54
54
  }
55
- const __pluralize = Str.pascalCase(pluralize(lastRouteName))
56
- const singular = Str.pascalCase(singularize(lastRouteName))
55
+ const pluralize = Str.pascalCase(lodash.pluralize(lastRouteName))
56
+ const singular = Str.pascalCase(lodash.singularize(lastRouteName))
57
57
 
58
- const keys = filter(uniq([
58
+ const keys = lodash.filter(lodash.uniq([
59
59
  `routes.${routeName}`,
60
60
  `routes.${routePath}`,
61
61
  `${lastRouteName}Page.title`,
62
- `${camelCase(lastRouteName)}Page.title`,
63
- `choice.${__pluralize}`,
62
+ `${lodash.camelCase(lastRouteName)}Page.title`,
63
+ `choice.${pluralize}`,
64
64
  `choice.${singular}`,
65
65
  `replace.${lastRouteName}_details`,
66
66
  `replace.${lastRouteName}`,
67
- __pluralize,
68
- snakeCase(__pluralize),
67
+ pluralize,
68
+ lodash.snakeCase(pluralize),
69
69
  singular,
70
- snakeCase(singular)
70
+ lodash.snakeCase(singular)
71
71
  ]))
72
72
  // console.log(keys)
73
73
  let str: string | null = null
@@ -77,17 +77,17 @@ export const useMyth = () => {
77
77
  if (!(k = keys[f])) {
78
78
  continue
79
79
  }
80
- if (te && te(k) && isString(t(k))) {
81
- if (startsWith(k, 'choice.')) {
80
+ if (te && te(k) && lodash.isString(t(k))) {
81
+ if (lodash.startsWith(k, 'choice.')) {
82
82
  const s = k.split('.')
83
83
  const n = routeName.split('.')
84
84
  if (s.length === 2 && n.length > 1) {
85
85
  const model = n[n.length - 2]
86
- const pluralizeModel = pluralize(pascalCase(model))
86
+ const pluralizeModel = lodash.pluralize(lodash.pascalCase(model))
87
87
  const _modelChoiceKey = `choice.${pluralizeModel}`
88
88
  if (te(_modelChoiceKey)) {
89
89
  const l = t(_modelChoiceKey, number as any)
90
- const rep = singularize(n[n.length - 1]).toLocaleLowerCase()
90
+ const rep = lodash.singularize(n[n.length - 1]).toLocaleLowerCase()
91
91
  const e = `replace.${rep}`
92
92
  str = te(e) ? t(e, { name: l }) : null
93
93
  } else {
@@ -101,7 +101,7 @@ export const useMyth = () => {
101
101
  } else {
102
102
  const parents: string[] = routeName.split('.')
103
103
  if (parents.length > 1) {
104
- const e = `choice.${Str.pascalCase(pluralize(parents[parents.length - 2]))}`
104
+ const e = `choice.${Str.pascalCase(lodash.pluralize(parents[parents.length - 2]))}`
105
105
  if (te(e)) {
106
106
  str = t(k, { name: t(e, '1') })
107
107
  } else {
@@ -165,11 +165,11 @@ export const useMyth = () => {
165
165
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
166
166
  // @ts-ignore
167
167
  item.label = t(k)
168
- } else if (te((k = `attributes.${snakeCase(item.label)}`))) {
168
+ } else if (te((k = `attributes.${lodash.snakeCase(item.label)}`))) {
169
169
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
170
170
  // @ts-ignore
171
171
  item.label = t(k)
172
- } else if (te((k = `attributes.${camelCase(item.label)}`))) {
172
+ } else if (te((k = `attributes.${lodash.camelCase(item.label)}`))) {
173
173
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
174
174
  // @ts-ignore
175
175
  item.label = t(k)
@@ -177,7 +177,7 @@ export const useMyth = () => {
177
177
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
178
178
  // @ts-ignore
179
179
  item.label = t(k)
180
- } else if (te((k = `choice.${pluralize(Str.pascalCase(item.label))}`))) {
180
+ } else if (te((k = `choice.${lodash.pluralize(Str.pascalCase(item.label))}`))) {
181
181
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
182
182
  // @ts-ignore
183
183
  item.label = t(k, 2)
@@ -215,7 +215,7 @@ export const useMyth = () => {
215
215
  }
216
216
  result.push(item)
217
217
  })
218
- return uniqBy(result, (e: MDtColumn) => e.name)
218
+ return lodash.uniqBy(result, (e: MDtColumn) => e.name)
219
219
  }
220
220
  /**
221
221
  * Copy text
@@ -8,7 +8,7 @@
8
8
 
9
9
  import type { AxiosInstance, AxiosRequestConfig } from 'axios'
10
10
  import type { ConfigType, DownloadFromResponse, DownloadFromResponseCode, HelpersStubSchema, ParamsType, UrlType } from '../types'
11
- import { find, isArray, isPlainObject } from 'lodash'
11
+ import lodash from 'lodash'
12
12
  import { colors, openURL, scroll, setCssVar } from 'quasar'
13
13
  import { nextTick } from 'vue'
14
14
 
@@ -46,7 +46,7 @@ export const Helpers = {
46
46
  value = values[key]
47
47
  if (value !== null && value !== undefined && typeof value === 'object') {
48
48
  const k = name ? name + '[' + key + ']' : key
49
- if (isArray(value) && value.length < 1) {
49
+ if (lodash.isArray(value) && value.length < 1) {
50
50
  formData.append(`${key}`, '')
51
51
  } else {
52
52
  this.appendArray(formData, value, k)
@@ -91,7 +91,6 @@ export const Helpers = {
91
91
  async store (data?: ParamsType, config?: AxiosRequestConfig) {
92
92
  const u = makeUrl()
93
93
  const formData = new FormData()
94
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
95
94
  data && Helpers.appendArray(formData, data)
96
95
  return axios().post(u, formData, config)
97
96
  },
@@ -107,14 +106,12 @@ export const Helpers = {
107
106
  const u = makeUrl(id)
108
107
  const formData = new FormData()
109
108
  formData.append('_method', 'put')
110
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
111
109
  data && Helpers.appendArray(formData, data)
112
110
  return axios().post(u, formData, config)
113
111
  },
114
112
  async clone (id: UrlType, data?: ParamsType, config?: AxiosRequestConfig) {
115
113
  const u = makeUrl(`${id}/Clone`)
116
114
  const formData = new FormData()
117
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
118
115
  data && Helpers.appendArray(formData, data)
119
116
  return axios().post(u, formData, config)
120
117
  },
@@ -146,7 +143,7 @@ export const Helpers = {
146
143
  parent?: UrlType
147
144
  ): string => ((parent ?? '') + (parent && group ? '/' : '')) + (group ?? '') + ((group && segments ? '/' : '') + (segments ?? '')),
148
145
  findBy (search: any, value: any, column: string | number = 'id') {
149
- return find(search, (e: any) => isPlainObject(e) ? e[column] === value : e === value)
146
+ return lodash.find(search, (e: any) => lodash.isPlainObject(e) ? e[column] === value : e === value)
150
147
  },
151
148
  // queryStringify: (v: never) => new URLSearchParams(qs.stringify(v, {
152
149
  // arrayFormat: 'indices'
package/src/utils/Str.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * Github: https://github.com/mythpe
7
7
  */
8
8
 
9
- import { camelCase, flow, mixin, pascalCase, pluralize, singularize, upperFirst } from 'lodash'
9
+ import lodash from 'lodash'
10
10
 
11
11
  export const Str = {
12
12
  /**
@@ -73,16 +73,16 @@ export const Str = {
73
73
  // return mobile && ((mobile.length === 10 && (c1 === '05' || parseInt(c1) === 5)) || (mobile.length === 9 && c2 === 5))
74
74
  },
75
75
  pascalCase (string?: string): string {
76
- if (!pascalCase) {
77
- mixin({ pascalCase: flow(camelCase, upperFirst) })
76
+ if (!lodash.pascalCase) {
77
+ lodash.mixin({ pascalCase: lodash.flow(lodash.camelCase, lodash.upperFirst) })
78
78
  }
79
- return pascalCase(string)
79
+ return lodash.pascalCase(string)
80
80
  },
81
81
  pluralize (string?: string): string {
82
- return pluralize?.(string)
82
+ return lodash.pluralize?.(string)
83
83
  },
84
84
  singular (string?: string): string {
85
- return singularize(string)
85
+ return lodash.singularize(string)
86
86
  },
87
87
  flipChoice (data: Record<any, any>) {
88
88
  const f: Record<any, any> = {}
@@ -6,7 +6,7 @@
6
6
  * Github: https://github.com/mythpe
7
7
  */
8
8
 
9
- import { isNumber } from 'lodash'
9
+ import lodash from 'lodash'
10
10
  import { patterns } from 'quasar'
11
11
 
12
12
  const { testPattern } = patterns
@@ -16,7 +16,7 @@ export const veeRules = {
16
16
  if (v === undefined || v === null) {
17
17
  return !0
18
18
  }
19
- return isNumber(parseInt(v)) && !isNaN(parseInt(v)) &&
19
+ return lodash.isNumber(parseInt(v)) && !isNaN(parseInt(v)) &&
20
20
  v?.toString().split('.')?.length <= 2 &&
21
21
  (/(\d)+/g.test(v) && !/[a-zA-Z]/.test(v))
22
22
  },
package/tsconfig.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "vite/client"
26
26
  ],
27
27
  "noImplicitAny": false,
28
- "moduleResolution": "Bundler",
28
+ "moduleResolution": "node",
29
29
  "newLine": "lf"
30
30
  }
31
31
  }