@bildvitta/quasar-ui-asteroid 3.16.1 → 3.17.0-beta.1
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 +1 -1
- package/src/components/badge/QasBadge.vue +51 -3
- package/src/components/badge/QasBadge.yml +29 -2
- package/src/components/box/QasBox.vue +26 -3
- package/src/components/box/QasBox.yml +16 -0
- package/src/components/card/QasCard.vue +38 -25
- package/src/components/chart-view/QasChartView.vue +13 -13
- package/src/components/{checkbox-group/QasCheckboxGroup.vue → checkbox/QasCheckbox.vue} +34 -12
- package/src/components/date-time-input/QasDateTimeInput.vue +13 -3
- package/src/components/dialog/QasDialog.vue +3 -1
- package/src/components/field/QasField.vue +18 -13
- package/src/components/filters/QasFilters.vue +16 -7
- package/src/components/filters/private/PvFiltersButton.vue +2 -1
- package/src/components/form-generator/QasFormGenerator.vue +87 -26
- package/src/components/form-generator/QasFormGenerator.yml +21 -2
- package/src/components/gallery-card/QasGalleryCard.vue +10 -3
- package/src/components/grid-generator/QasGridGenerator.vue +22 -13
- package/src/components/grid-generator/QasGridGenerator.yml +18 -2
- package/src/components/grid-item/QasGridItem.vue +89 -0
- package/src/components/grid-item/QasGridItem.yml +22 -0
- package/src/components/header/QasHeader.vue +106 -0
- package/src/components/header/QasHeader.yml +45 -0
- package/src/components/info/QasInfo.vue +155 -0
- package/src/components/info/QasInfo.yml +34 -0
- package/src/components/input/QasInput.vue +48 -3
- package/src/components/input/QasInput.yml +10 -0
- package/src/components/nested-fields/QasNestedFields.vue +58 -47
- package/src/components/nested-fields/QasNestedFields.yml +5 -0
- package/src/components/numeric-input/QasNumericInput.vue +38 -3
- package/src/components/numeric-input/QasNumericInput.yml +10 -0
- package/src/components/page-header/QasPageHeader.vue +5 -5
- package/src/components/page-header/QasPageHeader.yml +2 -2
- package/src/components/radio/QasRadio.vue +43 -0
- package/src/components/radio/QasRadio.yml +5 -0
- package/src/components/search-input/QasSearchInput.vue +26 -19
- package/src/components/select/QasSelect.vue +82 -10
- package/src/components/select-list-dialog/QasSelectListDialog.vue +14 -7
- package/src/components/table-generator/QasTableGenerator.vue +30 -5
- package/src/components/table-generator/QasTableGenerator.yml +9 -0
- package/src/components/tabs-generator/QasTabsGenerator.vue +3 -1
- package/src/components/toggle/QasToggle.vue +14 -0
- package/src/components/toggle/QasToggle.yml +5 -0
- package/src/composables/private/use-generator.js +9 -1
- package/src/css/components/checkbox.scss +2 -0
- package/src/css/components/field.scss +59 -2
- package/src/css/components/radio.scss +3 -1
- package/src/css/components/toggle.scss +3 -1
- package/src/css/utils/border.scss +5 -0
- package/src/helpers/get-placeholder.js +19 -0
- package/src/helpers/index.js +1 -0
- package/src/vue-plugin.js +18 -6
- package/src/components/header-actions/QasHeaderActions.vue +0 -76
- package/src/components/header-actions/QasHeaderActions.yml +0 -38
- /package/src/components/{checkbox-group/QasCheckboxGroup.yml → checkbox/QasCheckbox.yml} +0 -0
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<component :is="component.is" v-bind="component.props" class="q-px-sm qas-badge text-caption">
|
|
3
3
|
<slot />
|
|
4
|
-
</
|
|
4
|
+
</component>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
|
+
import { computed } from 'vue'
|
|
9
|
+
|
|
8
10
|
defineOptions({
|
|
9
11
|
name: 'QasBadge',
|
|
10
12
|
inheritAttrs: false
|
|
@@ -28,12 +30,58 @@ const props = defineProps({
|
|
|
28
30
|
textColor: {
|
|
29
31
|
type: String,
|
|
30
32
|
default: 'black'
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
removable: {
|
|
36
|
+
type: Boolean
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
tabindex: {
|
|
40
|
+
type: [String, Number],
|
|
41
|
+
default: undefined
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
const emit = defineEmits(['remove'])
|
|
46
|
+
const model = defineModel({ type: Boolean, default: true })
|
|
47
|
+
|
|
48
|
+
const component = computed(() => {
|
|
49
|
+
const isChip = props.removable
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
is: isChip ? 'q-chip' : 'q-badge',
|
|
53
|
+
props: {
|
|
54
|
+
// comum
|
|
55
|
+
color: props.color,
|
|
56
|
+
dense: true,
|
|
57
|
+
textColor: props.textColor,
|
|
58
|
+
label: props.label,
|
|
59
|
+
|
|
60
|
+
// somente QChip
|
|
61
|
+
...(isChip && {
|
|
62
|
+
iconRemove: 'sym_r_close',
|
|
63
|
+
removable: true,
|
|
64
|
+
square: true,
|
|
65
|
+
tabindex: props.tabindex,
|
|
66
|
+
modelValue: model.value,
|
|
67
|
+
ripple: false,
|
|
68
|
+
onRemove: () => emit('remove')
|
|
69
|
+
}),
|
|
70
|
+
|
|
71
|
+
// somente QBadge
|
|
72
|
+
...(!isChip && {
|
|
73
|
+
multiLine: props.multiLine,
|
|
74
|
+
ariaMultiline: props.multiLine
|
|
75
|
+
})
|
|
76
|
+
}
|
|
31
77
|
}
|
|
32
78
|
})
|
|
33
79
|
</script>
|
|
34
80
|
|
|
35
81
|
<style lang="scss">
|
|
36
82
|
.qas-badge {
|
|
37
|
-
min-height:
|
|
83
|
+
min-height: 20px;
|
|
84
|
+
padding-bottom: 2px;
|
|
85
|
+
padding-top: 2px;
|
|
38
86
|
}
|
|
39
87
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type: component
|
|
2
2
|
|
|
3
3
|
meta:
|
|
4
|
-
desc: Componente wrapper do QBadge do quasar.
|
|
4
|
+
desc: Componente wrapper do QBadge/QChip do quasar.
|
|
5
5
|
|
|
6
6
|
props:
|
|
7
7
|
color:
|
|
@@ -23,6 +23,33 @@ props:
|
|
|
23
23
|
default: black
|
|
24
24
|
type: String
|
|
25
25
|
|
|
26
|
+
removable:
|
|
27
|
+
desc: Transforma componente em QChip.
|
|
28
|
+
default: false
|
|
29
|
+
type: Boolean
|
|
30
|
+
|
|
31
|
+
tabindex:
|
|
32
|
+
desc: Usado para "foco" (usar junto a propriedade "removable").
|
|
33
|
+
default: undefined
|
|
34
|
+
type: [String, Number]
|
|
35
|
+
|
|
36
|
+
model-value:
|
|
37
|
+
desc: Model do componente (usar junto a propriedade "removable").
|
|
38
|
+
default: true
|
|
39
|
+
type: Boolean
|
|
40
|
+
|
|
26
41
|
slots:
|
|
27
42
|
default:
|
|
28
|
-
desc: Slot do conteúdo do badge.
|
|
43
|
+
desc: Slot do conteúdo do badge/chip.
|
|
44
|
+
|
|
45
|
+
events:
|
|
46
|
+
'@remove -> function()':
|
|
47
|
+
desc: Evento emitido ao clicar no botão de remoção.
|
|
48
|
+
|
|
49
|
+
'@update:model-value -> function(value)':
|
|
50
|
+
desc: Dispara quando o model-value altera, também usado para v-model.
|
|
51
|
+
params:
|
|
52
|
+
value:
|
|
53
|
+
desc: Novo valor do model.
|
|
54
|
+
type: Boolean
|
|
55
|
+
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="bg-white
|
|
2
|
+
<div class="bg-white rounded-borders" :class="boxClasses">
|
|
3
3
|
<slot />
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup>
|
|
8
|
-
import {
|
|
8
|
+
import { Spacing } from '../../enums/Spacing'
|
|
9
|
+
|
|
10
|
+
import { computed, provide } from 'vue'
|
|
9
11
|
|
|
10
12
|
defineOptions({ name: 'QasBox' })
|
|
11
13
|
|
|
@@ -16,13 +18,34 @@ const props = defineProps({
|
|
|
16
18
|
|
|
17
19
|
unelevated: {
|
|
18
20
|
type: Boolean
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
spacingX: {
|
|
24
|
+
default: Spacing.Md,
|
|
25
|
+
type: String,
|
|
26
|
+
validator: value => Object.values(Spacing).includes(value)
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
spacingY: {
|
|
30
|
+
default: Spacing.Md,
|
|
31
|
+
type: String,
|
|
32
|
+
validator: value => Object.values(Spacing).includes(value)
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
useSpacing: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: true
|
|
19
38
|
}
|
|
20
39
|
})
|
|
21
40
|
|
|
41
|
+
provide('isBox', true)
|
|
42
|
+
|
|
22
43
|
const boxClasses = computed(() => {
|
|
23
44
|
return {
|
|
24
45
|
'border-grey': props.outlined,
|
|
25
|
-
'shadow-2': !props.unelevated
|
|
46
|
+
'shadow-2': !props.unelevated,
|
|
47
|
+
[`q-px-${props.spacingX}`]: props.useSpacing,
|
|
48
|
+
[`q-py-${props.spacingY}`]: props.useSpacing
|
|
26
49
|
}
|
|
27
50
|
})
|
|
28
51
|
</script>
|
|
@@ -11,3 +11,19 @@ props:
|
|
|
11
11
|
unelevated:
|
|
12
12
|
desc: Remove a sombra do componente.
|
|
13
13
|
type: Boolean
|
|
14
|
+
|
|
15
|
+
spacing-x:
|
|
16
|
+
desc: Espaçamento horizontal do componente.
|
|
17
|
+
type: String
|
|
18
|
+
default: md
|
|
19
|
+
examples: ['none', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl']
|
|
20
|
+
|
|
21
|
+
spacing-y:
|
|
22
|
+
desc: Espaçamento vertical do componente.
|
|
23
|
+
type: String
|
|
24
|
+
default: md
|
|
25
|
+
examples: ['none', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl']
|
|
26
|
+
|
|
27
|
+
use-spacing:
|
|
28
|
+
desc: Controla espaçamento do componente.
|
|
29
|
+
type: Boolean
|
|
@@ -1,37 +1,39 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="qas-card">
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
<qas-box class="rounded-borders-right" v-bind="boxProps">
|
|
4
|
+
<q-card class="column full-height overflow-hidden shadow-0">
|
|
5
|
+
<div class="items-center justify-between row">
|
|
6
|
+
<component :is="titleComponent" class="text-h4 text-no-decoration" :class="titleClasses" :to="route">
|
|
7
|
+
<slot name="title">
|
|
8
|
+
{{ props.title }}
|
|
9
|
+
</slot>
|
|
10
|
+
</component>
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
<qas-actions-menu v-if="hasActions" :list="props.actionsMenuProps" :use-label="false" />
|
|
13
|
+
</div>
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
<div class="q-my-sm qas-card__content">
|
|
16
|
+
<slot name="default" />
|
|
17
|
+
</div>
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
<div class="q-mt-auto">
|
|
20
|
+
<q-separator v-if="hasFooter" class="q-mb-sm" />
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
<slot name="footer">
|
|
23
|
+
<q-expansion-item v-if="hasExpansion" class="full-width" dense expand-icon-class="text-primary" header-class="q-pa-none text-primary" :label="props.expansionProps.label">
|
|
24
|
+
<slot name="expansion-content">
|
|
25
|
+
{{ props.expansionProps.content }}
|
|
26
|
+
</slot>
|
|
27
|
+
</q-expansion-item>
|
|
28
|
+
</slot>
|
|
29
|
+
</div>
|
|
30
|
+
</q-card>
|
|
31
|
+
</qas-box>
|
|
30
32
|
</div>
|
|
31
33
|
</template>
|
|
32
34
|
|
|
33
35
|
<script setup>
|
|
34
|
-
import { computed, useSlots } from 'vue'
|
|
36
|
+
import { computed, useSlots, inject } from 'vue'
|
|
35
37
|
|
|
36
38
|
import { colors } from 'quasar'
|
|
37
39
|
|
|
@@ -64,6 +66,17 @@ const props = defineProps({
|
|
|
64
66
|
}
|
|
65
67
|
})
|
|
66
68
|
|
|
69
|
+
const isInsideBox = inject('isBox', false)
|
|
70
|
+
|
|
71
|
+
const boxProps = computed(() => {
|
|
72
|
+
return {
|
|
73
|
+
outlined: isInsideBox,
|
|
74
|
+
unelevated: isInsideBox,
|
|
75
|
+
spacingY: 'sm',
|
|
76
|
+
style: style.value
|
|
77
|
+
}
|
|
78
|
+
})
|
|
79
|
+
|
|
67
80
|
const hasActions = computed(() => !!Object.keys(props.actionsMenuProps).length)
|
|
68
81
|
|
|
69
82
|
const hasExpansion = computed(() => !!Object.keys(props.expansionProps).length)
|
|
@@ -84,7 +97,7 @@ const style = computed(() => {
|
|
|
84
97
|
const { getPaletteColor } = colors
|
|
85
98
|
|
|
86
99
|
return {
|
|
87
|
-
borderLeft: `4px solid ${getPaletteColor(props.statusColor)}`
|
|
100
|
+
borderLeft: `4px solid ${getPaletteColor(props.statusColor)} !important`
|
|
88
101
|
}
|
|
89
102
|
})
|
|
90
103
|
|
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<qas-header
|
|
3
|
-
<template #left>
|
|
4
|
-
<h3 v-if="title" class="text-h3">
|
|
5
|
-
{{ title }}
|
|
6
|
-
</h3>
|
|
7
|
-
|
|
8
|
-
<div v-if="subtitle" class="text-body1 text-grey-8">
|
|
9
|
-
{{ subtitle }}
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
2
|
+
<qas-header v-if="hasHeader" v-bind="headerProps">
|
|
13
3
|
<template #right>
|
|
14
4
|
<qas-filters v-bind="chartFiltersProps" />
|
|
15
5
|
</template>
|
|
16
|
-
</qas-header
|
|
6
|
+
</qas-header>
|
|
17
7
|
|
|
18
8
|
<div v-bind="parentComponentProps">
|
|
19
9
|
<component :is="chartComponent.is" v-if="showChart" v-bind="chartComponent.props" />
|
|
@@ -271,7 +261,7 @@ export default {
|
|
|
271
261
|
return !!this.chartData?.datasets.filter(dataset => dataset.data.length)?.length
|
|
272
262
|
},
|
|
273
263
|
|
|
274
|
-
|
|
264
|
+
hasHeader () {
|
|
275
265
|
return this.title || this.subtitle || this.useFilterButton
|
|
276
266
|
},
|
|
277
267
|
|
|
@@ -308,6 +298,16 @@ export default {
|
|
|
308
298
|
doughnut: [ArcElement],
|
|
309
299
|
line: [LineElement]
|
|
310
300
|
}
|
|
301
|
+
},
|
|
302
|
+
|
|
303
|
+
headerProps () {
|
|
304
|
+
return {
|
|
305
|
+
alignColumns: 'end',
|
|
306
|
+
description: this.subtitle,
|
|
307
|
+
labelProps: {
|
|
308
|
+
label: this.title
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
311
|
}
|
|
312
312
|
},
|
|
313
313
|
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<!-- Single -->
|
|
4
|
+
<q-checkbox v-if="isSingle" v-model="model" v-bind="attrs" dense>
|
|
5
|
+
<slot />
|
|
6
|
+
</q-checkbox>
|
|
7
|
+
|
|
8
|
+
<!-- Group -->
|
|
9
|
+
<div v-else :class="classes">
|
|
10
|
+
<div v-for="(option, index) in props.options" :key="index">
|
|
11
|
+
<!-- Com children -->
|
|
12
|
+
<q-checkbox v-if="hasChildren(option)" :class="getCheckboxClass(option)" dense :label="option.label" :model-value="getModelValue(index)" @update:model-value="updateCheckbox($event, option, index)" />
|
|
13
|
+
|
|
14
|
+
<!-- Com children -->
|
|
15
|
+
<q-option-group v-if="hasChildren(option)" class="q-ml-xs q-mt-xs" dense :inline="props.inline" :model-value="props.modelValue" :options="option.children" type="checkbox" @update:model-value="updateChildren($event, option, index)" />
|
|
16
|
+
|
|
17
|
+
<!-- Sem children -->
|
|
18
|
+
<q-option-group v-else v-model="model" v-bind="attrs" dense :options="[option]" type="checkbox" />
|
|
19
|
+
</div>
|
|
9
20
|
</div>
|
|
10
21
|
</div>
|
|
11
22
|
</template>
|
|
@@ -13,7 +24,10 @@
|
|
|
13
24
|
<script setup>
|
|
14
25
|
import { watch, computed, ref, onMounted, useAttrs } from 'vue'
|
|
15
26
|
|
|
16
|
-
defineOptions({
|
|
27
|
+
defineOptions({
|
|
28
|
+
name: 'QasCheckbox',
|
|
29
|
+
inheritAttrs: false
|
|
30
|
+
})
|
|
17
31
|
|
|
18
32
|
const props = defineProps({
|
|
19
33
|
options: {
|
|
@@ -23,7 +37,7 @@ const props = defineProps({
|
|
|
23
37
|
|
|
24
38
|
modelValue: {
|
|
25
39
|
default: () => [],
|
|
26
|
-
type: Array
|
|
40
|
+
type: [Array, String, Number, Boolean, Object]
|
|
27
41
|
},
|
|
28
42
|
|
|
29
43
|
inline: {
|
|
@@ -36,10 +50,13 @@ const emit = defineEmits(['update:modelValue'])
|
|
|
36
50
|
|
|
37
51
|
const attrs = useAttrs()
|
|
38
52
|
|
|
39
|
-
|
|
40
|
-
|
|
53
|
+
// refs
|
|
41
54
|
const group = ref({})
|
|
42
55
|
|
|
56
|
+
// lifecycle
|
|
57
|
+
onMounted(handleParent)
|
|
58
|
+
|
|
59
|
+
// computed
|
|
43
60
|
const classes = computed(() => props.inline && 'flex q-gutter-x-sm')
|
|
44
61
|
|
|
45
62
|
const model = computed({
|
|
@@ -52,12 +69,18 @@ const model = computed({
|
|
|
52
69
|
}
|
|
53
70
|
})
|
|
54
71
|
|
|
72
|
+
const isSingle = computed(() => !props.options.length)
|
|
73
|
+
|
|
74
|
+
// watch
|
|
55
75
|
watch(() => props.options, handleParent)
|
|
56
76
|
|
|
57
77
|
// functions
|
|
58
78
|
function handleParent () {
|
|
79
|
+
if (isSingle.value) return
|
|
80
|
+
|
|
59
81
|
for (const index in props.options) {
|
|
60
82
|
const option = props.options[index]
|
|
83
|
+
|
|
61
84
|
if (hasChildren(option)) {
|
|
62
85
|
setGroupIntersection(props.modelValue, option, index)
|
|
63
86
|
}
|
|
@@ -103,5 +126,4 @@ function getCheckboxClass (option) {
|
|
|
103
126
|
function getModelValue (index) {
|
|
104
127
|
return group.value[index]
|
|
105
128
|
}
|
|
106
|
-
|
|
107
129
|
</script>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
19
|
<script setup>
|
|
20
|
-
import { date as dateFn } from '../../helpers
|
|
20
|
+
import { date as dateFn, getPlaceholder } from '../../helpers'
|
|
21
21
|
|
|
22
22
|
import { date } from 'quasar'
|
|
23
23
|
import { ref, watch, computed, useAttrs, onMounted } from 'vue'
|
|
@@ -105,14 +105,24 @@ const maskDate = computed(() => {
|
|
|
105
105
|
|
|
106
106
|
const mask = computed(() => maskDate.value.replace(/\w/g, '#'))
|
|
107
107
|
|
|
108
|
+
const maskType = computed(() => {
|
|
109
|
+
const types = {
|
|
110
|
+
[props.useDateOnly]: 'date',
|
|
111
|
+
[props.useTimeOnly]: 'time'
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return types.true || 'datetime'
|
|
115
|
+
})
|
|
116
|
+
|
|
108
117
|
const attributes = computed(() => {
|
|
109
|
-
const { modelValue, ...restAttributes } = attrs
|
|
118
|
+
const { modelValue, placeholder, ...restAttributes } = attrs
|
|
110
119
|
|
|
111
120
|
return {
|
|
112
121
|
error: error.value,
|
|
113
122
|
errorMessage: errorMessage.value,
|
|
114
123
|
...restAttributes,
|
|
115
|
-
mask: mask.value
|
|
124
|
+
mask: mask.value,
|
|
125
|
+
placeholder: placeholder || getPlaceholder(maskType.value)
|
|
116
126
|
}
|
|
117
127
|
})
|
|
118
128
|
|
|
@@ -45,7 +45,7 @@ import useDynamicComponents from './composables/use-dynamic-components'
|
|
|
45
45
|
import useOk from './composables/use-ok'
|
|
46
46
|
import { useScreen } from '../../composables'
|
|
47
47
|
|
|
48
|
-
import { computed, ref, useAttrs, useSlots } from 'vue'
|
|
48
|
+
import { computed, ref, useAttrs, useSlots, provide } from 'vue'
|
|
49
49
|
import { useDialogPluginComponent } from 'quasar'
|
|
50
50
|
|
|
51
51
|
defineOptions({ name: 'QasDialog' })
|
|
@@ -120,6 +120,8 @@ const emit = defineEmits([
|
|
|
120
120
|
...useDialogPluginComponent.emits
|
|
121
121
|
])
|
|
122
122
|
|
|
123
|
+
provide('isDialog', true)
|
|
124
|
+
|
|
123
125
|
const attrs = useAttrs()
|
|
124
126
|
const screen = useScreen()
|
|
125
127
|
const slots = useSlots()
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
|
-
import
|
|
10
|
+
import QasCheckbox from '../checkbox/QasCheckbox.vue'
|
|
11
11
|
import QasDateTimeInput from '../date-time-input/QasDateTimeInput.vue'
|
|
12
12
|
import QasInput from '../input/QasInput.vue'
|
|
13
13
|
import QasNumericInput from '../numeric-input/QasNumericInput.vue'
|
|
@@ -15,6 +15,8 @@ import QasOptionGroup from '../option-group/QasOptionGroup.vue'
|
|
|
15
15
|
import QasPasswordInput from '../password-input/QasPasswordInput.vue'
|
|
16
16
|
import QasSignatureUploader from '../signature-uploader/QasSignatureUploader.vue'
|
|
17
17
|
import QasUploader from '../uploader/QasUploader.vue'
|
|
18
|
+
import QasToggle from '../toggle/QasToggle.vue'
|
|
19
|
+
import QasRadio from '../radio/QasRadio.vue'
|
|
18
20
|
|
|
19
21
|
const attributesProfile = {
|
|
20
22
|
maxLength: 'maxlength',
|
|
@@ -26,14 +28,16 @@ export default {
|
|
|
26
28
|
name: 'QasField',
|
|
27
29
|
|
|
28
30
|
components: {
|
|
29
|
-
|
|
31
|
+
QasCheckbox,
|
|
30
32
|
QasDateTimeInput,
|
|
31
33
|
QasInput,
|
|
32
34
|
QasNumericInput,
|
|
33
35
|
QasOptionGroup,
|
|
34
36
|
QasPasswordInput,
|
|
35
37
|
QasSignatureUploader,
|
|
36
|
-
QasUploader
|
|
38
|
+
QasUploader,
|
|
39
|
+
QasToggle,
|
|
40
|
+
QasRadio
|
|
37
41
|
},
|
|
38
42
|
|
|
39
43
|
inheritAttrs: false,
|
|
@@ -61,24 +65,25 @@ export default {
|
|
|
61
65
|
computed: {
|
|
62
66
|
component () {
|
|
63
67
|
const {
|
|
68
|
+
disable,
|
|
64
69
|
entity,
|
|
65
70
|
extensions,
|
|
71
|
+
filled,
|
|
66
72
|
label,
|
|
73
|
+
mask,
|
|
74
|
+
maxFiles,
|
|
67
75
|
maxlength,
|
|
68
76
|
minlength,
|
|
69
77
|
multiple,
|
|
70
78
|
name,
|
|
71
79
|
options,
|
|
80
|
+
placeholder,
|
|
81
|
+
places,
|
|
82
|
+
prefix,
|
|
72
83
|
readonly,
|
|
73
84
|
required,
|
|
74
|
-
disable,
|
|
75
|
-
filled = readonly,
|
|
76
85
|
suffix,
|
|
77
|
-
prefix,
|
|
78
|
-
places,
|
|
79
86
|
type,
|
|
80
|
-
mask,
|
|
81
|
-
maxFiles,
|
|
82
87
|
useIso,
|
|
83
88
|
useLazyLoading,
|
|
84
89
|
useStrengthChecker
|
|
@@ -94,7 +99,6 @@ export default {
|
|
|
94
99
|
const input = {
|
|
95
100
|
label,
|
|
96
101
|
hideBottomSpace: !error.error,
|
|
97
|
-
outlined: true,
|
|
98
102
|
...error,
|
|
99
103
|
readonly,
|
|
100
104
|
required,
|
|
@@ -103,6 +107,7 @@ export default {
|
|
|
103
107
|
maxlength,
|
|
104
108
|
minlength,
|
|
105
109
|
suffix,
|
|
110
|
+
placeholder,
|
|
106
111
|
prefix,
|
|
107
112
|
useIso
|
|
108
113
|
}
|
|
@@ -140,9 +145,9 @@ export default {
|
|
|
140
145
|
datetime: { ...datetimeInput },
|
|
141
146
|
time: { ...datetimeInput, useTimeOnly: true },
|
|
142
147
|
|
|
143
|
-
boolean: { is: '
|
|
144
|
-
checkbox: { is: 'qas-checkbox
|
|
145
|
-
radio: { is: 'qas-
|
|
148
|
+
boolean: { is: 'qas-toggle', label, ...error },
|
|
149
|
+
checkbox: { is: 'qas-checkbox', label, options, ...error },
|
|
150
|
+
radio: { is: 'qas-radio', label, options },
|
|
146
151
|
|
|
147
152
|
upload: { is: 'qas-uploader', accept, autoUpload: true, entity, label, multiple, readonly, maxFiles, ...error },
|
|
148
153
|
editor: { is: 'q-editor', toolbar, ...error },
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section :class="
|
|
2
|
+
<section class="qas-filters" :class="filtersClasses">
|
|
3
3
|
<div v-if="showFilters" class="q-col-gutter-x-md row">
|
|
4
4
|
<div v-if="showSearch" class="col-12 col-md-6">
|
|
5
5
|
<slot :filter="filter" name="search">
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</slot>
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
|
-
<div v-else-if="showFilterButton" class="col-12
|
|
18
|
+
<div v-else-if="showFilterButton" class="col-12">
|
|
19
19
|
<slot :context="mx_context" :filter="filter" :filters="activeFilters" name="filter-button" :remove-filter="removeFilter">
|
|
20
20
|
<pv-filters-button v-if="useFilterButton" ref="filtersButton" v-model="internalFilters" v-bind="filterButtonProps" />
|
|
21
21
|
</slot>
|
|
@@ -27,10 +27,11 @@
|
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
29
|
<div v-if="hasChip" class="q-mt-md">
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
<qas-badge v-for="(filterItem, key) in activeFilters" :key="key" :data-cy="`filters-${filterItem.value}-chip`" removable @remove="removeFilter(filterItem)">
|
|
31
|
+
<div class="ellipsis qas-filters__badge-content" :title="getChipValue(filterItem.value)">
|
|
32
|
+
{{ filterItem.label }}: "{{ getChipValue(filterItem.value) }}"
|
|
33
|
+
</div>
|
|
34
|
+
</qas-badge>
|
|
34
35
|
</div>
|
|
35
36
|
|
|
36
37
|
<slot :context="mx_context" :filter="filter" :filters="activeFilters" :remove-filter="removeFilter" />
|
|
@@ -203,7 +204,7 @@ export default {
|
|
|
203
204
|
return getState.call(this, { entity: this.entity, key: 'filters' })
|
|
204
205
|
},
|
|
205
206
|
|
|
206
|
-
|
|
207
|
+
filtersClasses () {
|
|
207
208
|
return {
|
|
208
209
|
'q-mb-xl': this.useSpacing
|
|
209
210
|
}
|
|
@@ -461,3 +462,11 @@ export default {
|
|
|
461
462
|
}
|
|
462
463
|
}
|
|
463
464
|
</script>
|
|
465
|
+
|
|
466
|
+
<style lang="scss">
|
|
467
|
+
.qas-filters {
|
|
468
|
+
&__badge-content {
|
|
469
|
+
max-width: 300px;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<qas-btn
|
|
2
|
+
<qas-btn data-cy="filters-btn" icon="sym_r_filter_alt" label="Filtrar" :use-label-on-small-screen="false" variant="tertiary">
|
|
3
3
|
<q-menu ref="menu" anchor="center right" class="full-width" max-width="270px" self="top right" v-bind="menuProps">
|
|
4
4
|
<div v-if="loading" class="q-pa-xl text-center">
|
|
5
5
|
<q-spinner color="grey" size="2em" />
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
<template #primary>
|
|
19
19
|
<qas-btn class="full-width" data-cy="filters-submit-btn" label="Filtrar" type="submit" variant="primary" />
|
|
20
20
|
</template>
|
|
21
|
+
|
|
21
22
|
<template #secondary>
|
|
22
23
|
<qas-btn class="full-width" data-cy="filters-clear-btn" label="Limpar" variant="secondary" @click="$emit('clear')" />
|
|
23
24
|
</template>
|