hl-core 0.0.8-beta.2 → 0.0.8-beta.21

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 (43) hide show
  1. package/api/index.ts +42 -14
  2. package/api/interceptors.ts +1 -1
  3. package/components/Dialog/Dialog.vue +6 -3
  4. package/components/Form/FormBlock.vue +63 -28
  5. package/components/Form/FormSection.vue +4 -1
  6. package/components/Form/ManagerAttachment.vue +196 -0
  7. package/components/Form/ProductConditionsBlock.vue +64 -12
  8. package/components/Input/Datepicker.vue +5 -1
  9. package/components/Input/FormInput.vue +20 -4
  10. package/components/Input/PanelInput.vue +5 -0
  11. package/components/Layout/Drawer.vue +1 -0
  12. package/components/Layout/Header.vue +40 -4
  13. package/components/Layout/SettingsPanel.vue +35 -8
  14. package/components/Menu/MenuHover.vue +30 -0
  15. package/components/Menu/MenuNav.vue +28 -11
  16. package/components/Pages/Anketa.vue +19 -15
  17. package/components/Pages/Auth.vue +147 -30
  18. package/components/Pages/InvoiceInfo.vue +30 -0
  19. package/components/Pages/MemberForm.vue +284 -89
  20. package/components/Pages/ProductConditions.vue +291 -7
  21. package/components/Panel/PanelHandler.vue +74 -1
  22. package/components/Utilities/JsonViewer.vue +27 -0
  23. package/composables/classes.ts +128 -23
  24. package/composables/constants.ts +12 -1
  25. package/composables/index.ts +5 -1
  26. package/composables/styles.ts +9 -3
  27. package/configs/i18n.ts +19 -0
  28. package/layouts/default.vue +2 -2
  29. package/locales/en.json +560 -0
  30. package/locales/kz.json +560 -0
  31. package/locales/ru.json +560 -0
  32. package/nuxt.config.ts +8 -0
  33. package/package.json +7 -2
  34. package/pages/500.vue +1 -1
  35. package/pages/Token.vue +51 -0
  36. package/plugins/helperFunctionsPlugins.ts +2 -0
  37. package/plugins/storePlugin.ts +0 -1
  38. package/plugins/vuetifyPlugin.ts +8 -1
  39. package/store/data.store.js +475 -530
  40. package/store/member.store.ts +120 -15
  41. package/store/rules.js +27 -3
  42. package/types/index.ts +34 -0
  43. package/store/messages.ts +0 -434
@@ -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,12 @@ 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 => {
10
11
  nuxtApp.vueApp.use(Vidle, {});
11
12
  nuxtApp.vueApp.use(Maska);
13
+ nuxtApp.vueApp.use(i18n);
12
14
  nuxtApp.vueApp.component('VueDatePicker', VueDatePicker);
13
15
 
14
16
  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: {