@bildvitta/quasar-ui-asteroid 3.5.0-beta.9 → 3.5.0
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/QasActions.vue +32 -6
- package/src/components/actions/QasActions.yml +11 -1
- package/src/components/actions-menu/QasActionsMenu.vue +28 -11
- package/src/components/actions-menu/QasActionsMenu.yml +13 -4
- package/src/components/alert/QasAlert.vue +1 -1
- package/src/components/app-bar/QasAppBar.vue +7 -3
- package/src/components/app-menu/QasAppMenu.vue +54 -9
- package/src/components/app-user/QasAppUser.vue +8 -4
- package/src/components/avatar/QasAvatar.vue +1 -1
- package/src/components/avatar/QasAvatar.yml +1 -1
- package/src/components/card/QasCard.vue +2 -2
- package/src/components/copy/QasCopy.vue +1 -1
- package/src/components/copy/QasCopy.yml +1 -1
- package/src/components/date-time-input/QasDateTimeInput.vue +67 -6
- package/src/components/delete/QasDelete.vue +0 -1
- package/src/components/dialog/QasDialog.vue +56 -28
- package/src/components/dialog/QasDialog.yml +0 -9
- package/src/components/filters/QasFilters.vue +7 -7
- package/src/components/form-view/QasFormView.vue +0 -1
- package/src/components/gallery/QasGallery.vue +3 -3
- package/src/components/gallery/private/PvGalleryCarouselDialog.vue +3 -3
- package/src/components/header-actions/QasHeaderActions.vue +62 -0
- package/src/components/header-actions/QasHeaderActions.yml +26 -0
- package/src/components/list-items/QasListItems.vue +1 -1
- package/src/components/list-items/QasListItems.yml +1 -1
- package/src/components/nested-fields/QasNestedFields.vue +4 -4
- package/src/components/nested-fields/QasNestedFields.yml +2 -2
- package/src/components/numeric-input/QasNumericInput.vue +9 -0
- package/src/components/page-header/QasPageHeader.vue +92 -17
- package/src/components/page-header/QasPageHeader.yml +19 -1
- package/src/components/pagination/QasPagination.vue +12 -1
- package/src/components/password-input/QasPasswordInput.vue +1 -1
- package/src/components/search-box/QasSearchBox.vue +3 -3
- package/src/components/select/QasSelect.vue +6 -5
- package/src/components/select-list/QasSelectList.vue +1 -1
- package/src/components/signature-pad/QasSignaturePad.vue +1 -1
- package/src/components/signature-uploader/QasSignatureUploader.vue +7 -8
- package/src/components/single-view/QasSingleView.vue +1 -1
- package/src/components/table-generator/QasTableGenerator.vue +29 -4
- package/src/components/tabs-generator/QasTabsGenerator.vue +140 -37
- package/src/components/tabs-generator/QasTabsGenerator.yml +4 -24
- package/src/components/tabs-generator/private/PvTabsGeneratorStatus.vue +32 -0
- package/src/components/text-truncate/QasTextTruncate.vue +0 -1
- package/src/components/transfer/QasTransfer.vue +2 -2
- package/src/components/tree-generator/QasTreeGenerator.vue +4 -5
- package/src/components/uploader/QasUploader.vue +8 -8
- package/src/components/welcome/QasWelcome.vue +108 -0
- package/src/components/welcome/QasWelcome.yml +14 -0
- package/src/components/welcome/private/PvWelcomeShortcutCard.vue +58 -0
- package/src/css/components/base.scss +8 -0
- package/src/css/components/item.scss +8 -3
- package/src/css/mixins/index.scss +1 -0
- package/src/css/mixins/set-typography.scss +8 -0
- package/src/css/variables/index.scss +1 -0
- package/src/css/variables/shadow.scss +3 -0
- package/src/css/variables/spacing.scss +15 -0
- package/src/css/variables/typography.scss +1 -1
- package/src/mixins/delete.js +0 -1
- package/src/plugins/notify-error/NotifyError.js +1 -1
- package/src/plugins/notify-success/NotifySuccess.js +1 -1
- package/src/shared/date-config.js +26 -0
- package/src/vue-plugin.js +6 -0
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<q-dialog ref="dialog" :persistent="persistent" v-bind="dialogProps" @update:model-value="updateModelValue">
|
|
3
|
-
<
|
|
4
|
-
<q-
|
|
2
|
+
<q-dialog ref="dialog" class="qas-dialog" :persistent="persistent" v-bind="dialogProps" @update:model-value="updateModelValue">
|
|
3
|
+
<div class="bg-white q-pa-lg" :style="style">
|
|
4
|
+
<header v-if="hasHeader" class="q-mb-lg">
|
|
5
5
|
<slot name="header">
|
|
6
|
-
<div class="justify-between row">
|
|
7
|
-
<
|
|
8
|
-
|
|
6
|
+
<div class="items-center justify-between row">
|
|
7
|
+
<h5 class="text-grey-9 text-h5">{{ card.title }}</h5>
|
|
8
|
+
|
|
9
|
+
<qas-btn v-if="isInfoDialog" v-close-popup color="grey-9" dense flat icon="sym_r_close" rounded />
|
|
9
10
|
</div>
|
|
10
11
|
</slot>
|
|
11
|
-
</
|
|
12
|
+
</header>
|
|
12
13
|
|
|
13
|
-
<
|
|
14
|
+
<section class="text-body1 text-grey-8">
|
|
14
15
|
<component :is="componentTag" ref="form">
|
|
15
16
|
<slot name="description">
|
|
16
17
|
<div v-if="card.description">{{ card.description }}</div>
|
|
17
18
|
</slot>
|
|
18
19
|
</component>
|
|
19
|
-
</
|
|
20
|
+
</section>
|
|
20
21
|
|
|
21
|
-
<q-
|
|
22
|
+
<footer v-if="!isInfoDialog" class="q-mt-xl">
|
|
22
23
|
<slot name="actions">
|
|
23
|
-
<qas-actions v-bind="actionsProps">
|
|
24
|
-
<template #primary>
|
|
25
|
-
<qas-btn v-
|
|
24
|
+
<qas-actions v-bind="actionsProps" :use-equal-width="hasAllActions" :use-full-width="hasSingleAction">
|
|
25
|
+
<template v-if="hasOk" #primary>
|
|
26
|
+
<qas-btn v-close-popup="!useForm" class="full-width" v-bind="defaultOk" @click="submitHandler" />
|
|
26
27
|
</template>
|
|
27
28
|
|
|
28
|
-
<template #secondary>
|
|
29
|
-
<qas-btn v-
|
|
29
|
+
<template v-if="hasCancel" #secondary>
|
|
30
|
+
<qas-btn v-close-popup class="full-width" v-bind="defaultCancel" />
|
|
30
31
|
</template>
|
|
31
32
|
</qas-actions>
|
|
32
33
|
</slot>
|
|
33
|
-
</
|
|
34
|
-
</
|
|
34
|
+
</footer>
|
|
35
|
+
</div>
|
|
35
36
|
</q-dialog>
|
|
36
37
|
</template>
|
|
37
38
|
|
|
@@ -63,11 +64,6 @@ export default {
|
|
|
63
64
|
type: Object
|
|
64
65
|
},
|
|
65
66
|
|
|
66
|
-
cardProps: {
|
|
67
|
-
default: () => ({}),
|
|
68
|
-
type: Object
|
|
69
|
-
},
|
|
70
|
-
|
|
71
67
|
maxWidth: {
|
|
72
68
|
default: '',
|
|
73
69
|
type: String
|
|
@@ -100,10 +96,6 @@ export default {
|
|
|
100
96
|
type: Boolean
|
|
101
97
|
},
|
|
102
98
|
|
|
103
|
-
useCloseButton: {
|
|
104
|
-
type: Boolean
|
|
105
|
-
},
|
|
106
|
-
|
|
107
99
|
useFullMaxWidth: {
|
|
108
100
|
type: Boolean
|
|
109
101
|
},
|
|
@@ -138,8 +130,8 @@ export default {
|
|
|
138
130
|
style () {
|
|
139
131
|
return {
|
|
140
132
|
...(this.useFullMaxWidth && { width: '100%' }),
|
|
141
|
-
maxWidth: this.maxWidth ||
|
|
142
|
-
minWidth: this.minWidth || (this.$qas.screen.isSmall ? '' : '
|
|
133
|
+
maxWidth: this.maxWidth || '470px',
|
|
134
|
+
minWidth: this.minWidth || (this.$qas.screen.isSmall ? '' : '366px')
|
|
143
135
|
}
|
|
144
136
|
},
|
|
145
137
|
|
|
@@ -152,6 +144,34 @@ export default {
|
|
|
152
144
|
...(!this.usePlugin && { modelValue: this.modelValue }),
|
|
153
145
|
...this.$attrs
|
|
154
146
|
}
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
hasOk () {
|
|
150
|
+
return typeof this.ok === 'boolean' ? this.ok : !!Object.keys(this.ok)
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
hasCancel () {
|
|
154
|
+
return typeof this.cancel === 'boolean' ? this.cancel : !!Object.keys(this.cancel)
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
hasAllActions () {
|
|
158
|
+
return this.hasOk && this.hasCancel
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
hasSingleAction () {
|
|
162
|
+
return (this.hasOk && !this.hasCancel) || (!this.hasOk && this.hasCancel)
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
hasHeaderSlot () {
|
|
166
|
+
return !!this.$slots.header
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
hasHeader () {
|
|
170
|
+
return this.hasHeaderSlot || this.card.title
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
isInfoDialog () {
|
|
174
|
+
return !this.hasOk && !this.hasCancel
|
|
155
175
|
}
|
|
156
176
|
},
|
|
157
177
|
|
|
@@ -195,3 +215,11 @@ export default {
|
|
|
195
215
|
}
|
|
196
216
|
}
|
|
197
217
|
</script>
|
|
218
|
+
|
|
219
|
+
<style lang="scss">
|
|
220
|
+
.qas-dialog {
|
|
221
|
+
.q-dialog__inner > div {
|
|
222
|
+
box-shadow: $shadow-2;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
</style>
|
|
@@ -15,11 +15,6 @@ props:
|
|
|
15
15
|
type: [Object, Boolean]
|
|
16
16
|
examples: ["{ label: 'Meu botão de cancelar', onClick: () => alert('fui clicado!') }"]
|
|
17
17
|
|
|
18
|
-
card-props:
|
|
19
|
-
desc: Props repassadas para o componente "<q-card />".
|
|
20
|
-
default: {}
|
|
21
|
-
type: Object
|
|
22
|
-
|
|
23
18
|
card:
|
|
24
19
|
desc: Objeto contendo as informações para serem exibidas dentro do dialog como "title" e "description".
|
|
25
20
|
default: {}
|
|
@@ -52,10 +47,6 @@ props:
|
|
|
52
47
|
default: true
|
|
53
48
|
type: Boolean
|
|
54
49
|
|
|
55
|
-
use-close-button:
|
|
56
|
-
desc: Define se vai ter ou não Ícone de fechar o dialog.
|
|
57
|
-
type: Boolean
|
|
58
|
-
|
|
59
50
|
use-form:
|
|
60
51
|
desc: Define se a tag onde fica a descrição no dialog vai ser um "<q-form />" ou "<div />".
|
|
61
52
|
type: Boolean
|
|
@@ -6,21 +6,21 @@
|
|
|
6
6
|
<q-form v-if="useSearch" @submit.prevent="filter()">
|
|
7
7
|
<qas-input v-model="search" class="bg-white q-px-sm qas-filters__input 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">
|
|
8
8
|
<template #prepend>
|
|
9
|
-
<q-icon v-if="useSearchOnType" color="grey-8" name="
|
|
10
|
-
<qas-btn v-else color="grey-9" flat icon="
|
|
9
|
+
<q-icon v-if="useSearchOnType" color="grey-8" name="sym_r_search" />
|
|
10
|
+
<qas-btn v-else color="grey-9" flat icon="sym_r_search" padding="0" @click="filter()" />
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<template #append>
|
|
14
|
-
<qas-btn v-if="hasSearch" class="q-mr-sm" color="grey-9" flat icon="
|
|
14
|
+
<qas-btn v-if="hasSearch" class="q-mr-sm" color="grey-9" flat icon="sym_r_clear" padding="0" size="sm" @click="clearSearch" />
|
|
15
15
|
|
|
16
|
-
<qas-btn v-if="useFilterButton" :color="filterButtonColor" data-cy="filters-btn" flat icon="
|
|
16
|
+
<qas-btn v-if="useFilterButton" :color="filterButtonColor" data-cy="filters-btn" flat icon="sym_r_tune" padding="0">
|
|
17
17
|
<q-menu anchor="center right" class="full-width" max-width="270px" self="top right">
|
|
18
18
|
<div v-if="isFetching" class="q-pa-xl text-center">
|
|
19
19
|
<q-spinner color="grey" size="2em" />
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
22
|
<div v-else-if="hasFetchError" class="q-pa-xl text-center">
|
|
23
|
-
<q-icon color="negative" name="
|
|
23
|
+
<q-icon color="negative" name="sym_r_warning" size="2em" />
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
<q-form v-else class="q-gutter-y-md q-pa-md" @submit.prevent="filter()">
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
|
|
54
54
|
<div v-if="hasChip" class="q-mt-md">
|
|
55
55
|
<!-- TODO rever com novo estilo -->
|
|
56
|
-
<q-chip v-for="(filterItem, key) in activeFilters" :key="key" color="white" :data-cy="`filters-${filterItem.value}-chip`" dense icon-remove="
|
|
56
|
+
<q-chip v-for="(filterItem, key) in activeFilters" :key="key" color="white" :data-cy="`filters-${filterItem.value}-chip`" dense icon-remove="sym_r_close" removable size="md" text-color="grey-8" @remove="removeFilter(filterItem)">{{ getChipValue(filterItem.value) }}</q-chip>
|
|
57
57
|
</div>
|
|
58
58
|
|
|
59
59
|
<slot :context="mx_context" :filter="filter" :filters="activeFilters" :remove-filter="removeFilter" />
|
|
@@ -162,7 +162,7 @@ export default {
|
|
|
162
162
|
},
|
|
163
163
|
|
|
164
164
|
debounce () {
|
|
165
|
-
return this.useSearchOnType ? '
|
|
165
|
+
return this.useSearchOnType ? '1200' : ''
|
|
166
166
|
},
|
|
167
167
|
|
|
168
168
|
fields () {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div v-if="useDestroy">
|
|
15
15
|
<slot :destroy="onDestroy" :image="image" :index="index" name="destroy">
|
|
16
16
|
<qas-btn color="grey-9" dense :disabled="isDestroyDisabled(image)" flat round size="sm" @click="onDestroy(image, index)">
|
|
17
|
-
<q-icon name="
|
|
17
|
+
<q-icon name="sym_r_delete" size="xs" />
|
|
18
18
|
</qas-btn>
|
|
19
19
|
</slot>
|
|
20
20
|
</div>
|
|
@@ -58,12 +58,12 @@ export default {
|
|
|
58
58
|
props: {
|
|
59
59
|
carouselNextIcon: {
|
|
60
60
|
type: String,
|
|
61
|
-
default: '
|
|
61
|
+
default: 'sym_r_chevron_right'
|
|
62
62
|
},
|
|
63
63
|
|
|
64
64
|
carouselPreviousIcon: {
|
|
65
65
|
type: String,
|
|
66
|
-
default: '
|
|
66
|
+
default: 'sym_r_chevron_left'
|
|
67
67
|
},
|
|
68
68
|
|
|
69
69
|
initialSize: {
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
<qas-dialog v-model="model" :cancel="false" class="q-pa-xl" max-width="1100px" :ok="false" :persistent="false" use-full-max-width>
|
|
3
3
|
<template #header>
|
|
4
4
|
<div class="text-right">
|
|
5
|
-
<qas-btn v-close-popup dense flat icon="
|
|
5
|
+
<qas-btn v-close-popup dense flat icon="sym_r_close" rounded @click="close" />
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<template #description>
|
|
10
|
-
<q-carousel v-model="imageIndexModel" animated :arrows="!$qas.screen.isSmall" control-text-color="primary" data-cy="gallery-carousel" :fullscreen="$qas.screen.isSmall" :height="carouselImageHeight" next-icon="
|
|
10
|
+
<q-carousel v-model="imageIndexModel" animated :arrows="!$qas.screen.isSmall" 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">
|
|
11
11
|
<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">
|
|
12
12
|
<div v-if="$qas.screen.isSmall" class="full-width justify-end row">
|
|
13
|
-
<qas-btn dense flat icon="
|
|
13
|
+
<qas-btn dense flat icon="sym_r_close" @click="close" />
|
|
14
14
|
</div>
|
|
15
15
|
</q-carousel-slide>
|
|
16
16
|
</q-carousel>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="items-center justify-between no-wrap q-col-gutter-x-md q-mb-xl row text-body1 text-grey-8">
|
|
3
|
+
<div :class="leftClass">
|
|
4
|
+
<slot name="left">
|
|
5
|
+
{{ text }}
|
|
6
|
+
</slot>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<div v-if="hasRightSide" class="col-3 col-md-3 col-sm-4 justify-end row">
|
|
10
|
+
<slot name="right">
|
|
11
|
+
<qas-actions-menu v-if="hasDefaultActionsMenu" v-bind="actionsMenuProps" />
|
|
12
|
+
|
|
13
|
+
<qas-btn v-if="hasDefaultButton" :use-label-on-small-screen="false" v-bind="buttonProps" />
|
|
14
|
+
</slot>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
export default {
|
|
21
|
+
name: 'QasHeaderActions',
|
|
22
|
+
|
|
23
|
+
props: {
|
|
24
|
+
actionsMenuProps: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default: () => ({})
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
buttonProps: {
|
|
30
|
+
default: () => ({}),
|
|
31
|
+
type: Object
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
text: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: ''
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
computed: {
|
|
41
|
+
hasDefaultButton () {
|
|
42
|
+
return !!Object.keys(this.buttonProps).length
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
hasDefaultActionsMenu () {
|
|
46
|
+
return !!Object.keys(this.actionsMenuProps).length
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
hasRightSlot () {
|
|
50
|
+
return !!this.$slots.right
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
hasRightSide () {
|
|
54
|
+
return this.hasRightSlot || this.hasDefaultActionsMenu || this.hasDefaultButton
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
leftClass () {
|
|
58
|
+
return this.hasRightSide ? 'col-9 col-md-9 col-sm-8' : 'col-12'
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type: component
|
|
2
|
+
|
|
3
|
+
meta:
|
|
4
|
+
desc: Componente para cabeçalho usado com alguma descrição e ação.
|
|
5
|
+
|
|
6
|
+
props:
|
|
7
|
+
actions-menu-props:
|
|
8
|
+
desc: Propriedades do QasActionsMenu.
|
|
9
|
+
default: {}
|
|
10
|
+
type: Object
|
|
11
|
+
|
|
12
|
+
button-props:
|
|
13
|
+
desc: Propriedades do QasBtn.
|
|
14
|
+
default: {}
|
|
15
|
+
type: Object
|
|
16
|
+
|
|
17
|
+
text:
|
|
18
|
+
desc: Descrição da seção a esquerda.
|
|
19
|
+
type: String
|
|
20
|
+
|
|
21
|
+
slots:
|
|
22
|
+
left:
|
|
23
|
+
desc: slot para acessar seção da esquerda (descrição).
|
|
24
|
+
|
|
25
|
+
right:
|
|
26
|
+
desc: slot para acessar seção da direita (ação).
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
</div>
|
|
49
49
|
|
|
50
50
|
<div class="col-auto">
|
|
51
|
-
<qas-btn color="dark" flat icon="
|
|
51
|
+
<qas-btn color="dark" flat icon="sym_r_add_circle_outline" round />
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
54
54
|
|
|
55
55
|
<div v-else class="text-left">
|
|
56
|
-
<qas-btn class="q-px-sm" color="dark" flat icon="
|
|
56
|
+
<qas-btn class="q-px-sm" color="dark" flat icon="sym_r_add" @click="add()">{{ addInputLabel }}</qas-btn>
|
|
57
57
|
</div>
|
|
58
58
|
</slot>
|
|
59
59
|
</div>
|
|
@@ -107,7 +107,7 @@ export default {
|
|
|
107
107
|
default: () => {
|
|
108
108
|
return {
|
|
109
109
|
label: 'Excluir',
|
|
110
|
-
icon: '
|
|
110
|
+
icon: 'sym_r_delete',
|
|
111
111
|
flat: true,
|
|
112
112
|
dense: true
|
|
113
113
|
}
|
|
@@ -119,7 +119,7 @@ export default {
|
|
|
119
119
|
default: () => {
|
|
120
120
|
return {
|
|
121
121
|
label: 'Duplicar',
|
|
122
|
-
icon: '
|
|
122
|
+
icon: 'sym_r_content_copy',
|
|
123
123
|
flat: true,
|
|
124
124
|
useLabelOnSmallScreen: false,
|
|
125
125
|
dense: true
|
|
@@ -21,13 +21,13 @@ props:
|
|
|
21
21
|
|
|
22
22
|
button-destroy-props:
|
|
23
23
|
desc: Props do botão de excluir linha contendo os campos.
|
|
24
|
-
default: "{ label: 'Excluir', icon: '
|
|
24
|
+
default: "{ label: 'Excluir', icon: 'sym_r_delete', flat: true, dense: true }"
|
|
25
25
|
debugger: true
|
|
26
26
|
type: Object
|
|
27
27
|
|
|
28
28
|
button-duplicate-props:
|
|
29
29
|
desc: Props do botão de duplicar linha contendo os campos.
|
|
30
|
-
default: "{ label: 'Duplicar',
|
|
30
|
+
default: "{ label: 'Duplicar', sym_r_content_copy, flat: true, dense: true, useLabelOnSmallScreen: false }"
|
|
31
31
|
debugger: true
|
|
32
32
|
type: Object
|
|
33
33
|
|
|
@@ -117,6 +117,15 @@ export default {
|
|
|
117
117
|
options.decimalPlaces = this.decimalPlaces
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
if (this.mode === 'money') {
|
|
121
|
+
// TODO
|
|
122
|
+
/*
|
|
123
|
+
* adicionado manualmente por conta do espaçamento, neste formato não esta preparado para
|
|
124
|
+
* outras linguas, teria que adaptar no futuro, o que não é um problema no momento
|
|
125
|
+
*/
|
|
126
|
+
options.currencySymbol = 'R$ '
|
|
127
|
+
}
|
|
128
|
+
|
|
120
129
|
Object.assign(options, this.autonumericOptions)
|
|
121
130
|
|
|
122
131
|
this.$nextTick(() => {
|
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<q-breadcrumbs
|
|
10
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<q-toolbar class="justify-between q-mb-xl q-px-none qas-page-header">
|
|
4
|
+
<div class="ellipsis">
|
|
5
|
+
<q-toolbar-title v-if="title" class="text-grey-9 text-h3">
|
|
6
|
+
{{ title }}
|
|
7
|
+
</q-toolbar-title>
|
|
8
|
+
|
|
9
|
+
<q-breadcrumbs v-if="useBreadcrumbs" class="text-caption" gutter="xs" separator-color="grey-8">
|
|
10
|
+
<q-breadcrumbs-el v-if="useHomeIcon" class="qas-page-header__breadcrumbs-el text-grey-8" icon="sym_r_home" :to="homeRoute" />
|
|
11
|
+
|
|
12
|
+
<q-breadcrumbs-el v-for="(item, index) in normalizedBreadcrumbs" :key="index" class="qas-page-header__breadcrumbs-el" :label="item.label" :to="item.route" />
|
|
13
|
+
</q-breadcrumbs>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<slot />
|
|
17
|
+
</q-toolbar>
|
|
18
|
+
|
|
19
|
+
<div>
|
|
20
|
+
<slot name="bottom">
|
|
21
|
+
<qas-header-actions v-if="hasHeaderActions" v-bind="headerActionsProps" />
|
|
22
|
+
</slot>
|
|
11
23
|
</div>
|
|
12
|
-
|
|
13
|
-
</q-toolbar>
|
|
24
|
+
</div>
|
|
14
25
|
</template>
|
|
15
26
|
|
|
16
27
|
<script>
|
|
28
|
+
import QasHeaderActions from '../header-actions/QasHeaderActions.vue'
|
|
29
|
+
|
|
17
30
|
import { castArray } from 'lodash-es'
|
|
18
31
|
import { useHistory } from '../../composables'
|
|
19
32
|
import { createMetaMixin } from 'quasar'
|
|
@@ -23,6 +36,10 @@ const { history } = useHistory()
|
|
|
23
36
|
export default {
|
|
24
37
|
name: 'QasPageHeader',
|
|
25
38
|
|
|
39
|
+
components: {
|
|
40
|
+
QasHeaderActions
|
|
41
|
+
},
|
|
42
|
+
|
|
26
43
|
mixins: [
|
|
27
44
|
createMetaMixin(function () {
|
|
28
45
|
return {
|
|
@@ -37,6 +54,11 @@ export default {
|
|
|
37
54
|
type: [Array, String]
|
|
38
55
|
},
|
|
39
56
|
|
|
57
|
+
headerActionsProps: {
|
|
58
|
+
default: () => ({}),
|
|
59
|
+
type: Object
|
|
60
|
+
},
|
|
61
|
+
|
|
40
62
|
root: {
|
|
41
63
|
default: '',
|
|
42
64
|
type: [Object, String]
|
|
@@ -50,6 +72,11 @@ export default {
|
|
|
50
72
|
useBreadcrumbs: {
|
|
51
73
|
default: true,
|
|
52
74
|
type: Boolean
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
useHomeIcon: {
|
|
78
|
+
default: true,
|
|
79
|
+
type: Boolean
|
|
53
80
|
}
|
|
54
81
|
},
|
|
55
82
|
|
|
@@ -76,15 +103,63 @@ export default {
|
|
|
76
103
|
|
|
77
104
|
return item
|
|
78
105
|
})
|
|
79
|
-
}
|
|
80
|
-
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
normalizedBreadcrumbs () {
|
|
109
|
+
const breadcrumbsSize = this.transformedBreadcrumbs.length
|
|
110
|
+
|
|
111
|
+
if (breadcrumbsSize < 5) return this.transformedBreadcrumbs
|
|
112
|
+
|
|
113
|
+
const [first, second] = this.transformedBreadcrumbs
|
|
114
|
+
const last = this.transformedBreadcrumbs.at(-1)
|
|
115
|
+
|
|
116
|
+
const beforeLast = {
|
|
117
|
+
...this.transformedBreadcrumbs.at(-2),
|
|
118
|
+
label: '...'
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return [
|
|
122
|
+
first,
|
|
123
|
+
second,
|
|
124
|
+
beforeLast,
|
|
125
|
+
last
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
hasHeaderActions () {
|
|
130
|
+
return !!Object.keys(this.headerActionsProps).length
|
|
131
|
+
},
|
|
81
132
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const lastIndex = this.transformedBreadcrumbs.length - 1
|
|
133
|
+
homeRoute () {
|
|
134
|
+
const hasRoot = this.$router.hasRoute('Root')
|
|
85
135
|
|
|
86
|
-
return
|
|
136
|
+
return hasRoot ? { name: 'Root' } : '/'
|
|
87
137
|
}
|
|
88
138
|
}
|
|
89
139
|
}
|
|
90
140
|
</script>
|
|
141
|
+
|
|
142
|
+
<style lang="scss">
|
|
143
|
+
.qas-page-header {
|
|
144
|
+
&__breadcrumbs-el {
|
|
145
|
+
transition: color var(--qas-generic-transition);
|
|
146
|
+
|
|
147
|
+
&.q-breadcrumbs__el:not(.q-router-link--exact-active):hover {
|
|
148
|
+
color: var(--qas-primary-contrast) !important;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.q-breadcrumbs__el-icon {
|
|
152
|
+
font-size: 16px;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// aplica cor "grey-8" a todos os .q-breadcrumbs__el que não uma classe .q-breadcrumbs--last como pai
|
|
157
|
+
.q-breadcrumbs__el:not(.q-breadcrumbs--last .q-breadcrumbs__el) {
|
|
158
|
+
color: $grey-8;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.q-breadcrumbs--last {
|
|
162
|
+
color: var(--q-primary);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
</style>
|
|
@@ -15,10 +15,28 @@ props:
|
|
|
15
15
|
desc: Título do cabeçalho.
|
|
16
16
|
type: String
|
|
17
17
|
|
|
18
|
+
header-actions-props:
|
|
19
|
+
desc: Propriedades do QasHeaderActions.
|
|
20
|
+
default: {}
|
|
21
|
+
type: Object
|
|
22
|
+
|
|
18
23
|
root:
|
|
19
24
|
desc: Rota raiz do breadcrumbs.
|
|
20
25
|
type: [Object, String]
|
|
21
26
|
|
|
22
27
|
use-breadcrumbs:
|
|
23
28
|
desc: Habilita ou não o breadcrumbs.
|
|
24
|
-
|
|
29
|
+
default: true
|
|
30
|
+
type: Boolean
|
|
31
|
+
|
|
32
|
+
use-home-icon:
|
|
33
|
+
desc: Habilita o ícone de início como primeiro nível do breadcrumbs.
|
|
34
|
+
default: true
|
|
35
|
+
type: Boolean
|
|
36
|
+
|
|
37
|
+
slots:
|
|
38
|
+
bottom:
|
|
39
|
+
desc: slot para acessar abaixo do titulo e breadcrumbs.
|
|
40
|
+
|
|
41
|
+
default:
|
|
42
|
+
desc: slot para acessar lado direito do titulo e breadcrumbs.
|
|
@@ -14,8 +14,11 @@ export default {
|
|
|
14
14
|
activeColor: 'primary',
|
|
15
15
|
activeDesign: 'flat',
|
|
16
16
|
boundaryNumbers: true,
|
|
17
|
-
|
|
17
|
+
class: 'qas-pagination',
|
|
18
|
+
color: 'grey-8',
|
|
18
19
|
directionLinks: true,
|
|
20
|
+
iconNext: 'sym_r_chevron_right',
|
|
21
|
+
iconPrev: 'sym_r_chevron_left',
|
|
19
22
|
maxPages: modelValue < 3 ? 3 : 6,
|
|
20
23
|
modelValue,
|
|
21
24
|
|
|
@@ -25,3 +28,11 @@ export default {
|
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
</script>
|
|
31
|
+
|
|
32
|
+
<style lang="scss">
|
|
33
|
+
.qas-pagination {
|
|
34
|
+
.q-icon {
|
|
35
|
+
color: $grey-9;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
</style>
|