hl-core 0.0.9-beta.9 → 0.0.10-beta.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/api/base.api.ts +1109 -0
- package/api/index.ts +2 -620
- package/api/interceptors.ts +38 -1
- package/components/Button/Btn.vue +1 -6
- package/components/Complex/MessageBlock.vue +1 -1
- package/components/Complex/Page.vue +1 -1
- package/components/Complex/TextBlock.vue +23 -0
- package/components/Dialog/Dialog.vue +70 -16
- package/components/Dialog/FamilyDialog.vue +1 -1
- package/components/Form/DynamicForm.vue +100 -0
- package/components/Form/FormBlock.vue +12 -3
- package/components/Form/FormData.vue +110 -0
- package/components/Form/FormSection.vue +3 -3
- package/components/Form/FormTextSection.vue +11 -3
- package/components/Form/FormToggle.vue +25 -5
- package/components/Form/ManagerAttachment.vue +177 -89
- package/components/Form/ProductConditionsBlock.vue +59 -6
- package/components/Input/Datepicker.vue +43 -7
- package/components/Input/DynamicInput.vue +23 -0
- package/components/Input/FileInput.vue +25 -5
- package/components/Input/FormInput.vue +7 -4
- package/components/Input/Monthpicker.vue +34 -0
- package/components/Input/PanelInput.vue +5 -1
- package/components/Input/RoundedSelect.vue +7 -2
- package/components/Input/SwitchInput.vue +64 -0
- package/components/Input/TextInput.vue +160 -0
- package/components/Layout/Drawer.vue +16 -4
- package/components/Layout/Header.vue +23 -2
- package/components/Layout/Loader.vue +2 -1
- package/components/Layout/SettingsPanel.vue +24 -11
- package/components/Menu/InfoMenu.vue +35 -0
- package/components/Menu/MenuNav.vue +25 -3
- package/components/Pages/Anketa.vue +254 -65
- package/components/Pages/Auth.vue +56 -9
- package/components/Pages/ContragentForm.vue +9 -9
- package/components/Pages/Documents.vue +266 -30
- package/components/Pages/InvoiceInfo.vue +1 -1
- package/components/Pages/MemberForm.vue +774 -102
- package/components/Pages/ProductAgreement.vue +1 -8
- package/components/Pages/ProductConditions.vue +1132 -180
- package/components/Panel/PanelHandler.vue +626 -49
- package/components/Panel/PanelSelectItem.vue +17 -2
- package/components/Panel/RightPanelCloser.vue +7 -0
- package/components/Transitions/Animation.vue +28 -0
- package/components/Utilities/JsonViewer.vue +3 -2
- package/components/Utilities/Qr.vue +44 -0
- package/composables/axios.ts +1 -0
- package/composables/classes.ts +501 -14
- package/composables/constants.ts +126 -6
- package/composables/fields.ts +328 -0
- package/composables/index.ts +355 -20
- package/composables/styles.ts +23 -6
- package/configs/pwa.ts +63 -0
- package/layouts/clear.vue +21 -0
- package/layouts/default.vue +62 -3
- package/layouts/full.vue +21 -0
- package/locales/ru.json +558 -16
- package/nuxt.config.ts +11 -15
- package/package.json +36 -39
- package/pages/Token.vue +0 -13
- package/plugins/head.ts +26 -0
- package/plugins/vuetifyPlugin.ts +1 -5
- package/store/data.store.ts +1610 -321
- package/store/extractStore.ts +17 -0
- package/store/form.store.ts +13 -1
- package/store/member.store.ts +1 -1
- package/store/rules.ts +97 -3
- package/store/toast.ts +1 -1
- package/types/enum.ts +81 -0
- package/types/env.d.ts +2 -0
- package/types/form.ts +94 -0
- package/types/index.ts +419 -24
package/layouts/default.vue
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="h-full z-[1]" :class="[$dataStore.hasLayoutMargins ? 'lg:mx-[22px] lg:my-[33px] lg:shadow-xl' : '']">
|
|
3
3
|
<div :class="[$styles.greenBg]" class="hidden z-[-1] lg:block absolute left-0 top-0 h-[200px] w-full"></div>
|
|
4
|
-
<section class="flex h-full" :class="$styles.blueBgLight">
|
|
4
|
+
<section class="flex h-full relative" :class="$styles.blueBgLight">
|
|
5
5
|
<base-menu-nav
|
|
6
6
|
v-if="$dataStore.showNav"
|
|
7
7
|
:selected="$dataStore.menu.selectedItem"
|
|
8
8
|
:title="$dataStore.menu.title ?? 'Страховые продукты'"
|
|
9
9
|
:has-back="$dataStore.menu.hasBack ?? false"
|
|
10
10
|
:back-icon="$dataStore.menu.backIcon ?? 'mdi-arrow-left'"
|
|
11
|
-
:more-icon="$dataStore.menu.moreIcon ?? 'mdi-
|
|
12
|
-
:has-more="'hasMore' in $route.meta
|
|
11
|
+
:more-icon="$dataStore.menu.moreIcon ?? 'mdi-dots-vertical'"
|
|
12
|
+
:has-more="'hasMore' in $route.meta ? !!$route.meta.hasMore : true"
|
|
13
|
+
:has-info="$dataStore.menu.hasInfo"
|
|
14
|
+
:info-icon="$dataStore.menu.infoIcon"
|
|
15
|
+
:info-items="$dataStore.menu.infoItems"
|
|
13
16
|
:class="{
|
|
14
17
|
// @ts-ignore
|
|
15
18
|
'!hidden': !$display().lgAndUp.value && !!$dataStore.menu.selectedItem.title,
|
|
@@ -23,6 +26,7 @@
|
|
|
23
26
|
</template>
|
|
24
27
|
</base-menu-nav>
|
|
25
28
|
<slot></slot>
|
|
29
|
+
<base-drawer which-panel="rightPanel" :panel-title="$dataStore.rightPanel.title" side="right" />
|
|
26
30
|
<base-settings-panel />
|
|
27
31
|
</section>
|
|
28
32
|
</div>
|
|
@@ -31,6 +35,7 @@
|
|
|
31
35
|
<script setup lang="ts">
|
|
32
36
|
import { MenuItem } from '../composables/classes';
|
|
33
37
|
const dataStore = useDataStore();
|
|
38
|
+
const { $pwa } = useNuxtApp();
|
|
34
39
|
|
|
35
40
|
const openSettings = async () => {
|
|
36
41
|
dataStore.settings.open = true;
|
|
@@ -44,6 +49,60 @@ const onLink = async (item: MenuItem) => {
|
|
|
44
49
|
const onBack = async (item: MenuItem) => {
|
|
45
50
|
if (dataStore.menu.onBack) await dataStore.menu.onBack(item);
|
|
46
51
|
};
|
|
52
|
+
|
|
53
|
+
const onInit = async () => {
|
|
54
|
+
const projectConfig = dataStore.projectConfig;
|
|
55
|
+
if (!useEnv().isProduction && process.env.NODE_ENV === 'production' && $pwa && projectConfig === null) {
|
|
56
|
+
const hasConfig = await dataStore.getProjectConfig();
|
|
57
|
+
if (hasConfig === true) {
|
|
58
|
+
const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION);
|
|
59
|
+
if (dataStore.projectConfig !== null && commitVersion !== dataStore.projectConfig.version) {
|
|
60
|
+
//@ts-ignore
|
|
61
|
+
await $pwa.updateServiceWorker(true);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
onInit();
|
|
68
|
+
|
|
69
|
+
watch(
|
|
70
|
+
() => dataStore.settings.open,
|
|
71
|
+
() => {
|
|
72
|
+
if (dataStore.settings.open === true && dataStore.panel.open === true) {
|
|
73
|
+
dataStore.panel.open = false;
|
|
74
|
+
dataStore.panelAction = null;
|
|
75
|
+
}
|
|
76
|
+
if (dataStore.settings.open === true && dataStore.rightPanel.open === true) {
|
|
77
|
+
dataStore.rightPanel.open = false;
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
watch(
|
|
83
|
+
() => dataStore.rightPanel.open,
|
|
84
|
+
() => {
|
|
85
|
+
if (dataStore.rightPanel.open === true && dataStore.panel.open === true) {
|
|
86
|
+
dataStore.panel.open = false;
|
|
87
|
+
dataStore.panelAction = null;
|
|
88
|
+
}
|
|
89
|
+
if (dataStore.rightPanel.open === true && dataStore.settings.open === true) {
|
|
90
|
+
dataStore.settings.open = false;
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
watch(
|
|
96
|
+
() => dataStore.panel.open,
|
|
97
|
+
() => {
|
|
98
|
+
if (dataStore.panel.open === true && dataStore.settings.open === true) {
|
|
99
|
+
dataStore.settings.open = false;
|
|
100
|
+
}
|
|
101
|
+
if (dataStore.panel.open === true && dataStore.rightPanel.open === true) {
|
|
102
|
+
dataStore.rightPanel.open = false;
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
);
|
|
47
106
|
</script>
|
|
48
107
|
<style>
|
|
49
108
|
.mainpage,
|
package/layouts/full.vue
CHANGED
|
@@ -4,3 +4,24 @@
|
|
|
4
4
|
<slot></slot>
|
|
5
5
|
</div>
|
|
6
6
|
</template>
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
const dataStore = useDataStore();
|
|
10
|
+
const { $pwa } = useNuxtApp();
|
|
11
|
+
|
|
12
|
+
const onInit = async () => {
|
|
13
|
+
const projectConfig = dataStore.projectConfig;
|
|
14
|
+
if (!useEnv().isProduction && process.env.NODE_ENV === 'production' && $pwa && projectConfig === null) {
|
|
15
|
+
const hasConfig = await dataStore.getProjectConfig();
|
|
16
|
+
if (hasConfig === true) {
|
|
17
|
+
const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION);
|
|
18
|
+
if (dataStore.projectConfig !== null && commitVersion !== dataStore.projectConfig.version) {
|
|
19
|
+
//@ts-ignore
|
|
20
|
+
await $pwa.updateServiceWorker(true);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
onInit();
|
|
27
|
+
</script>
|