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.mjs CHANGED
@@ -20,7 +20,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
21
21
 
22
22
  // call-control-sdk/lib/services/endPoint.ts
23
- var IP = "cti.aighospitals.com";
23
+ var IP = "uat-cti.aighospitals.com";
24
24
  var BASE_URL = `https://${IP}:8095`;
25
25
  var WS_BASE_URL = `wss://${IP}:8095`;
26
26
  var VERSION = {
@@ -1435,7 +1435,7 @@ var styles_default = useStyles;
1435
1435
  // call-control-sdk/lib/components/dialog.tsx
1436
1436
  import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1437
1437
  var ConferenceTableRow = ({ each }) => {
1438
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
1438
+ var _a2, _b, _c, _d, _e;
1439
1439
  const state = useSDKState();
1440
1440
  const { showToast } = useToast();
1441
1441
  const { disabled, enabled, outlined } = styles_default({
@@ -1606,7 +1606,7 @@ var ConferenceTableRow = ({ each }) => {
1606
1606
  {
1607
1607
  sx: {
1608
1608
  padding: "6px",
1609
- width: "100px"
1609
+ width: "150px"
1610
1610
  },
1611
1611
  children: /* @__PURE__ */ jsx2(
1612
1612
  Typography,
@@ -1615,7 +1615,7 @@ var ConferenceTableRow = ({ each }) => {
1615
1615
  sx: {
1616
1616
  px: 1,
1617
1617
  borderRadius: "10px",
1618
- flex: 1
1618
+ width: "150px"
1619
1619
  },
1620
1620
  children: (_e = each == null ? void 0 : each.status) != null ? _e : ""
1621
1621
  }
@@ -1663,17 +1663,20 @@ var ConferenceTableRow = ({ each }) => {
1663
1663
  gap: "10px"
1664
1664
  },
1665
1665
  children: [
1666
- (each == null ? void 0 : each.line) === 1 && /* @__PURE__ */ jsx2(Tooltip, { title: ((_f = state.callData) == null ? void 0 : _f.hold) === 1 ? "Resume" : "Hold", children: /* @__PURE__ */ jsx2(
1666
+ (each == null ? void 0 : each.line) === 1 && /* @__PURE__ */ jsx2(Tooltip, { title: (each == null ? void 0 : each.status) !== "HOLD" ? "Hold" : "Resume", children: /* @__PURE__ */ jsx2(
1667
1667
  Button,
1668
1668
  {
1669
- 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",
1670
- onClick: (e) => {
1671
- e.stopPropagation();
1672
- handleHoldToggle();
1669
+ variant: (each == null ? void 0 : each.status) === "HOLD" ? "contained" : "outlined",
1670
+ sx: (each == null ? void 0 : each.status) === "CONFERENCE" ? __spreadValues({}, outlined) : __spreadValues({}, disabled),
1671
+ onClick: () => {
1672
+ if (each.status === "HOLD") {
1673
+ onHoldOrUnHoldConferenceCall(each, { isHold: false }, "UNHOLDUSER");
1674
+ } else {
1675
+ onHoldOrUnHoldConferenceCall(each, { isHold: true }, "HOLDUSER");
1676
+ }
1673
1677
  },
1674
- 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),
1675
- 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,
1676
- children: ((_r = state.callData) == null ? void 0 : _r.hold) === 1 ? /* @__PURE__ */ jsxs2(
1678
+ disabled: (each == null ? void 0 : each.status) !== "CONFERENCE" && (each == null ? void 0 : each.status) !== "HOLD" || conferenceCallHoldOrUnHold,
1679
+ children: each.status === "HOLD" ? /* @__PURE__ */ jsxs2(
1677
1680
  Box,
1678
1681
  {
1679
1682
  sx: {
@@ -1690,12 +1693,12 @@ var ConferenceTableRow = ({ each }) => {
1690
1693
  variant: "body2",
1691
1694
  sx: {
1692
1695
  fontSize: "12px",
1693
- color: ((_s = state.callData) == null ? void 0 : _s.hold) === 1 ? "#fff" : "initial"
1696
+ color: each.status === "HOLD" ? "#fff" : "initial"
1694
1697
  },
1695
1698
  children: "Unhold"
1696
1699
  }
1697
1700
  ),
1698
- holdOrUnHoldLoading ? /* @__PURE__ */ jsx2(
1701
+ conferenceCallHoldOrUnHold ? /* @__PURE__ */ jsx2(
1699
1702
  CircularProgress,
1700
1703
  {
1701
1704
  size: "16px",
@@ -1722,13 +1725,13 @@ var ConferenceTableRow = ({ each }) => {
1722
1725
  {
1723
1726
  variant: "body2",
1724
1727
  sx: {
1725
- color: ((_t = state.callData) == null ? void 0 : _t.hold) === 1 ? "#fff" : "#000",
1728
+ color: each.status === "HOLD" ? "#fff" : "#000",
1726
1729
  fontSize: "12px"
1727
1730
  },
1728
1731
  children: "Hold"
1729
1732
  }
1730
1733
  ),
1731
- holdOrUnHoldLoading ? /* @__PURE__ */ jsx2(
1734
+ conferenceCallHoldOrUnHold ? /* @__PURE__ */ jsx2(
1732
1735
  CircularProgress,
1733
1736
  {
1734
1737
  size: "16px",
@@ -1793,7 +1796,7 @@ var ConferenceTableRow = ({ each }) => {
1793
1796
  children: conferenceCallMerge ? /* @__PURE__ */ jsx2(CircularProgress, { size: "20px" }) : /* @__PURE__ */ jsx2(CallSplit, {})
1794
1797
  }
1795
1798
  ) }),
1796
- (each == null ? void 0 : each.line) !== 1 && /* @__PURE__ */ jsx2(Tooltip, { title: (each == null ? void 0 : each.status) !== "HOLD" ? "Hold" : "Un Hold", children: /* @__PURE__ */ jsx2(
1799
+ (each == null ? void 0 : each.line) !== 1 && /* @__PURE__ */ jsx2(Tooltip, { title: (each == null ? void 0 : each.status) !== "HOLD" ? "Hold" : "Resume", children: /* @__PURE__ */ jsx2(
1797
1800
  Button,
1798
1801
  {
1799
1802
  variant: (each == null ? void 0 : each.status) === "HOLD" ? "contained" : "outlined",