@d-mok/quasar-app-extension-quasar-axe 2.0.14 → 2.0.17

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.14",
3
+ "version": "2.0.17",
4
4
  "description": "A Quasar App Extension",
5
5
  "author": "d-mok <49301824+d-mok@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -24,7 +24,7 @@
24
24
  "jszip": "^3.9.0",
25
25
  "lodash": "^4.17.21",
26
26
  "papaparse": "^5.3.2",
27
- "sapphire-js": "^1.0.68",
27
+ "sapphire-js": "^1.0.69",
28
28
  "vuedraggable": "^4.1.0"
29
29
  },
30
30
  "devDependencies": {
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <qx-btn
3
+ v-bind="$attrs"
4
+ flat
5
+ dense
6
+ />
7
+ </template>
8
+
9
+ <script lang="ts" setup>
10
+ // this component follow qx-btn, with default flat and dense
11
+ </script>
@@ -0,0 +1,42 @@
1
+ <template>
2
+ <q-btn-toggle
3
+ v-model="selected"
4
+ :options="opts"
5
+ v-bind="$attrs"
6
+ />
7
+ </template>
8
+
9
+ <script lang="ts" setup>
10
+ import { computed } from '@vue/reactivity'
11
+ import { useVModel } from '@vueuse/core'
12
+
13
+ const props = withDefaults(
14
+ defineProps<{
15
+ modelValue: any
16
+ options: any[]
17
+ optionLabel?: string | ((_: any) => string)
18
+ }>(),
19
+ {}
20
+ )
21
+ const emits = defineEmits(['update:modelValue'])
22
+
23
+ const selected = useVModel(props, 'modelValue', emits)
24
+
25
+ function getLabelFunc(labeler?: string | ((_: any) => string)) {
26
+ if (typeof labeler === 'string') {
27
+ return ($: any) => String($[labeler])
28
+ }
29
+ if (typeof labeler === 'function') {
30
+ return labeler
31
+ }
32
+ return ($: any) => String($)
33
+ }
34
+
35
+ let opts = computed(() => {
36
+ let f = getLabelFunc(props.optionLabel)
37
+ return props.options.map($ => {
38
+ let str = f($)
39
+ return { label: str, value: str }
40
+ })
41
+ })
42
+ </script>
@@ -0,0 +1,42 @@
1
+ <template>
2
+ <q-option-group
3
+ v-model="selected"
4
+ :options="opts"
5
+ v-bind="$attrs"
6
+ />
7
+ </template>
8
+
9
+ <script lang="ts" setup>
10
+ import { computed } from '@vue/reactivity'
11
+ import { useVModel } from '@vueuse/core'
12
+
13
+ const props = withDefaults(
14
+ defineProps<{
15
+ modelValue: any
16
+ options: any[]
17
+ optionLabel?: string | ((_: any) => string)
18
+ }>(),
19
+ {}
20
+ )
21
+ const emits = defineEmits(['update:modelValue'])
22
+
23
+ const selected = useVModel(props, 'modelValue', emits)
24
+
25
+ function getLabelFunc(labeler?: string | ((_: any) => string)) {
26
+ if (typeof labeler === 'string') {
27
+ return ($: any) => String($[labeler])
28
+ }
29
+ if (typeof labeler === 'function') {
30
+ return labeler
31
+ }
32
+ return ($: any) => String($)
33
+ }
34
+
35
+ let opts = computed(() => {
36
+ let f = getLabelFunc(props.optionLabel)
37
+ return props.options.map($ => {
38
+ let str = f($)
39
+ return { label: str, value: str }
40
+ })
41
+ })
42
+ </script>
@@ -0,0 +1,37 @@
1
+ <template>
2
+ <div
3
+ v-bind="$attrs"
4
+ :class="{
5
+ 'text-caption': caption,
6
+ 'text-subtitle1': subtitle1,
7
+ 'text-subtitle2': subtitle2,
8
+ 'text-body1': body1,
9
+ 'text-body2': body2,
10
+ 'text-h6': h6,
11
+ 'text-h5': h5,
12
+ 'text-h4': h4,
13
+ 'text-weight-bold': bold,
14
+ 'text-weight-bolder': bolder,
15
+ }"
16
+ >
17
+ <slot></slot>
18
+ </div>
19
+ </template>
20
+
21
+ <script lang="ts" setup>
22
+ const props = withDefaults(
23
+ defineProps<{
24
+ bold?: boolean
25
+ bolder?: boolean
26
+ caption?: boolean
27
+ subtitle1?: boolean
28
+ subtitle2?: boolean
29
+ body1?: boolean
30
+ body2?: boolean
31
+ h6?: boolean
32
+ h5?: boolean
33
+ h4?: boolean
34
+ }>(),
35
+ {}
36
+ )
37
+ </script>
@@ -3,6 +3,9 @@ export * as qNotify from './notify'
3
3
 
4
4
  export { Sheet, List } from 'sapphire-js'
5
5
 
6
+ import * as lo from 'lodash'
7
+ export const _ = lo
8
+
6
9
  export { HANDLE_ERROR, supabase } from './supabase'
7
10
 
8
11
  export { localSettings } from './settings'