@zeedhi/teknisa-cli 1.107.1 → 1.108.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.
Files changed (93) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +5 -5
  3. package/bin/teknisa.js +117 -117
  4. package/package.json +2 -2
  5. package/src/create.js +118 -118
  6. package/src/generate.js +20 -20
  7. package/src/util/component/createEmptyComponent.js +145 -145
  8. package/src/util/component/createJest.js +19 -19
  9. package/src/util/component/createNpmignore.js +14 -14
  10. package/src/util/component/createPackage.js +52 -52
  11. package/src/util/component/createReadme.js +15 -15
  12. package/src/util/component/createRollup.js +15 -15
  13. package/src/util/component/createTsConfig.js +24 -24
  14. package/src/util/component/createTsLint.js +18 -18
  15. package/src/util/component/run.js +54 -54
  16. package/src/util/enhanceErrorMessages.js +13 -13
  17. package/src/util/project/editCliVersion.js +17 -17
  18. package/src/util/project/editPackageJson.js +19 -19
  19. package/src/util/project/module/.env.development +1 -1
  20. package/src/util/project/module/.env.production +1 -1
  21. package/src/util/project/module/.eslintrc.js +40 -40
  22. package/src/util/project/module/GruntFile.js +15 -15
  23. package/src/util/project/module/README.md +22 -22
  24. package/src/util/project/module/cliVersion.json +2 -2
  25. package/src/util/project/module/gitignore.template +21 -21
  26. package/src/util/project/module/package.json +68 -68
  27. package/src/util/project/module/postcss.config.js +5 -5
  28. package/src/util/project/module/public/index.html +17 -17
  29. package/src/util/project/module/public/metadata/notfound.json +14 -14
  30. package/src/util/project/module/public/metadata/unauthorized.json +14 -14
  31. package/src/util/project/module/public/robots.txt +2 -2
  32. package/src/util/project/module/src/App.vue +134 -134
  33. package/src/util/project/module/src/config/config.ts +17 -17
  34. package/src/util/project/module/src/config/devEnvironment.json +4 -4
  35. package/src/util/project/module/src/config/prodEnvironment.json +3 -3
  36. package/src/util/project/module/src/controllers/AppController.ts +5 -5
  37. package/src/util/project/module/src/controllers/index.ts +5 -5
  38. package/src/util/project/module/src/main.ts +17 -17
  39. package/src/util/project/module/src/plugins/index.ts +6 -6
  40. package/src/util/project/module/src/plugins/vuetify.ts +11 -11
  41. package/src/util/project/module/src/plugins/zeedhi.ts +50 -50
  42. package/src/util/project/module/src/registerServiceWorker.ts +32 -32
  43. package/src/util/project/module/src/shims-tsx.d.ts +13 -13
  44. package/src/util/project/module/src/shims-vue.d.ts +5 -5
  45. package/src/util/project/module/src/theme/index.ts +12 -12
  46. package/src/util/project/module/tsconfig.json +45 -45
  47. package/src/util/project/module/vue.config.js +107 -107
  48. package/src/util/project/product/.env.development +3 -3
  49. package/src/util/project/product/.env.production +2 -2
  50. package/src/util/project/product/.eslintrc.js +41 -41
  51. package/src/util/project/product/GruntFile.js +15 -15
  52. package/src/util/project/product/README.md +22 -22
  53. package/src/util/project/product/cliVersion.json +2 -2
  54. package/src/util/project/product/gitignore.template +21 -21
  55. package/src/util/project/product/package.json +69 -69
  56. package/src/util/project/product/postcss.config.js +5 -5
  57. package/src/util/project/product/public/assets/img/icons/safari-pinned-tab.svg +33 -33
  58. package/src/util/project/product/public/assets/img/image-not-found.svg +3 -3
  59. package/src/util/project/product/public/index.html +19 -19
  60. package/src/util/project/product/public/metadata/home.json +63 -63
  61. package/src/util/project/product/public/metadata/login.json +6 -6
  62. package/src/util/project/product/public/metadata/menu.json +28 -28
  63. package/src/util/project/product/public/metadata/notfound.json +14 -14
  64. package/src/util/project/product/public/robots.txt +2 -2
  65. package/src/util/project/product/src/App.vue +192 -192
  66. package/src/util/project/product/src/components/img-link/ImgLink.ts +17 -17
  67. package/src/util/project/product/src/components/img-link/ImgLink.vue +7 -7
  68. package/src/util/project/product/src/components/img-link/common/ImgLink.ts +32 -32
  69. package/src/util/project/product/src/components/index.ts +4 -4
  70. package/src/util/project/product/src/config/config.ts +22 -22
  71. package/src/util/project/product/src/config/devEnvironment.json +22 -22
  72. package/src/util/project/product/src/config/prodEnvironment.json +22 -22
  73. package/src/util/project/product/src/controllers/AppController.ts +119 -119
  74. package/src/util/project/product/src/controllers/LoginController.ts +17 -17
  75. package/src/util/project/product/src/controllers/index.ts +7 -7
  76. package/src/util/project/product/src/main.ts +22 -22
  77. package/src/util/project/product/src/plugins/index.ts +11 -11
  78. package/src/util/project/product/src/plugins/vuetify.ts +11 -11
  79. package/src/util/project/product/src/plugins/zeedhi.ts +72 -72
  80. package/src/util/project/product/src/registerServiceWorker.ts +32 -32
  81. package/src/util/project/product/src/router/index.ts +76 -76
  82. package/src/util/project/product/src/router/routes.ts +37 -37
  83. package/src/util/project/product/src/shims-tsx.d.ts +13 -13
  84. package/src/util/project/product/src/shims-vue.d.ts +5 -5
  85. package/src/util/project/product/src/store.ts +26 -26
  86. package/src/util/project/product/src/theme/index.ts +10 -10
  87. package/src/util/project/product/src/views/Microservice.ts +57 -57
  88. package/src/util/project/product/src/views/Microservice.vue +13 -13
  89. package/src/util/project/product/tsconfig.json +46 -46
  90. package/src/util/project/product/vue.config.js +107 -107
  91. package/src/util/project/renameGitIgnore.js +14 -14
  92. package/src/util/project/run.js +15 -15
  93. package/src/util/validateName.js +21 -21
