ahs-cti 0.0.9 → 0.0.11
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/{caroQualityAuditDashboard-TNS4L2NR.mjs → caroQualityAuditDashboard-PDXTFXYP.mjs} +4 -4
- package/{dist-react/caroQualityAuditDashboard-THYPVOCP.mjs.map → dist/caroQualityAuditDashboard-PDXTFXYP.mjs.map} +1 -1
- package/dist/index.js +133 -73
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +129 -69
- package/dist/index.mjs.map +1 -1
- package/dist/{qualityAuditDashboard-FHRGB77R.mjs → qualityAuditDashboard-L2KJETAG.mjs} +4 -4
- package/dist/{qualityAuditDashboard-FHRGB77R.mjs.map → qualityAuditDashboard-L2KJETAG.mjs.map} +1 -1
- package/dist-react/{caroQualityAuditDashboard-THYPVOCP.mjs → caroQualityAuditDashboard-7MELAQXL.mjs} +4 -4
- package/{dist/caroQualityAuditDashboard-TNS4L2NR.mjs.map → dist-react/caroQualityAuditDashboard-7MELAQXL.mjs.map} +1 -1
- package/dist-react/index.d.ts +1 -2
- package/dist-react/index.js +133 -73
- package/dist-react/index.js.map +1 -1
- package/dist-react/index.mjs +129 -69
- package/dist-react/index.mjs.map +1 -1
- package/dist-react/{qualityAuditDashboard-ZAM7HRNH.mjs → qualityAuditDashboard-APCN5BD5.mjs} +4 -4
- package/dist-react/{qualityAuditDashboard-ZAM7HRNH.mjs.map → qualityAuditDashboard-APCN5BD5.mjs.map} +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -122234,9 +122234,9 @@ var init_qualityAuditDashboard = __esm({
|
|
|
122234
122234
|
vizElement.parentNode.insertBefore(scriptElement, vizElement);
|
|
122235
122235
|
|
|
122236
122236
|
function scaleViz() {
|
|
122237
|
-
|
|
122238
|
-
|
|
122239
|
-
var scale =
|
|
122237
|
+
// Scale to fill the full available width (removes the empty space on the
|
|
122238
|
+
// right); height follows the dashboard's aspect ratio.
|
|
122239
|
+
var scale = window.innerWidth / 1500;
|
|
122240
122240
|
divElement.style.transform = 'scale(' + scale + ')';
|
|
122241
122241
|
}
|
|
122242
122242
|
scaleViz();
|
|
@@ -122305,9 +122305,9 @@ var init_caroQualityAuditDashboard = __esm({
|
|
|
122305
122305
|
vizElement.parentNode.insertBefore(scriptElement, vizElement);
|
|
122306
122306
|
|
|
122307
122307
|
function scaleViz() {
|
|
122308
|
-
|
|
122309
|
-
|
|
122310
|
-
var scale =
|
|
122308
|
+
// Scale to fill the full available width (removes the empty space on the
|
|
122309
|
+
// right); height follows the dashboard's aspect ratio.
|
|
122310
|
+
var scale = window.innerWidth / 1500;
|
|
122311
122311
|
divElement.style.transform = 'scale(' + scale + ')';
|
|
122312
122312
|
}
|
|
122313
122313
|
scaleViz();
|
|
@@ -123085,7 +123085,7 @@ var styles_default = useStyles;
|
|
|
123085
123085
|
// call-control-sdk/lib/components/dialog.tsx
|
|
123086
123086
|
var import_jsx_runtime146 = require("react/jsx-runtime");
|
|
123087
123087
|
var ConferenceTableRow = ({ each: each3, isLineDialing }) => {
|
|
123088
|
-
var _a2, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
123088
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
123089
123089
|
const state = useSDKState();
|
|
123090
123090
|
const theme = useTheme5();
|
|
123091
123091
|
const { showToast } = useToast();
|
|
@@ -123102,8 +123102,17 @@ var ConferenceTableRow = ({ each: each3, isLineDialing }) => {
|
|
|
123102
123102
|
(line2) => (line2 == null ? void 0 : line2.status) === "DIALING" /* DIALING */ || (line2 == null ? void 0 : line2.status) === "ONCALL" /* ONCALL */
|
|
123103
123103
|
);
|
|
123104
123104
|
const holdEnabled = ((each3 == null ? void 0 : each3.status) === "CONFERENCE" /* CONFERENCE */ || (each3 == null ? void 0 : each3.status) === "HOLD" /* HOLD */) && !anyLineDialingOrOnCall && !conferenceCallHoldOrUnHold;
|
|
123105
|
-
const
|
|
123106
|
-
|
|
123105
|
+
const mainCallDisconnected = (_e = state == null ? void 0 : state.conferenceLine) == null ? void 0 : _e.some(
|
|
123106
|
+
(line2) => (line2 == null ? void 0 : line2.line) === 1 && (line2 == null ? void 0 : line2.status) === "DISCONNECTED" /* DISCONNECTED */
|
|
123107
|
+
);
|
|
123108
|
+
const anyOtherLineOnHold = (_f = state == null ? void 0 : state.conferenceLine) == null ? void 0 : _f.some(
|
|
123109
|
+
(line2) => (line2 == null ? void 0 : line2.line) !== (each3 == null ? void 0 : each3.line) && (line2 == null ? void 0 : line2.status) === "HOLD" /* HOLD */
|
|
123110
|
+
);
|
|
123111
|
+
const mergeEnabled = (each3 == null ? void 0 : each3.status) === "ONCALL" /* ONCALL */ && (!mainCallDisconnected || anyOtherLineOnHold);
|
|
123112
|
+
const mainMergeEnabled = !!anyOtherLineOnHold && (each3 == null ? void 0 : each3.status) === "ONCALL" /* ONCALL */;
|
|
123113
|
+
const mainCallIconDisabled = conferenceCallStart || (each3 == null ? void 0 : each3.status) === "DIALING" /* DIALING */ || (each3 == null ? void 0 : each3.status) === "ONCALL" /* ONCALL */ || (each3 == null ? void 0 : each3.status) === "CONFERENCE" /* CONFERENCE */ || (each3 == null ? void 0 : each3.status) === "HOLD" /* HOLD */;
|
|
123114
|
+
const isSameAsActiveCall = (each3 == null ? void 0 : each3.phone) === ((_g = state.callData) == null ? void 0 : _g.phone_number) && !!(each3 == null ? void 0 : each3.phone);
|
|
123115
|
+
const isDuplicateInConference = !!(each3 == null ? void 0 : each3.phone) && (each3 == null ? void 0 : each3.line) !== 1 && ((_h = state.conferenceLine) == null ? void 0 : _h.some(
|
|
123107
123116
|
(line2) => line2.line < each3.line && line2.phone === (each3 == null ? void 0 : each3.phone) && !!line2.phone
|
|
123108
123117
|
));
|
|
123109
123118
|
const hasPhoneConflict = isDuplicateInConference;
|
|
@@ -123151,6 +123160,33 @@ var ConferenceTableRow = ({ each: each3, isLineDialing }) => {
|
|
|
123151
123160
|
setConferenceCallStart(false);
|
|
123152
123161
|
});
|
|
123153
123162
|
};
|
|
123163
|
+
const onReCallMainCall = (line2) => {
|
|
123164
|
+
var _a3, _b2, _c2, _d2;
|
|
123165
|
+
const target = (line2 == null ? void 0 : line2.phone) || ((_a3 = state.callData) == null ? void 0 : _a3.phone_number) || "";
|
|
123166
|
+
if (!target || target.length < 10) {
|
|
123167
|
+
showToast("Invalid phone number", "error");
|
|
123168
|
+
return;
|
|
123169
|
+
}
|
|
123170
|
+
setConferenceCallStart(true);
|
|
123171
|
+
const payload = {
|
|
123172
|
+
action: "EXTERNAL_CONFERENCE",
|
|
123173
|
+
operation: "CALL1",
|
|
123174
|
+
target,
|
|
123175
|
+
line_number: 1,
|
|
123176
|
+
userid: (_b2 = state.agentId) != null ? _b2 : "",
|
|
123177
|
+
process: (_d2 = (_c2 = state.callData) == null ? void 0 : _c2.process_name) != null ? _d2 : ""
|
|
123178
|
+
};
|
|
123179
|
+
axios_default2.post(END_POINT.CONFERENCE_CALL, payload).then((res) => {
|
|
123180
|
+
var _a4;
|
|
123181
|
+
showToast((_a4 = res.data) == null ? void 0 : _a4.message, "success");
|
|
123182
|
+
}).catch((err) => {
|
|
123183
|
+
var _a4, _b3, _c3, _d3;
|
|
123184
|
+
const message = ((_b3 = (_a4 = err.response) == null ? void 0 : _a4.data) == null ? void 0 : _b3.detail) || ((_d3 = (_c3 = err.response) == null ? void 0 : _c3.data) == null ? void 0 : _d3.message) || err.message || "An unknown error occurred";
|
|
123185
|
+
showToast(message, "error");
|
|
123186
|
+
}).finally(() => {
|
|
123187
|
+
setConferenceCallStart(false);
|
|
123188
|
+
});
|
|
123189
|
+
};
|
|
123154
123190
|
const onMergeConferenceCall = (line2, data) => {
|
|
123155
123191
|
var _a3, _b2, _c2, _d2, _e2;
|
|
123156
123192
|
const line_used = __spreadValues(__spreadValues({}, line2), data);
|
|
@@ -123270,7 +123306,7 @@ var ConferenceTableRow = ({ each: each3, isLineDialing }) => {
|
|
|
123270
123306
|
},
|
|
123271
123307
|
children: /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(Typography_default, { children: [
|
|
123272
123308
|
"Line ",
|
|
123273
|
-
(
|
|
123309
|
+
(_i = each3 == null ? void 0 : each3.line) != null ? _i : "",
|
|
123274
123310
|
". "
|
|
123275
123311
|
] })
|
|
123276
123312
|
}
|
|
@@ -123291,7 +123327,7 @@ var ConferenceTableRow = ({ each: each3, isLineDialing }) => {
|
|
|
123291
123327
|
borderRadius: "10px",
|
|
123292
123328
|
width: "150px"
|
|
123293
123329
|
},
|
|
123294
|
-
children: (
|
|
123330
|
+
children: (_j = each3 == null ? void 0 : each3.status) != null ? _j : ""
|
|
123295
123331
|
}
|
|
123296
123332
|
)
|
|
123297
123333
|
}
|
|
@@ -123327,7 +123363,7 @@ var ConferenceTableRow = ({ each: each3, isLineDialing }) => {
|
|
|
123327
123363
|
"MUTE" /* MUTE */,
|
|
123328
123364
|
"DIALING" /* DIALING */,
|
|
123329
123365
|
"RINGING" /* RINGING */
|
|
123330
|
-
].includes((
|
|
123366
|
+
].includes((_k = each3 == null ? void 0 : each3.status) != null ? _k : "") || isLineDialing,
|
|
123331
123367
|
onKeyDown: (e) => {
|
|
123332
123368
|
const allowedKeys = [
|
|
123333
123369
|
"Backspace",
|
|
@@ -123378,6 +123414,29 @@ var ConferenceTableRow = ({ each: each3, isLineDialing }) => {
|
|
|
123378
123414
|
gap: "10px"
|
|
123379
123415
|
},
|
|
123380
123416
|
children: [
|
|
123417
|
+
(each3 == null ? void 0 : each3.line) === 1 && /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_jsx_runtime146.Fragment, { children: [
|
|
123418
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Tooltip_default, { title: "Call main number again", children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
123419
|
+
Button_default,
|
|
123420
|
+
{
|
|
123421
|
+
variant: mainCallIconDisabled ? "outlined" : "contained",
|
|
123422
|
+
color: "success",
|
|
123423
|
+
sx: mainCallIconDisabled ? __spreadValues({}, disabled) : __spreadValues({}, enabled),
|
|
123424
|
+
onClick: () => onReCallMainCall(each3),
|
|
123425
|
+
disabled: mainCallIconDisabled,
|
|
123426
|
+
children: conferenceCallStart ? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(CircularProgress_default, { size: "20px", color: "success" }) : /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Call_default, { sx: { color: mainCallIconDisabled ? "inherit" : "#f3f2f2" } })
|
|
123427
|
+
}
|
|
123428
|
+
) }) }),
|
|
123429
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Tooltip_default, { title: "Merge Call", children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
123430
|
+
Button_default,
|
|
123431
|
+
{
|
|
123432
|
+
variant: mainMergeEnabled ? "contained" : "outlined",
|
|
123433
|
+
sx: mainMergeEnabled ? __spreadValues({}, enabled) : __spreadValues({}, disabled),
|
|
123434
|
+
onClick: () => onMergeConferenceCall(each3, { isMergeCall: true }),
|
|
123435
|
+
disabled: !mainMergeEnabled,
|
|
123436
|
+
children: conferenceCallMerge ? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(CircularProgress_default, { size: "20px" }) : /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(CallSplit_default, {})
|
|
123437
|
+
}
|
|
123438
|
+
) }) })
|
|
123439
|
+
] }),
|
|
123381
123440
|
(each3 == null ? void 0 : each3.line) === 1 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Tooltip_default, { title: (each3 == null ? void 0 : each3.status) !== "HOLD" /* HOLD */ ? "Hold" : "Resume", children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
123382
123441
|
Button_default,
|
|
123383
123442
|
{
|
|
@@ -123478,18 +123537,18 @@ var ConferenceTableRow = ({ each: each3, isLineDialing }) => {
|
|
|
123478
123537
|
}
|
|
123479
123538
|
) }) });
|
|
123480
123539
|
})(),
|
|
123481
|
-
(each3 == null ? void 0 : each3.line) !== 1 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Tooltip_default, { title: "Merge Call", children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
123540
|
+
(each3 == null ? void 0 : each3.line) !== 1 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Tooltip_default, { title: mergeEnabled ? "Merge Call" : mainCallDisconnected && (each3 == null ? void 0 : each3.status) === "ONCALL" /* ONCALL */ ? "Put another line on hold to merge" : "Merge Call", children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
123482
123541
|
Button_default,
|
|
123483
123542
|
{
|
|
123484
|
-
variant:
|
|
123485
|
-
sx:
|
|
123543
|
+
variant: mergeEnabled ? "contained" : "outlined",
|
|
123544
|
+
sx: mergeEnabled ? __spreadValues({}, enabled) : __spreadValues({}, disabled),
|
|
123486
123545
|
onClick: () => {
|
|
123487
123546
|
onMergeConferenceCall(each3, { isMergeCall: true });
|
|
123488
123547
|
},
|
|
123489
|
-
disabled:
|
|
123548
|
+
disabled: !mergeEnabled,
|
|
123490
123549
|
children: conferenceCallMerge ? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(CircularProgress_default, { size: "20px" }) : /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(CallSplit_default, {})
|
|
123491
123550
|
}
|
|
123492
|
-
) }),
|
|
123551
|
+
) }) }),
|
|
123493
123552
|
(each3 == null ? void 0 : each3.line) !== 1 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Tooltip_default, { title: (each3 == null ? void 0 : each3.status) !== "HOLD" /* HOLD */ ? "Hold" : "Resume", children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
123494
123553
|
Button_default,
|
|
123495
123554
|
{
|
|
@@ -125215,7 +125274,7 @@ var formatDuration = (seconds2) => {
|
|
|
125215
125274
|
return `${mins.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
|
|
125216
125275
|
};
|
|
125217
125276
|
function CallControls({ onDataChange }) {
|
|
125218
|
-
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb, _wb, _xb
|
|
125277
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub, _vb, _wb, _xb;
|
|
125219
125278
|
const theme = useTheme5();
|
|
125220
125279
|
const state = useSDKState();
|
|
125221
125280
|
const { showToast } = useToast();
|
|
@@ -125404,6 +125463,8 @@ function CallControls({ onDataChange }) {
|
|
|
125404
125463
|
};
|
|
125405
125464
|
muteOrUnMute(END_POINT.MUTE_CALL, payload);
|
|
125406
125465
|
};
|
|
125466
|
+
const holdFeatureDisabled = !!((_d = state.sdkConfig) == null ? void 0 : _d.disableHoldButton) || ((_e = state.callData) == null ? void 0 : _e.disable_hold_mute) === 1;
|
|
125467
|
+
const muteFeatureDisabled = !!((_f = state.sdkConfig) == null ? void 0 : _f.disableMuteButton) || ((_g = state.callData) == null ? void 0 : _g.disable_hold_mute) === 1;
|
|
125407
125468
|
const handleEndCall = (data) => {
|
|
125408
125469
|
var _a3, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n2;
|
|
125409
125470
|
const payload = {
|
|
@@ -125552,7 +125613,7 @@ function CallControls({ onDataChange }) {
|
|
|
125552
125613
|
return () => {
|
|
125553
125614
|
if (holdInterval) clearInterval(holdInterval);
|
|
125554
125615
|
};
|
|
125555
|
-
}, [(
|
|
125616
|
+
}, [(_h = state.callData) == null ? void 0 : _h.hold, (_i = state.callData) == null ? void 0 : _i.status]);
|
|
125556
125617
|
(0, import_react24.useEffect)(() => {
|
|
125557
125618
|
var _a3, _b2, _c2, _d2;
|
|
125558
125619
|
let muteInterval;
|
|
@@ -125575,7 +125636,7 @@ function CallControls({ onDataChange }) {
|
|
|
125575
125636
|
return () => {
|
|
125576
125637
|
if (muteInterval) clearInterval(muteInterval);
|
|
125577
125638
|
};
|
|
125578
|
-
}, [(
|
|
125639
|
+
}, [(_j = state.callData) == null ? void 0 : _j.mute, (_k = state.callData) == null ? void 0 : _k.status]);
|
|
125579
125640
|
(0, import_react24.useEffect)(() => {
|
|
125580
125641
|
createAudioElement().then((audio) => {
|
|
125581
125642
|
audioRef.current = audio;
|
|
@@ -125675,6 +125736,7 @@ function CallControls({ onDataChange }) {
|
|
|
125675
125736
|
process_name: data == null ? void 0 : data.process_name,
|
|
125676
125737
|
hold: data == null ? void 0 : data.hold,
|
|
125677
125738
|
mute: data == null ? void 0 : data.mute,
|
|
125739
|
+
disable_hold_mute: data == null ? void 0 : data.disable_hold_mute,
|
|
125678
125740
|
mode: data == null ? void 0 : data.mode,
|
|
125679
125741
|
queue_name: data == null ? void 0 : data.queue_name,
|
|
125680
125742
|
auto_wrapup_time: (_a4 = data == null ? void 0 : data.auto_wrapup_time) != null ? _a4 : null
|
|
@@ -125896,19 +125958,19 @@ function CallControls({ onDataChange }) {
|
|
|
125896
125958
|
}
|
|
125897
125959
|
) });
|
|
125898
125960
|
}
|
|
125899
|
-
const isOnHold = ((
|
|
125900
|
-
const isMuted = ((
|
|
125901
|
-
const isVertical = ((
|
|
125961
|
+
const isOnHold = ((_l = state.callData) == null ? void 0 : _l.hold) === 1 && ((_n = (_m = state.callData) == null ? void 0 : _m.status) == null ? void 0 : _n.toUpperCase()) === "ONCALL" /* ONCALL */;
|
|
125962
|
+
const isMuted = ((_o = state.callData) == null ? void 0 : _o.mute) === 1 && ((_q = (_p = state.callData) == null ? void 0 : _p.status) == null ? void 0 : _q.toUpperCase()) === "ONCALL" /* ONCALL */;
|
|
125963
|
+
const isVertical = ((_r = state.sdkConfig) == null ? void 0 : _r.sdkPosition) === "vertical";
|
|
125902
125964
|
return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, { children: [
|
|
125903
125965
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Fade_default, { in: true, timeout: 300, children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
125904
125966
|
Paper_default,
|
|
125905
125967
|
{
|
|
125906
|
-
ref: ((
|
|
125907
|
-
elevation: isDragging ? 4 : ((
|
|
125968
|
+
ref: ((_s = state.sdkConfig) == null ? void 0 : _s.isDraggable) ? dragRef : null,
|
|
125969
|
+
elevation: isDragging ? 4 : ((_t = state.sdkConfig) == null ? void 0 : _t.isDraggable) ? 1 : 0,
|
|
125908
125970
|
sx: {
|
|
125909
|
-
position: ((
|
|
125910
|
-
left: ((
|
|
125911
|
-
top: ((
|
|
125971
|
+
position: ((_u = state.sdkConfig) == null ? void 0 : _u.isDraggable) ? "fixed" : "relative",
|
|
125972
|
+
left: ((_v = state.sdkConfig) == null ? void 0 : _v.isDraggable) ? position3.x : "auto",
|
|
125973
|
+
top: ((_w = state.sdkConfig) == null ? void 0 : _w.isDraggable) ? position3.y : "auto",
|
|
125912
125974
|
display: "inline-block",
|
|
125913
125975
|
width: isVertical ? "180px" : "auto",
|
|
125914
125976
|
flexShrink: 0,
|
|
@@ -125916,7 +125978,7 @@ function CallControls({ onDataChange }) {
|
|
|
125916
125978
|
p: 0.5,
|
|
125917
125979
|
borderRadius: 3,
|
|
125918
125980
|
bgcolor: "background.paper",
|
|
125919
|
-
zIndex: ((
|
|
125981
|
+
zIndex: ((_x = state.sdkConfig) == null ? void 0 : _x.isDraggable) ? Number.MAX_SAFE_INTEGER : 0,
|
|
125920
125982
|
transition: theme.transitions.create(["box-shadow", "transform"], {
|
|
125921
125983
|
duration: theme.transitions.duration.short
|
|
125922
125984
|
}),
|
|
@@ -125942,7 +126004,7 @@ function CallControls({ onDataChange }) {
|
|
|
125942
126004
|
margin: isVertical ? "10px 8px 4px 8px" : "0px 10px"
|
|
125943
126005
|
},
|
|
125944
126006
|
children: [
|
|
125945
|
-
((
|
|
126007
|
+
((_y = state.sdkConfig) == null ? void 0 : _y.isDraggable) && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
125946
126008
|
IconButton_default,
|
|
125947
126009
|
{
|
|
125948
126010
|
component: "div",
|
|
@@ -125955,8 +126017,8 @@ function CallControls({ onDataChange }) {
|
|
|
125955
126017
|
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(DragIndicator_default, {})
|
|
125956
126018
|
}
|
|
125957
126019
|
),
|
|
125958
|
-
((
|
|
125959
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title: ((
|
|
126020
|
+
((_z = state.sdkConfig) == null ? void 0 : _z.enableQueueName) && ((_A = state == null ? void 0 : state.callData) == null ? void 0 : _A.queue_name) && ((_B = state == null ? void 0 : state.callData) == null ? void 0 : _B.mode) !== "manual" && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Chip_default, { label: (_C = state == null ? void 0 : state.callData) == null ? void 0 : _C.queue_name }),
|
|
126021
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title: ((_D = state.sdkConfig) == null ? void 0 : _D.disabledDialButton) ? "Outbound call feature is disabled" : "Dial", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Box_default, { component: "span", sx: isVertical ? { display: "block" } : {}, children: isVertical ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
125960
126022
|
Button_default,
|
|
125961
126023
|
{
|
|
125962
126024
|
variant: "outlined",
|
|
@@ -125975,7 +126037,7 @@ function CallControls({ onDataChange }) {
|
|
|
125975
126037
|
"BREAK" /* BREAK */,
|
|
125976
126038
|
"ONCALL" /* ONCALL */,
|
|
125977
126039
|
"RINGING" /* RINGING */
|
|
125978
|
-
].includes((
|
|
126040
|
+
].includes((_E = state.callData.status) == null ? void 0 : _E.toUpperCase()) || ((_F = state.sdkConfig) == null ? void 0 : _F.disabledDialButton) || ((_G = state.callData.status) == null ? void 0 : _G.toUpperCase()) === "WRAPUP" /* WRAPUP */ && !!((_H = state.sdkConfig) == null ? void 0 : _H.disableAlternateDialing),
|
|
125979
126041
|
sx: {
|
|
125980
126042
|
justifyContent: "flex-start",
|
|
125981
126043
|
width: "100%",
|
|
@@ -125984,12 +126046,12 @@ function CallControls({ onDataChange }) {
|
|
|
125984
126046
|
"BREAK" /* BREAK */,
|
|
125985
126047
|
"ONCALL" /* ONCALL */,
|
|
125986
126048
|
"RINGING" /* RINGING */
|
|
125987
|
-
].includes((
|
|
126049
|
+
].includes((_I = state.callData.status) == null ? void 0 : _I.toUpperCase()) || ((_J = state.sdkConfig) == null ? void 0 : _J.disabledDialButton) || ((_K = state.callData.status) == null ? void 0 : _K.toUpperCase()) === "WRAPUP" /* WRAPUP */ && !!((_L = state.sdkConfig) == null ? void 0 : _L.disableAlternateDialing) ? "action.selected" : "success.main",
|
|
125988
126050
|
borderColor: [
|
|
125989
126051
|
"BREAK" /* BREAK */,
|
|
125990
126052
|
"ONCALL" /* ONCALL */,
|
|
125991
126053
|
"RINGING" /* RINGING */
|
|
125992
|
-
].includes((
|
|
126054
|
+
].includes((_M = state.callData.status) == null ? void 0 : _M.toUpperCase()) || ((_N = state.sdkConfig) == null ? void 0 : _N.disabledDialButton) || ((_O = state.callData.status) == null ? void 0 : _O.toUpperCase()) === "WRAPUP" /* WRAPUP */ && !!((_P = state.sdkConfig) == null ? void 0 : _P.disableAlternateDialing) ? "action.selected" : "success.main"
|
|
125993
126055
|
},
|
|
125994
126056
|
children: "Dial"
|
|
125995
126057
|
}
|
|
@@ -126011,7 +126073,7 @@ function CallControls({ onDataChange }) {
|
|
|
126011
126073
|
"BREAK" /* BREAK */,
|
|
126012
126074
|
"ONCALL" /* ONCALL */,
|
|
126013
126075
|
"RINGING" /* RINGING */
|
|
126014
|
-
].includes((
|
|
126076
|
+
].includes((_Q = state.callData.status) == null ? void 0 : _Q.toUpperCase()) || ((_R = state.sdkConfig) == null ? void 0 : _R.disabledDialButton) || ((_S = state.callData.status) == null ? void 0 : _S.toUpperCase()) === "WRAPUP" /* WRAPUP */ && !!((_T = state.sdkConfig) == null ? void 0 : _T.disableAlternateDialing),
|
|
126015
126077
|
children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
126016
126078
|
WifiCalling3_default,
|
|
126017
126079
|
{
|
|
@@ -126020,7 +126082,7 @@ function CallControls({ onDataChange }) {
|
|
|
126020
126082
|
"BREAK" /* BREAK */,
|
|
126021
126083
|
"ONCALL" /* ONCALL */,
|
|
126022
126084
|
"RINGING" /* RINGING */
|
|
126023
|
-
].includes((
|
|
126085
|
+
].includes((_U = state.callData.status) == null ? void 0 : _U.toUpperCase()) || ((_V = state.sdkConfig) == null ? void 0 : _V.disabledDialButton) || ((_W = state.callData.status) == null ? void 0 : _W.toUpperCase()) === "WRAPUP" /* WRAPUP */ && !!((_X = state.sdkConfig) == null ? void 0 : _X.disableAlternateDialing) ? "action.selected" : "success.main"
|
|
126024
126086
|
}
|
|
126025
126087
|
}
|
|
126026
126088
|
)
|
|
@@ -126039,7 +126101,7 @@ function CallControls({ onDataChange }) {
|
|
|
126039
126101
|
marginRight: "10px"
|
|
126040
126102
|
},
|
|
126041
126103
|
children: [
|
|
126042
|
-
((
|
|
126104
|
+
((_Z = (_Y = state.callData) == null ? void 0 : _Y.status) == null ? void 0 : _Z.toUpperCase()) === "BREAK" /* BREAK */ && ((_$ = (__ = state.callData) == null ? void 0 : __.break_details) == null ? void 0 : _$.value) ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title: state.callData.break_details.value, children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
126043
126105
|
Box_default,
|
|
126044
126106
|
{
|
|
126045
126107
|
sx: {
|
|
@@ -126170,7 +126232,7 @@ function CallControls({ onDataChange }) {
|
|
|
126170
126232
|
width: "60px",
|
|
126171
126233
|
textAlign: "center"
|
|
126172
126234
|
},
|
|
126173
|
-
children: (
|
|
126235
|
+
children: (_ca = (_ba = (_aa = state.callData) == null ? void 0 : _aa.status) == null ? void 0 : _ba.toUpperCase()) != null ? _ca : "N/A"
|
|
126174
126236
|
}
|
|
126175
126237
|
),
|
|
126176
126238
|
onClick: handleOpenAgentStatus,
|
|
@@ -126197,7 +126259,7 @@ function CallControls({ onDataChange }) {
|
|
|
126197
126259
|
Button_default,
|
|
126198
126260
|
{
|
|
126199
126261
|
variant: ["BREAK" /* BREAK */, "MISSED" /* MISSED */].includes(
|
|
126200
|
-
(
|
|
126262
|
+
(_ea = (_da = state.callData) == null ? void 0 : _da.status) == null ? void 0 : _ea.toUpperCase()
|
|
126201
126263
|
) ? "outlined" : "contained",
|
|
126202
126264
|
startIcon: isVertical ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(SupportAgent_default, {}) : void 0,
|
|
126203
126265
|
onClick: (e) => {
|
|
@@ -126211,63 +126273,61 @@ function CallControls({ onDataChange }) {
|
|
|
126211
126273
|
},
|
|
126212
126274
|
classes: {
|
|
126213
126275
|
root: ["BREAK" /* BREAK */, "MISSED" /* MISSED */].includes(
|
|
126214
|
-
(
|
|
126276
|
+
(_ga = (_fa = state.callData) == null ? void 0 : _fa.status) == null ? void 0 : _ga.toUpperCase()
|
|
126215
126277
|
) ? "outlined" : "enabled"
|
|
126216
126278
|
},
|
|
126217
126279
|
sx: __spreadValues(__spreadValues({}, ["BREAK" /* BREAK */, "MISSED" /* MISSED */].includes(
|
|
126218
|
-
(
|
|
126280
|
+
(_ia = (_ha = state.callData) == null ? void 0 : _ha.status) == null ? void 0 : _ia.toUpperCase()
|
|
126219
126281
|
) ? outlined : enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
|
|
126220
126282
|
disabled: agentReadyLoading,
|
|
126221
126283
|
children: isVertical ? "Agent Ready" : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(SupportAgent_default, {})
|
|
126222
126284
|
}
|
|
126223
126285
|
) }),
|
|
126224
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title:
|
|
126286
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title: holdFeatureDisabled ? "Hold feature is disabled" : ((_ja = state.callData) == null ? void 0 : _ja.hold) === 1 ? "Resume" : "Hold", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Box_default, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
126225
126287
|
Button_default,
|
|
126226
126288
|
{
|
|
126227
|
-
variant: ((
|
|
126228
|
-
startIcon: isVertical ? holdOrUnHoldLoading ? void 0 : ((
|
|
126289
|
+
variant: ((_ka = state.callData) == null ? void 0 : _ka.hold) === 1 && ((_ma = (_la = state.callData) == null ? void 0 : _la.status) == null ? void 0 : _ma.toUpperCase()) === "ONCALL" /* ONCALL */ ? "contained" : "outlined",
|
|
126290
|
+
startIcon: isVertical ? holdOrUnHoldLoading ? void 0 : ((_na = state.callData) == null ? void 0 : _na.hold) === 1 ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(PlayArrow_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Pause_default, {}) : void 0,
|
|
126229
126291
|
onClick: (e) => {
|
|
126230
|
-
var _a3;
|
|
126231
126292
|
e.stopPropagation();
|
|
126232
|
-
if (!
|
|
126293
|
+
if (!holdFeatureDisabled) {
|
|
126233
126294
|
handleHoldToggle();
|
|
126234
126295
|
}
|
|
126235
126296
|
},
|
|
126236
|
-
sx: ((
|
|
126237
|
-
disabled: ((
|
|
126297
|
+
sx: ((_oa = state.callData) == null ? void 0 : _oa.hold) === 1 && ((_qa = (_pa = state.callData) == null ? void 0 : _pa.status) == null ? void 0 : _qa.toUpperCase()) === "ONCALL" /* ONCALL */ ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((_sa = (_ra = state.callData) == null ? void 0 : _ra.status) == null ? void 0 : _sa.toUpperCase()) === "ONCALL" /* ONCALL */ && !holdFeatureDisabled ? __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
|
|
126298
|
+
disabled: ((_ua = (_ta = state.callData) == null ? void 0 : _ta.status) == null ? void 0 : _ua.toUpperCase()) !== "ONCALL" /* ONCALL */ && ((_va = state.callData) == null ? void 0 : _va.hold) !== 1 || holdOrUnHoldLoading || holdFeatureDisabled,
|
|
126238
126299
|
children: holdOrUnHoldLoading ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
126239
126300
|
CircularProgress_default,
|
|
126240
126301
|
{
|
|
126241
126302
|
size: "20px",
|
|
126242
126303
|
sx: { color: theme.palette.primary.main }
|
|
126243
126304
|
}
|
|
126244
|
-
) : isVertical ? ((
|
|
126305
|
+
) : isVertical ? ((_wa = state.callData) == null ? void 0 : _wa.hold) === 1 ? "Resume" : "Hold" : ((_xa = state.callData) == null ? void 0 : _xa.hold) === 1 ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(PlayArrow_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Pause_default, {})
|
|
126245
126306
|
}
|
|
126246
126307
|
) }) }),
|
|
126247
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title:
|
|
126308
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title: muteFeatureDisabled ? "Mute feature is disabled" : ((_ya = state.callData) == null ? void 0 : _ya.mute) === 1 ? "Unmute" : "Mute", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Box_default, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
126248
126309
|
Button_default,
|
|
126249
126310
|
{
|
|
126250
126311
|
variant: ((_za = state.callData) == null ? void 0 : _za.mute) === 1 && ((_Ba = (_Aa = state.callData) == null ? void 0 : _Aa.status) == null ? void 0 : _Ba.toUpperCase()) === "ONCALL" /* ONCALL */ ? "contained" : "outlined",
|
|
126251
126312
|
startIcon: isVertical ? muteOrUnMuteLoading ? void 0 : ((_Ca = state.callData) == null ? void 0 : _Ca.mute) === 1 ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(MicOff_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Mic_default, {}) : void 0,
|
|
126252
126313
|
onClick: (e) => {
|
|
126253
|
-
var _a3;
|
|
126254
126314
|
e.stopPropagation();
|
|
126255
|
-
if (!
|
|
126315
|
+
if (!muteFeatureDisabled) {
|
|
126256
126316
|
handleMuteToggle();
|
|
126257
126317
|
}
|
|
126258
126318
|
},
|
|
126259
|
-
sx:
|
|
126260
|
-
disabled: ((
|
|
126319
|
+
sx: muteFeatureDisabled || ((_Da = state.callData) == null ? void 0 : _Da.hold) === 1 ? __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((_Ea = state.callData) == null ? void 0 : _Ea.mute) === 1 && ((_Ga = (_Fa = state.callData) == null ? void 0 : _Fa.status) == null ? void 0 : _Ga.toUpperCase()) === "ONCALL" /* ONCALL */ ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((_Ia = (_Ha = state.callData) == null ? void 0 : _Ha.status) == null ? void 0 : _Ia.toUpperCase()) === "ONCALL" /* ONCALL */ ? __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
|
|
126320
|
+
disabled: ((_Ka = (_Ja = state.callData) == null ? void 0 : _Ja.status) == null ? void 0 : _Ka.toUpperCase()) !== "ONCALL" /* ONCALL */ && ((_La = state.callData) == null ? void 0 : _La.mute) !== 1 || muteOrUnMuteLoading || ((_Ma = state.callData) == null ? void 0 : _Ma.hold) === 1 || muteFeatureDisabled,
|
|
126261
126321
|
children: muteOrUnMuteLoading ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
126262
126322
|
CircularProgress_default,
|
|
126263
126323
|
{
|
|
126264
126324
|
size: "20px",
|
|
126265
126325
|
sx: { color: theme.palette.primary.main }
|
|
126266
126326
|
}
|
|
126267
|
-
) : isVertical ? ((
|
|
126327
|
+
) : isVertical ? ((_Na = state.callData) == null ? void 0 : _Na.mute) === 1 ? "Unmute" : "Mute" : ((_Oa = state.callData) == null ? void 0 : _Oa.mute) === 1 ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(MicOff_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Mic_default, {})
|
|
126268
126328
|
}
|
|
126269
126329
|
) }) }),
|
|
126270
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title: ((
|
|
126330
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title: ((_Pa = state.sdkConfig) == null ? void 0 : _Pa.disableCallTransferButton) ? "Transfer Call feature is disabled" : "Transfer Call", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Box_default, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
126271
126331
|
Button_default,
|
|
126272
126332
|
{
|
|
126273
126333
|
variant: state.openCallTransferDialog ? "contained" : "outlined",
|
|
@@ -126279,12 +126339,12 @@ function CallControls({ onDataChange }) {
|
|
|
126279
126339
|
sdkStateManager.setOpenCallTransferDialog(true);
|
|
126280
126340
|
}
|
|
126281
126341
|
},
|
|
126282
|
-
sx: state.openCallTransferDialog ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((
|
|
126283
|
-
disabled: ((
|
|
126342
|
+
sx: state.openCallTransferDialog ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((_Ra = (_Qa = state.callData) == null ? void 0 : _Qa.status) == null ? void 0 : _Ra.toUpperCase()) === "ONCALL" /* ONCALL */ && !((_Sa = state.sdkConfig) == null ? void 0 : _Sa.disableCallTransferButton) ? __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
|
|
126343
|
+
disabled: ((_Ua = (_Ta = state.callData) == null ? void 0 : _Ta.status) == null ? void 0 : _Ua.toUpperCase()) !== "ONCALL" /* ONCALL */ || ((_Va = state.sdkConfig) == null ? void 0 : _Va.disableCallTransferButton),
|
|
126284
126344
|
children: isVertical ? "Transfer" : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(TransferWithinAStation_default, {})
|
|
126285
126345
|
}
|
|
126286
126346
|
) }) }),
|
|
126287
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title: ((
|
|
126347
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title: ((_Wa = state.sdkConfig) == null ? void 0 : _Wa.disableConferenceButton) ? "Conference Call feature is disabled" : "Conference Call", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Box_default, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
126288
126348
|
Button_default,
|
|
126289
126349
|
{
|
|
126290
126350
|
variant: state.openConferenceDialog ? "contained" : "outlined",
|
|
@@ -126296,12 +126356,12 @@ function CallControls({ onDataChange }) {
|
|
|
126296
126356
|
sdkStateManager.setOpenConferenceDialog(true);
|
|
126297
126357
|
}
|
|
126298
126358
|
},
|
|
126299
|
-
sx: state.openConferenceDialog ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((
|
|
126300
|
-
disabled: ((
|
|
126359
|
+
sx: state.openConferenceDialog ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ((_Ya = (_Xa = state.callData) == null ? void 0 : _Xa.status) == null ? void 0 : _Ya.toUpperCase()) === "ONCALL" /* ONCALL */ && !((_Za = state.sdkConfig) == null ? void 0 : _Za.disableConferenceButton) ? __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
|
|
126360
|
+
disabled: ((_$a = (__a = state.callData) == null ? void 0 : __a.status) == null ? void 0 : _$a.toUpperCase()) !== "ONCALL" /* ONCALL */ || ((_ab = state.sdkConfig) == null ? void 0 : _ab.disableConferenceButton),
|
|
126301
126361
|
children: isVertical ? "Conference" : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Group_default, {})
|
|
126302
126362
|
}
|
|
126303
126363
|
) }) }),
|
|
126304
|
-
((
|
|
126364
|
+
((_bb = state.sdkConfig) == null ? void 0 : _bb.enableSmsServices) && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title: "Send SMS", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
126305
126365
|
Button_default,
|
|
126306
126366
|
{
|
|
126307
126367
|
variant: Boolean(ambulanceAnchorEl) ? "contained" : "outlined",
|
|
@@ -126316,15 +126376,15 @@ function CallControls({ onDataChange }) {
|
|
|
126316
126376
|
}
|
|
126317
126377
|
},
|
|
126318
126378
|
sx: Boolean(ambulanceAnchorEl) ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : ["ONCALL" /* ONCALL */, "WRAPUP" /* WRAPUP */].includes(
|
|
126319
|
-
(
|
|
126379
|
+
(_db = (_cb = state.callData) == null ? void 0 : _cb.status) == null ? void 0 : _db.toUpperCase()
|
|
126320
126380
|
) ? __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, disabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
|
|
126321
126381
|
disabled: !["ONCALL" /* ONCALL */, "WRAPUP" /* WRAPUP */].includes(
|
|
126322
|
-
(
|
|
126382
|
+
(_fb = (_eb = state.callData) == null ? void 0 : _eb.status) == null ? void 0 : _fb.toUpperCase()
|
|
126323
126383
|
),
|
|
126324
126384
|
children: isVertical ? "Send SMS" : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(SmsSharp_default, {})
|
|
126325
126385
|
}
|
|
126326
126386
|
) }),
|
|
126327
|
-
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title: ((
|
|
126387
|
+
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title: ((_gb = state.sdkConfig) == null ? void 0 : _gb.disableEndCallButton) ? "End Call feature is disabled" : "End Call", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Box_default, { component: "span", sx: isVertical ? { display: "block" } : {}, children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
126328
126388
|
Button_default,
|
|
126329
126389
|
{
|
|
126330
126390
|
variant: [
|
|
@@ -126332,7 +126392,7 @@ function CallControls({ onDataChange }) {
|
|
|
126332
126392
|
"RINGING" /* RINGING */,
|
|
126333
126393
|
"DIALING" /* DIALING */,
|
|
126334
126394
|
"WRAPUP" /* WRAPUP */
|
|
126335
|
-
].includes((
|
|
126395
|
+
].includes((_ib = (_hb = state.callData) == null ? void 0 : _hb.status) == null ? void 0 : _ib.toUpperCase()) && !((_jb = state.sdkConfig) == null ? void 0 : _jb.disableEndCallButton) ? "contained" : "outlined",
|
|
126336
126396
|
startIcon: isVertical && !endCallLoading ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(CallEnd_default, {}) : void 0,
|
|
126337
126397
|
onClick: (e) => {
|
|
126338
126398
|
var _a3, _b2, _c2;
|
|
@@ -126351,7 +126411,7 @@ function CallControls({ onDataChange }) {
|
|
|
126351
126411
|
"RINGING" /* RINGING */,
|
|
126352
126412
|
"DIALING" /* DIALING */,
|
|
126353
126413
|
"WRAPUP" /* WRAPUP */
|
|
126354
|
-
].includes((
|
|
126414
|
+
].includes((_lb = (_kb = state.callData) == null ? void 0 : _kb.status) == null ? void 0 : _lb.toUpperCase()) && !((_mb = state.sdkConfig) == null ? void 0 : _mb.disableEndCallButton) ? __spreadValues(__spreadProps(__spreadValues({}, enabled), {
|
|
126355
126415
|
borderRight: "1px",
|
|
126356
126416
|
backgroundColor: "error.main",
|
|
126357
126417
|
minWidth: "60px !important",
|
|
@@ -126375,11 +126435,11 @@ function CallControls({ onDataChange }) {
|
|
|
126375
126435
|
"RINGING" /* RINGING */,
|
|
126376
126436
|
"DIALING" /* DIALING */,
|
|
126377
126437
|
"WRAPUP" /* WRAPUP */
|
|
126378
|
-
].includes((
|
|
126438
|
+
].includes((_ob = (_nb = state.callData) == null ? void 0 : _nb.status) == null ? void 0 : _ob.toUpperCase()) || endCallLoading || ((_pb = state.sdkConfig) == null ? void 0 : _pb.disableEndCallButton),
|
|
126379
126439
|
children: endCallLoading ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(CircularProgress_default, { size: "20px", color: "error" }) : isVertical ? "End Call" : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(CallEnd_default, {})
|
|
126380
126440
|
}
|
|
126381
126441
|
) }) }),
|
|
126382
|
-
!((
|
|
126442
|
+
!((_qb = state.sdkConfig) == null ? void 0 : _qb.disabledMoreOptionsButton) && processList && (processList == null ? void 0 : processList.length) > 1 && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Tooltip_default, { title: "Switch Process", children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
126383
126443
|
Button_default,
|
|
126384
126444
|
{
|
|
126385
126445
|
variant: Boolean(moreOptionsAnchorEl) ? "contained" : "outlined",
|
|
@@ -126395,7 +126455,7 @@ function CallControls({ onDataChange }) {
|
|
|
126395
126455
|
},
|
|
126396
126456
|
sx: Boolean(moreOptionsAnchorEl) ? __spreadValues(__spreadValues({}, enabled), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }) : __spreadValues(__spreadValues({}, outlined), isVertical && { justifyContent: "flex-start", width: "100%", px: 2 }),
|
|
126397
126457
|
disabled: !["BREAK" /* BREAK */, "IDLE" /* IDLE */].includes(
|
|
126398
|
-
(
|
|
126458
|
+
(_sb = (_rb = state.callData) == null ? void 0 : _rb.status) == null ? void 0 : _sb.toUpperCase()
|
|
126399
126459
|
),
|
|
126400
126460
|
children: isVertical ? "Switch Process" : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(MoreVert_default, {})
|
|
126401
126461
|
}
|
|
@@ -126428,7 +126488,7 @@ function CallControls({ onDataChange }) {
|
|
|
126428
126488
|
transition: theme.transitions.create(["box-shadow", "transform"], {
|
|
126429
126489
|
duration: theme.transitions.duration.short
|
|
126430
126490
|
}),
|
|
126431
|
-
visibility: showIframe && !((
|
|
126491
|
+
visibility: showIframe && !((_tb = state.sdkConfig) == null ? void 0 : _tb.disableSoftPhone) ? "visible" : "hidden",
|
|
126432
126492
|
userSelect: "none"
|
|
126433
126493
|
},
|
|
126434
126494
|
children: [
|
|
@@ -126463,7 +126523,7 @@ function CallControls({ onDataChange }) {
|
|
|
126463
126523
|
/* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
|
|
126464
126524
|
"iframe",
|
|
126465
126525
|
{
|
|
126466
|
-
src: `${(
|
|
126526
|
+
src: `${(_ub = state.urlConfig) == null ? void 0 : _ub.iframeURL}/static/phone/index.html?user_id=${(_vb = state.urlConfig) == null ? void 0 : _vb.id}&api_url=${(_wb = state.urlConfig) == null ? void 0 : _wb.iframeAPIURL}&token=${(_xb = state.authorization) == null ? void 0 : _xb.accessToken}`,
|
|
126467
126527
|
height: 380,
|
|
126468
126528
|
width: 420,
|
|
126469
126529
|
allow: "camera; microphone; autoplay",
|