@webitel/ui-sdk 26.8.99 → 26.8.101

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 (43) hide show
  1. package/dist/{clients-DenpsPyu.js → clients-ClR-VL_c.js} +24 -28
  2. package/dist/{components-CMBVRgca.js → components-CB2t5ag8.js} +2876 -1068
  3. package/dist/convertDuration-CGW5IDMW.js +89 -0
  4. package/dist/{enums-B_9ZBu01.js → enums-Bd-8yrmg.js} +30 -30
  5. package/dist/ui-sdk.js +15 -15
  6. package/dist/ui-sdk.umd.cjs +380 -380
  7. package/dist/{useValidation-Dmm2xos_.js → useValidation-CtEfmUkB.js} +1 -1
  8. package/dist/utils-B_8uwL9P.js +4 -0
  9. package/dist/{wt-action-bar-BpuER6TA.js → wt-action-bar-B4rcG26w.js} +2 -2
  10. package/dist/{wt-badge-tosjsmJU.js → wt-badge-lFnfK2an.js} +1 -1
  11. package/dist/{wt-button-CNQAK85M.js → wt-button-BzYDkfhK.js} +17 -17
  12. package/dist/{wt-chat-emoji-DGnuASX3.js → wt-chat-emoji-DwGl685x.js} +4 -4
  13. package/dist/{wt-datepicker-BS3przUJ.js → wt-datepicker-D_O49-Ab.js} +43 -43
  14. package/dist/{wt-display-chip-items-DVE5aPNw.js → wt-display-chip-items-_VHRHB6L.js} +2 -2
  15. package/dist/{wt-dual-panel-Cs_Yzfxt.js → wt-dual-panel-B0inNxRm.js} +1 -1
  16. package/dist/{wt-expansion-card-8YzHs8F1.js → wt-expansion-card-CJjtuFDk.js} +1 -1
  17. package/dist/{wt-expansion-panel-kZmHSvPU.js → wt-expansion-panel-tqCCM3go.js} +1 -1
  18. package/dist/{wt-icon-ClDNfV5I.js → wt-icon-DFtSR4bO.js} +1 -1
  19. package/dist/{wt-icon-action-B8vuj9cC.js → wt-icon-action-DUAnoMrj.js} +1 -1
  20. package/dist/{wt-icon-btn-DDElLZil.js → wt-icon-btn-CeGGT2PO.js} +1 -1
  21. package/dist/{wt-notifications-bar-DZidZ2VZ.js → wt-notifications-bar-DWME3pmb.js} +2 -2
  22. package/dist/{wt-player-CxMTs3eF.js → wt-player-DXCQLKch.js} +3 -3
  23. package/dist/{wt-screen-recordings-action-BTtZq2BR.js → wt-screen-recordings-action-Cx7-2gDE.js} +1 -1
  24. package/dist/{wt-search-bar-CE4WhuJ6.js → wt-search-bar-BkopW1qp.js} +1 -1
  25. package/dist/{wt-send-message-popup-DNRwANy-.js → wt-send-message-popup-Dl-FeGOx.js} +13 -12
  26. package/dist/{wt-status-select-CDt8sZr9.js → wt-status-select-DnaJ04Gw.js} +12 -12
  27. package/dist/{wt-table-DHpnLu_f.js → wt-table-xmGhfp4p.js} +3 -3
  28. package/dist/{wt-timepicker-D-tnO-gX.js → wt-timepicker-C0DHJSeR.js} +2 -2
  29. package/dist/{wt-toast-DKjRJFE2.js → wt-toast-Lge1Y6IO.js} +10 -10
  30. package/dist/{wt-tree-table-DDH6vMh7.js → wt-tree-table-BTHxl_MY.js} +1 -1
  31. package/dist/{wt-type-extension-value-input-CUx43R8o.js → wt-type-extension-value-input-Cd0towde.js} +17 -17
  32. package/dist/{wt-vidstack-player-_x_GEpy4.js → wt-vidstack-player-IfN1Nbyd.js} +5 -4
  33. package/package.json +1 -1
  34. package/src/enums/FormatDateMode/FormatDateMode.ts +1 -10
  35. package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +7 -2
  36. package/src/scripts/convertDuration.js +1 -13
  37. package/src/utils/formatDate.ts +1 -37
  38. package/types/.tsbuildinfo +1 -1
  39. package/types/enums/FormatDateMode/FormatDateMode.d.ts +1 -8
  40. package/types/scripts/convertDuration.d.ts +1 -1
  41. package/types/utils/formatDate.d.ts +1 -4
  42. package/dist/convertDuration-1K7fuEpO.js +0 -8
  43. package/dist/utils-DReAiJBV.js +0 -1902
