@bildvitta/quasar-ui-asteroid 3.5.0-beta.12 → 3.5.0-beta.14
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 +26 -8
- package/src/components/actions-menu/QasActionsMenu.yml +9 -0
- package/src/components/app-bar/QasAppBar.vue +6 -2
- package/src/components/app-menu/QasAppMenu.vue +54 -9
- package/src/components/app-user/QasAppUser.vue +8 -4
- 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/form-view/QasFormView.vue +0 -1
- package/src/components/numeric-input/QasNumericInput.vue +9 -0
- package/src/components/signature-uploader/QasSignatureUploader.vue +6 -7
- package/src/components/text-truncate/QasTextTruncate.vue +0 -1
- package/src/components/tree-generator/QasTreeGenerator.vue +0 -1
- 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/item.scss +7 -2
- package/src/css/utils/index.scss +0 -1
- 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/mixins/delete.js +0 -1
- package/src/shared/date-config.js +26 -0
- package/src/vue-plugin.js +3 -0
- package/src/css/utils/shadow.scss +0 -4
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="classes">
|
|
3
|
-
<div
|
|
2
|
+
<div class="qas-actions" :class="classes">
|
|
3
|
+
<div v-if="hasSecondarySlot" :class="columnClasses">
|
|
4
4
|
<slot name="secondary" />
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
|
-
<div
|
|
7
|
+
<div v-if="hasPrimarySlot" :class="columnClasses">
|
|
8
8
|
<slot name="primary" />
|
|
9
9
|
</div>
|
|
10
10
|
</div>
|
|
@@ -22,9 +22,17 @@ export default {
|
|
|
22
22
|
},
|
|
23
23
|
|
|
24
24
|
gutter: {
|
|
25
|
-
default: '
|
|
25
|
+
default: '',
|
|
26
26
|
type: String,
|
|
27
|
-
validator: value => ['xs', 'sm', 'md', 'lg', 'xl'].includes(value)
|
|
27
|
+
validator: value => !value || ['xs', 'sm', 'md', 'lg', 'xl'].includes(value)
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
useFullWidth: {
|
|
31
|
+
type: Boolean
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
useEqualWidth: {
|
|
35
|
+
type: Boolean
|
|
28
36
|
}
|
|
29
37
|
},
|
|
30
38
|
|
|
@@ -32,9 +40,27 @@ export default {
|
|
|
32
40
|
classes () {
|
|
33
41
|
return [
|
|
34
42
|
`justify-${this.align}`,
|
|
35
|
-
`q-col-gutter-${this.
|
|
43
|
+
`q-col-gutter-${this.defaultGutter}`,
|
|
36
44
|
this.$qas.screen.isSmall ? 'column reverse' : 'row'
|
|
37
45
|
]
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
defaultGutter () {
|
|
49
|
+
return this.gutter || this.$qas.screen.isSmall ? 'md' : 'lg'
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
columnClasses () {
|
|
53
|
+
if (this.useEqualWidth) return 'col-12 col-sm-6'
|
|
54
|
+
|
|
55
|
+
return this.useFullWidth ? 'col-12' : 'col-12 col-sm-auto'
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
hasPrimarySlot () {
|
|
59
|
+
return !!this.$slots.primary
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
hasSecondarySlot () {
|
|
63
|
+
return !!this.$slots.secondary
|
|
38
64
|
}
|
|
39
65
|
}
|
|
40
66
|
}
|
|
@@ -12,10 +12,20 @@ props:
|
|
|
12
12
|
|
|
13
13
|
gutter:
|
|
14
14
|
desc: Espaçamento entre os elementos.
|
|
15
|
-
default:
|
|
15
|
+
default: lg
|
|
16
16
|
type: String
|
|
17
17
|
examples: ['xs', 'sm', 'md', 'lg', 'xl']
|
|
18
18
|
|
|
19
|
+
use-full-width:
|
|
20
|
+
desc: Deixa as colunas 100%, com col-12.
|
|
21
|
+
default: false
|
|
22
|
+
type: Boolean
|
|
23
|
+
|
|
24
|
+
use-equal-width:
|
|
25
|
+
desc: Deixa as colunas 50% no desktop e 100% no mobile, col-12 col-sm-6.
|
|
26
|
+
default: false
|
|
27
|
+
type: Boolean
|
|
28
|
+
|
|
19
29
|
slots:
|
|
20
30
|
primary:
|
|
21
31
|
desc: 'Slot para ação primaria (ex: botão de salvar), em telas menores que sm, se torna o primeiro elemento.'
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
</slot>
|
|
17
17
|
</q-list>
|
|
18
18
|
</q-menu>
|
|
19
|
+
|
|
20
|
+
<q-tooltip v-if="hasTooltip" class="text-caption">
|
|
21
|
+
{{ tooltipLabel }}
|
|
22
|
+
</q-tooltip>
|
|
19
23
|
</component>
|
|
20
24
|
</div>
|
|
21
25
|
</template>
|
|
@@ -33,13 +37,13 @@ export default {
|
|
|
33
37
|
},
|
|
34
38
|
|
|
35
39
|
props: {
|
|
36
|
-
|
|
37
|
-
default: '
|
|
40
|
+
color: {
|
|
41
|
+
default: '',
|
|
38
42
|
type: String
|
|
39
43
|
},
|
|
40
44
|
|
|
41
|
-
|
|
42
|
-
default: '
|
|
45
|
+
icon: {
|
|
46
|
+
default: 'sym_r_more_vert',
|
|
43
47
|
type: String
|
|
44
48
|
},
|
|
45
49
|
|
|
@@ -63,6 +67,11 @@ export default {
|
|
|
63
67
|
type: Object
|
|
64
68
|
},
|
|
65
69
|
|
|
70
|
+
useLabel: {
|
|
71
|
+
default: true,
|
|
72
|
+
type: Boolean
|
|
73
|
+
},
|
|
74
|
+
|
|
66
75
|
useLabelOnSmallScreen: {
|
|
67
76
|
type: Boolean
|
|
68
77
|
}
|
|
@@ -88,14 +97,15 @@ export default {
|
|
|
88
97
|
component () {
|
|
89
98
|
const props = {}
|
|
90
99
|
|
|
100
|
+
// TODO: solução do color é temporária até ser definido o novo QasBtn.
|
|
91
101
|
if (this.hasMoreThanOneAction) {
|
|
92
|
-
props.
|
|
102
|
+
props.color = this.color || 'grey-9'
|
|
93
103
|
props.iconRight = this.icon
|
|
94
|
-
props.
|
|
104
|
+
props.label = this.useLabel ? 'Opções' : ''
|
|
95
105
|
} else {
|
|
106
|
+
props.color = this.color || 'primary'
|
|
96
107
|
props.icon = this.actions[this.firstItemKey]?.icon
|
|
97
|
-
props.label = this.
|
|
98
|
-
props.color = 'primary'
|
|
108
|
+
props.label = this.useLabel ? this.tooltipLabel : ''
|
|
99
109
|
}
|
|
100
110
|
|
|
101
111
|
this.hasDelete && Object.assign(props, this.deleteProps)
|
|
@@ -120,6 +130,14 @@ export default {
|
|
|
120
130
|
|
|
121
131
|
hasMoreThanOneAction () {
|
|
122
132
|
return Object.keys(this.list || {}).length + Number(this.hasDelete) > 1
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
hasTooltip () {
|
|
136
|
+
return !this.hasMoreThanOneAction && !this.useLabel
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
tooltipLabel () {
|
|
140
|
+
return this.actions[this.firstItemKey]?.label
|
|
123
141
|
}
|
|
124
142
|
},
|
|
125
143
|
|
|
@@ -4,6 +4,10 @@ meta:
|
|
|
4
4
|
desc: Componente para abrir um menu de ação a partir de um botão, muito utilizado em tela de edição.
|
|
5
5
|
|
|
6
6
|
props:
|
|
7
|
+
color:
|
|
8
|
+
desc: Cor do ícone.
|
|
9
|
+
type: String
|
|
10
|
+
|
|
7
11
|
delete-icon:
|
|
8
12
|
desc: Ícone do botão de deletar.
|
|
9
13
|
default: sym_r_delete
|
|
@@ -44,6 +48,11 @@ props:
|
|
|
44
48
|
default: true
|
|
45
49
|
type: Boolean
|
|
46
50
|
|
|
51
|
+
use-label:
|
|
52
|
+
desc: Habilita ou não o label no botão.
|
|
53
|
+
default: true
|
|
54
|
+
type: Boolean
|
|
55
|
+
|
|
47
56
|
slots:
|
|
48
57
|
'[nome-da-chave]':
|
|
49
58
|
desc: 'Slot dinâmico gerado a partir das chaves dentro do objeto da prop "list"'
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<qas-btn color="grey-7" dense flat icon="sym_r_menu" round @click="toggleMenuDrawer" />
|
|
5
5
|
|
|
6
6
|
<q-toolbar-title>
|
|
7
|
-
<router-link class="flex items-center no-wrap text-no-decoration" :to="rootRoute">
|
|
7
|
+
<router-link class="flex items-center no-wrap text-no-decoration" :class="routerLinkClass" :to="rootRoute">
|
|
8
8
|
<img v-if="brand" :alt="title" class="qas-app-bar__brand" :src="brand">
|
|
9
9
|
<span v-else class="ellipsis text-bold text-primary">{{ title }}</span>
|
|
10
10
|
<q-badge v-if="hasDevelopmentBadge" class="q-ml-sm" color="red" :label="developmentBadgeLabel" />
|
|
@@ -97,6 +97,10 @@ export default {
|
|
|
97
97
|
|
|
98
98
|
rootRoute () {
|
|
99
99
|
return this.$router.hasRoute('Root') ? { name: 'Root' } : { path: '/' }
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
routerLinkClass () {
|
|
103
|
+
return this.$qas.screen.isSmall && 'justify-center'
|
|
100
104
|
}
|
|
101
105
|
},
|
|
102
106
|
|
|
@@ -119,7 +123,7 @@ export default {
|
|
|
119
123
|
}
|
|
120
124
|
|
|
121
125
|
&__brand {
|
|
122
|
-
|
|
126
|
+
max-width: 164px;
|
|
123
127
|
}
|
|
124
128
|
}
|
|
125
129
|
</style>
|
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<q-drawer v-model="model" :behavior="behavior"
|
|
3
|
-
<div class="column full-height justify-between">
|
|
2
|
+
<q-drawer v-model="model" :behavior="behavior" :width="drawerWidth">
|
|
3
|
+
<div class="column full-height justify-between qas-app-menu">
|
|
4
4
|
<div class="full-width">
|
|
5
5
|
<!-- Brand -->
|
|
6
6
|
<div v-if="!$qas.screen.untilLarge" class="q-pt-xl q-px-lg">
|
|
7
7
|
<router-link class="block q-toolbar__title relative-position text-no-decoration" :to="rootRoute">
|
|
8
|
-
<img v-if="brand" :alt="title" class="
|
|
8
|
+
<img v-if="brand" :alt="title" class="qas-app-menu__brand" :src="brand">
|
|
9
9
|
<span v-else class="ellipsis text-bold text-primary">{{ title }}</span>
|
|
10
10
|
<q-badge v-if="hasDevelopmentBadge" color="red" floating :label="developmentBadgeLabel" />
|
|
11
11
|
</router-link>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
14
|
<!-- Module -->
|
|
15
|
-
<div v-if="displayModuleSection" class="q-mt-xl q-px-lg qas-app-menu__module">
|
|
16
|
-
<
|
|
15
|
+
<div v-if="displayModuleSection" class="items-center justify-between no-wrap q-mt-xl q-px-lg qas-app-menu__module row">
|
|
16
|
+
<div class="full-width">
|
|
17
|
+
<qas-select v-model="module" borderless class="q-py-xs qas-app-menu__select shadow-2" dense input-class="q-px-md" :options="defaultModules" :outlined="false" :use-search="false" @update:model-value="redirectHandler(currentModelOption)" />
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div v-if="$qas.screen.isSmall" class="q-ml-xl">
|
|
21
|
+
<qas-btn color="grey-9" dense flat icon="sym_r_close" rounded @click="closeDrawer" />
|
|
22
|
+
</div>
|
|
17
23
|
</div>
|
|
18
24
|
|
|
19
25
|
<!-- Menu -->
|
|
20
26
|
<q-list v-if="items.length" class="q-mt-xl qas-app-menu__menu text-grey-9">
|
|
21
27
|
<template v-for="(menuItem, index) in items">
|
|
22
|
-
<div v-if="hasChildren(menuItem)" :key="`children-${index}`">
|
|
23
|
-
<q-item class="items-center q-pb-none q-pt-md text-weight-bold">
|
|
28
|
+
<div v-if="hasChildren(menuItem)" :key="`children-${index}`" class="qas-app-menu__content">
|
|
29
|
+
<q-item class="items-center q-pb-none q-pt-md qas-app-menu__item qas-app-menu__item--label text-weight-bold">
|
|
24
30
|
{{ menuItem.label }}
|
|
25
31
|
</q-item>
|
|
26
32
|
|
|
27
|
-
<q-item v-for="(menuChildItem, childIndex) in menuItem.children" :key="childIndex" :active="isActive(menuChildItem)" :to="getRouterRedirect(menuChildItem)">
|
|
33
|
+
<q-item v-for="(menuChildItem, childIndex) in menuItem.children" :key="childIndex" :active="isActive(menuChildItem)" class="qas-app-menu__children qas-app-menu__item qas-app-menu__item--children" :to="getRouterRedirect(menuChildItem)">
|
|
28
34
|
<q-item-section v-if="menuChildItem.icon" avatar>
|
|
29
35
|
<q-icon :name="menuChildItem.icon" />
|
|
30
36
|
</q-item-section>
|
|
@@ -35,7 +41,7 @@
|
|
|
35
41
|
</q-item>
|
|
36
42
|
</div>
|
|
37
43
|
|
|
38
|
-
<q-item v-else :key="index" :active="isActive(menuItem)" active-class="q-router-link--active" :to="getRouterRedirect(menuItem)">
|
|
44
|
+
<q-item v-else :key="index" :active="isActive(menuItem)" active-class="q-router-link--active" class="qas-app-menu__item" :to="getRouterRedirect(menuItem)">
|
|
39
45
|
<q-item-section v-if="menuItem.icon" avatar>
|
|
40
46
|
<q-icon :name="menuItem.icon" />
|
|
41
47
|
</q-item-section>
|
|
@@ -165,6 +171,10 @@ export default {
|
|
|
165
171
|
return this.defaultModules.length
|
|
166
172
|
},
|
|
167
173
|
|
|
174
|
+
drawerWidth () {
|
|
175
|
+
return this.$qas.screen.isSmall ? 320 : 280
|
|
176
|
+
},
|
|
177
|
+
|
|
168
178
|
hasDevelopmentBadge () {
|
|
169
179
|
return !!this.developmentBadgeLabel
|
|
170
180
|
},
|
|
@@ -237,6 +247,10 @@ export default {
|
|
|
237
247
|
|
|
238
248
|
signOut () {
|
|
239
249
|
this.$emit('sign-out')
|
|
250
|
+
},
|
|
251
|
+
|
|
252
|
+
closeDrawer () {
|
|
253
|
+
this.$emit('update:modelValue', false)
|
|
240
254
|
}
|
|
241
255
|
}
|
|
242
256
|
}
|
|
@@ -255,6 +269,11 @@ export default {
|
|
|
255
269
|
}
|
|
256
270
|
}
|
|
257
271
|
|
|
272
|
+
&__brand {
|
|
273
|
+
max-width: 208px;
|
|
274
|
+
width: 100%;
|
|
275
|
+
}
|
|
276
|
+
|
|
258
277
|
&__menu .q-item {
|
|
259
278
|
padding-left: var(--qas-spacing-lg);
|
|
260
279
|
}
|
|
@@ -263,6 +282,32 @@ export default {
|
|
|
263
282
|
border-radius: 4px;
|
|
264
283
|
}
|
|
265
284
|
|
|
285
|
+
&__item {
|
|
286
|
+
&:not(&--label) + &:not(&--label) {
|
|
287
|
+
margin-top: var(--qas-spacing-sm);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
&--label {
|
|
291
|
+
margin-bottom: var(--qas-spacing-md);
|
|
292
|
+
min-height: 0;
|
|
293
|
+
padding-top: 0;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
&--children.q-item {
|
|
297
|
+
padding-left: calc(var(--qas-spacing-xl) + var(--qas-spacing-sm));
|
|
298
|
+
|
|
299
|
+
& + & {
|
|
300
|
+
margin-top: var(--qas-spacing-sm);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
&__content + &__content,
|
|
306
|
+
&__item + &__content,
|
|
307
|
+
&__content + &__item {
|
|
308
|
+
margin-top: var(--qas-spacing-lg);
|
|
309
|
+
}
|
|
310
|
+
|
|
266
311
|
// User
|
|
267
312
|
.qas-app-user__data {
|
|
268
313
|
line-height: 1.25;
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
<div class="ellipsis qas-app-user__menu-name">{{ userName }}</div>
|
|
18
18
|
<div class="ellipsis">{{ user.email }}</div>
|
|
19
19
|
|
|
20
|
-
<q-list class="q-mt-
|
|
20
|
+
<q-list class="q-mt-md">
|
|
21
21
|
<q-item v-close-popup :active="false" class="qas-app-user__menu-item" clickable :to="user.to">
|
|
22
22
|
<q-item-section avatar>
|
|
23
|
-
<q-icon name="sym_r_person"
|
|
23
|
+
<q-icon name="sym_r_person" />
|
|
24
24
|
</q-item-section>
|
|
25
25
|
|
|
26
26
|
<q-item-section>Editar</q-item-section>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
<q-item v-if="hasNotifications" v-close-popup class="qas-app-user__menu-item" clickable>
|
|
30
30
|
<q-item-section avatar>
|
|
31
|
-
<q-icon name="sym_r_notifications"
|
|
31
|
+
<q-icon name="sym_r_notifications" />
|
|
32
32
|
</q-item-section>
|
|
33
33
|
|
|
34
34
|
<q-item-section>Notificações</q-item-section>
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
<q-item v-close-popup class="qas-app-user__menu-item" clickable @click="signOut">
|
|
42
42
|
<q-item-section avatar>
|
|
43
|
-
<q-icon name="sym_r_logout"
|
|
43
|
+
<q-icon name="sym_r_logout" />
|
|
44
44
|
</q-item-section>
|
|
45
45
|
|
|
46
46
|
<q-item-section>Sair</q-item-section>
|
|
@@ -130,6 +130,10 @@ export default {
|
|
|
130
130
|
&__menu-item {
|
|
131
131
|
min-height: 36px;
|
|
132
132
|
padding: 0;
|
|
133
|
+
|
|
134
|
+
& + & {
|
|
135
|
+
margin-top: var(--qas-spacing-sm);
|
|
136
|
+
}
|
|
133
137
|
}
|
|
134
138
|
|
|
135
139
|
@media (max-width: $breakpoint-xs) {
|
|
@@ -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
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<qas-uploader ref="uploader" v-model="model" :label="uploadLabel" :readonly="readonly" :use-resize="false"
|
|
3
|
+
<qas-uploader ref="uploader" v-model="model" :label="uploadLabel" v-bind="$attrs" :readonly="readonly" :use-resize="false">
|
|
4
4
|
<template #header="{ scope }">
|
|
5
5
|
<div class="cursor-pointer flex flex-center full-width justify-between no-border no-wrap q-gutter-xs text-white transparent" :class="headerClass" @click="openDialog">
|
|
6
6
|
<div class="col column items-start justify-center">
|
|
@@ -25,11 +25,6 @@
|
|
|
25
25
|
<qas-signature-pad ref="signaturePadModal" v-model:empty="isEmpty" :height="signaturePadHeight" />
|
|
26
26
|
</div>
|
|
27
27
|
</template>
|
|
28
|
-
|
|
29
|
-
<template #actions>
|
|
30
|
-
<qas-btn class="full-width" color="primary" :disable="isEmpty" label="Salvar" no-caps @click="getSignatureData" />
|
|
31
|
-
<qas-btn class="full-width q-mt-sm" color="primary" flat label="Cancelar" no-caps @click="closeSignature" />
|
|
32
|
-
</template>
|
|
33
28
|
</qas-dialog>
|
|
34
29
|
</div>
|
|
35
30
|
</template>
|
|
@@ -111,7 +106,11 @@ export default {
|
|
|
111
106
|
defaultDialogProps () {
|
|
112
107
|
return {
|
|
113
108
|
maxWidth: '620px',
|
|
114
|
-
...this.dialogProps
|
|
109
|
+
...this.dialogProps,
|
|
110
|
+
ok: {
|
|
111
|
+
label: 'Salvar',
|
|
112
|
+
onClick: () => this.getSignatureData()
|
|
113
|
+
}
|
|
115
114
|
}
|
|
116
115
|
},
|
|
117
116
|
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="q-mb-xl qas-welcome text-left">
|
|
3
|
+
<h3 class="text-grey-9 text-h3">
|
|
4
|
+
{{ welcomeMessage }}<span v-if="firstName">, {{ firstName }}</span>
|
|
5
|
+
</h3>
|
|
6
|
+
|
|
7
|
+
<div class="text-caption text-grey-8">{{ currentDay }}</div>
|
|
8
|
+
|
|
9
|
+
<div v-if="hasShortcuts">
|
|
10
|
+
<div class="q-mb-md q-mt-md text-grey-9 text-subtitle2">Atalhos</div>
|
|
11
|
+
|
|
12
|
+
<div class="qas-welcome__container">
|
|
13
|
+
<div ref="scrollArea" class="row" :class="contentClasses">
|
|
14
|
+
<div v-for="(shortcut, index) in shortcuts" :key="index" :class="shortcutClasses">
|
|
15
|
+
<pv-welcome-shortcut-card :shortcut="shortcut" />
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
import PvWelcomeShortcutCard from './private/PvWelcomeShortcutCard.vue'
|
|
25
|
+
|
|
26
|
+
import { date } from 'quasar'
|
|
27
|
+
import dateConfig from '../../shared/date-config.js'
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
name: 'QasWelcome',
|
|
31
|
+
|
|
32
|
+
components: {
|
|
33
|
+
PvWelcomeShortcutCard
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
props: {
|
|
37
|
+
name: {
|
|
38
|
+
default: '',
|
|
39
|
+
type: String
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
shortcuts: {
|
|
43
|
+
type: Array,
|
|
44
|
+
default: () => []
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
computed: {
|
|
49
|
+
contentClasses () {
|
|
50
|
+
return this.$qas.screen.isSmall
|
|
51
|
+
? 'no-wrap overflow-hidden-y q-gutter-x-md q-pb-md q-pt-xs qas-welcome__scroll-area'
|
|
52
|
+
: 'q-col-gutter-md'
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
currentDay () {
|
|
56
|
+
const timeStamp = Date.now()
|
|
57
|
+
const { daysList, monthsList } = dateConfig
|
|
58
|
+
|
|
59
|
+
// exemplo: Quarta-feira, 11 de janeiro de 2023
|
|
60
|
+
return date.formatDate(
|
|
61
|
+
timeStamp, 'dddd, DDD [de] MMMM [de] YYYY', { days: daysList, months: monthsList }
|
|
62
|
+
)
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
firstName () {
|
|
66
|
+
if (!this.name) return ''
|
|
67
|
+
|
|
68
|
+
return this.name.split(' ')?.[0]
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
hasShortcuts () {
|
|
72
|
+
return !!this.shortcuts.length
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
shortcutClasses () {
|
|
76
|
+
return !this.$qas.screen.isSmall && 'col-3 col-lg-2'
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
welcomeMessage () {
|
|
80
|
+
const today = new Date()
|
|
81
|
+
const time = date.formatDate(today, 'HH:mm')
|
|
82
|
+
|
|
83
|
+
if (time >= '05:00' && time < '11:59') return 'Bom dia'
|
|
84
|
+
|
|
85
|
+
if (time >= '12:00' && time < '18:59') return 'Boa tarde'
|
|
86
|
+
|
|
87
|
+
return 'Boa noite'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
</script>
|
|
92
|
+
|
|
93
|
+
<style lang="scss">
|
|
94
|
+
.qas-welcome {
|
|
95
|
+
&__scroll-area {
|
|
96
|
+
-ms-overflow-style: none;
|
|
97
|
+
scrollbar-width: none;
|
|
98
|
+
|
|
99
|
+
&::-webkit-scrollbar {
|
|
100
|
+
display: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
> *:last-child {
|
|
104
|
+
margin-right: var(--qas-spacing-sm);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type: component
|
|
2
|
+
|
|
3
|
+
meta:
|
|
4
|
+
desc: Componente de boas-vindas para ser usado na Home dos sistemas.
|
|
5
|
+
|
|
6
|
+
props:
|
|
7
|
+
name:
|
|
8
|
+
desc: Nome do usuário a ser mostrado na tela.
|
|
9
|
+
type: String
|
|
10
|
+
|
|
11
|
+
shortcuts:
|
|
12
|
+
desc: Lista de cards de atalhos.
|
|
13
|
+
default: []
|
|
14
|
+
type: Array
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component :is="component.is" v-bind="component.props" class="bg-white column pv-welcome-shortcut-card q-pa-md rounded-borders shadow-2 text-no-decoration text-primary">
|
|
3
|
+
<q-icon class="q-pr-xs" :name="shortcut.icon" size="md" />
|
|
4
|
+
|
|
5
|
+
<div class="q-mt-md text-subtitle1">
|
|
6
|
+
{{ shortcut.title }}
|
|
7
|
+
</div>
|
|
8
|
+
</component>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: 'PvWelcomeShortcutCard',
|
|
14
|
+
|
|
15
|
+
props: {
|
|
16
|
+
shortcut: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: () => ({})
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
computed: {
|
|
23
|
+
isExternal () {
|
|
24
|
+
return !!this.shortcut.externalLink
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
component () {
|
|
28
|
+
return {
|
|
29
|
+
is: this.isExternal ? 'a' : 'router-link',
|
|
30
|
+
props: {
|
|
31
|
+
...(!this.isExternal && { to: this.shortcut.to }),
|
|
32
|
+
...(this.isExternal && { href: this.shortcut.externalLink })
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<style lang="scss">
|
|
41
|
+
.pv-welcome-shortcut-card {
|
|
42
|
+
border: 2px solid transparent;
|
|
43
|
+
display: block;
|
|
44
|
+
height: 100%;
|
|
45
|
+
min-height: 124px;
|
|
46
|
+
transition: border-color var(--qas-generic-transition), color var(--qas-generic-transition);
|
|
47
|
+
word-wrap: break-word;
|
|
48
|
+
|
|
49
|
+
&:hover {
|
|
50
|
+
border-color: var(--q-primary-contrast);
|
|
51
|
+
color: var(--q-primary-contrast) !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@media (max-width: $breakpoint-xs) {
|
|
55
|
+
min-width: 154px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
</style>
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
font-weight: 600;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
&:not(&--clickable) {
|
|
9
|
+
color: $grey-8;
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
&.q-router-link--active {
|
|
9
13
|
background-color: transparent !important;
|
|
10
14
|
font-weight: 600;
|
|
@@ -22,10 +26,11 @@
|
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
&--clickable {
|
|
29
|
+
color: $grey-9;
|
|
25
30
|
transition: color 300ms;
|
|
26
31
|
|
|
27
|
-
&:hover {
|
|
28
|
-
color: var(--q-primary);
|
|
32
|
+
&:not(&.q-router-link--active):hover {
|
|
33
|
+
color: var(--q-primary-contrast);
|
|
29
34
|
}
|
|
30
35
|
}
|
|
31
36
|
|
package/src/css/utils/index.scss
CHANGED
|
@@ -47,6 +47,21 @@ $spaces: (
|
|
|
47
47
|
xl: $space-xl
|
|
48
48
|
);
|
|
49
49
|
|
|
50
|
+
$flex-gutter-xs : map.get($space-xs, 'x');
|
|
51
|
+
$flex-gutter-sm : map.get($space-sm, 'x');
|
|
52
|
+
$flex-gutter-md : map.get($space-md, 'x');
|
|
53
|
+
$flex-gutter-lg : map.get($space-lg, 'x');
|
|
54
|
+
$flex-gutter-xl : map.get($space-xl, 'x');
|
|
55
|
+
|
|
56
|
+
$flex-gutter: (
|
|
57
|
+
none: 0,
|
|
58
|
+
xs: $flex-gutter-xs,
|
|
59
|
+
sm: $flex-gutter-sm,
|
|
60
|
+
md: $flex-gutter-md,
|
|
61
|
+
lg: $flex-gutter-lg,
|
|
62
|
+
xl: $flex-gutter-xl
|
|
63
|
+
);
|
|
64
|
+
|
|
50
65
|
:root {
|
|
51
66
|
@each $key, $space in $spaces {
|
|
52
67
|
--qas-spacing-#{$key}: #{map.get($space, 'x')};
|
package/src/mixins/delete.js
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
daysList: [
|
|
3
|
+
'Domingo',
|
|
4
|
+
'Segunda-feira',
|
|
5
|
+
'Terça-feira',
|
|
6
|
+
'Quarta-feira',
|
|
7
|
+
'Quinta-feira',
|
|
8
|
+
'Sexta-feira',
|
|
9
|
+
'Sábado'
|
|
10
|
+
],
|
|
11
|
+
|
|
12
|
+
monthsList: [
|
|
13
|
+
'janeiro',
|
|
14
|
+
'fevereiro',
|
|
15
|
+
'março',
|
|
16
|
+
'abril',
|
|
17
|
+
'maio',
|
|
18
|
+
'junho',
|
|
19
|
+
'julho',
|
|
20
|
+
'agosto',
|
|
21
|
+
'setembro',
|
|
22
|
+
'outubro',
|
|
23
|
+
'novembro',
|
|
24
|
+
'dezembro'
|
|
25
|
+
]
|
|
26
|
+
}
|
package/src/vue-plugin.js
CHANGED
|
@@ -51,6 +51,7 @@ import QasTextTruncate from './components/text-truncate/QasTextTruncate.vue'
|
|
|
51
51
|
import QasTransfer from './components/transfer/QasTransfer.vue'
|
|
52
52
|
import QasTreeGenerator from './components/tree-generator/QasTreeGenerator.vue'
|
|
53
53
|
import QasUploader from './components/uploader/QasUploader.vue'
|
|
54
|
+
import QasWelcome from './components/welcome/QasWelcome.vue'
|
|
54
55
|
|
|
55
56
|
import VueGoogleMaps from '@fawmi/vue-google-maps'
|
|
56
57
|
import { Notify, Quasar, Dialog as QuasarDialog } from 'quasar'
|
|
@@ -125,6 +126,7 @@ function install (app) {
|
|
|
125
126
|
app.component('QasTransfer', QasTransfer)
|
|
126
127
|
app.component('QasTreeGenerator', QasTreeGenerator)
|
|
127
128
|
app.component('QasUploader', QasUploader)
|
|
129
|
+
app.component('QasWelcome', QasWelcome)
|
|
128
130
|
|
|
129
131
|
app.use(Quasar, { plugins: { Notify, QuasarDialog, Dialog } })
|
|
130
132
|
|
|
@@ -200,6 +202,7 @@ export {
|
|
|
200
202
|
QasTransfer,
|
|
201
203
|
QasTreeGenerator,
|
|
202
204
|
QasUploader,
|
|
205
|
+
QasWelcome,
|
|
203
206
|
|
|
204
207
|
// plugins
|
|
205
208
|
Dialog,
|