@bildvitta/quasar-ui-asteroid 3.5.0 → 3.6.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/assets/big-shoes-hero.svg +1 -0
- package/src/assets/big-shoes-sitting-on-rock.svg +1 -0
- package/src/assets/big-shoes-walking-the-dog.svg +1 -0
- package/src/components/actions/QasActions.vue +1 -1
- package/src/components/actions-menu/QasActionsMenu.vue +5 -3
- package/src/components/alert/QasAlert.vue +1 -1
- package/src/components/app-bar/QasAppBar.vue +1 -1
- package/src/components/app-menu/QasAppMenu.vue +2 -2
- package/src/components/badge/QasBadge.vue +40 -0
- package/src/components/badge/QasBadge.yml +28 -0
- package/src/components/btn/QasBtn.vue +87 -2
- package/src/components/btn/QasBtn.yml +18 -0
- package/src/components/card/QasCard.vue +1 -1
- package/src/components/copy/QasCopy.vue +1 -6
- package/src/components/copy/QasCopy.yml +0 -6
- package/src/components/date-time-input/QasDateTimeInput.vue +27 -6
- package/src/components/delete/QasDelete.vue +14 -1
- package/src/components/dialog/QasDialog.vue +4 -4
- package/src/components/filters/QasFilters.vue +80 -65
- package/src/components/form-view/QasFormView.vue +22 -20
- package/src/components/gallery/QasGallery.vue +2 -4
- package/src/components/gallery/private/PvGalleryCarouselDialog.vue +33 -16
- package/src/components/list-items/QasListItems.vue +4 -6
- package/src/components/list-items/QasListItems.yml +4 -4
- package/src/components/list-view/QasListView.vue +1 -1
- package/src/components/nested-fields/QasNestedFields.vue +9 -10
- package/src/components/pagination/QasPagination.vue +36 -3
- package/src/components/search-box/QasSearchBox.vue +2 -3
- package/src/components/search-box/QasSearchBox.yml +1 -1
- package/src/components/select/QasSelect.vue +0 -1
- package/src/components/select/QasSelect.yml +1 -1
- package/src/components/select-list/QasSelectList.vue +3 -6
- package/src/components/signature-pad/QasSignaturePad.vue +1 -1
- package/src/components/signature-uploader/QasSignatureUploader.vue +1 -1
- package/src/components/{tabs-generator/private/PvTabsGeneratorStatus.vue → status/QasStatus.vue} +4 -4
- package/src/components/status/QasStatus.yml +10 -0
- package/src/components/tabs-generator/QasTabsGenerator.vue +3 -3
- package/src/components/text-truncate/QasTextTruncate.vue +32 -10
- package/src/components/transfer/QasTransfer.vue +2 -2
- package/src/components/tree-generator/QasTreeGenerator.vue +2 -1
- package/src/components/uploader/QasUploader.vue +7 -5
- package/src/css/components/button.scss +101 -0
- package/src/css/components/index.scss +1 -0
- package/src/css/mixins/index.scss +1 -0
- package/src/css/mixins/set-button.scss +16 -0
- package/src/css/plugins/notify.scss +21 -0
- package/src/css/variables/button.scss +2 -1
- package/src/css/variables/spacing.scss +40 -27
- package/src/css/variables/typography.scss +11 -11
- package/src/index.scss +1 -1
- package/src/mixins/view.js +1 -1
- package/src/pages/ErrorComponent.vue +33 -14
- package/src/pages/Forbidden.vue +2 -1
- package/src/pages/NotFound.vue +2 -1
- package/src/pages/ServerError.vue +6 -2
- package/src/pages/Unauthorized.vue +3 -2
- package/src/plugins/notify-error/NotifyError.js +2 -1
- package/src/plugins/notify-success/NotifySuccess.js +2 -1
- package/src/vue-plugin.js +6 -0
- package/src/assets/gear.svg +0 -27
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<component v-bind="
|
|
2
|
+
<component v-bind="attributes" :is="tag" @click.stop="openConfirmDialog">
|
|
3
3
|
<template v-for="(_, name) in $slots" #[name]="context">
|
|
4
4
|
<slot :name="name" v-bind="context || {}" />
|
|
5
5
|
</template>
|
|
@@ -25,6 +25,8 @@ export default {
|
|
|
25
25
|
QasDialog
|
|
26
26
|
},
|
|
27
27
|
|
|
28
|
+
inheritAttrs: false,
|
|
29
|
+
|
|
28
30
|
props: {
|
|
29
31
|
customId: {
|
|
30
32
|
default: '',
|
|
@@ -74,6 +76,13 @@ export default {
|
|
|
74
76
|
},
|
|
75
77
|
|
|
76
78
|
computed: {
|
|
79
|
+
attributes () {
|
|
80
|
+
return {
|
|
81
|
+
...this.$attrs,
|
|
82
|
+
color: this.isButton ? 'grey-9' : this.$attrs.color
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
|
|
77
86
|
defaultDialogProps () {
|
|
78
87
|
return {
|
|
79
88
|
card: {
|
|
@@ -98,6 +107,10 @@ export default {
|
|
|
98
107
|
error: 'Não conseguimos excluir as informações. Por favor, tente novamente em alguns minutos.',
|
|
99
108
|
success: 'Informações excluídas com sucesso.'
|
|
100
109
|
}
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
isButton () {
|
|
113
|
+
return this.tag === 'qas-btn'
|
|
101
114
|
}
|
|
102
115
|
},
|
|
103
116
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<div class="items-center justify-between row">
|
|
7
7
|
<h5 class="text-grey-9 text-h5">{{ card.title }}</h5>
|
|
8
8
|
|
|
9
|
-
<qas-btn v-if="isInfoDialog" v-close-popup color="grey-9"
|
|
9
|
+
<qas-btn v-if="isInfoDialog" v-close-popup color="grey-9" icon="sym_r_close" variant="tertiary" />
|
|
10
10
|
</div>
|
|
11
11
|
</slot>
|
|
12
12
|
</header>
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
</component>
|
|
20
20
|
</section>
|
|
21
21
|
|
|
22
|
-
<footer v-if="!isInfoDialog"
|
|
22
|
+
<footer v-if="!isInfoDialog">
|
|
23
23
|
<slot name="actions">
|
|
24
24
|
<qas-actions v-bind="actionsProps" :use-equal-width="hasAllActions" :use-full-width="hasSingleAction">
|
|
25
25
|
<template v-if="hasOk" #primary>
|
|
26
|
-
<qas-btn v-close-popup="!useForm" class="full-width" v-bind="defaultOk" @click="submitHandler" />
|
|
26
|
+
<qas-btn v-close-popup="!useForm" class="full-width" variant="primary" v-bind="defaultOk" @click="submitHandler" />
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<template v-if="hasCancel" #secondary>
|
|
30
|
-
<qas-btn v-close-popup class="full-width" v-bind="defaultCancel" />
|
|
30
|
+
<qas-btn v-close-popup class="full-width" v-bind="defaultCancel" variant="secondary" />
|
|
31
31
|
</template>
|
|
32
32
|
</qas-actions>
|
|
33
33
|
</slot>
|
|
@@ -4,44 +4,46 @@
|
|
|
4
4
|
<div v-if="showSearch" class="col-12 col-md-6">
|
|
5
5
|
<slot :filter="filter" name="search">
|
|
6
6
|
<q-form v-if="useSearch" @submit.prevent="filter()">
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<div v-else-if="hasFetchError" class="q-pa-xl text-center">
|
|
23
|
-
<q-icon color="negative" name="sym_r_warning" size="2em" />
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<q-form v-else class="q-gutter-y-md q-pa-md" @submit.prevent="filter()">
|
|
27
|
-
<div v-for="(field, index) in fields" :key="index">
|
|
28
|
-
<qas-field v-model="filters[field.name]" :data-cy="`filters-${field.name}-field`" :field="field" v-bind="fieldsProps[field.name]" />
|
|
7
|
+
<div class="qas-filters__input-content">
|
|
8
|
+
<qas-input v-model="search" class="bg-white q-px-sm rounded-borders-sm shadow-2" data-cy="filters-search-input" :debounce="debounce" dense hide-bottom-space input-class="ellipsis text-grey-8" :outlined="false" :placeholder="searchPlaceholder" type="search">
|
|
9
|
+
<template #prepend>
|
|
10
|
+
<q-icon v-if="useSearchOnType" color="grey-8" name="sym_r_search" />
|
|
11
|
+
<qas-btn v-else color="grey-9" icon="sym_r_search" variant="tertiary" @click="filter()" />
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<template #append>
|
|
15
|
+
<qas-btn v-if="hasSearch" class="q-mr-sm" color="grey-9" icon="sym_r_clear" variant="tertiary" @click="clearSearch" />
|
|
16
|
+
|
|
17
|
+
<qas-btn v-if="useFilterButton" :color="filterButtonColor" data-cy="filters-btn" icon="sym_r_tune" variant="tertiary">
|
|
18
|
+
<q-menu anchor="center right" class="full-width" max-width="270px" self="top right">
|
|
19
|
+
<div v-if="isFetching" class="q-pa-xl text-center">
|
|
20
|
+
<q-spinner color="grey" size="2em" />
|
|
29
21
|
</div>
|
|
30
22
|
|
|
31
|
-
<div class="q-
|
|
32
|
-
<
|
|
33
|
-
|
|
23
|
+
<div v-else-if="hasFetchError" class="q-pa-xl text-center">
|
|
24
|
+
<q-icon color="negative" name="sym_r_warning" size="2em" />
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<q-form v-else class="q-gutter-y-md q-pa-md" @submit.prevent="filter()">
|
|
28
|
+
<div v-for="(field, index) in fields" :key="index">
|
|
29
|
+
<qas-field v-model="filters[field.name]" :data-cy="`filters-${field.name}-field`" :field="field" v-bind="fieldsProps[field.name]" />
|
|
34
30
|
</div>
|
|
35
31
|
|
|
36
|
-
<div class="col-
|
|
37
|
-
<
|
|
32
|
+
<div class="q-col-gutter-x-md q-mt-xl row">
|
|
33
|
+
<div class="col-6">
|
|
34
|
+
<qas-btn class="full-width" data-cy="filters-clear-btn" label="Limpar" variant="secondary" @click="clearFilters" />
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div class="col-6">
|
|
38
|
+
<qas-btn class="full-width" data-cy="filters-submit-btn" label="Filtrar" type="submit" variant="primary" />
|
|
39
|
+
</div>
|
|
38
40
|
</div>
|
|
39
|
-
</
|
|
40
|
-
</q-
|
|
41
|
-
</
|
|
42
|
-
</
|
|
43
|
-
</
|
|
44
|
-
</
|
|
41
|
+
</q-form>
|
|
42
|
+
</q-menu>
|
|
43
|
+
</qas-btn>
|
|
44
|
+
</template>
|
|
45
|
+
</qas-input>
|
|
46
|
+
</div>
|
|
45
47
|
</q-form>
|
|
46
48
|
</slot>
|
|
47
49
|
</div>
|
|
@@ -225,6 +227,7 @@ export default {
|
|
|
225
227
|
created () {
|
|
226
228
|
this.fetchFilters()
|
|
227
229
|
this.watchOnceFields()
|
|
230
|
+
this.handleSearchModelOnCreate()
|
|
228
231
|
},
|
|
229
232
|
|
|
230
233
|
methods: {
|
|
@@ -322,8 +325,9 @@ export default {
|
|
|
322
325
|
},
|
|
323
326
|
|
|
324
327
|
updateValues () {
|
|
325
|
-
|
|
326
|
-
|
|
328
|
+
this.setSearch()
|
|
329
|
+
|
|
330
|
+
const { filters } = this.mx_context
|
|
327
331
|
|
|
328
332
|
for (const key in filters) {
|
|
329
333
|
this.filters[key] = parseValue(this.normalizeValues(filters[key], this.fields[key]?.multiple))
|
|
@@ -343,6 +347,15 @@ export default {
|
|
|
343
347
|
watchOnce()
|
|
344
348
|
}
|
|
345
349
|
})
|
|
350
|
+
},
|
|
351
|
+
|
|
352
|
+
handleSearchModelOnCreate () {
|
|
353
|
+
!this.useFilterButton && this.setSearch()
|
|
354
|
+
},
|
|
355
|
+
|
|
356
|
+
setSearch () {
|
|
357
|
+
const { search } = this.mx_context
|
|
358
|
+
this.search = search || ''
|
|
346
359
|
}
|
|
347
360
|
}
|
|
348
361
|
}
|
|
@@ -351,41 +364,43 @@ export default {
|
|
|
351
364
|
<style lang="scss">
|
|
352
365
|
// TODO rever
|
|
353
366
|
.qas-filters {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
367
|
+
&__input-content {
|
|
368
|
+
.q-field {
|
|
369
|
+
&::before {
|
|
370
|
+
border: 2px solid transparent;
|
|
371
|
+
border-radius: var(--qas-generic-border-radius);
|
|
372
|
+
bottom: 0;
|
|
373
|
+
content: '';
|
|
374
|
+
left: 0;
|
|
375
|
+
pointer-events: none;
|
|
376
|
+
position: absolute;
|
|
377
|
+
right: 0;
|
|
378
|
+
top: 0;
|
|
379
|
+
transition: border-color var(--qas-generic-transition);
|
|
380
|
+
}
|
|
366
381
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
}
|
|
382
|
+
&--dense .q-field__prepend {
|
|
383
|
+
padding-right: var(--qas-spacing-xs);
|
|
384
|
+
}
|
|
371
385
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
386
|
+
&--dense .q-field__append {
|
|
387
|
+
padding-left: var(--qas-spacing-sm);
|
|
388
|
+
}
|
|
375
389
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
390
|
+
&--focused::before {
|
|
391
|
+
border-color: var(--q-primary);
|
|
392
|
+
color: var(--q-primary);
|
|
393
|
+
}
|
|
379
394
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
395
|
+
&__control::after,
|
|
396
|
+
&__control::before {
|
|
397
|
+
display: none !important;
|
|
398
|
+
}
|
|
385
399
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
400
|
+
&__native {
|
|
401
|
+
padding-bottom: var(--qas-spacing-sm);
|
|
402
|
+
padding-top: var(--qas-spacing-sm);
|
|
403
|
+
}
|
|
389
404
|
}
|
|
390
405
|
}
|
|
391
406
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<component :is="mx_componentTag" :class="mx_componentClass">
|
|
2
|
+
<component :is="mx_componentTag" class="qas-form-view" :class="mx_componentClass">
|
|
3
3
|
<header v-if="mx_hasHeaderSlot">
|
|
4
4
|
<slot name="header" />
|
|
5
5
|
</header>
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
<slot />
|
|
9
9
|
|
|
10
10
|
<slot v-if="useActions" name="actions">
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
<qas-btn
|
|
14
|
-
</
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
<qas-btn class="
|
|
18
|
-
</
|
|
19
|
-
</
|
|
11
|
+
<qas-actions>
|
|
12
|
+
<template #primary>
|
|
13
|
+
<qas-btn class="qas-form-view__btn" :data-cy="`btnSave-${entity}`" :disable="disable" :label="submitButtonLabel" :loading="isSubmitting" type="submit" variant="primary" />
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<template #secondary>
|
|
17
|
+
<qas-btn v-close-popup class="qas-form-view__btn" :data-cy="`btnCancel-${entity}`" :disable="isSubmitting" :label="cancelButtonLabel" type="button" variant="secondary" @click="cancel" />
|
|
18
|
+
</template>
|
|
19
|
+
</qas-actions>
|
|
20
20
|
</slot>
|
|
21
21
|
</q-form>
|
|
22
22
|
|
|
@@ -161,10 +161,6 @@ export default {
|
|
|
161
161
|
},
|
|
162
162
|
|
|
163
163
|
computed: {
|
|
164
|
-
cancelButtonClass () {
|
|
165
|
-
return this.$qas.screen.isSmall && 'order-last'
|
|
166
|
-
},
|
|
167
|
-
|
|
168
164
|
fetchURL () {
|
|
169
165
|
return this.url ? (`${this.url}/${this.isCreateMode ? 'new' : 'edit'}`) : ''
|
|
170
166
|
},
|
|
@@ -189,13 +185,9 @@ export default {
|
|
|
189
185
|
return this.$route
|
|
190
186
|
},
|
|
191
187
|
|
|
192
|
-
submitButtonClass () {
|
|
193
|
-
return this.$qas.screen.isSmall && 'order-first'
|
|
194
|
-
},
|
|
195
|
-
|
|
196
188
|
defaultNotifyMessages () {
|
|
197
189
|
return {
|
|
198
|
-
validationError: '
|
|
190
|
+
validationError: 'Não conseguimos salvar as informações. Por favor, revise os campos e tente novamente.',
|
|
199
191
|
error: 'Não conseguimos salvar as informações. Por favor, tente novamente em alguns minutos.',
|
|
200
192
|
success: 'Informações salvas com sucesso.'
|
|
201
193
|
}
|
|
@@ -434,8 +426,9 @@ export default {
|
|
|
434
426
|
} catch (error) {
|
|
435
427
|
const errors = error?.response?.data?.errors
|
|
436
428
|
const message = error?.response?.data?.status?.text
|
|
429
|
+
const hasFieldError = !!Object.keys(errors || {})?.length
|
|
437
430
|
|
|
438
|
-
const defaultMessage =
|
|
431
|
+
const defaultMessage = hasFieldError
|
|
439
432
|
? this.defaultNotifyMessages.validationError
|
|
440
433
|
: this.defaultNotifyMessages.error
|
|
441
434
|
|
|
@@ -462,3 +455,12 @@ export default {
|
|
|
462
455
|
}
|
|
463
456
|
}
|
|
464
457
|
</script>
|
|
458
|
+
|
|
459
|
+
<style lang="scss">
|
|
460
|
+
.qas-form-view {
|
|
461
|
+
&__btn {
|
|
462
|
+
min-width: 132px;
|
|
463
|
+
width: 100%;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
</style>
|
|
@@ -13,9 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
<div v-if="useDestroy">
|
|
15
15
|
<slot :destroy="onDestroy" :image="image" :index="index" name="destroy">
|
|
16
|
-
<qas-btn color="grey-9"
|
|
17
|
-
<q-icon name="sym_r_delete" size="xs" />
|
|
18
|
-
</qas-btn>
|
|
16
|
+
<qas-btn color="grey-9" :disabled="isDestroyDisabled(image)" icon="sym_r_delete" variant="tertiary" @click="onDestroy(image, index)" />
|
|
19
17
|
</slot>
|
|
20
18
|
</div>
|
|
21
19
|
</div>
|
|
@@ -26,7 +24,7 @@
|
|
|
26
24
|
|
|
27
25
|
<slot>
|
|
28
26
|
<div v-if="!hideShowMore" class="full-width text-center">
|
|
29
|
-
<qas-btn color="primary" data-cy="gallery-btn-show-more"
|
|
27
|
+
<qas-btn color="primary" data-cy="gallery-btn-show-more" :label="showMoreLabel" variant="tertiary" @click="showMore" />
|
|
30
28
|
</div>
|
|
31
29
|
</slot>
|
|
32
30
|
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<div class="pv-gallery-carousel-dialog">
|
|
3
|
+
<qas-dialog v-model="model" :cancel="false" class="q-pa-xl" max-width="1100px" :ok="false" :persistent="false" use-full-max-width>
|
|
4
|
+
<template #header>
|
|
5
|
+
<div class="text-right">
|
|
6
|
+
<qas-btn v-close-popup color="grey-9" icon="sym_r_close" variant="tertiary" @click="close" />
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
<template #description>
|
|
11
|
+
<q-carousel v-model="imageIndexModel" animated :arrows="!$qas.screen.isSmall" class="pv-gallery-carousel-dialog__carousel" control-text-color="primary" data-cy="gallery-carousel" :fullscreen="$qas.screen.isSmall" :height="carouselImageHeight" next-icon="sym_r_chevron_right" prev-icon="sym_r_chevron_left" swipeable :thumbnails="!isSingleImage">
|
|
12
|
+
<q-carousel-slide v-for="(image, index) in images" :key="index" class="bg-no-repeat bg-size-contain" :data-cy="`gallery-carousel-slide-${index}`" :img-src="image.url" :name="index">
|
|
13
|
+
<div v-if="$qas.screen.isSmall" class="full-width justify-end row">
|
|
14
|
+
<qas-btn color="grey-9" icon="sym_r_close" variant="tertiary" @click="close" />
|
|
15
|
+
</div>
|
|
16
|
+
</q-carousel-slide>
|
|
17
|
+
</q-carousel>
|
|
18
|
+
</template>
|
|
19
|
+
</qas-dialog>
|
|
20
|
+
</div>
|
|
19
21
|
</template>
|
|
20
22
|
|
|
21
23
|
<script>
|
|
@@ -80,3 +82,18 @@ export default {
|
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
84
|
</script>
|
|
85
|
+
|
|
86
|
+
<style lang="scss">
|
|
87
|
+
.pv-gallery-carousel-dialog {
|
|
88
|
+
// https://quasar.dev/style/sass-scss-variables#caveat: $
|
|
89
|
+
|
|
90
|
+
&__carousel .q-carousel__control .q-btn {
|
|
91
|
+
@include set-button(
|
|
92
|
+
tertiary,
|
|
93
|
+
true,
|
|
94
|
+
false,
|
|
95
|
+
primary
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
@@ -9,9 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
<q-item-section v-if="useSectionActions" side>
|
|
11
11
|
<slot :index="index" :item="item" name="item-section-side">
|
|
12
|
-
<qas-btn
|
|
13
|
-
<q-icon v-bind="iconProps" />
|
|
14
|
-
</qas-btn>
|
|
12
|
+
<qas-btn color="primary" :icon="icon" variant="tertiary" @click="onClick({ item, index })" />
|
|
15
13
|
</slot>
|
|
16
14
|
</q-item-section>
|
|
17
15
|
</slot>
|
|
@@ -33,9 +31,9 @@ export default {
|
|
|
33
31
|
},
|
|
34
32
|
|
|
35
33
|
props: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
icon: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'sym_r_chevron_right'
|
|
39
37
|
},
|
|
40
38
|
|
|
41
39
|
list: {
|
|
@@ -4,10 +4,10 @@ meta:
|
|
|
4
4
|
desc: Componente para listagem.
|
|
5
5
|
|
|
6
6
|
props:
|
|
7
|
-
icon
|
|
8
|
-
desc:
|
|
9
|
-
default:
|
|
10
|
-
type:
|
|
7
|
+
icon:
|
|
8
|
+
desc: Nome do ícone
|
|
9
|
+
default: sym_r_chevron_right
|
|
10
|
+
type: String
|
|
11
11
|
|
|
12
12
|
list:
|
|
13
13
|
desc: Lista para ser selecionada.
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<q-spinner color="grey" size="3em" />
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
|
-
<div v-if="hasPages" class="flex items-center q-mt-
|
|
29
|
+
<div v-if="hasPages" class="flex items-center q-mt-md" :class="paginationClasses">
|
|
30
30
|
<qas-pagination v-model="page" :max="totalPages" @click="changePage" />
|
|
31
31
|
</div>
|
|
32
32
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<div v-for="(row, index) in nested" :id="`row-${index}`" :key="`row-${index}`" class="full-width">
|
|
10
10
|
<div v-if="!row[destroyKey]" :key="index" class="col-12 q-mt-md">
|
|
11
11
|
<div>
|
|
12
|
-
<div class="flex items-center justify-between q-py-
|
|
12
|
+
<div class="flex items-center justify-between q-py-md">
|
|
13
13
|
<qas-label v-if="!useSingleLabel" :label="getRowLabel(index)" />
|
|
14
14
|
<qas-actions-menu v-if="hasBlockActions(row)" :list="getActionsList(index, row)" :use-label-on-small-screen="false" />
|
|
15
15
|
</div>
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<div v-if="useAdd" class="q-mt-md">
|
|
40
40
|
<slot :add="add" name="add-input">
|
|
41
41
|
<div v-if="showAddFirstInputButton" class="text-left">
|
|
42
|
-
<qas-btn class="q-px-sm" color="
|
|
42
|
+
<qas-btn class="q-px-sm" color="primary" variant="tertiary" @click="add()">{{ addFirstInputLabel }}</qas-btn>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
<div v-else-if="useInlineActions" class="cursor-pointer items-center q-col-gutter-x-md q-mt-md row" @click="add()">
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
</div>
|
|
49
49
|
|
|
50
50
|
<div class="col-auto">
|
|
51
|
-
<qas-btn color="
|
|
51
|
+
<qas-btn color="primary" icon="sym_r_add_circle_outline" variant="tertiary" />
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
54
54
|
|
|
55
55
|
<div v-else class="text-left">
|
|
56
|
-
<qas-btn class="q-px-sm" color="
|
|
56
|
+
<qas-btn class="q-px-sm" color="primary" icon="sym_r_add" :label="addInputLabel" variant="tertiary" @click="add()" />
|
|
57
57
|
</div>
|
|
58
58
|
</slot>
|
|
59
59
|
</div>
|
|
@@ -106,10 +106,10 @@ export default {
|
|
|
106
106
|
type: Object,
|
|
107
107
|
default: () => {
|
|
108
108
|
return {
|
|
109
|
-
|
|
109
|
+
color: 'grey-9',
|
|
110
110
|
icon: 'sym_r_delete',
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
label: 'Excluir',
|
|
112
|
+
variant: 'tertiary'
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
},
|
|
@@ -118,11 +118,10 @@ export default {
|
|
|
118
118
|
type: Object,
|
|
119
119
|
default: () => {
|
|
120
120
|
return {
|
|
121
|
-
label: 'Duplicar',
|
|
122
121
|
icon: 'sym_r_content_copy',
|
|
123
|
-
|
|
122
|
+
label: 'Duplicar',
|
|
124
123
|
useLabelOnSmallScreen: false,
|
|
125
|
-
|
|
124
|
+
variant: 'tertiary'
|
|
126
125
|
}
|
|
127
126
|
}
|
|
128
127
|
},
|
|
@@ -19,7 +19,7 @@ export default {
|
|
|
19
19
|
directionLinks: true,
|
|
20
20
|
iconNext: 'sym_r_chevron_right',
|
|
21
21
|
iconPrev: 'sym_r_chevron_left',
|
|
22
|
-
maxPages:
|
|
22
|
+
maxPages: 3,
|
|
23
23
|
modelValue,
|
|
24
24
|
|
|
25
25
|
...attributes
|
|
@@ -31,8 +31,41 @@ export default {
|
|
|
31
31
|
|
|
32
32
|
<style lang="scss">
|
|
33
33
|
.qas-pagination {
|
|
34
|
-
.
|
|
35
|
-
|
|
34
|
+
// https://quasar.dev/style/sass-scss-variables#caveat: $
|
|
35
|
+
|
|
36
|
+
.q-pagination__content .q-btn {
|
|
37
|
+
@include set-button(
|
|
38
|
+
tertiary,
|
|
39
|
+
true,
|
|
40
|
+
false,
|
|
41
|
+
grey-9
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
min-width: max-content !important;
|
|
45
|
+
|
|
46
|
+
&.text-primary {
|
|
47
|
+
color: var(--q-primary) !important;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.q-pagination__middle + .q-btn,
|
|
52
|
+
.q-btn + .q-pagination__middle,
|
|
53
|
+
.q-btn + .q-btn {
|
|
54
|
+
margin-left: var(--qas-spacing-md) !important;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.q-pagination__content > .q-btn,
|
|
58
|
+
.q-pagination__middle > .q-btn {
|
|
59
|
+
margin-left: 0;
|
|
60
|
+
margin-top: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@media (max-width: $breakpoint-xs) {
|
|
64
|
+
.q-pagination__middle + .q-btn,
|
|
65
|
+
.q-btn + .q-pagination__middle,
|
|
66
|
+
.q-btn + .q-btn {
|
|
67
|
+
margin-left: var(--qas-spacing-sm) !important;
|
|
68
|
+
}
|
|
36
69
|
}
|
|
37
70
|
}
|
|
38
71
|
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<qas-box>
|
|
3
3
|
<qas-input v-bind="attributes" ref="search" v-model="mx_search">
|
|
4
|
-
<template #
|
|
5
|
-
<q-icon color="
|
|
4
|
+
<template #prepend>
|
|
5
|
+
<q-icon color="grey-8" name="sym_r_search" />
|
|
6
6
|
</template>
|
|
7
7
|
</qas-input>
|
|
8
8
|
|
|
@@ -153,7 +153,6 @@ export default {
|
|
|
153
153
|
|
|
154
154
|
defaultFuseOptions () {
|
|
155
155
|
return {
|
|
156
|
-
threshold: 0.1,
|
|
157
156
|
ignoreLocation: true,
|
|
158
157
|
|
|
159
158
|
...this.fuseOptions
|
|
@@ -27,7 +27,7 @@ props:
|
|
|
27
27
|
default:
|
|
28
28
|
ignoreLocation: true
|
|
29
29
|
keys: [label, value]
|
|
30
|
-
threshold: 0.
|
|
30
|
+
threshold: 0.6
|
|
31
31
|
|
|
32
32
|
label-key:
|
|
33
33
|
desc: O componente internamente espera receber na propriedade "options" um array de objeto contendo "label" e "value", caso o seu objeto não tenha "label" mas um "name" por exemplo, você pode definir esta prop "label-key" como "name".
|
|
@@ -128,12 +128,9 @@ export default {
|
|
|
128
128
|
const isSelected = this.values.includes(value)
|
|
129
129
|
|
|
130
130
|
return {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
icon:
|
|
134
|
-
label: isSelected ? 'Remover' : 'Adicionar',
|
|
135
|
-
outline: isSelected,
|
|
136
|
-
size: 'sm'
|
|
131
|
+
variant: 'tertiary',
|
|
132
|
+
color: isSelected ? 'grey-9' : 'primary',
|
|
133
|
+
icon: isSelected ? 'sym_r_remove' : 'sym_r_add'
|
|
137
134
|
}
|
|
138
135
|
},
|
|
139
136
|
|