@webex/widgets 1.20.7 → 1.22.0
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.
- package/dist/webexWidgets.css +1 -1
- package/dist/webexWidgets.esm.js +432 -290
- package/dist/webexWidgets.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/webexWidgets.esm.js
CHANGED
|
@@ -4300,7 +4300,7 @@ function X(e) {
|
|
|
4300
4300
|
};
|
|
4301
4301
|
}
|
|
4302
4302
|
|
|
4303
|
-
var
|
|
4303
|
+
var K = function (r) {
|
|
4304
4304
|
_inherits(i, R);
|
|
4305
4305
|
var a = X(i);
|
|
4306
4306
|
|
|
@@ -4319,12 +4319,12 @@ var J = function (r) {
|
|
|
4319
4319
|
}]), i;
|
|
4320
4320
|
}();
|
|
4321
4321
|
|
|
4322
|
-
function
|
|
4322
|
+
function J(e, t) {
|
|
4323
4323
|
for (var n = e, r = 0, a = Object.entries(t); r < a.length; r++) {
|
|
4324
4324
|
var i = _slicedToArray(a[r], 2),
|
|
4325
4325
|
o = i[0],
|
|
4326
4326
|
s = i[1];
|
|
4327
|
-
(null == s ? void 0 : s.constructor) === Object ?
|
|
4327
|
+
(null == s ? void 0 : s.constructor) === Object ? J(n[o], s) : n[o] = s;
|
|
4328
4328
|
}
|
|
4329
4329
|
}
|
|
4330
4330
|
|
|
@@ -6522,7 +6522,7 @@ var Ve = {
|
|
|
6522
6522
|
return r = this.fetchMeeting(t), e.next = 3, n(r);
|
|
6523
6523
|
|
|
6524
6524
|
case 3:
|
|
6525
|
-
a = e.sent,
|
|
6525
|
+
a = e.sent, J(r, a), document.dispatchEvent(new CustomEvent("meeting:update", {
|
|
6526
6526
|
detail: r
|
|
6527
6527
|
}));
|
|
6528
6528
|
|
|
@@ -6803,7 +6803,7 @@ function Xe(e) {
|
|
|
6803
6803
|
|
|
6804
6804
|
function i(t) {
|
|
6805
6805
|
var n;
|
|
6806
|
-
return _classCallCheck(this, i), (n = a.call(this, t)).activitiesAdapter = new
|
|
6806
|
+
return _classCallCheck(this, i), (n = a.call(this, t)).activitiesAdapter = new K(t.activities), n.meetingsAdapter = new He(t.meetings), n.membershipsAdapter = new Ue(t.memberships), n.organizationsAdapter = new Fe(t.organizations), n.peopleAdapter = new Ye(t.people), n.roomsAdapter = new _e(t.rooms), n;
|
|
6807
6807
|
}
|
|
6808
6808
|
|
|
6809
6809
|
return _createClass(i, [{
|
|
@@ -6819,7 +6819,7 @@ function Xe(e) {
|
|
|
6819
6819
|
}]), i;
|
|
6820
6820
|
})();
|
|
6821
6821
|
|
|
6822
|
-
function
|
|
6822
|
+
function Je(e) {
|
|
6823
6823
|
var t = e.size,
|
|
6824
6824
|
n = e.className,
|
|
6825
6825
|
r = e.style;
|
|
@@ -7541,11 +7541,11 @@ function Pt(e) {
|
|
|
7541
7541
|
}));
|
|
7542
7542
|
}
|
|
7543
7543
|
|
|
7544
|
-
|
|
7544
|
+
Je.propTypes = {
|
|
7545
7545
|
size: T.number,
|
|
7546
7546
|
className: T.string,
|
|
7547
7547
|
style: T.shape()
|
|
7548
|
-
},
|
|
7548
|
+
}, Je.defaultProps = {
|
|
7549
7549
|
size: 26,
|
|
7550
7550
|
className: "",
|
|
7551
7551
|
style: {}
|
|
@@ -7815,7 +7815,7 @@ Ke.propTypes = {
|
|
|
7815
7815
|
style: {}
|
|
7816
7816
|
};
|
|
7817
7817
|
var Lt = {
|
|
7818
|
-
"arrow-down":
|
|
7818
|
+
"arrow-down": Je,
|
|
7819
7819
|
"arrow-left": Qe,
|
|
7820
7820
|
"arrow-up": $e,
|
|
7821
7821
|
check: nt,
|
|
@@ -7969,19 +7969,19 @@ var Ht,
|
|
|
7969
7969
|
Gt = /auto|scroll/,
|
|
7970
7970
|
_t = /^tb|vertical/,
|
|
7971
7971
|
Xt = /msie|trident/i.test(Wt.navigator && Wt.navigator.userAgent),
|
|
7972
|
-
|
|
7972
|
+
Kt = function (e) {
|
|
7973
7973
|
return parseFloat(e || "0");
|
|
7974
7974
|
},
|
|
7975
|
-
|
|
7975
|
+
Jt = function (e, t, n) {
|
|
7976
7976
|
return void 0 === e && (e = 0), void 0 === t && (t = 0), void 0 === n && (n = !1), Object.freeze({
|
|
7977
7977
|
inlineSize: (n ? t : e) || 0,
|
|
7978
7978
|
blockSize: (n ? e : t) || 0
|
|
7979
7979
|
});
|
|
7980
7980
|
},
|
|
7981
7981
|
Qt = Object.freeze({
|
|
7982
|
-
devicePixelContentBoxSize:
|
|
7983
|
-
borderBoxSize:
|
|
7984
|
-
contentBoxSize:
|
|
7982
|
+
devicePixelContentBoxSize: Jt(),
|
|
7983
|
+
borderBoxSize: Jt(),
|
|
7984
|
+
contentBoxSize: Jt(),
|
|
7985
7985
|
contentRect: new qt(0, 0, 0, 0)
|
|
7986
7986
|
}),
|
|
7987
7987
|
$t = function (e, t) {
|
|
@@ -7994,29 +7994,29 @@ var Ht,
|
|
|
7994
7994
|
i = _t.test(n.writingMode || ""),
|
|
7995
7995
|
o = !r && Gt.test(n.overflowY || ""),
|
|
7996
7996
|
s = !r && Gt.test(n.overflowX || ""),
|
|
7997
|
-
c = r ? 0 :
|
|
7998
|
-
l = r ? 0 :
|
|
7999
|
-
u = r ? 0 :
|
|
8000
|
-
m = r ? 0 :
|
|
8001
|
-
p = r ? 0 :
|
|
8002
|
-
d = r ? 0 :
|
|
8003
|
-
f = r ? 0 :
|
|
7997
|
+
c = r ? 0 : Kt(n.paddingTop),
|
|
7998
|
+
l = r ? 0 : Kt(n.paddingRight),
|
|
7999
|
+
u = r ? 0 : Kt(n.paddingBottom),
|
|
8000
|
+
m = r ? 0 : Kt(n.paddingLeft),
|
|
8001
|
+
p = r ? 0 : Kt(n.borderTopWidth),
|
|
8002
|
+
d = r ? 0 : Kt(n.borderRightWidth),
|
|
8003
|
+
f = r ? 0 : Kt(n.borderBottomWidth),
|
|
8004
8004
|
h = m + l,
|
|
8005
8005
|
v = c + u,
|
|
8006
|
-
g = (r ? 0 :
|
|
8006
|
+
g = (r ? 0 : Kt(n.borderLeftWidth)) + d,
|
|
8007
8007
|
y = p + f,
|
|
8008
8008
|
C = s ? e.offsetHeight - y - e.clientHeight : 0,
|
|
8009
8009
|
w = o ? e.offsetWidth - g - e.clientWidth : 0,
|
|
8010
8010
|
b = a ? h + g : 0,
|
|
8011
8011
|
E = a ? v + y : 0,
|
|
8012
|
-
x = r ? r.width :
|
|
8013
|
-
N = r ? r.height :
|
|
8012
|
+
x = r ? r.width : Kt(n.width) - b - w,
|
|
8013
|
+
N = r ? r.height : Kt(n.height) - E - C,
|
|
8014
8014
|
k = x + h + w + g,
|
|
8015
8015
|
O = N + v + C + y,
|
|
8016
8016
|
D = Object.freeze({
|
|
8017
|
-
devicePixelContentBoxSize:
|
|
8018
|
-
borderBoxSize:
|
|
8019
|
-
contentBoxSize:
|
|
8017
|
+
devicePixelContentBoxSize: Jt(Math.round(x * devicePixelRatio), Math.round(N * devicePixelRatio), i),
|
|
8018
|
+
borderBoxSize: Jt(k, O, i),
|
|
8019
|
+
contentBoxSize: Jt(x, N, i),
|
|
8020
8020
|
contentRect: new qt(m, c, x, N)
|
|
8021
8021
|
});
|
|
8022
8022
|
|
|
@@ -8573,17 +8573,12 @@ function jn(e) {
|
|
|
8573
8573
|
}
|
|
8574
8574
|
|
|
8575
8575
|
function zn() {
|
|
8576
|
-
var e,
|
|
8577
|
-
t,
|
|
8578
|
-
n
|
|
8579
|
-
|
|
8580
|
-
a = (e = useState(0), t = _slicedToArray(e, 2), n = t[0], r = t[1], function () {
|
|
8581
|
-
return r(n + 1);
|
|
8582
|
-
}),
|
|
8583
|
-
i = useCallback(function (e) {
|
|
8584
|
-
i.current = e, a();
|
|
8576
|
+
var e = useState(),
|
|
8577
|
+
t = _slicedToArray(e, 2)[1],
|
|
8578
|
+
n = useCallback(function (e) {
|
|
8579
|
+
n.current = e, t(e);
|
|
8585
8580
|
}, []);
|
|
8586
|
-
return
|
|
8581
|
+
return n;
|
|
8587
8582
|
}
|
|
8588
8583
|
|
|
8589
8584
|
function An(e, t) {
|
|
@@ -8763,7 +8758,7 @@ function Xn(e) {
|
|
|
8763
8758
|
return t.setSeconds(0, 0), 6e4 * n + (n > 0 ? (6e4 + _n(t)) % 6e4 : _n(t));
|
|
8764
8759
|
}
|
|
8765
8760
|
|
|
8766
|
-
function
|
|
8761
|
+
function Jn(e) {
|
|
8767
8762
|
Zn(1, arguments);
|
|
8768
8763
|
var t = Fn(e);
|
|
8769
8764
|
return !isNaN(t);
|
|
@@ -10013,7 +10008,7 @@ function Yr(e, t, n) {
|
|
|
10013
10008
|
if (!i.localize) throw new RangeError("locale must contain localize property");
|
|
10014
10009
|
if (!i.formatLong) throw new RangeError("locale must contain formatLong property");
|
|
10015
10010
|
var p = Fn(e);
|
|
10016
|
-
if (!
|
|
10011
|
+
if (!Jn(p)) throw new RangeError("Invalid time value");
|
|
10017
10012
|
var d = Xn(p),
|
|
10018
10013
|
f = sr(p, d),
|
|
10019
10014
|
h = {
|
|
@@ -10759,83 +10754,74 @@ function Na(e) {
|
|
|
10759
10754
|
}
|
|
10760
10755
|
|
|
10761
10756
|
function ka(e) {
|
|
10762
|
-
var t = e.
|
|
10763
|
-
n = e.
|
|
10764
|
-
r = e.
|
|
10765
|
-
a = e.
|
|
10766
|
-
i = e.
|
|
10767
|
-
o = e.
|
|
10768
|
-
s = e.
|
|
10769
|
-
c =
|
|
10770
|
-
l =
|
|
10771
|
-
u =
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10757
|
+
var t = e.autoFocus,
|
|
10758
|
+
n = e.className,
|
|
10759
|
+
r = e.onMouseEnter,
|
|
10760
|
+
a = e.onSelect,
|
|
10761
|
+
i = e.option,
|
|
10762
|
+
o = e.selected,
|
|
10763
|
+
s = e.tabIndex,
|
|
10764
|
+
c = zn(),
|
|
10765
|
+
l = Pe("option", n),
|
|
10766
|
+
u = _slicedToArray(l, 2),
|
|
10767
|
+
m = u[0],
|
|
10768
|
+
p = u[1];
|
|
10769
|
+
zt(c, t);
|
|
10770
|
+
return x.createElement("li", {
|
|
10771
|
+
"aria-label": "object" !== _typeof(i.label) ? i.label : i.value,
|
|
10772
|
+
"aria-selected": o === i.value,
|
|
10773
|
+
className: m,
|
|
10774
|
+
key: i.value,
|
|
10777
10775
|
role: "option",
|
|
10778
|
-
ref:
|
|
10779
|
-
onClick:
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10776
|
+
ref: c,
|
|
10777
|
+
onClick: function () {
|
|
10778
|
+
return a(i, !1);
|
|
10779
|
+
},
|
|
10780
|
+
onKeyDown: function (e) {
|
|
10781
|
+
var t;
|
|
10782
|
+
"ArrowUp" === e.key ? t = c.current.previousElementSibling : "ArrowDown" === e.key ? t = c.current.nextElementSibling : "Enter" === e.key && a(i, !0), t && t.focus();
|
|
10783
|
+
},
|
|
10784
|
+
onMouseEnter: r,
|
|
10785
|
+
tabIndex: s,
|
|
10786
|
+
title: "object" !== _typeof(i.label) ? i.label : void 0
|
|
10787
|
+
}, i.icon && x.createElement(It, {
|
|
10788
|
+
name: i.icon
|
|
10786
10789
|
}), x.createElement("span", {
|
|
10787
|
-
className:
|
|
10788
|
-
},
|
|
10789
|
-
className: De(
|
|
10790
|
+
className: p("label")
|
|
10791
|
+
}, i.label), o && x.createElement(It, {
|
|
10792
|
+
className: De(p("check"), _defineProperty({}, p("check--invisible"), o !== i.value)),
|
|
10790
10793
|
size: 16,
|
|
10791
10794
|
name: "check"
|
|
10792
10795
|
}));
|
|
10793
10796
|
}
|
|
10794
10797
|
|
|
10795
10798
|
function Oa(e) {
|
|
10796
|
-
var t = e.
|
|
10797
|
-
n = e.
|
|
10798
|
-
r = e.
|
|
10799
|
-
a = e.
|
|
10799
|
+
var t = e.className,
|
|
10800
|
+
n = e.onBlur,
|
|
10801
|
+
r = e.onSelect,
|
|
10802
|
+
a = e.options,
|
|
10800
10803
|
i = e.selected,
|
|
10801
10804
|
o = e.tabIndex,
|
|
10802
|
-
s =
|
|
10803
|
-
c =
|
|
10804
|
-
l = c
|
|
10805
|
-
u =
|
|
10806
|
-
m =
|
|
10807
|
-
p = _slicedToArray(m, 2),
|
|
10808
|
-
d = p[0],
|
|
10809
|
-
f = p[1],
|
|
10810
|
-
h = function (e) {
|
|
10811
|
-
if ("ArrowUp" === e.key) {
|
|
10812
|
-
var n = (d + t.length - 1) % t.length;
|
|
10813
|
-
f(n);
|
|
10814
|
-
} else if ("ArrowDown" === e.key) {
|
|
10815
|
-
var i = (d + 1) % t.length;
|
|
10816
|
-
f(i);
|
|
10817
|
-
} else "Enter" === e.key ? a(t[d]) : "Tab" === e.key && r();
|
|
10818
|
-
};
|
|
10819
|
-
|
|
10805
|
+
s = e.withKey,
|
|
10806
|
+
c = Pe("options-list", t),
|
|
10807
|
+
l = _slicedToArray(c, 2),
|
|
10808
|
+
u = l[0],
|
|
10809
|
+
m = l[1];
|
|
10820
10810
|
return x.createElement("div", {
|
|
10821
|
-
className:
|
|
10811
|
+
className: u
|
|
10822
10812
|
}, x.createElement("ul", {
|
|
10823
10813
|
role: "menu",
|
|
10824
|
-
className:
|
|
10825
|
-
tabIndex: o
|
|
10826
|
-
|
|
10814
|
+
className: m("list"),
|
|
10815
|
+
tabIndex: o,
|
|
10816
|
+
onKeyDown: function (e) {
|
|
10817
|
+
"Tab" === e.key && n();
|
|
10818
|
+
}
|
|
10819
|
+
}, a.map(function (e, t) {
|
|
10827
10820
|
return x.createElement(ka, {
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
onMouseEnter: function () {
|
|
10832
|
-
return f(t);
|
|
10833
|
-
},
|
|
10834
|
-
onSelect: function () {
|
|
10835
|
-
return a(e);
|
|
10836
|
-
},
|
|
10821
|
+
key: e.value,
|
|
10822
|
+
autoFocus: s && (e.value === i || 0 === t),
|
|
10823
|
+
onSelect: r,
|
|
10837
10824
|
option: e,
|
|
10838
|
-
sc: u,
|
|
10839
10825
|
selected: i,
|
|
10840
10826
|
tabIndex: o
|
|
10841
10827
|
});
|
|
@@ -10852,7 +10838,7 @@ function Da(e) {
|
|
|
10852
10838
|
s = e.tooltip,
|
|
10853
10839
|
c = e.ariaLabel,
|
|
10854
10840
|
l = e.tabIndex,
|
|
10855
|
-
u = useState(
|
|
10841
|
+
u = useState(void 0),
|
|
10856
10842
|
m = _slicedToArray(u, 2),
|
|
10857
10843
|
p = m[0],
|
|
10858
10844
|
d = m[1],
|
|
@@ -10865,11 +10851,14 @@ function Da(e) {
|
|
|
10865
10851
|
y = null == a || null === (t = a.find(function (e) {
|
|
10866
10852
|
return e.value === r;
|
|
10867
10853
|
})) || void 0 === t ? void 0 : t.label,
|
|
10868
|
-
C =
|
|
10869
|
-
o || d(!p);
|
|
10870
|
-
},
|
|
10854
|
+
C = zn(),
|
|
10871
10855
|
w = function () {
|
|
10872
|
-
return d(
|
|
10856
|
+
return d(void 0);
|
|
10857
|
+
},
|
|
10858
|
+
E = function (e) {
|
|
10859
|
+
return d({
|
|
10860
|
+
withKey: e
|
|
10861
|
+
});
|
|
10873
10862
|
};
|
|
10874
10863
|
|
|
10875
10864
|
return useEffect(function () {
|
|
@@ -10883,15 +10872,21 @@ function Da(e) {
|
|
|
10883
10872
|
className: v
|
|
10884
10873
|
}, x.createElement("div", {
|
|
10885
10874
|
className: "".concat(g("selected-option"), " ").concat(p ? g("expanded") : ""),
|
|
10886
|
-
onClick:
|
|
10875
|
+
onClick: function () {
|
|
10876
|
+
return e = !1, void (o || d(p ? void 0 : {
|
|
10877
|
+
withKey: e
|
|
10878
|
+
}));
|
|
10879
|
+
var e;
|
|
10880
|
+
},
|
|
10887
10881
|
"aria-hidden": "true",
|
|
10888
10882
|
role: "button",
|
|
10889
10883
|
tabIndex: l,
|
|
10890
10884
|
title: s,
|
|
10891
10885
|
"aria-label": "".concat(y ? "".concat(y, ". ") : "").concat(c),
|
|
10892
10886
|
onKeyDown: function (e) {
|
|
10893
|
-
"Enter" !== e.key && " " !== e.key || e.target !== e.currentTarget
|
|
10894
|
-
}
|
|
10887
|
+
"Enter" !== e.key && " " !== e.key || e.target !== e.currentTarget ? "Tab" === e.key ? w() : "ArrowDown" !== e.key && "ArrowUp" !== e.key || E(!0) : E(!0);
|
|
10888
|
+
},
|
|
10889
|
+
ref: C
|
|
10895
10890
|
}, x.createElement("span", {
|
|
10896
10891
|
className: g("label")
|
|
10897
10892
|
}, y || r), x.createElement(It, {
|
|
@@ -10901,10 +10896,9 @@ function Da(e) {
|
|
|
10901
10896
|
className: g("options-list"),
|
|
10902
10897
|
options: a,
|
|
10903
10898
|
onSelect: function (e) {
|
|
10904
|
-
|
|
10905
|
-
d(!1), i(e.value);
|
|
10906
|
-
}(e);
|
|
10899
|
+
w(), i(e.value), C.current.focus();
|
|
10907
10900
|
},
|
|
10901
|
+
withKey: p.withKey,
|
|
10908
10902
|
selected: r,
|
|
10909
10903
|
tabIndex: l,
|
|
10910
10904
|
onBlur: w
|
|
@@ -10926,7 +10920,7 @@ Ca.propTypes = {
|
|
|
10926
10920
|
children: T.node.isRequired,
|
|
10927
10921
|
className: T.string,
|
|
10928
10922
|
isDisabled: T.bool,
|
|
10929
|
-
onClick: T.func
|
|
10923
|
+
onClick: T.func,
|
|
10930
10924
|
pressed: T.bool,
|
|
10931
10925
|
style: T.shape(),
|
|
10932
10926
|
size: T.oneOfType([T.number, T.string]),
|
|
@@ -10938,6 +10932,7 @@ Ca.propTypes = {
|
|
|
10938
10932
|
autoFocus: !1,
|
|
10939
10933
|
className: "",
|
|
10940
10934
|
isDisabled: !1,
|
|
10935
|
+
onClick: void 0,
|
|
10941
10936
|
pressed: !1,
|
|
10942
10937
|
style: {},
|
|
10943
10938
|
size: 32,
|
|
@@ -10989,43 +10984,41 @@ Ca.propTypes = {
|
|
|
10989
10984
|
ariaLabel: void 0
|
|
10990
10985
|
}, ka.propTypes = {
|
|
10991
10986
|
className: T.string,
|
|
10992
|
-
|
|
10993
|
-
onKeyDown: T.func,
|
|
10987
|
+
autoFocus: T.bool,
|
|
10994
10988
|
onMouseEnter: T.func,
|
|
10995
10989
|
onSelect: T.func.isRequired,
|
|
10996
|
-
option: T.
|
|
10990
|
+
option: T.shape({
|
|
10997
10991
|
value: T.string,
|
|
10998
10992
|
label: T.node,
|
|
10999
10993
|
icon: T.string
|
|
11000
|
-
})
|
|
11001
|
-
sc: T.func,
|
|
10994
|
+
}).isRequired,
|
|
11002
10995
|
selected: T.string,
|
|
11003
10996
|
tabIndex: T.number
|
|
11004
10997
|
}, ka.defaultProps = {
|
|
11005
10998
|
className: "",
|
|
11006
|
-
|
|
11007
|
-
onKeyDown: void 0,
|
|
10999
|
+
autoFocus: void 0,
|
|
11008
11000
|
onMouseEnter: void 0,
|
|
11009
|
-
sc: void 0,
|
|
11010
11001
|
selected: void 0,
|
|
11011
11002
|
tabIndex: void 0
|
|
11012
11003
|
}, Oa.propTypes = {
|
|
11013
11004
|
className: T.string,
|
|
11014
11005
|
onBlur: T.func,
|
|
11006
|
+
onSelect: T.func.isRequired,
|
|
11015
11007
|
options: T.arrayOf(T.shape({
|
|
11016
11008
|
value: T.string,
|
|
11017
11009
|
label: T.node,
|
|
11018
11010
|
icon: T.string
|
|
11019
11011
|
})),
|
|
11020
|
-
onSelect: T.func.isRequired,
|
|
11021
11012
|
selected: T.string,
|
|
11022
|
-
tabIndex: T.number
|
|
11013
|
+
tabIndex: T.number,
|
|
11014
|
+
withKey: T.bool
|
|
11023
11015
|
}, Oa.defaultProps = {
|
|
11024
11016
|
className: "",
|
|
11025
11017
|
onBlur: void 0,
|
|
11026
11018
|
options: [],
|
|
11027
11019
|
selected: "",
|
|
11028
|
-
tabIndex: void 0
|
|
11020
|
+
tabIndex: void 0,
|
|
11021
|
+
withKey: !1
|
|
11029
11022
|
}, Da.propTypes = {
|
|
11030
11023
|
className: T.string,
|
|
11031
11024
|
value: T.string,
|
|
@@ -11236,89 +11229,95 @@ var Ia = function (e) {
|
|
|
11236
11229
|
};
|
|
11237
11230
|
|
|
11238
11231
|
function Sa(e) {
|
|
11239
|
-
for (var t = e.className, n = e.collapseRangeStart, r = e.collapseRangeEnd, a = e.controls, i = e.meetingID, o = e.style, s = e.tabIndexes, c = useContext(Rt).meetingsAdapter, l = Dn(i).state, u = zn(), m = zn(), p = En(u).width,
|
|
11240
|
-
var
|
|
11241
|
-
|
|
11242
|
-
J = En(
|
|
11243
|
-
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
Z[G] = Q && _, F[G] = Q && X, W[G] = Q && J + 10, Y[G] = Q && K + 10;
|
|
11232
|
+
for (var t = e.className, n = e.collapseRangeStart, r = e.collapseRangeEnd, a = e.controls, i = e.meetingID, o = e.style, s = e.tabIndexes, c = useContext(Rt).meetingsAdapter, l = Dn(i).state, u = zn(), m = zn(), p = zn(), d = En(u).width, f = En(p).width, h = l === V, v = Pe("meeting-control-bar", t), g = _slicedToArray(v, 2), y = g[0], C = g[1], w = a(h), D = s(h), M = w.length, T = useState(), P = _slicedToArray(T, 2), L = P[0], I = P[1], S = useState([0, 0]), R = _slicedToArray(S, 2), j = _slicedToArray(R[0], 2), z = j[0], A = j[1], B = R[1], H = useState(void 0), q = _slicedToArray(H, 2), U = q[0], Z = q[1], F = [], W = [], Y = [], G = [], _ = 0; _ < 20; _ += 1) {
|
|
11233
|
+
var X = zn(),
|
|
11234
|
+
K = zn(),
|
|
11235
|
+
J = En(X).width,
|
|
11236
|
+
Q = En(K).width,
|
|
11237
|
+
$ = _ < M;
|
|
11238
|
+
F[_] = $ && X, W[_] = $ && K, Y[_] = $ && J + 10, G[_] = $ && Q + 10;
|
|
11247
11239
|
}
|
|
11248
11240
|
|
|
11241
|
+
var ee = function () {
|
|
11242
|
+
return Z(void 0);
|
|
11243
|
+
};
|
|
11244
|
+
|
|
11249
11245
|
useEffect(function () {
|
|
11250
|
-
if (
|
|
11251
|
-
for (var e =
|
|
11246
|
+
if (Y.splice(M), G.splice(M), d && f && Y.every(Ia) && G.every(Ia)) {
|
|
11247
|
+
for (var e = G.reduce(function (e, t) {
|
|
11252
11248
|
return e + t;
|
|
11253
|
-
}, 0), t =
|
|
11249
|
+
}, 0), t = G.map(function () {
|
|
11254
11250
|
return !0;
|
|
11255
|
-
}), a =
|
|
11251
|
+
}), a = M - 1; a >= 0 && e > d; a -= 1) e -= G[a] - Y[a], t[a] = !1;
|
|
11256
11252
|
|
|
11257
|
-
if (
|
|
11258
|
-
var i = (n +
|
|
11259
|
-
o = (r +
|
|
11260
|
-
e +=
|
|
11253
|
+
if (I(t), e <= d) B([0, 0]), ee();else {
|
|
11254
|
+
var i = (n + M) % M,
|
|
11255
|
+
o = (r + M) % M;
|
|
11256
|
+
e += f + 10;
|
|
11261
11257
|
|
|
11262
|
-
for (var s = o, c = o - 1; c >= i && e >
|
|
11258
|
+
for (var s = o, c = o - 1; c >= i && e > d; c -= 1) e -= Y[c], s = c;
|
|
11263
11259
|
|
|
11264
|
-
|
|
11260
|
+
B([s, o]);
|
|
11265
11261
|
}
|
|
11266
11262
|
}
|
|
11267
|
-
}, [
|
|
11263
|
+
}, [d, f, n, r, M].concat(Y, G));
|
|
11268
11264
|
|
|
11269
|
-
var
|
|
11270
|
-
|
|
11265
|
+
var te,
|
|
11266
|
+
ne = function (e, t) {
|
|
11271
11267
|
return function (e, t) {
|
|
11272
|
-
return Array(t - e).fill().map(function (t, n) {
|
|
11268
|
+
return Array(Math.max(0, t - e)).fill().map(function (t, n) {
|
|
11273
11269
|
return e + n;
|
|
11274
11270
|
});
|
|
11275
11271
|
}(e, t).map(function (e) {
|
|
11276
11272
|
return x.createElement(La, {
|
|
11277
|
-
key:
|
|
11278
|
-
type:
|
|
11273
|
+
key: w[e],
|
|
11274
|
+
type: w[e],
|
|
11279
11275
|
meetingID: i,
|
|
11280
|
-
showText:
|
|
11281
|
-
autoFocus:
|
|
11282
|
-
tabIndex:
|
|
11276
|
+
showText: L[e],
|
|
11277
|
+
autoFocus: D[e] === Math.min.apply(Math, _toConsumableArray(D)) || !1,
|
|
11278
|
+
tabIndex: D[e]
|
|
11283
11279
|
});
|
|
11284
11280
|
});
|
|
11285
11281
|
},
|
|
11286
|
-
|
|
11287
|
-
return U(!q);
|
|
11288
|
-
},
|
|
11289
|
-
ne = function (e, t, n, r) {
|
|
11282
|
+
re = function (e, t, n, r) {
|
|
11290
11283
|
return x.createElement("div", {
|
|
11291
11284
|
ref: n,
|
|
11292
11285
|
key: "collapse-button",
|
|
11293
|
-
className:
|
|
11286
|
+
className: C("collapse-button")
|
|
11294
11287
|
}, x.createElement(Ea, {
|
|
11295
11288
|
onClick: t,
|
|
11296
11289
|
type: "toggle",
|
|
11297
11290
|
size: 48,
|
|
11298
|
-
pressed: e,
|
|
11291
|
+
pressed: !!e,
|
|
11299
11292
|
tabIndex: r,
|
|
11300
11293
|
tooltip: "More options",
|
|
11301
11294
|
ariaLabel: e ? "Collapse additional controls" : "Expand additional controls"
|
|
11302
11295
|
}, x.createElement(It, {
|
|
11303
11296
|
name: e ? "more-adr" : "more"
|
|
11304
11297
|
})));
|
|
11305
|
-
},
|
|
11306
|
-
re = function () {
|
|
11307
|
-
return U(!1);
|
|
11308
11298
|
};
|
|
11309
11299
|
|
|
11310
11300
|
return useEffect(function () {
|
|
11311
11301
|
var e;
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11302
|
+
|
|
11303
|
+
if (U) {
|
|
11304
|
+
var t = function () {
|
|
11305
|
+
return ee();
|
|
11306
|
+
};
|
|
11307
|
+
|
|
11308
|
+
setTimeout(function () {
|
|
11309
|
+
return document.addEventListener("click", t);
|
|
11310
|
+
}), e = function () {
|
|
11311
|
+
return document.removeEventListener("click", t);
|
|
11312
|
+
};
|
|
11313
|
+
}
|
|
11314
|
+
|
|
11315
|
+
return e;
|
|
11316
|
+
}, [U]), x.createElement("div", {
|
|
11318
11317
|
ref: u,
|
|
11319
|
-
className:
|
|
11318
|
+
className: y,
|
|
11320
11319
|
style: o
|
|
11321
|
-
},
|
|
11320
|
+
}, U && (te = w.slice(z, A).map(function (e) {
|
|
11322
11321
|
return {
|
|
11323
11322
|
value: e,
|
|
11324
11323
|
label: x.createElement(La, {
|
|
@@ -11329,36 +11328,45 @@ function Sa(e) {
|
|
|
11329
11328
|
})
|
|
11330
11329
|
};
|
|
11331
11330
|
}), x.createElement(Oa, {
|
|
11332
|
-
className:
|
|
11333
|
-
options:
|
|
11331
|
+
className: C("collapsed-controls"),
|
|
11332
|
+
options: te,
|
|
11334
11333
|
onSelect: function (e) {
|
|
11335
|
-
c.meetingControls[e.value].action(i),
|
|
11334
|
+
c.meetingControls[e.value].action(i), ee(), m.current.focus();
|
|
11336
11335
|
},
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
}
|
|
11341
|
-
className:
|
|
11336
|
+
onBlur: ee,
|
|
11337
|
+
withKey: U.withKey,
|
|
11338
|
+
tabIndex: D[z]
|
|
11339
|
+
})), L && x.createElement("div", {
|
|
11340
|
+
className: C("controls")
|
|
11341
|
+
}, ne(0, z), z < A && re(U, function (e) {
|
|
11342
|
+
return t = !e.detail, void Z(function (e) {
|
|
11343
|
+
return e ? void 0 : {
|
|
11344
|
+
withKey: t
|
|
11345
|
+
};
|
|
11346
|
+
});
|
|
11347
|
+
var t;
|
|
11348
|
+
}, m, D[z]), ne(A, M)), x.createElement("div", {
|
|
11349
|
+
className: "".concat(C("controls"), " ").concat(C("controls--control-refs")),
|
|
11342
11350
|
"aria-hidden": "true"
|
|
11343
|
-
},
|
|
11351
|
+
}, w.map(function (e, t) {
|
|
11344
11352
|
return x.createElement(x.Fragment, {
|
|
11345
11353
|
key: e
|
|
11346
11354
|
}, x.createElement("div", {
|
|
11347
|
-
ref:
|
|
11355
|
+
ref: F[t],
|
|
11348
11356
|
key: "icon"
|
|
11349
11357
|
}, x.createElement(La, {
|
|
11350
11358
|
type: e,
|
|
11351
11359
|
meetingID: i,
|
|
11352
11360
|
showText: !1
|
|
11353
11361
|
})), x.createElement("div", {
|
|
11354
|
-
ref:
|
|
11362
|
+
ref: W[t],
|
|
11355
11363
|
key: "text"
|
|
11356
11364
|
}, x.createElement(La, {
|
|
11357
11365
|
type: e,
|
|
11358
11366
|
meetingID: i,
|
|
11359
11367
|
showText: !0
|
|
11360
11368
|
})));
|
|
11361
|
-
}),
|
|
11369
|
+
}), re(U, function () {}, p)));
|
|
11362
11370
|
}
|
|
11363
11371
|
|
|
11364
11372
|
Sa.propTypes = {
|
|
@@ -11741,7 +11749,9 @@ function Ya(e) {
|
|
|
11741
11749
|
m = l[1],
|
|
11742
11750
|
p = (i || []).findIndex(function (e) {
|
|
11743
11751
|
return e.key === r;
|
|
11744
|
-
})
|
|
11752
|
+
}),
|
|
11753
|
+
d = zn();
|
|
11754
|
+
zt(d, !0);
|
|
11745
11755
|
return x.createElement("div", {
|
|
11746
11756
|
className: u,
|
|
11747
11757
|
style: a
|
|
@@ -11758,7 +11768,8 @@ function Ya(e) {
|
|
|
11758
11768
|
}
|
|
11759
11769
|
},
|
|
11760
11770
|
"aria-label": "Use arrow keys to navigate between setting options",
|
|
11761
|
-
role: "tablist"
|
|
11771
|
+
role: "tablist",
|
|
11772
|
+
ref: d
|
|
11762
11773
|
}, i.map(function (e, t) {
|
|
11763
11774
|
return x.createElement("li", {
|
|
11764
11775
|
className: De(m("tab"), r === e.key && m("tab--active")),
|
|
@@ -11856,7 +11867,7 @@ var Ga = Pe("no-media"),
|
|
|
11856
11867
|
}
|
|
11857
11868
|
};
|
|
11858
11869
|
|
|
11859
|
-
function
|
|
11870
|
+
function Ka(e) {
|
|
11860
11871
|
var t = e.className,
|
|
11861
11872
|
n = e.style,
|
|
11862
11873
|
r = e.media,
|
|
@@ -11877,7 +11888,7 @@ function Ja(e) {
|
|
|
11877
11888
|
}, o.message));
|
|
11878
11889
|
}
|
|
11879
11890
|
|
|
11880
|
-
function
|
|
11891
|
+
function Ja(e) {
|
|
11881
11892
|
var t,
|
|
11882
11893
|
n = e.className,
|
|
11883
11894
|
r = e.meetingID,
|
|
@@ -11903,7 +11914,7 @@ function Ka(e) {
|
|
|
11903
11914
|
type: "switch-microphone",
|
|
11904
11915
|
meetingID: r,
|
|
11905
11916
|
tabIndex: 103
|
|
11906
|
-
})) : x.createElement(
|
|
11917
|
+
})) : x.createElement(Ka, {
|
|
11907
11918
|
media: "microphone",
|
|
11908
11919
|
className: c("no-media")
|
|
11909
11920
|
}));
|
|
@@ -11936,7 +11947,7 @@ function Qa(e) {
|
|
|
11936
11947
|
meetingID: n
|
|
11937
11948
|
}), x.createElement(oa, {
|
|
11938
11949
|
type: "bottom"
|
|
11939
|
-
}, "Preview"))) : x.createElement(
|
|
11950
|
+
}, "Preview"))) : x.createElement(Ka, {
|
|
11940
11951
|
media: "camera",
|
|
11941
11952
|
className: c("no-media")
|
|
11942
11953
|
}));
|
|
@@ -11956,7 +11967,7 @@ function $a(e) {
|
|
|
11956
11967
|
key: "audio",
|
|
11957
11968
|
heading: "Audio",
|
|
11958
11969
|
content: function () {
|
|
11959
|
-
return x.createElement(
|
|
11970
|
+
return x.createElement(Ja, {
|
|
11960
11971
|
meetingID: t
|
|
11961
11972
|
});
|
|
11962
11973
|
},
|
|
@@ -12249,18 +12260,18 @@ function ii(e, t) {
|
|
|
12249
12260
|
return n.displayName = "WithAdapter(".concat((r = e).displayName || r.name || "Component", ")"), n;
|
|
12250
12261
|
}
|
|
12251
12262
|
|
|
12252
|
-
|
|
12263
|
+
Ka.propTypes = {
|
|
12253
12264
|
className: T.string,
|
|
12254
12265
|
style: T.shape(),
|
|
12255
12266
|
media: T.oneOf(["camera", "microphone"]).isRequired
|
|
12256
|
-
},
|
|
12267
|
+
}, Ka.defaultProps = {
|
|
12257
12268
|
className: void 0,
|
|
12258
12269
|
style: void 0
|
|
12259
|
-
},
|
|
12270
|
+
}, Ja.propTypes = {
|
|
12260
12271
|
className: T.string,
|
|
12261
12272
|
meetingID: T.string.isRequired,
|
|
12262
12273
|
style: T.shape()
|
|
12263
|
-
},
|
|
12274
|
+
}, Ja.defaultProps = {
|
|
12264
12275
|
className: "",
|
|
12265
12276
|
style: void 0
|
|
12266
12277
|
}, Qa.propTypes = {
|
|
@@ -12822,38 +12833,54 @@ class AudioControl extends MeetingControl {
|
|
|
12822
12833
|
logger.debug('MEETING', meetingID, 'AudioControl::display()', ['called with', {
|
|
12823
12834
|
meetingID
|
|
12824
12835
|
}]);
|
|
12825
|
-
const
|
|
12836
|
+
const common = {
|
|
12826
12837
|
ID: this.ID,
|
|
12827
|
-
type: 'BUTTON'
|
|
12828
|
-
icon: 'microphone-muted',
|
|
12829
|
-
tooltip: 'Unmute audio',
|
|
12830
|
-
state: i.ACTIVE,
|
|
12831
|
-
text: 'Unmute'
|
|
12832
|
-
};
|
|
12833
|
-
const unmuted = {
|
|
12834
|
-
ID: this.ID,
|
|
12835
|
-
type: 'BUTTON',
|
|
12836
|
-
icon: 'microphone',
|
|
12837
|
-
tooltip: 'Mute audio',
|
|
12838
|
-
state: i.INACTIVE,
|
|
12839
|
-
text: 'Mute'
|
|
12838
|
+
type: 'BUTTON'
|
|
12840
12839
|
};
|
|
12841
|
-
const
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
|
|
12846
|
-
|
|
12840
|
+
const STATES = {
|
|
12841
|
+
muted: {
|
|
12842
|
+
icon: 'microphone-muted',
|
|
12843
|
+
tooltip: 'Unmute audio',
|
|
12844
|
+
state: i.ACTIVE,
|
|
12845
|
+
text: 'Unmute'
|
|
12846
|
+
},
|
|
12847
|
+
unmuted: {
|
|
12848
|
+
icon: 'microphone',
|
|
12849
|
+
tooltip: 'Mute audio',
|
|
12850
|
+
state: i.INACTIVE,
|
|
12851
|
+
text: 'Mute'
|
|
12852
|
+
},
|
|
12853
|
+
muting: {
|
|
12854
|
+
icon: 'microphone',
|
|
12855
|
+
tooltip: 'Muting audio',
|
|
12856
|
+
state: i.DISABLED,
|
|
12857
|
+
text: 'Muting...'
|
|
12858
|
+
},
|
|
12859
|
+
unmuting: {
|
|
12860
|
+
icon: 'microphone-muted',
|
|
12861
|
+
tooltip: 'Unmuting audio',
|
|
12862
|
+
state: i.DISABLED,
|
|
12863
|
+
text: 'Unmuting...'
|
|
12864
|
+
},
|
|
12865
|
+
noMicrophone: {
|
|
12866
|
+
icon: 'microphone-muted',
|
|
12867
|
+
tooltip: 'No microphone available',
|
|
12868
|
+
state: i.DISABLED,
|
|
12869
|
+
text: 'No microphone'
|
|
12870
|
+
}
|
|
12847
12871
|
};
|
|
12848
12872
|
return this.adapter.getMeeting(meetingID).pipe(map(_ref => {
|
|
12849
12873
|
let {
|
|
12850
12874
|
localAudio: {
|
|
12851
|
-
stream
|
|
12875
|
+
stream,
|
|
12876
|
+
muting
|
|
12852
12877
|
},
|
|
12853
12878
|
disabledLocalAudio
|
|
12854
12879
|
} = _ref;
|
|
12855
|
-
return stream && unmuted || disabledLocalAudio && muted ||
|
|
12856
|
-
}), distinctUntilChanged(),
|
|
12880
|
+
return muting === true && STATES.muting || muting === false && STATES.unmuting || stream && STATES.unmuted || disabledLocalAudio && STATES.muted || STATES.noMicrophone;
|
|
12881
|
+
}), distinctUntilChanged(), map(state => ({ ...common,
|
|
12882
|
+
...state
|
|
12883
|
+
})), tap(display => logger.debug('MEETING', meetingID, 'AudioControl::display()', ['emitting', display])));
|
|
12857
12884
|
}
|
|
12858
12885
|
|
|
12859
12886
|
}
|
|
@@ -13394,38 +13421,54 @@ class VideoControl extends MeetingControl {
|
|
|
13394
13421
|
logger.debug('MEETING', meetingID, 'VideoControl::display()', ['called with', {
|
|
13395
13422
|
meetingID
|
|
13396
13423
|
}]);
|
|
13397
|
-
const
|
|
13424
|
+
const common = {
|
|
13398
13425
|
ID: this.ID,
|
|
13399
|
-
type: 'BUTTON'
|
|
13400
|
-
icon: 'camera-muted',
|
|
13401
|
-
tooltip: 'Start video',
|
|
13402
|
-
state: i.ACTIVE,
|
|
13403
|
-
text: 'Start video'
|
|
13426
|
+
type: 'BUTTON'
|
|
13404
13427
|
};
|
|
13405
|
-
const
|
|
13406
|
-
|
|
13407
|
-
|
|
13408
|
-
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
|
|
13412
|
-
|
|
13413
|
-
|
|
13414
|
-
|
|
13415
|
-
|
|
13416
|
-
|
|
13417
|
-
|
|
13418
|
-
|
|
13428
|
+
const STATES = {
|
|
13429
|
+
muted: {
|
|
13430
|
+
icon: 'camera-muted',
|
|
13431
|
+
tooltip: 'Start video',
|
|
13432
|
+
state: i.ACTIVE,
|
|
13433
|
+
text: 'Start video'
|
|
13434
|
+
},
|
|
13435
|
+
unmuted: {
|
|
13436
|
+
icon: 'camera',
|
|
13437
|
+
tooltip: 'Stop video',
|
|
13438
|
+
state: i.INACTIVE,
|
|
13439
|
+
text: 'Stop video'
|
|
13440
|
+
},
|
|
13441
|
+
muting: {
|
|
13442
|
+
icon: 'camera',
|
|
13443
|
+
tooltip: 'Stopping video',
|
|
13444
|
+
state: i.DISABLED,
|
|
13445
|
+
text: 'Stopping...'
|
|
13446
|
+
},
|
|
13447
|
+
unmuting: {
|
|
13448
|
+
icon: 'camera-muted',
|
|
13449
|
+
tooltip: 'Starting video',
|
|
13450
|
+
state: i.DISABLED,
|
|
13451
|
+
text: 'Starting...'
|
|
13452
|
+
},
|
|
13453
|
+
noCamera: {
|
|
13454
|
+
icon: 'camera-muted',
|
|
13455
|
+
tooltip: 'No camera available',
|
|
13456
|
+
state: i.DISABLED,
|
|
13457
|
+
text: 'No camera'
|
|
13458
|
+
}
|
|
13419
13459
|
};
|
|
13420
13460
|
return this.adapter.getMeeting(meetingID).pipe(map(_ref => {
|
|
13421
13461
|
let {
|
|
13422
13462
|
localVideo: {
|
|
13423
|
-
stream
|
|
13463
|
+
stream,
|
|
13464
|
+
muting
|
|
13424
13465
|
},
|
|
13425
13466
|
disabledLocalVideo
|
|
13426
13467
|
} = _ref;
|
|
13427
|
-
return stream && unmuted || disabledLocalVideo && muted ||
|
|
13428
|
-
}), distinctUntilChanged(),
|
|
13468
|
+
return muting === true && STATES.muting || muting === false && STATES.unmuting || stream && STATES.unmuted || disabledLocalVideo && STATES.muted || STATES.noCamera;
|
|
13469
|
+
}), distinctUntilChanged(), map(state => ({ ...common,
|
|
13470
|
+
...state
|
|
13471
|
+
})), tap(display => logger.debug('MEETING', meetingID, 'VideoControl::display()', ['emitting', display])));
|
|
13429
13472
|
}
|
|
13430
13473
|
|
|
13431
13474
|
}
|
|
@@ -14055,13 +14098,12 @@ class MeetingsSDKAdapter extends d {
|
|
|
14055
14098
|
});
|
|
14056
14099
|
logger.info('MEETING', ID, 'JOIN', 'Joining meeting');
|
|
14057
14100
|
} catch (error) {
|
|
14058
|
-
if (error.
|
|
14101
|
+
if (error.joinIntentRequired) {
|
|
14059
14102
|
logger.info('MEETING', ID, 'joinMeeting()', 'Meeting requires authentication');
|
|
14060
|
-
const opts = error.joinOptions || {};
|
|
14061
14103
|
this.updateMeeting(ID, () => ({
|
|
14062
14104
|
passwordRequired: true,
|
|
14063
|
-
invalidPassword: !!
|
|
14064
|
-
invalidHostKey: !!
|
|
14105
|
+
invalidPassword: !!options.password,
|
|
14106
|
+
invalidHostKey: !!options.hostKey
|
|
14065
14107
|
}));
|
|
14066
14108
|
} else {
|
|
14067
14109
|
logger.error('MEETING', ID, 'joinMeeting()', 'Unable to join', error);
|
|
@@ -14091,6 +14133,35 @@ class MeetingsSDKAdapter extends d {
|
|
|
14091
14133
|
logger.error('MEETING', ID, 'leaveMeeting()', 'Unable to leave', error);
|
|
14092
14134
|
}
|
|
14093
14135
|
}
|
|
14136
|
+
/**
|
|
14137
|
+
* Returns the status of the specified local media (audio or video) in the form of an object
|
|
14138
|
+
* with the following mutually exclusive boolean properties:
|
|
14139
|
+
* - `unmuted` - the media is unmuted
|
|
14140
|
+
* - `muted` - the media is muted
|
|
14141
|
+
* - `muting` - the media is currently being muted
|
|
14142
|
+
* - `unmuting` - the media is currently being unmuted
|
|
14143
|
+
* - `disabled` - the media is disabled (there is no available media device)
|
|
14144
|
+
*
|
|
14145
|
+
* @param {object} localMedia The local media object from the meeting
|
|
14146
|
+
* @param {MediaStream|null} disabledLocalMedia The disabled media stream
|
|
14147
|
+
* @returns {{muting: boolean}|{unmuting: boolean}|{unmuted: boolean}|{muted: boolean}|{disabled: boolean}} The local media state
|
|
14148
|
+
*/
|
|
14149
|
+
// eslint-disable-next-line class-methods-use-this
|
|
14150
|
+
|
|
14151
|
+
|
|
14152
|
+
getLocalMediaState(localMedia, disabledLocalMedia) {
|
|
14153
|
+
return localMedia.muting === true && {
|
|
14154
|
+
muting: true
|
|
14155
|
+
} || localMedia.muting === false && {
|
|
14156
|
+
unmuting: true
|
|
14157
|
+
} || localMedia.stream && {
|
|
14158
|
+
unmuted: true
|
|
14159
|
+
} || disabledLocalMedia && {
|
|
14160
|
+
muted: true
|
|
14161
|
+
} || {
|
|
14162
|
+
disabled: true
|
|
14163
|
+
};
|
|
14164
|
+
}
|
|
14094
14165
|
/**
|
|
14095
14166
|
* Attempts to mute the microphone of the given meeting ID.
|
|
14096
14167
|
* If the microphone is successfully muted, an audio mute event is dispatched.
|
|
@@ -14104,15 +14175,42 @@ class MeetingsSDKAdapter extends d {
|
|
|
14104
14175
|
logger.debug('MEETING', ID, 'handleLocalAudio()', ['called with', {
|
|
14105
14176
|
ID
|
|
14106
14177
|
}]);
|
|
14178
|
+
let state; // local audio state
|
|
14179
|
+
// sanity checks and "(un)muting in-progress" state
|
|
14180
|
+
|
|
14181
|
+
await this.updateMeeting(ID, meeting => {
|
|
14182
|
+
let updates;
|
|
14183
|
+
state = this.getLocalMediaState(meeting.localAudio, meeting.disabledLocalAudio);
|
|
14184
|
+
|
|
14185
|
+
if (state.disabled) {
|
|
14186
|
+
throw new Error('Can\'t mute/unmute disabled audio');
|
|
14187
|
+
} else if (state.muting) {
|
|
14188
|
+
throw new Error('Already muting audio');
|
|
14189
|
+
} else if (state.unmuting) {
|
|
14190
|
+
throw new Error('Already unmuting audio');
|
|
14191
|
+
} else if (state.unmuted) {
|
|
14192
|
+
updates = {
|
|
14193
|
+
localAudio: {
|
|
14194
|
+
muting: true
|
|
14195
|
+
}
|
|
14196
|
+
};
|
|
14197
|
+
} else if (state.muted) {
|
|
14198
|
+
updates = {
|
|
14199
|
+
localAudio: {
|
|
14200
|
+
muting: false
|
|
14201
|
+
}
|
|
14202
|
+
};
|
|
14203
|
+
}
|
|
14204
|
+
|
|
14205
|
+
return updates;
|
|
14206
|
+
});
|
|
14107
14207
|
|
|
14108
14208
|
try {
|
|
14109
14209
|
await this.updateMeeting(ID, async (meeting, sdkMeeting) => {
|
|
14110
14210
|
const isInSession = !!meeting.remoteAudio;
|
|
14111
|
-
const audioDisabled = !!this.meetings[ID].disabledLocalAudio;
|
|
14112
|
-
const audioEnabled = !!meeting.localAudio.stream;
|
|
14113
14211
|
let updates;
|
|
14114
14212
|
|
|
14115
|
-
if (
|
|
14213
|
+
if (state.unmuted) {
|
|
14116
14214
|
// Mute the audio only if there is an active meeting
|
|
14117
14215
|
if (isInSession) {
|
|
14118
14216
|
logger.debug('MEETING', ID, 'handleLocalAudio()', 'calling sdkMeeting.muteAudio()');
|
|
@@ -14124,10 +14222,11 @@ class MeetingsSDKAdapter extends d {
|
|
|
14124
14222
|
updates = {
|
|
14125
14223
|
disabledLocalAudio: meeting.localAudio.stream,
|
|
14126
14224
|
localAudio: {
|
|
14127
|
-
stream: null
|
|
14225
|
+
stream: null,
|
|
14226
|
+
muting: undefined
|
|
14128
14227
|
}
|
|
14129
14228
|
};
|
|
14130
|
-
} else if (
|
|
14229
|
+
} else if (state.muted) {
|
|
14131
14230
|
// Unmute the audio only if there is an active meeting
|
|
14132
14231
|
if (isInSession) {
|
|
14133
14232
|
logger.debug('MEETING', ID, 'handleLocalAudio()', 'calling sdkMeeting.unmuteAudio()');
|
|
@@ -14139,7 +14238,8 @@ class MeetingsSDKAdapter extends d {
|
|
|
14139
14238
|
updates = {
|
|
14140
14239
|
disabledLocalAudio: null,
|
|
14141
14240
|
localAudio: {
|
|
14142
|
-
stream: meeting.disabledLocalAudio
|
|
14241
|
+
stream: meeting.disabledLocalAudio,
|
|
14242
|
+
muting: undefined
|
|
14143
14243
|
}
|
|
14144
14244
|
};
|
|
14145
14245
|
}
|
|
@@ -14151,6 +14251,11 @@ class MeetingsSDKAdapter extends d {
|
|
|
14151
14251
|
});
|
|
14152
14252
|
} catch (error) {
|
|
14153
14253
|
logger.error('MEETING', ID, 'handleLocalAudio()', 'Unable to update local audio settings', error);
|
|
14254
|
+
this.updateMeeting(ID, () => ({
|
|
14255
|
+
localAudio: {
|
|
14256
|
+
muting: undefined
|
|
14257
|
+
}
|
|
14258
|
+
}));
|
|
14154
14259
|
}
|
|
14155
14260
|
}
|
|
14156
14261
|
/**
|
|
@@ -14166,15 +14271,42 @@ class MeetingsSDKAdapter extends d {
|
|
|
14166
14271
|
logger.debug('MEETING', ID, 'handleLocalVideo()', ['called with', {
|
|
14167
14272
|
ID
|
|
14168
14273
|
}]);
|
|
14274
|
+
let state; // local video state
|
|
14275
|
+
// sanity checks and "(un)muting in-progress" state
|
|
14276
|
+
|
|
14277
|
+
await this.updateMeeting(ID, meeting => {
|
|
14278
|
+
let updates;
|
|
14279
|
+
state = this.getLocalMediaState(meeting.localVideo, meeting.disabledLocalVideo);
|
|
14280
|
+
|
|
14281
|
+
if (state.disabled) {
|
|
14282
|
+
throw new Error('Can\'t mute/unmute disabled video');
|
|
14283
|
+
} else if (state.muting) {
|
|
14284
|
+
throw new Error('Already muting video');
|
|
14285
|
+
} else if (state.unmuting) {
|
|
14286
|
+
throw new Error('Already unmuting video');
|
|
14287
|
+
} else if (state.unmuted) {
|
|
14288
|
+
updates = {
|
|
14289
|
+
localVideo: {
|
|
14290
|
+
muting: true
|
|
14291
|
+
}
|
|
14292
|
+
};
|
|
14293
|
+
} else if (state.muted) {
|
|
14294
|
+
updates = {
|
|
14295
|
+
localVideo: {
|
|
14296
|
+
muting: false
|
|
14297
|
+
}
|
|
14298
|
+
};
|
|
14299
|
+
}
|
|
14300
|
+
|
|
14301
|
+
return updates;
|
|
14302
|
+
});
|
|
14169
14303
|
|
|
14170
14304
|
try {
|
|
14171
14305
|
await this.updateMeeting(ID, async (meeting, sdkMeeting) => {
|
|
14172
14306
|
const isInSession = !!meeting.remoteVideo;
|
|
14173
|
-
const videoEnabled = !!meeting.localVideo.stream;
|
|
14174
|
-
const videoDisabled = !!meeting.disabledLocalVideo;
|
|
14175
14307
|
let updates;
|
|
14176
14308
|
|
|
14177
|
-
if (
|
|
14309
|
+
if (state.unmuted) {
|
|
14178
14310
|
// Mute the video only if there is an active meeting
|
|
14179
14311
|
if (isInSession) {
|
|
14180
14312
|
logger.debug('MEETING', ID, 'handleLocalVideo()', 'calling sdkMeeting.muteVideo()');
|
|
@@ -14184,12 +14316,13 @@ class MeetingsSDKAdapter extends d {
|
|
|
14184
14316
|
|
|
14185
14317
|
|
|
14186
14318
|
updates = {
|
|
14319
|
+
disabledLocalVideo: meeting.localVideo.stream,
|
|
14187
14320
|
localVideo: {
|
|
14188
|
-
stream: null
|
|
14189
|
-
|
|
14190
|
-
|
|
14321
|
+
stream: null,
|
|
14322
|
+
muting: undefined
|
|
14323
|
+
}
|
|
14191
14324
|
};
|
|
14192
|
-
} else if (
|
|
14325
|
+
} else if (state.muted) {
|
|
14193
14326
|
// Unmute the video only if there is an active meeting
|
|
14194
14327
|
if (isInSession) {
|
|
14195
14328
|
logger.debug('MEETING', ID, 'handleLocalVideo()', 'calling sdkMeeting.unmuteVideo()');
|
|
@@ -14199,10 +14332,11 @@ class MeetingsSDKAdapter extends d {
|
|
|
14199
14332
|
|
|
14200
14333
|
|
|
14201
14334
|
updates = {
|
|
14335
|
+
disabledLocalVideo: null,
|
|
14202
14336
|
localVideo: {
|
|
14203
|
-
stream: meeting.disabledLocalVideo
|
|
14204
|
-
|
|
14205
|
-
|
|
14337
|
+
stream: meeting.disabledLocalVideo,
|
|
14338
|
+
muting: undefined
|
|
14339
|
+
}
|
|
14206
14340
|
};
|
|
14207
14341
|
}
|
|
14208
14342
|
|
|
@@ -14213,6 +14347,11 @@ class MeetingsSDKAdapter extends d {
|
|
|
14213
14347
|
});
|
|
14214
14348
|
} catch (error) {
|
|
14215
14349
|
logger.error('MEETING', ID, 'handleLocalVideo()', 'Unable to update local video settings', error);
|
|
14350
|
+
this.updateMeeting(ID, () => ({
|
|
14351
|
+
localVideo: {
|
|
14352
|
+
muting: undefined
|
|
14353
|
+
}
|
|
14354
|
+
}));
|
|
14216
14355
|
}
|
|
14217
14356
|
}
|
|
14218
14357
|
/**
|
|
@@ -14420,7 +14559,7 @@ class MeetingsSDKAdapter extends d {
|
|
|
14420
14559
|
updates = {
|
|
14421
14560
|
settings: {
|
|
14422
14561
|
preview: {
|
|
14423
|
-
stream
|
|
14562
|
+
video: stream
|
|
14424
14563
|
}
|
|
14425
14564
|
},
|
|
14426
14565
|
cameraID: deviceId
|
|
@@ -14604,15 +14743,14 @@ class MeetingsSDKAdapter extends d {
|
|
|
14604
14743
|
if (!(ID in this.getMeetingObservables)) {
|
|
14605
14744
|
const sdkMeeting = this.fetchMeeting(ID);
|
|
14606
14745
|
const getMeeting$ = Observable.create(observer => {
|
|
14607
|
-
if (this.meetings[ID]) {
|
|
14746
|
+
if (sdkMeeting && this.meetings[ID]) {
|
|
14608
14747
|
logger.debug('MEETING', ID, 'getMeeting()', ['initial meeting object', this.meetings[ID]]);
|
|
14609
14748
|
observer.next(this.meetings[ID]);
|
|
14749
|
+
observer.complete();
|
|
14610
14750
|
} else {
|
|
14611
14751
|
logger.error('MEETING', ID, 'getMeeting()', `Could not find meeting with ID "${ID}"`);
|
|
14612
14752
|
observer.error(new Error(`Could not find meeting with ID "${ID}"`));
|
|
14613
14753
|
}
|
|
14614
|
-
|
|
14615
|
-
observer.complete();
|
|
14616
14754
|
});
|
|
14617
14755
|
const meetingUpdateEvent$ = fromEvent(sdkMeeting, EVENT_MEETING_UPDATED).pipe(tap(() => logger.debug('MEETING', ID, 'getMeeting()', ['received', EVENT_MEETING_UPDATED, 'event'])), tap(meeting => {
|
|
14618
14756
|
this.meetings[ID] = meeting;
|
|
@@ -15109,7 +15247,7 @@ var defineProperty = defineProperty$1;
|
|
|
15109
15247
|
})(constants);
|
|
15110
15248
|
|
|
15111
15249
|
var name = "@webex/sdk-component-adapter";
|
|
15112
|
-
var version = "1.
|
|
15250
|
+
var version = "1.93.0";
|
|
15113
15251
|
const LOG_ARGS$1 = ['SDK-MEMBERSHIPS', `${name}-${version}`]; // max parameter value must be greater than 0 and less than or equal to 1000
|
|
15114
15252
|
|
|
15115
15253
|
const MAX_MEMBERSHIPS = 1000; // TODO: Figure out how to import JS Doc definitions and remove duplication.
|
|
@@ -15170,7 +15308,7 @@ function sortRoomMembers(memberships, myID) {
|
|
|
15170
15308
|
/* eslint-enable no-nested-ternary, indent */
|
|
15171
15309
|
}
|
|
15172
15310
|
/**
|
|
15173
|
-
*
|
|
15311
|
+
* Maps SDK members to adapter members
|
|
15174
15312
|
*
|
|
15175
15313
|
* @private
|
|
15176
15314
|
* @param {object} sdkMembers Members object from sdk meeting, keyed by ID
|
|
@@ -15183,7 +15321,6 @@ function getMembers(sdkMembers) {
|
|
|
15183
15321
|
sdkMembers
|
|
15184
15322
|
}]);
|
|
15185
15323
|
let members = Object.values(sdkMembers || {});
|
|
15186
|
-
members = members.filter(member => member.isUser);
|
|
15187
15324
|
members = sortMeetingMembers(members);
|
|
15188
15325
|
return members.map(member => ({
|
|
15189
15326
|
ID: member.participant && member.participant.person && constructHydraId(constants.hydraTypes.PEOPLE, member.participant.person.id),
|
|
@@ -16052,30 +16189,31 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
16052
16189
|
|
|
16053
16190
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
16054
16191
|
/**
|
|
16055
|
-
* Webex meeting widget
|
|
16192
|
+
* Webex meeting widget presents a Webex meeting experience.
|
|
16056
16193
|
*
|
|
16057
16194
|
* @param {string} props.meetingDestination ID of the virtual meeting location
|
|
16058
|
-
* @param {string} props.accessToken
|
|
16059
|
-
* @param {string} [props.
|
|
16060
|
-
* @param {Function} [props.controls]
|
|
16195
|
+
* @param {string} props.accessToken Access token of the joining user
|
|
16196
|
+
* @param {string} [props.layout] Layout for remote video (e.g. grid, focus, stack, etc)
|
|
16197
|
+
* @param {Function} [props.controls] Meeting controls to display
|
|
16061
16198
|
* @param {number} [props.controlsCollapseRangeStart] Zero-based index of the first collapsible control (can be negative)
|
|
16062
|
-
* @param {number} [props.controlsCollapseRangeEnd]
|
|
16199
|
+
* @param {number} [props.controlsCollapseRangeEnd] Zero-based index before the last collapsible control (can be negative)
|
|
16063
16200
|
* @param {string} [props.style] Custom style to apply
|
|
16201
|
+
* @param {string} [props.className] Custom CSS class to apply
|
|
16064
16202
|
* @returns {Object} JSX of the component
|
|
16065
16203
|
*/
|
|
16066
16204
|
|
|
16067
|
-
var
|
|
16068
|
-
_inherits(
|
|
16205
|
+
var WebexMeetingsWidget = /*#__PURE__*/function (_Component) {
|
|
16206
|
+
_inherits(WebexMeetingsWidget, _Component);
|
|
16069
16207
|
|
|
16070
|
-
var _super = _createSuper(
|
|
16208
|
+
var _super = _createSuper(WebexMeetingsWidget);
|
|
16071
16209
|
|
|
16072
|
-
function
|
|
16073
|
-
_classCallCheck(this,
|
|
16210
|
+
function WebexMeetingsWidget(props) {
|
|
16211
|
+
_classCallCheck(this, WebexMeetingsWidget);
|
|
16074
16212
|
|
|
16075
16213
|
return _super.call(this, props);
|
|
16076
16214
|
}
|
|
16077
16215
|
|
|
16078
|
-
_createClass(
|
|
16216
|
+
_createClass(WebexMeetingsWidget, [{
|
|
16079
16217
|
key: "render",
|
|
16080
16218
|
value: function render() {
|
|
16081
16219
|
var _meeting$localAudio, _meeting$localVideo;
|
|
@@ -16084,72 +16222,76 @@ var WebexMeetingWidget = /*#__PURE__*/function (_Component) {
|
|
|
16084
16222
|
var audioPermission = (_meeting$localAudio = meeting.localAudio) === null || _meeting$localAudio === void 0 ? void 0 : _meeting$localAudio.permission;
|
|
16085
16223
|
var videoPermission = (_meeting$localVideo = meeting.localVideo) === null || _meeting$localVideo === void 0 ? void 0 : _meeting$localVideo.permission;
|
|
16086
16224
|
var logo = /*#__PURE__*/x.createElement(WebexLogo, null);
|
|
16225
|
+
var contentClass = 'webex-meetings-widget__content';
|
|
16087
16226
|
var content;
|
|
16088
16227
|
|
|
16089
16228
|
if (audioPermission === 'ASKING') {
|
|
16090
16229
|
content = /*#__PURE__*/x.createElement(Ta, {
|
|
16091
|
-
className: "webex-meeting-widget__content",
|
|
16092
16230
|
meetingID: meeting.ID,
|
|
16093
16231
|
media: "microphone",
|
|
16094
|
-
logo: logo
|
|
16232
|
+
logo: logo,
|
|
16233
|
+
className: contentClass
|
|
16095
16234
|
});
|
|
16096
16235
|
} else if (videoPermission === 'ASKING') {
|
|
16097
16236
|
content = /*#__PURE__*/x.createElement(Ta, {
|
|
16098
|
-
className: "webex-meeting-widget__content",
|
|
16099
16237
|
meetingID: meeting.ID,
|
|
16100
16238
|
media: "camera",
|
|
16101
|
-
logo: logo
|
|
16239
|
+
logo: logo,
|
|
16240
|
+
className: contentClass
|
|
16102
16241
|
});
|
|
16103
16242
|
} else {
|
|
16104
16243
|
content = /*#__PURE__*/x.createElement(ti, {
|
|
16105
|
-
className: "webex-meeting-widget__content",
|
|
16106
16244
|
meetingID: meeting.ID,
|
|
16107
16245
|
logo: logo,
|
|
16246
|
+
layout: this.props.layout,
|
|
16108
16247
|
controls: this.props.controls,
|
|
16109
16248
|
controlsCollapseRangeStart: this.props.controlsCollapseRangeStart,
|
|
16110
|
-
controlsCollapseRangeEnd: this.props.controlsCollapseRangeEnd
|
|
16249
|
+
controlsCollapseRangeEnd: this.props.controlsCollapseRangeEnd,
|
|
16250
|
+
className: contentClass
|
|
16111
16251
|
});
|
|
16112
16252
|
}
|
|
16113
16253
|
|
|
16114
16254
|
return /*#__PURE__*/x.createElement("div", {
|
|
16115
|
-
className: "webex-
|
|
16255
|
+
className: "webex-meetings-widget ".concat(this.props.className),
|
|
16116
16256
|
style: this.props.style
|
|
16117
16257
|
}, content);
|
|
16118
16258
|
}
|
|
16119
16259
|
}]);
|
|
16120
16260
|
|
|
16121
|
-
return
|
|
16261
|
+
return WebexMeetingsWidget;
|
|
16122
16262
|
}(Component);
|
|
16123
16263
|
|
|
16124
|
-
|
|
16264
|
+
WebexMeetingsWidget.propTypes = {
|
|
16125
16265
|
accessToken: T.string.isRequired,
|
|
16126
16266
|
className: T.string,
|
|
16127
16267
|
controls: T.func,
|
|
16128
16268
|
controlsCollapseRangeStart: T.number,
|
|
16129
16269
|
controlsCollapseRangeEnd: T.number,
|
|
16130
16270
|
meetingDestination: T.string.isRequired,
|
|
16131
|
-
style: T.shape()
|
|
16271
|
+
style: T.shape(),
|
|
16272
|
+
layout: T.string
|
|
16132
16273
|
};
|
|
16133
|
-
|
|
16274
|
+
WebexMeetingsWidget.defaultProps = {
|
|
16134
16275
|
className: '',
|
|
16135
16276
|
controls: undefined,
|
|
16136
16277
|
controlsCollapseRangeStart: undefined,
|
|
16137
16278
|
controlsCollapseRangeEnd: undefined,
|
|
16279
|
+
layout: 'Grid',
|
|
16138
16280
|
style: {}
|
|
16139
16281
|
};
|
|
16140
|
-
var appName = process.env.NODE_ENV === 'production' ? 'webex-widgets-
|
|
16141
|
-
var
|
|
16282
|
+
var appName = process.env.NODE_ENV === 'production' ? 'webex-widgets-meetings' : 'webex-widgets-meetings-dev';
|
|
16283
|
+
var WebexMeetings = ii(ni(WebexMeetingsWidget), function (props) {
|
|
16142
16284
|
var webex = new Webex({
|
|
16143
16285
|
credentials: {
|
|
16144
16286
|
access_token: props.accessToken
|
|
16145
16287
|
},
|
|
16146
16288
|
config: {
|
|
16147
16289
|
appName: appName,
|
|
16148
|
-
appVersion:
|
|
16290
|
+
appVersion: __appVersion__
|
|
16149
16291
|
}
|
|
16150
16292
|
});
|
|
16151
16293
|
return new WebexSDKAdapter(webex);
|
|
16152
16294
|
});
|
|
16153
16295
|
|
|
16154
|
-
export {
|
|
16296
|
+
export { WebexMeetings as WebexMeetingsWidget };
|
|
16155
16297
|
//# sourceMappingURL=webexWidgets.esm.js.map
|