hl-core 0.0.8 → 0.0.9-beta.2
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/api/index.ts +142 -101
- package/api/interceptors.ts +17 -13
- package/components/Button/Btn.vue +1 -1
- package/components/Button/ScrollButtons.vue +2 -2
- package/components/Complex/MessageBlock.vue +26 -0
- package/components/Complex/Page.vue +1 -1
- package/components/Dialog/Dialog.vue +9 -39
- package/components/Dialog/FamilyDialog.vue +7 -4
- package/components/Form/FormBlock.vue +90 -42
- package/components/Form/FormSection.vue +4 -1
- package/components/Form/FormToggle.vue +1 -2
- package/components/Form/ManagerAttachment.vue +197 -0
- package/components/Form/ProductConditionsBlock.vue +68 -14
- package/components/Input/Datepicker.vue +45 -0
- package/components/Input/FileInput.vue +2 -3
- package/components/Input/FormInput.vue +31 -7
- package/components/Input/PanelInput.vue +7 -2
- package/components/Input/RoundedInput.vue +2 -2
- package/components/Input/RoundedSelect.vue +137 -0
- package/components/Layout/Drawer.vue +4 -2
- package/components/Layout/Header.vue +40 -4
- package/components/Layout/Loader.vue +1 -1
- package/components/Layout/SettingsPanel.vue +51 -13
- package/components/Menu/MenuHover.vue +30 -0
- package/components/Menu/MenuNav.vue +29 -13
- package/components/Menu/MenuNavItem.vue +6 -3
- package/components/Pages/Anketa.vue +59 -33
- package/components/Pages/Auth.vue +139 -46
- package/components/Pages/Documents.vue +7 -7
- package/components/Pages/InvoiceInfo.vue +30 -0
- package/components/Pages/MemberForm.vue +544 -293
- package/components/Pages/ProductAgreement.vue +4 -2
- package/components/Pages/ProductConditions.vue +673 -75
- package/components/Panel/PanelHandler.vue +304 -0
- package/components/Panel/PanelSelectItem.vue +1 -1
- package/components/Transitions/SlideTransition.vue +5 -0
- package/components/Utilities/Chip.vue +27 -0
- package/components/Utilities/JsonViewer.vue +27 -0
- package/composables/axios.ts +1 -1
- package/composables/classes.ts +223 -101
- package/composables/constants.ts +26 -51
- package/composables/index.ts +80 -2
- package/composables/styles.ts +15 -3
- package/configs/i18n.ts +17 -0
- package/layouts/default.vue +6 -6
- package/locales/kz.json +585 -0
- package/locales/ru.json +587 -0
- package/nuxt.config.ts +13 -1
- package/package.json +43 -11
- package/pages/500.vue +2 -2
- package/pages/Token.vue +51 -0
- package/plugins/helperFunctionsPlugins.ts +6 -0
- package/plugins/storePlugin.ts +0 -1
- package/plugins/vuetifyPlugin.ts +8 -1
- package/store/data.store.ts +2649 -0
- package/store/form.store.ts +1 -1
- package/store/member.store.ts +164 -52
- package/store/{rules.js → rules.ts} +65 -34
- package/types/enum.ts +83 -0
- package/types/env.d.ts +10 -0
- package/types/index.ts +262 -5
- package/store/data.store.js +0 -2482
- package/store/messages.ts +0 -429
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hl-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9-beta.2",
|
|
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/",
|
|
@@ -17,32 +19,62 @@
|
|
|
17
19
|
"tailwind.config.js",
|
|
18
20
|
".prettierrc"
|
|
19
21
|
],
|
|
22
|
+
"config": {
|
|
23
|
+
"project": "",
|
|
24
|
+
"branch": ""
|
|
25
|
+
},
|
|
20
26
|
"scripts": {
|
|
21
27
|
"build": "nuxt build",
|
|
22
|
-
"dev": "nuxt
|
|
28
|
+
"dev": "nuxt dev",
|
|
23
29
|
"generate": "nuxt generate",
|
|
24
|
-
"preview": "nuxt preview"
|
|
30
|
+
"preview": "nuxt preview",
|
|
31
|
+
"update:core": "git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main",
|
|
32
|
+
"update:aml": "cd .. && cd aml && yarn && git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main && cd .. && cd core",
|
|
33
|
+
"update:baiterek": "cd .. && cd baiterek && yarn && git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main && cd .. && cd core",
|
|
34
|
+
"update:bolashak": "cd .. && cd bolashak && yarn && git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main && cd .. && cd core",
|
|
35
|
+
"update:calculator": "cd .. && cd calculator && yarn && git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main && cd .. && cd core",
|
|
36
|
+
"update:efo": "cd .. && cd efo && yarn && git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main && cd .. && cd core",
|
|
37
|
+
"update:gons": "cd .. && cd gons && yarn && git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main && cd .. && cd core",
|
|
38
|
+
"update:kazyna": "cd .. && cd kazyna && yarn && git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main && cd .. && cd core",
|
|
39
|
+
"update:liferenta": "cd .. && cd liferenta && yarn && git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main && cd .. && cd core",
|
|
40
|
+
"update:lka": "cd .. && cd lka && yarn && git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main && cd .. && cd core",
|
|
41
|
+
"update:all": "yarn update:aml && yarn update:baiterek && yarn update:bolashak && yarn update:calculator && yarn update:efo && yarn update:gons && yarn update:kazyna && yarn update:liferenta && yarn update:lka",
|
|
42
|
+
"pull:aml": "cd .. && cd aml && git pull && cd .. && cd core",
|
|
43
|
+
"pull:baiterek": "cd .. && cd baiterek && git pull && cd .. && cd core",
|
|
44
|
+
"pull:bolashak": "cd .. && cd bolashak && git pull && cd .. && cd core",
|
|
45
|
+
"pull:calculator": "cd .. && cd calculator && git pull && cd .. && cd core",
|
|
46
|
+
"pull:efo": "cd .. && cd efo && git pull && cd .. && cd core",
|
|
47
|
+
"pull:gons": "cd .. && cd gons && git pull && cd .. && cd core",
|
|
48
|
+
"pull:kazyna": "cd .. && cd kazyna && git pull && cd .. && cd core",
|
|
49
|
+
"pull:liferenta": "cd .. && cd liferenta && git pull && cd .. && cd core",
|
|
50
|
+
"pull:lka": "cd .. && cd lka && git pull && cd .. && cd core",
|
|
51
|
+
"pull:all": "cd .. && cd aml && git pull && cd .. && cd baiterek && git pull && cd .. && cd bolashak && git pull && cd .. && cd calculator && git pull && cd .. && cd efo && git pull && cd .. && cd gons && git pull && cd .. && cd kazyna && git pull && cd .. && cd liferenta && git pull && cd .. && cd lka && git pull && cd ..",
|
|
52
|
+
"typecheck": "nuxt typecheck"
|
|
25
53
|
},
|
|
26
54
|
"devDependencies": {
|
|
27
55
|
"@nuxt/devtools": "^0.4.5",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"prettier": "^2.8.4",
|
|
31
|
-
"typescript": "^4.9.5"
|
|
56
|
+
"nuxt": "^3.6.2",
|
|
57
|
+
"prettier": "^2.8.8"
|
|
32
58
|
},
|
|
33
59
|
"dependencies": {
|
|
60
|
+
"@intlify/unplugin-vue-i18n": "^0.12.2",
|
|
34
61
|
"@mdi/font": "^7.2.96",
|
|
35
|
-
"@nuxtjs/tailwindcss": "^6.
|
|
36
|
-
"@pinia/nuxt": "^0.4.
|
|
62
|
+
"@nuxtjs/tailwindcss": "^6.8.0",
|
|
63
|
+
"@pinia/nuxt": "^0.4.11",
|
|
64
|
+
"@vuepic/vue-datepicker": "^5.3.0",
|
|
37
65
|
"animate.css": "^4.1.1",
|
|
38
66
|
"axios": "^1.4.0",
|
|
39
67
|
"fast-xml-parser": "4.0.12",
|
|
40
68
|
"jwt-decode": "^3.1.2",
|
|
41
69
|
"maska": "1.5.0",
|
|
42
|
-
"pinia": "^2.
|
|
70
|
+
"pinia": "^2.1.4",
|
|
71
|
+
"typedoc": "^0.24.8",
|
|
72
|
+
"typescript": "5.0.4",
|
|
43
73
|
"v-idle-3": "^0.3.14",
|
|
74
|
+
"vue-i18n": "^9.2.2",
|
|
75
|
+
"vue-json-pretty": "^2.2.4",
|
|
44
76
|
"vue-toastification": "^2.0.0-rc.5",
|
|
45
77
|
"vue-uuid": "^3.0.0",
|
|
46
|
-
"vuetify": "^3.
|
|
78
|
+
"vuetify": "^3.3.7"
|
|
47
79
|
}
|
|
48
80
|
}
|
package/pages/500.vue
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
>
|
|
48
48
|
</p>
|
|
49
49
|
</div>
|
|
50
|
-
<base-btn text="На главную" @click="goBack" class="!w-fit px-14"
|
|
50
|
+
<base-btn text="На главную" @click="goBack" class="!w-fit px-14" />
|
|
51
51
|
</base-content>
|
|
52
52
|
</template>
|
|
53
53
|
|
|
@@ -69,7 +69,7 @@ export default defineComponent({
|
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
const goBack = () => {
|
|
72
|
-
if (dataStore.
|
|
72
|
+
if (dataStore.isBridge) {
|
|
73
73
|
router.push({ name: 'Auth' });
|
|
74
74
|
} else {
|
|
75
75
|
dataStore.sendToParent(constants.postActions.Error500, 500);
|
package/pages/Token.vue
ADDED
|
@@ -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>
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { capitalize, getFullNameShorted, reformatIin, Masks } from '../composables';
|
|
2
2
|
import { constants } from '../composables/constants';
|
|
3
3
|
import { Styles } from '../composables/styles';
|
|
4
|
+
import VueDatePicker from '@vuepic/vue-datepicker';
|
|
5
|
+
import '@vuepic/vue-datepicker/dist/main.css';
|
|
4
6
|
import Vidle from 'v-idle-3';
|
|
5
7
|
import Maska from 'maska';
|
|
8
|
+
import i18n from '../configs/i18n';
|
|
6
9
|
|
|
7
10
|
export default defineNuxtPlugin(nuxtApp => {
|
|
11
|
+
//@ts-ignore
|
|
8
12
|
nuxtApp.vueApp.use(Vidle, {});
|
|
9
13
|
nuxtApp.vueApp.use(Maska);
|
|
14
|
+
nuxtApp.vueApp.use(i18n);
|
|
15
|
+
nuxtApp.vueApp.component('VueDatePicker', VueDatePicker);
|
|
10
16
|
|
|
11
17
|
return {
|
|
12
18
|
provide: {
|
package/plugins/storePlugin.ts
CHANGED
package/plugins/vuetifyPlugin.ts
CHANGED
|
@@ -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: {
|