@webitel/ui-sdk 25.12.30 → 25.12.32

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/img/sprite/index.js +3 -1
  2. package/dist/img/sprite/video-cam-off--filled.svg +3 -0
  3. package/dist/{install-D_xtJZB0.js → install-DPTNK_y8.js} +7311 -7275
  4. package/dist/{plyr-DNPJWtDF.js → plyr-S_HQR9HD.js} +1 -1
  5. package/dist/ui-sdk.css +1 -1
  6. package/dist/ui-sdk.js +1 -1
  7. package/dist/ui-sdk.umd.cjs +724 -724
  8. package/dist/{vidstack-Bq6c3Bam-iboJqKVr.js → vidstack-Bq6c3Bam-7dUj8HJJ.js} +2 -2
  9. package/dist/{vidstack-D2pY00kU-Ct14APC8.js → vidstack-D2pY00kU-B4w_mKZl.js} +2 -2
  10. package/dist/{vidstack-DDXt6fpN-Dt79RJ4W.js → vidstack-DDXt6fpN-CDgv4Ulh.js} +1 -1
  11. package/dist/{vidstack-D_-9AA6_-DDXWcVDN.js → vidstack-D_-9AA6_-CT5H9lb4.js} +1 -1
  12. package/dist/{vidstack-DqAw8m9J-DRb_cwVy.js → vidstack-DqAw8m9J-Un0fJP1z.js} +1 -1
  13. package/dist/{vidstack-audio-ciWGdZoD.js → vidstack-audio-CiqSEu9s.js} +2 -2
  14. package/dist/{vidstack-dash-BjbkCaQh.js → vidstack-dash-X_IrTs8m.js} +3 -3
  15. package/dist/{vidstack-google-cast-BWfbN1oJ.js → vidstack-google-cast-DcYQ7uwa.js} +3 -3
  16. package/dist/{vidstack-hls-BqpGa4dW.js → vidstack-hls-2XBuX8OU.js} +3 -3
  17. package/dist/{vidstack-video-5xriTd1y.js → vidstack-video-BSFI-cVG.js} +2 -2
  18. package/dist/{vidstack-vimeo-BC8x2jc8.js → vidstack-vimeo-DgfVtsI6.js} +3 -3
  19. package/dist/{vidstack-youtube-B8OrDxFV.js → vidstack-youtube-RFa4SZBA.js} +2 -2
  20. package/dist/{vuex.esm-bundler-BOZ1SHXV.js → vuex.esm-bundler-D3tAy2Z7.js} +1 -1
  21. package/package.json +9 -1
  22. package/src/assets/icons/sprite/index.js +3 -1
  23. package/src/assets/icons/sprite/video-cam-off--filled.svg +3 -0
  24. package/src/components/wt-switcher/wt-switcher.vue +19 -2
  25. package/src/components/wt-tree/wt-tree.vue +11 -1
  26. package/src/components/wt-tree-line/wt-tree-line.vue +21 -1
  27. package/src/components/wt-vidstack-player/components/layouts/video-layout.vue +7 -1
  28. package/src/components/wt-vidstack-player/components/panels/video-call-controls-panel/video-call-controls-panel.vue +86 -41
  29. package/src/components/wt-vidstack-player/wt-vidstack-player.vue +51 -40
  30. package/src/modules/CallSession/index.ts +3 -4
  31. package/src/modules/CallSession/modules/ScreenSharing/screen-sharing.vue +1 -1
  32. package/src/modules/CallSession/modules/VideoCall/enums/VideoCallAction.enum.ts +11 -0
  33. package/src/modules/CallSession/modules/VideoCall/video-call.vue +133 -42
  34. package/types/components/wt-switcher/wt-switcher.vue.d.ts +6 -4
  35. package/types/components/wt-tree/wt-tree.vue.d.ts +11 -1
  36. package/types/components/wt-tree-line/wt-tree-line.vue.d.ts +21 -1
  37. package/types/components/wt-vidstack-player/components/panels/video-call-controls-panel/video-call-controls-panel.vue.d.ts +29 -16
  38. package/types/components/wt-vidstack-player/wt-vidstack-player.vue.d.ts +9 -4
  39. package/types/modules/CallSession/index.d.ts +3 -3
  40. package/types/modules/CallSession/modules/VideoCall/enums/VideoCallAction.enum.d.ts +10 -0
  41. package/types/modules/CallSession/modules/VideoCall/video-call.vue.d.ts +34 -18
  42. package/types/types/ResultCallbacks.types.d.ts +5 -0
  43. package/types/types/index.d.ts +1 -0
