@bildvitta/quasar-ui-asteroid 3.0.0-alpha.2 → 3.0.0-beta.2
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/dist/api/QasDelete.json +5 -0
- package/dist/api/QasFilters.json +4 -0
- package/dist/api/QasFormView.json +6 -4
- package/dist/api/QasInput.json +16 -1
- package/dist/api/QasPasswordInput.json +2 -1
- package/dist/api/QasSignatureUploader.json +7 -0
- package/dist/asteroid.cjs.css +1 -1
- package/dist/asteroid.cjs.js +469 -281
- package/dist/asteroid.cjs.min.js +2 -2
- package/dist/asteroid.esm.css +1 -1
- package/dist/asteroid.esm.js +472 -283
- package/dist/asteroid.esm.min.js +2 -2
- package/dist/asteroid.umd.css +1 -1
- package/dist/asteroid.umd.js +472 -283
- package/dist/asteroid.umd.min.js +2 -2
- package/dist/vetur/asteroid-attributes.json +27 -3
- package/dist/vetur/asteroid-tags.json +9 -3
- package/package.json +1 -1
- package/src/asteroid.js +1 -0
- package/src/components/actions-menu/QasActionsMenu.vue +3 -5
- package/src/components/btn/QasBtn.vue +6 -4
- package/src/components/delete/QasDelete.vue +23 -1
- package/src/components/delete/QasDelete.yml +4 -0
- package/src/components/dialog/QasDialog.vue +2 -2
- package/src/components/field/QasField.vue +1 -2
- package/src/components/filters/QasFilters.vue +6 -2
- package/src/components/filters/QasFilters.yml +4 -0
- package/src/components/form-view/QasFormView.vue +10 -10
- package/src/components/form-view/QasFormView.yml +8 -3
- package/src/components/input/QasInput.vue +43 -2
- package/src/components/input/QasInput.yml +13 -1
- package/src/components/nested-fields/QasNestedFields.vue +47 -35
- package/src/components/page-header/QasPageHeader.vue +4 -2
- package/src/components/password-input/QasPasswordInput.vue +17 -26
- package/src/components/password-input/QasPasswordInput.yml +1 -1
- package/src/components/search-box/QasSearchBox.vue +6 -1
- package/src/components/select-list/QasSelectList.vue +10 -8
- package/src/components/signature-uploader/QasSignatureUploader.vue +38 -2
- package/src/components/signature-uploader/QasSignatureUploader.yml +5 -0
- package/src/components/table-generator/QasTableGenerator.vue +2 -2
- package/src/components/transfer/QasTransfer.vue +9 -7
- package/src/components/uploader/QasUploader.vue +1 -2
- package/src/composables/index.js +1 -0
- package/src/composables/useHistory.js +46 -0
- package/src/directives/Test.js +13 -0
- package/src/helpers/filter-list-by-handle.js +31 -0
- package/src/helpers/filter-object-to-array.js +29 -0
- package/src/helpers/filter-object.js +2 -3
- package/src/helpers/index.js +2 -0
- package/src/index.scss +3 -2
- package/src/mixins/view.js +2 -0
- package/src/pages/Forbidden.vue +12 -0
- package/src/pages/NotFound.vue +12 -0
- package/src/plugins/index.js +2 -0
- package/src/plugins/screen/Screen.js +30 -0
- package/src/plugins/screen/Screen.yml +16 -0
- package/src/vue-plugin.js +12 -3
- package/src/css/transitions.scss +0 -12
- package/src/store/history.js +0 -43
- package/src/store/index.js +0 -1
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
<script>
|
|
18
18
|
import { castArray } from 'lodash-es'
|
|
19
|
-
import {
|
|
19
|
+
import { useHistory } from '../../composables'
|
|
20
|
+
|
|
21
|
+
const { hasPreviousRoute, history, getPreviousRoute } = useHistory()
|
|
20
22
|
|
|
21
23
|
export default {
|
|
22
24
|
name: 'QasPageHeader',
|
|
@@ -45,7 +47,7 @@ export default {
|
|
|
45
47
|
|
|
46
48
|
computed: {
|
|
47
49
|
hasPreviousRoute () {
|
|
48
|
-
return
|
|
50
|
+
return hasPreviousRoute.value
|
|
49
51
|
},
|
|
50
52
|
|
|
51
53
|
transformedBreadcrumbs () {
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<qas-input v-model="model" bottom-slots v-bind="$attrs" remove-error-on-type :type="type">
|
|
4
|
+
<template #append>
|
|
5
|
+
<q-icon class="cursor-pointer" :color="iconColor" :name="icon" @click="toggle" />
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<template v-for="(_, name) in $slots" #[name]="context">
|
|
9
|
+
<slot :name="name" v-bind="context || {}" />
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<template v-if="!hideStrengthChecker" #hint>
|
|
13
|
+
<qas-password-strength-checker v-bind="strengthCheckerProps" :password="model" />
|
|
14
|
+
</template>
|
|
15
|
+
</qas-input>
|
|
16
|
+
</div>
|
|
15
17
|
</template>
|
|
16
18
|
|
|
17
19
|
<script>
|
|
@@ -28,9 +30,8 @@ export default {
|
|
|
28
30
|
mixins: [passwordMixin],
|
|
29
31
|
|
|
30
32
|
props: {
|
|
31
|
-
|
|
32
|
-
type: Boolean
|
|
33
|
-
default: true
|
|
33
|
+
hideStrengthChecker: {
|
|
34
|
+
type: Boolean
|
|
34
35
|
},
|
|
35
36
|
|
|
36
37
|
iconColor: {
|
|
@@ -48,7 +49,6 @@ export default {
|
|
|
48
49
|
|
|
49
50
|
data () {
|
|
50
51
|
return {
|
|
51
|
-
key: 'error',
|
|
52
52
|
toggleType: true
|
|
53
53
|
}
|
|
54
54
|
},
|
|
@@ -78,15 +78,6 @@ export default {
|
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
|
|
81
|
-
watch: {
|
|
82
|
-
modelValue () {
|
|
83
|
-
if (this.$attrs.error) {
|
|
84
|
-
this.$attrs.error = false
|
|
85
|
-
this.$attrs.errorMessage = ''
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
|
|
90
81
|
methods: {
|
|
91
82
|
toggle () {
|
|
92
83
|
this.toggleType = !this.toggleType
|
|
@@ -125,6 +125,7 @@ export default {
|
|
|
125
125
|
this.fuse = new Fuse(value, this.defaultFuseOptions)
|
|
126
126
|
|
|
127
127
|
this.setResults(this.search)
|
|
128
|
+
this.updateResultsModel(value)
|
|
128
129
|
},
|
|
129
130
|
|
|
130
131
|
deep: true
|
|
@@ -141,7 +142,7 @@ export default {
|
|
|
141
142
|
|
|
142
143
|
searchResults: {
|
|
143
144
|
handler (value) {
|
|
144
|
-
this
|
|
145
|
+
this.updateResultsModel(value)
|
|
145
146
|
},
|
|
146
147
|
immediate: true
|
|
147
148
|
}
|
|
@@ -158,6 +159,10 @@ export default {
|
|
|
158
159
|
this.searchResults = value
|
|
159
160
|
? this.fuse.search(value)
|
|
160
161
|
: this.list
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
updateResultsModel (value) {
|
|
165
|
+
this.$emit('update:results', value.map(result => result.item || result))
|
|
161
166
|
}
|
|
162
167
|
}
|
|
163
168
|
}
|
|
@@ -119,15 +119,17 @@ export default {
|
|
|
119
119
|
immediate: true
|
|
120
120
|
},
|
|
121
121
|
|
|
122
|
-
modelValue
|
|
123
|
-
|
|
122
|
+
modelValue: {
|
|
123
|
+
handler (value) {
|
|
124
|
+
this.values = [...value]
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
immediate: true
|
|
124
128
|
}
|
|
125
129
|
},
|
|
126
130
|
|
|
127
131
|
created () {
|
|
128
|
-
this.
|
|
129
|
-
|
|
130
|
-
this.handleOptions()
|
|
132
|
+
this.handleList()
|
|
131
133
|
},
|
|
132
134
|
|
|
133
135
|
methods: {
|
|
@@ -155,7 +157,7 @@ export default {
|
|
|
155
157
|
return this.values.includes(item.value) ? this.remove(item) : this.add(item)
|
|
156
158
|
},
|
|
157
159
|
|
|
158
|
-
|
|
160
|
+
handleList () {
|
|
159
161
|
if (this.modelValue.length) {
|
|
160
162
|
return this.sortList()
|
|
161
163
|
}
|
|
@@ -186,8 +188,8 @@ export default {
|
|
|
186
188
|
|
|
187
189
|
sortList () {
|
|
188
190
|
this.sortedList = this.deleteOnly
|
|
189
|
-
? this.list.filter(
|
|
190
|
-
: sortBy(this.list,
|
|
191
|
+
? this.list.filter(item => this.modelValue.includes(item.value))
|
|
192
|
+
: sortBy(this.list, item => !this.modelValue.includes(item.value))
|
|
191
193
|
},
|
|
192
194
|
|
|
193
195
|
updateModel (model) {
|
|
@@ -15,13 +15,15 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
</qas-uploader>
|
|
17
17
|
|
|
18
|
-
<qas-dialog v-model="isOpenedDialog">
|
|
18
|
+
<qas-dialog v-model="isOpenedDialog" v-bind="defaultDialogProps">
|
|
19
19
|
<template #header>
|
|
20
20
|
<div class="text-bold text-center">Insira sua assinatura digital no campo abaixo</div>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<template #description>
|
|
24
|
-
<
|
|
24
|
+
<div :style="signaturePadWidth">
|
|
25
|
+
<qas-signature-pad ref="signaturePadModal" v-model:empty="isEmpty" :height="signaturePadHeight" />
|
|
26
|
+
</div>
|
|
25
27
|
</template>
|
|
26
28
|
|
|
27
29
|
<template #actions>
|
|
@@ -36,6 +38,7 @@
|
|
|
36
38
|
import QasDialog from '../dialog/QasDialog.vue'
|
|
37
39
|
import QasUploader from '../uploader/QasUploader.vue'
|
|
38
40
|
import QasSignaturePad from '../signature-pad/QasSignaturePad.vue'
|
|
41
|
+
import { screenMixin } from '../../mixins'
|
|
39
42
|
import { base64ToBlob } from '../../helpers'
|
|
40
43
|
import { NotifyError } from '../../plugins'
|
|
41
44
|
|
|
@@ -48,7 +51,14 @@ export default {
|
|
|
48
51
|
QasSignaturePad
|
|
49
52
|
},
|
|
50
53
|
|
|
54
|
+
mixins: [screenMixin],
|
|
55
|
+
|
|
51
56
|
props: {
|
|
57
|
+
dialogProps: {
|
|
58
|
+
type: Object,
|
|
59
|
+
default: () => ({})
|
|
60
|
+
},
|
|
61
|
+
|
|
52
62
|
uploadLabel: {
|
|
53
63
|
default: '',
|
|
54
64
|
type: String
|
|
@@ -97,6 +107,32 @@ export default {
|
|
|
97
107
|
|
|
98
108
|
headerClass () {
|
|
99
109
|
return `q-pa-${this.readonly ? 'md' : 'sm'}`
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
defaultDialogProps () {
|
|
113
|
+
return {
|
|
114
|
+
maxWidth: '620px',
|
|
115
|
+
...this.dialogProps
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
signaturePadWidth () {
|
|
120
|
+
const sizes = {
|
|
121
|
+
[this.mx_isSmall]: { width: '100%' },
|
|
122
|
+
[this.mx_isMedium]: { width: '570px' },
|
|
123
|
+
[this.mx_isLarge]: { width: '350px' }
|
|
124
|
+
}
|
|
125
|
+
return sizes.true
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
signaturePadHeight () {
|
|
129
|
+
const sizes = {
|
|
130
|
+
[this.mx_isSmall]: '250',
|
|
131
|
+
[this.mx_isMedium]: '400',
|
|
132
|
+
[this.mx_isLarge]: '250'
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return sizes.true
|
|
100
136
|
}
|
|
101
137
|
},
|
|
102
138
|
|
|
@@ -4,6 +4,11 @@ meta:
|
|
|
4
4
|
desc: Componente que implementa o "QasUploader" e "QasSignaturePad" para fazer upload de assinatura.
|
|
5
5
|
|
|
6
6
|
props:
|
|
7
|
+
dialog-props:
|
|
8
|
+
desc: Repassa propriedades para o "QasDialog".
|
|
9
|
+
type: Object
|
|
10
|
+
default: { maxWidth: '620px' }
|
|
11
|
+
|
|
7
12
|
upload-label:
|
|
8
13
|
desc: Rótulo do uploader.
|
|
9
14
|
type: String
|
|
@@ -190,8 +190,8 @@ export default {
|
|
|
190
190
|
},
|
|
191
191
|
|
|
192
192
|
getFullTableWidth () {
|
|
193
|
-
const
|
|
194
|
-
return
|
|
193
|
+
const tableElement = this.getTableElement()
|
|
194
|
+
return tableElement?.getBoundingClientRect?.()?.width
|
|
195
195
|
},
|
|
196
196
|
|
|
197
197
|
getContainerTableWidth () {
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
<div class="col-12 col-sm">
|
|
5
5
|
<qas-label :label="label" :quantity="optionsList.length" />
|
|
6
6
|
|
|
7
|
-
<qas-search-box
|
|
8
|
-
<template #default
|
|
7
|
+
<qas-search-box v-model:results="firstResults" :list="optionsList" outlined v-bind="searchBoxProps">
|
|
8
|
+
<template #default>
|
|
9
9
|
<q-list separator>
|
|
10
|
-
<q-item v-for="(item, index) in
|
|
10
|
+
<q-item v-for="(item, index) in firstResults" :key="index" :class="getItemClass(item, true)" clickable @click="onSelectQueue(item, true)">
|
|
11
11
|
<slot name="item-first-column">
|
|
12
12
|
<q-item-section>{{ getItemLabel(item) }}</q-item-section>
|
|
13
13
|
</slot>
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
<div class="col-12 col-sm">
|
|
34
34
|
<qas-label label="Selecionadas" :quantity="selectedList.length" />
|
|
35
35
|
|
|
36
|
-
<qas-search-box v-bind="searchBoxProps" empty-list-height="300px"
|
|
37
|
-
<template #default
|
|
36
|
+
<qas-search-box v-model:results="secondResults" v-bind="searchBoxProps" empty-list-height="300px" label="Selecionadas" :list="selectedList" outlined>
|
|
37
|
+
<template #default>
|
|
38
38
|
<q-list separator>
|
|
39
|
-
<q-item v-for="(item, index) in
|
|
39
|
+
<q-item v-for="(item, index) in secondResults" :key="index" :class="getItemClass(item)" clickable @click="onSelectQueue(item)">
|
|
40
40
|
<slot name="item-second-column">
|
|
41
41
|
<q-item-section>{{ getItemLabel(item) }}</q-item-section>
|
|
42
42
|
</slot>
|
|
@@ -116,7 +116,9 @@ export default {
|
|
|
116
116
|
firstQueue: [],
|
|
117
117
|
optionsList: [],
|
|
118
118
|
secondQueue: [],
|
|
119
|
-
selectedList: []
|
|
119
|
+
selectedList: [],
|
|
120
|
+
firstResults: [],
|
|
121
|
+
secondResults: []
|
|
120
122
|
}
|
|
121
123
|
},
|
|
122
124
|
|
|
@@ -62,7 +62,6 @@ import { NotifyError } from '../../plugins'
|
|
|
62
62
|
import { getImageSize, getResizeDimensions } from '../../helpers/images'
|
|
63
63
|
|
|
64
64
|
import Pica from 'pica'
|
|
65
|
-
import api from 'axios'
|
|
66
65
|
|
|
67
66
|
export default {
|
|
68
67
|
name: 'QasUploader',
|
|
@@ -257,7 +256,7 @@ export default {
|
|
|
257
256
|
this.isFetching = true
|
|
258
257
|
|
|
259
258
|
try {
|
|
260
|
-
const { data } = await
|
|
259
|
+
const { data } = await this.$axios.post('/upload-credentials/', {
|
|
261
260
|
entity: this.entity,
|
|
262
261
|
filename
|
|
263
262
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as useHistory } from './useHistory.js'
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { reactive, computed } from 'vue'
|
|
2
|
+
import { findLastIndex } from 'lodash-es'
|
|
3
|
+
|
|
4
|
+
const history = reactive({ list: [] })
|
|
5
|
+
|
|
6
|
+
export default function () {
|
|
7
|
+
const hasPreviousRoute = computed(() => history.list.length > 1)
|
|
8
|
+
|
|
9
|
+
function getPreviousRoute (currentRoute) {
|
|
10
|
+
const index = findLastIndex(history.list, item => item.name === currentRoute.name)
|
|
11
|
+
|
|
12
|
+
if (~index) {
|
|
13
|
+
history.list.splice(index, 1)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return history.list[history.list.length - 1]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function addRoute (route) {
|
|
20
|
+
const routeExistsInList = history.list?.[history.list?.length - 1]?.name === route.name
|
|
21
|
+
|
|
22
|
+
if (routeExistsInList) return
|
|
23
|
+
|
|
24
|
+
history.list.push(route)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function destroyRoutes (routes) {
|
|
28
|
+
if (!history.list.length) return null
|
|
29
|
+
|
|
30
|
+
routes.forEach(route => {
|
|
31
|
+
const index = history.list.findIndex(item => item.name === route.name)
|
|
32
|
+
|
|
33
|
+
if (~index) {
|
|
34
|
+
history.list.splice(index, 1)
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
history,
|
|
41
|
+
hasPreviousRoute,
|
|
42
|
+
getPreviousRoute,
|
|
43
|
+
addRoute,
|
|
44
|
+
destroyRoutes
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Função para filtrar um array de objeto, usando a logica na propriedade `handle
|
|
3
|
+
* e adicionando o que tem dentro da propriedade `item`.
|
|
4
|
+
*
|
|
5
|
+
* @param {Object[]} list Array de objetos, contendo `handle` e `item`.
|
|
6
|
+
* @returns {Array}
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* filterListByHandle(
|
|
10
|
+
* [
|
|
11
|
+
* {
|
|
12
|
+
* handle: true,
|
|
13
|
+
* item: 'item 1'
|
|
14
|
+
* },
|
|
15
|
+
* {
|
|
16
|
+
* handle: false,
|
|
17
|
+
* item: 'item 2'
|
|
18
|
+
* }
|
|
19
|
+
* ) // retorna ['item 1']
|
|
20
|
+
*/
|
|
21
|
+
export default function (list = []) {
|
|
22
|
+
const formattedList = []
|
|
23
|
+
|
|
24
|
+
list.forEach(itemList => {
|
|
25
|
+
if (itemList.handle) {
|
|
26
|
+
formattedList.push(itemList.item)
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
return formattedList
|
|
31
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Função para filtrar um objeto, transformando cada chave em um item do array caso
|
|
3
|
+
* o valor referente a chave seja true.
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} object Objeto contendo propriedades a serem adicionadas.
|
|
6
|
+
* @returns {string[]}
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* filterObjectToArray(
|
|
10
|
+
* {
|
|
11
|
+
* item1: true,
|
|
12
|
+
* item2: false,
|
|
13
|
+
* item3: '',
|
|
14
|
+
* item4: 'str',
|
|
15
|
+
* }
|
|
16
|
+
* ) // retorna: ['item1', 'item4']
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export default function (object = {}) {
|
|
20
|
+
const list = []
|
|
21
|
+
|
|
22
|
+
for (const key in object) {
|
|
23
|
+
if (object[key]) {
|
|
24
|
+
list.push(key)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return list
|
|
29
|
+
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Função para filtrar propriedades espessificas dentro de um objeto
|
|
2
|
+
* Função para filtrar propriedades especificas dentro de um objeto
|
|
4
3
|
*
|
|
5
4
|
* @param {object} fields objeto com propriedades
|
|
6
|
-
* @param {array} models array de string com nomes das
|
|
5
|
+
* @param {array} models array de string com nomes das propriedades que serão filtradas
|
|
7
6
|
* @returns {object} objeto com propriedades filtradas
|
|
8
7
|
*
|
|
9
8
|
* @example
|
package/src/helpers/index.js
CHANGED
|
@@ -6,6 +6,8 @@ export { default as base64ToBlob } from './base-64-to-blob.js'
|
|
|
6
6
|
export { default as constructObject } from './construct-object.js'
|
|
7
7
|
export { default as filterObject } from './filter-object.js'
|
|
8
8
|
export { default as getGreatestCommonDivisor } from './get-greatest-common-divisor.js'
|
|
9
|
+
export { default as filterObjectToArray } from './filter-object-to-array.js'
|
|
10
|
+
export { default as filterListByHandle } from './filter-list-by-handle.js'
|
|
9
11
|
|
|
10
12
|
export * from './filters.js'
|
|
11
13
|
export * from './images.js'
|
package/src/index.scss
CHANGED
|
@@ -8,10 +8,12 @@ $secondary-contrast: var(--q-secondary-contrast);
|
|
|
8
8
|
|
|
9
9
|
// Asteroid variables
|
|
10
10
|
:root {
|
|
11
|
-
--qas-background-color: #
|
|
11
|
+
--qas-background-color: #f5f5f5;
|
|
12
|
+
--qas-generic-border-radius: 8px;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
$background-color: var(--qas-background-color);
|
|
16
|
+
$generic-border-radius: var(--qas-generic-border-radius);
|
|
15
17
|
|
|
16
18
|
@import './css/background';
|
|
17
19
|
@import './css/border';
|
|
@@ -22,7 +24,6 @@ $background-color: var(--qas-background-color);
|
|
|
22
24
|
@import './css/opacity';
|
|
23
25
|
@import './css/shadow';
|
|
24
26
|
@import './css/text';
|
|
25
|
-
@import './css/transitions';
|
|
26
27
|
@import './css/unset';
|
|
27
28
|
|
|
28
29
|
// Design System
|
package/src/mixins/view.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="fixed-center text-center">
|
|
3
|
+
<p class="q-my-lg text-faded">Ops, você não tem permissão para acessar esta página <strong>(403).</strong></p>
|
|
4
|
+
<q-btn color="primary" flat @click="$router.push('/')">Voltar</q-btn>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
export default {
|
|
10
|
+
name: 'Forbidden'
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="fixed-center text-center">
|
|
3
|
+
<p class="q-my-lg text-faded">Ops, nada aqui... <strong>(404)</strong></p>
|
|
4
|
+
<q-btn color="primary" flat @click="$router.push('/')">Voltar</q-btn>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
export default {
|
|
10
|
+
name: 'NotFound'
|
|
11
|
+
}
|
|
12
|
+
</script>
|
package/src/plugins/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import Dialog from './dialog/Dialog.js'
|
|
2
2
|
import NotifyError from './notify-error/NotifyError.js'
|
|
3
3
|
import NotifySuccess from './notify-success/NotifySuccess.js'
|
|
4
|
+
import Screen from './screen/Screen.js'
|
|
4
5
|
|
|
5
6
|
export {
|
|
6
7
|
Dialog,
|
|
7
8
|
NotifyError,
|
|
9
|
+
Screen,
|
|
8
10
|
NotifySuccess
|
|
9
11
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Screen, Platform } from 'quasar'
|
|
2
|
+
|
|
3
|
+
export default () => {
|
|
4
|
+
const screensModel = {
|
|
5
|
+
isSmall: () => Screen.xs,
|
|
6
|
+
isMedium: () => Screen.sm,
|
|
7
|
+
isLarge: () => Screen.gt.sm,
|
|
8
|
+
untilMedium: () => Screen.lt.sm,
|
|
9
|
+
untilLarge: () => Screen.lt.md,
|
|
10
|
+
|
|
11
|
+
// Plataforma
|
|
12
|
+
isMobile: () => Platform.is.mobile || false
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const screens = {}
|
|
16
|
+
|
|
17
|
+
for (const key in screensModel) {
|
|
18
|
+
// infelizmente esta é a única forma que conseguimos para que nossa função se tornasse reativa na view
|
|
19
|
+
// é como o próprio quasar implementa
|
|
20
|
+
Object.defineProperty(screens, key, {
|
|
21
|
+
get () {
|
|
22
|
+
return screensModel[key]()
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
enumerable: true
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return screens
|
|
30
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type: component
|
|
2
|
+
|
|
3
|
+
meta:
|
|
4
|
+
desc: Plugin que implementa o "Screen" do quasar.
|
|
5
|
+
|
|
6
|
+
inject:
|
|
7
|
+
'this.$qas.screen':
|
|
8
|
+
type: Object
|
|
9
|
+
debugger: true
|
|
10
|
+
default:
|
|
11
|
+
isSmall: false
|
|
12
|
+
isMedium: false
|
|
13
|
+
isLarge: false
|
|
14
|
+
untilMedium: false
|
|
15
|
+
untilLarge: false
|
|
16
|
+
isMobile: false
|
package/src/vue-plugin.js
CHANGED
|
@@ -50,14 +50,19 @@ import QasUploader from './components/uploader/QasUploader.vue'
|
|
|
50
50
|
import VueGoogleMaps from '@fawmi/vue-google-maps'
|
|
51
51
|
import { Notify, Quasar, Dialog as QuasarDialog } from 'quasar'
|
|
52
52
|
|
|
53
|
+
// Plugins
|
|
53
54
|
import {
|
|
54
55
|
Dialog,
|
|
55
56
|
NotifyError,
|
|
56
|
-
NotifySuccess
|
|
57
|
+
NotifySuccess,
|
|
58
|
+
Screen
|
|
57
59
|
} from './plugins'
|
|
58
60
|
|
|
59
61
|
import packageInfo from '../package.json'
|
|
60
62
|
|
|
63
|
+
// Directives
|
|
64
|
+
import Test from './directives/Test.js'
|
|
65
|
+
|
|
61
66
|
const version = packageInfo.version
|
|
62
67
|
|
|
63
68
|
function install (app) {
|
|
@@ -119,8 +124,11 @@ function install (app) {
|
|
|
119
124
|
app.config.globalProperties.$qas = {
|
|
120
125
|
dialog: Dialog,
|
|
121
126
|
error: NotifyError,
|
|
122
|
-
success: NotifySuccess
|
|
127
|
+
success: NotifySuccess,
|
|
128
|
+
screen: Screen()
|
|
123
129
|
}
|
|
130
|
+
|
|
131
|
+
app.directive(Test.name, Test)
|
|
124
132
|
}
|
|
125
133
|
|
|
126
134
|
export {
|
|
@@ -176,10 +184,11 @@ export {
|
|
|
176
184
|
QasTransfer,
|
|
177
185
|
QasUploader,
|
|
178
186
|
|
|
179
|
-
//
|
|
187
|
+
// plugins
|
|
180
188
|
Dialog,
|
|
181
189
|
NotifyError,
|
|
182
190
|
NotifySuccess,
|
|
191
|
+
Screen,
|
|
183
192
|
|
|
184
193
|
install
|
|
185
194
|
}
|
package/src/css/transitions.scss
DELETED