hl-core 0.0.7-beta.9 → 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 (52) hide show
  1. package/.prettierrc +2 -1
  2. package/api/index.ts +66 -47
  3. package/api/interceptors.ts +4 -4
  4. package/components/Button/Btn.vue +7 -2
  5. package/components/Button/ScrollButtons.vue +6 -0
  6. package/components/Complex/ContentBlock.vue +5 -0
  7. package/components/{Layout → Dialog}/Dialog.vue +3 -27
  8. package/components/Dialog/FamilyDialog.vue +39 -0
  9. package/components/Form/FormBlock.vue +114 -0
  10. package/components/Form/FormSection.vue +18 -0
  11. package/components/Form/FormTextSection.vue +20 -0
  12. package/components/Form/FormToggle.vue +52 -0
  13. package/components/Form/ProductConditionsBlock.vue +68 -0
  14. package/components/Input/EmptyFormField.vue +5 -0
  15. package/components/Input/FileInput.vue +71 -0
  16. package/components/Input/FormInput.vue +171 -0
  17. package/components/Input/PanelInput.vue +133 -0
  18. package/components/Input/RoundedInput.vue +35 -36
  19. package/components/Layout/Drawer.vue +18 -16
  20. package/components/Layout/Header.vue +4 -18
  21. package/components/Layout/Loader.vue +1 -7
  22. package/components/Layout/SettingsPanel.vue +17 -37
  23. package/components/List/ListEmpty.vue +22 -0
  24. package/components/Menu/MenuNav.vue +22 -20
  25. package/components/Menu/MenuNavItem.vue +6 -6
  26. package/components/Pages/Anketa.vue +333 -0
  27. package/components/Pages/Auth.vue +91 -0
  28. package/components/Pages/Documents.vue +108 -0
  29. package/components/Pages/MemberForm.vue +1138 -0
  30. package/components/Pages/ProductAgreement.vue +18 -0
  31. package/components/Pages/ProductConditions.vue +349 -0
  32. package/components/Panel/PanelItem.vue +2 -4
  33. package/components/Panel/PanelSelectItem.vue +20 -0
  34. package/components/Transitions/FadeTransition.vue +5 -0
  35. package/composables/classes.ts +299 -253
  36. package/composables/constants.ts +14 -7
  37. package/composables/index.ts +55 -60
  38. package/composables/styles.ts +31 -7
  39. package/layouts/default.vue +46 -26
  40. package/layouts/full.vue +2 -12
  41. package/nuxt.config.ts +3 -0
  42. package/package.json +13 -10
  43. package/pages/500.vue +40 -12
  44. package/plugins/helperFunctionsPlugins.ts +6 -2
  45. package/plugins/storePlugin.ts +6 -5
  46. package/store/data.store.js +781 -1880
  47. package/store/member.store.ts +291 -0
  48. package/store/messages.ts +66 -51
  49. package/store/rules.js +26 -28
  50. package/types/index.ts +250 -0
  51. package/composables/models.ts +0 -43
  52. /package/store/{form.store.js → form.store.ts} +0 -0
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <div class="pt-3 pl-5 rounded-lg border-[1px]" :class="[$libStyles.whiteBg]">
3
+ <div>
4
+ <p :class="[$libStyles.textTitle, $libStyles.greenText]">
5
+ {{ $t('productConditions') }}
6
+ </p>
7
+ <p v-if="!!subtitle" :class="[$libStyles.greyText, $libStyles.textSimple]">{{ subtitle }}</p>
8
+ </div>
9
+ <div class="mt-6 grid grid-cols-3 lg:grid-cols-5 auto-rows-fr items-center">
10
+ <span :class="[$libStyles.textSimple]" class="font-medium">{{ $t('productConditionsForm.requestedSumInsured') }}</span>
11
+ <span :class="[$libStyles.textSimple]" class="font-medium">{{ $t('productConditionsForm.insurancePremiumPerMonth') }}</span>
12
+ <span :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('productConditionsForm.coverPeriod') }}</span>
13
+ <span :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('productConditionsForm.payPeriod') }}</span>
14
+ </div>
15
+ <div class="grid grid-cols-3 lg:grid-cols-5 auto-rows-fr items-center">
16
+ <span :class="[amount === null && $libStyles.emptyBlockCol]">{{ amount }} </span>
17
+ <span :class="[premium === null && $libStyles.emptyBlockCol]"> {{ premium }}</span>
18
+ <span :class="[coverPeriod === null && $libStyles.emptyBlockCol]" class="hidden lg:block">{{ coverPeriod }} </span>
19
+ <span :class="[paymentPeriod === null && $libStyles.emptyBlockCol]" class="hidden lg:block">
20
+ {{ paymentPeriod }}
21
+ </span>
22
+ <div
23
+ class="rounded-br-lg transition-all h-[70px] w-[60px] relative place-self-end cursor-pointer"
24
+ :class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover]"
25
+ @click="$emit('onMore', { whichForm: 'productConditions' })"
26
+ >
27
+ <i class="mdi mdi-dots-vertical text-xl absolute top-[20px] right-[20px]"> </i>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </template>
32
+
33
+ <script lang="ts">
34
+ export default defineComponent({
35
+ props: {
36
+ subtitle: {
37
+ type: String,
38
+ default: '',
39
+ },
40
+ },
41
+ setup() {
42
+ const formStore = useFormStore();
43
+
44
+ const amount = computed(() =>
45
+ formStore.productConditionsForm && formStore.productConditionsForm.requestedSumInsured ? formStore.productConditionsForm.requestedSumInsured : null,
46
+ );
47
+ const premium = computed(() =>
48
+ formStore.productConditionsForm && formStore.productConditionsForm.insurancePremiumPerMonth ? formStore.productConditionsForm.insurancePremiumPerMonth : null,
49
+ );
50
+ const coverPeriod = computed(() => (formStore.productConditionsForm && formStore.productConditionsForm.coverPeriod ? formStore.productConditionsForm.coverPeriod : null));
51
+ const paymentPeriod = computed(() =>
52
+ formStore.productConditionsForm && formStore.productConditionsForm.paymentPeriod && !!formStore.productConditionsForm.paymentPeriod.nameRu
53
+ ? formStore.productConditionsForm.paymentPeriod.nameRu
54
+ : null,
55
+ );
56
+ return {
57
+ // State
58
+ formStore,
59
+
60
+ // Computed
61
+ amount,
62
+ premium,
63
+ coverPeriod,
64
+ paymentPeriod,
65
+ };
66
+ },
67
+ });
68
+ </script>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div class="h-[60px] bg-white rounded border-b-[1px] border-b-[#f3f6fc] flex items-center pl-4" :class="[$libStyles.textTitle]">
3
+ <slot></slot>
4
+ </div>
5
+ </template>
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <v-file-input
3
+ class="file-input"
4
+ :disabled="disabled"
5
+ prepend-icon=""
6
+ append-inner-icon="mdi mdi-file-document"
7
+ @click:append-inner="$emit('input', $event)"
8
+ @input="$emit('input', $event)"
9
+ variant="solo"
10
+ show-size
11
+ multiple
12
+ accept=".pdf,.doc,.jpeg,.jpg,.jpg"
13
+ truncate-length="15"
14
+ clear-icon="mdi mdi-close"
15
+ :label="$t('labels.chooseDoc')"
16
+ ></v-file-input>
17
+ </template>
18
+
19
+ <script lang="ts">
20
+ export default defineComponent({
21
+ props: {
22
+ disabled: {
23
+ type: Boolean,
24
+ default: false,
25
+ },
26
+ },
27
+ });
28
+ </script>
29
+
30
+ <style>
31
+ .file-input input:focus {
32
+ border: none !important;
33
+ outline: none !important;
34
+ }
35
+ .file-input input {
36
+ padding-top: 30px;
37
+ }
38
+ .file-input .v-field {
39
+ box-shadow: none;
40
+ font-size: 14px;
41
+ }
42
+ .file-input .v-label.v-field-label {
43
+ top: 20px;
44
+ }
45
+ .file-input .v-field__append-inner {
46
+ padding-top: 18px;
47
+ padding-right: 6px;
48
+ }
49
+ .file-input .v-field__append-inner i {
50
+ color: #a0b3d8 !important;
51
+ margin-left: 10px;
52
+ margin-right: 4px;
53
+ }
54
+ .file-input {
55
+ border-bottom: 1px solid #f3f6fc;
56
+ }
57
+ .file-input.v-input--error {
58
+ border-color: #ff5449;
59
+ }
60
+ .file-input.v-input--error .v-input__details {
61
+ display: block;
62
+ }
63
+ .file-input .v-input__details {
64
+ display: none;
65
+ background-color: white;
66
+ padding-top: 0 !important;
67
+ }
68
+ .file-input .v-field--error {
69
+ border-color: #ff5449;
70
+ }
71
+ </style>
@@ -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>
@@ -1,44 +1,44 @@
1
1
  <template>
