hl-core 0.0.7 → 0.0.8

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 (62) hide show
  1. package/.prettierrc +2 -1
  2. package/api/index.ts +580 -0
  3. package/api/interceptors.ts +38 -0
  4. package/components/Button/Btn.vue +57 -0
  5. package/components/Button/BtnIcon.vue +47 -0
  6. package/components/Button/ScrollButtons.vue +6 -0
  7. package/components/Button/SortArrow.vue +21 -0
  8. package/components/Complex/Content.vue +5 -0
  9. package/components/Complex/ContentBlock.vue +5 -0
  10. package/components/Complex/Page.vue +43 -0
  11. package/components/Dialog/Dialog.vue +76 -0
  12. package/components/Dialog/FamilyDialog.vue +39 -0
  13. package/components/Form/FormBlock.vue +114 -0
  14. package/components/Form/FormSection.vue +18 -0
  15. package/components/Form/FormTextSection.vue +20 -0
  16. package/components/Form/FormToggle.vue +52 -0
  17. package/components/Form/ProductConditionsBlock.vue +68 -0
  18. package/components/Input/EmptyFormField.vue +5 -0
  19. package/components/Input/FileInput.vue +71 -0
  20. package/components/Input/FormInput.vue +171 -0
  21. package/components/Input/PanelInput.vue +133 -0
  22. package/components/Input/RoundedInput.vue +143 -0
  23. package/components/Layout/Drawer.vue +44 -0
  24. package/components/Layout/Header.vue +48 -0
  25. package/components/Layout/Loader.vue +35 -0
  26. package/components/Layout/SettingsPanel.vue +48 -0
  27. package/components/List/ListEmpty.vue +22 -0
  28. package/components/Menu/MenuNav.vue +108 -0
  29. package/components/Menu/MenuNavItem.vue +37 -0
  30. package/components/Pages/Anketa.vue +333 -0
  31. package/components/Pages/Auth.vue +91 -0
  32. package/components/Pages/Documents.vue +108 -0
  33. package/components/Pages/MemberForm.vue +1138 -0
  34. package/components/Pages/ProductAgreement.vue +18 -0
  35. package/components/Pages/ProductConditions.vue +349 -0
  36. package/components/Panel/PanelItem.vue +5 -0
  37. package/components/Panel/PanelSelectItem.vue +20 -0
  38. package/components/Transitions/FadeTransition.vue +5 -0
  39. package/composables/axios.ts +11 -0
  40. package/composables/classes.ts +1129 -0
  41. package/composables/constants.ts +65 -0
  42. package/composables/index.ts +168 -2
  43. package/composables/styles.ts +41 -8
  44. package/layouts/clear.vue +3 -0
  45. package/layouts/default.vue +75 -0
  46. package/layouts/full.vue +6 -0
  47. package/nuxt.config.ts +27 -5
  48. package/package.json +23 -11
  49. package/pages/500.vue +85 -0
  50. package/plugins/helperFunctionsPlugins.ts +14 -2
  51. package/plugins/storePlugin.ts +6 -7
  52. package/plugins/vuetifyPlugin.ts +10 -0
  53. package/store/data.store.js +2460 -6
  54. package/store/form.store.ts +8 -0
  55. package/store/member.store.ts +291 -0
  56. package/store/messages.ts +156 -37
  57. package/store/rules.js +26 -28
  58. package/tailwind.config.js +10 -0
  59. package/types/index.ts +250 -0
  60. package/app.vue +0 -3
  61. package/components/Button/GreenBtn.vue +0 -33
  62. package/store/app.store.js +0 -12
