@webitel/ui-sdk 26.8.97 → 26.8.99
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-9rILOBrM.js → clients-DenpsPyu.js} +1 -1
- package/dist/{components-Dost4BNg.js → components-CMBVRgca.js} +80 -78
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +2 -2
- package/dist/{wt-chat-emoji-DXC4OU5L.js → wt-chat-emoji-DGnuASX3.js} +1 -1
- package/dist/{wt-display-chip-items-C1EJ62xe.js → wt-display-chip-items-DVE5aPNw.js} +1 -1
- package/dist/{wt-send-message-popup-BSLk9osS.js → wt-send-message-popup-DNRwANy-.js} +2 -2
- package/dist/{wt-status-select-z4n_FL2z.js → wt-status-select-CDt8sZr9.js} +7 -1
- package/dist/{wt-type-extension-value-input-ZqfUFvcs.js → wt-type-extension-value-input-CUx43R8o.js} +2 -2
- package/dist/{wt-vidstack-player-BtSrpzDY.js → wt-vidstack-player-_x_GEpy4.js} +1 -1
- package/package.json +1 -1
- package/src/components/wt-input-text/__tests__/WtInputText.spec.js +29 -6
- package/src/components/wt-input-text/wt-input-text.vue +12 -2
- package/src/components/wt-status-select/wt-status-select.vue +4 -1
- package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +4 -0
- package/types/.tsbuildinfo +1 -1
- package/types/components/wt-input-text/wt-input-text.vue.d.ts +4 -2
- package/types/components/wt-status-select/wt-status-select.vue.d.ts +2 -0
- package/types/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue.d.ts +2 -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-CMBVRgca.js";
|
|
2
2
|
import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
3
|
import { s as r } from "./utils-DReAiJBV.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,5 +1,5 @@
|
|
|
1
|
-
import { n as e, r as t } from "./clients-
|
|
2
|
-
import { n } from "./components-
|
|
1
|
+
import { n as e, r as t } from "./clients-DenpsPyu.js";
|
|
2
|
+
import { n } from "./components-CMBVRgca.js";
|
|
3
3
|
import { t as r } from "./vue-i18n-B88GcHzn.js";
|
|
4
4
|
import { n as i } from "./useEventBus-B-ZeklLu.js";
|
|
5
5
|
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";
|
|
@@ -29,7 +29,11 @@ var f = [
|
|
|
29
29
|
props: {
|
|
30
30
|
status: { default: t.OFFLINE },
|
|
31
31
|
statusDuration: { default: 0 },
|
|
32
|
-
options: {}
|
|
32
|
+
options: {},
|
|
33
|
+
disabled: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !1
|
|
36
|
+
}
|
|
33
37
|
},
|
|
34
38
|
emits: ["change"],
|
|
35
39
|
setup(s, { emit: p }) {
|
|
@@ -47,6 +51,7 @@ var f = [
|
|
|
47
51
|
options: y.value,
|
|
48
52
|
filterable: !1,
|
|
49
53
|
"model-value": v.value,
|
|
54
|
+
disabled: s.disabled,
|
|
50
55
|
class: "wt-status-select",
|
|
51
56
|
"data-key": "value",
|
|
52
57
|
size: u(e).SM,
|
|
@@ -64,6 +69,7 @@ var f = [
|
|
|
64
69
|
}, 8, [
|
|
65
70
|
"options",
|
|
66
71
|
"model-value",
|
|
72
|
+
"disabled",
|
|
67
73
|
"size"
|
|
68
74
|
]);
|
|
69
75
|
};
|
package/dist/{wt-type-extension-value-input-ZqfUFvcs.js → wt-type-extension-value-input-CUx43R8o.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./clients-
|
|
2
|
-
import { a as t, o as n, r, s as i } from "./components-
|
|
1
|
+
import { t as e } from "./clients-DenpsPyu.js";
|
|
2
|
+
import { a as t, o as n, r, s as i } from "./components-CMBVRgca.js";
|
|
3
3
|
import { t as a } from "./enums-B_9ZBu01.js";
|
|
4
4
|
import { t as o } from "./vue-i18n-B88GcHzn.js";
|
|
5
5
|
import { computed as s, createBlock as c, createCommentVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, openBlock as m, renderSlot as h, resolveComponent as g, unref as _, useModel as v } from "vue";
|
package/package.json
CHANGED
|
@@ -28,32 +28,55 @@ describe('WtInputText', () => {
|
|
|
28
28
|
expect(wrapper.find('.wt-label').text()).toBe('Name');
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
it('
|
|
31
|
+
it('does not trim the value on input', () => {
|
|
32
32
|
const wrapper = mount(WtInputText);
|
|
33
33
|
const input = wrapper.findComponent({
|
|
34
34
|
name: 'InputText',
|
|
35
35
|
});
|
|
36
36
|
input.vm.$emit('update:model-value', ' hello ');
|
|
37
37
|
expect(wrapper.emitted()['update:modelValue'][0]).toEqual([
|
|
38
|
-
'hello',
|
|
38
|
+
' hello ',
|
|
39
39
|
]);
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
it('
|
|
42
|
+
it('trims the value on blur by default', async () => {
|
|
43
43
|
const wrapper = mount(WtInputText, {
|
|
44
44
|
props: {
|
|
45
|
-
|
|
45
|
+
modelValue: ' hello ',
|
|
46
46
|
},
|
|
47
47
|
});
|
|
48
48
|
const input = wrapper.findComponent({
|
|
49
49
|
name: 'InputText',
|
|
50
50
|
});
|
|
51
|
-
input.vm.$emit('
|
|
51
|
+
await input.vm.$emit('blur', new Event('blur'));
|
|
52
52
|
expect(wrapper.emitted()['update:modelValue'][0]).toEqual([
|
|
53
|
-
'
|
|
53
|
+
'hello',
|
|
54
54
|
]);
|
|
55
55
|
});
|
|
56
56
|
|
|
57
|
+
it('does not trim the value on blur when preventTrim is true', async () => {
|
|
58
|
+
const wrapper = mount(WtInputText, {
|
|
59
|
+
props: {
|
|
60
|
+
modelValue: ' hello ',
|
|
61
|
+
preventTrim: true,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
const input = wrapper.findComponent({
|
|
65
|
+
name: 'InputText',
|
|
66
|
+
});
|
|
67
|
+
await input.vm.$emit('blur', new Event('blur'));
|
|
68
|
+
expect(wrapper.emitted()['update:modelValue']).toBeFalsy();
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it('emits blur when the underlying input is blurred', async () => {
|
|
72
|
+
const wrapper = mount(WtInputText);
|
|
73
|
+
const input = wrapper.findComponent({
|
|
74
|
+
name: 'InputText',
|
|
75
|
+
});
|
|
76
|
+
await input.vm.$emit('blur', new Event('blur'));
|
|
77
|
+
expect(wrapper.emitted().blur).toBeTruthy();
|
|
78
|
+
});
|
|
79
|
+
|
|
57
80
|
it('toggles the eye icon and masks the input when hideInputValue is true', async () => {
|
|
58
81
|
const wrapper = mount(WtInputText, {
|
|
59
82
|
props: {
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
@update:model-value="inputHandler"
|
|
38
38
|
@keyup="handleKeyup"
|
|
39
39
|
@focus="emit('focus', $event)"
|
|
40
|
+
@blur="handleBlur"
|
|
40
41
|
/>
|
|
41
42
|
<p-input-group-addon
|
|
42
43
|
v-if="hideInputValue || $slots.suffix"
|
|
@@ -135,6 +136,9 @@ const emit = defineEmits<{
|
|
|
135
136
|
focus: [
|
|
136
137
|
FocusEvent,
|
|
137
138
|
];
|
|
139
|
+
blur: [
|
|
140
|
+
FocusEvent,
|
|
141
|
+
];
|
|
138
142
|
}>();
|
|
139
143
|
|
|
140
144
|
const slots = useSlots();
|
|
@@ -170,8 +174,14 @@ const requiredLabel = computed(() => {
|
|
|
170
174
|
});
|
|
171
175
|
|
|
172
176
|
const inputHandler = (value: string) => {
|
|
173
|
-
|
|
174
|
-
|
|
177
|
+
model.value = value;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const handleBlur = (event: FocusEvent) => {
|
|
181
|
+
if (!props.preventTrim && typeof model.value === 'string') {
|
|
182
|
+
model.value = model.value.trim();
|
|
183
|
+
}
|
|
184
|
+
emit('blur', event);
|
|
175
185
|
};
|
|
176
186
|
|
|
177
187
|
const isValueHidden = ref(props.hideInputValue);
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
:options="availableOptions"
|
|
5
5
|
:filterable="false"
|
|
6
6
|
:model-value="selectedOption"
|
|
7
|
+
:disabled="disabled"
|
|
7
8
|
class="wt-status-select"
|
|
8
9
|
data-key="value"
|
|
9
|
-
|
|
10
|
+
:size="ComponentSize.SM"
|
|
10
11
|
@update:model-value="inputHandler"
|
|
11
12
|
>
|
|
12
13
|
<template #value>
|
|
@@ -43,10 +44,12 @@ const props = withDefaults(
|
|
|
43
44
|
status?: string;
|
|
44
45
|
statusDuration?: string | number;
|
|
45
46
|
options?: StatusOption[];
|
|
47
|
+
disabled?: boolean;
|
|
46
48
|
}>(),
|
|
47
49
|
{
|
|
48
50
|
status: AgentStatus.OFFLINE,
|
|
49
51
|
statusDuration: 0,
|
|
52
|
+
disabled: false,
|
|
50
53
|
},
|
|
51
54
|
);
|
|
52
55
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
controlled
|
|
6
6
|
:label="t('agentStatus.callCenter')"
|
|
7
7
|
:model-value="isCallCenterOn"
|
|
8
|
+
:disabled="disabled"
|
|
8
9
|
class="wt-cc-agent-status-select__call-center-switcher"
|
|
9
10
|
@update:model-value="toggleCallCenterMode"
|
|
10
11
|
/>
|
|
@@ -12,6 +13,7 @@
|
|
|
12
13
|
:key="status"
|
|
13
14
|
:status="status"
|
|
14
15
|
:status-duration="statusDuration"
|
|
16
|
+
:disabled="disabled"
|
|
15
17
|
@change="handleStatus"
|
|
16
18
|
class="wt-cc-agent-status-select__status-select"
|
|
17
19
|
/>
|
|
@@ -61,12 +63,14 @@ const props = withDefaults(
|
|
|
61
63
|
statusDuration?: string | number;
|
|
62
64
|
showCallCenterSwitcher?: boolean;
|
|
63
65
|
isCallCenterOn?: boolean;
|
|
66
|
+
disabled?: boolean;
|
|
64
67
|
}>(),
|
|
65
68
|
{
|
|
66
69
|
status: AgentStatus.OFFLINE,
|
|
67
70
|
statusDuration: 0,
|
|
68
71
|
showCallCenterSwitcher: false,
|
|
69
72
|
isCallCenterOn: false,
|
|
73
|
+
disabled: false,
|
|
70
74
|
},
|
|
71
75
|
);
|
|
72
76
|
|