@zeedhi/teknisa-cli 1.37.0 → 1.44.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeedhi/teknisa-cli",
3
- "version": "1.37.0",
3
+ "version": "1.44.0",
4
4
  "description": "Teknisa CLI",
5
5
  "author": "Zeedhi <zeedhi@teknisa.com>",
6
6
  "license": "ISC",
@@ -34,5 +34,5 @@
34
34
  "/src",
35
35
  "/bin"
36
36
  ],
37
- "gitHead": "2083d86e2b1722ac34c9a7ee71ab7587340ce386"
37
+ "gitHead": "f58aaa0da52de553088e6eb5bb4567293553e44a"
38
38
  }
@@ -5,9 +5,11 @@ module.exports = {
5
5
  es6: true,
6
6
  node: true
7
7
  },
8
- ignorePatterns: ["node_modules/", "**/coverage/*", "**/dist/*", "**/types/*", "**/__mocks__/*", "**/*.vue", "**/*.d.ts", "**/*.js"],
9
- parser: "@typescript-eslint/parser",
8
+ ignorePatterns: ["node_modules/", "**/coverage/*", "**/dist/*", "**/types/*", "**/__mocks__/*", "**/*.d.ts", "**/*.js"],
9
+ parser: "vue-eslint-parser",
10
10
  parserOptions: {
11
+ parser: "@typescript-eslint/parser",
12
+ extraFileExtensions: [".vue"],
11
13
  project: "./tsconfig.json"
12
14
  },
13
15
  plugins: [
@@ -4,10 +4,10 @@
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
7
- "lint": "vue-cli-service lint"
7
+ "lint": "vue-cli-service lint --ext .ts,.vue ./src"
8
8
  },
9
9
  "dependencies": {
10
- "@mdi/font": "^5.8.55",
10
+ "@mdi/font": "^6.5.95",
11
11
  "@types/execa": "^2.0.0",
12
12
  "@types/jest": "^26.0.19",
13
13
  "@types/lodash.merge": "^4.6.6",
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en">
2
+ <html lang="pt-br">
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
@@ -1,6 +1,18 @@
1
1
  <template>
2
2
  <v-app>
3
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' }" />
4
16
  </v-app>
5
17
  </template>
6
18
 
@@ -37,14 +49,14 @@ export default class App extends Vue {
37
49
  this.mainPage.path = `pages/${page}`;
38
50
  }
39
51
  }
40
- };
52
+ }
41
53
 