@@ -1,6 +1,6 @@
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
- import { t as a } from "./enums-B_9ZBu01.js";
1
+ import { a as e, o as t, r as n, s as r } from "./components-CB2t5ag8.js";
2
+ import { t as i } from "./clients-ClR-VL_c.js";
3
+ import { t as a } from "./enums-Bd-8yrmg.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";
6
6
  //#endregion
@@ -34,11 +34,11 @@ var y = /* @__PURE__ */ d({
34
34
  searchMethod: O(y.field.lookup)
35
35
  })), E = s(() => ({ ...T.value })), D = (e) => {
36
36
  f.value = e;
37
- }, O = ({ path: t = "", display: n = "", primary: r = "" } = {}) => (i) => e.getLookup({
38
- ...i,
39
- path: t,
40
- display: n,
41
- primary: r
37
+ }, O = ({ path: e = "", display: t = "", primary: n = "" } = {}) => (r) => i.getLookup({
38
+ ...r,
39
+ path: e,
40
+ display: t,
41
+ primary: n
42
42
  }), k = (e) => {
43
43
  let t = e ?? {};
44
44
  if (Object.values(t).length === 0) return D(null);
@@ -52,7 +52,7 @@ var y = /* @__PURE__ */ d({
52
52
  name: e.name
53
53
  })));
54
54
  };