2
2
  <v-text-field
3
3
  class="rounded-input"
4
- v-model="fieldModel"
4
+ :model-value="modelValue"
5
5
  v-maska="maska"
6
6
  :rules="rules"
7
7
  :loading="loading"
8
8
  :placeholder="placeholder"
9
+ :label="label"
9
10
  :type="type"
10
11
  :variant="variant"
11
12
  :clear-icon="clearIcon"
12
13
  :color="color"
13
14
  :hint="hint"
14
- :clearable="clearable"
15
+ :clearable="props.readonly ? false : clearable"
15
16
  :disabled="disabled"
16
- :prepend-inner-icon="prependIcon ? prependIcon : ''"
17
+ :readonly="props.readonly"
18
+ :prepend-icon="prependIcon ? prependIcon : ''"
17
19
  :append-icon="appendIcon ? appendIcon : ''"
20
+ :prepend-inner-icon="prependInnerIcon ? prependInnerIcon : ''"
21
+ :append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
18
22
  :bg-color="bgColor ? bgColor : ''"
19
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)"
20
29
  >
21
30
  <template v-if="loading" #loader>
22
- <v-progress-linear
23
- :active="loading"
24
- :color="color"
25
- absolute
26
- height="1"
27
- indeterminate
28
- ></v-progress-linear>
31
+ <v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate></v-progress-linear>
29
32
  </template>
