@webitel/ui-sdk 26.8.152 → 26.8.154

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.
Files changed (51) hide show
  1. package/dist/clients-CD7NXpWz.js +43306 -0
  2. package/dist/{components-DFU2gMZC.js → components-BaLs0ZtL.js} +1164 -2357
  3. package/dist/convertDuration-DZkUGHBR.js +65 -0
  4. package/dist/startOfDay-BH-DGnTQ.js +34 -0
  5. package/dist/ui-sdk.css +1 -1
  6. package/dist/ui-sdk.js +1 -1
  7. package/dist/ui-sdk.umd.cjs +766 -727
  8. package/dist/utils-zi9lfi8f.js +1235 -0
  9. package/dist/{wt-chat-emoji-CDJIdeXU.js → wt-chat-emoji-Ctwc4VYl.js} +1 -1
  10. package/dist/{wt-display-chip-items-Dj0fY1dF.js → wt-display-chip-items-BsaEZtrc.js} +12 -12
  11. package/dist/{wt-screen-recordings-action-CHlh4sNO.js → wt-screen-recordings-action-61pRZySe.js} +1 -1
  12. package/dist/{wt-send-message-popup-SNflIgQ8.js → wt-send-message-popup--fi3UrPJ.js} +3 -3
  13. package/dist/{wt-status-select-DItpCCVE.js → wt-status-select-qCkEA9K6.js} +1 -1
  14. package/dist/{wt-type-extension-value-input-BgTpak2x.js → wt-type-extension-value-input-DOivJ4hj.js} +2 -2
  15. package/dist/{wt-vidstack-player-BO7ozD50.js → wt-vidstack-player-D-W9J2CY.js} +2 -2
  16. package/package.json +1 -1
  17. package/src/components/index.js +3 -0
  18. package/src/components/wt-time-tooltip/__tests__/WtTimeTooltip.spec.js +56 -0
  19. package/src/components/wt-time-tooltip/wt-time-tooltip.vue +36 -0
  20. package/src/locale/en/en.js +1 -0
  21. package/src/locale/es/es.js +1 -0
  22. package/src/locale/kz/kz.js +1 -0
  23. package/src/locale/pl/pl.js +1 -0
  24. package/src/locale/ro/ro.js +1 -0
  25. package/src/locale/ru/ru.js +1 -0
  26. package/src/locale/uk/uk.js +1 -0
  27. package/src/locale/uz/uz.js +1 -0
  28. package/src/locale/vi/vi.js +1 -0
  29. package/src/utils/__tests__/timeZoneLabel.spec.ts +33 -0
  30. package/src/utils/index.ts +1 -0
  31. package/src/utils/timeZoneLabel.ts +17 -0
  32. package/types/.tsbuildinfo +1 -1
  33. package/types/components/index.d.ts +3 -1
  34. package/types/components/wt-time-tooltip/__tests__/WtTimeTooltip.spec.d.ts +1 -0
  35. package/types/components/wt-time-tooltip/wt-time-tooltip.vue.d.ts +7 -0
  36. package/types/locale/en/en.d.ts +1 -0
  37. package/types/locale/es/es.d.ts +1 -0
  38. package/types/locale/i18n.d.ts +9 -0
  39. package/types/locale/index.d.ts +9 -0
  40. package/types/locale/kz/kz.d.ts +1 -0
  41. package/types/locale/pl/pl.d.ts +1 -0
  42. package/types/locale/ro/ro.d.ts +1 -0
  43. package/types/locale/ru/ru.d.ts +1 -0
  44. package/types/locale/uk/uk.d.ts +1 -0
  45. package/types/locale/uz/uz.d.ts +1 -0
  46. package/types/locale/vi/vi.d.ts +1 -0
  47. package/types/utils/index.d.ts +1 -0
  48. package/types/utils/timeZoneLabel.d.ts +1 -0
  49. package/dist/clients-Bn77MDFb.js +0 -43087
  50. package/dist/convertDuration-CIPonKKW.js +0 -97
  51. package/dist/utils-DQQQIpjz.js +0 -4