55
- return (e, o) => {
55
+ return (i, o) => {
56
56
  let s = g("wt-input-text"), f = g("wt-input-number");
57
57
  return d.field.kind === _(a).Text ? (m(), c(s, p({ key: 0 }, w.value, {
58
58
  "model-value": C.value,
@@ -60,44 +60,44 @@ var y = /* @__PURE__ */ d({
60
60
  }), null, 16, ["model-value"])) : d.field.kind === _(a).Number ? (m(), c(f, p({ key: 1 }, w.value, {
61
61
  "model-value": C.value,
62
62
  "onUpdate:modelValue": D
63
- }), null, 16, ["model-value"])) : d.field.kind === _(a).Boolean ? h(e.$slots, _(a).Boolean, {
63
+ }), null, 16, ["model-value"])) : d.field.kind === _(a).Boolean ? h(i.$slots, _(a).Boolean, {
64
64
  key: 2,
65
65
  defaultProps: { ...w.value }
66
- }, () => [u(_(t), p(w.value, {
66
+ }, () => [u(_(e), p(w.value, {
67
67
  "model-value": C.value,
68
68
  "onUpdate:modelValue": D
69
- }), null, 16, ["model-value"])]) : d.field.kind === _(a).Select ? h(e.$slots, _(a).Select, {
69
+ }), null, 16, ["model-value"])]) : d.field.kind === _(a).Select ? h(i.$slots, _(a).Select, {
70
70
  key: 3,
71
71
  defaultProps: {
72
72
  ...w.value,
73
73
  ...T.value,
74
74
  value: C.value
75
75
  }
76
- }, () => [u(_(n), p(w.value, {
76
+ }, () => [u(_(t), p(w.value, {
77
77
  "model-value": C.value,
78
78
  "search-method": O(d.field.lookup),
79
79
  "data-key": "id",
80
80
  "onUpdate:modelValue": k
81
- }), null, 16, ["model-value", "search-method"])]) : d.field.kind === _(a).Multiselect ? h(e.$slots, _(a).Multiselect, {
81
+ }), null, 16, ["model-value", "search-method"])]) : d.field.kind === _(a).Multiselect ? h(i.$slots, _(a).Multiselect, {
82
82
  key: 4,
83
83
  defaultProps: {
84
84
  ...w.value,
85
85
  ...E.value,
86
86
  value: C.value
87
87
  }
88
- }, () => [u(_(i), p({
88
+ }, () => [u(_(r), p({
89
89
  ...w.value,
90
90
  ...E.value
91
91
  }, {
92
92
  "model-value": C.value,
93
93
  "onUpdate:modelValue": A
94
- }), null, 16, ["model-value"])]) : d.field.kind === _(a).Calendar ? h(e.$slots, _(a).Calendar, {
94
+ }), null, 16, ["model-value"])]) : d.field.kind === _(a).Calendar ? h(i.$slots, _(a).Calendar, {
95
95
  key: 5,
96
96
  defaultProps: {
97
97
  ...w.value,
98
98
  value: C.value
99
99
  }
100
- }, () => [u(_(r), p(w.value, {
100
+ }, () => [u(_(n), p(w.value, {
101
101
  "model-value": C.value,
102
102
  "show-time": "",
103
103
  "onUpdate:modelValue": D
@@ -1,8 +1,9 @@
1
- import { D as e } from "./components-CMBVRgca.js";
1
+ import { w as e } from "./components-CB2t5ag8.js";
2
+ import "./convertDuration-CGW5IDMW.js";
2
3
  import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
3
- import { l as n } from "./enums-B_9ZBu01.js";
4
- import "./wt-button-CNQAK85M.js";
5
- import { t as r } from "./wt-icon-btn-DDElLZil.js";
4
+ import { c as n } from "./enums-Bd-8yrmg.js";
5
+ import "./wt-button-BzYDkfhK.js";
6
+ import { t as r } from "./wt-icon-btn-CeGGT2PO.js";
6
7
  import { $ as i, C as a, D as o, F as s, G as c, H as l, I as u, J as d, K as f, L as p, M as m, N as h, O as g, P as ee, Q as _, R as te, S as v, U as ne, V as y, W as b, X as x, Y as re, Z as S, _ as C, a as ie, b as ae, c as oe, d as se, et as ce, f as le, g as ue, h as de, i as w, it as fe, j as pe, k as me, l as T, m as he, n as E, nt as D, o as O, ot as ge, p as k, q as A, r as j, rt as _e, t as ve, tt as ye, u as be, v as M, w as xe, y as Se, z as Ce } from "./vidstack-D9mvYVIz-DesuYgKV.js";
7
8
  import { _ as N, a as we, c as Te, d as Ee, f as De, g as Oe, h as ke, i as Ae, l as je, m as Me, n as Ne, o as Pe, p as Fe, r as Ie, s as Le, t as P, u as Re } from "./vidstack-CgfrU1hS-CNTJkyzm.js";
8
9
  import { _ as ze, a as Be, c as Ve, f as He, g as Ue, h as We, i as Ge, l as Ke, n as qe, r as Je, s as Ye, t as Xe, u as Ze, v as Qe, x as $e, y as et } from "./useVidstackSrc-aQcqC_v0.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.8.99",
3
+ "version": "26.8.101",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
@@ -1,10 +1 @@
1
- export const FormatDateMode = {
2
- DATE: 'date',
3
- TIME: 'time',
4
- TIME_SEC: 'timeSec',
5
- DATETIME: 'datetime',
6
- DATETIME_SHORT: 'datetimeShort',
7
- } as const;
8
-
9
- export type FormatDateMode =
10
- (typeof FormatDateMode)[keyof typeof FormatDateMode];
1
+ export { FormatDateMode } from '@webitel/api-services/enums';
@@ -10,7 +10,7 @@
10
10
  @update:model-value="toggleCallCenterMode"
11
11
  />
12
12
  <wt-status-select
13
- :key="status"
13
+ :key="`${status}_${statusSelectKey}`"
14
14
  :status="status"
15
15
  :status-duration="statusDuration"
16
16
  :disabled="disabled"
@@ -85,6 +85,8 @@ const emit = defineEmits<{
85
85
 
86
86
  const { t } = useI18n();
87
87
 
88
+ const statusSelectKey = ref(0);
89
+
88
90
  const isPauseCausePopup = ref(false);
89
91
  const pauseCauses = ref<EngineForAgentPauseCause[]>([]);
90
92
  const error = ref(null);
@@ -109,6 +111,7 @@ function openPauseCausePopup() {
109
111
 
110
112
  function closePauseCausePopup() {
111
113
  isPauseCausePopup.value = false;
114
+ statusSelectKey.value++;
112
115
  }
113
116
 
114
117
  async function loadPauseCauses(): Promise<void> {
@@ -125,6 +128,7 @@ function openActivityTypePopup() {
125
128
  function closeActivityTypePopup() {
126
129
  isActivityTypePopup.value = false;
127
130
  callCenterModeChanging.value = false;
131
+ statusSelectKey.value++;
128
132
  }
129
133
 
130
134
  async function updateStatus({
@@ -162,7 +166,8 @@ async function changeStatus({
162
166
  await updateStatus(statusPayload);
163
167
  emit('changed', statusPayload);
164
168
  } catch (err) {
165
- if (err.response.data.id === PauseNotAllowedError.id) error.value = err;
169
+ statusSelectKey.value++;
170
+ if (err?.response?.data?.id === PauseNotAllowedError.id) error.value = err;
166
171
  throw err;
167
172
  }
168
173
  }
@@ -1,15 +1,3 @@
1
- const convertDuration = (duration) => {
2
- if (!duration) return '00:00:00';
3
-
4
- let hour = `${Math.floor(duration / 3600)}`;
5
- let min = `${Math.floor((duration % 3600) / 60)}`;
6
- let sec = `${Math.floor((duration % 3600) % 60)}`;
7
-
8
- if (hour.length === 1) hour = `0${hour}`;
9
- if (min.length === 1) min = `0${min}`;
10
- if (sec.length === 1) sec = `0${sec}`;
11
-
12
- return `${hour}:${min}:${sec}`;
13
- };
1
+ import { convertDuration } from '@webitel/api-services/scripts';
14
2
 
15
3
  export default convertDuration;
@@ -1,37 +1 @@
1
- import { uk } from 'date-fns/locale';
2
- import { formatInTimeZone } from 'date-fns-tz';
3
-
4
- import type { FormatDateMode } from '../enums';
5
- import { TIMEZONE_STORAGE_KEY } from '../modules/Userinfo/constants/UserSettingsConstants';
6
-
7
- function getUserTimeZone(): string {
8
- return (
9
- localStorage.getItem(TIMEZONE_STORAGE_KEY) ||
10
- Intl.DateTimeFormat().resolvedOptions().timeZone
11
- );
12
- }
13
-
14
- // https://date-fns.org/v4.1.0/docs/format
15
- const formatStringMap = {
16
- date: 'P', // dd.MM.yyyy (13.11.2025)
17
- time: 'p', // HH:mm (15:53)
18
- timeSec: 'pp', // HH:mm:ss (15:53:00)
19
- datetime: 'Ppp', // dd.MM.yyyy, HH:mm:ss (13.11.2025, 15:53:00)
20
- datetimeShort: 'Pp', // dd.MM.yyyy, HH:mm (13.11.2025, 15:53)
21
- };
22
-
23
- export function formatDate(
24
- date: string | number | Date,
25
- to: (typeof FormatDateMode)[keyof typeof FormatDateMode],
26
- {
27
- timezone = undefined,
28
- }: {
29
- timezone?: string;
30
- } = {},
31
- ): string {
32
- const timeZone = timezone ?? getUserTimeZone();
33
-
34
- return formatInTimeZone(date, timeZone, formatStringMap[to], {
35
- locale: uk,
36
- });
37
- }
1
+ export { formatDate } from '@webitel/api-services/utils';