@bildvitta/quasar-ui-asteroid 3.13.0-beta.6 → 3.13.0-beta.7
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/app-user/QasAppUser.vue +1 -2
- package/src/components/app-user/QasAppUser.yml +9 -0
- package/src/components/dialog/QasDialog.vue +6 -6
- package/src/components/dialog/QasDialog.yml +25 -0
- package/src/components/field/QasField.yml +5 -0
- package/src/components/filters/QasFilters.yml +21 -0
- package/src/components/form-view/QasFormView.vue +15 -8
- package/src/components/form-view/QasFormView.yml +12 -0
- package/src/components/gallery/QasGallery.yml +17 -0
- package/src/components/grid-generator/QasGridGenerator.yml +8 -0
- package/src/components/search-input/QasSearchInput.yml +6 -1
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<div class="ellipsis qas-app-user__menu-name">{{ userName }}</div>
|
|
18
18
|
<div class="ellipsis">{{ user.email }}</div>
|
|
19
19
|
|
|
20
|
-
<qas-select v-if="hasCompaniesSelect" v-model="companiesModel" class="q-my-md" v-bind="defaultCompanyProps" @update:model-value="setCompanies" />
|
|
20
|
+
<qas-select v-if="hasCompaniesSelect" v-model="companiesModel" class="q-my-md" v-bind="defaultCompanyProps" data-cy="app-user-companies-select" @update:model-value="setCompanies" />
|
|
21
21
|
|
|
22
22
|
<q-list class="q-mt-md">
|
|
23
23
|
<q-item v-close-popup :active="false" class="qas-app-user__menu-item" clickable :to="user.to">
|
|
@@ -103,7 +103,6 @@ export default {
|
|
|
103
103
|
computed: {
|
|
104
104
|
defaultCompanyProps () {
|
|
105
105
|
return {
|
|
106
|
-
dataCy: 'app-user-companies-select',
|
|
107
106
|
loading: this.loading,
|
|
108
107
|
|
|
109
108
|
...this.companyProps,
|
|
@@ -42,3 +42,12 @@ props:
|
|
|
42
42
|
events:
|
|
43
43
|
'@sign-out -> function()':
|
|
44
44
|
desc: Dispara quando o botão de "sair" é clicado.
|
|
45
|
+
|
|
46
|
+
selectors:
|
|
47
|
+
app-user:
|
|
48
|
+
desc: Seletor do componente.
|
|
49
|
+
examples: ['data-cy="app-user"']
|
|
50
|
+
|
|
51
|
+
app-user-companies-select:
|
|
52
|
+
desc: Seletor do select de vínculos de empresas.
|
|
53
|
+
examples: ['data-cy="app-user-companies-select"']
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<q-dialog ref="dialog" class="qas-dialog" :persistent="persistent" v-bind="dialogProps" @update:model-value="updateModelValue">
|
|
2
|
+
<q-dialog ref="dialog" class="qas-dialog" data-cy="dialog" :persistent="persistent" v-bind="dialogProps" @update:model-value="updateModelValue">
|
|
3
3
|
<div class="bg-white q-pa-lg" :style="style">
|
|
4
4
|
<header v-if="hasHeader" class="q-mb-lg">
|
|
5
5
|
<slot name="header">
|
|
6
6
|
<div class="items-center justify-between row">
|
|
7
|
-
<h5 class="text-grey-9 text-h5">{{ card.title }}</h5>
|
|
7
|
+
<h5 class="text-grey-9 text-h5" data-cy="dialog-title">{{ card.title }}</h5>
|
|
8
8
|
|
|
9
|
-
<qas-btn v-if="isInfoDialog" v-close-popup color="grey-9" icon="sym_r_close" variant="tertiary" />
|
|
9
|
+
<qas-btn v-if="isInfoDialog" v-close-popup color="grey-9" data-cy="dialog-close-btn" icon="sym_r_close" variant="tertiary" />
|
|
10
10
|
</div>
|
|
11
11
|
</slot>
|
|
12
12
|
</header>
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
<section class="text-body1 text-grey-8">
|
|
15
15
|
<component :is="componentTag" ref="form" v-bind="componentProps">
|
|
16
16
|
<slot name="description">
|
|
17
|
-
<component :is="descriptionComponentTag">{{ card.description }}</component>
|
|
17
|
+
<component :is="descriptionComponentTag" data-cy="dialog-description">{{ card.description }}</component>
|
|
18
18
|
</slot>
|
|
19
19
|
|
|
20
20
|
<div v-if="!isInfoDialog">
|
|
21
21
|
<slot name="actions">
|
|
22
22
|
<qas-actions v-bind="formattedActionsProps">
|
|
23
23
|
<template v-if="hasOk" #primary>
|
|
24
|
-
<qas-btn v-close-popup="!useForm" class="full-width" variant="primary" v-bind="defaultOk" />
|
|
24
|
+
<qas-btn v-close-popup="!useForm" class="full-width" data-cy="dialog-ok-btn" variant="primary" v-bind="defaultOk" />
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<template v-if="hasCancel" #secondary>
|
|
28
|
-
<qas-btn v-close-popup class="full-width" v-bind="defaultCancel" variant="secondary" />
|
|
28
|
+
<qas-btn v-close-popup class="full-width" data-cy="dialog-cancel-btn" v-bind="defaultCancel" variant="secondary" />
|
|
29
29
|
</template>
|
|
30
30
|
</qas-actions>
|
|
31
31
|
</slot>
|
|
@@ -90,3 +90,28 @@ events:
|
|
|
90
90
|
'@ok: -> function ()':
|
|
91
91
|
desc: Dispara toda vez que é clicado no botão "ok" ou quando useForm for true e o for clicado "enter" estando com foco em algum input (evento de submit).
|
|
92
92
|
|
|
93
|
+
selectors:
|
|
94
|
+
dialog:
|
|
95
|
+
desc: Seletor do componente.
|
|
96
|
+
examples: ['data-cy="dialog"']
|
|
97
|
+
|
|
98
|
+
dialog-cancel-btn:
|
|
99
|
+
desc: Seletor do botão de cancelar do componente.
|
|
100
|
+
examples: ['data-cy="dialog-cancel-btn"']
|
|
101
|
+
|
|
102
|
+
dialog-close-btn:
|
|
103
|
+
desc: Seletor do botão de fechar do componente.
|
|
104
|
+
examples: ['data-cy="dialog-close-btn"']
|
|
105
|
+
|
|
106
|
+
dialog-description:
|
|
107
|
+
desc: Seletor da descrição do componente.
|
|
108
|
+
examples: ['data-cy="dialog-description"']
|
|
109
|
+
|
|
110
|
+
dialog-ok-btn:
|
|
111
|
+
desc: Seletor do botão de confirmar do componente.
|
|
112
|
+
examples: ['data-cy="dialog-ok-btn"']
|
|
113
|
+
|
|
114
|
+
dialog-title:
|
|
115
|
+
desc: Seletor do título do componente.
|
|
116
|
+
examples: ['data-cy="dialog-title"']
|
|
117
|
+
|
|
@@ -29,3 +29,8 @@ events:
|
|
|
29
29
|
value:
|
|
30
30
|
desc: Novo valor do model.
|
|
31
31
|
type: [Object, Array, String, Number, Boolean]
|
|
32
|
+
|
|
33
|
+
selectors:
|
|
34
|
+
'[fieldName]':
|
|
35
|
+
desc: Seletor criado a partir da propriedade "name" do campo.
|
|
36
|
+
examples: ['data-cy="email"', 'data-cy="phone"', 'data-cy="password"']
|
|
@@ -141,3 +141,24 @@ events:
|
|
|
141
141
|
value:
|
|
142
142
|
desc: Retorna todos os filtros realizados.
|
|
143
143
|
type: Object
|
|
144
|
+
|
|
145
|
+
selectors:
|
|
146
|
+
filters-btn:
|
|
147
|
+
desc: Seletor do botão de filtro.
|
|
148
|
+
examples: ['data-cy="filters-btn"']
|
|
149
|
+
|
|
150
|
+
filters-clear-btn:
|
|
151
|
+
desc: Seletor do botão de limpar do filtro.
|
|
152
|
+
examples: ['data-cy="filters-clear-btn"']
|
|
153
|
+
|
|
154
|
+
'filters-[optionText]-chip':
|
|
155
|
+
desc: Seletor do chip de acordo com o texto da opção selecionada.
|
|
156
|
+
examples: ['data-cy="filters-Ativo-chip"']
|
|
157
|
+
|
|
158
|
+
'filters-[fieldName]-field':
|
|
159
|
+
desc: Seletor criado a partir da propriedade "name" do campo.
|
|
160
|
+
examples: ['data-cy="filters-email-field"', 'data-cy="filters-phone-field"', 'data-cy="filters-password-field"']
|
|
161
|
+
|
|
162
|
+
filters-submit-btn:
|
|
163
|
+
desc: Seletor do botão de submit do filtro.
|
|
164
|
+
examples: ['data-cy="filters-submit-btn"']
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
<slot v-if="useActions" name="actions">
|
|
11
11
|
<qas-actions>
|
|
12
12
|
<template v-if="useSubmitButton" #primary>
|
|
13
|
-
<qas-btn class="qas-form-view__btn" :data-cy="`
|
|
13
|
+
<qas-btn class="qas-form-view__btn" :data-cy="`form-view-submit-btn-${entity}`" :disable="disable" :label="submitButtonLabel" :loading="isSubmitting" type="submit" variant="primary" />
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<template v-if="hasCancelButton" #secondary>
|
|
17
|
-
<qas-btn v-close-popup class="qas-form-view__btn" :data-cy="`
|
|
17
|
+
<qas-btn v-close-popup class="qas-form-view__btn" :data-cy="`form-view-cancel-btn-${entity}`" :disable="isSubmitting" :label="cancelButtonLabel" type="button" variant="secondary" @click="cancel" />
|
|
18
18
|
</template>
|
|
19
19
|
</qas-actions>
|
|
20
20
|
</slot>
|
|
@@ -57,6 +57,11 @@ export default {
|
|
|
57
57
|
mixins: [viewMixin],
|
|
58
58
|
|
|
59
59
|
props: {
|
|
60
|
+
beforeSubmit: {
|
|
61
|
+
default: null,
|
|
62
|
+
type: Function
|
|
63
|
+
},
|
|
64
|
+
|
|
60
65
|
cancelButtonLabel: {
|
|
61
66
|
default: 'Voltar',
|
|
62
67
|
type: String
|
|
@@ -125,14 +130,14 @@ export default {
|
|
|
125
130
|
type: Boolean
|
|
126
131
|
},
|
|
127
132
|
|
|
133
|
+
useNotifySuccess: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
default: true
|
|
136
|
+
},
|
|
137
|
+
|
|
128
138
|
useSubmitButton: {
|
|
129
139
|
default: true,
|
|
130
140
|
type: Boolean
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
beforeSubmit: {
|
|
134
|
-
default: null,
|
|
135
|
-
type: Function
|
|
136
141
|
}
|
|
137
142
|
},
|
|
138
143
|
|
|
@@ -447,7 +452,9 @@ export default {
|
|
|
447
452
|
`QasFormView - submit -> resposta da action ${this.entity}/${this.mode}`, [response]
|
|
448
453
|
)
|
|
449
454
|
|
|
450
|
-
|
|
455
|
+
if (this.useNotifySuccess) {
|
|
456
|
+
NotifySuccess(response.data.status.text || this.defaultNotifyMessages.success)
|
|
457
|
+
}
|
|
451
458
|
} catch (error) {
|
|
452
459
|
const errors = error?.response?.data?.errors
|
|
453
460
|
const message = error?.response?.data?.status?.text
|
|
@@ -138,6 +138,11 @@ props:
|
|
|
138
138
|
default: true
|
|
139
139
|
type: Boolean
|
|
140
140
|
|
|
141
|
+
use-notify-success:
|
|
142
|
+
desc: Controla se vai ter ou não notificação de sucesso ao finalizar o submit.
|
|
143
|
+
default: true
|
|
144
|
+
type: Boolean
|
|
145
|
+
|
|
141
146
|
use-submit-button:
|
|
142
147
|
desc: Controla se vai ter ou não botão de submit.
|
|
143
148
|
default: true
|
|
@@ -235,4 +240,11 @@ events:
|
|
|
235
240
|
desc: Retorna todos os dados "cru" respondido na exceção do submit.
|
|
236
241
|
type: Object
|
|
237
242
|
|
|
243
|
+
selectors:
|
|
244
|
+
'form-view-cancel-btn-[entity]':
|
|
245
|
+
desc: Seletor do botão de cancelar.
|
|
246
|
+
examples: ['data-cy="form-view-cancel-btn-users"']
|
|
238
247
|
|
|
248
|
+
'form-view-submit-btn-[entity]':
|
|
249
|
+
desc: Seletor do botão de salvar.
|
|
250
|
+
examples: ['data-cy="form-view-submit-btn-users"']
|
|
@@ -169,3 +169,20 @@ events:
|
|
|
169
169
|
desc: Index da imagem que seria deletada.
|
|
170
170
|
default: []
|
|
171
171
|
type: Array
|
|
172
|
+
|
|
173
|
+
selectors:
|
|
174
|
+
gallery-btn-show-more:
|
|
175
|
+
desc: Seletor do botão "mostrar mais".
|
|
176
|
+
examples: ['data-cy="gallery-btn-show-more"']
|
|
177
|
+
|
|
178
|
+
gallery-carousel:
|
|
179
|
+
desc: Seletor do carousel.
|
|
180
|
+
examples: ['data-cy="gallery-carousel"']
|
|
181
|
+
|
|
182
|
+
'gallery-carousel-slide-[index]':
|
|
183
|
+
desc: Seletor pelo index do slide do carousel.
|
|
184
|
+
examples: ['data-cy="gallery-carousel-slide-0"', 'data-cy="gallery-carousel-slide-1"']
|
|
185
|
+
|
|
186
|
+
'gallery-image-[index]':
|
|
187
|
+
desc: Seletor pelo index da imagem da galeria.
|
|
188
|
+
examples: ['data-cy="gallery-image-0"', 'data-cy="gallery-image-1"']
|
|
@@ -73,3 +73,11 @@ slots:
|
|
|
73
73
|
default: {}
|
|
74
74
|
type: Object
|
|
75
75
|
|
|
76
|
+
selectors:
|
|
77
|
+
'grid-generator-[fieldName]-field':
|
|
78
|
+
desc: Seletor do título do campo.
|
|
79
|
+
examples: ['data-cy="grid-generator-email-field"', 'data-cy="grid-generator-name-field"']
|
|
80
|
+
|
|
81
|
+
'grid-generator-[fieldName]-result':
|
|
82
|
+
desc: Seletor do conteúdo do campo.
|
|
83
|
+
examples: ['data-cy="grid-generator-email-result"', 'data-cy="grid-generator-name-result"']
|