@zeedhi/teknisa-cli 1.108.0 → 1.109.1
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/LICENSE +21 -21
- package/README.md +5 -5
- package/bin/teknisa.js +117 -117
- package/package.json +2 -2
- package/src/create.js +118 -118
- package/src/generate.js +20 -20
- package/src/util/component/createEmptyComponent.js +145 -145
- package/src/util/component/createJest.js +19 -19
- package/src/util/component/createNpmignore.js +14 -14
- package/src/util/component/createPackage.js +52 -52
- package/src/util/component/createReadme.js +15 -15
- package/src/util/component/createRollup.js +15 -15
- package/src/util/component/createTsConfig.js +24 -24
- package/src/util/component/createTsLint.js +18 -18
- package/src/util/component/run.js +54 -54
- package/src/util/enhanceErrorMessages.js +13 -13
- package/src/util/project/editCliVersion.js +17 -17
- package/src/util/project/editPackageJson.js +19 -19
- package/src/util/project/module/.env.development +1 -1
- package/src/util/project/module/.env.production +1 -1
- package/src/util/project/module/.eslintrc.js +40 -40
- package/src/util/project/module/GruntFile.js +15 -15
- package/src/util/project/module/README.md +22 -22
- package/src/util/project/module/cliVersion.json +2 -2
- package/src/util/project/module/gitignore.template +21 -21
- package/src/util/project/module/package.json +68 -68
- package/src/util/project/module/postcss.config.js +5 -5
- package/src/util/project/module/public/index.html +17 -17
- package/src/util/project/module/public/metadata/notfound.json +14 -14
- package/src/util/project/module/public/metadata/unauthorized.json +14 -14
- package/src/util/project/module/public/robots.txt +2 -2
- package/src/util/project/module/src/App.vue +134 -134
- package/src/util/project/module/src/config/config.ts +17 -17
- package/src/util/project/module/src/config/devEnvironment.json +4 -4
- package/src/util/project/module/src/config/prodEnvironment.json +3 -3
- package/src/util/project/module/src/controllers/AppController.ts +5 -5
- package/src/util/project/module/src/controllers/index.ts +5 -5
- package/src/util/project/module/src/main.ts +17 -17
- package/src/util/project/module/src/plugins/index.ts +6 -6
- package/src/util/project/module/src/plugins/vuetify.ts +11 -11
- package/src/util/project/module/src/plugins/zeedhi.ts +50 -50
- package/src/util/project/module/src/registerServiceWorker.ts +32 -32
- package/src/util/project/module/src/shims-tsx.d.ts +13 -13
- package/src/util/project/module/src/shims-vue.d.ts +5 -5
- package/src/util/project/module/src/theme/index.ts +12 -12
- package/src/util/project/module/tsconfig.json +45 -45
- package/src/util/project/module/vue.config.js +107 -107
- package/src/util/project/product/.env.development +3 -3
- package/src/util/project/product/.env.production +2 -2
- package/src/util/project/product/.eslintrc.js +41 -41
- package/src/util/project/product/GruntFile.js +15 -15
- package/src/util/project/product/README.md +22 -22
- package/src/util/project/product/cliVersion.json +2 -2
- package/src/util/project/product/gitignore.template +21 -21
- package/src/util/project/product/package.json +69 -69
- package/src/util/project/product/postcss.config.js +5 -5
- package/src/util/project/product/public/assets/img/icons/safari-pinned-tab.svg +33 -33
- package/src/util/project/product/public/assets/img/image-not-found.svg +3 -3
- package/src/util/project/product/public/index.html +19 -19
- package/src/util/project/product/public/metadata/home.json +63 -63
- package/src/util/project/product/public/metadata/login.json +6 -6
- package/src/util/project/product/public/metadata/menu.json +28 -28
- package/src/util/project/product/public/metadata/notfound.json +14 -14
- package/src/util/project/product/public/robots.txt +2 -2
- package/src/util/project/product/src/App.vue +192 -192
- package/src/util/project/product/src/components/img-link/ImgLink.ts +17 -17
- package/src/util/project/product/src/components/img-link/ImgLink.vue +7 -7
- package/src/util/project/product/src/components/img-link/common/ImgLink.ts +32 -32
- package/src/util/project/product/src/components/index.ts +4 -4
- package/src/util/project/product/src/config/config.ts +22 -22
- package/src/util/project/product/src/config/devEnvironment.json +22 -22
- package/src/util/project/product/src/config/prodEnvironment.json +22 -22
- package/src/util/project/product/src/controllers/AppController.ts +119 -119
- package/src/util/project/product/src/controllers/LoginController.ts +17 -17
- package/src/util/project/product/src/controllers/index.ts +7 -7
- package/src/util/project/product/src/main.ts +22 -22
- package/src/util/project/product/src/plugins/index.ts +11 -11
- package/src/util/project/product/src/plugins/vuetify.ts +11 -11
- package/src/util/project/product/src/plugins/zeedhi.ts +72 -72
- package/src/util/project/product/src/registerServiceWorker.ts +32 -32
- package/src/util/project/product/src/router/index.ts +76 -76
- package/src/util/project/product/src/router/routes.ts +37 -37
- package/src/util/project/product/src/shims-tsx.d.ts +13 -13
- package/src/util/project/product/src/shims-vue.d.ts +5 -5
- package/src/util/project/product/src/store.ts +26 -26
- package/src/util/project/product/src/theme/index.ts +10 -10
- package/src/util/project/product/src/views/Microservice.ts +57 -57
- package/src/util/project/product/src/views/Microservice.vue +13 -13
- package/src/util/project/product/tsconfig.json +46 -46
- package/src/util/project/product/vue.config.js +107 -107
- package/src/util/project/renameGitIgnore.js +14 -14
- package/src/util/project/run.js +15 -15
- package/src/util/validateName.js +21 -21
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Http,
|
|
3
|
-
IEventParam,
|
|
4
|
-
Metadata,
|
|
5
|
-
Singleton,
|
|
6
|
-
} from '@zeedhi/core';
|
|
7
|
-
import { Menu, MenuButton, AlertService } from '@zeedhi/common';
|
|
8
|
-
import { TekLibAuth } from '@zeedhi/tek-lib';
|
|
9
|
-
import { TekUserInfo } from '@zeedhi/teknisa-components-common';
|
|
10
|
-
|
|
11
|
-
@Singleton
|
|
12
|
-
export class AppController {
|
|
13
|
-
public hasImage: boolean = false;
|
|
14
|
-
|
|
15
|
-
get notHasImage(): boolean {
|
|
16
|
-
return !this.hasImage;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
public imagePath: string = '';
|
|
20
|
-
|
|
21
|
-
public microservicePage: boolean = false;
|
|
22
|
-
|
|
23
|
-
public toggleMenu({ component }: IEventParam<MenuButton>) {
|
|
24
|
-
const menu = Metadata.getInstance<Menu>(component.menuName);
|
|
25
|
-
menu.toggleMenu();
|
|
26
|
-
if (menu.opened && !menu.miniState) {
|
|
27
|
-
if (menu.showSearch) {
|
|
28
|
-
setTimeout(() => {
|
|
29
|
-
const searchInput = document.querySelector('.zd-menu-search-input input');
|
|
30
|
-
if (searchInput) (searchInput as HTMLElement).focus();
|
|
31
|
-
}, 100);
|
|
32
|
-
} else {
|
|
33
|
-
setTimeout(() => {
|
|
34
|
-
const firstMenuItem = document.querySelector('.zd-menu-link, .zd-menu-group > div, .zd-menu-search-input');
|
|
35
|
-
if (firstMenuItem) (firstMenuItem as HTMLElement).focus();
|
|
36
|
-
}, 100);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
get userName() {
|
|
42
|
-
const username = localStorage.getItem('LOGIN_USER_NAME') || '';
|
|
43
|
-
return this.getFormattedName(username);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
get nameInitialLetter() {
|
|
47
|
-
const name = this.userName;
|
|
48
|
-
return name.slice(0, 1);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
get logo() {
|
|
52
|
-
return '/assets/logo.avif';
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
public showMessageExpiredMenu() {
|
|
56
|
-
TekLibAuth.showMessageExpiredMenu();
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
public closeMenu({ component }: IEventParam<MenuButton>) {
|
|
60
|
-
const menu = Metadata.getInstance<Menu>(component.menuName);
|
|
61
|
-
if (menu.opened && !menu.miniState) {
|
|
62
|
-
menu.toggleMenu();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
public escAction() {
|
|
67
|
-
AlertService.hide();
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
public async userInfoOnCreated() {
|
|
71
|
-
const userInfoComponent = Metadata.getInstance<TekUserInfo>('userInfo');
|
|
72
|
-
const currentModule = this.getCurrentModule();
|
|
73
|
-
|
|
74
|
-
const { data } = await Http.get('/lib_generalInfo', { params: { currentModule } });
|
|
75
|
-
userInfoComponent.versionInfo = data.versionInfo;
|
|
76
|
-
|
|
77
|
-
if (data.userInfo.IMAGE) {
|
|
78
|
-
this.hasImage = true;
|
|
79
|
-
this.imagePath = data.userInfo.IMAGE;
|
|
80
|
-
} else {
|
|
81
|
-
this.hasImage = false;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
public userInfoOnLogoutClick() {
|
|
86
|
-
TekLibAuth.logoutConfirm();
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
private getFormattedName(username: string): string {
|
|
90
|
-
const usernameLowerCase = username.toLowerCase();
|
|
91
|
-
const name = usernameLowerCase.replace(/(^\w{1})|(\s+\w{1})/g, (letter: string) => letter.toUpperCase());
|
|
92
|
-
const splitName = name.split(' ');
|
|
93
|
-
if (splitName.length > 1) {
|
|
94
|
-
const firstName = splitName.shift();
|
|
95
|
-
const lastName = splitName.pop();
|
|
96
|
-
let middleName = '';
|
|
97
|
-
|
|
98
|
-
splitName.forEach((item) => {
|
|
99
|
-
middleName += ` ${item.slice(0, 1)}. `;
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
return `${firstName} ${middleName} ${lastName}`;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return name;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
private getCurrentModule(): string {
|
|
109
|
-
const { href } = window.location;
|
|
110
|
-
let currentModule = 'product';
|
|
111
|
-
if (href.includes('/modules/')) {
|
|
112
|
-
let auxHref = href.split('modules/');
|
|
113
|
-
auxHref = auxHref[1].split('/');
|
|
114
|
-
[currentModule] = auxHref;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
return currentModule;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
Http,
|
|
3
|
+
IEventParam,
|
|
4
|
+
Metadata,
|
|
5
|
+
Singleton,
|
|
6
|
+
} from '@zeedhi/core';
|
|
7
|
+
import { Menu, MenuButton, AlertService } from '@zeedhi/common';
|
|
8
|
+
import { TekLibAuth } from '@zeedhi/tek-lib';
|
|
9
|
+
import { TekUserInfo } from '@zeedhi/teknisa-components-common';
|
|
10
|
+
|
|
11
|
+
@Singleton
|
|
12
|
+
export class AppController {
|
|
13
|
+
public hasImage: boolean = false;
|
|
14
|
+
|
|
15
|
+
get notHasImage(): boolean {
|
|
16
|
+
return !this.hasImage;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public imagePath: string = '';
|
|
20
|
+
|
|
21
|
+
public microservicePage: boolean = false;
|
|
22
|
+
|
|
23
|
+
public toggleMenu({ component }: IEventParam<MenuButton>) {
|
|
24
|
+
const menu = Metadata.getInstance<Menu>(component.menuName);
|
|
25
|
+
menu.toggleMenu();
|
|
26
|
+
if (menu.opened && !menu.miniState) {
|
|
27
|
+
if (menu.showSearch) {
|
|
28
|
+
setTimeout(() => {
|
|
29
|
+
const searchInput = document.querySelector('.zd-menu-search-input input');
|
|
30
|
+
if (searchInput) (searchInput as HTMLElement).focus();
|
|
31
|
+
}, 100);
|
|
32
|
+
} else {
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
const firstMenuItem = document.querySelector('.zd-menu-link, .zd-menu-group > div, .zd-menu-search-input');
|
|
35
|
+
if (firstMenuItem) (firstMenuItem as HTMLElement).focus();
|
|
36
|
+
}, 100);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
get userName() {
|
|
42
|
+
const username = localStorage.getItem('LOGIN_USER_NAME') || '';
|
|
43
|
+
return this.getFormattedName(username);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
get nameInitialLetter() {
|
|
47
|
+
const name = this.userName;
|
|
48
|
+
return name.slice(0, 1);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
get logo() {
|
|
52
|
+
return '/assets/logo.avif';
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public showMessageExpiredMenu() {
|
|
56
|
+
TekLibAuth.showMessageExpiredMenu();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
public closeMenu({ component }: IEventParam<MenuButton>) {
|
|
60
|
+
const menu = Metadata.getInstance<Menu>(component.menuName);
|
|
61
|
+
if (menu.opened && !menu.miniState) {
|
|
62
|
+
menu.toggleMenu();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
public escAction() {
|
|
67
|
+
AlertService.hide();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public async userInfoOnCreated() {
|
|
71
|
+
const userInfoComponent = Metadata.getInstance<TekUserInfo>('userInfo');
|
|
72
|
+
const currentModule = this.getCurrentModule();
|
|
73
|
+
|
|
74
|
+
const { data } = await Http.get('/lib_generalInfo', { params: { currentModule } });
|
|
75
|
+
userInfoComponent.versionInfo = data.versionInfo;
|
|
76
|
+
|
|
77
|
+
if (data.userInfo.IMAGE) {
|
|
78
|
+
this.hasImage = true;
|
|
79
|
+
this.imagePath = data.userInfo.IMAGE;
|
|
80
|
+
} else {
|
|
81
|
+
this.hasImage = false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
public userInfoOnLogoutClick() {
|
|
86
|
+
TekLibAuth.logoutConfirm();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
private getFormattedName(username: string): string {
|
|
90
|
+
const usernameLowerCase = username.toLowerCase();
|
|
91
|
+
const name = usernameLowerCase.replace(/(^\w{1})|(\s+\w{1})/g, (letter: string) => letter.toUpperCase());
|
|
92
|
+
const splitName = name.split(' ');
|
|
93
|
+
if (splitName.length > 1) {
|
|
94
|
+
const firstName = splitName.shift();
|
|
95
|
+
const lastName = splitName.pop();
|
|
96
|
+
let middleName = '';
|
|
97
|
+
|
|
98
|
+
splitName.forEach((item) => {
|
|
99
|
+
middleName += ` ${item.slice(0, 1)}. `;
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
return `${firstName} ${middleName} ${lastName}`;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return name;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
private getCurrentModule(): string {
|
|
109
|
+
const { href } = window.location;
|
|
110
|
+
let currentModule = 'product';
|
|
111
|
+
if (href.includes('/modules/')) {
|
|
112
|
+
let auxHref = href.split('modules/');
|
|
113
|
+
auxHref = auxHref[1].split('/');
|
|
114
|
+
[currentModule] = auxHref;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return currentModule;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Config, Singleton } from '@zeedhi/core';
|
|
2
|
-
|
|
3
|
-
@Singleton
|
|
4
|
-
export class LoginController {
|
|
5
|
-
get logo() {
|
|
6
|
-
return Config.env.product.logoUrl;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
get backgroundImgUrl() {
|
|
10
|
-
const url = Config.env.loginBackgroundImgUrl;
|
|
11
|
-
return `url(${url})`;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
get endPoint() {
|
|
15
|
-
return Config.env.loginEndPoint;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
import { Config, Singleton } from '@zeedhi/core';
|
|
2
|
+
|
|
3
|
+
@Singleton
|
|
4
|
+
export class LoginController {
|
|
5
|
+
get logo() {
|
|
6
|
+
return Config.env.product.logoUrl;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
get backgroundImgUrl() {
|
|
10
|
+
const url = Config.env.loginBackgroundImgUrl;
|
|
11
|
+
return `url(${url})`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
get endPoint() {
|
|
15
|
+
return Config.env.loginEndPoint;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AppController } from './AppController';
|
|
2
|
-
import { LoginController } from './LoginController';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
AppController,
|
|
6
|
-
LoginController,
|
|
7
|
-
};
|
|
1
|
+
import { AppController } from './AppController';
|
|
2
|
+
import { LoginController } from './LoginController';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
AppController,
|
|
6
|
+
LoginController,
|
|
7
|
+
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
|
-
import App from './App.vue';
|
|
3
|
-
import router from './router';
|
|
4
|
-
import { vuetify } from './plugins';
|
|
5
|
-
import store from './store';
|
|
6
|
-
import './components';
|
|
7
|
-
import './registerServiceWorker';
|
|
8
|
-
import 'roboto-fontface/css/roboto/sass/roboto-fontface-medium.scss';
|
|
9
|
-
import 'roboto-fontface/css/roboto/sass/roboto-fontface-regular.scss';
|
|
10
|
-
import 'roboto-fontface/css/roboto/sass/roboto-fontface-bold.scss';
|
|
11
|
-
import 'roboto-fontface/css/roboto/sass/roboto-fontface-regular-italic.scss';
|
|
12
|
-
import 'roboto-fontface/css/roboto/sass/roboto-fontface-bold-italic.scss';
|
|
13
|
-
import './styles/style.scss';
|
|
14
|
-
|
|
15
|
-
Vue.config.productionTip = false;
|
|
16
|
-
|
|
17
|
-
new Vue({
|
|
18
|
-
router,
|
|
19
|
-
vuetify,
|
|
20
|
-
store,
|
|
21
|
-
render: (h) => h(App),
|
|
22
|
-
}).$mount('#app');
|
|
1
|
+
import Vue from 'vue';
|
|
2
|
+
import App from './App.vue';
|
|
3
|
+
import router from './router';
|
|
4
|
+
import { vuetify } from './plugins';
|
|
5
|
+
import store from './store';
|
|
6
|
+
import './components';
|
|
7
|
+
import './registerServiceWorker';
|
|
8
|
+
import 'roboto-fontface/css/roboto/sass/roboto-fontface-medium.scss';
|
|
9
|
+
import 'roboto-fontface/css/roboto/sass/roboto-fontface-regular.scss';
|
|
10
|
+
import 'roboto-fontface/css/roboto/sass/roboto-fontface-bold.scss';
|
|
11
|
+
import 'roboto-fontface/css/roboto/sass/roboto-fontface-regular-italic.scss';
|
|
12
|
+
import 'roboto-fontface/css/roboto/sass/roboto-fontface-bold-italic.scss';
|
|
13
|
+
import './styles/style.scss';
|
|
14
|
+
|
|
15
|
+
Vue.config.productionTip = false;
|
|
16
|
+
|
|
17
|
+
new Vue({
|
|
18
|
+
router,
|
|
19
|
+
vuetify,
|
|
20
|
+
store,
|
|
21
|
+
render: (h) => h(App),
|
|
22
|
+
}).$mount('#app');
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import './zeedhi';
|
|
2
|
-
import { VersionService } from '@zeedhi/core';
|
|
3
|
-
import vuetify from './vuetify';
|
|
4
|
-
|
|
5
|
-
const packageContent = require('../../package.json');
|
|
6
|
-
|
|
7
|
-
VersionService.addAppVersion(packageContent.name, packageContent.version);
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
vuetify,
|
|
11
|
-
};
|
|
1
|
+
import './zeedhi';
|
|
2
|
+
import { VersionService } from '@zeedhi/core';
|
|
3
|
+
import vuetify from './vuetify';
|
|
4
|
+
|
|
5
|
+
const packageContent = require('../../package.json');
|
|
6
|
+
|
|
7
|
+
VersionService.addAppVersion(packageContent.name, packageContent.version);
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
vuetify,
|
|
11
|
+
};
|
|
@@ -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,72 +1,72 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
|
-
import Zeedhi from '@zeedhi/vue';
|
|
3
|
-
import ZeedhiComponents from '@zeedhi/vuetify';
|
|
4
|
-
import TeknisaComponents from '@zeedhi/teknisa-components-vuetify';
|
|
5
|
-
import TekLibComponents from '@zeedhi/tek-lib';
|
|
6
|
-
import { ZdAvatar } from '@zeedhi/zd-avatar';
|
|
7
|
-
import { Icons } from '@zeedhi/common';
|
|
8
|
-
import {
|
|
9
|
-
Messages,
|
|
10
|
-
KeyMap,
|
|
11
|
-
Loader,
|
|
12
|
-
} from '@zeedhi/core';
|
|
13
|
-
import router from '../router';
|
|
14
|
-
import controllers from '../controllers';
|
|
15
|
-
import config from '../config/config';
|
|
16
|
-
import '@zeedhi/common/dist/style.css';
|
|
17
|
-
import '@zeedhi/vuetify/dist/zd-style.css';
|
|
18
|
-
import vuetify from './vuetify';
|
|
19
|
-
|
|
20
|
-
Icons.addIcons({
|
|
21
|
-
iconName: 'mdi-icon-id',
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
Vue.use(Zeedhi, {
|
|
25
|
-
controllers,
|
|
26
|
-
router,
|
|
27
|
-
config,
|
|
28
|
-
});
|
|
29
|
-
Vue.use(ZeedhiComponents);
|
|
30
|
-
Vue.use(TeknisaComponents);
|
|
31
|
-
Vue.use(TekLibComponents);
|
|
32
|
-
|
|
33
|
-
Vue.component('ZdAvatar', ZdAvatar);
|
|
34
|
-
|
|
35
|
-
vuetify.framework.icons.values = Icons.getIcons() as any;
|
|
36
|
-
|
|
37
|
-
Messages.add({
|
|
38
|
-
'pt-BR': {
|
|
39
|
-
translation: {
|
|
40
|
-
KEY: 'valor',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
'es-CL': {
|
|
44
|
-
translation: {
|
|
45
|
-
KEY: 'valor',
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
'es-CO': {
|
|
49
|
-
translation: {
|
|
50
|
-
KEY: 'valor',
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
'es-ES': {
|
|
54
|
-
translation: {
|
|
55
|
-
KEY: 'valor',
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
'en-US': {
|
|
59
|
-
translation: {
|
|
60
|
-
KEY: 'value',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
const appController = Loader.getInstance('AppController');
|
|
66
|
-
|
|
67
|
-
KeyMap.bind({
|
|
68
|
-
esc: {
|
|
69
|
-
event: () => { appController.escAction(); },
|
|
70
|
-
stop: true,
|
|
71
|
-
},
|
|
72
|
-
});
|
|
1
|
+
import Vue from 'vue';
|
|
2
|
+
import Zeedhi from '@zeedhi/vue';
|
|
3
|
+
import ZeedhiComponents from '@zeedhi/vuetify';
|
|
4
|
+
import TeknisaComponents from '@zeedhi/teknisa-components-vuetify';
|
|
5
|
+
import TekLibComponents from '@zeedhi/tek-lib';
|
|
6
|
+
import { ZdAvatar } from '@zeedhi/zd-avatar';
|
|
7
|
+
import { Icons } from '@zeedhi/common';
|
|
8
|
+
import {
|
|
9
|
+
Messages,
|
|
10
|
+
KeyMap,
|
|
11
|
+
Loader,
|
|
12
|
+
} from '@zeedhi/core';
|
|
13
|
+
import router from '../router';
|
|
14
|
+
import controllers from '../controllers';
|
|
15
|
+
import config from '../config/config';
|
|
16
|
+
import '@zeedhi/common/dist/style.css';
|
|
17
|
+
import '@zeedhi/vuetify/dist/zd-style.css';
|
|
18
|
+
import vuetify from './vuetify';
|
|
19
|
+
|
|
20
|
+
Icons.addIcons({
|
|
21
|
+
iconName: 'mdi-icon-id',
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
Vue.use(Zeedhi, {
|
|
25
|
+
controllers,
|
|
26
|
+
router,
|
|
27
|
+
config,
|
|
28
|
+
});
|
|
29
|
+
Vue.use(ZeedhiComponents);
|
|
30
|
+
Vue.use(TeknisaComponents);
|
|
31
|
+
Vue.use(TekLibComponents);
|
|
32
|
+
|
|
33
|
+
Vue.component('ZdAvatar', ZdAvatar);
|
|
34
|
+
|
|
35
|
+
vuetify.framework.icons.values = Icons.getIcons() as any;
|
|
36
|
+
|
|
37
|
+
Messages.add({
|
|
38
|
+
'pt-BR': {
|
|
39
|
+
translation: {
|
|
40
|
+
KEY: 'valor',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
'es-CL': {
|
|
44
|
+
translation: {
|
|
45
|
+
KEY: 'valor',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
'es-CO': {
|
|
49
|
+
translation: {
|
|
50
|
+
KEY: 'valor',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
'es-ES': {
|
|
54
|
+
translation: {
|
|
55
|
+
KEY: 'valor',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
'en-US': {
|
|
59
|
+
translation: {
|
|
60
|
+
KEY: 'value',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const appController = Loader.getInstance('AppController');
|
|
66
|
+
|
|
67
|
+
KeyMap.bind({
|
|
68
|
+
esc: {
|
|
69
|
+
event: () => { appController.escAction(); },
|
|
70
|
+
stop: true,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
@@ -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
|
+
}
|