@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.
@@ -1,4 +1,4 @@
1
- import "./components-DSjkNfg7.js";
1
+ import "./components-CeOlovz8.js";
2
2
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { m as t } from "./enums-CsINFPBu.js";
4
4
  import { t as n } from "./wt-button-rUZKbswL.js";
@@ -1,4 +1,4 @@
1
- import { C as e, i as t } from "./components-DSjkNfg7.js";
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-DSjkNfg7.js";
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-BFB093fa.js";
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";
@@ -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-DSjkNfg7.js";
5
- import { a as p, n as m, t as h } from "./clients-BFB093fa.js";
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";
@@ -1,4 +1,4 @@
1
- import { w as e } from "./components-DSjkNfg7.js";
1
+ import { w as e } from "./components-CeOlovz8.js";
2
2
  import "./convertDuration-CW5qzlwH.js";
3
3
  import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
4
4
  import { m as n } from "./enums-CsINFPBu.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.8.116",
3
+ "version": "26.8.117",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -9,6 +9,10 @@
9
9
  --wt-popup-size-md: 800px;
10
10
  --wt-popup-size-lg: 1140px;
11
11
 
12
+ --wt-popup-height-sm: 300px;
13
+ --wt-popup-height-md: 400px;
14
+ --wt-popup-height-lg: 600px;
15
+
12
16
  --popup-max-height: 90%;
13
17
 
14
18
  --wt-popup-background-color: var(--dp-24-surface-color);
@@ -1,7 +1,14 @@
1
1
  <template>
2
2
  <div
3
- v-show="showPopupComponent" :class="[`wt-popup--size-${size}`, { 'wt-popup--overflow': overflow }]"
4
- class="wt-popup">
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
  <!-- &lt;!&ndash; @slot check source code for scoped bindings :( &ndash;&gt;-->
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;
@@ -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
+ };