call-control-sdk 6.4.9 → 6.4.10-dev.2

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 CHANGED
@@ -61,7 +61,7 @@ __export(index_exports, {
61
61
  module.exports = __toCommonJS(index_exports);
62
62
 
63
63
  // call-control-sdk/lib/services/endPoint.ts
64
- var IP = "cti.aighospitals.com";
64
+ var IP = "uat-cti.aighospitals.com";
65
65
  var BASE_URL = `https://${IP}:8095`;
66
66
  var WS_BASE_URL = `wss://${IP}:8095`;
67
67
  var VERSION = {
@@ -1418,7 +1418,7 @@ var styles_default = useStyles;
1418
1418
  // call-control-sdk/lib/components/dialog.tsx
1419
1419
  var import_jsx_runtime2 = require("react/jsx-runtime");
1420
1420
  var ConferenceTableRow = ({ each }) => {
1421
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
1421
+ var _a2, _b, _c, _d, _e;
1422
1422
  const state = useSDKState();
1423
1423
  const { showToast } = useToast();
1424
1424
  const { disabled, enabled, outlined } = styles_default({
@@ -1589,7 +1589,7 @@ var ConferenceTableRow = ({ each }) => {
1589
1589
  {
1590
1590
  sx: {
1591
1591
  padding: "6px",
1592
- width: "100px"
1592
+ width: "150px"
1593
1593
  },
1594
1594
  children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1595
1595
  import_material3.Typography,
@@ -1598,7 +1598,7 @@ var ConferenceTableRow = ({ each }) => {
1598
1598
  sx: {
1599
1599
  px: 1,
1600
1600
  borderRadius: "10px",
1601
- flex: 1
1601
+ width: "150px"
1602
1602
  },
1603
1603
  children: (_e = each == null ? void 0 : each.status) != null ? _e : ""
1604
1604
  }
@@ -1646,17 +1646,20 @@ var ConferenceTableRow = ({ each }) => {
1646
1646
  gap: "10px"
1647
1647
  },
1648
1648
  children: [
1649
- (each == null ? void 0 : each.line) === 1 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.Tooltip, { title: ((_f = state.callData) == null ? void 0 : _f.hold) === 1 ? "Resume" : "Hold", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1649
+ (each == null ? void 0 : each.line) === 1 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.Tooltip, { title: (each == null ? void 0 : each.status) !== "HOLD" ? "Hold" : "Resume", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1650
1650
  import_material3.Button,
1651
1651
  {
1652
- variant: ((_g = state.callData) == null ? void 0 : _g.hold) === 1 && ((_i = (_h = state.callData) == null ? void 0 : _h.status) == null ? void 0 : _i.toUpperCase()) === "ONCALL" ? "contained" : "outlined",
1653
- onClick: (e) => {
1654
- e.stopPropagation();
1655
- handleHoldToggle();
1652
+ variant: (each == null ? void 0 : each.status) === "HOLD" ? "contained" : "outlined",
1653
+ sx: (each == null ? void 0 : each.status) === "CONFERENCE" ? __spreadValues({}, outlined) : __spreadValues({}, disabled),
1654
+ onClick: () => {
1655
+ if (each.status === "HOLD") {
1656
+ onHoldOrUnHoldConferenceCall(each, { isHold: false }, "UNHOLDUSER");
1657
+ } else {
1658
+ onHoldOrUnHoldConferenceCall(each, { isHold: true }, "HOLDUSER");
1659
+ }
1656
1660
  },
1657
- sx: ((_j = state.callData) == null ? void 0 : _j.hold) === 1 && ((_l = (_k = state.callData) == null ? void 0 : _k.status) == null ? void 0 : _l.toUpperCase()) === "ONCALL" ? __spreadValues({}, enabled) : ((_n = (_m = state.callData) == null ? void 0 : _m.status) == null ? void 0 : _n.toUpperCase()) === "ONCALL" ? __spreadValues({}, outlined) : __spreadValues({}, disabled),
1658
- disabled: ((_p = (_o = state.callData) == null ? void 0 : _o.status) == null ? void 0 : _p.toUpperCase()) !== "ONCALL" && ((_q = state.callData) == null ? void 0 : _q.hold) !== 1 || holdOrUnHoldLoading,
1659
- children: ((_r = state.callData) == null ? void 0 : _r.hold) === 1 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1661
+ disabled: (each == null ? void 0 : each.status) !== "CONFERENCE" && (each == null ? void 0 : each.status) !== "HOLD" || conferenceCallHoldOrUnHold,
1662
+ children: each.status === "HOLD" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1660
1663
  import_material3.Box,
1661
1664
  {
1662
1665
  sx: {
@@ -1673,12 +1676,12 @@ var ConferenceTableRow = ({ each }) => {
1673
1676
  variant: "body2",
1674
1677
  sx: {
1675
1678
  fontSize: "12px",
1676
- color: ((_s = state.callData) == null ? void 0 : _s.hold) === 1 ? "#fff" : "initial"
1679
+ color: each.status === "HOLD" ? "#fff" : "initial"
1677
1680
  },
1678
1681
  children: "Unhold"
1679
1682
  }
1680
1683
  ),
1681
- holdOrUnHoldLoading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1684
+ conferenceCallHoldOrUnHold ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1682
1685
  import_material3.CircularProgress,
1683
1686
  {
1684
1687
  size: "16px",
@@ -1705,13 +1708,13 @@ var ConferenceTableRow = ({ each }) => {
1705
1708
  {
1706
1709
  variant: "body2",
1707
1710
  sx: {
1708
- color: ((_t = state.callData) == null ? void 0 : _t.hold) === 1 ? "#fff" : "#000",
1711
+ color: each.status === "HOLD" ? "#fff" : "#000",
1709
1712
  fontSize: "12px"
1710
1713
  },
1711
1714
  children: "Hold"
1712
1715
  }
1713
1716
  ),
1714
- holdOrUnHoldLoading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1717
+ conferenceCallHoldOrUnHold ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1715
1718
  import_material3.CircularProgress,
1716
1719
  {
1717
1720
  size: "16px",
@@ -1776,7 +1779,7 @@ var ConferenceTableRow = ({ each }) => {
1776
1779
  children: conferenceCallMerge ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.CircularProgress, { size: "20px" }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons_material.CallSplit, {})
1777
1780
  }
1778
1781
  ) }),
1779
- (each == null ? void 0 : each.line) !== 1 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.Tooltip, { title: (each == null ? void 0 : each.status) !== "HOLD" ? "Hold" : "Un Hold", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1782
+ (each == null ? void 0 : each.line) !== 1 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material3.Tooltip, { title: (each == null ? void 0 : each.status) !== "HOLD" ? "Hold" : "Resume", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1780
1783
  import_material3.Button,
1781
1784
  {
1782
1785
  variant: (each == null ? void 0 : each.status) === "HOLD" ? "contained" : "outlined",