@webitel/ui-sdk 26.8.113 → 26.8.115

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-DJVzkzrr.js";
1
+ import "./components-BolsnzIT.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-DJVzkzrr.js";
1
+ import { C as e, i as t } from "./components-BolsnzIT.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-DJVzkzrr.js";
2
- import "./convertDuration-BOe9PsRT.js";
3
- import { i as t, r as n } from "./clients-CWniSi77.js";
1
+ import { n as e } from "./components-BolsnzIT.js";
2
+ import "./convertDuration-CW5qzlwH.js";
3
+ import { i as t, r as n } from "./clients-DW43tqs7.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,4 +1,4 @@
1
- import { t as e } from "./convertDuration-BOe9PsRT.js";
1
+ import { t as e } from "./convertDuration-CW5qzlwH.js";
2
2
  import { T as t, m as n } from "./enums-CsINFPBu.js";
3
3
  import { n as r } from "./vue-i18n-VBiROMZ4.js";
4
4
  import { computed as i, createBlock as a, createVNode as o, defineComponent as s, openBlock as c, resolveComponent as l, unref as u, withCtx as d } 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-DJVzkzrr.js";
5
- import { a as p, n as m, t as h } from "./clients-CWniSi77.js";
4
+ import { a as l, o as u, r as d, s as f } from "./components-BolsnzIT.js";
5
+ import { a as p, n as m, t as h } from "./clients-DW43tqs7.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,5 +1,5 @@
1
- import { w as e } from "./components-DJVzkzrr.js";
2
- import "./convertDuration-BOe9PsRT.js";
1
+ import { w as e } from "./components-BolsnzIT.js";
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";
5
5
  import "./wt-button-rUZKbswL.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.8.113",
3
+ "version": "26.8.115",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -1,7 +1,9 @@
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="[`wt-popup--size-${size}`, { 'wt-popup--overflow': overflow }]"
5
+ class="wt-popup"
6
+ >
5
7
  <!-- &lt;!&ndash; @slot check source code for scoped bindings :( &ndash;&gt;-->
6
8
  <!-- <slot-->
7
9
  <!-- class="wt-popup-activator"-->
@@ -17,7 +19,11 @@ v-show="showPopupComponent" :class="[`wt-popup--size-${size}`, { 'wt-popup--over
17
19
  <!-- />-->
18
20
 
19
21
  <transition-slide :offset="[0, -1440 / 2]">
20
- <aside v-if="wrapperShown" class="wt-popup__popup">
22
+ <aside
23
+ v-if="wrapperShown"
24
+ class="wt-popup__popup"
25
+ :style="height ? { height } : undefined"
26
+ >
21
27
  <header class="wt-popup__header typo-subtitle-1">
22
28
  <slot name="header">
23
29
  <h3 class="wt-popup__title">
@@ -51,6 +57,7 @@ interface Props {
51
57
  */
52
58
  shown?: boolean;
53
59
  size?: ComponentSize;
60
+ height?: string;
54
61
  /**
55
62
  * if true, popup contents will overflow popup container, without scrolling
56
63
  * useful for small popups with select components, which have not enough space
@@ -69,6 +76,7 @@ interface Props {
69
76
  const props = withDefaults(defineProps<Props>(), {
70
77
  shown: true, // TODO: change me to false after refactor
71
78
  size: ComponentSize.MD,
79
+ height: undefined,
72
80
  overflow: false,
73
81
  disabled: false,
74
82
  closable: true,
@@ -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
+ };