@@ -1,4 +1,4 @@
1
- import "./components-DFU2gMZC.js";
1
+ import "./components-BaLs0ZtL.js";
2
2
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
3
  import { E as t, h as n } from "./enums-CKer6GJR.js";
4
4
  import { t as r } from "./wt-button-DnbIcGvU.js";
@@ -1,9 +1,9 @@
1
- import { C as e, i as t } from "./components-DFU2gMZC.js";
2
- import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
- import { t as r } from "./utils-DQQQIpjz.js";
1
+ import { n as e } from "./utils-zi9lfi8f.js";
2
+ import { C as t, i as n } from "./components-BaLs0ZtL.js";
3
+ import { t as r } from "./_plugin-vue_export-helper-B3ysoDQm.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";
5
5
  //#region src/components/on-demand/wt-display-chip-items/wt-display-chip-items.vue?vue&type=script&setup=true&lang.ts
6
- var _ = { class: "wt-display-chip-items" }, v = { key: 0 }, y = ["onClick"], b = /*#__PURE__*/ n(/* @__PURE__ */ u({
6
+ var _ = { class: "wt-display-chip-items" }, v = { key: 0 }, y = ["onClick"], b = /*#__PURE__*/ r(/* @__PURE__ */ u({
7
7
  __name: "wt-display-chip-items",
8
8
  props: {
9
9
  hideFirstItem: { type: Boolean },
@@ -11,16 +11,16 @@ var _ = { class: "wt-display-chip-items" }, v = { key: 0 }, y = ["onClick"], b =
11
11
  title: {},
12
12
  items: {}
13
13
  },
14
- setup(n) {
15
- let u = n, b = a(() => u.items?.length ? u.items[0]?.name : u.useEmptySymbol ? "-" : ""), x = a(() => u.items?.length ? u.hideFirstItem ? u.items : u.items.slice(1) : []);
14
+ setup(r) {
15
+ let u = r, b = a(() => u.items?.length ? u.items[0]?.name : u.useEmptySymbol ? "-" : ""), x = a(() => u.items?.length ? u.hideFirstItem ? u.items : u.items.slice(1) : []);
16
16
  return (a, S) => (d(), s("div", _, [
17
- u.title ? (d(), s("p", v, m(n.title) + ":", 1)) : o("", !0),
18
- u.hideFirstItem ? o("", !0) : p(a.$slots, "first-item", { key: 1 }, () => [c(m(h(r)(b.value)), 1)], !0),
19
- l(h(t), null, {
20
- activator: g(({ toggle: t }) => [p(a.$slots, "activator", { toggle: t }, () => [x.value.length ? (d(), s("div", {
17
+ u.title ? (d(), s("p", v, m(r.title) + ":", 1)) : o("", !0),
18
+ u.hideFirstItem ? o("", !0) : p(a.$slots, "first-item", { key: 1 }, () => [c(m(h(e)(b.value)), 1)], !0),
19
+ l(h(n), null, {
20
+ activator: g(({ toggle: e }) => [p(a.$slots, "activator", { toggle: e }, () => [x.value.length ? (d(), s("div", {
21
21
  key: 0,
22
- onClick: t
23
- }, [l(h(e), null, {
22
+ onClick: e
23
+ }, [l(h(t), null, {
24
24
  default: g(() => [c(" +" + m(x.value.length), 1)], void 0, !0),
25
25
  _: 1
26
26
  })], 8, y)) : o("", !0)], !0)]),
@@ -1,5 +1,5 @@
1
+ import "./utils-zi9lfi8f.js";
1
2
  import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
2
- import "./utils-DQQQIpjz.js";
3
3
  import { t } from "./engineCallFileType-D7QVFOac.js";
4
4
  import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, openBlock as u, resolveComponent as d, toDisplayString as f, unref as p, withCtx as m } from "vue";
5
5
  //#region src/components/on-demand/wt-screen-recordings-action/wt-screen-recordings-action.vue?vue&type=script&setup=true&lang.ts
@@ -1,6 +1,6 @@
1
- import { n as e } from "./components-DFU2gMZC.js";
2
- import "./convertDuration-CIPonKKW.js";
3
- import { i as t, r as n } from "./clients-Bn77MDFb.js";
1
+ import { n as e } from "./components-BaLs0ZtL.js";
2
+ import { i as t, r as n } from "./clients-CD7NXpWz.js";
3
+ import "./convertDuration-DZkUGHBR.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-CIPonKKW.js";
1
+ import { t as e } from "./convertDuration-DZkUGHBR.js";
2
2
  import { O as t, h as n } from "./enums-CKer6GJR.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,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-DFU2gMZC.js";
4
- import { n as o, t as s } from "./clients-Bn77MDFb.js";
3
+ import { a as t, o as n, r, s as i, w as a } from "./components-BaLs0ZtL.js";
4
+ import { n as o, t as s } from "./clients-CD7NXpWz.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";
@@ -1,5 +1,5 @@
1
- import { T as e } from "./components-DFU2gMZC.js";
2
- import "./convertDuration-CIPonKKW.js";
1
+ import { T as e } from "./components-BaLs0ZtL.js";
2
+ import "./convertDuration-DZkUGHBR.js";
3
3
  import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
4
4
  import { h as n } from "./enums-CKer6GJR.js";
5
5
  import "./wt-button-DnbIcGvU.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.8.152",
3
+ "version": "26.8.154",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -49,6 +49,7 @@ import WtRoundedAction from './wt-rounded-action/wt-rounded-action.vue';
49
49
  import WtSingleSelect from './wt-single-select/wt-single-select.vue';
50
50
  import WtSwitcher from './wt-switcher/wt-switcher.vue';
51
51
  import WtTextarea from './wt-textarea/wt-textarea.vue';
52
+ import WtTimeTooltip from './wt-time-tooltip/wt-time-tooltip.vue';
52
53
  import WtToast from './wt-toast/wt-toast.vue';
53
54
  import WtTooltip from './wt-tooltip/wt-tooltip.vue';
54
55
 
@@ -312,6 +313,7 @@ const Components = {
312
313
  WtChatEmoji,
313
314
  WtExpansionCard,
314
315
  WtDatetimeText,
316
+ WtTimeTooltip,
315
317
  WtCard,
316
318
  WtSingleSelect,
317
319
  WtMultiSelect,
@@ -408,6 +410,7 @@ export {
408
410
  WtTextarea,
409
411
  WtTimeInput,
410
412
  WtTimepicker,
413
+ WtTimeTooltip,
411
414
  WtToast,
412
415
  WtTooltip,
413
416
  WtTree,
@@ -0,0 +1,56 @@
1
+ import { mount } from '@vue/test-utils';
2
+ import { nextTick } from 'vue';
3
+
4
+ import WtTimeTooltip from '../wt-time-tooltip.vue';
5
+
6
+ describe('WtTimeTooltip', () => {
7
+ beforeEach(() => {
8
+ localStorage.setItem('user-timezone-setting', 'Africa/Addis_Ababa');
9
+ });
10
+
11
+ afterEach(() => {
12
+ localStorage.removeItem('user-timezone-setting');
13
+ });
14
+
15
+ const showTooltip = async (wrapper) => {
16
+ await nextTick();
17
+ await wrapper.find('.wt-tooltip__activator').trigger('mouseenter');
18
+ await nextTick();
19
+ };
20
+
21
+ it('shows the operator zone when no label is passed', async () => {
22
+ const wrapper = mount(WtTimeTooltip, {
23
+ props: {
24
+ text: '15.10.2026, 14:19:00',
25
+ },
26
+ });
27
+
28
+ expect(wrapper.text()).toContain('15.10.2026, 14:19:00');
29
+ await showTooltip(wrapper);
30
+ expect(wrapper.text()).toContain('Africa/Addis_Ababa 03:00');
31
+ });
32
+
33
+ it('shows an explicit zone caption as-is', async () => {
34
+ const wrapper = mount(WtTimeTooltip, {
35
+ props: {
36
+ text: '09:00',
37
+ label: 'Europe/Kyiv 02:00',
38
+ },
39
+ });
40
+
41
+ await showTooltip(wrapper);
42
+ expect(wrapper.text()).toContain('Europe/Kyiv 02:00');
43
+ expect(wrapper.text()).not.toContain('Africa/Addis_Ababa');
44
+ });
45
+
46
+ it('renders nothing when the time is empty', () => {
47
+ const wrapper = mount(WtTimeTooltip, {
48
+ props: {
49
+ text: '',
50
+ },
51
+ });
52
+
53
+ expect(wrapper.text()).toBe('');
54
+ expect(wrapper.find('.wt-tooltip').exists()).toBe(false);
55
+ });
56
+ });
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <wt-tooltip
3
+ v-if="text"
4
+ class="wt-time-tooltip"
5
+ :disabled="!tooltipLabel"
6
+ >
7
+ <template #activator>
8
+ <span class="wt-time-tooltip__value">{{ text }}</span>
9
+ </template>
10
+ {{ tooltipLabel }}
11
+ </wt-tooltip>
12
+ </template>
13
+
14
+ <script setup lang="ts">
15
+ import { getUserTimeZone } from '@webitel/api-services/utils';
16
+ import { computed } from 'vue';
17
+
18
+ import { formatTimeZoneLabel } from '../../utils/timeZoneLabel';
19
+
20
+ const props = defineProps<{
21
+ text?: string | null;
22
+ label?: string;
23
+ }>();
24
+
25
+ const tooltipLabel = computed(() =>
26
+ formatTimeZoneLabel(
27
+ props.label === undefined ? getUserTimeZone() : props.label,
28
+ ),
29
+ );
30
+ </script>
31
+
32
+ <style scoped>
33
+ .wt-time-tooltip__value {
34
+ line-height: normal;
35
+ }
36
+ </style>
@@ -259,6 +259,7 @@ export default deepmerge(
259
259
  timeout: 'Timeout',
260
260
  endless: 'Endless',
261
261
  transferred: 'Transferred',
262
+ shutdown: 'Shutdown',
262
263
  },
263
264
  flow: {
264
265
  name: 'Flow schema | Flow schemas',
@@ -250,6 +250,7 @@ export default {
250
250
  timeout: 'Tiempo de espera',
251
251
  endless: 'Sin fin',
252
252
  transferred: 'Transferido',
253
+ shutdown: 'Apagado',
253
254
  },
254
255
  flow: {
255
256
  name: 'Esquema de flujo | Esquemas de flujo',
@@ -255,6 +255,7 @@ export default {
255
255
  timeout: 'Таймақ',
256
256
  endless: 'Аяқсыз',
257
257
  transferred: 'Ауыстырылды',
258
+ shutdown: 'Өшіру',
258
259
  },
259
260
  flow: {
260
261
  name: 'Ағын схемасы | Ағын схемалары',
@@ -255,6 +255,7 @@ export default {
255
255
  timeout: 'Przekroczono czas',
256
256
  endless: 'Nieskończony',
257
257
  transferred: 'Przekazane',
258
+ shutdown: 'Wyłączenie',
258
259
  },
259
260
  flow: {
260
261
  name: 'Schemat przepływu | Schematy przepływu',
@@ -255,6 +255,7 @@ export default {
255
255
  timeout: 'Timp de așteptare',
256
256
  endless: 'Nelimitat',
257
257
  transferred: 'Transferat',
258
+ shutdown: 'Oprire',
258
259
  },
259
260
  flow: {
260
261
  name: 'Schemă flux | Scheme flux',
@@ -251,6 +251,7 @@ export default {
251
251
  timeout: 'Тайм-аут',
252
252
  endless: 'Бесконечный',
253
253
  transferred: 'Переведен',
254
+ shutdown: 'Выключение',
254
255
  },
255
256
  flow: {
256
257
  name: 'Схема | Схемы',
@@ -250,6 +250,7 @@ export default {
250
250
  timeout: 'Тайм-аут',
251
251
  endless: 'Нескінченний',
252
252
  transferred: 'Переведений',
253
+ shutdown: 'Вимкнення',
253
254
  },
254
255
  flow: {
255
256
  name: 'Схема | Схеми',
@@ -255,6 +255,7 @@ export default {
255
255
  timeout: 'Vaqt',
256
256
  endless: 'Cheksiz',
257
257
  transferred: 'Uzatilgan',
258
+ shutdown: 'Oʻchirish',
258
259
  },
259
260
  flow: {
260
261
  name: 'Oqim sxemasi | Oqim sxemalari',
@@ -255,6 +255,7 @@ export default {
255
255
  timeout: 'Hết thời gian',
256
256
  endless: 'Vô hạn',
257
257
  transferred: 'Chuyển đổi',
258
+ shutdown: 'Tắt máy',
258
259
  },
259
260
  flow: {
260
261
  name: 'Sơ đồ luồng | Sơ đồ luồng',
@@ -0,0 +1,33 @@
1
+ import { describe, expect, it } from 'vitest';
2
+
3
+ import { formatTimeZoneLabel } from '../timeZoneLabel';
4
+
5
+ const winter = new Date('2026-01-15T12:00:00Z');
6
+
7
+ describe('formatTimeZoneLabel', () => {
8
+ it('builds the tooltip caption from an IANA id', () => {
9
+ expect(formatTimeZoneLabel('Africa/Addis_Ababa', winter)).toBe(
10
+ 'Africa/Addis_Ababa 03:00',
11
+ );
12
+ expect(formatTimeZoneLabel('UTC', winter)).toBe('UTC 00:00');
13
+ expect(formatTimeZoneLabel('America/New_York', winter)).toBe(
14
+ 'America/New_York -05:00',
15
+ );
16
+ });
17
+
18
+ it('keeps a caption that already includes an offset', () => {
19
+ expect(formatTimeZoneLabel('Europe/Kyiv 02:00', winter)).toBe(
20
+ 'Europe/Kyiv 02:00',
21
+ );
22
+ expect(formatTimeZoneLabel('Europe/Kyiv +02:00', winter)).toBe(
23
+ 'Europe/Kyiv +02:00',
24
+ );
25
+ expect(formatTimeZoneLabel('America/New_York -05:00', winter)).toBe(
26
+ 'America/New_York -05:00',
27
+ );
28
+ });
29
+
30
+ it('returns an empty caption unchanged', () => {
31
+ expect(formatTimeZoneLabel('')).toBe('');
32
+ });
33
+ });
@@ -2,3 +2,4 @@ export * from './displayText';
2
2
  export * from './findTreePath';
3
3
  export * from './formatDate';
4
4
  export * from './prettifyDate';
5
+ export * from './timeZoneLabel';
@@ -0,0 +1,17 @@
1
+ import { formatInTimeZone } from 'date-fns-tz';
2
+
3
+ const OFFSET_SUFFIX = /\s[+-]?\d{2}:\d{2}$/;
4
+
5
+ export function formatTimeZoneLabel(
6
+ timeZone: string,
7
+ date: Date = new Date(),
8
+ ): string {
9
+ if (!timeZone || OFFSET_SUFFIX.test(timeZone)) return timeZone;
10
+
11
+ try {
12
+ const offset = formatInTimeZone(date, timeZone, 'xxx').replace(/^\+/, '');
13
+ return `${timeZone} ${offset}`;
14
+ } catch {
15
+ return timeZone;
16
+ }
17
+ }