30
33
  </v-text-field>
31
34
  </template>
32
35
 
33
36
  <script lang="ts">
34
- import { InputTypes } from '@/composables/models';
35
-
36
37
  export default defineComponent({
37
38
  name: 'BaseRoundedInput',
38
39
  props: {
39
40
  modelValue: {
40
- type: String,
41
- default: '',
41
+ required: false,
42
42
  },
43
43
  loading: {
44
44
  type: Boolean,
@@ -52,9 +52,17 @@ export default defineComponent({
52
52
  type: Boolean,
53
53
  default: false,
54
54
  },
55
+ readonly: {
56
+ type: Boolean,
57
+ default: false,
58
+ },
55
59
  placeholder: {
56
60
  type: String,
57
- default: 'Поле',
61
+ default: '',
62
+ },
63
+ label: {
64
+ type: String,
65
+ default: '',
58
66
  },
59
67
  maska: {
60
68
  type: String,
@@ -73,9 +81,7 @@ export default defineComponent({
73
81
  default: 'text',
74
82
  },
75
83
  variant: {
76
- type: String as PropType<
77
- 'solo' | 'filled' | 'outlined' | 'plain' | 'underlined'
78
- >,
84
+ type: String as PropType<InputVariants>,
79
85
  default: 'solo',
80
86
  },
81
87
  color: {
@@ -92,34 +98,26 @@ export default defineComponent({
92
98
  appendIcon: {
93
99
  type: String,
94
100
  },
101
+ prependInnerIcon: {
102
+ type: String,
103
+ },
104
+ appendInnerIcon: {
105
+ type: String,
106
+ },
95
107
  bgColor: {
96
108
  type: String,
97
109
  },
98
110
  },
99
- emits: ['update:modelValue', 'submitted'],
111
+ emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out'],
100
112
 
101
113
  setup(props, { emit }) {
102
- const fieldModel = ref(props.modelValue || '');
103
-
104
- const updateValue = (event: any) => {
105
- emit('update:modelValue', fieldModel.value);
106
- };
107
-
108
114
  const submitted = (event: any) => {
109
115
  emit('submitted', event);
110
116
  };
111
117
 
112
- watch(
113
- fieldModel,
114
- () => {
115
- updateValue(fieldModel.value);
116
- },
117
- { immediate: true },
118
- );
119
-
120
118
  return {
121
- fieldModel,
122
119
  submitted,
120
+ props
123
121
  };
124
122
  },
125
123
  });
@@ -130,14 +128,15 @@ export default defineComponent({
130
128
  border: none !important;
131
129
  outline: none !important;
132
130
  }
133
-
131
+ .rounded-input .v-label.v-field-label {
132
+ top: 20px;
133
+ }
134
134
  .rounded-input .v-field {
135
135
  border-radius: 8px;
136
136
  border: 1px solid #dadada;
137
137
  box-shadow: none;
138
138
  font-size: 14px;
139
139
  }
140
-
141
140
  .rounded-input .v-field--error {
142
141
  border-color: #ff5449;
143
142
  }
@@ -3,20 +3,13 @@
3
3
  v-model="$dataStore[whichPanel].open"
4
4
  :temporary="$dataStore[whichPanel].overlay"
5
5
  location="right"
6
- class="sm:!w-[400px] lg:!relative"
7
- :class="[
8
- $dataStore[whichPanel].overlay ? 'lg:!hidden' : '',
9
- $dataStore[whichPanel].open ? '!w-full lg:!w-[420px]' : 'lg:!w-[0px]',
10
- ]"
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"
11
10
  >
12
- <base-header
13
- :title="panelTitle"
14
- :has-back="true"
15
- back-icon="mdi-close"
16
- class="justify-center"
17
- @onBack="$dataStore[whichPanel].open = false"
18
- ></base-header>
19
- <div>
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' : ''">
20
13
  <slot></slot>
21
14
  </div>
22
15
  </v-navigation-drawer>
@@ -31,12 +24,21 @@ export default defineComponent({
31
24
  default: '',
32
25
  },
33
26
  whichPanel: {
34
- type: String as PropType<'settings' | 'panel'>,
27
+ type: String as PropType<PanelTypes>,
35
28
  default: 'panel',
36
29
  },
37
30
  },
38
- setup() {
39
- return {};
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
+ };
40
42
  },
41
43
  });
42
44
  </script>
@@ -1,22 +1,8 @@
1
1
  <template>
2
- <header
3
- class="relative w-full h-[70px] text-center font-medium align-middle flex items-center border-b-[1px]"
4
- :class="[$libStyles.blueBgLight, $libStyles.textSimple]"
5
- >
6
- <i
7
- v-if="hasBack"
8
- @click="$emit('onBack')"
9
- class="absolute left-5 mdi text-xl cursor-pointer"
10
- :class="[backIcon]"
11
- ></i>
12
- {{ title }}
13
- <i
14
- v-if="hasMore"
15
- @click="$emit('onMore')"
16
- class="mdi absolute right-5 text-xl cursor-pointer"
17
- :class="[moreIcon, hideMoreOnLg ? 'lg:!hidden' : '']"
18
- >
19
- </i>
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>
20
6
  </header>
21
7
  </template>
22
8
 
@@ -1,11 +1,5 @@
1
1
  <template>
2
- <v-progress-circular
3
- :size="size"
4
- :width="width"
5
- :indeterminate="indeterminate"
6
- :color="color"
7
- :bg-color="bgColor"
8
- ></v-progress-circular>
2
+ <v-progress-circular :size="size" :width="width" :indeterminate="indeterminate" :color="color" :bg-color="bgColor"></v-progress-circular>
9
3
  </template>
10
4
 
11
5
  <script lang="ts">