@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
|
@@ -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;
|
|
@@ -21,11 +25,12 @@
|
|
|
21
25
|
}
|
|
22
26
|
}
|
|
23
27
|
|
|
24
|
-
&--clickable {
|
|
28
|
+
&--clickable:not(&--active) {
|
|
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
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@mixin set-typography($name, $important: false) {
|
|
4
|
+
font-size: if($important, map.get($name, 'size') !important, map.get($name, 'size'));
|
|
5
|
+
font-weight: if($important, map.get($name, 'weight') !important, map.get($name, 'weight'));
|
|
6
|
+
letter-spacing: if($important, map.get($name, 'letter-spacing') !important, map.get($name, 'letter-spacing'));
|
|
7
|
+
line-height: if($important, map.get($name, 'line-height') !important, map.get($name, 'line-height'));
|
|
8
|
+
}
|
|
@@ -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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Notify } from 'quasar'
|
|
2
2
|
import notifyConfig from '../../shared/notify-config.js'
|
|
3
3
|
|
|
4
|
-
Notify.registerType('error', { icon: '
|
|
4
|
+
Notify.registerType('error', { icon: 'sym_r_cancel', ...notifyConfig })
|
|
5
5
|
|
|
6
6
|
export default (message, caption) => {
|
|
7
7
|
Notify.create({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Notify } from 'quasar'
|
|
2
2
|
import notifyConfig from '../../shared/notify-config.js'
|
|
3
3
|
|
|
4
|
-
Notify.registerType('success', { icon: '
|
|
4
|
+
Notify.registerType('success', { icon: 'sym_r_check_circle', ...notifyConfig })
|
|
5
5
|
|
|
6
6
|
export default (message, caption) => {
|
|
7
7
|
Notify.create({
|
|
@@ -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
|
@@ -22,6 +22,7 @@ import QasFormGenerator from './components/form-generator/QasFormGenerator.vue'
|
|
|
22
22
|
import QasFormView from './components/form-view/QasFormView.vue'
|
|
23
23
|
import QasGallery from './components/gallery/QasGallery.vue'
|
|
24
24
|
import QasGridGenerator from './components/grid-generator/QasGridGenerator.vue'
|
|
25
|
+
import QasHeaderActions from './components/header-actions/QasHeaderActions.vue'
|
|
25
26
|
import QasInput from './components/input/QasInput.vue'
|
|
26
27
|
import QasLabel from './components/label/QasLabel.vue'
|
|
27
28
|
import QasLayout from './components/layout/QasLayout.vue'
|
|
@@ -50,6 +51,7 @@ import QasTextTruncate from './components/text-truncate/QasTextTruncate.vue'
|
|
|
50
51
|
import QasTransfer from './components/transfer/QasTransfer.vue'
|
|
51
52
|
import QasTreeGenerator from './components/tree-generator/QasTreeGenerator.vue'
|
|
52
53
|
import QasUploader from './components/uploader/QasUploader.vue'
|
|
54
|
+
import QasWelcome from './components/welcome/QasWelcome.vue'
|
|
53
55
|
|
|
54
56
|
import VueGoogleMaps from '@fawmi/vue-google-maps'
|
|
55
57
|
import { Notify, Quasar, Dialog as QuasarDialog } from 'quasar'
|
|
@@ -95,6 +97,7 @@ function install (app) {
|
|
|
95
97
|
app.component('QasFormView', QasFormView)
|
|
96
98
|
app.component('QasGallery', QasGallery)
|
|
97
99
|
app.component('QasGridGenerator', QasGridGenerator)
|
|
100
|
+
app.component('QasHeaderActions', QasHeaderActions)
|
|
98
101
|
app.component('QasInput', QasInput)
|
|
99
102
|
app.component('QasLabel', QasLabel)
|
|
100
103
|
app.component('QasLayout', QasLayout)
|
|
@@ -123,6 +126,7 @@ function install (app) {
|
|
|
123
126
|
app.component('QasTransfer', QasTransfer)
|
|
124
127
|
app.component('QasTreeGenerator', QasTreeGenerator)
|
|
125
128
|
app.component('QasUploader', QasUploader)
|
|
129
|
+
app.component('QasWelcome', QasWelcome)
|
|
126
130
|
|
|
127
131
|
app.use(Quasar, { plugins: { Notify, QuasarDialog, Dialog } })
|
|
128
132
|
|
|
@@ -169,6 +173,7 @@ export {
|
|
|
169
173
|
QasFormView,
|
|
170
174
|
QasGallery,
|
|
171
175
|
QasGridGenerator,
|
|
176
|
+
QasHeaderActions,
|
|
172
177
|
QasInput,
|
|
173
178
|
QasLabel,
|
|
174
179
|
QasLayout,
|
|
@@ -197,6 +202,7 @@ export {
|
|
|
197
202
|
QasTransfer,
|
|
198
203
|
QasTreeGenerator,
|
|
199
204
|
QasUploader,
|
|
205
|
+
QasWelcome,
|
|
200
206
|
|
|
201
207
|
// plugins
|
|
202
208
|
Dialog,
|