@@ -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 N = (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 { A as Yt, z as ut, B as j, C as Zt, b as ti, E as nt, e as lt, F as _, G as ii, H as ei, f as si, J as ai, l as rt, K as dt, D as ni, L as Y, M as Z } from "./install-D_xtJZB0.js";
9
- import { R as ri } from "./vidstack-DqAw8m9J-DRb_cwVy.js";
8
+ import { A as Yt, z as ut, B as j, C as Zt, b as ti, E as nt, e as lt, F as _, G as ii, H as ei, f as si, J as ai, l as rt, K as dt, D as ni, L as Y, M as Z } from "./install-DPTNK_y8.js";
9
+ import { R as ri } from "./vidstack-DqAw8m9J-Un0fJP1z.js";
10
10
  let q = null, K = [], z = [];
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, k as A, V as O, G as D, f as R, o as G } from "./install-D_xtJZB0.js";
8
+ import { l as b, k as A, V as O, G as D, f as R, o as G } from "./install-DPTNK_y8.js";
9
9
  function M() {
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-BWfbN1oJ.js")).GoogleCastProvider(c(this, n), e);
97
+ return new (await import("./vidstack-google-cast-DcYQ7uwa.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 M = (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) => M(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 { M as w, l as f, e as A, f as P, U as O, b as S } from "./install-D_xtJZB0.js";
8
+ import { M as w, l as f, e as A, f as P, U as O, b as S } from "./install-DPTNK_y8.js";
9
9
  var r, o, b, m;
10
10
  class J {
11
11
  constructor(t) {
@@ -1,4 +1,4 @@
1
- import { c as d, a as i, I as l, e as m } from "./install-D_xtJZB0.js";
1
+ import { c as d, a as i, I as l, e as m } from "./install-DPTNK_y8.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 m = (i, t, s) => t.has(i) || l("Cannot " + s);
5
5
  var r = (i, t, s) => (m(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) => (m(i, t, "write to private field"), f ? f.call(i, s) : t.set(i, s), s), c = (i, t, s) => (m(i, t, "access private method"), s);
6
- import { m as p, v as u } from "./install-D_xtJZB0.js";
6
+ import { m as p, v as u } from "./install-DPTNK_y8.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-D_xtJZB0.js";
5
- import { H as d, a as u } from "./vidstack-Bq6c3Bam-iboJqKVr.js";
4
+ import { s as p } from "./install-DPTNK_y8.js";
5
+ import { H as d, a as u } from "./vidstack-Bq6c3Bam-7dUj8HJJ.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 { r as Et, b as _, d as Lt, f as At, Q as z, l as J, e as Dt, D as N, h as xt, j as O, T as Mt, L as q, t as Ct, u as Nt, v as Rt, k as Ft, m as Z, n as Pt, o as qt, q as _t } from "./install-D_xtJZB0.js";
9
- import { VideoProvider as $t } from "./vidstack-video-5xriTd1y.js";
10
- import { R as jt } from "./vidstack-DqAw8m9J-DRb_cwVy.js";
8
+ import { r as Et, b as _, d as Lt, f as At, Q as z, l as J, e as Dt, D as N, h as xt, j as O, T as Mt, L as q, t as Ct, u as Nt, v as Rt, k as Ft, m as Z, n as Pt, o as qt, q as _t } from "./install-DPTNK_y8.js";
9
+ import { VideoProvider as $t } from "./vidstack-video-BSFI-cVG.js";
10
+ import { R as jt } from "./vidstack-DqAw8m9J-Un0fJP1z.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 Q = (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) || Q("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) ? Q("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 { A as St, N as L, W as Z, z as At, D as tt, f as V, l as et, e as It, X as bt, L as Rt } from "./install-D_xtJZB0.js";
9
- import { R as wt } from "./vidstack-DqAw8m9J-DRb_cwVy.js";
10
- import { g as Mt, a as Dt, b as it, h as st, l as Nt, c as Pt } from "./vidstack-D2pY00kU-Ct14APC8.js";
8
+ import { A as St, N as L, W as Z, z as At, D as tt, f as V, l as et, e as It, X as bt, L as Rt } from "./install-DPTNK_y8.js";
9
+ import { R as wt } from "./vidstack-DqAw8m9J-Un0fJP1z.js";
10
+ import { g as Mt, a as Dt, b as it, h as st, l as Nt, c as Pt } from "./vidstack-D2pY00kU-B4w_mKZl.js";
11
11
  var g, _, at;
12
12
  class _t {
13
13
  constructor(t) {
@@ -5,9 +5,9 @@ var q = (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) || q("Cannot " + i);
7
7
  var e = (n, t, i) => (R(n, t, "read from private field"), i ? i.call(n) : t.get(n)), f = (n, t, i) => t.has(n) ? q("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, i), p = (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, d as at, f as O, Q as N, l as V, e as dt, D as x, h as ut, T as ct, j, L as $, k as lt, m as k, n as ft, o as pt, q as vt } from "./install-D_xtJZB0.js";
9
- import { VideoProvider as yt } from "./vidstack-video-5xriTd1y.js";
10
- import { R as gt } from "./vidstack-DqAw8m9J-DRb_cwVy.js";
8
+ import { i as ht, b as C, d as at, f as O, Q as N, l as V, e as dt, D as x, h as ut, T as ct, j, L as $, k as lt, m as k, n as ft, o as pt, q as vt } from "./install-DPTNK_y8.js";
9
+ import { VideoProvider as yt } from "./vidstack-video-BSFI-cVG.js";
10
+ import { R as gt } from "./vidstack-DqAw8m9J-Un0fJP1z.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 y = (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, w as V, x as A, y as j, z as C, l as q, D as z, E as F, T as Y, j as v } from "./install-D_xtJZB0.js";
9
- import { H as _, a as B } from "./vidstack-Bq6c3Bam-iboJqKVr.js";
8
+ import { s as U, w as V, x as A, y as j, z as C, l as q, D as z, E as F, T as Y, j as v } from "./install-DPTNK_y8.js";
9
+ import { H as _, a as B } from "./vidstack-Bq6c3Bam-7dUj8HJJ.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 { A as fe, M as U, N as C, d as pe, e as q, f as Q, b as ye, O as _, L as R, l as be, P as ke, T as ve, Q as W } from "./install-D_xtJZB0.js";
9
- import { R as me } from "./vidstack-DqAw8m9J-DRb_cwVy.js";
10
- import { E as we } from "./vidstack-DDXt6fpN-Dt79RJ4W.js";
8
+ import { A as fe, M as U, N as C, d as pe, e as q, f as Q, b as ye, O as _, L as R, l as be, P as ke, T as ve, Q as W } from "./install-DPTNK_y8.js";
9
+ import { R as me } from "./vidstack-DqAw8m9J-Un0fJP1z.js";
10
+ import { E as we } from "./vidstack-DDXt6fpN-CDgv4Ulh.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 q = (r, n, e) => n in r ? A(r, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[n] = e;
6
6
  var T = (r, n, e) => q(r, typeof n != "symbol" ? n + "" : n, e), M = (r, n, e) => n.has(r) || B("Cannot " + e);
7
7
  var s = (r, n, e) => (M(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) => (M(r, n, "write to private field"), t ? t.call(r, e) : n.set(r, e), e), o = (r, n, e) => (M(r, n, "access private method"), e);
8
- import { A as z, M as G, d as H, e as J, b as K, O as Q, N as C, R as W, v as $, S as X } from "./install-D_xtJZB0.js";
9
- import { E as Z } from "./vidstack-DDXt6fpN-Dt79RJ4W.js";
8
+ import { A as z, M as G, d as H, e as J, b as K, O as Q, N as C, R as W, v as $, S as X } from "./install-DPTNK_y8.js";
9
+ import { E as Z } from "./vidstack-DDXt6fpN-CDgv4Ulh.js";
10
10
  import { resolveYouTubeVideoId as ee } from "./vidstack-Dm1xEU9Q-qSXq3AI-.js";
11
11
  const b = {
12
12
  Ended: 0,
@@ -1,4 +1,4 @@
1
- import { p as d } from "./install-D_xtJZB0.js";
1
+ import { p as d } from "./install-DPTNK_y8.js";
2
2
  import { inject as lt, effectScope as dt, reactive as vt, watch as J, computed as pt } from "vue";
3
3
  function ht() {
4
4
  return W().__VUE_DEVTOOLS_GLOBAL_HOOK__;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "25.12.30",
3
+ "version": "25.12.32",
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",
@@ -282,6 +282,10 @@
282
282
  "types": "./types/modules*",
283
283
  "import": "./src/modules*"
284
284
  },
285
+ "./modules/CallSession": {
286
+ "types": "./types/modules/CallSession/index.d.ts",
287
+ "import": "./src/modules/CallSession/index.ts"
288
+ },
285
289
  "./plugins*": {
286
290
  "types": "./types/plugins*",
287
291
  "import": "./src/plugins*"
@@ -300,6 +304,10 @@
300
304
  },
301
305
  "./dist*": {
302
306
  "import": "./dist*"
307
+ },
308
+ "./src/types": {
309
+ "types": "./types/index.d.ts",
310
+ "import": "./src/types/index.ts"
303
311
  }
304
312
  }
305
313
  }
@@ -82,7 +82,7 @@ import docs from './docs.svg';
82
82
  import done from './done.svg';
83
83
  import doneFilled from './done--filled.svg';
84
84
  import download from './download.svg';
85
- import downloadPdf from './download-pdf.svg'
85
+ import downloadPdf from './download-pdf.svg';
86
86
  import edit from './edit.svg';
87
87
  import elevenlabs from './elevenlabs.svg';
88
88
  import email from './email.svg';
@@ -223,6 +223,7 @@ import variableSelect from './variable-select.svg';
223
223
  import versions from './versions.svg';
224
224
  import videoCam from './video-cam.svg';
225
225
  import videoCamOff from './video-cam-off.svg';
226
+ import videoCamOffFilled from './video-cam-off--filled.svg';
226
227
  import webitelLogo from './webitel-logo.svg';
227
228
  import zoomIn from './zoom-in.svg';
228
229
  import zoomOut from './zoom-out.svg';
@@ -397,6 +398,7 @@ export default objCamelToKebab({
397
398
  user,
398
399
  union,
399
400
  videoCamOff,
401
+ 'video-cam-off--filled': videoCamOffFilled,
400
402
  videoCam,
401
403
  zoomIn,
402
404
  zoomOut,
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M38.1536 49.3335C41.644 49.3335 44.6267 47.2091 45.8125 44.2137C45.9803 43.7897 46.1109 43.3461 46.2031 42.8908C46.305 42.3871 46.3594 41.8664 46.3594 41.3335V38.0054L54.289 43.8075C56.092 45.1269 58.6666 43.8726 58.6666 41.6747V22.3257C58.6666 20.1278 56.092 18.8736 54.289 20.1929L46.3594 25.995V22.6669C46.3594 22.134 46.305 21.6133 46.2031 21.1096C46.1109 20.6543 45.9803 20.2107 45.8125 19.7867C44.6267 16.7913 41.644 14.6669 38.1536 14.6669H13.539C9.00747 14.6669 5.33331 18.2486 5.33331 22.6669V41.3335C5.33331 45.7518 9.00747 49.3335 13.539 49.3335H38.1536ZM31.9974 38.6669C31.081 39.5806 29.5935 39.5806 28.6771 38.6669L25.6901 35.6877L22.7031 38.6669C21.7867 39.5806 20.2992 39.5806 19.3828 38.6669C18.4666 37.7531 18.4665 36.2706 19.3828 35.357L22.3828 32.3674L19.3802 29.3752C18.4638 28.4615 18.4638 26.979 19.3802 26.0653C20.2965 25.1521 21.7816 25.1521 22.6979 26.0653L25.6901 29.0497L28.6823 26.0653C29.5987 25.1523 31.0838 25.152 32 26.0653C32.9164 26.979 32.9164 28.4615 32 29.3752L28.9974 32.3674L31.9974 35.357C32.9136 36.2706 32.9133 37.7531 31.9974 38.6669Z" />
3
+ </svg>
@@ -4,9 +4,11 @@
4
4
  :class="{ 'wt-switcher--label-left': labelLeft }"
5
5
  >
6
6
  <p-toggle-switch
7
- v-model="model"
7
+ :key="switcherKey"
8
+ :model-value="model"
8
9
  :input-id="switcherId"
9
10
  :disabled="disabled"
11
+ @update:model-value="handleSwitcherClick"
10
12
  />
11
13
  <wt-label
12
14
  v-if="hasLabel"
@@ -32,7 +34,8 @@
32
34
 
33
35
  <script setup lang="ts">
34
36
  import { ToggleSwitchProps } from 'primevue/toggleswitch';
35
- import { computed, defineModel, defineProps, useSlots, withDefaults } from 'vue';
37
+ import { computed, defineEmits, defineModel, defineProps,
38
+ nextTick, ref, useSlots, withDefaults } from 'vue';
36
39
 
37
40
  interface LabelProps {
38
41
  [key: string]: any;
@@ -43,6 +46,7 @@ interface Props extends ToggleSwitchProps {
43
46
  labelLeft?: boolean;
44
47
  disabled?: boolean;
45
48
  labelProps?: LabelProps;
49
+ controlled?: boolean; // for controlled mode, when need to sync visual state with model
46
50
  }
47
51
 
48
52
  const props = withDefaults(defineProps<Props>(), {
@@ -50,9 +54,13 @@ const props = withDefaults(defineProps<Props>(), {
50
54
  labelLeft: false,
51
55
  disabled: false,
52
56
  labelProps: () => ({}),
57
+ controlled: false
53
58
  });
54
59
 
55
60
  const model = defineModel<boolean>();
61
+ const switcherKey = ref(0);
62
+
63
+ const emit = defineEmits(['update:modelValue']);
56
64
 
57
65
  const slots = useSlots();
58
66
 
@@ -61,6 +69,15 @@ const hasLabel = computed(() => {
61
69
  });
62
70
 
63
71
  const switcherId = `switcher-${Math.random().toString(36).slice(2, 11)}`;
72
+
73
+ const handleSwitcherClick = () => {
74
+ if (props.controlled) {
75
+ nextTick(() => {
76
+ switcherKey.value++
77
+ })
78
+ }
79
+ emit('update:modelValue', !model.value);
80
+ }
64
81
  </script>
65
82
 
66
83
  <style lang="scss">
@@ -15,7 +15,17 @@
15
15
  :multiple="multiple"
16
16
  :allow-parent="allowParent"
17
17
  @update:model-value="emit('update:modelValue', $event)"
18
- />
18
+ >
19
+ <template
20
+ v-if="$slots['item-prefix']"
21
+ #item-prefix="slotProps"
22
+ >
23
+ <slot
24
+ name="item-prefix"
25
+ v-bind="slotProps"
26
+ />
27
+ </template>
28
+ </wt-tree-line>
19
29
  </div>
20
30
  <div
21
31
  v-if="mode === WtTreeMode.List"
@@ -18,6 +18,16 @@
18
18
  @click="collapsed = !collapsed"
19
19
  />
20
20
  </div>
21
+ <slot
22
+ name="item-prefix"
23
+ class="mr-1"
24
+ :data="data"
25
+ :root-data="rootData || data"
26
+ :nested-level="nestedLevel"
27
+ :active="displayActiveState"
28
+ :has-children="!!(data[childrenProp] && data[childrenProp].length)"
29
+ :selected-parent="selectedParent"
30
+ />
21
31
  <div
22
32
  :class="{
23
33
  active: displayActiveState,
@@ -55,7 +65,17 @@
55
65
  :root-data="rootData || data"
56
66
  @open-parent="onOpenParent"
57
67
  @update:model-value="emit('update:modelValue', $event)"
58
- />
68
+ >
69
+ <template
70
+ v-if="$slots['item-prefix']"
71
+ #item-prefix="slotProps"
72
+ >
73
+ <slot
74
+ name="item-prefix"
75
+ v-bind="slotProps"
76
+ />
77
+ </template>
78
+ </wt-tree-line>
59
79
  </div>
60
80
  </wt-expand-transition>
61
81
  </template>
@@ -4,7 +4,7 @@
4
4
  :class="`video-layout--${size}`"
5
5
  >
6
6
  <video-display-panel
7
- v-if="!props.hideDisplayPanel"
7
+ :class="{'video-display-panel--hidden': props.hideDisplayPanel}"
8
8
  :title="props.title"
9
9
  :username="props.username"
10
10
  :closable="props.closable"
@@ -49,6 +49,12 @@ const emit = defineEmits<{
49
49
  .video-layout {
50
50
  position: relative;
51
51
 
52
+ .video-display-panel {
53
+ &--hidden {
54
+ visibility: hidden;
55
+ }
56
+ }
57
+
52
58
  &--sm {
53
59
  border-radius: var(--p-player-wrapper-sm-border-radius);
54
60
  }
@@ -1,116 +1,152 @@
1
1
  <template>
2
2
  <controls-group class="video-call-controls-panel">
3
3
  <wt-button
4
- v-if="props.screenshotCallback"
4
+ v-if="shownActionsMap[VideoCallAction.Screenshot]"
5
5
  rounded
6
6
  contains-icon
7
7
  variant="outlined"
8
8
  color="secondary"
9
- :loading="props.screenshotIsLoading"
9
+ :loading="isScreenshotLoading"
10
10
  :size="size"
11
11
  :icon="screenShotIcon"
12
- @click="props.screenshotCallback"
12
+ @click="onScreenshotClick"
13
13
  />
14
14
 
15
15
  <wt-button
16
- v-if="props.recordingsCallback"
16
+ v-if="shownActionsMap[VideoCallAction.Recordings]"
17
17
  rounded
18
18
  contains-icon
19
19
  variant="outlined"
20
20
  color="secondary"
21
21
  :size="size"
22
22
  :icon="recordIcon"
23
- @click="props.recordingsCallback"
23
+ @click="emit(VideoCallAction.Recordings)"
24
24
  />
25
25
 
26
26
  <wt-button
27
- v-if="props.micCallback"
27
+ v-if="shownActionsMap[VideoCallAction.Mic]"
28
28
  rounded
29
29
  contains-icon
30
30
  variant="outlined"
31
31
  color="secondary"
32
32
  :size="size"
33
33
  :icon="microphoneIcon"
34
- @click="props.micCallback"
34
+ @click="emit(VideoCallAction.Mic)"
35
35
  />
36
36
 
37
37
  <wt-button
38
- v-if="props.videoCallback"
38
+ v-if="shownActionsMap[VideoCallAction.Video]"
39
39
  rounded
40
40
  contains-icon
41
41
  variant="outlined"
42
42
  color="secondary"
43
43
  :size="size"
44
44
  :icon="videoCamIcon"
45
- @click="props.videoCallback"
45
+ @click="emit(VideoCallAction.Video)"
46
46
  />
47
47
 
48
48
  <wt-button
49
- v-if="props.settingsCallback"
49
+ v-if="shownActionsMap[VideoCallAction.Settings]"
50
50
  :size="size"
51
51
  icon="settings"
52
52
  variant="outlined"
53
53
  color="secondary"
54
54
  rounded
55
55
  contains-icon
56
- @click="props.settingsCallback"
56
+ @click="emit(VideoCallAction.Settings)"
57
57
  />
58
58
 
59
59
  <wt-button
60
- v-if="props.chatCallback"
60
+ v-if="shownActionsMap[VideoCallAction.Chat]"
61
61
  :size="size"
62
62
  icon="chat"
63
63
  variant="outlined"
64
64
  color="secondary"
65
65
  rounded
66
66
  contains-icon
67
- @click="props.chatCallback"
67
+ @click="emit(VideoCallAction.Chat)"
68
68
  />
69
69
 
70
70
  <wt-button
71
- v-if="props.callStateCallback"
71
+ v-if="shownActionsMap[VideoCallAction.Hangup]"
72
72
  :size="size"
73
- :icon="callStateIcon"
74
- :color="callStateButtonColor"
73
+ icon="call-end--filled"
74
+ color="error"
75
75
  rounded
76
76
  contains-icon
77
- @click="props.callStateCallback"
77
+ @click="emit(VideoCallAction.Hangup)"
78
78
  />
79
79
  </controls-group>
80
80
  </template>
81
81
 
82
82
  <script setup lang="ts">
83
- import {computed, inject} from 'vue';
83
+ import {computed, inject, ref} from 'vue';
84
84
 
85
85
  import {ControlsGroup} from '../../../../../components/wt-vidstack-player/components'
86
+ import { ComponentSize } from '../../../../../enums';
87
+ import { VideoCallAction } from '../../../../../modules/CallSession/modules/VideoCall/enums/VideoCallAction.enum';
86
88
  import {ScreenshotStatus} from '../../../../../modules/CallSession/types';
89
+ import { ResultCallbacks } from '../../../../../types';
90
+
91
+ const props = defineProps<{
92
+ 'actions': VideoCallAction[];
93
+
94
+ 'mic:enabled': boolean;
95
+ 'mic:accessed': boolean;
96
+ 'video:enabled': boolean;
97
+ 'video:accessed': boolean;
98
+ 'screenshot:status': ScreenshotStatus | null;
99
+ 'screenshot:loading': boolean;
100
+ 'recordings': boolean;
101
+ }>();
102
+
103
+ const emit = defineEmits<{
104
+ (e: typeof VideoCallAction.Screenshot, payload?: unknown, options?: ResultCallbacks): void;
105
+ (e: typeof VideoCallAction.Recordings, payload?: unknown, options?: ResultCallbacks): void;
106
+ (e: typeof VideoCallAction.Mic, payload?: unknown, options?: ResultCallbacks): void;
107
+ (e: typeof VideoCallAction.Video, payload?: unknown, options?: ResultCallbacks): void;
108
+ (e: typeof VideoCallAction.Settings, payload?: unknown, options?: ResultCallbacks): void;
109
+ (e: typeof VideoCallAction.Chat, payload?: unknown, options?: ResultCallbacks): void;
110
+ (e: typeof VideoCallAction.Hangup, payload?: unknown, options?: ResultCallbacks): void;
111
+ }>();
112
+
113
+ const { size } = inject('size') as { size: ComponentSize };
114
+
115
+ const shownActionsMap = computed(() => {
116
+ return props.actions.reduce<Record<VideoCallAction, boolean>>((acc, action) => {
117
+ acc[action] = true;
118
+ return acc;
119
+ }, {} as Record<VideoCallAction, boolean>);
120
+ });
87
121
 
88
- interface Props {
89
- recordings: boolean
90
- isMicMuted: boolean
91
- isVideoMuted: boolean
92
- isCallStarted: boolean
93
- screenshotIsLoading: boolean
94
- screenshotStatus: ScreenshotStatus | null
95
-
96
- screenshotCallback?: () => void
97
- recordingsCallback?: () => void
98
- micCallback?: () => void
99
- videoCallback?: () => void
100
- settingsCallback?: () => void
101
- chatCallback?: () => void
102
- callStateCallback?: () => void
103
- }
122
+ const microphoneIcon = computed(() => {
123
+ if (props['mic:accessed']) {
124
+ return 'mic'; // todo
125
+ }
126
+
127
+ if (!props['mic:enabled']) {
128
+ return 'mic-muted';
129
+ }
130
+
131
+ return 'mic';
132
+ });
104
133
 
105
- const props = defineProps<Props>();
134
+ const videoCamIcon = computed(() => {
135
+ if (!props['video:accessed']) {
136
+ return 'video-cam'; // todo
137
+ }
138
+
139
+ if (!props['video:enabled']) {
140
+ return 'video-cam-off';
141
+ }
106
142
 
107
- const {size} = inject('size');
143
+ return 'video-cam';
144
+ });
108
145
 
109
- const microphoneIcon = computed(() => (props.isMicMuted ? 'mic' : 'mic-muted'));
110
- const videoCamIcon = computed(() => (props.isVideoMuted ? 'video-cam' : 'video-cam-off'));
111
146
  const recordIcon = computed(() => (props.recordings ? 'record-stop' : 'record-start'));
147
+
112
148
  const screenShotIcon = computed(() => {
113
- switch (props.screenshotStatus) {
149
+ switch (props['screenshot:status']) {
114
150
  case 'done':
115
151
  return 'screenshot-done';
116
152
  case 'error':
@@ -119,8 +155,17 @@ const screenShotIcon = computed(() => {
119
155
  return 'screenshot';
120
156
  }
121
157
  });
122
- const callStateIcon = computed(() => (props.isCallStarted ? 'call-end--filled' : 'call--filled'));
123
- const callStateButtonColor = computed(() => (props.isCallStarted ? 'error' : 'success'));
158
+
159
+ const isScreenshotLoading = ref(false);
160
+
161
+ const onScreenshotClick = () => {
162
+ isScreenshotLoading.value = true;
163
+ emit(VideoCallAction.Screenshot, null, {
164
+ onComplete: () => {
165
+ isScreenshotLoading.value = false;
166
+ },
167
+ });
168
+ };
124
169
  </script>
125
170
 
126
171
  <style scoped lang="scss">