@@ -1,15 +1,15 @@
1
- {
2
- "name": "unauthorized",
3
- "component": "ZdRow",
4
- "cssClass": "fill-height",
5
- "justify": "center",
6
- "align": "center",
7
- "children": [
8
- {
9
- "name": "text",
10
- "component": "ZdText",
11
- "text": "UNAUTHORIZED",
12
- "tag": "h1"
13
- }
14
- ]
1
+ {
2
+ "name": "unauthorized",
3
+ "component": "ZdRow",
4
+ "cssClass": "fill-height",
5
+ "justify": "center",
6
+ "align": "center",
7
+ "children": [
8
+ {
9
+ "name": "text",
10
+ "component": "ZdText",
11
+ "text": "UNAUTHORIZED",
12
+ "tag": "h1"
13
+ }
14
+ ]
15
15
  }
@@ -1,2 +1,2 @@
1
- User-agent: *
2
- Disallow:
1
+ User-agent: *
2
+ Disallow:
@@ -1,134 +1,134 @@
1
- <template>
2
- <v-app>
3
- <zd-page id="main-page" :key="mainPage.path" v-bind="mainPage" />
4
-
5
- <!-- Modal -->
6
- <zd-modal v-bind="{ name: 'appModal ' }" />
7
-
8
- <!-- Alert -->
9
- <zd-alert v-bind="{ name: 'appAlert ' }" />
10
-
11
- <!-- Dialog -->
12
- <zd-dialog v-bind="{ name: 'appDialog ' }" />
13
-
14
- <!-- Loading -->
15
- <zd-loading v-bind="{ name: 'appLoading' }" />
16
- </v-app>
17
- </template>
18
-
19
- <script lang="ts">
20
- import Vue from 'vue';
21
- import Component from 'vue-class-component';
22
- import { ZdPage } from '@zeedhi/vue';
23
- import { TekLibAuth } from '@zeedhi/tek-lib';
24
- import jsonMetadataLocal from './config/jsonMetadataLocal.json';
25
-
26
- @Component({
27
- components: { ZdPage },
28
- })
29
- export default class App extends Vue {
30
- public mainPage: any = {
31
- local: false,
32
- type: 'post',
33
- path: 'notfound',
34
- };
35
-
36
- private handleMessageEvent(event: any) {
37
- if (process.env.NODE_ENV !== 'production' || event.origin === window.location.origin) {
38
- if (event.data?.type === 'microservice-route-change') {
39
- this.onRouteChange(localStorage.getItem('routeParams') || event.data.routerParams);
40
- }
41
- }
42
- }
43
-
44
- private onRouteChange(params: any) {
45
- if (process.env.NODE_ENV === 'production' && !localStorage.getItem('LOGIN_TOKEN')) {
46
- this.mainPage.path = 'unauthorized';
47
- }
48
- if (params) {
49
- const page = typeof params === 'string' ? JSON.parse(params).page : params.page;
50
- if (page) {
51
- const pagePath = `pages/${page}`;
52
-
53
- const isLocal = jsonMetadataLocal.some((element: any) => element === page);
54
-
55
- if (isLocal) {
56
- this.setMainPageLocal(pagePath);
57
- } else {
58
- this.setMainPageBackend(pagePath);
59
- }
60
- }
61
- }
62
- }
63
-
64
- public setMainPageLocal(path: string) {
65
- this.mainPage.local = true;
66
- this.mainPage.type = 'get';
67
- this.mainPage.path = path;
68
- }
69
-
70
- public setMainPageBackend(page: any) {
71
- this.mainPage.local = false;
72
- this.mainPage.type = 'post';
73
- this.mainPage.path = '';
74
- this.mainPage.params = { jsonPath: page };
75
- this.mainPage.params.jsonPath = page;
76
- this.mainPage.params.routePath = localStorage.getItem('MODULES_ROUTE_PATH');
77
- }
78
-
79
- public created() {
80
- window.addEventListener('message', this.handleMessageEvent);
81
- if (process.env.NODE_ENV === 'production') {
82
- this.onRouteChange(localStorage.getItem('routeParams'));
83
- } else {
84
- const { searchParams } = new URL(window.location.href);
85
-
86
- let userAuth: any = searchParams.get('user_auth');
87
- let productInfo: any = searchParams.get('product_info');
88
-
89
- if (userAuth) {
90
- userAuth = JSON.parse(userAuth);
91
- this.validationAndSetLocalStorage('LOGIN_TOKEN', userAuth.LOGIN_TOKEN);
92
- this.validationAndSetLocalStorage('LOGIN_USER', userAuth.LOGIN_USER);
93
- this.validationAndSetLocalStorage('LOGIN_USER_NAME', userAuth.LOGIN_USER_NAME);
94
- this.validationAndSetLocalStorage('LOGIN_LANGUAGE', userAuth.LOGIN_LANGUAGE);
95
- this.validationAndSetLocalStorage('LOGIN_HASH', userAuth.LOGIN_HASH);
96
- this.validationAndSetLocalStorage('LOGIN_KEEP_CONNECTED', userAuth.LOGIN_KEEP_CONNECTED);
97
- }
98
-
99
- if (productInfo) {
100
- productInfo = JSON.parse(productInfo);
101
- localStorage.setItem('PRODUCT_ID', productInfo.PRODUCT_ID);
102
- localStorage.setItem('PRODUCT_URL', productInfo.PRODUCT_URL);
103
- localStorage.setItem('PRODUCT_LOGO_URL', productInfo.PRODUCT_LOGO_URL);
104
- localStorage.setItem('PRODUCT_BACKGROUND_IMG_PATH', productInfo.PRODUCT_BACKGROUND_IMG_PATH);
105
- localStorage.setItem('MODULES_THEME_COLOR', `#${productInfo.MODULES_THEME_COLOR}`);
106
- }
107
-
108
- const page = searchParams.get('page');
109
- this.onRouteChange({ page });
110
- }
111
- }
112
-
113
- public mounted() {
114
- TekLibAuth.startLib();
115
- const colorTheme = localStorage.getItem('MODULES_THEME_COLOR') || '#2d68c3';
116
- this.$vuetify.theme.themes.light.primary = colorTheme;
117
- this.$vuetify.theme.themes.light.anchor = colorTheme;
118
- }
119
-
120
- public beforeDestroy() {
121
- window.removeEventListener('message', this.handleMessageEvent);
122
- }
123
-
124
- private validationAndSetLocalStorage(localStorgeVariable: string, value: string) {
125
- if (localStorgeVariable === 'LOGIN_KEEP_CONNECTED') {
126
- if (value === 'YES' || value === 'NO') {
127
- localStorage.setItem(localStorgeVariable, value);
128
- }
129
- } else if (value) {
130
- localStorage.setItem(localStorgeVariable, value);
131
- }
132
- }
133
- }
134
- </script>
1
+ <template>
2
+ <v-app>
3
+ <zd-page id="main-page" :key="mainPage.path" v-bind="mainPage" />
4
+
5
+ <!-- Modal -->
6
+ <zd-modal v-bind="{ name: 'appModal ' }" />
7
+
8
+ <!-- Alert -->
9
+ <zd-alert v-bind="{ name: 'appAlert ' }" />
10
+
11
+ <!-- Dialog -->
12
+ <zd-dialog v-bind="{ name: 'appDialog ' }" />
13
+
14
+ <!-- Loading -->
15
+ <zd-loading v-bind="{ name: 'appLoading' }" />
16
+ </v-app>
17
+ </template>
18
+
19
+ <script lang="ts">
20
+ import Vue from 'vue';
21
+ import Component from 'vue-class-component';
22
+ import { ZdPage } from '@zeedhi/vue';
23
+ import { TekLibAuth } from '@zeedhi/tek-lib';
24
+ import jsonMetadataLocal from './config/jsonMetadataLocal.json';
25
+
26
+ @Component({
27
+ components: { ZdPage },
28
+ })
29
+ export default class App extends Vue {
30
+ public mainPage: any = {
31
+ local: false,
32
+ type: 'post',
33
+ path: 'notfound',
34
+ };
35
+
36
+ private handleMessageEvent(event: any) {
37
+ if (process.env.NODE_ENV !== 'production' || event.origin === window.location.origin) {
38
+ if (event.data?.type === 'microservice-route-change') {
39
+ this.onRouteChange(localStorage.getItem('routeParams') || event.data.routerParams);
40
+ }
41
+ }
42
+ }
43
+
44
+ private onRouteChange(params: any) {
45
+ if (process.env.NODE_ENV === 'production' && !localStorage.getItem('LOGIN_TOKEN')) {
46
+ this.mainPage.path = 'unauthorized';
47
+ }
48
+ if (params) {
49
+ const page = typeof params === 'string' ? JSON.parse(params).page : params.page;
50
+ if (page) {
51
+ const pagePath = `pages/${page}`;
52
+
53
+ const isLocal = jsonMetadataLocal.some((element: any) => element === page);
54
+
55
+ if (isLocal) {
56
+ this.setMainPageLocal(pagePath);
57
+ } else {
58
+ this.setMainPageBackend(pagePath);
59
+ }
60
+ }
61
+ }
62
+ }
63
+
64
+ public setMainPageLocal(path: string) {
65
+ this.mainPage.local = true;
66
+ this.mainPage.type = 'get';
67
+ this.mainPage.path = path;
68
+ }
69
+
70
+ public setMainPageBackend(page: any) {
71
+ this.mainPage.local = false;
72
+ this.mainPage.type = 'post';
73
+ this.mainPage.path = '';
74
+ this.mainPage.params = { jsonPath: page };
75
+ this.mainPage.params.jsonPath = page;
76
+ this.mainPage.params.routePath = localStorage.getItem('MODULES_ROUTE_PATH');
77
+ }
78
+
79
+ public created() {
80
+ window.addEventListener('message', this.handleMessageEvent);
81
+ if (process.env.NODE_ENV === 'production') {
82
+ this.onRouteChange(localStorage.getItem('routeParams'));
83
+ } else {
84
+ const { searchParams } = new URL(window.location.href);
85
+
86
+ let userAuth: any = searchParams.get('user_auth');
87
+ let productInfo: any = searchParams.get('product_info');
88
+
89
+ if (userAuth) {
90
+ userAuth = JSON.parse(userAuth);
91
+ this.validationAndSetLocalStorage('LOGIN_TOKEN', userAuth.LOGIN_TOKEN);
92
+ this.validationAndSetLocalStorage('LOGIN_USER', userAuth.LOGIN_USER);
93
+ this.validationAndSetLocalStorage('LOGIN_USER_NAME', userAuth.LOGIN_USER_NAME);
94
+ this.validationAndSetLocalStorage('LOGIN_LANGUAGE', userAuth.LOGIN_LANGUAGE);
95
+ this.validationAndSetLocalStorage('LOGIN_HASH', userAuth.LOGIN_HASH);
96
+ this.validationAndSetLocalStorage('LOGIN_KEEP_CONNECTED', userAuth.LOGIN_KEEP_CONNECTED);
97
+ }
98
+
99
+ if (productInfo) {
100
+ productInfo = JSON.parse(productInfo);
101
+ localStorage.setItem('PRODUCT_ID', productInfo.PRODUCT_ID);
102
+ localStorage.setItem('PRODUCT_URL', productInfo.PRODUCT_URL);
103
+ localStorage.setItem('PRODUCT_LOGO_URL', productInfo.PRODUCT_LOGO_URL);
104
+ localStorage.setItem('PRODUCT_BACKGROUND_IMG_PATH', productInfo.PRODUCT_BACKGROUND_IMG_PATH);
105
+ localStorage.setItem('MODULES_THEME_COLOR', `#${productInfo.MODULES_THEME_COLOR}`);
106
+ }
107
+
108
+ const page = searchParams.get('page');
109
+ this.onRouteChange({ page });
110
+ }
111
+ }
112
+
113
+ public mounted() {
114
+ TekLibAuth.startLib();
115
+ const colorTheme = localStorage.getItem('MODULES_THEME_COLOR') || '#2d68c3';
116
+ this.$vuetify.theme.themes.light.primary = colorTheme;
117
+ this.$vuetify.theme.themes.light.anchor = colorTheme;
118
+ }
119
+
120
+ public beforeDestroy() {
121
+ window.removeEventListener('message', this.handleMessageEvent);
122
+ }
123
+
124
+ private validationAndSetLocalStorage(localStorgeVariable: string, value: string) {
125
+ if (localStorgeVariable === 'LOGIN_KEEP_CONNECTED') {
126
+ if (value === 'YES' || value === 'NO') {
127
+ localStorage.setItem(localStorgeVariable, value);
128
+ }
129
+ } else if (value) {
130
+ localStorage.setItem(localStorgeVariable, value);
131
+ }
132
+ }
133
+ }
134
+ </script>
@@ -1,17 +1,17 @@
1
- import { ITekConfig } from '@zeedhi/teknisa-components-common';
2
- import prodEnvironment from './prodEnvironment.json';
3
- import devEnvironment from './devEnvironment.json';
4
-
5
- const env = process.env.NODE_ENV === 'production' ? prodEnvironment : devEnvironment;
6
-
7
- const config: ITekConfig = {
8
- endPoint: env.endPoint,
9
- metadataEndPoint: env.metadataEndPoint,
10
- env: {
11
- endPoint: env.endPoint,
12
- },
13
- saveGridLayoutsEndPoint: process.env.VUE_APP_SAVE_GRID_LAYOUTS_END_POINT,
14
- loadGridLayoutsEndPoint: process.env.VUE_APP_LOAD_GRID_LAYOUTS_END_POINT,
15
- };
16
-
17
- export default config;
1
+ import { ITekConfig } from '@zeedhi/teknisa-components-common';
2
+ import prodEnvironment from './prodEnvironment.json';
3
+ import devEnvironment from './devEnvironment.json';
4
+
5
+ const env = process.env.NODE_ENV === 'production' ? prodEnvironment : devEnvironment;
6
+
7
+ const config: ITekConfig = {
8
+ endPoint: env.endPoint,
9
+ metadataEndPoint: env.metadataEndPoint,
10
+ env: {
11
+ endPoint: env.endPoint,
12
+ },
13
+ saveGridLayoutsEndPoint: process.env.VUE_APP_SAVE_GRID_LAYOUTS_END_POINT,
14
+ loadGridLayoutsEndPoint: process.env.VUE_APP_LOAD_GRID_LAYOUTS_END_POINT,
15
+ };
16
+
17
+ export default config;
@@ -1,4 +1,4 @@
1
- {
2
- "endPoint": "http://localhost:81/<nome do produto>/modules/login/backend/service/index.php",
3
- "metadataEndPoint": ""
4
- }
1
+ {
2
+ "endPoint": "http://localhost:81/<nome do produto>/modules/login/backend/service/index.php",
3
+ "metadataEndPoint": ""
4
+ }
@@ -1,4 +1,4 @@
1
- {
2
- "endPoint": "/backend_login/index.php",
3
- "metadataEndPoint": ""
1
+ {
2
+ "endPoint": "/backend_login/index.php",
3
+ "metadataEndPoint": ""
4
4
  }
@@ -1,5 +1,5 @@
1
- import { Singleton } from '@zeedhi/core';
2
-
3
- @Singleton
4
- export class AppController {
5
- }
1
+ import { Singleton } from '@zeedhi/core';
2
+
3
+ @Singleton
4
+ export class AppController {
5
+ }
@@ -1,5 +1,5 @@
1
- import { AppController } from './AppController';
2
-
3
- export default {
4
- AppController,
5
- };
1
+ import { AppController } from './AppController';
2
+
3
+ export default {
4
+ AppController,
5
+ };
@@ -1,17 +1,17 @@
1
- import Vue from 'vue';
2
- import App from './App.vue';
3
- import { vuetify } from './plugins';
4
- import './registerServiceWorker';
5
- import 'roboto-fontface/css/roboto/sass/roboto-fontface-medium.scss';
6
- import 'roboto-fontface/css/roboto/sass/roboto-fontface-regular.scss';
7
- import 'roboto-fontface/css/roboto/sass/roboto-fontface-bold.scss';
8
- import 'roboto-fontface/css/roboto/sass/roboto-fontface-regular-italic.scss';
9
- import 'roboto-fontface/css/roboto/sass/roboto-fontface-bold-italic.scss';
10
- import './styles/style.scss';
11
-
12
- Vue.config.productionTip = false;
13
-
14
- new Vue({
15
- vuetify,
16
- render: (h) => h(App),
17
- }).$mount('#app');
1
+ import Vue from 'vue';
2
+ import App from './App.vue';
3
+ import { vuetify } from './plugins';
4
+ import './registerServiceWorker';
5
+ import 'roboto-fontface/css/roboto/sass/roboto-fontface-medium.scss';
6
+ import 'roboto-fontface/css/roboto/sass/roboto-fontface-regular.scss';
7
+ import 'roboto-fontface/css/roboto/sass/roboto-fontface-bold.scss';
8
+ import 'roboto-fontface/css/roboto/sass/roboto-fontface-regular-italic.scss';
9
+ import 'roboto-fontface/css/roboto/sass/roboto-fontface-bold-italic.scss';
10
+ import './styles/style.scss';
11
+
12
+ Vue.config.productionTip = false;
13
+
14
+ new Vue({
15
+ vuetify,
16
+ render: (h) => h(App),
17
+ }).$mount('#app');
@@ -1,6 +1,6 @@
1
- import './zeedhi';
2
- import vuetify from './vuetify';
3
-
4
- export {
5
- vuetify,
6
- };
1
+ import './zeedhi';
2
+ import vuetify from './vuetify';
3
+
4
+ export {
5
+ vuetify,
6
+ };
@@ -1,11 +1,11 @@
1
- import { Vuetify } from '@zeedhi/vuetify';
2
- import '@mdi/font/css/materialdesignicons.css';
3
- import { initTheme } from '@zeedhi/common';
4
- import theme from '../theme';
5
-
6
- export default new Vuetify({
7
- icons: {
8
- iconfont: 'mdi',
9
- },
10
- theme: initTheme(theme),
11
- });
1
+ import { Vuetify } from '@zeedhi/vuetify';
2
+ import '@mdi/font/css/materialdesignicons.css';
3
+ import { initTheme } from '@zeedhi/common';
4
+ import theme from '../theme';
5
+
6
+ export default new Vuetify({
7
+ icons: {
8
+ iconfont: 'mdi',
9
+ },
10
+ theme: initTheme(theme),
11
+ });
@@ -1,50 +1,50 @@
1
- import Vue from 'vue';
2
- import Zeedhi from '@zeedhi/vue';
3
- import ZeedhiComponents from '@zeedhi/vuetify';
4
- import { Icons } from '@zeedhi/common';
5
- import { Messages } from '@zeedhi/core';
6
- import controllers from '../controllers';
7
- import config from '../config/config';
8
- import '@zeedhi/common/dist/style.css';
9
- import '@zeedhi/vuetify/dist/zd-style.css';
10
- import vuetify from './vuetify';
11
-
12
- Icons.addIcons({
13
- iconName: 'mdi-icon-id',
14
- });
15
-
16
- Vue.use(Zeedhi, {
17
- controllers,
18
- config,
19
- });
20
- Vue.use(ZeedhiComponents);
21
-
22
- vuetify.framework.icons.values = Icons.getIcons() as any;
23
-
24
- Messages.add({
25
- 'pt-BR': {
26
- translation: {
27
- KEY: 'valor',
28
- },
29
- },
30
- 'es-CL': {
31
- translation: {
32
- KEY: 'valor',
33
- },
34
- },
35
- 'es-CO': {
36
- translation: {
37
- KEY: 'valor',
38
- },
39
- },
40
- 'es-ES': {
41
- translation: {
42
- KEY: 'valor',
43
- },
44
- },
45
- 'en-US': {
46
- translation: {
47
- KEY: 'value',
48
- },
49
- },
50
- });
1
+ import Vue from 'vue';
2
+ import Zeedhi from '@zeedhi/vue';
3
+ import ZeedhiComponents from '@zeedhi/vuetify';
4
+ import { Icons } from '@zeedhi/common';
5
+ import { Messages } from '@zeedhi/core';
6
+ import controllers from '../controllers';
7
+ import config from '../config/config';
8
+ import '@zeedhi/common/dist/style.css';
9
+ import '@zeedhi/vuetify/dist/zd-style.css';
10
+ import vuetify from './vuetify';
11
+
12
+ Icons.addIcons({
13
+ iconName: 'mdi-icon-id',
14
+ });
15
+
16
+ Vue.use(Zeedhi, {
17
+ controllers,
18
+ config,
19
+ });
20
+ Vue.use(ZeedhiComponents);
21
+
22
+ vuetify.framework.icons.values = Icons.getIcons() as any;
23
+
24
+ Messages.add({
25
+ 'pt-BR': {
26
+ translation: {
27
+ KEY: 'valor',
28
+ },
29
+ },
30
+ 'es-CL': {
31
+ translation: {
32
+ KEY: 'valor',
33
+ },
34
+ },
35
+ 'es-CO': {
36
+ translation: {
37
+ KEY: 'valor',
38
+ },
39
+ },
40
+ 'es-ES': {
41
+ translation: {
42
+ KEY: 'valor',
43
+ },
44
+ },
45
+ 'en-US': {
46
+ translation: {
47
+ KEY: 'value',
48
+ },
49
+ },
50
+ });
@@ -1,32 +1,32 @@
1
- /* eslint-disable no-console */
2
-
3
- import { register } from 'register-service-worker';
4
-
5
- if (process.env.NODE_ENV === 'production') {
6
- register(`${process.env.BASE_URL}service-worker.js`, {
7
- ready() {
8
- console.log(
9
- 'App is being served from cache by a service worker.\n'
10
- + 'For more details, visit https://goo.gl/AFskqB',
11
- );
12
- },
13
- registered() {
14
- console.log('Service worker has been registered.');
15
- },
16
- cached() {
17
- console.log('Content has been cached for offline use.');
18
- },
19
- updatefound() {
20
- console.log('New content is downloading.');
21
- },
22
- updated() {
23
- console.log('New content is available; please refresh.');
24
- },
25
- offline() {
26
- console.log('No internet connection found. App is running in offline mode.');
27
- },
28
- error(error) {
29
- console.error('Error during service worker registration:', error);
30
- },
31
- });
32
- }
1
+ /* eslint-disable no-console */
2
+
3
+ import { register } from 'register-service-worker';
4
+
5
+ if (process.env.NODE_ENV === 'production') {
6
+ register(`${process.env.BASE_URL}service-worker.js`, {
7
+ ready() {
8
+ console.log(
9
+ 'App is being served from cache by a service worker.\n'
10
+ + 'For more details, visit https://goo.gl/AFskqB',
11
+ );
12
+ },
13
+ registered() {
14
+ console.log('Service worker has been registered.');
15
+ },
16
+ cached() {
17
+ console.log('Content has been cached for offline use.');
18
+ },
19
+ updatefound() {
20
+ console.log('New content is downloading.');
21
+ },
22
+ updated() {
23
+ console.log('New content is available; please refresh.');
24
+ },
25
+ offline() {
26
+ console.log('No internet connection found. App is running in offline mode.');
27
+ },
28
+ error(error) {
29
+ console.error('Error during service worker registration:', error);
30
+ },
31
+ });
32
+ }
@@ -1,13 +1,13 @@
1
- import Vue, { VNode } from 'vue';
2
-
3
- declare global {
4
- namespace JSX {
5
- // tslint:disable no-empty-interface
6
- interface Element extends VNode {}
7
- // tslint:disable no-empty-interface
8
- interface ElementClass extends Vue {}
9
- interface IntrinsicElements {
10
- [elem: string]: any;
11
- }
12
- }
13
- }
1
+ import Vue, { VNode } from 'vue';
2
+
3
+ declare global {
4
+ namespace JSX {
5
+ // tslint:disable no-empty-interface
6
+ interface Element extends VNode {}
7
+ // tslint:disable no-empty-interface
8
+ interface ElementClass extends Vue {}
9
+ interface IntrinsicElements {
10
+ [elem: string]: any;
11
+ }
12
+ }
13
+ }
@@ -1,5 +1,5 @@
1
- declare module '*.vue' {
2
- import Vue from 'vue';
3
-
4
- export default Vue;
5
- }
1
+ declare module '*.vue' {
2
+ import Vue from 'vue';
3
+
4
+ export default Vue;
5
+ }