@bildvitta/quasar-app-extension-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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bildvitta/quasar-app-extension-asteroid",
3
3
  "description": "Asteroid",
4
- "version": "3.0.0-alpha.2",
4
+ "version": "3.0.0-beta.2",
5
5
  "author": "Bild & Vitta <systemteam@bild.com.br>",
6
6
  "license": "MIT",
7
7
  "main": "src/index.js",
@@ -29,7 +29,7 @@
29
29
  "yarn": ">= 1.6.0"
30
30
  },
31
31
  "dependencies": {
32
- "@bildvitta/quasar-ui-asteroid": "3.0.0-alpha.1",
32
+ "@bildvitta/quasar-ui-asteroid": "3.0.0-beta.2",
33
33
  "humps": "^2.0.1"
34
34
  }
35
35
  }
@@ -0,0 +1,22 @@
1
+ import ForbiddenPage from '@bildvitta/quasar-ui-asteroid/src/pages/Forbidden.vue'
2
+ import NotFoundPage from '@bildvitta/quasar-ui-asteroid/src/pages/NotFound.vue'
3
+
4
+ export default function ({ router }) {
5
+ const routes = [
6
+ {
7
+ name: 'Forbidden',
8
+ path: '/',
9
+ component: ForbiddenPage
10
+ }
11
+ ]
12
+
13
+ if (process.env.MODE !== 'ssr') {
14
+ routes.push({
15
+ name: 'NotFound',
16
+ path: '/:catchAll(.*)*',
17
+ component: NotFoundPage
18
+ })
19
+ }
20
+
21
+ routes.forEach(route => router.addRoute(route))
22
+ }
@@ -1,7 +1,8 @@
1
- import { addRoute } from '@bildvitta/quasar-ui-asteroid/src/store/history'
1
+ import useHistory from '@bildvitta/quasar-ui-asteroid/src/composables/useHistory'
2
2
 
3
3
  export default ({ router }) => {
4
4
  router.beforeEach((to, from, next) => {
5
+ const { addRoute } = useHistory()
5
6
  addRoute(to)
6
7
  next()
7
8
  })
package/src/index.js CHANGED
@@ -2,32 +2,44 @@ const sourcePath = '~@bildvitta/quasar-app-extension-asteroid/src/'
2
2
  const resolve = (...paths) => paths.map(path => sourcePath + path)
3
3
 
4
4
  function extendQuasar (quasar) {
5
- // Boot
5
+ // Arquivos de boot
6
+ // https://quasar.dev/quasar-cli-vite/boot-files#introduction
6
7
  quasar.boot.push(...resolve(
7
8
  'boot/api.js',
9
+ 'boot/error-pages.js',
8
10
  'boot/register.js',
9
11
  'boot/history.js'
10
12
  ))
11
13
 
12
- // Transpile!
14
+ // Transpilação de arquivos!
13
15
  quasar.build.transpileDependencies.push(/quasar-app-extension-asteroid[\\/]src/)
14
16
 
15
- // Preserve whitespaces!
17
+ // Preserva whitespaces!
16
18
  // https://github.com/vuejs/core/pull/1600
17
19
  quasar.build.vueLoaderOptions.whitespace = 'preserve'
18
20
 
21
+ // Adiciona todas classes do asteroid
19
22
  quasar.css.push(...resolve('index.scss'))
20
23
 
24
+ // Adiciona todos os Plugins obrigatório do Quasar
21
25
  const plugins = [
22
26
  'Dialog',
23
27
  'Loading',
24
28
  'Notify'
25
29
  ]
26
30
 
27
- // Add all required Quasar plugins
28
31
  plugins.forEach(plugin => quasar.framework.plugins.push(plugin))
29
32
 
30
- // Settings
33
+ // Adiciona todas as classes de animação do Animate.css ao quasar
34
+ // https://animate.style/
35
+ const animations = [
36
+ 'slideOutUp',
37
+ 'slideInDown'
38
+ ]
39
+
40
+ animations.forEach(animation => quasar.animations.push(animation))
41
+
42
+ // Configurações
31
43
  quasar.extras.push(
32
44
  'material-icons-outlined'
33
45
  )
@@ -43,6 +55,7 @@ module.exports = function (api) {
43
55
  api.extendQuasarConf(extendQuasar)
44
56
 
45
57
  api.extendWebpack(webpack => {
58
+ // Adiciona um "alias" chamado "asteroid" para a aplicação
46
59
  const asteroid = 'node_modules/@bildvitta/quasar-ui-asteroid/src/asteroid.js'
47
60
 
48
61
  webpack.resolve.alias = {