42
54
  public created() {
43
55
  window.addEventListener('message', this.handleMessageEvent);
44
56
  if (process.env.NODE_ENV === 'production') {
45
57
  this.onRouteChange(localStorage.getItem('routeParams'));
46
58
  } else {
47
- const searchParams = new URL(window.location.href).searchParams;
59
+ const { searchParams } = new URL(window.location.href);
48
60
 
49
61
  let userAuth: any = searchParams.get('user_auth');
50
62
  let productInfo: any = searchParams.get('product_info');
@@ -56,7 +68,7 @@ export default class App extends Vue {
56
68
  this.validationAndSetLocalStorage('LOGIN_USER_NAME', userAuth.LOGIN_USER_NAME);
57
69
  this.validationAndSetLocalStorage('LOGIN_LANGUAGE', userAuth.LOGIN_LANGUAGE);
58
70
  this.validationAndSetLocalStorage('LOGIN_HASH', userAuth.LOGIN_HASH);
59
- this.validationAndSetLocalStorage('LOGIN_KEEP_CONNECTED', userAuth.LOGIN_KEEP_CONNECTED );
71
+ this.validationAndSetLocalStorage('LOGIN_KEEP_CONNECTED', userAuth.LOGIN_KEEP_CONNECTED);
60
72
  }
61
73
 
62
74
  if (productInfo) {
@@ -3,18 +3,20 @@ module.exports = {
3
3
  env: {
4
4
  browser: true,
5
5
  es6: true,
6
- node: true
6
+ node: true,
7
7
  },
8
- ignorePatterns: ["node_modules/", "**/coverage/*", "**/dist/*", "**/types/*", "**/__mocks__/*", "**/*.vue", "**/*.d.ts", "**/*.js"],
9
- parser: "@typescript-eslint/parser",
8
+ ignorePatterns: ['node_modules/', '**/coverage/*', '**/dist/*', '**/types/*', '**/__mocks__/*', '**/*.d.ts', '**/*.js'],
9
+ parser: 'vue-eslint-parser',
10
10
  parserOptions: {
11
- project: "./tsconfig.json"
11
+ parser: '@typescript-eslint/parser',
12
+ extraFileExtensions: ['.vue'],
13
+ project: './tsconfig.json',
12
14
  },
13
15
  plugins: [
14
- "@typescript-eslint"
16
+ '@typescript-eslint',
15
17
  ],
16
18
  extends: [
17
- "airbnb-typescript/base"
19
+ 'airbnb-typescript/base',
18
20
  ],
19
21
  rules: {
20
22
  // maximum line length
@@ -35,5 +37,5 @@ module.exports = {
35
37
  'import/no-unresolved': 'off',
36
38
  // ignore enforcement of consistent linebreak style
37
39
  'linebreak-style': 0,
38
- }
39
- }
40
+ },
41
+ };
@@ -7,7 +7,7 @@
7
7
  "lint": "vue-cli-service lint"
8
8
  },
9
9
  "dependencies": {
10
- "@mdi/font": "^5.8.55",
10
+ "@mdi/font": "^6.5.95",
11
11
  "@types/execa": "^2.0.0",
12
12
  "@types/jest": "^26.0.19",
13
13
  "@types/lodash.merge": "^4.6.6",
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en">
2
+ <html lang="pt-br">
3
3
  <head>
4
4
  <meta http-equiv="<%= VUE_APP_META_CONTENT_SECURITY_POLICY %>" content="<%= VUE_APP_UPGRADE_INSECURE_REQUESTS %>">
5
5
  <meta charset="utf-8">
@@ -35,8 +35,7 @@
35
35
  import Vue from 'vue';
36
36
  import Component from 'vue-class-component';
37
37
  import { IMenu, IHeader, Menu } from '@zeedhi/common';
38
- import { Metadata } from '@zeedhi/core';
39
- import { Config } from '@zeedhi/core';
38
+ import { Config, Metadata } from '@zeedhi/core';
40
39
  import { TekLibAuth, TekLibLocalStorage } from '@zeedhi/tek-lib';
41
40
 
42
41
  @Component
@@ -83,6 +82,10 @@ export default class App extends Vue {
83
82
  'ctrl+m': {
84
83
  event: '{{AppController.toggleMenu}}',
85
84
  },
85
+ esc: {
86
+ event: '{{AppController.closeMenu}}',
87
+ stop: true,
88
+ },
86
89
  },
87
90
  },
88
91
  {
@@ -4,4 +4,4 @@
4
4
  </router-link>
5
5
  </template>
6
6
 
7
- <script lang="ts" src="./ImgLink.ts"></script>
7
+ <script lang="ts" src="./ImgLink.ts"></script>
@@ -1,5 +1,9 @@
1
1
  import { IEventParam, Metadata, Singleton } from '@zeedhi/core';
2
- import { Menu, MenuButton } from '@zeedhi/common';
2
+ import {
3
+ Menu,
4
+ MenuButton,
5
+ AlertService,
6
+ } from '@zeedhi/common';
3
7
  import { TekLibAuth } from '@zeedhi/tek-lib';
4
8
 
5
9
  @Singleton
@@ -29,4 +33,15 @@ export class AppController {
29
33
  public showMessageExpiredMenu() {
30
34
  TekLibAuth.showMessageExpiredMenu();
31
35
  }
36
+
37
+ public closeMenu({ component }: IEventParam<MenuButton>) {
38
+ const menu = Metadata.getInstance<Menu>(component.menuName);
39
+ if (menu.opened && !menu.miniState) {
40
+ menu.toggleMenu();
41
+ }
42
+ }
43
+
44
+ public escAction() {
45
+ AlertService.hide();
46
+ }
32
47
  }
@@ -4,7 +4,11 @@ import ZeedhiComponents from '@zeedhi/vuetify';
4
4
  import TeknisaComponents from '@zeedhi/teknisa-components-vuetify';
5
5
  import TekLibComponents from '@zeedhi/tek-lib';
6
6
  import { Icons } from '@zeedhi/common';
7
- import { Messages } from '@zeedhi/core';
7
+ import {
8
+ Messages,
9
+ KeyMap,
10
+ Loader,
11
+ } from '@zeedhi/core';
8
12
  import router from '../router';
9
13
  import controllers from '../controllers';
10
14
  import config from '../config/config';
@@ -54,3 +58,12 @@ Messages.add({
54
58
  },
55
59
  },
56
60
  });
61
+
62
+ const appController = Loader.getInstance('AppController');
63
+
64
+ KeyMap.bind({
65
+ esc: {
66
+ event: () => { appController.escAction(); },
67
+ stop: true,
68
+ },
69
+ });
@@ -34,6 +34,7 @@
34
34
  ]
35
35
  },
36
36
  "include": [
37
+ ".eslintrc.js",
37
38
  "src/**/*.ts",
38
39
  "src/**/*.tsx",
39
40
  "src/**/*.vue",