hl-core 0.0.7 → 0.0.8-beta.10
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/.prettierrc +2 -1
- package/api/index.ts +562 -0
- package/api/interceptors.ts +38 -0
- package/components/Button/Btn.vue +57 -0
- package/components/Button/BtnIcon.vue +47 -0
- package/components/Button/ScrollButtons.vue +6 -0
- package/components/Button/SortArrow.vue +21 -0
- package/components/Complex/Content.vue +5 -0
- package/components/Complex/ContentBlock.vue +5 -0
- package/components/Complex/Page.vue +43 -0
- package/components/Dialog/Dialog.vue +76 -0
- package/components/Dialog/FamilyDialog.vue +39 -0
- package/components/Form/FormBlock.vue +139 -0
- package/components/Form/FormSection.vue +18 -0
- package/components/Form/FormTextSection.vue +20 -0
- package/components/Form/FormToggle.vue +52 -0
- package/components/Form/ManagerAttachment.vue +196 -0
- package/components/Form/ProductConditionsBlock.vue +72 -0
- package/components/Input/Datepicker.vue +41 -0
- package/components/Input/EmptyFormField.vue +5 -0
- package/components/Input/FileInput.vue +71 -0
- package/components/Input/FormInput.vue +183 -0
- package/components/Input/PanelInput.vue +133 -0
- package/components/Input/RoundedInput.vue +143 -0
- package/components/Layout/Drawer.vue +45 -0
- package/components/Layout/Header.vue +48 -0
- package/components/Layout/Loader.vue +35 -0
- package/components/Layout/SettingsPanel.vue +48 -0
- package/components/List/ListEmpty.vue +22 -0
- package/components/Menu/MenuNav.vue +108 -0
- package/components/Menu/MenuNavItem.vue +37 -0
- package/components/Pages/Anketa.vue +341 -0
- package/components/Pages/Auth.vue +91 -0
- package/components/Pages/Documents.vue +108 -0
- package/components/Pages/MemberForm.vue +1229 -0
- package/components/Pages/ProductAgreement.vue +18 -0
- package/components/Pages/ProductConditions.vue +659 -0
- package/components/Panel/PanelHandler.vue +233 -0
- package/components/Panel/PanelItem.vue +5 -0
- package/components/Panel/PanelSelectItem.vue +20 -0
- package/components/Transitions/FadeTransition.vue +5 -0
- package/components/Transitions/SlideTransition.vue +5 -0
- package/composables/axios.ts +11 -0
- package/composables/classes.ts +1179 -0
- package/composables/constants.ts +71 -0
- package/composables/index.ts +168 -2
- package/composables/styles.ts +48 -8
- package/configs/i18n.ts +19 -0
- package/layouts/clear.vue +3 -0
- package/layouts/default.vue +75 -0
- package/layouts/full.vue +6 -0
- package/locales/en.json +403 -0
- package/locales/kz.json +403 -0
- package/locales/ru.json +403 -0
- package/nuxt.config.ts +39 -5
- package/package.json +28 -10
- package/pages/500.vue +85 -0
- package/plugins/helperFunctionsPlugins.ts +19 -2
- package/plugins/storePlugin.ts +5 -7
- package/plugins/vuetifyPlugin.ts +15 -0
- package/store/data.store.js +2291 -8
- package/store/form.store.ts +8 -0
- package/store/member.store.ts +381 -0
- package/store/rules.js +52 -39
- package/tailwind.config.js +10 -0
- package/types/index.ts +317 -0
- package/app.vue +0 -3
- package/components/Button/GreenBtn.vue +0 -33
- package/store/app.store.js +0 -12
- package/store/messages.ts +0 -310
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="pt-3 pl-5 rounded-lg border-[1px]" :class="[$libStyles.whiteBg, disabled && $libStyles.disabled]">
|
|
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"
|
|
24
|
+
:class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover, disabled ? $libStyles.disabled : 'cursor-pointer']"
|
|
25
|
+
@click="!disabled && $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
|
+
disabled: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
setup() {
|
|
46
|
+
const formStore = useFormStore();
|
|
47
|
+
|
|
48
|
+
const amount = computed(() =>
|
|
49
|
+
formStore.productConditionsForm && formStore.productConditionsForm.requestedSumInsured ? formStore.productConditionsForm.requestedSumInsured : null,
|
|
50
|
+
);
|
|
51
|
+
const premium = computed(() =>
|
|
52
|
+
formStore.productConditionsForm && formStore.productConditionsForm.insurancePremiumPerMonth ? formStore.productConditionsForm.insurancePremiumPerMonth : null,
|
|
53
|
+
);
|
|
54
|
+
const coverPeriod = computed(() => (formStore.productConditionsForm && formStore.productConditionsForm.coverPeriod ? formStore.productConditionsForm.coverPeriod : null));
|
|
55
|
+
const paymentPeriod = computed(() =>
|
|
56
|
+
formStore.productConditionsForm && formStore.productConditionsForm.paymentPeriod && !!formStore.productConditionsForm.paymentPeriod.nameRu
|
|
57
|
+
? formStore.productConditionsForm.paymentPeriod.nameRu
|
|
58
|
+
: null,
|
|
59
|
+
);
|
|
60
|
+
return {
|
|
61
|
+
// State
|
|
62
|
+
formStore,
|
|
63
|
+
|
|
64
|
+
// Computed
|
|
65
|
+
amount,
|
|
66
|
+
premium,
|
|
67
|
+
coverPeriod,
|
|
68
|
+
paymentPeriod,
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
</script>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vue-date-picker
|
|
3
|
+
:model-value="modelValue"
|
|
4
|
+
:clearable="false"
|
|
5
|
+
:disabled="disabled"
|
|
6
|
+
:reaonly="readonly"
|
|
7
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
+
locale="ru"
|
|
9
|
+
model-type="dd.MM.yyyy"
|
|
10
|
+
position="left"
|
|
11
|
+
menu-class-name="!left-[30vw] md:!left-[70vw] lg:!left-[75vw]"
|
|
12
|
+
teleport=".v-form"
|
|
13
|
+
:offset="-50"
|
|
14
|
+
:close-on-scroll="true"
|
|
15
|
+
:enable-time-picker="false"
|
|
16
|
+
cancel-text="Отменить"
|
|
17
|
+
select-text="Выбрать"
|
|
18
|
+
>
|
|
19
|
+
<template #trigger>
|
|
20
|
+
<v-icon icon="mdi mdi-calendar-blank-outline cursor-pointer"></v-icon>
|
|
21
|
+
</template>
|
|
22
|
+
</vue-date-picker>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts">
|
|
26
|
+
export default defineComponent({
|
|
27
|
+
props: {
|
|
28
|
+
modelValue: {
|
|
29
|
+
required: false,
|
|
30
|
+
},
|
|
31
|
+
disabled: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
readonly: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
</script>
|
|
@@ -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,183 @@
|
|
|
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
|
+
:bg-color="bgColor ? bgColor : ''"
|
|
23
|
+
:suffix="suffix"
|
|
24
|
+
@input="$emit('input', $event)"
|
|
25
|
+
@keyup.enter.prevent="submitted"
|
|
26
|
+
@click:append="!props.readonly && $emit('append-out')"
|
|
27
|
+
@click:prepend="!props.readonly && $emit('prepend-out')"
|
|
28
|
+
@click:prepend-inner="!props.readonly && $emit('prepend')"
|
|
29
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
30
|
+
>
|
|
31
|
+
<template v-if="appendInnerIcon && appendInnerIcon.length" v-slot:append-inner>
|
|
32
|
+
<v-icon v-if="appendInnerIcon !== 'mdi mdi-calendar-blank-outline'" :icon="appendInnerIcon" @click="!props.readonly && $emit('append')"></v-icon>
|
|
33
|
+
<base-datepicker v-else :model-value="modelValue" @update:modelValue="$emit('update:modelValue', $event)"></base-datepicker>
|
|
34
|
+
</template>
|
|
35
|
+
<template v-if="loading" #loader>
|
|
36
|
+
<v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate></v-progress-linear>
|
|
37
|
+
</template>
|
|
38
|
+
</v-text-field>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script lang="ts">
|
|
42
|
+
export default defineComponent({
|
|
43
|
+
name: 'BaseFormInput',
|
|
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
|
+
suffix: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: '',
|
|
75
|
+
},
|
|
76
|
+
messages: {
|
|
77
|
+
type: [String, Array<string>],
|
|
78
|
+
},
|
|
79
|
+
maska: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: '',
|
|
82
|
+
},
|
|
83
|
+
hint: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: '',
|
|
86
|
+
},
|
|
87
|
+
rules: {
|
|
88
|
+
type: Array<any>,
|
|
89
|
+
default: [],
|
|
90
|
+
},
|
|
91
|
+
type: {
|
|
92
|
+
type: String as PropType<InputTypes>,
|
|
93
|
+
default: 'text',
|
|
94
|
+
},
|
|
95
|
+
variant: {
|
|
96
|
+
type: String as PropType<InputVariants>,
|
|
97
|
+
default: 'solo',
|
|
98
|
+
},
|
|
99
|
+
color: {
|
|
100
|
+
type: String,
|
|
101
|
+
default: '#009c73',
|
|
102
|
+
},
|
|
103
|
+
clearIcon: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: 'mdi-close',
|
|
106
|
+
},
|
|
107
|
+
prependIcon: {
|
|
108
|
+
type: String,
|
|
109
|
+
},
|
|
110
|
+
appendIcon: {
|
|
111
|
+
type: String,
|
|
112
|
+
},
|
|
113
|
+
prependInnerIcon: {
|
|
114
|
+
type: String,
|
|
115
|
+
},
|
|
116
|
+
appendInnerIcon: {
|
|
117
|
+
type: String,
|
|
118
|
+
},
|
|
119
|
+
bgColor: {
|
|
120
|
+
type: String,
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out', 'input'],
|
|
124
|
+
|
|
125
|
+
setup(props, { emit }) {
|
|
126
|
+
const submitted = (event: any) => {
|
|
127
|
+
emit('submitted', event);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
return {
|
|
131
|
+
submitted,
|
|
132
|
+
props,
|
|
133
|
+
};
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
</script>
|
|
137
|
+
|
|
138
|
+
<style>
|
|
139
|
+
.form-input input:focus {
|
|
140
|
+
border: none !important;
|
|
141
|
+
outline: none !important;
|
|
142
|
+
}
|
|
143
|
+
.form-input input {
|
|
144
|
+
padding-top: 30px;
|
|
145
|
+
}
|
|
146
|
+
.form-input .v-field {
|
|
147
|
+
box-shadow: none;
|
|
148
|
+
font-size: 14px;
|
|
149
|
+
}
|
|
150
|
+
.form-input .v-label.v-field-label {
|
|
151
|
+
top: 20px;
|
|
152
|
+
}
|
|
153
|
+
.form-input .v-field__append-inner {
|
|
154
|
+
padding-top: 18px;
|
|
155
|
+
padding-right: 6px;
|
|
156
|
+
}
|
|
157
|
+
.form-input .v-field__append-inner i {
|
|
158
|
+
color: #a0b3d8 !important;
|
|
159
|
+
margin-left: 10px;
|
|
160
|
+
margin-right: 4px;
|
|
161
|
+
}
|
|
162
|
+
.form-input {
|
|
163
|
+
border-bottom: 1px solid #f3f6fc;
|
|
164
|
+
}
|
|
165
|
+
.form-input.v-input--error {
|
|
166
|
+
border-color: #ff5449;
|
|
167
|
+
}
|
|
168
|
+
.form-input.v-input--error .v-input__details {
|
|
169
|
+
display: block;
|
|
170
|
+
}
|
|
171
|
+
.form-input .v-input__details {
|
|
172
|
+
display: none;
|
|
173
|
+
background-color: white;
|
|
174
|
+
padding-top: 0 !important;
|
|
175
|
+
}
|
|
176
|
+
.form-input .v-field--error {
|
|
177
|
+
border-color: #ff5449;
|
|
178
|
+
}
|
|
179
|
+
.form-input .v-text-field__suffix {
|
|
180
|
+
padding-top: 30px;
|
|
181
|
+
font-size: 16px !important;
|
|
182
|
+
}
|
|
183
|
+
</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,45 @@
|
|
|
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 v-if="$dataStore.panelAction === null" class="flex flex-col" id="panel-actions">
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</div>
|
|
15
|
+
<base-panel-handler v-else></base-panel-handler>
|
|
16
|
+
</v-navigation-drawer>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts">
|
|
20
|
+
export default defineComponent({
|
|
21
|
+
name: 'BasePanel',
|
|
22
|
+
props: {
|
|
23
|
+
panelTitle: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: '',
|
|
26
|
+
},
|
|
27
|
+
whichPanel: {
|
|
28
|
+
type: String as PropType<PanelTypes>,
|
|
29
|
+
default: 'panel',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
setup(props) {
|
|
33
|
+
const dataStore = useDataStore();
|
|
34
|
+
|
|
35
|
+
const closePanel = () => {
|
|
36
|
+
dataStore[props.whichPanel].open = false;
|
|
37
|
+
dataStore.panelAction = null;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
closePanel,
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
</script>
|