plugin-ui-for-kzt 0.0.60 → 0.0.62
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/dist/components/BaseButton/BaseButton.vue.d.ts +6 -2
- package/dist/components/BaseCalendar/BaseCalendar.vue.d.ts +2 -2
- package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +7 -3
- package/dist/components/BaseDropdown/BaseDropdown.vue.d.ts +6 -2
- package/dist/components/BaseField/BaseField.vue.d.ts +3 -3
- package/dist/components/BaseInput/BaseInput.vue.d.ts +4 -4
- package/dist/components/BaseInputCalendar/BaseInputCalendar.vue.d.ts +6 -6
- package/dist/components/BaseInputCurrency/BaseInputCurrency.vue.d.ts +6 -6
- package/dist/components/BaseInputEmail/BaseInputEmail.vue.d.ts +4 -4
- package/dist/components/BaseInputPhone/BaseInputPhone.vue.d.ts +4 -4
- package/dist/components/BaseInputWithSelector/BaseInputWithSelector.vue.d.ts +1 -1
- package/dist/components/BaseOpenedListItem/BaseOpenedListItem.vue.d.ts +6 -2
- package/dist/components/BaseRadio/BaseRadio.vue.d.ts +7 -3
- package/dist/components/BaseSegmentedButtons/BaseSegmentedButtons.vue.d.ts +6 -2
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +22 -5
- package/dist/components/BaseSiteInput/BaseSiteInput.vue.d.ts +1 -1
- package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +4 -4
- package/dist/components/BaseToggle/BaseToggle.vue.d.ts +7 -3
- package/dist/index.js +1 -1
- package/dist/store/modal.d.ts +13 -13
- package/package.json +1 -1
- package/src/components/BaseSelect/BaseSelect.vue +24 -4
- package/src/components/BaseSelect/README.md +4 -0
- package/src/types/input.d.ts +1 -0
- package/.claude/settings.local.json +0 -7
package/dist/store/modal.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const useModalStore: import("pinia").StoreDefinition<"modal", {
|
|
|
36
36
|
template?: string | object | undefined;
|
|
37
37
|
render?: Function | undefined;
|
|
38
38
|
components?: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>> | undefined;
|
|
39
|
-
directives?: Record<string, import("vue").Directive<any, any, string,
|
|
39
|
+
directives?: Record<string, import("vue").Directive<any, any, string, any>> | undefined;
|
|
40
40
|
inheritAttrs?: boolean | undefined;
|
|
41
41
|
emits?: any;
|
|
42
42
|
slots?: {} | undefined;
|
|
@@ -113,18 +113,18 @@ export declare const useModalStore: import("pinia").StoreDefinition<"modal", {
|
|
|
113
113
|
filters?: Record<string, Function> | undefined;
|
|
114
114
|
mixins?: any[] | undefined;
|
|
115
115
|
extends?: any;
|
|
116
|
-
beforeCreate?: (() =>
|
|
117
|
-
created?: (() =>
|
|
118
|
-
beforeMount?: (() =>
|
|
119
|
-
mounted?: (() =>
|
|
120
|
-
beforeUpdate?: (() =>
|
|
121
|
-
updated?: (() =>
|
|
122
|
-
activated?: (() =>
|
|
123
|
-
deactivated?: (() =>
|
|
124
|
-
beforeDestroy?: (() =>
|
|
125
|
-
beforeUnmount?: (() =>
|
|
126
|
-
destroyed?: (() =>
|
|
127
|
-
unmounted?: (() =>
|
|
116
|
+
beforeCreate?: (() => any) | undefined;
|
|
117
|
+
created?: (() => any) | undefined;
|
|
118
|
+
beforeMount?: (() => any) | undefined;
|
|
119
|
+
mounted?: (() => any) | undefined;
|
|
120
|
+
beforeUpdate?: (() => any) | undefined;
|
|
121
|
+
updated?: (() => any) | undefined;
|
|
122
|
+
activated?: (() => any) | undefined;
|
|
123
|
+
deactivated?: (() => any) | undefined;
|
|
124
|
+
beforeDestroy?: (() => any) | undefined;
|
|
125
|
+
beforeUnmount?: (() => any) | undefined;
|
|
126
|
+
destroyed?: (() => any) | undefined;
|
|
127
|
+
unmounted?: (() => any) | undefined;
|
|
128
128
|
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
129
129
|
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
130
130
|
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | undefined;
|
package/package.json
CHANGED
|
@@ -71,7 +71,20 @@
|
|
|
71
71
|
@input="handleInputChange"
|
|
72
72
|
>
|
|
73
73
|
<template #left-icon>
|
|
74
|
+
<div
|
|
75
|
+
v-if="actualOption?.icon && $slots.iconItem"
|
|
76
|
+
class="base-select__header_prefix_icon"
|
|
77
|
+
>
|
|
78
|
+
<slot name="iconItem" :item="actualOption"/>
|
|
79
|
+
</div>
|
|
80
|
+
<div
|
|
81
|
+
v-else-if="$slots.headerIcon"
|
|
82
|
+
class="base-select__header_prefix_icon"
|
|
83
|
+
>
|
|
84
|
+
<slot name="headerIcon"/>
|
|
85
|
+
</div>
|
|
74
86
|
<base-icon
|
|
87
|
+
v-else
|
|
75
88
|
name="search"
|
|
76
89
|
:size="size"
|
|
77
90
|
/>
|
|
@@ -153,6 +166,7 @@ const props = withDefaults( defineProps<ICoreSelectProps & {
|
|
|
153
166
|
options: () => [] as ICoreSelectOption[],
|
|
154
167
|
size: 'medium',
|
|
155
168
|
searchable: false,
|
|
169
|
+
clearOnSelect: false,
|
|
156
170
|
} );
|
|
157
171
|
|
|
158
172
|
const emit = defineEmits<{
|
|
@@ -186,13 +200,19 @@ watch( () => props.modelValue, ( val ) => {
|
|
|
186
200
|
}
|
|
187
201
|
}, { immediate: true } );
|
|
188
202
|
|
|
189
|
-
function handleInput( value: TSelectValue ) {
|
|
203
|
+
function handleInput( value: TSelectValue, isOptionSelection = false ) {
|
|
190
204
|
if ( props.readonly || props.disabled ) {
|
|
191
205
|
return;
|
|
192
206
|
}
|
|
193
207
|
actualValue.value = value;
|
|
194
208
|
emit( 'update:modelValue', value );
|
|
195
209
|
emit( 'change', value );
|
|
210
|
+
|
|
211
|
+
if ( props.clearOnSelect && isOptionSelection ) {
|
|
212
|
+
actualValue.value = '';
|
|
213
|
+
emit( 'update:modelValue', '' );
|
|
214
|
+
}
|
|
215
|
+
|
|
196
216
|
dropdownVisible.value = false;
|
|
197
217
|
searchQuery.value = '';
|
|
198
218
|
}
|
|
@@ -213,7 +233,7 @@ function handleInputChange( event: Event ) {
|
|
|
213
233
|
);
|
|
214
234
|
|
|
215
235
|
if ( exactMatch ) {
|
|
216
|
-
handleInput( exactMatch.id );
|
|
236
|
+
handleInput( exactMatch.id, true );
|
|
217
237
|
return;
|
|
218
238
|
}
|
|
219
239
|
|
|
@@ -282,7 +302,7 @@ const listItemAttrs = computed( () => ( item: ICoreSelectOption ) => ({
|
|
|
282
302
|
style: item.style,
|
|
283
303
|
disabled: item.disabled,
|
|
284
304
|
class: 'base-select__item',
|
|
285
|
-
onClick: () => handleInput( item.id ),
|
|
305
|
+
onClick: () => handleInput( item.id, true ),
|
|
286
306
|
}) );
|
|
287
307
|
|
|
288
308
|
const classList = computed( () => [
|
|
@@ -565,4 +585,4 @@ defineSlots<{
|
|
|
565
585
|
}
|
|
566
586
|
}
|
|
567
587
|
}
|
|
568
|
-
</style>
|
|
588
|
+
</style>
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
v-model="selectedEmployee"
|
|
31
31
|
:options="employeeOptions"
|
|
32
32
|
searchable
|
|
33
|
+
clear-on-select
|
|
33
34
|
placeholder="Найти сотрудника..."
|
|
34
35
|
label="Выберите сотрудника"
|
|
35
36
|
:error="employeeError"
|
|
@@ -158,6 +159,9 @@ const handleSearchError = () => {
|
|
|
158
159
|
- `searchable?: boolean`
|
|
159
160
|
**Включает режим поиска. При `true` заменяет обычный заголовок на поле ввода для поиска. Идеально подходит для server-side поиска больших наборов данных.
|
|
160
161
|
|
|
162
|
+
- `clearOnSelect?: boolean`
|
|
163
|
+
Очищает текущее значение после выбора опции. При этом событие `change` получает выбранный `id`, а `v-model` возвращается в пустое значение.
|
|
164
|
+
|
|
161
165
|
- `multiple?: boolean`
|
|
162
166
|
Поддержка множественного выбора (не реализовано в текущем компоненте, зарезервировано).
|
|
163
167
|
|
package/src/types/input.d.ts
CHANGED