@bildvitta/quasar-ui-asteroid 3.17.0 → 3.18.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/actions-menu/QasActionsMenu.vue +3 -3
- package/src/components/alert/QasAlert.vue +187 -60
- package/src/components/alert/QasAlert.yml +27 -5
- package/src/components/app-bar/QasAppBar.vue +2 -0
- package/src/components/app-menu/QasAppMenu.vue +127 -68
- package/src/components/app-menu/QasAppMenu.yml +10 -0
- package/src/components/app-user/QasAppUser.vue +12 -8
- package/src/components/app-user/QasAppUser.yml +5 -0
- package/src/components/badge/QasBadge.vue +1 -1
- package/src/components/checkbox/QasCheckbox.vue +97 -32
- package/src/components/date-time-input/QasDateTimeInput.vue +2 -2
- package/src/components/error-message/QasErrorMessage.vue +23 -0
- package/src/components/error-message/QasErrorMessage.yml +9 -0
- package/src/components/expansion-item/QasExpansionItem.vue +14 -16
- package/src/components/filters/QasFilters.vue +51 -30
- package/src/components/filters/QasFilters.yml +9 -0
- package/src/components/gallery/QasGallery.vue +2 -3
- package/src/components/gallery-card/QasGalleryCard.vue +43 -12
- package/src/components/gallery-card/QasGalleryCard.yml +22 -6
- package/src/components/input/QasInput.vue +3 -3
- package/src/components/label/QasLabel.vue +1 -1
- package/src/components/list-view/QasListView.vue +6 -1
- package/src/components/list-view/QasListView.yml +5 -0
- package/src/components/nested-fields/QasNestedFields.vue +10 -2
- package/src/components/nested-fields/QasNestedFields.yml +18 -3
- package/src/components/password-input/QasPasswordInput.vue +6 -2
- package/src/components/radio/QasRadio.vue +56 -10
- package/src/components/radio/QasRadio.yml +8 -1
- package/src/components/search-input/QasSearchInput.vue +14 -29
- package/src/components/select/QasSelect.vue +31 -21
- package/src/components/select-filter/QasSelectFilter.vue +33 -6
- package/src/components/select-filter/QasSelectFilter.yml +5 -0
- package/src/components/select-list/QasSelectList.vue +6 -6
- package/src/components/select-list/private/PvSelectListCheckbox.vue +1 -1
- package/src/components/table-generator/QasTableGenerator.vue +10 -5
- package/src/components/table-generator/QasTableGenerator.yml +9 -4
- package/src/components/toggle/QasToggle.vue +26 -1
- package/src/components/toggle-visibility/QasToggleVisibility.vue +15 -6
- package/src/components/tree-generator/QasTreeGenerator.vue +10 -2
- package/src/components/uploader/QasUploader.vue +7 -14
- package/src/components/uploader/private/PvUploaderGalleryCard.vue +2 -2
- package/src/composables/private/index.js +3 -2
- package/src/composables/private/use-error-message.js +28 -0
- package/src/composables/use-default-filters.js +47 -15
- package/src/css/components/field.scss +69 -2
- package/src/css/components/index.scss +1 -3
- package/src/css/components/item.scss +3 -2
- package/src/css/components/menu.scss +21 -0
- package/src/css/mixins/index.scss +1 -0
- package/src/css/mixins/set-error-message.scss +8 -0
- package/src/css/plugins/notify.scss +37 -37
- package/src/css/variables/scrollbar.scss +1 -1
- package/src/enums/Status.js +3 -3
- package/src/helpers/colors.js +137 -0
- package/src/helpers/index.js +1 -0
- package/src/helpers/set-scroll-gradient.js +261 -0
- package/src/plugins/notify-error/NotifyError.js +2 -1
- package/src/plugins/notify-success/NotifySuccess.js +2 -1
- package/src/vue-plugin.js +3 -3
- package/src/components/info/QasInfo.vue +0 -155
- package/src/components/info/QasInfo.yml +0 -34
- package/src/css/components/checkbox.scss +0 -14
- package/src/css/components/radio.scss +0 -18
- package/src/css/components/toggle.scss +0 -13
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<
|
|
4
|
-
{{ props.label }}
|
|
5
|
-
</div>
|
|
2
|
+
<div class="qas-radio">
|
|
3
|
+
<qas-label v-if="canShowOptionGroupLabel" :color :label="props.label" margin="sm" typography="h5" />
|
|
6
4
|
|
|
7
5
|
<component :is="component.is" v-bind="component.props" />
|
|
6
|
+
|
|
7
|
+
<qas-error-message v-if="props.errorMessage" :message="props.errorMessage" />
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script setup>
|
|
12
|
+
import useErrorMessage, { baseErrorProps } from '../../composables/private/use-error-message'
|
|
13
|
+
import useScreen from '../../composables/use-screen'
|
|
14
|
+
|
|
12
15
|
import { computed, useAttrs } from 'vue'
|
|
13
16
|
|
|
14
17
|
defineOptions({
|
|
@@ -17,17 +20,27 @@ defineOptions({
|
|
|
17
20
|
})
|
|
18
21
|
|
|
19
22
|
const props = defineProps({
|
|
23
|
+
...baseErrorProps,
|
|
24
|
+
|
|
20
25
|
label: {
|
|
21
26
|
default: '',
|
|
22
27
|
type: String
|
|
23
28
|
}
|
|
24
29
|
})
|
|
25
30
|
|
|
31
|
+
// globals
|
|
26
32
|
const attrs = useAttrs()
|
|
27
33
|
|
|
34
|
+
// composables
|
|
35
|
+
const { color } = useErrorMessage(props)
|
|
36
|
+
const screen = useScreen()
|
|
37
|
+
|
|
38
|
+
// computeds
|
|
28
39
|
const isOptionGroup = computed(() => !!attrs.options?.length)
|
|
29
40
|
|
|
30
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Só mostra a label caso for q-option-group e tenha label vindo nas props
|
|
43
|
+
*/
|
|
31
44
|
const canShowOptionGroupLabel = computed(() => isOptionGroup.value && !!props.label)
|
|
32
45
|
|
|
33
46
|
/**
|
|
@@ -37,21 +50,23 @@ const canShowOptionGroupLabel = computed(() => isOptionGroup.value && !!props.la
|
|
|
37
50
|
* - todos os casos é usado o dense.
|
|
38
51
|
*/
|
|
39
52
|
const component = computed(() => {
|
|
40
|
-
const
|
|
53
|
+
const isInline = !screen.isSmall
|
|
54
|
+
|
|
55
|
+
const { ...payloadProps } = attrs
|
|
41
56
|
|
|
42
57
|
return {
|
|
43
58
|
is: isOptionGroup.value ? 'q-option-group' : 'q-radio',
|
|
44
59
|
|
|
45
60
|
props: {
|
|
46
61
|
...payloadProps,
|
|
47
|
-
|
|
48
62
|
label: props.label,
|
|
49
63
|
|
|
50
64
|
...(isOptionGroup.value && {
|
|
51
|
-
inline,
|
|
65
|
+
inline: isInline,
|
|
52
66
|
class: {
|
|
53
|
-
|
|
54
|
-
'q-gutter-
|
|
67
|
+
flex: true,
|
|
68
|
+
'q-gutter-md': true,
|
|
69
|
+
column: !isInline
|
|
55
70
|
}
|
|
56
71
|
}),
|
|
57
72
|
|
|
@@ -60,3 +75,34 @@ const component = computed(() => {
|
|
|
60
75
|
}
|
|
61
76
|
})
|
|
62
77
|
</script>
|
|
78
|
+
|
|
79
|
+
<style lang="scss">
|
|
80
|
+
.qas-radio {
|
|
81
|
+
.q-radio {
|
|
82
|
+
&__label {
|
|
83
|
+
@include set-typography($body1);
|
|
84
|
+
|
|
85
|
+
padding-left: var(--qas-spacing-sm) !important;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&__inner {
|
|
89
|
+
width: 18px;
|
|
90
|
+
height: 18px;
|
|
91
|
+
min-width: 18px;
|
|
92
|
+
|
|
93
|
+
&::before {
|
|
94
|
+
color: $primary;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&.disabled {
|
|
99
|
+
opacity: 1 !important;
|
|
100
|
+
|
|
101
|
+
.q-radio__label,
|
|
102
|
+
.q-radio__inner {
|
|
103
|
+
color: $grey-6;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
type: component
|
|
2
2
|
|
|
3
3
|
props:
|
|
4
|
+
error:
|
|
5
|
+
desc: Booleano que caso seja true a label passa a ter a cor vermelha.
|
|
6
|
+
type: Boolean
|
|
7
|
+
|
|
8
|
+
error-message:
|
|
9
|
+
desc: Mensagem de erro exibida na parte inferior do checkbox.
|
|
10
|
+
type: String
|
|
11
|
+
|
|
4
12
|
label:
|
|
5
13
|
desc: Label utilizada em casos de ser q-option-group.
|
|
6
14
|
default: ''
|
|
@@ -8,4 +16,3 @@ props:
|
|
|
8
16
|
|
|
9
17
|
meta:
|
|
10
18
|
desc: Componente wrapper do QRadio.
|
|
11
|
-
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<q-icon v-if="useSearchOnType" color="grey-8" name="sym_r_search" />
|
|
2
|
+
<qas-input ref="input" v-model="model" class="qas-search-input" :class="classes" v-bind="$attrs" data-cy="search-input" :debounce hide-bottom-space input-class="ellipsis text-grey-8" inputmode="search" outlined type="search">
|
|
3
|
+
<template #prepend>
|
|
4
|
+
<q-icon v-if="useSearchOnType" color="grey-8" name="sym_r_search" />
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
<qas-btn v-else color="grey-10" icon="sym_r_search" variant="tertiary" @click="$emit('filter')" />
|
|
7
|
+
</template>
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
<template #append>
|
|
10
|
+
<qas-btn v-if="hasSearch" color="grey-10" icon="sym_r_clear" variant="tertiary" @click="clear" />
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</component>
|
|
12
|
+
<slot name="after-clear" />
|
|
13
|
+
</template>
|
|
14
|
+
</qas-input>
|
|
17
15
|
</template>
|
|
18
16
|
|
|
19
17
|
<script>
|
|
@@ -51,20 +49,15 @@ export default {
|
|
|
51
49
|
],
|
|
52
50
|
|
|
53
51
|
computed: {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
52
|
+
classes () {
|
|
53
|
+
const bordered = this.isBox || this.isDialog
|
|
57
54
|
|
|
58
|
-
containerClasses () {
|
|
59
55
|
return {
|
|
60
|
-
|
|
56
|
+
'qas-search-input--border': bordered,
|
|
57
|
+
'qas-search-input--shadow': !bordered
|
|
61
58
|
}
|
|
62
59
|
},
|
|
63
60
|
|
|
64
|
-
isBoxOrDialog () {
|
|
65
|
-
return this.isBox || this.isDialog
|
|
66
|
-
},
|
|
67
|
-
|
|
68
61
|
debounce () {
|
|
69
62
|
return this.useDebounce ? '1200' : ''
|
|
70
63
|
},
|
|
@@ -96,11 +89,3 @@ export default {
|
|
|
96
89
|
}
|
|
97
90
|
}
|
|
98
91
|
</script>
|
|
99
|
-
|
|
100
|
-
<style lang="scss">
|
|
101
|
-
.qas-search-input {
|
|
102
|
-
.qas-search-input__input .q-field__control:before {
|
|
103
|
-
border: 0;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
</style>
|
|
@@ -160,6 +160,8 @@ export default {
|
|
|
160
160
|
|
|
161
161
|
computed: {
|
|
162
162
|
attributes () {
|
|
163
|
+
const { useChips, ...attrs } = this.$attrs
|
|
164
|
+
|
|
163
165
|
return {
|
|
164
166
|
clearable: this.isSearchable,
|
|
165
167
|
emitValue: true,
|
|
@@ -171,7 +173,7 @@ export default {
|
|
|
171
173
|
popupContentClass: `qas-select__menu ${this.popupContentClass}`,
|
|
172
174
|
useChips: this.isMultiple && this.isPopupContentOpen,
|
|
173
175
|
|
|
174
|
-
...
|
|
176
|
+
...attrs,
|
|
175
177
|
|
|
176
178
|
label: this.formattedLabel,
|
|
177
179
|
error: this.hasError,
|
|
@@ -202,10 +204,6 @@ export default {
|
|
|
202
204
|
return this.hasFuse || this.useLazyLoading
|
|
203
205
|
},
|
|
204
206
|
|
|
205
|
-
isBordered () {
|
|
206
|
-
return (this.isBox || this.isDialog) && this.useFilterMode
|
|
207
|
-
},
|
|
208
|
-
|
|
209
207
|
hasError () {
|
|
210
208
|
return this.mx_hasFetchError || this.$attrs.error
|
|
211
209
|
},
|
|
@@ -261,11 +259,14 @@ export default {
|
|
|
261
259
|
|
|
262
260
|
// redesign
|
|
263
261
|
componentClasses () {
|
|
262
|
+
const isBordered = (this.isBox || this.isDialog) && this.useFilterMode
|
|
263
|
+
|
|
264
|
+
// estilos definidos no arquivo field.scss
|
|
264
265
|
return {
|
|
265
266
|
...(this.useFilterMode && {
|
|
266
|
-
'qas-select--filter
|
|
267
|
-
'
|
|
268
|
-
|
|
267
|
+
'qas-select--filter': true,
|
|
268
|
+
'qas-select--filter-border': isBordered,
|
|
269
|
+
'qas-select--filter-shadow': !isBordered
|
|
269
270
|
}),
|
|
270
271
|
|
|
271
272
|
'qas-select--has-icon': this.hasAppend || this.hasIcon,
|
|
@@ -470,15 +471,17 @@ export default {
|
|
|
470
471
|
}
|
|
471
472
|
}
|
|
472
473
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
474
|
+
&__menu {
|
|
475
|
+
padding: var(--qas-spacing-sm) var(--qas-spacing-md);
|
|
476
|
+
|
|
477
|
+
.q-item + .q-item {
|
|
478
|
+
border-top: 1px solid $grey-4 !important;
|
|
476
479
|
}
|
|
477
|
-
}
|
|
478
480
|
|
|
479
|
-
&__menu {
|
|
480
481
|
.q-item {
|
|
481
482
|
font-weight: 400 !important;
|
|
483
|
+
padding-left: 0;
|
|
484
|
+
padding-right: 0;
|
|
482
485
|
}
|
|
483
486
|
}
|
|
484
487
|
|
|
@@ -503,19 +506,26 @@ export default {
|
|
|
503
506
|
|
|
504
507
|
.q-field__prepend,
|
|
505
508
|
.q-field__append {
|
|
506
|
-
.q-icon {
|
|
509
|
+
.q-icon:not(button) {
|
|
507
510
|
color: $grey-8;
|
|
508
511
|
}
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
.q-field__focusable-action {
|
|
512
|
-
opacity: 1;
|
|
513
|
-
}
|
|
514
512
|
|
|
515
|
-
|
|
516
|
-
|
|
513
|
+
button.q-icon {
|
|
514
|
+
@include set-button(
|
|
515
|
+
tertiary,
|
|
516
|
+
false,
|
|
517
|
+
false,
|
|
518
|
+
grey-10
|
|
519
|
+
);
|
|
520
|
+
|
|
521
|
+
// necessários para sobrescrever os tamanhos aplicados pelo set-button
|
|
522
|
+
width: 18px !important;
|
|
523
|
+
height: 18px !important;
|
|
524
|
+
min-height: 18px !important;
|
|
525
|
+
}
|
|
517
526
|
}
|
|
518
527
|
|
|
528
|
+
.q-field__focusable-action,
|
|
519
529
|
.q-chip__icon--remove {
|
|
520
530
|
opacity: 1;
|
|
521
531
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<qas-select v-model="internalModel" :label="props.label" :options="props.options" use-filter-mode @update:model-value="onUpdateModel" />
|
|
2
|
+
<qas-select v-model="internalModel" :label="props.label" :multiple="props.multiple" :options="props.options" use-filter-mode @update:model-value="onUpdateModel" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
@@ -25,22 +25,26 @@ const props = defineProps({
|
|
|
25
25
|
options: {
|
|
26
26
|
type: Array,
|
|
27
27
|
default: () => []
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
multiple: {
|
|
31
|
+
type: Boolean
|
|
28
32
|
}
|
|
29
33
|
})
|
|
30
34
|
|
|
35
|
+
// models
|
|
36
|
+
const model = defineModel({ type: [String, Array], default: '' })
|
|
37
|
+
|
|
31
38
|
// composables
|
|
32
39
|
const router = useRouter()
|
|
33
40
|
const route = useRoute()
|
|
34
41
|
const { setFilterQuery, triggerDefaultFiltersChange, filterQuery } = useDefaultFilters()
|
|
35
42
|
|
|
36
|
-
// models
|
|
37
|
-
const model = defineModel({ type: String, default: '' })
|
|
38
|
-
|
|
39
43
|
// refs
|
|
40
|
-
const internalModel = ref(
|
|
44
|
+
const internalModel = ref(getDefaultInternalFilters())
|
|
41
45
|
|
|
42
46
|
// watch
|
|
43
|
-
watch(() => route.query[props.name],
|
|
47
|
+
watch(() => route.query[props.name], onQueryChange, { immediate: true })
|
|
44
48
|
|
|
45
49
|
// functions
|
|
46
50
|
/**
|
|
@@ -62,4 +66,27 @@ function setModels (value) {
|
|
|
62
66
|
setFilterQuery(value, props.name)
|
|
63
67
|
nextTick(() => triggerDefaultFiltersChange(filterQuery.value, oldFilters))
|
|
64
68
|
}
|
|
69
|
+
|
|
70
|
+
function getDefaultInternalFilters () {
|
|
71
|
+
return getNormalizedQuery(route.query[props.name]) || model.value
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Retorna o valor da query normalizado, se for multiple retorna um array, se não retorna o valor.
|
|
76
|
+
*/
|
|
77
|
+
function getNormalizedQuery (query) {
|
|
78
|
+
if (!query) return
|
|
79
|
+
|
|
80
|
+
if (props.multiple) {
|
|
81
|
+
return Array.isArray(query) ? query : [query]
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return query
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function onQueryChange (query) {
|
|
88
|
+
const normalizedQuery = getNormalizedQuery(query)
|
|
89
|
+
|
|
90
|
+
setModels(normalizedQuery)
|
|
91
|
+
}
|
|
65
92
|
</script>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<qas-search-box ref="searchBox" v-model:results="results" v-bind="defaultSearchBoxProps" :list="sortedList">
|
|
3
3
|
<template #after-search>
|
|
4
|
-
<div class="q-
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
<qas-btn :disable="isClearSelectionDisabled" label="Limpar seleção" variant="tertiary" @click="clearSelection" />
|
|
4
|
+
<div class="q-my-md">
|
|
5
|
+
<qas-btn color="grey-10" :disable="isClearSelectionDisabled" icon="sym_r_close" label="Limpar seleção" variant="tertiary" @click="clearSelection" />
|
|
8
6
|
</div>
|
|
9
7
|
</template>
|
|
10
8
|
|
|
11
9
|
<template #default>
|
|
12
|
-
<q-list class="bg-white rounded-borders" separator>
|
|
10
|
+
<q-list class="bg-white q-py-sm rounded-borders" separator>
|
|
13
11
|
<q-item v-for="result in results" :key="result.value" class="q-px-none" tag="label">
|
|
14
12
|
<slot v-bind="slotData" :item="result" name="item">
|
|
15
13
|
<q-item-section>
|
|
16
|
-
<
|
|
14
|
+
<q-item-label>
|
|
15
|
+
<pv-select-list-checkbox :readonly="readonly" :result="result" :use-active="hasValueInModel(result.value)" @add="add" @remove="remove" />
|
|
16
|
+
</q-item-label>
|
|
17
17
|
</q-item-section>
|
|
18
18
|
</slot>
|
|
19
19
|
</q-item>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<qas-checkbox dense :disable="props.readonly" :label="props.result.label" :model-value="props.useActive" @update:model-value="onUpdateModelValue(result)" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
@@ -52,6 +52,11 @@ export default {
|
|
|
52
52
|
type: Object
|
|
53
53
|
},
|
|
54
54
|
|
|
55
|
+
maxHeight: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: '528px'
|
|
58
|
+
},
|
|
59
|
+
|
|
55
60
|
results: {
|
|
56
61
|
default: () => [],
|
|
57
62
|
required: true,
|
|
@@ -86,9 +91,8 @@ export default {
|
|
|
86
91
|
type: Boolean
|
|
87
92
|
},
|
|
88
93
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
type: String
|
|
94
|
+
useVirtualScroll: {
|
|
95
|
+
type: Boolean
|
|
92
96
|
}
|
|
93
97
|
},
|
|
94
98
|
|
|
@@ -139,7 +143,7 @@ export default {
|
|
|
139
143
|
attributes () {
|
|
140
144
|
const attributes = {
|
|
141
145
|
tableClass: {
|
|
142
|
-
'overflow-hidden-y': !this.useStickyHeader
|
|
146
|
+
'overflow-hidden-y': !this.useStickyHeader && !this.useVirtualScroll
|
|
143
147
|
},
|
|
144
148
|
class: this.tableClass,
|
|
145
149
|
columns: this.columnsByFields,
|
|
@@ -149,6 +153,7 @@ export default {
|
|
|
149
153
|
rowKey: this.rowKey,
|
|
150
154
|
rows: this.resultsByFields,
|
|
151
155
|
style: this.tableStyle,
|
|
156
|
+
virtualScroll: this.useVirtualScroll,
|
|
152
157
|
|
|
153
158
|
// Eventos.
|
|
154
159
|
onRowClick: this.$attrs.onRowClick && this.onRowClick
|
|
@@ -234,7 +239,7 @@ export default {
|
|
|
234
239
|
|
|
235
240
|
tableStyle () {
|
|
236
241
|
return {
|
|
237
|
-
|
|
242
|
+
...((this.useStickyHeader || this.useVirtualScroll) && { maxHeight: this.maxHeight })
|
|
238
243
|
}
|
|
239
244
|
},
|
|
240
245
|
|
|
@@ -26,6 +26,11 @@ props:
|
|
|
26
26
|
type: Object
|
|
27
27
|
examples: ["{ description: 'Descrição', labelProps: { label: 'Titulo do header'} }"]
|
|
28
28
|
|
|
29
|
+
max-height:
|
|
30
|
+
desc: Usado para definir a altura máxima da tabela e exibir o scroll vertical. Somente funciona quando a propriedade "use-sticky-header" ou "use-virtual-scroll" é utilizada.
|
|
31
|
+
default: '528px'
|
|
32
|
+
type: String
|
|
33
|
+
|
|
29
34
|
results:
|
|
30
35
|
desc: Lista com resultados para serem mostrados na tabela.
|
|
31
36
|
default: {}
|
|
@@ -62,10 +67,10 @@ props:
|
|
|
62
67
|
default: false
|
|
63
68
|
type: Boolean
|
|
64
69
|
|
|
65
|
-
|
|
66
|
-
desc: Usado para
|
|
67
|
-
default:
|
|
68
|
-
type:
|
|
70
|
+
use-virtual-scroll:
|
|
71
|
+
desc: Usado para ativar o scroll virtual da tabela.
|
|
72
|
+
default: false
|
|
73
|
+
type: Boolean
|
|
69
74
|
|
|
70
75
|
slots:
|
|
71
76
|
body:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<q-toggle v-bind="attrs" dense />
|
|
2
|
+
<q-toggle class="qas-toggle" v-bind="attrs" dense />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script setup>
|
|
@@ -12,3 +12,28 @@ defineOptions({
|
|
|
12
12
|
|
|
13
13
|
const attrs = useAttrs()
|
|
14
14
|
</script>
|
|
15
|
+
|
|
16
|
+
<style lang="scss">
|
|
17
|
+
.qas-toggle {
|
|
18
|
+
&.q-toggle {
|
|
19
|
+
.q-toggle__label {
|
|
20
|
+
@include set-typography($body1);
|
|
21
|
+
|
|
22
|
+
padding-left: var(--qas-spacing-sm) !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.disabled {
|
|
26
|
+
opacity: 1 !important;
|
|
27
|
+
|
|
28
|
+
.q-toggle__inner,
|
|
29
|
+
.q-toggle__label {
|
|
30
|
+
color: $grey-6;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.q-toggle__thumb::after {
|
|
34
|
+
background-color: $grey-6;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="qas-toggle-visibility">
|
|
3
|
-
<div class="items-center no-wrap row" :style>
|
|
3
|
+
<div :aria-expanded="isVisible" aria-label="Alternar visibilidade do conteúdo" class="cursor-pointer items-center no-wrap qas-toggle-visibility__container row" role="button" :style @click.prevent.stop="toggleVisibility">
|
|
4
4
|
<div class="ellipsis qas-toggle-visibility__content">
|
|
5
5
|
<div
|
|
6
6
|
v-if="isVisible"
|
|
@@ -14,15 +14,12 @@
|
|
|
14
14
|
|
|
15
15
|
<q-separator
|
|
16
16
|
v-else
|
|
17
|
+
class="qas-toggle-visibility__separator"
|
|
17
18
|
size="4px"
|
|
18
19
|
/>
|
|
19
20
|
</div>
|
|
20
21
|
|
|
21
|
-
<qas-btn
|
|
22
|
-
class="q-ml-sm qas-toggle-visibility__button"
|
|
23
|
-
:icon
|
|
24
|
-
@click.prevent.stop="toggleVisibility"
|
|
25
|
-
/>
|
|
22
|
+
<qas-btn class="q-ml-sm qas-toggle-visibility__button" :icon />
|
|
26
23
|
</div>
|
|
27
24
|
</div>
|
|
28
25
|
</template>
|
|
@@ -68,6 +65,18 @@ const style = computed(() => ({ width: props.width }))
|
|
|
68
65
|
|
|
69
66
|
<style lang="scss">
|
|
70
67
|
.qas-toggle-visibility {
|
|
68
|
+
&__separator {
|
|
69
|
+
border-radius: var(--qas-generic-border-radius);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&__container:hover .qas-toggle-visibility__separator {
|
|
73
|
+
background-color: var(--q-primary-contrast);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&__container:hover .qas-toggle-visibility__button {
|
|
77
|
+
color: var(--q-primary-contrast) !important;
|
|
78
|
+
}
|
|
79
|
+
|
|
71
80
|
&__content {
|
|
72
81
|
flex-grow: 1;
|
|
73
82
|
}
|
|
@@ -17,7 +17,11 @@
|
|
|
17
17
|
<q-icon name="sym_r_add_circle_outline" />
|
|
18
18
|
</q-item-section>
|
|
19
19
|
|
|
20
|
-
<q-item-section>
|
|
20
|
+
<q-item-section>
|
|
21
|
+
<q-item-label>
|
|
22
|
+
Adicionar subnível
|
|
23
|
+
</q-item-label>
|
|
24
|
+
</q-item-section>
|
|
21
25
|
</q-item>
|
|
22
26
|
|
|
23
27
|
<q-item v-if="useEditButton" v-ripple class="qas-tree-generator__item" clickable @click="handleTreeFormDialog(node)">
|
|
@@ -25,7 +29,11 @@
|
|
|
25
29
|
<q-icon name="sym_r_edit" />
|
|
26
30
|
</q-item-section>
|
|
27
31
|
|
|
28
|
-
<q-item-section>
|
|
32
|
+
<q-item-section>
|
|
33
|
+
<q-item-label>
|
|
34
|
+
Editar
|
|
35
|
+
</q-item-label>
|
|
36
|
+
</q-item-section>
|
|
29
37
|
</q-item>
|
|
30
38
|
|
|
31
39
|
<q-item v-if="hasDestroyButton(node)" v-ripple class="qas-tree-generator__item" clickable @click="onDestroy(node)">
|
|
@@ -15,10 +15,6 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
</qas-header>
|
|
17
17
|
|
|
18
|
-
<div v-if="errorMessage" class="q-mt-xs text-caption text-negative">
|
|
19
|
-
{{ errorMessage }}
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
18
|
<!-- ------------------------------------ tags hidden -------------------------------------- -->
|
|
23
19
|
<input ref="hiddenInput" :accept="attributes.accept" class="qas-uploader__input" :multiple="isMultiple" type="file">
|
|
24
20
|
<qas-btn ref="buttonCleanFiles" class="hidden" @click="scope.removeUploadedFiles" />
|
|
@@ -33,6 +29,8 @@
|
|
|
33
29
|
</div>
|
|
34
30
|
|
|
35
31
|
<qas-empty-result-text v-else />
|
|
32
|
+
|
|
33
|
+
<qas-error-message v-if="errorMessage" :message="errorMessage" />
|
|
36
34
|
</template>
|
|
37
35
|
</q-uploader>
|
|
38
36
|
|
|
@@ -44,9 +42,11 @@
|
|
|
44
42
|
import PvUploaderGalleryCard from './private/PvUploaderGalleryCard.vue'
|
|
45
43
|
import QasHeader from '../header/QasHeader.vue'
|
|
46
44
|
|
|
45
|
+
import { baseErrorProps } from '../../composables/private/use-error-message'
|
|
46
|
+
import { getImageSize, getResizeDimensions } from '../../helpers/images.js'
|
|
47
|
+
|
|
47
48
|
import { uid, extend } from 'quasar'
|
|
48
49
|
import { NotifyError } from '../../plugins'
|
|
49
|
-
import { getImageSize, getResizeDimensions } from '../../helpers/images.js'
|
|
50
50
|
|
|
51
51
|
import Pica from 'pica'
|
|
52
52
|
|
|
@@ -61,6 +61,8 @@ export default {
|
|
|
61
61
|
inheritAttrs: false,
|
|
62
62
|
|
|
63
63
|
props: {
|
|
64
|
+
...baseErrorProps,
|
|
65
|
+
|
|
64
66
|
addButtonFn: {
|
|
65
67
|
type: Function,
|
|
66
68
|
default: undefined
|
|
@@ -98,15 +100,6 @@ export default {
|
|
|
98
100
|
type: String
|
|
99
101
|
},
|
|
100
102
|
|
|
101
|
-
error: {
|
|
102
|
-
type: Boolean
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
errorMessage: {
|
|
106
|
-
default: '',
|
|
107
|
-
type: String
|
|
108
|
-
},
|
|
109
|
-
|
|
110
103
|
fields: {
|
|
111
104
|
default: () => ({}),
|
|
112
105
|
type: Object
|
|
@@ -219,7 +219,7 @@ export default {
|
|
|
219
219
|
}
|
|
220
220
|
},
|
|
221
221
|
|
|
222
|
-
|
|
222
|
+
...this.normalizedModelValue
|
|
223
223
|
}
|
|
224
224
|
},
|
|
225
225
|
|
|
@@ -317,7 +317,7 @@ export default {
|
|
|
317
317
|
},
|
|
318
318
|
|
|
319
319
|
url () {
|
|
320
|
-
return this.normalizedCardGalleryProps?.
|
|
320
|
+
return this.normalizedCardGalleryProps?.url
|
|
321
321
|
}
|
|
322
322
|
},
|
|
323
323
|
|