hl-core 0.0.8-beta.3 → 0.0.8-beta.31

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 (46) hide show
  1. package/api/index.ts +77 -21
  2. package/api/interceptors.ts +17 -13
  3. package/components/Dialog/Dialog.vue +7 -37
  4. package/components/Form/FormBlock.vue +65 -28
  5. package/components/Form/FormSection.vue +4 -1
  6. package/components/Form/ManagerAttachment.vue +197 -0
  7. package/components/Form/ProductConditionsBlock.vue +64 -12
  8. package/components/Input/Datepicker.vue +5 -1
  9. package/components/Input/FormInput.vue +28 -7
  10. package/components/Input/PanelInput.vue +5 -0
  11. package/components/Input/RoundedSelect.vue +137 -0
  12. package/components/Layout/Drawer.vue +1 -0
  13. package/components/Layout/Header.vue +40 -4
  14. package/components/Layout/SettingsPanel.vue +39 -9
  15. package/components/Menu/MenuHover.vue +30 -0
  16. package/components/Menu/MenuNav.vue +28 -11
  17. package/components/Menu/MenuNavItem.vue +5 -2
  18. package/components/Pages/Anketa.vue +38 -21
  19. package/components/Pages/Auth.vue +145 -30
  20. package/components/Pages/InvoiceInfo.vue +30 -0
  21. package/components/Pages/MemberForm.vue +381 -144
  22. package/components/Pages/ProductConditions.vue +496 -17
  23. package/components/Panel/PanelHandler.vue +75 -2
  24. package/components/Utilities/Chip.vue +27 -0
  25. package/components/Utilities/JsonViewer.vue +27 -0
  26. package/composables/classes.ts +165 -25
  27. package/composables/constants.ts +13 -1
  28. package/composables/index.ts +58 -2
  29. package/composables/styles.ts +9 -3
  30. package/configs/i18n.ts +19 -0
  31. package/layouts/default.vue +2 -2
  32. package/locales/en.json +583 -0
  33. package/locales/kz.json +583 -0
  34. package/locales/ru.json +585 -0
  35. package/nuxt.config.ts +8 -0
  36. package/package.json +15 -9
  37. package/pages/500.vue +1 -1
  38. package/pages/Token.vue +51 -0
  39. package/plugins/helperFunctionsPlugins.ts +3 -0
  40. package/plugins/storePlugin.ts +0 -1
  41. package/plugins/vuetifyPlugin.ts +8 -1
  42. package/store/data.store.js +705 -624
  43. package/store/member.store.ts +147 -22
  44. package/store/rules.js +41 -3
  45. package/types/index.ts +39 -0
  46. package/store/messages.ts +0 -434
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.8-beta.3",
3
+ "version": "0.0.8-beta.31",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -8,6 +8,8 @@
8
8
  "api/",
9
9
  "store/",
10
10
  "layouts/",
11
+ "locales/",
12
+ "configs/",
11
13
  "composables/",
12
14
  "components/",
13
15
  "plugins/",
@@ -27,24 +29,28 @@
27
29
  "devDependencies": {
28
30
  "@nuxt/devtools": "^0.4.5",
29
31
  "@nuxt/types": "^2.16.3",
30
- "nuxt": "^3.4.3",
31
- "prettier": "^2.8.4",
32
- "typescript": "^4.9.5"
32
+ "nuxt": "^3.5.3",
33
+ "prettier": "^2.8.8"
33
34
  },
34
35
  "dependencies": {
36
+ "@intlify/unplugin-vue-i18n": "^0.11.0",
35
37
  "@mdi/font": "^7.2.96",
36
- "@nuxtjs/tailwindcss": "^6.6.7",
37
- "@pinia/nuxt": "^0.4.9",
38
- "@vuepic/vue-datepicker": "^5.0.1",
38
+ "@nuxtjs/tailwindcss": "^6.8.0",
39
+ "@pinia/nuxt": "^0.4.11",
40
+ "@vuepic/vue-datepicker": "^5.3.0",
39
41
  "animate.css": "^4.1.1",
40
42
  "axios": "^1.4.0",
41
43
  "fast-xml-parser": "4.0.12",
42
44
  "jwt-decode": "^3.1.2",
43
45
  "maska": "1.5.0",
44
- "pinia": "^2.0.35",
46
+ "pinia": "^2.1.4",
47
+ "typedoc": "^0.24.8",
48
+ "typescript": "5.0.4",
45
49
  "v-idle-3": "^0.3.14",
50
+ "vue-i18n": "^9.2.2",
51
+ "vue-json-pretty": "^2.2.4",
46
52
  "vue-toastification": "^2.0.0-rc.5",
47
53
  "vue-uuid": "^3.0.0",
48
- "vuetify": "^3.2.2"
54
+ "vuetify": "^3.3.6"
49
55
  }
