@webitel/ui-sdk 26.8.149 → 26.8.150
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/{clients-CvTW64Rq.js → clients-x0gCJQbb.js} +1 -1
- package/dist/{components-BQNe8f-D.js → components-7m-8aZmi.js} +29 -19
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +1 -1
- package/dist/{wt-chat-emoji-okPBWTTc.js → wt-chat-emoji-C6taiH7d.js} +1 -1
- package/dist/{wt-display-chip-items-p-X0dCyl.js → wt-display-chip-items-BKezwH_o.js} +1 -1
- package/dist/{wt-send-message-popup-C8sMLTcd.js → wt-send-message-popup-BWbiEroB.js} +2 -2
- package/dist/{wt-type-extension-value-input-IVO4B3WW.js → wt-type-extension-value-input-DJVtErVH.js} +2 -2
- package/dist/{wt-vidstack-player-DrOhDUTg.js → wt-vidstack-player-BcldtEws.js} +1 -1
- package/package.json +1 -1
- package/src/components/wt-single-select/__tests__/WtSingleSelect.spec.js +25 -0
- package/src/components/wt-single-select/wt-single-select.vue +20 -2
- package/types/.tsbuildinfo +1 -1
- package/types/components/wt-single-select/wt-single-select.vue.d.ts +4 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, i as t } from "./components-
|
|
1
|
+
import { C as e, i as t } from "./components-7m-8aZmi.js";
|
|
2
2
|
import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
3
|
import { t as r } from "./utils-DQQQIpjz.js";
|
|
4
4
|
import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, openBlock as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as e } from "./components-
|
|
1
|
+
import { n as e } from "./components-7m-8aZmi.js";
|
|
2
2
|
import "./convertDuration-CIPonKKW.js";
|
|
3
|
-
import { i as t, r as n } from "./clients-
|
|
3
|
+
import { i as t, r as n } from "./clients-x0gCJQbb.js";
|
|
4
4
|
import { n as r } from "./vue-i18n-VBiROMZ4.js";
|
|
5
5
|
import { n as i } from "./useEventBus-B-ZeklLu.js";
|
|
6
6
|
import { createBlock as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeProps as l, onMounted as u, openBlock as d, ref as f, resolveComponent as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
package/dist/{wt-type-extension-value-input-IVO4B3WW.js → wt-type-extension-value-input-DJVtErVH.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./dist-EXdgfpvN.js";
|
|
2
2
|
import { n as e } from "./genClient-CvWlQ0TZ.js";
|
|
3
|
-
import { a as t, o as n, r, s as i, w as a } from "./components-
|
|
4
|
-
import { n as o, t as s } from "./clients-
|
|
3
|
+
import { a as t, o as n, r, s as i, w as a } from "./components-7m-8aZmi.js";
|
|
4
|
+
import { n as o, t as s } from "./clients-x0gCJQbb.js";
|
|
5
5
|
import { a as c, c as l, i as u, n as d, o as f, p, r as m, s as h, t as g } from "./enums-CKer6GJR.js";
|
|
6
6
|
import { n as _ } from "./vue-i18n-VBiROMZ4.js";
|
|
7
7
|
import "./wt-toast-3-3ZylQ9.js";
|
package/package.json
CHANGED
|
@@ -114,4 +114,29 @@ describe('WtSingleSelect', () => {
|
|
|
114
114
|
.vm.$emit('hide');
|
|
115
115
|
expect(wrapper.emitted().hide).toBeTruthy();
|
|
116
116
|
});
|
|
117
|
+
|
|
118
|
+
it('emits the filter text on search and on Enter', async () => {
|
|
119
|
+
const wrapper = mount(WtSingleSelect, {
|
|
120
|
+
global: {
|
|
121
|
+
stubs: {
|
|
122
|
+
Select: {
|
|
123
|
+
name: 'Select',
|
|
124
|
+
template: '<div><slot name="header" /></div>',
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
const filter = wrapper.findComponent({
|
|
130
|
+
name: 'wt-input-text',
|
|
131
|
+
});
|
|
132
|
+
await filter.vm.$emit('update:model-value', 'custom-file.mp3');
|
|
133
|
+
expect(wrapper.emitted('search-change')?.at(-1)).toEqual([
|
|
134
|
+
'custom-file.mp3',
|
|
135
|
+
]);
|
|
136
|
+
|
|
137
|
+
await filter.trigger('keydown.enter');
|
|
138
|
+
expect(wrapper.emitted('search-enter')?.at(-1)).toEqual([
|
|
139
|
+
'custom-file.mp3',
|
|
140
|
+
]);
|
|
141
|
+
});
|
|
117
142
|
});
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
class="wt-single-select__input"
|
|
47
47
|
:model-value="filterText"
|
|
48
48
|
:size="ComponentSize.SM"
|
|
49
|
-
@update:model-value="
|
|
50
|
-
@keydown.enter.stop="
|
|
49
|
+
@update:model-value="onFilterModelUpdate"
|
|
50
|
+
@keydown.enter.stop.prevent="onFilterEnter"
|
|
51
51
|
>
|
|
52
52
|
<template #suffix>
|
|
53
53
|
<wt-icon v-if="allowCustomValues && filterText" disabled icon="select-custom-value-enter" />
|
|
@@ -194,6 +194,12 @@ const model = defineModel<string>({
|
|
|
194
194
|
const emit = defineEmits<{
|
|
195
195
|
reset: [];
|
|
196
196
|
hide: [];
|
|
197
|
+
'search-change': [
|
|
198
|
+
value: string,
|
|
199
|
+
];
|
|
200
|
+
'search-enter': [
|
|
201
|
+
value: string,
|
|
202
|
+
];
|
|
197
203
|
}>();
|
|
198
204
|
|
|
199
205
|
const selectId = `select-${Math.random().toString(36).slice(2, 11)}`;
|
|
@@ -257,6 +263,18 @@ const handleDropdownHide = () => {
|
|
|
257
263
|
onDropdownHide();
|
|
258
264
|
emit('hide');
|
|
259
265
|
};
|
|
266
|
+
|
|
267
|
+
const onFilterModelUpdate = (value: string) => {
|
|
268
|
+
const text = value ?? '';
|
|
269
|
+
filterOptions(text);
|
|
270
|
+
emit('search-change', text);
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
const onFilterEnter = () => {
|
|
274
|
+
emit('search-enter', filterText.value);
|
|
275
|
+
onInputKeydown();
|
|
276
|
+
selectRef.value?.hide?.();
|
|
277
|
+
};
|
|
260
278
|
</script>
|
|
261
279
|
|
|
262
280
|
<style scoped>
|