@@ -0,0 +1,171 @@
1
+ <template>
2
+ <v-text-field
3
+ class="form-input"
4
+ :model-value="modelValue"
5
+ v-maska="maska"
6
+ :rules="rules"
7
+ :loading="loading"
8
+ :placeholder="placeholder"
9
+ :label="label"
10
+ :messages="messages"
11
+ :type="type"
12
+ :variant="variant"
13
+ :clear-icon="clearIcon"
14
+ :color="color"
15
+ :hint="hint"
16
+ :clearable="props.readonly ? false : clearable"
17
+ :disabled="disabled"
18
+ :readonly="props.readonly"
19
+ :prepend-icon="prependIcon ? prependIcon : ''"
20
+ :append-icon="appendIcon ? appendIcon : ''"
21
+ :prepend-inner-icon="prependInnerIcon ? prependInnerIcon : ''"
22
+ :append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
23
+ :bg-color="bgColor ? bgColor : ''"
24
+ @keyup.enter.prevent="submitted"
25
+ @click:append="!props.readonly && $emit('append-out')"
26
+ @click:prepend="!props.readonly && $emit('prepend-out')"
27
+ @click:append-inner="!props.readonly && $emit('append')"
28
+ @click:prepend-inner="!props.readonly && $emit('prepend')"
29
+ @update:modelValue="$emit('update:modelValue', $event)"
30
+ >
31
+ <template v-if="loading" #loader>
32
+ <v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate></v-progress-linear>
33
+ </template>
34
+ </v-text-field>
35
+ </template>
36
+
37
+ <script lang="ts">
38
+ export default defineComponent({
39
+ name: 'BaseFormInput',
40
+ props: {
41
+ modelValue: {
42
+ required: false,
43
+ },
44
+ loading: {
45
+ type: Boolean,
46
+ default: false,
47
+ },
48
+ clearable: {
49
+ type: Boolean,
50
+ default: true,
51
+ },
52
+ disabled: {
53
+ type: Boolean,
54
+ default: false,
55
+ },
56
+ readonly: {
57
+ type: Boolean,
58
+ default: false,
59
+ },
60
+ placeholder: {
61
+ type: String,
62
+ default: '',
63
+ },
64
+ label: {
65
+ type: String,
66
+ default: '',
67
+ },
68
+ messages: {
69
+ type: [String, Array<string>],
70
+ },
71
+ maska: {
72
+ type: String,
73
+ default: '',
74
+ },
75
+ hint: {
76
+ type: String,
77
+ default: '',
78
+ },
79
+ rules: {
80
+ type: Array<any>,
81
+ default: [],
82
+ },
83
+ type: {
84
+ type: String as PropType<InputTypes>,
85
+ default: 'text',
86
+ },
87
+ variant: {
88
+ type: String as PropType<InputVariants>,
89
+ default: 'solo',
90
+ },
91
+ color: {
92
+ type: String,
93
+ default: '#009c73',
94
+ },
95
+ clearIcon: {
96
+ type: String,
97
+ default: 'mdi-close',
98
+ },
99
+ prependIcon: {
100
+ type: String,
101
+ },
102
+ appendIcon: {
103
+ type: String,
104
+ },
105
+ prependInnerIcon: {
106
+ type: String,
107
+ },
108
+ appendInnerIcon: {
109
+ type: String,
110
+ },
111
+ bgColor: {
112
+ type: String,
113
+ },
114
+ },
115
+ emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out'],
116
+
117
+ setup(props, { emit }) {
118
+ const submitted = (event: any) => {
119
+ emit('submitted', event);
120
+ };
121
+
122
+ return {
123
+ submitted,
124
+ props,
125
+ };
126
+ },
127
+ });
128
+ </script>
129
+
130
+ <style>
131
+ .form-input input:focus {
132
+ border: none !important;
133
+ outline: none !important;
134
+ }
135
+ .form-input input {
136
+ padding-top: 30px;
137
+ }
138
+ .form-input .v-field {
139
+ box-shadow: none;
140
+ font-size: 14px;
141
+ }
142
+ .form-input .v-label.v-field-label {
143
+ top: 20px;
144
+ }
145
+ .form-input .v-field__append-inner {
146
+ padding-top: 18px;
147
+ padding-right: 6px;
148
+ }
149
+ .form-input .v-field__append-inner i {
150
+ color: #a0b3d8 !important;
151
+ margin-left: 10px;
152
+ margin-right: 4px;
153
+ }
154
+ .form-input {
155
+ border-bottom: 1px solid #f3f6fc;
156
+ }
157
+ .form-input.v-input--error {
158
+ border-color: #ff5449;
159
+ }
160
+ .form-input.v-input--error .v-input__details {
161
+ display: block;
162
+ }
163
+ .form-input .v-input__details {
164
+ display: none;
165
+ background-color: white;
166
+ padding-top: 0 !important;
167
+ }
168
+ .form-input .v-field--error {
169
+ border-color: #ff5449;
170
+ }
171
+ </style>
@@ -0,0 +1,133 @@
1
+ <template>
2
+ <v-text-field
3
+ class="form-input"
4
+ :model-value="modelValue"
5
+ v-maska="maska"
6
+ :rules="rules"
7
+ :loading="loading"
8
+ :placeholder="placeholder"
9
+ :label="label"
10
+ :messages="messages"
11
+ :type="type"
12
+ :variant="variant"
13
+ :clear-icon="clearIcon"
14
+ :color="color"
15
+ :hint="hint"
16
+ :clearable="clearable"
17
+ :disabled="disabled"
18
+ :readonly="true"
19
+ :prepend-icon="prependIcon ? prependIcon : ''"
20
+ :append-icon="appendIcon ? appendIcon : ''"
21
+ :prepend-inner-icon="prependInnerIcon ? prependInnerIcon : ''"
22
+ :append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
23
+ :bg-color="bgColor ? bgColor : ''"
24
+ @keyup.enter.prevent="submitted"
25
+ @click:control="!props.readonly && $emit('append')"
26
+ @click:clear="(props.readonly ? false : clearable) && $emit('update:modelValue', new Value())"
27
+ @click:append="!props.readonly && $emit('append-out')"
28
+ @click:prepend="!props.readonly && $emit('prepend-out')"
29
+ @click:append-inner="!props.readonly && $emit('append')"
30
+ @click:prepend-inner="!props.readonly && $emit('prepend')"
31
+ @update:modelValue="$emit('update:modelValue', $event)"
32
+ >
33
+ <template v-if="loading" #loader>
34
+ <v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate></v-progress-linear>
35
+ </template>
36
+ </v-text-field>
37
+ </template>
38
+
39
+ <script lang="ts">
40
+ import { Value } from '@/composables/classes';
41
+
42
+ export default defineComponent({
43
+ name: 'BasePanelInput',
44
+ props: {
45
+ modelValue: {
46
+ required: false,
47
+ },
48
+ loading: {
49
+ type: Boolean,
50
+ default: false,
51
+ },
52
+ clearable: {
53
+ type: Boolean,
54
+ default: true,
55
+ },
56
+ disabled: {
57
+ type: Boolean,
58
+ default: false,
59
+ },
60
+ readonly: {
61
+ type: Boolean,
62
+ default: false,
63
+ },
64
+ placeholder: {
65
+ type: String,
66
+ default: '',
67
+ },
68
+ label: {
69
+ type: String,
70
+ default: '',
71
+ },
72
+ messages: {
73
+ type: [String, Array<string>],
74
+ },
75
+ maska: {
76
+ type: String,
77
+ default: '',
78
+ },
79
+ hint: {
80
+ type: String,
81
+ default: '',
82
+ },
83
+ rules: {
84
+ type: Array<any>,
85
+ default: [],
86
+ },
87
+ type: {
88
+ type: String as PropType<InputTypes>,
89
+ default: 'text',
90
+ },
91
+ variant: {
92
+ type: String as PropType<InputVariants>,
93
+ default: 'solo',
94
+ },
95
+ color: {
96
+ type: String,
97
+ default: '#009c73',
98
+ },
99
+ clearIcon: {
100
+ type: String,
101
+ default: 'mdi-close',
102
+ },
103
+ prependIcon: {
104
+ type: String,
105
+ },
106
+ appendIcon: {
107
+ type: String,
108
+ },
109
+ prependInnerIcon: {
110
+ type: String,
111
+ },
112
+ appendInnerIcon: {
113
+ type: String,
114
+ },
115
+ bgColor: {
116
+ type: String,
117
+ },
118
+ },
119
+ emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out', 'clear'],
120
+
121
+ setup(props, { emit }) {
122
+ const submitted = (event: any) => {
123
+ emit('submitted', event);
124
+ };
125
+
126
+ return {
127
+ submitted,
128
+ Value,
129
+ props,
130
+ };
131
+ },
132
+ });
133
+ </script>
@@ -0,0 +1,143 @@
1
+ <template>
2
+ <v-text-field
3
+ class="rounded-input"
4
+ :model-value="modelValue"
5
+ v-maska="maska"
6
+ :rules="rules"
7
+ :loading="loading"
8
+ :placeholder="placeholder"
9
+ :label="label"
10
+ :type="type"
11
+ :variant="variant"
12
+ :clear-icon="clearIcon"
13
+ :color="color"
14
+ :hint="hint"
15
+ :clearable="props.readonly ? false : clearable"
16
+ :disabled="disabled"
17
+ :readonly="props.readonly"
18
+ :prepend-icon="prependIcon ? prependIcon : ''"
19
+ :append-icon="appendIcon ? appendIcon : ''"
20
+ :prepend-inner-icon="prependInnerIcon ? prependInnerIcon : ''"
21
+ :append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
22
+ :bg-color="bgColor ? bgColor : ''"
23
+ @keyup.enter.prevent="submitted"
24
+ @click:append="!props.readonly && $emit('append-out')"
25
+ @click:prepend="!props.readonly && $emit('prepend-out')"
26
+ @click:append-inner="!props.readonly && $emit('append')"
27
+ @click:prepend-inner="!props.readonly && $emit('prepend')"
28
+ @update:modelValue="$emit('update:modelValue', $event)"
29
+ >
30
+ <template v-if="loading" #loader>
31
+ <v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate></v-progress-linear>
32
+ </template>
33
+ </v-text-field>
34
+ </template>
35
+
36
+ <script lang="ts">
37
+ export default defineComponent({
38
+ name: 'BaseRoundedInput',
39
+ props: {
40
+ modelValue: {
41
+ required: false,
42
+ },
43
+ loading: {
44
+ type: Boolean,
45
+ default: false,
46
+ },
47
+ clearable: {
48
+ type: Boolean,
49
+ default: true,
50
+ },
51
+ disabled: {
52
+ type: Boolean,
53
+ default: false,
54
+ },
55
+ readonly: {
56
+ type: Boolean,
57
+ default: false,
58
+ },
59
+ placeholder: {
60
+ type: String,
61
+ default: '',
62
+ },
63
+ label: {
64
+ type: String,
65
+ default: '',
66
+ },
67
+ maska: {
68
+ type: String,
69
+ default: '',
70
+ },
71
+ hint: {
72
+ type: String,
73
+ default: '',
74
+ },
75
+ rules: {
76
+ type: Array<any>,
77
+ default: [],
78
+ },
79
+ type: {
80
+ type: String as PropType<InputTypes>,
81
+ default: 'text',
82
+ },
83
+ variant: {
84
+ type: String as PropType<InputVariants>,
85
+ default: 'solo',
86
+ },
87
+ color: {
88
+ type: String,
89
+ default: '#009c73',
90
+ },
91
+ clearIcon: {
92
+ type: String,
93
+ default: 'mdi-close',
94
+ },
95
+ prependIcon: {
96
+ type: String,
97
+ },
98
+ appendIcon: {
99
+ type: String,
100
+ },
101
+ prependInnerIcon: {
102
+ type: String,
103
+ },
104
+ appendInnerIcon: {
105
+ type: String,
106
+ },
107
+ bgColor: {
108
+ type: String,
109
+ },
110
+ },
111
+ emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out'],
112
+
113
+ setup(props, { emit }) {
114
+ const submitted = (event: any) => {
115
+ emit('submitted', event);
116
+ };
117
+
118
+ return {
119
+ submitted,
120
+ props
121
+ };
122
+ },
123
+ });
124
+ </script>
125
+
126
+ <style>
127
+ .rounded-input input:focus {
128
+ border: none !important;
129
+ outline: none !important;
130
+ }
131
+ .rounded-input .v-label.v-field-label {
132
+ top: 20px;
133
+ }
134
+ .rounded-input .v-field {
135
+ border-radius: 8px;
136
+ border: 1px solid #dadada;
137
+ box-shadow: none;
138
+ font-size: 14px;
139
+ }
140
+ .rounded-input .v-field--error {
141
+ border-color: #ff5449;
142
+ }
143
+ </style>
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <v-navigation-drawer
3
+ v-model="$dataStore[whichPanel].open"
4
+ :temporary="$dataStore[whichPanel].overlay"
5
+ location="right"
6
+ class="sm:!w-[400px] lg:!relative !right-0"
7
+ :class="[$dataStore[whichPanel].overlay ? 'lg:!hidden' : '', $dataStore[whichPanel].open ? '!w-full lg:!w-[420px]' : 'lg:!w-[0px]']"
8
+ :disable-resize-watcher="true"
9
+ :disable-route-watcher="true"
10
+ >
11
+ <base-header :title="panelTitle" :has-back="true" back-icon="mdi-close" class="justify-center" @onBack="closePanel"></base-header>
12
+ <div class="flex flex-col" :id="$dataStore.panelAction === null ? 'panel-actions' : ''">
13
+ <slot></slot>
14
+ </div>
15
+ </v-navigation-drawer>
16
+ </template>
17
+
18
+ <script lang="ts">
19
+ export default defineComponent({
20
+ name: 'BasePanel',
21
+ props: {
22
+ panelTitle: {
23
+ type: String,
24
+ default: '',
25
+ },
26
+ whichPanel: {
27
+ type: String as PropType<PanelTypes>,
28
+ default: 'panel',
29
+ },
30
+ },
31
+ setup(props) {
32
+ const dataStore = useDataStore();
33
+
34
+ const closePanel = () => {
35
+ dataStore[props.whichPanel].open = false;
36
+ dataStore.panelAction = null;
37
+ };
38
+
39
+ return {
40
+ closePanel,
41
+ };
42
+ },
43
+ });
44
+ </script>
@@ -0,0 +1,48 @@
1
+ <template>
2
+ <header class="relative w-full h-[70px] text-center font-medium align-middle flex items-center border-b-[1px]" :class="[$libStyles.blueBgLight, $libStyles.textSimple]">
3
+ <i v-if="hasBack" @click="$emit('onBack')" class="absolute left-5 mdi text-xl cursor-pointer" :class="[backIcon]"></i>
4
+ <span class="mx-10">{{ title }}</span>
5
+ <i v-if="hasMore" @click="$emit('onMore')" class="mdi absolute right-5 text-xl cursor-pointer" :class="[moreIcon, hideMoreOnLg ? 'lg:!hidden' : '']"> </i>
6
+ </header>
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ export default defineComponent({
11
+ props: {
12
+ hasBack: {
13
+ type: Boolean,
14
+ default: false,
15
+ },
16
+ hasMore: {
17
+ type: Boolean,
18
+ default: false,
19
+ },
20
+ hideMoreOnLg: {
21
+ type: Boolean,
22
+ default: false,
23
+ },
24
+ backIcon: {
25
+ type: String,
26
+ default: 'mdi-arrow-left',
27
+ },
28
+ moreIcon: {
29
+ type: String,
30
+ default: 'mdi-cog-outline',
31
+ },
32
+ title: {
33
+ type: String,
34
+ default: '',
35
+ },
36
+ },
37
+ emits: ['onBack', 'onMore'],
38
+ setup() {
39
+ const dataStore = useDataStore();
40
+
41
+ const onClickOutside = () => {
42
+ dataStore.settings.open = false;
43
+ };
44
+
45
+ return { onClickOutside };
46
+ },
47
+ });
48
+ </script>
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <v-progress-circular :size="size" :width="width" :indeterminate="indeterminate" :color="color" :bg-color="bgColor"></v-progress-circular>
3
+ </template>
4
+
5
+ <script lang="ts">
6
+ export default defineComponent({
7
+ name: 'BaseLoader',
8
+ props: {
9
+ size: {
10
+ type: Number,
11
+ default: 40,
12
+ },
13
+ width: {
14
+ type: Number,
15
+ default: 4,
16
+ },
17
+ indeterminate: {
18
+ type: Boolean,
19
+ default: true,
20
+ },
21
+ overlay: {
22
+ type: Boolean,
23
+ default: true,
24
+ },
25
+ color: {
26
+ type: String,
27
+ default: '#FAB31C',
28
+ },
29
+ bgColor: {
30
+ type: String,
31
+ default: '#009C73',
32
+ },
33
+ },
34
+ });
35
+ </script>
@@ -0,0 +1,48 @@
1
+ <template>
2
+ <base-drawer :panel-title="$dataStore.menu.title" which-panel="settings">
3
+ <base-panel-item>
4
+ <v-btn size="x-small" icon="mdi-minus" color="#A0B3D8" class="text-white" variant="flat" @click="handleFontSize('decrease')"></v-btn>
5
+ Шрифт
6
+ <v-btn size="x-small" icon="mdi-plus" color="#A0B3D8" class="text-white" variant="flat" @click="handleFontSize('increase')"></v-btn>
7
+ </base-panel-item>
8
+ <base-panel-item>
9
+ <v-text-field v-model="$dataStore.user.fullName" :readonly="true" hide-details variant="plain" :label="$dataStore.user.roles?.join(', ')"></v-text-field>
10
+ <i class="mdi mdi-account-outline text-2xl text-[#A0B3D8]"></i
11
+ ></base-panel-item>
12
+ <base-panel-item
13
+ v-for="panelItem of dataStore.settings.items.filter(i => (typeof i.show === 'boolean' ? i.show : true))"
14
+ :key="panelItem.title!"
15
+ class="cursor-pointer"
16
+ @click="panelItem.action ? panelItem.action() : null"
17
+ >
18
+ {{ panelItem.title }}
19
+ <i v-if="panelItem.icon" class="mdi text-xl text-[#A0B3D8]" :class="[panelItem.icon]"></i>
20
+ </base-panel-item>
21
+ <base-panel-item @click="dialog = true" class="cursor-pointer">
22
+ Выход
23
+ <i class="mdi mdi-logout text-xl text-[#A0B3D8]"></i>
24
+ </base-panel-item>
25
+
26
+ <base-dialog v-model="dialog" :title="$t('dialog.exit')" :subtitle="$t('dialog.dataWillClear')" actions="default" @yes="logoutUser" @no="dialog = false"> </base-dialog
27
+ ></base-drawer>
28
+ </template>
29
+
30
+ <script lang="ts" setup>
31
+ const dialog = ref(false);
32
+ const dataStore = useDataStore();
33
+
34
+ const handleFontSize = (action: 'increase' | 'decrease') => {
35
+ if (action === 'increase' && dataStore.fontSize < 24) dataStore.fontSize += 2;
36
+ if (action === 'decrease' && dataStore.fontSize > 14) dataStore.fontSize -= 2;
37
+ if (dataStore.isEFO) {
38
+ dataStore.sendToChild(constants.postActions.font, dataStore.fontSize);
39
+ } else {
40
+ dataStore.sendToParent(constants.postActions.font, dataStore.fontSize);
41
+ }
42
+ };
43
+
44
+ const logoutUser = async () => {
45
+ dialog.value = false;
46
+ await dataStore.logoutUser();
47
+ };
48
+ </script>
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <div class="border-[1px] rounded-lg h-[80px] mx-[10px] mt-[14px] flex place-content-center" :class="[$libStyles.blueBgLight, $libStyles.textTitle]">
3
+ <div class="flex justify-center items-center font-medium gap-2 opacity-40">
4
+ {{ text }}
5
+ <i class="text-2xl mdi" :class="[icon ? icon : 'mdi-database-off-outline']"></i>
6
+ </div>
7
+ </div>
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ export default defineComponent({
12
+ props: {
13
+ text: {
14
+ type: String,
15
+ default: 'Отсутствуют данные',
16
+ },
17
+ icon: {
18
+ type: String,
19
+ },
20
+ },
21
+ });
22
+ </script>