50
56
  }
package/pages/500.vue CHANGED
@@ -69,7 +69,7 @@ export default defineComponent({
69
69
  });
70
70
 
71
71
  const goBack = () => {
72
- if (dataStore.isEFO) {
72
+ if (dataStore.isBridge) {
73
73
  router.push({ name: 'Auth' });
74
74
  } else {
75
75
  dataStore.sendToParent(constants.postActions.Error500, 500);
@@ -0,0 +1,51 @@
1
+ <template>
2
+ <div></div>
3
+ </template>
4
+
5
+ <script lang="ts">
6
+ export default defineComponent({
7
+ setup() {
8
+ definePageMeta({
9
+ layout: 'clear',
10
+ });
11
+ const route = useRoute();
12
+ const router = useRouter();
13
+ const dataStore = useDataStore();
14
+
15
+ const getMainPageRoute = () => {
16
+ if (dataStore.isEFO) {
17
+ return 'Insurance-Product';
18
+ }
19
+ if (dataStore.isLKA) {
20
+ return 'Menu';
21
+ }
22
+ if (dataStore.isAML) {
23
+ return 'Main';
24
+ }
25
+ };
26
+
27
+ onMounted(async () => {
28
+ if (!dataStore.isBridge) {
29
+ dataStore.sendToParent(constants.postActions.Error401, 401);
30
+ return;
31
+ }
32
+ const mainRoute = getMainPageRoute();
33
+ if (mainRoute && route.query && 'token' in route.query) {
34
+ const token = route.query.token as string;
35
+ if (isValidToken(token)) {
36
+ localStorage.setItem('accessToken', token);
37
+ dataStore.accessToken = token;
38
+ dataStore.getUserRoles();
39
+ }
40
+ const routeQuery = route.query;
41
+ delete routeQuery.token;
42
+ await router.push({ name: mainRoute, query: Object.keys(routeQuery).length === 0 ? undefined : routeQuery });
43
+ } else {
44
+ await router.push({ name: 'Auth' });
45
+ }
46
+ });
47
+
48
+ return {};
49
+ },
50
+ });
51
+ </script>
@@ -5,10 +5,13 @@ import VueDatePicker from '@vuepic/vue-datepicker';
5
5
  import '@vuepic/vue-datepicker/dist/main.css';
6
6
  import Vidle from 'v-idle-3';
7
7
  import Maska from 'maska';
8
+ import i18n from '@/configs/i18n';
8
9
 
9
10
  export default defineNuxtPlugin(nuxtApp => {
11
+ //@ts-ignore
10
12
  nuxtApp.vueApp.use(Vidle, {});
11
13
  nuxtApp.vueApp.use(Maska);
14
+ nuxtApp.vueApp.use(i18n);
12
15
  nuxtApp.vueApp.component('VueDatePicker', VueDatePicker);
13
16
 
14
17
  return {
@@ -13,7 +13,6 @@ export default defineNuxtPlugin(nuxtApp => {
13
13
  provide: {
14
14
  dataStore: dataStore,
15
15
  rules: dataStore.rules,
16
- t: dataStore.t,
17
16
  toast: dataStore.showToaster,
18
17
  },
19
18
  };
@@ -8,8 +8,15 @@ import * as directives from 'vuetify/directives';
8
8
  export default defineNuxtPlugin(nuxtApp => {
9
9
  const vuetify = createVuetify({
10
10
  ssr: false,
11
- components,
11
+ components: {
12
+ ...components,
13
+ },
12
14
  directives,
15
+ defaults: {
16
+ VForm: {
17
+ validateOn: 'lazy',
18
+ },
19
+ },
13
20
  theme: {
14
21
  themes: {
15
22
  light: {