@d-mok/quasar-app-extension-quasar-axe 2.0.8 → 2.0.9

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": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "A Quasar App Extension",
5
5
  "author": "d-mok <49301824+d-mok@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  import { boot } from 'quasar/wrappers'
2
2
  import { LoadingBar } from 'quasar'
3
3
 
4
- console.log("[QuasarAxe] Run Boot Interceptor")
4
+ console.log('[QuasarAxe] Run Boot Interceptor')
5
5
 
6
6
  declare global {
7
7
  interface XMLHttpRequest {
@@ -61,34 +61,26 @@ export function setFetchInterceptor(
61
61
  }
62
62
  }
63
63
 
64
-
65
-
66
-
67
64
  function isLogRocket(request: XMLHttpRequest): boolean {
68
65
  return request._url.startsWith('https://r.lr-ingest.io')
69
66
  }
70
67
 
71
68
  setAjaxInterceptor(
72
- (request) => {
69
+ request => {
73
70
  if (!isLogRocket(request)) {
74
71
  LoadingBar.start()
75
72
  }
76
73
  },
77
- (request) => {
74
+ request => {
78
75
  if (!isLogRocket(request)) {
79
76
  LoadingBar.stop()
80
77
  }
81
- },
78
+ }
82
79
  )
83
80
 
84
81
  setFetchInterceptor(
85
82
  () => LoadingBar.start(),
86
- () => LoadingBar.stop(),
83
+ () => LoadingBar.stop()
87
84
  )
88
85
 
89
-
90
- export default boot(({ app, router }) => {
91
-
92
-
93
- })
94
-
86
+ export default boot(({ app, router }) => {})
@@ -23,10 +23,7 @@
23
23
  </q-page-sticky>
24
24
  </template>
25
25
 
26
- <script
27
- lang="ts"
28
- setup
29
- >
26
+ <script lang="ts" setup>
30
27
  type action = {
31
28
  color: string
32
29
  icon: string
@@ -7,10 +7,7 @@
7
7
  />
8
8
  </template>
9
9
 
10
- <script
11
- lang="ts"
12
- setup
13
- >
10
+ <script lang="ts" setup>
14
11
  const props = defineProps<{
15
12
  src: string | undefined
16
13
  bordered?: boolean
@@ -81,10 +81,7 @@
81
81
  </q-layout>
82
82
  </template>
83
83
 
84
- <script
85
- lang="ts"
86
- setup
87
- >
84
+ <script lang="ts" setup>
88
85
  import { ref } from 'vue'
89
86
 
90
87
  type item = {
@@ -26,10 +26,7 @@
26
26
  </q-item>
27
27
  </template>
28
28
 
29
- <script
30
- lang="ts"
31
- setup
32
- >
29
+ <script lang="ts" setup>
33
30
  defineProps<{
34
31
  title: string
35
32
  caption?: string
@@ -17,10 +17,7 @@
17
17
  </div>
18
18
  </template>
19
19
 
20
- <script
21
- lang="ts"
22
- setup
23
- >
20
+ <script lang="ts" setup>
24
21
  import { computed } from 'vue'
25
22
 
26
23
  interface Props {
@@ -7,10 +7,7 @@
7
7
  />
8
8
  </template>
9
9
 
10
- <script
11
- lang="ts"
12
- setup
13
- >
10
+ <script lang="ts" setup>
14
11
  import { watch } from 'vue'
15
12
  import { useVModel } from '@vueuse/core'
16
13
  import _ from 'lodash'
@@ -23,7 +20,7 @@ const props = withDefaults(
23
20
  ticker?: number
24
21
  }>(),
25
22
  {
26
- optionLabel: $ => String($),
23
+ optionLabel: ($: any) => String($),
27
24
  ticker: 0,
28
25
  }
29
26
  )
@@ -6,10 +6,7 @@
6
6
  />
7
7
  </template>
8
8
 
9
- <script
10
- lang="ts"
11
- setup
12
- >
9
+ <script lang="ts" setup>
13
10
  import { supabase } from '../../../utils'
14
11
 
15
12
  function signOut() {
@@ -30,10 +30,7 @@
30
30
  </q-markup-table>
31
31
  </template>
32
32
 
33
- <script
34
- lang="ts"
35
- setup
36
- >
33
+ <script lang="ts" setup>
37
34
  import draggable from 'vuedraggable'
38
35
 
39
36
  const props = defineProps<{
@@ -8,7 +8,12 @@
8
8
  <q-card flat>
9
9
  <q-card-section>
10
10
  <div class="row items-center">
11
- <div class="text-h5 text-weight-bold">{{ title }}</div>
11
+ <div
12
+ v-if="title"
13
+ class="text-h5 text-weight-bold"
14
+ >
15
+ {{ title }}
16
+ </div>
12
17
  <q-space />
13
18
  <div v-if="!(noClose ?? false)">
14
19
  <q-btn
@@ -25,17 +30,14 @@
25
30
  </q-drawer>
26
31
  </template>
27
32
 
28
- <script
29
- lang="ts"
30
- setup
31
- >
33
+ <script lang="ts" setup>
32
34
  import { computed } from 'vue'
33
35
 
34
36
  const props = defineProps<{
35
37
  name?: string
36
- modelValue: string | boolean
38
+ modelValue?: string | boolean
37
39
  width?: number
38
- title: string
40
+ title?: string
39
41
  side?: 'right' | 'left'
40
42
  noClose?: boolean
41
43
  }>()
@@ -45,11 +47,16 @@ const emit = defineEmits(['update:model-value'])
45
47
  function onClose() {
46
48
  if (typeof props.modelValue === 'string') emit('update:model-value', '')
47
49
  if (typeof props.modelValue === 'boolean') emit('update:model-value', false)
50
+ if (props.modelValue === undefined) emit('update:model-value', false)
48
51
  }
49
52
 
50
53
  let on = computed(() => {
54
+ // if undefined, default true
55
+ if (props.modelValue === undefined) return true
56
+ // if is string, check if is my name
51
57
  if (typeof props.modelValue === 'string')
52
58
  return props.modelValue === (props.name ?? 'xxx')
59
+ // if is boolean, return it
53
60
  if (typeof props.modelValue === 'boolean') return props.modelValue
54
61
  })
55
62
  </script>
@@ -32,10 +32,7 @@
32
32
  </q-dialog>
33
33
  </template>
34
34
 
35
- <script
36
- lang="ts"
37
- setup
38
- >
35
+ <script lang="ts" setup>
39
36
  import { useDialogPluginComponent } from 'quasar'
40
37
 
41
38
  defineEmits([...useDialogPluginComponent.emits])
@@ -59,10 +59,7 @@
59
59
  </q-dialog>
60
60
  </template>
61
61
 
62
- <script
63
- lang="ts"
64
- setup
65
- >
62
+ <script lang="ts" setup>
66
63
  import { useDialogPluginComponent } from 'quasar'
67
64
  import { ref } from 'vue'
68
65
  import { toSchema, isMatchSchema, clone } from './schema'
@@ -116,6 +113,9 @@ function getType(field: string): string {
116
113
  }
117
114
 
118
115
  function valid() {
119
- return props.validator(dummy.value) === true && isMatchSchema(dummy.value, schema)
116
+ return (
117
+ props.validator(dummy.value) === true &&
118
+ isMatchSchema(dummy.value, schema)
119
+ )
120
120
  }
121
121
  </script>
@@ -47,10 +47,7 @@
47
47
  </q-dialog>
48
48
  </template>
49
49
 
50
- <script
51
- lang="ts"
52
- setup
53
- >
50
+ <script lang="ts" setup>
54
51
  import handson from './handson.vue'
55
52
  import { useDialogPluginComponent } from 'quasar'
56
53
  import { ref } from 'vue'
@@ -33,10 +33,7 @@
33
33
  </q-dialog>
34
34
  </template>
35
35
 
36
- <script
37
- lang="ts"
38
- setup
39
- >
36
+ <script lang="ts" setup>
40
37
  import { useDialogPluginComponent } from 'quasar'
41
38
  import { ref } from 'vue'
42
39
 
@@ -24,10 +24,7 @@
24
24
  ></hot-table>
25
25
  </template>
26
26
 
27
- <script
28
- lang="ts"
29
- setup
30
- >
27
+ <script lang="ts" setup>
31
28
  import { ref } from 'vue'
32
29
  import { HotTable } from '@handsontable/vue3'
33
30
  import { registerAllModules } from 'handsontable/registry'