@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,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<qas-input ref="input" v-bind="attributes" v-model="currentValue" inputmode="numeric" :unmasked-value="false" @blur="validateDateTimeOnBlur" @focus="resetError" @update:model-value="updateModelValue">
|
|
3
3
|
<template #append>
|
|
4
|
-
<qas-btn v-if="!props.useTimeOnly" color="
|
|
4
|
+
<qas-btn v-if="!props.useTimeOnly" color="primary" :disable="attrs.readonly" icon="sym_r_calendar_today" variant="tertiary">
|
|
5
5
|
<q-popup-proxy ref="dateProxy" transition-hide="scale" transition-show="scale" v-bind="props.datePopupProxyProps">
|
|
6
6
|
<qas-date v-model="currentValue" v-bind="defaultDateProps" :mask="maskDate" width="290px" @update:model-value="updateModelValue" />
|
|
7
7
|
</q-popup-proxy>
|
|
8
8
|
</qas-btn>
|
|
9
9
|
|
|
10
|
-
<qas-btn v-if="!props.useDateOnly" class="q-ml-sm" color="
|
|
10
|
+
<qas-btn v-if="!props.useDateOnly" class="q-ml-sm" color="primary" :disable="attrs.readonly" icon="sym_r_access_time">
|
|
11
11
|
<q-popup-proxy ref="timeProxy" transition-hide="scale" transition-show="scale" v-bind="props.timePopupProxyProps">
|
|
12
12
|
<q-time v-model="currentValue" v-bind="defaultTimeProps" format24h :mask="maskDate" @update:model-value="updateModelValue" />
|
|
13
13
|
</q-popup-proxy>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="qas-error-message">
|
|
3
|
+
{{ props.message }}
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
defineOptions({ name: 'QasErrorMessage' })
|
|
9
|
+
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
message: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: ''
|
|
14
|
+
}
|
|
15
|
+
})
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<style lang="scss">
|
|
19
|
+
// $
|
|
20
|
+
.qas-error-message {
|
|
21
|
+
@include set-error-message;
|
|
22
|
+
}
|
|
23
|
+
</style>
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
</q-expansion-item>
|
|
37
37
|
</qas-box>
|
|
38
38
|
|
|
39
|
-
<
|
|
40
|
-
{{ props.errorMessage }}
|
|
41
|
-
</div>
|
|
39
|
+
<qas-error-message v-if="hasError" :message="props.errorMessage" />
|
|
42
40
|
</div>
|
|
43
41
|
</template>
|
|
44
42
|
|
|
45
43
|
<script setup>
|
|
46
44
|
import QasBox from '../box/QasBox.vue'
|
|
47
45
|
|
|
46
|
+
import { baseErrorProps } from '../../composables/private/use-error-message'
|
|
47
|
+
|
|
48
48
|
import { computed, provide, inject, ref, useAttrs } from 'vue'
|
|
49
49
|
|
|
50
50
|
defineOptions({
|
|
@@ -53,6 +53,8 @@ defineOptions({
|
|
|
53
53
|
})
|
|
54
54
|
|
|
55
55
|
const props = defineProps({
|
|
56
|
+
...baseErrorProps,
|
|
57
|
+
|
|
56
58
|
badges: {
|
|
57
59
|
type: Array,
|
|
58
60
|
default: () => []
|
|
@@ -66,15 +68,6 @@ const props = defineProps({
|
|
|
66
68
|
type: Boolean
|
|
67
69
|
},
|
|
68
70
|
|
|
69
|
-
error: {
|
|
70
|
-
type: Boolean
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
errorMessage: {
|
|
74
|
-
type: String,
|
|
75
|
-
default: ''
|
|
76
|
-
},
|
|
77
|
-
|
|
78
71
|
gridGeneratorProps: {
|
|
79
72
|
type: Object,
|
|
80
73
|
default: () => ({})
|
|
@@ -205,12 +198,17 @@ function setShowContent () {
|
|
|
205
198
|
}
|
|
206
199
|
|
|
207
200
|
&--error {
|
|
208
|
-
#{$root}
|
|
209
|
-
|
|
201
|
+
#{$root}__header {
|
|
202
|
+
color: $negative;
|
|
203
|
+
|
|
204
|
+
.qas-label,
|
|
205
|
+
.qas-btn {
|
|
206
|
+
color: $negative !important;
|
|
207
|
+
}
|
|
210
208
|
}
|
|
211
209
|
|
|
212
|
-
#{$root}
|
|
213
|
-
|
|
210
|
+
#{$root}__box {
|
|
211
|
+
border: 1px solid $negative !important;
|
|
214
212
|
}
|
|
215
213
|
}
|
|
216
214
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section class="qas-filters" :class="filtersClasses">
|
|
3
|
-
<div v-if="showFilters" class="
|
|
4
|
-
<div v-if="showSearch" class="col-12
|
|
3
|
+
<div v-if="showFilters" class="row">
|
|
4
|
+
<div v-if="showSearch" class="col-12" :class="searchContainerClasses">
|
|
5
5
|
<slot :filter="filter" name="search">
|
|
6
6
|
<q-form v-if="useSearch" @submit.prevent="filter()">
|
|
7
7
|
<qas-search-input v-model="internalSearch" :placeholder="searchPlaceholder" :use-search-on-type="useSearchOnType" @clear="clearSearch" @filter="filter()" @update:model-value="onSearch">
|
|
@@ -20,10 +20,6 @@
|
|
|
20
20
|
<pv-filters-button v-if="useFilterButton" ref="filtersButton" v-model="internalFilters" v-bind="filterButtonProps" />
|
|
21
21
|
</slot>
|
|
22
22
|
</div>
|
|
23
|
-
|
|
24
|
-
<div class="col-12 col-md-6">
|
|
25
|
-
<slot name="right-side" />
|
|
26
|
-
</div>
|
|
27
23
|
</div>
|
|
28
24
|
|
|
29
25
|
<div v-if="hasChip" class="q-mt-md">
|
|
@@ -59,56 +55,60 @@ export default {
|
|
|
59
55
|
mixins: [contextMixin],
|
|
60
56
|
|
|
61
57
|
props: {
|
|
62
|
-
useChip: {
|
|
63
|
-
default: true,
|
|
64
|
-
type: Boolean
|
|
65
|
-
},
|
|
66
|
-
|
|
67
58
|
entity: {
|
|
68
59
|
required: true,
|
|
69
60
|
type: String
|
|
70
61
|
},
|
|
71
62
|
|
|
72
|
-
|
|
63
|
+
filters: {
|
|
73
64
|
default: () => ({}),
|
|
74
65
|
type: Object
|
|
75
66
|
},
|
|
76
67
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
68
|
+
listenerQueryKeys: {
|
|
69
|
+
type: Array,
|
|
70
|
+
default: () => []
|
|
80
71
|
},
|
|
81
72
|
|
|
82
|
-
|
|
73
|
+
searchPlaceholder: {
|
|
74
|
+
default: 'Pesquisar...',
|
|
75
|
+
type: String
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
url: {
|
|
79
|
+
default: '',
|
|
80
|
+
type: String
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
useChip: {
|
|
83
84
|
default: true,
|
|
84
85
|
type: Boolean
|
|
85
86
|
},
|
|
86
87
|
|
|
87
|
-
|
|
88
|
+
useFilterButton: {
|
|
88
89
|
default: true,
|
|
89
90
|
type: Boolean
|
|
90
91
|
},
|
|
91
92
|
|
|
92
|
-
|
|
93
|
-
default: true,
|
|
93
|
+
useForceRefetch: {
|
|
94
94
|
type: Boolean
|
|
95
95
|
},
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
type: String
|
|
97
|
+
useFullContent: {
|
|
98
|
+
type: Boolean
|
|
100
99
|
},
|
|
101
100
|
|
|
102
|
-
|
|
103
|
-
default:
|
|
104
|
-
type:
|
|
101
|
+
useSpacing: {
|
|
102
|
+
default: true,
|
|
103
|
+
type: Boolean
|
|
105
104
|
},
|
|
106
105
|
|
|
107
|
-
|
|
106
|
+
useSearch: {
|
|
107
|
+
default: true,
|
|
108
108
|
type: Boolean
|
|
109
109
|
},
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
useSearchOnType: {
|
|
112
112
|
default: true,
|
|
113
113
|
type: Boolean
|
|
114
114
|
},
|
|
@@ -116,6 +116,11 @@ export default {
|
|
|
116
116
|
useUpdateRoute: {
|
|
117
117
|
default: true,
|
|
118
118
|
type: Boolean
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
fieldsProps: {
|
|
122
|
+
default: () => ({}),
|
|
123
|
+
type: Object
|
|
119
124
|
}
|
|
120
125
|
},
|
|
121
126
|
|
|
@@ -200,6 +205,10 @@ export default {
|
|
|
200
205
|
return formattedFieldsProps
|
|
201
206
|
},
|
|
202
207
|
|
|
208
|
+
searchContainerClasses () {
|
|
209
|
+
return { 'col-md-6': !this.useFullContent }
|
|
210
|
+
},
|
|
211
|
+
|
|
203
212
|
fields () {
|
|
204
213
|
return getState.call(this, { entity: this.entity, key: 'filters' })
|
|
205
214
|
},
|
|
@@ -265,7 +274,13 @@ export default {
|
|
|
265
274
|
watch: {
|
|
266
275
|
$route (to, from) {
|
|
267
276
|
if (to.name === from.name) {
|
|
268
|
-
|
|
277
|
+
/**
|
|
278
|
+
* Verifica se alguma chave da query que está no "listenerQueryKeys" mudou,
|
|
279
|
+
* se sim, faz bate o fetchFilters novamente.
|
|
280
|
+
*/
|
|
281
|
+
const hasQueryChanged = !!this.listenerQueryKeys.find(queryKey => to.query[queryKey] !== from.query[queryKey])
|
|
282
|
+
|
|
283
|
+
this.fetchFilters({ hasQueryChanged })
|
|
269
284
|
this.useUpdateRoute && this.updateValues()
|
|
270
285
|
}
|
|
271
286
|
},
|
|
@@ -328,8 +343,14 @@ export default {
|
|
|
328
343
|
this.filter()
|
|
329
344
|
},
|
|
330
345
|
|
|
331
|
-
async fetchFilters () {
|
|
332
|
-
|
|
346
|
+
async fetchFilters ({ hasQueryChanged = false } = {}) {
|
|
347
|
+
/**
|
|
348
|
+
* - Verifica se houve mudança na query com base na prop "listenerQueryKeys"
|
|
349
|
+
* - Verifica se a prop "useForceRefetch" foi passada para fazer o fetch mesmo já contendo dados na store.
|
|
350
|
+
* - Verifica se tem fields(ou seja, já foi feito o fetch antes), ou se a prop "useFilterButton" foi passada como
|
|
351
|
+
* "false", não contendo o menu lateral.
|
|
352
|
+
*/
|
|
353
|
+
if (!hasQueryChanged && !this.useForceRefetch && (this.hasFields || !this.useFilterButton)) {
|
|
333
354
|
return null
|
|
334
355
|
}
|
|
335
356
|
|
|
@@ -29,6 +29,11 @@ props:
|
|
|
29
29
|
type: Object
|
|
30
30
|
examples: [v-model:filters="filters"]
|
|
31
31
|
|
|
32
|
+
listener-query-keys:
|
|
33
|
+
desc: Chaves da query que serão ouvidas as mudanças de valores, para fazer a busca do "/filters" novamente.
|
|
34
|
+
default: []
|
|
35
|
+
type: Array
|
|
36
|
+
|
|
32
37
|
search-placeholder:
|
|
33
38
|
desc: Placeholder do campo de busca.
|
|
34
39
|
default: Pesquisar...
|
|
@@ -52,6 +57,10 @@ props:
|
|
|
52
57
|
desc: Força refazer o "fetch" mesmo caso já exista dados na store de filters.
|
|
53
58
|
type: Boolean
|
|
54
59
|
|
|
60
|
+
use-full-content:
|
|
61
|
+
desc: Para que o componente ocupe 100%, recomendado para quando precisar utilizar grids.
|
|
62
|
+
type: Boolean
|
|
63
|
+
|
|
55
64
|
use-update-route:
|
|
56
65
|
desc: Habilita ou não a atualização da rota com base nos filtros.
|
|
57
66
|
default: true
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</div>
|
|
16
16
|
</slot>
|
|
17
17
|
|
|
18
|
-
<pv-gallery-carousel-dialog v-model="carouselDialog" v-model:
|
|
18
|
+
<pv-gallery-carousel-dialog v-model="carouselDialog" v-model:image-index="imageIndex" :images="normalizedImages" />
|
|
19
19
|
|
|
20
20
|
<pv-gallery-delete-dialog v-model="showDeleteDialog" v-bind="deleteGalleryDialogProps" @cancel="resetCurrentModel" @error="onDeleteError" @success="onDeleteSuccess" />
|
|
21
21
|
</div>
|
|
@@ -157,9 +157,8 @@ function getActionsMenuProps ({ image, index }) {
|
|
|
157
157
|
function getGalleryCardProps ({ image, index }) {
|
|
158
158
|
return {
|
|
159
159
|
actionsMenuProps: getActionsMenuProps({ image, index }),
|
|
160
|
-
card: image,
|
|
161
160
|
imageProps: getImageProps({ image, index }),
|
|
162
|
-
|
|
161
|
+
...image,
|
|
163
162
|
...props.galleryCardProps
|
|
164
163
|
}
|
|
165
164
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
<header class="flat items-center no-wrap row" :class="headerClasses">
|
|
4
4
|
<slot name="header">
|
|
5
5
|
<div class="ellipsis q-mr-xs qas-gallery__name text-subtitle1">
|
|
6
|
-
<slot v-if="props.
|
|
7
|
-
{{
|
|
6
|
+
<slot v-if="props.name" name="name">
|
|
7
|
+
{{ name }}
|
|
8
8
|
</slot>
|
|
9
9
|
</div>
|
|
10
10
|
|
|
@@ -16,9 +16,15 @@
|
|
|
16
16
|
</slot>
|
|
17
17
|
</header>
|
|
18
18
|
|
|
19
|
-
<div
|
|
19
|
+
<div v-if="props.useVideo">
|
|
20
|
+
<slot name="video">
|
|
21
|
+
<q-video v-bind="defaultVideoProps" />
|
|
22
|
+
</slot>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div v-else class="qas-gallery-card__image">
|
|
20
26
|
<slot name="image">
|
|
21
|
-
<q-img class="rounded-borders" height="100%" :src="props.
|
|
27
|
+
<q-img class="rounded-borders" height="100%" :src="props.url" v-bind="props.imageProps">
|
|
22
28
|
<template #error>
|
|
23
29
|
<div :class="errorClasses">
|
|
24
30
|
<div class="text-center">
|
|
@@ -59,11 +65,6 @@ const props = defineProps({
|
|
|
59
65
|
default: () => ({})
|
|
60
66
|
},
|
|
61
67
|
|
|
62
|
-
card: {
|
|
63
|
-
type: Object,
|
|
64
|
-
default: () => ({})
|
|
65
|
-
},
|
|
66
|
-
|
|
67
68
|
disable: {
|
|
68
69
|
type: Boolean
|
|
69
70
|
},
|
|
@@ -86,6 +87,25 @@ const props = defineProps({
|
|
|
86
87
|
imageProps: {
|
|
87
88
|
type: Object,
|
|
88
89
|
default: () => ({})
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
name: {
|
|
93
|
+
type: String,
|
|
94
|
+
default: ''
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
url: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: ''
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
useVideo: {
|
|
103
|
+
type: Boolean
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
videoProps: {
|
|
107
|
+
type: Object,
|
|
108
|
+
default: () => ({})
|
|
89
109
|
}
|
|
90
110
|
})
|
|
91
111
|
|
|
@@ -109,6 +129,7 @@ const errorClasses = [
|
|
|
109
129
|
'text-subtitle2'
|
|
110
130
|
]
|
|
111
131
|
|
|
132
|
+
// computeds
|
|
112
133
|
const classes = computed(() => {
|
|
113
134
|
return {
|
|
114
135
|
'text-grey-6': props.disable
|
|
@@ -117,10 +138,10 @@ const classes = computed(() => {
|
|
|
117
138
|
|
|
118
139
|
const headerClasses = computed(() => {
|
|
119
140
|
return {
|
|
120
|
-
'justify-between': props.
|
|
121
|
-
'justify-right': !props.
|
|
141
|
+
'justify-between': props.name,
|
|
142
|
+
'justify-right': !props.name,
|
|
122
143
|
'text-grey-10': !props.disable,
|
|
123
|
-
'q-mb-md': hasActions.value || props.
|
|
144
|
+
'q-mb-md': hasActions.value || props.name
|
|
124
145
|
}
|
|
125
146
|
})
|
|
126
147
|
|
|
@@ -138,6 +159,16 @@ const defaultActionsMenuProps = computed(() => {
|
|
|
138
159
|
}
|
|
139
160
|
})
|
|
140
161
|
|
|
162
|
+
const defaultVideoProps = computed(() => {
|
|
163
|
+
return {
|
|
164
|
+
ratio: 16 / 9,
|
|
165
|
+
|
|
166
|
+
...props.videoProps,
|
|
167
|
+
|
|
168
|
+
src: props.url
|
|
169
|
+
}
|
|
170
|
+
})
|
|
171
|
+
|
|
141
172
|
const hasActionsSlot = computed(() => !!slots.actions)
|
|
142
173
|
const hasActions = computed(() => !!Object.keys(props.actionsMenuProps).length || hasActionsSlot.value)
|
|
143
174
|
const hasGridGenerator = computed(() => !!Object.keys(props.gridGeneratorProps).length)
|
|
@@ -19,12 +19,6 @@ props:
|
|
|
19
19
|
default: ''
|
|
20
20
|
type: String
|
|
21
21
|
|
|
22
|
-
card:
|
|
23
|
-
desc: Informações do card, como name (nome) e url.
|
|
24
|
-
default: {}
|
|
25
|
-
type: Object
|
|
26
|
-
examples: ["{ name: 'meu nome', url: 'minha-url-da-imagem' }"]
|
|
27
|
-
|
|
28
22
|
disable:
|
|
29
23
|
desc: Propriedade que aplica estilos de desabilitado.
|
|
30
24
|
type: Boolean
|
|
@@ -38,6 +32,25 @@ props:
|
|
|
38
32
|
default: {}
|
|
39
33
|
type: Object
|
|
40
34
|
|
|
35
|
+
name:
|
|
36
|
+
desc: Nome da imagem ou video que servirá como título.
|
|
37
|
+
default: ''
|
|
38
|
+
type: String
|
|
39
|
+
|
|
40
|
+
url:
|
|
41
|
+
desc: URL da imagem ou video.
|
|
42
|
+
default: ''
|
|
43
|
+
type: String
|
|
44
|
+
|
|
45
|
+
use-video:
|
|
46
|
+
desc: Controla se vai exibir o QVideo no lugar do QImg.
|
|
47
|
+
type: Boolean
|
|
48
|
+
|
|
49
|
+
video-props:
|
|
50
|
+
desc: Propriedades repassadas para o QVideo.
|
|
51
|
+
default: {}
|
|
52
|
+
type: Object
|
|
53
|
+
|
|
41
54
|
slots:
|
|
42
55
|
actions:
|
|
43
56
|
desc: Slot para ações do cabeçalho.
|
|
@@ -59,3 +72,6 @@ slots:
|
|
|
59
72
|
|
|
60
73
|
name:
|
|
61
74
|
desc: Slot para acessar o conteúdo do nome, acima da imagem.
|
|
75
|
+
|
|
76
|
+
video:
|
|
77
|
+
desc: Slot para acessar o conteúdo do video (onde fica o QasGridGenerator).
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<q-input ref="input" v-model="model" :autogrow="isTextarea" bottom-slots :class="classes" :counter="hasCounter" :dense="dense" :error="errorData" v-bind="$attrs" :error-message="errorMessage" :inputmode="defaultInputmode" :label="formattedLabel" :mask="currentMask" no-error-icon :outlined="outlined" :placeholder="placeholder" :unmasked-value="unmaskedValue" @paste="onPaste">
|
|
3
|
-
<template v-if="icon" #
|
|
3
|
+
<template v-if="icon" #prepend>
|
|
4
4
|
<q-icon :name="icon" size="xs" />
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
|
-
<template v-if="iconRight" #
|
|
7
|
+
<template v-if="iconRight" #append>
|
|
8
8
|
<q-icon :name="iconRight" size="xs" />
|
|
9
9
|
</template>
|
|
10
10
|
|
|
@@ -163,7 +163,7 @@ export default {
|
|
|
163
163
|
},
|
|
164
164
|
|
|
165
165
|
hasPrepend () {
|
|
166
|
-
return !!this.$slots.prepend || this.
|
|
166
|
+
return !!this.$slots.prepend || this.icon
|
|
167
167
|
}
|
|
168
168
|
},
|
|
169
169
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<slot v-if="mx_canShowFetchErrorSlot" name="fetch-error" />
|
|
23
23
|
|
|
24
24
|
<slot v-else name="empty-results">
|
|
25
|
-
<qas-empty-result-text />
|
|
25
|
+
<qas-empty-result-text :text="emptyResultText" />
|
|
26
26
|
</slot>
|
|
27
27
|
</div>
|
|
28
28
|
|
|
@@ -69,6 +69,11 @@ export default {
|
|
|
69
69
|
},
|
|
70
70
|
|
|
71
71
|
props: {
|
|
72
|
+
emptyResultText: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: undefined
|
|
75
|
+
},
|
|
76
|
+
|
|
72
77
|
filtersProps: {
|
|
73
78
|
default: () => ({}),
|
|
74
79
|
type: Object
|
|
@@ -10,6 +10,11 @@ props:
|
|
|
10
10
|
type: Function
|
|
11
11
|
examples: ['beforeFetch({ payload, resolve, done })']
|
|
12
12
|
|
|
13
|
+
empty-result-text:
|
|
14
|
+
desc: Texto a ser exibido quando a listagem estiver vazia. Caso não seja passado nada, irá utilizar o default do QasEmptyResultText.
|
|
15
|
+
default: undefined
|
|
16
|
+
type: String
|
|
17
|
+
|
|
13
18
|
entity:
|
|
14
19
|
desc: Entidade da store, por exemplo se tiver que trabalhar com modulo de usuários, teremos o model "users" na store, que vai ser nossa "entity".
|
|
15
20
|
required: true
|
|
@@ -105,7 +105,7 @@ export default {
|
|
|
105
105
|
},
|
|
106
106
|
|
|
107
107
|
buttonDestroyProps: {
|
|
108
|
-
type: Object,
|
|
108
|
+
type: [Object, Function],
|
|
109
109
|
default: () => {
|
|
110
110
|
return {
|
|
111
111
|
color: 'grey-10',
|
|
@@ -310,6 +310,10 @@ export default {
|
|
|
310
310
|
|
|
311
311
|
formGeneratorParentClasses () {
|
|
312
312
|
return this.useInlineActions ? 'col-12 justify-between q-col-gutter-x-md row' : 'full-width'
|
|
313
|
+
},
|
|
314
|
+
|
|
315
|
+
isButtonDestroyPropsFunction () {
|
|
316
|
+
return typeof this.buttonDestroyProps === 'function'
|
|
313
317
|
}
|
|
314
318
|
},
|
|
315
319
|
|
|
@@ -356,6 +360,10 @@ export default {
|
|
|
356
360
|
getDefaultActionsMenuList (index, row) {
|
|
357
361
|
const list = {}
|
|
358
362
|
|
|
363
|
+
const destroyProps = this.isButtonDestroyPropsFunction
|
|
364
|
+
? this.buttonDestroyProps({ index, row })
|
|
365
|
+
: this.buttonDestroyProps
|
|
366
|
+
|
|
359
367
|
if (this.useDuplicate) {
|
|
360
368
|
list.duplicate = {
|
|
361
369
|
...this.buttonDuplicateProps,
|
|
@@ -365,7 +373,7 @@ export default {
|
|
|
365
373
|
|
|
366
374
|
if (this.showDestroyButton) {
|
|
367
375
|
list.destroy = {
|
|
368
|
-
...
|
|
376
|
+
...destroyProps,
|
|
369
377
|
handler: () => this.destroy(index, row)
|
|
370
378
|
}
|
|
371
379
|
}
|
|
@@ -5,7 +5,7 @@ meta:
|
|
|
5
5
|
|
|
6
6
|
props:
|
|
7
7
|
actions-menu-props:
|
|
8
|
-
desc: Repassa as propriedades para o componente QasActionsMenu. É possível passar um objeto com as propriedades ou uma função que recebe o 'index', 'row' e 'list' como parâmetro e retorna um objeto com as propriedades.
|
|
8
|
+
desc: Repassa as propriedades para o componente QasActionsMenu, APENAS quando se utilizar a prop useInlineActions. É possível passar um objeto com as propriedades ou uma função que recebe o 'index', 'row' e 'list' como parâmetro e retorna um objeto com as propriedades.
|
|
9
9
|
default: {}
|
|
10
10
|
type: [Object, Function]
|
|
11
11
|
|
|
@@ -20,10 +20,25 @@ props:
|
|
|
20
20
|
type: String
|
|
21
21
|
|
|
22
22
|
button-destroy-props:
|
|
23
|
-
desc: Props do botão de excluir linha contendo os campos.
|
|
23
|
+
desc: Props do botão de excluir linha contendo os campos, podendo ser um callback para controlar o comportamento de cada row.
|
|
24
24
|
default: "{ label: 'Excluir', icon: 'sym_r_delete', flat: true, dense: true }"
|
|
25
25
|
debugger: true
|
|
26
|
-
|
|
26
|
+
params:
|
|
27
|
+
context:
|
|
28
|
+
desc: Payload da linha (row) -> index/row.
|
|
29
|
+
type: Object
|
|
30
|
+
params:
|
|
31
|
+
index:
|
|
32
|
+
desc: Índice da linha.
|
|
33
|
+
type: Number
|
|
34
|
+
row:
|
|
35
|
+
desc: Valores contendo na linha atual.
|
|
36
|
+
type: Object
|
|
37
|
+
examples: [
|
|
38
|
+
"{ label: 'Excluir este item', icon: 'sym_r_delete' }",
|
|
39
|
+
"({ index, row }) => ({ label: 'Teste', disable: !row.status })"
|
|
40
|
+
]
|
|
41
|
+
type: [Object, Function]
|
|
27
42
|
|
|
28
43
|
button-duplicate-props:
|
|
29
44
|
desc: Props do botão de duplicar linha contendo os campos.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<template #append>
|
|
8
|
-
<qas-btn color="primary" :icon="icon" variant="tertiary" @click="toggle" />
|
|
8
|
+
<qas-btn color="primary" :disable="isButtonDisabled" :icon="icon" variant="tertiary" @click="toggle" />
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<template v-for="(_, name) in $slots" #[name]="context">
|
|
@@ -57,7 +57,11 @@ export default {
|
|
|
57
57
|
|
|
58
58
|
computed: {
|
|
59
59
|
icon () {
|
|
60
|
-
return this.toggleType ? '
|
|
60
|
+
return this.toggleType ? 'sym_r_visibility' : 'sym_r_visibility_off'
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
isButtonDisabled () {
|
|
64
|
+
return !this.model.length
|
|
61
65
|
},
|
|
62
66
|
|
|
63
67
|
model: {
|