@bildvitta/quasar-ui-asteroid 3.0.0-beta.7 → 3.0.0-beta.8
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/QasSearchBox.json +5 -2
- package/dist/api/QasSelect.json +2 -8
- package/dist/asteroid.cjs.js +9 -17
- package/dist/asteroid.cjs.min.js +2 -2
- package/dist/asteroid.esm.css +1 -1
- package/dist/asteroid.esm.js +9 -17
- package/dist/asteroid.esm.min.js +2 -2
- package/dist/asteroid.umd.js +9 -17
- package/dist/asteroid.umd.min.js +2 -2
- package/package.json +1 -1
- package/src/components/search-box/QasSearchBox.vue +1 -6
- package/src/components/search-box/QasSearchBox.yml +3 -1
- package/src/components/select/QasSelect.vue +1 -7
- package/src/components/select/QasSelect.yml +1 -7
- package/src/components/table-generator/QasTableGenerator.vue +2 -1
- package/src/mixins/view.js +3 -1
- package/src/pages/Forbidden.vue +3 -1
- package/src/pages/NotFound.vue +3 -1
- package/src/pages/ServerError.vue +3 -1
- package/src/pages/Unauthorized.vue +28 -0
package/package.json
CHANGED
|
@@ -94,13 +94,8 @@ export default {
|
|
|
94
94
|
|
|
95
95
|
defaultFuseOptions () {
|
|
96
96
|
return {
|
|
97
|
-
distance: 100,
|
|
98
|
-
location: 0,
|
|
99
|
-
maxPatternLength: 32,
|
|
100
|
-
minMatchCharLength: 1,
|
|
101
|
-
shouldSort: true,
|
|
102
97
|
threshold: 0.1,
|
|
103
|
-
|
|
98
|
+
ignoreLocation: true,
|
|
104
99
|
|
|
105
100
|
...this.fuseOptions
|
|
106
101
|
}
|
|
@@ -11,10 +11,12 @@ props:
|
|
|
11
11
|
|
|
12
12
|
fuse-options:
|
|
13
13
|
desc: Opções do Fuse.js (https://fusejs.io/api/options.html).
|
|
14
|
-
default: "{ distance: 100, location: 0, maxPatternLength: 32, minMatchCharLength: 1, shouldSort: true, threshold: 0.1, tokenize: true }"
|
|
15
14
|
debugger: true
|
|
16
15
|
type: Object
|
|
17
16
|
examples: ["{ keys: ['label'] }"]
|
|
17
|
+
default:
|
|
18
|
+
ignoreLocation: true
|
|
19
|
+
threshold: 0.1
|
|
18
20
|
|
|
19
21
|
height:
|
|
20
22
|
desc: Define altura do box quando a lista não está vazia.
|
|
@@ -90,15 +90,9 @@ export default {
|
|
|
90
90
|
|
|
91
91
|
defaultFuseOptions () {
|
|
92
92
|
return {
|
|
93
|
-
|
|
94
|
-
includeScore: true,
|
|
93
|
+
ignoreLocation: true,
|
|
95
94
|
keys: ['label', 'value'],
|
|
96
|
-
location: 0,
|
|
97
|
-
maxPatternLength: 32,
|
|
98
|
-
minMatchCharLength: 1,
|
|
99
|
-
shouldSort: true,
|
|
100
95
|
threshold: 0.1,
|
|
101
|
-
tokenize: true,
|
|
102
96
|
|
|
103
97
|
...this.fuseOptions
|
|
104
98
|
}
|
|
@@ -12,15 +12,9 @@ props:
|
|
|
12
12
|
type: Object
|
|
13
13
|
debugger: true
|
|
14
14
|
default:
|
|
15
|
-
|
|
16
|
-
includeScore: true
|
|
15
|
+
ignoreLocation: true
|
|
17
16
|
keys: [label, value]
|
|
18
|
-
location: 0
|
|
19
|
-
maxPatternLength: 32
|
|
20
|
-
minMatchCharLength: 1
|
|
21
|
-
shouldSort: true
|
|
22
17
|
threshold: 0.1
|
|
23
|
-
tokenize: true
|
|
24
18
|
|
|
25
19
|
label-key:
|
|
26
20
|
desc: O componente internamente espera receber na propriedade "options" um array de objeto contendo "label" e "value", caso o seu objeto não tenha "label" mas um "name" por exemplo, você pode definir esta prop "label-key" como "name".
|
|
@@ -199,10 +199,11 @@ export default {
|
|
|
199
199
|
handleScrollOnGrab () {
|
|
200
200
|
const fullTableWidth = this.getFullTableWidth()
|
|
201
201
|
const containerTableWidth = this.getContainerTableWidth()
|
|
202
|
+
const hasScrollOnGrab = !!Object.keys(this.scrollOnGrab).length
|
|
202
203
|
|
|
203
204
|
if (fullTableWidth > containerTableWidth) {
|
|
204
205
|
this.initializeScrollOnGrab()
|
|
205
|
-
} else if (
|
|
206
|
+
} else if (hasScrollOnGrab) {
|
|
206
207
|
this.scrollOnGrab.destroyEvents()
|
|
207
208
|
this.scrollOnGrab.element.style.cursor = 'auto'
|
|
208
209
|
this.scrollOnGrab = {}
|
package/src/mixins/view.js
CHANGED
|
@@ -86,7 +86,9 @@ export default {
|
|
|
86
86
|
this.$qas.error('Ops! Erro ao obter os dados.', exception)
|
|
87
87
|
|
|
88
88
|
const status = response?.status
|
|
89
|
-
const redirect =
|
|
89
|
+
const redirect = status >= 500
|
|
90
|
+
? 'ServerError'
|
|
91
|
+
: ({ 401: 'Unauthorized', 403: 'Forbidden', 404: 'NotFound' })[status]
|
|
90
92
|
|
|
91
93
|
if (redirect) {
|
|
92
94
|
this.$router.replace({ name: redirect })
|
package/src/pages/Forbidden.vue
CHANGED
package/src/pages/NotFound.vue
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<error-component v-bind="errorProps" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import ErrorComponent from './ErrorComponent.vue'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: 'Unauthorized',
|
|
10
|
+
|
|
11
|
+
components: {
|
|
12
|
+
ErrorComponent
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
computed: {
|
|
16
|
+
errorProps () {
|
|
17
|
+
return {
|
|
18
|
+
code: '401',
|
|
19
|
+
title: 'Ops! Parece que você está sem acesso ao sistema!',
|
|
20
|
+
buttonProps: {
|
|
21
|
+
to: { path: '/auth/login' },
|
|
22
|
+
label: 'Fazer login'
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
</script>
|