@webitel/ui-sdk 25.10.59 → 25.10.60

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.
@@ -5,8 +5,8 @@ var ot = (n) => {
5
5
  var Xt = (n, t, s) => t in n ? Qt(n, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[t] = s;
6
6
  var M = (n, t, s) => Xt(n, typeof t != "symbol" ? t + "" : t, s), X = (n, t, s) => t.has(n) || ot("Cannot " + s);
7
7
  var i = (n, t, s) => (X(n, t, "read from private field"), s ? s.call(n) : t.get(n)), d = (n, t, s) => t.has(n) ? ot("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, s), c = (n, t, s, r) => (X(n, t, "write to private field"), r ? r.call(n, s) : t.set(n, s), s), a = (n, t, s) => (X(n, t, "access private method"), s);
8
- import { y as Yt, x as ut, z as j, A as Zt, b as ti, E as nt, e as lt, B as _, C as ii, F as ei, d as si, G as ai, l as rt, H as dt, D as ni, L as Y, J as Z } from "./install-CSFHmKMg.js";
9
- import { R as ri } from "./vidstack-DqAw8m9J-He_m3NxW.js";
8
+ import { y as Yt, x as ut, z as j, A as Zt, b as ti, E as nt, e as lt, B as _, C as ii, F as ei, d as si, G as ai, l as rt, H as dt, D as ni, L as Y, J as Z } from "./install-BIBTsOtE.js";
9
+ import { R as ri } from "./vidstack-DqAw8m9J-BOZzC5vP.js";
10
10
  let q = null, z = [], J = [];
11
11
  function ht() {
12
12
  return q ?? (q = new AudioContext());
@@ -5,7 +5,7 @@ var w = (t) => {
5
5
  var P = (t, e, a) => e in t ? _(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
6
6
  var u = (t, e, a) => P(t, typeof e != "symbol" ? e + "" : e, a), C = (t, e, a) => e.has(t) || w("Cannot " + a);
7
7
  var c = (t, e, a) => (C(t, e, "read from private field"), a ? a.call(t) : e.get(t)), m = (t, e, a) => e.has(t) ? w("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, a), y = (t, e, a, o) => (C(t, e, "write to private field"), o ? o.call(t, a) : e.set(t, a), a), s = (t, e, a) => (C(t, e, "access private method"), a);
8
- import { l as b, h as A, S as O, C as D, d as R, m as M } from "./install-CSFHmKMg.js";
8
+ import { l as b, h as A, S as O, C as D, d as R, m as M } from "./install-BIBTsOtE.js";
9
9
  function G() {
10
10
  return "https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";
11
11
  }
@@ -94,7 +94,7 @@ class F {
94
94
  async load(e) {
95
95
  if (!c(this, n))
96
96
  throw Error("[vidstack] google cast player was not initialized");
97
- return new (await import("./vidstack-google-cast-CQk0kX_z.js")).GoogleCastProvider(c(this, n), e);
97
+ return new (await import("./vidstack-google-cast-C_H8WnQH.js")).GoogleCastProvider(c(this, n), e);
98
98
  }
99
99
  }
100
100
  n = new WeakMap(), r = new WeakSet(), S = async function(e) {
@@ -5,7 +5,7 @@ var g = (s) => {
5
5
  var w = (s, t, i) => t in s ? y(s, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[t] = i;
6
6
  var c = (s, t, i) => w(s, typeof t != "symbol" ? t + "" : t, i), h = (s, t, i) => t.has(s) || g("Cannot " + i);
7
7
  var e = (s, t, i) => (h(s, t, "read from private field"), i ? i.call(s) : t.get(s)), l = (s, t, i) => t.has(s) ? g("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, i), p = (s, t, i, a) => (h(s, t, "write to private field"), a ? a.call(s, i) : t.set(s, i), i), u = (s, t, i) => (h(s, t, "access private method"), i);
8
- import { J as M, l as f, e as A, d as P, R as O, b as S } from "./install-CSFHmKMg.js";
8
+ import { J as M, l as f, e as A, d as P, R as O, b as S } from "./install-BIBTsOtE.js";
9
9
  var r, o, b, m;
10
10
  class W {
11
11
  constructor(t) {
@@ -1,4 +1,4 @@
1
- import { c as d, a as i, I as l, e as m } from "./install-CSFHmKMg.js";
1
+ import { c as d, a as i, I as l, e as m } from "./install-BIBTsOtE.js";
2
2
  const p = /* @__PURE__ */ i(
3
3
  '<svg viewBox="0 0 32 32" fill="none" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"></svg>'
4
4
  );
@@ -3,7 +3,7 @@ var l = (i) => {
3
3
  };
4
4
  var c = (i, t, s) => t.has(i) || l("Cannot " + s);
5
5
  var r = (i, t, s) => (c(i, t, "read from private field"), s ? s.call(i) : t.get(i)), e = (i, t, s) => t.has(i) ? l("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, s), h = (i, t, s, f) => (c(i, t, "write to private field"), f ? f.call(i, s) : t.set(i, s), s), m = (i, t, s) => (c(i, t, "access private method"), s);
6
- import { j as p, t as u } from "./install-CSFHmKMg.js";
6
+ import { j as p, t as u } from "./install-BIBTsOtE.js";
7
7
  var o, a, n, d;
8
8
  class F {
9
9
  constructor(t) {
@@ -1,8 +1,8 @@
1
1
  var a = Object.defineProperty;
2
2
  var o = (i, e, t) => e in i ? a(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
3
  var r = (i, e, t) => o(i, typeof e != "symbol" ? e + "" : e, t);
4
- import { s as p } from "./install-CSFHmKMg.js";
5
- import { H as d, a as u } from "./vidstack-Bq6c3Bam-B986laoT.js";
4
+ import { s as p } from "./install-BIBTsOtE.js";
5
+ import { H as d, a as u } from "./vidstack-Bq6c3Bam-CddoBKkE.js";
6
6
  class n extends d {
7
7
  constructor(t, s) {
8
8
  super(t, s);
@@ -5,9 +5,9 @@ var Y = (n) => {
5
5
  var wt = (n, t, e) => t in n ? vt(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
6
6
  var I = (n, t, e) => wt(n, typeof t != "symbol" ? t + "" : t, e), b = (n, t, e) => t.has(n) || Y("Cannot " + e);
7
7
  var i = (n, t, e) => (b(n, t, "read from private field"), e ? e.call(n) : t.get(n)), f = (n, t, e) => t.has(n) ? Y("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), p = (n, t, e, r) => (b(n, t, "write to private field"), r ? r.call(n, e) : t.set(n, e), e), h = (n, t, e) => (b(n, t, "access private method"), e);
8
- import { o as Et, b as _, p as Lt, d as At, Q as z, l as J, e as Dt, D as N, f as xt, g as O, T as Mt, L as q, q as Ct, r as Nt, t as Rt, h as Ft, j as Z, k as Pt, m as qt, n as _t } from "./install-CSFHmKMg.js";
9
- import { VideoProvider as $t } from "./vidstack-video-hLjkIjzA.js";
10
- import { R as jt } from "./vidstack-DqAw8m9J-He_m3NxW.js";
8
+ import { o as Et, b as _, p as Lt, d as At, Q as z, l as J, e as Dt, D as N, f as xt, g as O, T as Mt, L as q, q as Ct, r as Nt, t as Rt, h as Ft, j as Z, k as Pt, m as qt, n as _t } from "./install-BIBTsOtE.js";
9
+ import { VideoProvider as $t } from "./vidstack-video-CP-SHCvS.js";
10
+ import { R as jt } from "./vidstack-DqAw8m9J-BOZzC5vP.js";
11
11
  function W(n) {
12
12
  try {
13
13
  return new Intl.DisplayNames(navigator.languages, { type: "language" }).of(n) ?? null;
@@ -5,9 +5,9 @@ var W = (d) => {
5
5
  var vt = (d, t, s) => t in d ? Lt(d, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : d[t] = s;
6
6
  var G = (d, t, s) => vt(d, typeof t != "symbol" ? t + "" : t, s), O = (d, t, s) => t.has(d) || W("Cannot " + s);
7
7
  var e = (d, t, s) => (O(d, t, "read from private field"), s ? s.call(d) : t.get(d)), T = (d, t, s) => t.has(d) ? W("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(d) : t.set(d, s), l = (d, t, s, i) => (O(d, t, "write to private field"), i ? i.call(d, s) : t.set(d, s), s), r = (d, t, s) => (O(d, t, "access private method"), s);
8
- import { y as St, K as L, U as Z, x as At, D as tt, d as V, l as et, e as It, V as bt, L as Rt } from "./install-CSFHmKMg.js";
9
- import { R as wt } from "./vidstack-DqAw8m9J-He_m3NxW.js";
10
- import { g as Mt, a as Dt, b as it, h as st, l as Nt, c as Pt } from "./vidstack-D2pY00kU-CanI4lQe.js";
8
+ import { y as St, K as L, U as Z, x as At, D as tt, d as V, l as et, e as It, V as bt, L as Rt } from "./install-BIBTsOtE.js";
9
+ import { R as wt } from "./vidstack-DqAw8m9J-BOZzC5vP.js";
10
+ import { g as Mt, a as Dt, b as it, h as st, l as Nt, c as Pt } from "./vidstack-D2pY00kU-_TcpbsxY.js";
11
11
  var g, _, at;
12
12
  class _t {
13
13
  constructor(t) {
@@ -5,9 +5,9 @@ var N = (n) => {
5
5
  var ot = (n, t, i) => t in n ? rt(n, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : n[t] = i;
6
6
  var _ = (n, t, i) => ot(n, typeof t != "symbol" ? t + "" : t, i), R = (n, t, i) => t.has(n) || N("Cannot " + i);
7
7
  var e = (n, t, i) => (R(n, t, "read from private field"), i ? i.call(n) : t.get(n)), p = (n, t, i) => t.has(n) ? N("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, i), f = (n, t, i, s) => (R(n, t, "write to private field"), s ? s.call(n, i) : t.set(n, i), i), a = (n, t, i) => (R(n, t, "access private method"), i);
8
- import { i as ht, b as C, p as at, d as O, Q as V, l as j, e as dt, D as x, f as ut, T as ct, g as k, L as $, h as lt, j as q, k as pt, m as ft, n as vt } from "./install-CSFHmKMg.js";
9
- import { VideoProvider as yt } from "./vidstack-video-hLjkIjzA.js";
10
- import { R as gt } from "./vidstack-DqAw8m9J-He_m3NxW.js";
8
+ import { i as ht, b as C, p as at, d as O, Q as V, l as j, e as dt, D as x, f as ut, T as ct, g as k, L as $, h as lt, j as q, k as pt, m as ft, n as vt } from "./install-BIBTsOtE.js";
9
+ import { VideoProvider as yt } from "./vidstack-video-CP-SHCvS.js";
10
+ import { R as gt } from "./vidstack-DqAw8m9J-BOZzC5vP.js";
11
11
  const Lt = (n) => ut(n);
12
12
  var T, h, o, D, b, r, E, M, U, F, Q, K, W, B, J, X, Y, z, G, Z, tt;
13
13
  class St {
@@ -5,8 +5,8 @@ var b = (i) => {
5
5
  var N = (i, t, e) => t in i ? $(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
6
6
  var m = (i, t, e) => N(i, typeof t != "symbol" ? t + "" : t, e), E = (i, t, e) => t.has(i) || b("Cannot " + e);
7
7
  var s = (i, t, e) => (E(i, t, "read from private field"), e ? e.call(i) : t.get(i)), r = (i, t, e) => t.has(i) ? b("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), c = (i, t, e, n) => (E(i, t, "write to private field"), n ? n.call(i, e) : t.set(i, e), e), p = (i, t, e) => (E(i, t, "access private method"), e);
8
- import { s as U, u as V, v as A, w as q, x as C, l as F, D as Y, E as _, T as j, g as v } from "./install-CSFHmKMg.js";
9
- import { H as z, a as B } from "./vidstack-Bq6c3Bam-B986laoT.js";
8
+ import { s as U, u as V, v as A, w as q, x as C, l as F, D as Y, E as _, T as j, g as v } from "./install-BIBTsOtE.js";
9
+ import { H as z, a as B } from "./vidstack-Bq6c3Bam-CddoBKkE.js";
10
10
  var P, f, k, D, H;
11
11
  class G {
12
12
  constructor(t, e) {
@@ -5,9 +5,9 @@ var N = (r) => {
5
5
  var de = (r, c, e) => c in r ? ue(r, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[c] = e;
6
6
  var b = (r, c, e) => de(r, typeof c != "symbol" ? c + "" : c, e), S = (r, c, e) => c.has(r) || N("Cannot " + e);
7
7
  var t = (r, c, e) => (S(r, c, "read from private field"), e ? e.call(r) : c.get(r)), f = (r, c, e) => c.has(r) ? N("Cannot add the same private member more than once") : c instanceof WeakSet ? c.add(r) : c.set(r, e), u = (r, c, e, i) => (S(r, c, "write to private field"), i ? i.call(r, e) : c.set(r, e), e), o = (r, c, e) => (S(r, c, "access private method"), e);
8
- import { y as fe, J as U, K as C, p as pe, e as q, d as Q, b as ye, M as _, L as R, l as be, N as ke, T as ve, Q as J } from "./install-CSFHmKMg.js";
9
- import { R as me } from "./vidstack-DqAw8m9J-He_m3NxW.js";
10
- import { E as we } from "./vidstack-DDXt6fpN-Dqmm7fj6.js";
8
+ import { y as fe, J as U, K as C, p as pe, e as q, d as Q, b as ye, M as _, L as R, l as be, N as ke, T as ve, Q as J } from "./install-BIBTsOtE.js";
9
+ import { R as me } from "./vidstack-DqAw8m9J-BOZzC5vP.js";
10
+ import { E as we } from "./vidstack-DDXt6fpN-CHZwRfQ_.js";
11
11
  import { resolveVimeoVideoId as Pe, getVimeoVideoInfo as Te } from "./vidstack-krOAtKMi-B4IZWKdc.js";
12
12
  const Ce = [
13
13
  "bufferend",
@@ -5,8 +5,8 @@ var B = (r) => {
5
5
  var N = (r, n, e) => n in r ? K(r, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[n] = e;
6
6
  var T = (r, n, e) => N(r, typeof n != "symbol" ? n + "" : n, e), R = (r, n, e) => n.has(r) || B("Cannot " + e);
7
7
  var s = (r, n, e) => (R(r, n, "read from private field"), e ? e.call(r) : n.get(r)), p = (r, n, e) => n.has(r) ? B("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(r) : n.set(r, e), l = (r, n, e, t) => (R(r, n, "write to private field"), t ? t.call(r, e) : n.set(r, e), e), o = (r, n, e) => (R(r, n, "access private method"), e);
8
- import { y as q, J as z, p as A, e as G, b as H, M as Q, K as C, O as W, t as $, P as X } from "./install-CSFHmKMg.js";
9
- import { E as Z } from "./vidstack-DDXt6fpN-Dqmm7fj6.js";
8
+ import { y as q, J as z, p as A, e as G, b as H, M as Q, K as C, O as W, t as $, P as X } from "./install-BIBTsOtE.js";
9
+ import { E as Z } from "./vidstack-DDXt6fpN-CHZwRfQ_.js";
10
10
  import { resolveYouTubeVideoId as ee } from "./vidstack-Dm1xEU9Q-qSXq3AI-.js";
11
11
  const b = {
12
12
  Ended: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "25.10.59",
3
+ "version": "25.10.60",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run lint:fix || true) && npm run publish-lib",
@@ -3,12 +3,13 @@ import { AgentServiceApiFactory } from 'webitel-sdk';
3
3
  const AgentStatusAPIFactory = ({ instance, OpenAPIConfig }) => {
4
4
  const service = new AgentServiceApiFactory(OpenAPIConfig, '', instance);
5
5
 
6
- const patchAgentStatus = async ({ agentId, status, pauseCause }) => {
6
+ const patchAgentStatus = async ({ agentId, status, pauseCause, statusComment }) => {
7
7
  try {
8
8
  const res = await service.updateAgentStatus(agentId, {
9
9
  status,
10
10
  id: agentId,
11
11
  payload: pauseCause,
12
+ status_comment: statusComment
12
13
  });
13
14
  return { success: !!res };
14
15
  } catch (err) {
@@ -13,27 +13,36 @@
13
13
  <li
14
14
  v-for="option of pauseCause"
15
15
  :key="option.id"
16
- class="wt-cc-pause-cause-popup-option"
16
+ class="wt-cc-pause-cause-popup-option__wrapper"
17
17
  >
18
- <wt-radio
19
- :label="option.name"
20
- :selected="selected.id"
21
- :value="option.id"
22
- class="wt-cc-pause-cause-popup-option__radio"
23
- @update:selected="select(option)"
24
- />
25
- <div class="wt-cc-pause-cause-popup-option__limits-wrapper">
26
- <span
27
- :class="{
28
- 'wt-cc-pause-cause-popup-option__duration--overflow':
29
- option.isOverflow,
30
- }"
31
- >
32
- {{ option.duration }}
33
- </span>
34
- /
35
- <span>{{ option.limit }}</span>
36
- </div>
18
+ <div class="wt-cc-pause-cause-popup-option">
19
+ <wt-radio
20
+ :label="option.name"
21
+ :selected="selected?.id"
22
+ :value="option.id"
23
+ class="wt-cc-pause-cause-popup-option__radio"
24
+ @update:selected="select(option)"
25
+ />
26
+ <div class="wt-cc-pause-cause-popup-option__limits-wrapper">
27
+ <span
28
+ :class="{
29
+ 'wt-cc-pause-cause-popup-option__duration--overflow':
30
+ option.isOverflow,
31
+ }"
32
+ >
33
+ {{ option.duration }}
34
+ </span>
35
+ /
36
+ <span>{{ option.limit }}</span>
37
+ </div>
38
+ </div>
39
+ <div v-if="selected && option.id === selected?.id" class="wt-cc-pause-cause-popup-option__comment">
40
+ <wt-textarea
41
+ :label="$t('reusable.comment')"
42
+ :value="selected.statusComment"
43
+ @input="selected.statusComment = $event"
44
+ />
45
+ </div>
37
46
  </li>
38
47
  </ul>
39
48
  </form>
@@ -72,7 +81,7 @@ const emit = defineEmits(['change', 'close']);
72
81
 
73
82
  const options = toRef(props, 'options');
74
83
 
75
- const selected = ref('');
84
+ const selected = ref(null);
76
85
 
77
86
  const { t } = useI18n();
78
87
 
@@ -87,6 +96,7 @@ const pauseCause = computed(() =>
87
96
  limit: cause.limitMin
88
97
  ? `${cause.limitMin} ${t('webitelUI.agentStatusSelect.pauseCausePopup.min')}`
89
98
  : t('webitelUI.agentStatusSelect.pauseCausePopup.unlimited'),
99
+ statusComment: '',
90
100
  })),
91
101
  );
92
102
 
@@ -99,7 +109,11 @@ function close() {
99
109
  }
100
110
 
101
111
  function setPause() {
102
- emit('change', selected.value.name);
112
+ const payload = {
113
+ pauseCause: selected.value.name,
114
+ statusComment: selected.value?.statusComment || ''
115
+ }
116
+ emit('change', payload);
103
117
  close();
104
118
  }
105
119
  </script>
@@ -111,7 +125,13 @@ function setPause() {
111
125
  display: flex;
112
126
  justify-content: space-between;
113
127
  align-items: center;
128
+ }
129
+
130
+ .wt-cc-pause-cause-popup-option__comment {
131
+ margin-top: var(--spacing-sm);
132
+ }
114
133
 
134
+ .wt-cc-pause-cause-popup-option__wrapper {
115
135
  &:not(:last-child) {
116
136
  margin-bottom: var(--spacing-sm);
117
137
  }
@@ -70,13 +70,13 @@ async function loadPauseCauses() {
70
70
  pauseCauses.value = response.items;
71
71
  }
72
72
 
73
- async function updateStatus({ agentId, status, pauseCause }) {
74
- return AgentStatusAPI.patch({ agentId, status, pauseCause });
73
+ async function updateStatus({ agentId, status, pauseCause, statusComment }) {
74
+ return AgentStatusAPI.patch({ agentId, status, pauseCause, statusComment });
75
75
  }
76
76
 
77
- async function changeStatus({ status, pauseCause }) {
77
+ async function changeStatus({ status, pauseCause, statusComment }) {
78
78
  try {
79
- const statusPayload = { agentId: props.agentId, status, pauseCause };
79
+ const statusPayload = { agentId: props.agentId, status, pauseCause, statusComment };
80
80
  await updateStatus(statusPayload);
81
81
  emit('changed', statusPayload);
82
82
  } catch (err) {
@@ -117,9 +117,9 @@ function handleClosed(event) {
117
117
  }
118
118
  }
119
119
 
120
- function handlePauseCauseInput(pauseCause) {
120
+ function handlePauseCauseInput({ pauseCause, statusComment }) {
121
121
  const status = AgentStatus.PAUSE;
122
- return changeStatus({ status, pauseCause });
122
+ return changeStatus({ status, pauseCause, statusComment });
123
123
  }
124
124
  </script>
125
125
 
@@ -3,10 +3,11 @@ declare function AgentStatusAPIFactory({ instance, OpenAPIConfig }: {
3
3
  instance: any;
4
4
  OpenAPIConfig: any;
5
5
  }): {
6
- patch: ({ agentId, status, pauseCause }: {
6
+ patch: ({ agentId, status, pauseCause, statusComment }: {
7
7
  agentId: any;
8
8
  status: any;
9
9
  pauseCause: any;
10
+ statusComment: any;
10
11
  }) => Promise<{
11
12
  success: boolean;
12
13
  }>;