@webitel/ui-sdk 26.8.116 → 26.8.117
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-BFB093fa.js → clients-DWcx-Mfk.js} +1 -1
- package/dist/{components-DSjkNfg7.js → components-CeOlovz8.js} +10 -5
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +41 -41
- package/dist/{wt-chat-emoji-C-dTBZ_F.js → wt-chat-emoji-v9gpIuHe.js} +1 -1
- package/dist/{wt-display-chip-items-BX7cB5E4.js → wt-display-chip-items-Bob7miL_.js} +1 -1
- package/dist/{wt-send-message-popup-BqE4XZke.js → wt-send-message-popup-9O69XY0L.js} +2 -2
- package/dist/{wt-type-extension-value-input-B9KVFkOD.js → wt-type-extension-value-input-55YmFcBp.js} +2 -2
- package/dist/{wt-vidstack-player-RBadmXaK.js → wt-vidstack-player-ETPSioGH.js} +1 -1
- package/package.json +1 -1
- package/src/components/wt-popup/_variables.css +4 -0
- package/src/components/wt-popup/wt-popup.vue +27 -2
- package/src/composables/index.ts +1 -0
- package/src/composables/useMinDurationLoader/useMinDurationLoader.ts +30 -0
- package/types/.tsbuildinfo +1 -1
- package/types/components/wt-popup/wt-popup.vue.d.ts +6 -0
- package/types/composables/index.d.ts +1 -0
- package/types/composables/useMinDurationLoader/useMinDurationLoader.d.ts +6 -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-CeOlovz8.js";
|
|
2
2
|
import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
3
|
import { t as r } from "./utils-DHSDTqJG.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-CeOlovz8.js";
|
|
2
2
|
import "./convertDuration-CW5qzlwH.js";
|
|
3
|
-
import { i as t, r as n } from "./clients-
|
|
3
|
+
import { i as t, r as n } from "./clients-DWcx-Mfk.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-B9KVFkOD.js → wt-type-extension-value-input-55YmFcBp.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as e, c as t, i as n, n as r, r as i, s as a, t as o } from "./dist-EXdgfpvN.js";
|
|
2
2
|
import { n as s } from "./genClient-CvWlQ0TZ.js";
|
|
3
3
|
import { a as c } from "./caseConverters-DGri4uJo.js";
|
|
4
|
-
import { a as l, o as u, r as d, s as f } from "./components-
|
|
5
|
-
import { a as p, n as m, t as h } from "./clients-
|
|
4
|
+
import { a as l, o as u, r as d, s as f } from "./components-CeOlovz8.js";
|
|
5
|
+
import { a as p, n as m, t as h } from "./clients-DWcx-Mfk.js";
|
|
6
6
|
import { a as g, b as _, d as v, f as y, g as b, i as x, n as S, o as C, r as w, s as T, t as E, y as D } from "./enums-CsINFPBu.js";
|
|
7
7
|
import { n as ee, t as te } from "./vue-i18n-VBiROMZ4.js";
|
|
8
8
|
import "./wt-toast-pXV44Y3v.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
v-show="showPopupComponent"
|
|
4
|
-
class="
|
|
3
|
+
v-show="showPopupComponent"
|
|
4
|
+
:class="[
|
|
5
|
+
`wt-popup--size-${size}`,
|
|
6
|
+
height && `wt-popup--height-${height}`,
|
|
7
|
+
{
|
|
8
|
+
'wt-popup--overflow': overflow,
|
|
9
|
+
}]"
|
|
10
|
+
class="wt-popup"
|
|
11
|
+
>
|
|
5
12
|
<!-- <!– @slot check source code for scoped bindings :( –>-->
|
|
6
13
|
<!-- <slot-->
|
|
7
14
|
<!-- class="wt-popup-activator"-->
|
|
@@ -51,6 +58,12 @@ interface Props {
|
|
|
51
58
|
*/
|
|
52
59
|
shown?: boolean;
|
|
53
60
|
size?: ComponentSize;
|
|
61
|
+
/**
|
|
62
|
+
* temprorary height of the popup for WS2
|
|
63
|
+
* to avoid WS1 popup broken
|
|
64
|
+
* will be removed after primevue migration
|
|
65
|
+
*/
|
|
66
|
+
height?: ComponentSize;
|
|
54
67
|
/**
|
|
55
68
|
* if true, popup contents will overflow popup container, without scrolling
|
|
56
69
|
* useful for small popups with select components, which have not enough space
|
|
@@ -207,6 +220,18 @@ watch(wrapperShown, (value) => {
|
|
|
207
220
|
width: var(--wt-popup-size-lg);
|
|
208
221
|
}
|
|
209
222
|
|
|
223
|
+
.wt-popup--height-sm .wt-popup__popup {
|
|
224
|
+
height: var(--wt-popup-height-sm);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.wt-popup--height-md .wt-popup__popup {
|
|
228
|
+
height: var(--wt-popup-height-md);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.wt-popup--height-lg .wt-popup__popup {
|
|
232
|
+
height: var(--wt-popup-height-lg);
|
|
233
|
+
}
|
|
234
|
+
|
|
210
235
|
.wt-popup__popup {
|
|
211
236
|
display: flex;
|
|
212
237
|
flex-direction: column;
|
package/src/composables/index.ts
CHANGED
|
@@ -4,5 +4,6 @@ export * from './useCard/useCardComponent';
|
|
|
4
4
|
export * from './useClose/useClose';
|
|
5
5
|
export * from './useDestroyableSortable/useDestroyableSortable';
|
|
6
6
|
export * from './useEventBus/useEventBus';
|
|
7
|
+
export * from './useMinDurationLoader/useMinDurationLoader';
|
|
7
8
|
export * from './useRepresentableAgentPauseCause/useRepresentableAgentPauseCause';
|
|
8
9
|
export * from './useValidate/useValidate';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Ref, ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface UseMinDurationLoaderReturn {
|
|
4
|
+
isLoading: Ref<boolean>;
|
|
5
|
+
runWithMinDuration: <T>(action: () => Promise<T>) => Promise<T>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const useMinDurationLoader = (
|
|
9
|
+
minDurationMs = 500,
|
|
10
|
+
): UseMinDurationLoaderReturn => {
|
|
11
|
+
const isLoading = ref(false);
|
|
12
|
+
|
|
13
|
+
const runWithMinDuration = async <T>(
|
|
14
|
+
action: () => Promise<T>,
|
|
15
|
+
): Promise<T> => {
|
|
16
|
+
isLoading.value = true;
|
|
17
|
+
try {
|
|
18
|
+
return await action();
|
|
19
|
+
} finally {
|
|
20
|
+
setTimeout(() => {
|
|
21
|
+
isLoading.value = false;
|
|
22
|
+
}, minDurationMs);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
isLoading,
|
|
28
|
+
runWithMinDuration,
|
|
29
|
+
};
|
|
30
|
+
};
|