call-control-sdk 6.5.5-uat.3 → 6.5.5-uat.4
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/index.js +12 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1137,7 +1137,7 @@ var styles_default = useStyles;
|
|
|
1137
1137
|
|
|
1138
1138
|
// call-control-sdk/lib/components/dialog.tsx
|
|
1139
1139
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1140
|
-
var ConferenceTableRow = ({ each }) => {
|
|
1140
|
+
var ConferenceTableRow = ({ each, isLineDialing }) => {
|
|
1141
1141
|
var _a2, _b, _c, _d, _e, _f;
|
|
1142
1142
|
const state = useSDKState();
|
|
1143
1143
|
const theme = (0, import_material3.useTheme)();
|
|
@@ -1327,7 +1327,7 @@ var ConferenceTableRow = ({ each }) => {
|
|
|
1327
1327
|
placeholder: "Phone Number",
|
|
1328
1328
|
fullWidth: true,
|
|
1329
1329
|
value: (each == null ? void 0 : each.phone) || "",
|
|
1330
|
-
disabled: (each == null ? void 0 : each.line) === 1 || ["ONCALL" /* ONCALL */, "DISCONNECTED" /* DISCONNECTED */, "CONFERENCE" /* CONFERENCE */, "HOLD" /* HOLD */, "MUTE" /* MUTE */, "DIALING" /* DIALING */, "RINGING" /* RINGING */].includes((_f = each == null ? void 0 : each.status) != null ? _f : ""),
|
|
1330
|
+
disabled: (each == null ? void 0 : each.line) === 1 || ["ONCALL" /* ONCALL */, "DISCONNECTED" /* DISCONNECTED */, "CONFERENCE" /* CONFERENCE */, "HOLD" /* HOLD */, "MUTE" /* MUTE */, "DIALING" /* DIALING */, "RINGING" /* RINGING */].includes((_f = each == null ? void 0 : each.status) != null ? _f : "") || isLineDialing,
|
|
1331
1331
|
onChange: (e) => {
|
|
1332
1332
|
onConferenceLineUpdate(each, { phone: e.target.value });
|
|
1333
1333
|
}
|
|
@@ -1455,7 +1455,7 @@ var ConferenceTableRow = ({ each }) => {
|
|
|
1455
1455
|
onClick: () => {
|
|
1456
1456
|
onConferenceCallStart(each, {});
|
|
1457
1457
|
},
|
|
1458
|
-
disabled: (each == null ? void 0 : each.status) !== "IDLE" /* IDLE
|
|
1458
|
+
disabled: (each == null ? void 0 : each.status) !== "IDLE" /* IDLE */ || isLineDialing,
|
|
1459
1459
|
children: conferenceCallStart ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1460
1460
|
import_material3.CircularProgress,
|
|
1461
1461
|
{
|
|
@@ -1556,7 +1556,7 @@ var ConferenceTableRow = ({ each }) => {
|
|
|
1556
1556
|
);
|
|
1557
1557
|
};
|
|
1558
1558
|
function ConferenceDialog() {
|
|
1559
|
-
var _a2;
|
|
1559
|
+
var _a2, _b;
|
|
1560
1560
|
const state = useSDKState();
|
|
1561
1561
|
const { showToast } = useToast();
|
|
1562
1562
|
const [conferenceCallEndAll, setConferenceCallEndAll] = (0, import_react9.useState)(false);
|
|
@@ -1564,12 +1564,12 @@ function ConferenceDialog() {
|
|
|
1564
1564
|
sdkStateManager.setOpenConferenceDialog(false);
|
|
1565
1565
|
};
|
|
1566
1566
|
const onEndAllConferenceCalls = () => {
|
|
1567
|
-
var _a3,
|
|
1567
|
+
var _a3, _b2, _c, _d;
|
|
1568
1568
|
setConferenceCallEndAll(true);
|
|
1569
1569
|
const payload = {
|
|
1570
1570
|
action: "EXTERNAL_CONFERENCE",
|
|
1571
1571
|
operation: "ENDCONFERENCE",
|
|
1572
|
-
userid: (
|
|
1572
|
+
userid: (_b2 = (_a3 = state.callData) == null ? void 0 : _a3.agent_id) != null ? _b2 : "",
|
|
1573
1573
|
process: (_d = (_c = state.callData) == null ? void 0 : _c.process_name) != null ? _d : ""
|
|
1574
1574
|
};
|
|
1575
1575
|
axios_default.post(END_POINT.CONFERENCE_CALL_END_ALL, payload).then((res) => {
|
|
@@ -1578,13 +1578,15 @@ function ConferenceDialog() {
|
|
|
1578
1578
|
sdkStateManager.resetConferenceLines();
|
|
1579
1579
|
handleClose();
|
|
1580
1580
|
}).catch((err) => {
|
|
1581
|
-
var _a4,
|
|
1582
|
-
const message = ((
|
|
1581
|
+
var _a4, _b3, _c2, _d2;
|
|
1582
|
+
const message = ((_b3 = (_a4 = err.response) == null ? void 0 : _a4.data) == null ? void 0 : _b3.detail) || ((_d2 = (_c2 = err.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || err.message || "An unknown error occurred";
|
|
1583
1583
|
showToast(message, "error");
|
|
1584
1584
|
}).finally(() => {
|
|
1585
1585
|
setConferenceCallEndAll(false);
|
|
1586
1586
|
});
|
|
1587
1587
|
};
|
|
1588
|
+
const isLineDialing = (_a2 = state == null ? void 0 : state.conferenceLine) == null ? void 0 : _a2.some((item) => (item == null ? void 0 : item.status) === "DIALING" /* DIALING */);
|
|
1589
|
+
console.log("dataaaaa", state == null ? void 0 : state.conferenceLine, isLineDialing);
|
|
1588
1590
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1589
1591
|
import_material3.Dialog,
|
|
1590
1592
|
{
|
|
@@ -1604,7 +1606,7 @@ function ConferenceDialog() {
|
|
|
1604
1606
|
},
|
|
1605
1607
|
children: [
|
|
1606
1608
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_material3.Typography, { variant: "body1", children: [
|
|
1607
|
-
(
|
|
1609
|
+
(_b = state == null ? void 0 : state.agentId) != null ? _b : "",
|
|
1608
1610
|
" conference"
|
|
1609
1611
|
] }),
|
|
1610
1612
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.IconButton, { onClick: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons_material.Close, {}) })
|
|
@@ -1680,7 +1682,7 @@ function ConferenceDialog() {
|
|
|
1680
1682
|
]
|
|
1681
1683
|
}
|
|
1682
1684
|
) }),
|
|
1683
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.TableBody, { children: state == null ? void 0 : state.conferenceLine.map((each) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ConferenceTableRow, { each })) })
|
|
1685
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.TableBody, { children: state == null ? void 0 : state.conferenceLine.map((each) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ConferenceTableRow, { each, isLineDialing })) })
|
|
1684
1686
|
]
|
|
1685
1687
|
}
|
|
1686
1688
|
)
|