@d-mok/quasar-app-extension-quasar-axe 4.1.7 → 4.1.8

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": "@d-mok/quasar-app-extension-quasar-axe",
3
- "version": "4.1.7",
3
+ "version": "4.1.8",
4
4
  "description": "A Quasar App Extension",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -34,14 +34,14 @@ function parse(glob: Record<string, { default: any }>) {
34
34
  }
35
35
 
36
36
  const [layoutMaster] = parse(
37
- import.meta.glob('src/boot/axe/LayoutMaster.vue', { eager: true })
37
+ import.meta.glob('src/boot/axe/LayoutMaster.vue', { eager: true }),
38
38
  )
39
39
  const layouts = parse(import.meta.glob('src/layouts/*.vue', { eager: true }))
40
40
  const pages = parse(import.meta.glob('src/pages/**/*.vue', { eager: true }))
41
41
 
42
42
  for (const layout of layouts) {
43
43
  layout.children = pages.filter($ =>
44
- $.filepath.includes('pages/' + layout.filename)
44
+ $.filepath.includes('pages/' + layout.filename),
45
45
  )
46
46
  }
47
47
 
@@ -74,7 +74,7 @@ type QueryValueBasicType = string | number | boolean | undefined
74
74
  type QueryValueType = QueryValueBasicType | QueryValueBasicType[]
75
75
 
76
76
  function castBasicValue(
77
- val: LocationQueryValue | undefined
77
+ val: LocationQueryValue | undefined,
78
78
  ): QueryValueBasicType {
79
79
  if (val === undefined) return undefined
80
80
  if (val === null) return undefined
@@ -85,17 +85,25 @@ function castBasicValue(
85
85
  return val
86
86
  }
87
87
 
88
- function castValue(
89
- val: LocationQueryValue | LocationQueryValue[] | undefined
90
- ): QueryValueType {
91
- return Array.isArray(val) ? val.map(castBasicValue) : castBasicValue(val)
88
+ function castBasicValueAsRawString(
89
+ val: LocationQueryValue | undefined,
90
+ ): string | undefined {
91
+ if (val === undefined) return undefined
92
+ if (val === null) return undefined
93
+ return val
92
94
  }
93
95
 
94
96
  function castQuery(query: LocationQuery): Record<string, QueryValueType> {
95
97
  const casted: Record<string, QueryValueType> = {}
96
98
  for (const k in query) {
97
99
  const v = query[k]
98
- casted[k] = castValue(v)
100
+ casted[k] = Array.isArray(v) ? v.map(castBasicValue) : castBasicValue(v)
101
+ }
102
+ for (const k in query) {
103
+ const v = query[k]
104
+ casted[k + '_'] = Array.isArray(v)
105
+ ? v.map(castBasicValueAsRawString)
106
+ : castBasicValueAsRawString(v)
99
107
  }
100
108
  return casted
101
109
  }