@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bildvitta/quasar-ui-asteroid",
3
3
  "description": "Asteroid",
4
- "version": "3.0.0-beta.7",
4
+ "version": "3.0.0-beta.8",
5
5
  "author": "Bild & Vitta <systemteam@bild.com.br>",
6
6
  "license": "MIT",
7
7
  "main": "dist/asteroid.cjs.min.js",
@@ -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
- tokenize: true,
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
- distance: 100,
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
- distance: 100
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 (this.hasScrollOnGrab) {
206
+ } else if (hasScrollOnGrab) {
206
207
  this.scrollOnGrab.destroyEvents()
207
208
  this.scrollOnGrab.element.style.cursor = 'auto'
208
209
  this.scrollOnGrab = {}
@@ -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 = ({ 403: 'Forbidden', 404: 'NotFound' })[status]
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 })
@@ -3,9 +3,11 @@
3
3
  </template>
4
4
 
5
5
  <script>
6
- import ErrorComponent from './ErrorComponent'
6
+ import ErrorComponent from './ErrorComponent.vue'
7
7
 
8
8
  export default {
9
+ name: 'Forbidden',
10
+
9
11
  components: {
10
12
  ErrorComponent
11
13
  },
@@ -3,9 +3,11 @@
3
3
  </template>
4
4
 
5
5
  <script>
6
- import ErrorComponent from './ErrorComponent'
6
+ import ErrorComponent from './ErrorComponent.vue'
7
7
 
8
8
  export default {
9
+ name: 'NotFound',
10
+
9
11
  components: {
10
12
  ErrorComponent
11
13
  },
@@ -3,9 +3,11 @@
3
3
  </template>
4
4
 
5
5
  <script>
6
- import ErrorComponent from './ErrorComponent'
6
+ import ErrorComponent from './ErrorComponent.vue'
7
7
 
8
8
  export default {
9
+ name: 'ServerError',
10
+
9
11
  components: {
10
12
  ErrorComponent
11
13
  },
@@ -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>