ahs-cti 0.0.28 → 0.0.30
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/{agentDetailReport-6HFIDHTC.mjs → agentDetailReport-5KLUBUZH.mjs} +2 -2
- package/dist/{agentPerformanceReport-6D2O4FXM.mjs → agentPerformanceReport-6CT6PKDS.mjs} +113 -101
- package/dist/agentPerformanceReport-6CT6PKDS.mjs.map +1 -0
- package/dist/{callHistory-DDMQBE7X.mjs → callHistory-OBF5Z6DU.mjs} +3 -5
- package/dist/{callHistory-DDMQBE7X.mjs.map → callHistory-OBF5Z6DU.mjs.map} +1 -1
- package/dist/{campaigns-WR2342WE.mjs → campaigns-DSC5PBRM.mjs} +139 -100
- package/dist/campaigns-DSC5PBRM.mjs.map +1 -0
- package/dist/{chunk-6AXXYS36.mjs → chunk-3OVYSB7R.mjs} +22 -11
- package/dist/chunk-3OVYSB7R.mjs.map +1 -0
- package/dist/{chunk-DT4DCE7W.mjs → chunk-TDKW6IXV.mjs} +10 -3
- package/dist/chunk-TDKW6IXV.mjs.map +1 -0
- package/dist/index.d.mts +1 -54
- package/dist/index.d.ts +2 -55
- package/dist/index.js +2214 -2142
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -9
- package/dist/index.mjs.map +1 -1
- package/dist-react/{agentDetailReport-D4SIU3BC.mjs → agentDetailReport-D6YX5EWT.mjs} +2 -2
- package/dist-react/{agentPerformanceReport-PBIC23DB.mjs → agentPerformanceReport-IGTLLSZV.mjs} +40 -21
- package/dist-react/agentPerformanceReport-IGTLLSZV.mjs.map +1 -0
- package/dist-react/{campaigns-QRYQRSLX.mjs → campaigns-S4LFD5EX.mjs} +124 -90
- package/dist-react/campaigns-S4LFD5EX.mjs.map +1 -0
- package/dist-react/{chunk-GE5Q5DRU.mjs → chunk-IYYH5PCQ.mjs} +14 -10
- package/dist-react/chunk-IYYH5PCQ.mjs.map +1 -0
- package/dist-react/index.d.mts +1 -54
- package/dist-react/index.d.ts +1 -54
- package/dist-react/index.js +179 -120
- package/dist-react/index.js.map +1 -1
- package/dist-react/index.mjs +7 -4
- package/dist-react/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/agentPerformanceReport-6D2O4FXM.mjs.map +0 -1
- package/dist/campaigns-WR2342WE.mjs.map +0 -1
- package/dist/chunk-6AXXYS36.mjs.map +0 -1
- package/dist/chunk-DT4DCE7W.mjs.map +0 -1
- package/dist/chunk-LJACVXXL.mjs +0 -24
- package/dist/chunk-LJACVXXL.mjs.map +0 -1
- package/dist-react/agentPerformanceReport-PBIC23DB.mjs.map +0 -1
- package/dist-react/campaigns-QRYQRSLX.mjs.map +0 -1
- package/dist-react/chunk-GE5Q5DRU.mjs.map +0 -1
- /package/dist/{agentDetailReport-6HFIDHTC.mjs.map → agentDetailReport-5KLUBUZH.mjs.map} +0 -0
- /package/dist-react/{agentDetailReport-D4SIU3BC.mjs.map → agentDetailReport-D6YX5EWT.mjs.map} +0 -0
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
} from "./chunk-SQSETW3L.mjs";
|
|
42
42
|
|
|
43
43
|
// call-control-sdk/lib/pages/campaigns/index.tsx
|
|
44
|
-
import { memo, useCallback as useCallback2, useEffect, useRef, useState as useState2 } from "react";
|
|
44
|
+
import React, { memo, useCallback as useCallback2, useEffect, useRef, useState as useState2 } from "react";
|
|
45
45
|
import {
|
|
46
46
|
Box,
|
|
47
47
|
Chip,
|
|
@@ -68,12 +68,15 @@ import {
|
|
|
68
68
|
TextField,
|
|
69
69
|
Tooltip,
|
|
70
70
|
Typography,
|
|
71
|
-
useTheme as useTheme2
|
|
71
|
+
useTheme as useTheme2,
|
|
72
|
+
Collapse
|
|
72
73
|
} from "@mui/material";
|
|
73
74
|
import AddIcon from "@mui/icons-material/Add";
|
|
74
75
|
import ArchiveIcon from "@mui/icons-material/Archive";
|
|
75
76
|
import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
|
|
76
77
|
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
|
|
78
|
+
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
|
79
|
+
import KeyboardArrowRightIcon from "@mui/icons-material/KeyboardArrowRight";
|
|
77
80
|
import DeleteIcon from "@mui/icons-material/Delete";
|
|
78
81
|
import DownloadIcon from "@mui/icons-material/Download";
|
|
79
82
|
import EditIcon from "@mui/icons-material/Edit";
|
|
@@ -2053,6 +2056,7 @@ var CampaignsContent = memo(function CampaignsContent2() {
|
|
|
2053
2056
|
downloadLeadTemplate,
|
|
2054
2057
|
exportLeads
|
|
2055
2058
|
} = useLeads();
|
|
2059
|
+
const [expandedLeadIds, setExpandedLeadIds] = useState2(/* @__PURE__ */ new Set());
|
|
2056
2060
|
const { fetchQueues } = useQueues();
|
|
2057
2061
|
const [queueNameMap, setQueueNameMap] = useState2({});
|
|
2058
2062
|
useEffect(() => {
|
|
@@ -2940,93 +2944,123 @@ var CampaignsContent = memo(function CampaignsContent2() {
|
|
|
2940
2944
|
const isDialable = isDialerEnabled && hasOutboundPermission && isAgentIdle && !isCompleted && !isInProgress && dialLoading !== lead.id;
|
|
2941
2945
|
const dialTooltip = !isDialerEnabled ? "Dialer is not enabled" : !hasOutboundPermission ? "No outbound call permission" : isCompleted ? "Lead is completed" : isInProgress ? "Lead is in progress" : !isAgentIdle ? "Agent is not idle" : dialLoading === lead.id ? "Dialing\u2026" : `Call ${lead.phoneNumber}`;
|
|
2942
2946
|
const { chip: prioChip, label: prioLabel } = leadPriorityChipSx(lead.priority);
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
/* @__PURE__ */
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
},
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
{
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
2947
|
+
const visibleDisplayData = (lead.displayData || []).filter((f) => {
|
|
2948
|
+
if (f.value === null || f.value === void 0 || f.value === "") return false;
|
|
2949
|
+
if (Array.isArray(f.value) && f.value.length === 0) return false;
|
|
2950
|
+
return true;
|
|
2951
|
+
});
|
|
2952
|
+
const hasDisplayData = visibleDisplayData.length > 0;
|
|
2953
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
2954
|
+
/* @__PURE__ */ jsxs(
|
|
2955
|
+
TableRow,
|
|
2956
|
+
{
|
|
2957
|
+
sx: __spreadProps(__spreadValues({}, tableRowSx), { cursor: hasDisplayData ? "pointer" : "default" }),
|
|
2958
|
+
onClick: () => {
|
|
2959
|
+
if (!hasDisplayData) return;
|
|
2960
|
+
setExpandedLeadIds((prev) => {
|
|
2961
|
+
const next = new Set(prev);
|
|
2962
|
+
if (next.has(lead.id)) next.delete(lead.id);
|
|
2963
|
+
else next.add(lead.id);
|
|
2964
|
+
return next;
|
|
2965
|
+
});
|
|
2966
|
+
},
|
|
2967
|
+
children: [
|
|
2968
|
+
/* @__PURE__ */ jsxs(TableCell, { sx: bodyCellSx, children: [
|
|
2969
|
+
hasDisplayData ? expandedLeadIds.has(lead.id) ? /* @__PURE__ */ jsx2(KeyboardArrowDownIcon, { fontSize: "small", sx: { verticalAlign: "middle", mr: 0.5, color: "text.secondary" } }) : /* @__PURE__ */ jsx2(KeyboardArrowRightIcon, { fontSize: "small", sx: { verticalAlign: "middle", mr: 0.5, color: "text.secondary" } }) : null,
|
|
2970
|
+
lead.phoneNumber
|
|
2971
|
+
] }),
|
|
2972
|
+
/* @__PURE__ */ jsx2(TableCell, { sx: bodyCellSx, children: /* @__PURE__ */ jsx2(Chip, { label: lead.status || "pending", size: "small", sx: leadStatusChipSx(lead.status) }) }),
|
|
2973
|
+
/* @__PURE__ */ jsx2(TableCell, { sx: bodyCellSx, children: /* @__PURE__ */ jsx2(Chip, { label: prioLabel, size: "small", sx: prioChip }) }),
|
|
2974
|
+
/* @__PURE__ */ jsx2(TableCell, { sx: bodyCellSx, children: lead.source || "" }),
|
|
2975
|
+
/* @__PURE__ */ jsx2(TableCell, { sx: __spreadProps(__spreadValues({}, bodyCellSx), { maxWidth: 140, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }), children: /* @__PURE__ */ jsx2(Tooltip, { title: lead.originalCallId || "", children: /* @__PURE__ */ jsx2("span", { children: lead.originalCallId || "" }) }) }),
|
|
2976
|
+
/* @__PURE__ */ jsx2(TableCell, { sx: bodyCellSx, children: lead.queueName || "" }),
|
|
2977
|
+
/* @__PURE__ */ jsx2(TableCell, { sx: bodyCellSx, children: (_a2 = lead.attemptCount) != null ? _a2 : 0 }),
|
|
2978
|
+
/* @__PURE__ */ jsx2(TableCell, { sx: __spreadProps(__spreadValues({}, bodyCellSx), { whiteSpace: "nowrap" }), children: lead.createdAt ? new Date(lead.createdAt).toLocaleString() : "" }),
|
|
2979
|
+
/* @__PURE__ */ jsx2(TableCell, { sx: __spreadProps(__spreadValues({}, bodyCellSx), { whiteSpace: "nowrap" }), children: lead.lastAttemptAt ? new Date(lead.lastAttemptAt).toLocaleString() : "" }),
|
|
2980
|
+
/* @__PURE__ */ jsx2(TableCell, { sx: __spreadProps(__spreadValues({}, bodyCellSx), { whiteSpace: "nowrap" }), children: lead.nextAttemptAt ? new Date(lead.nextAttemptAt).toLocaleString() : "" }),
|
|
2981
|
+
/* @__PURE__ */ jsx2(TableCell, { sx: bodyCellSx, children: lead.lastOutcome || "" }),
|
|
2982
|
+
/* @__PURE__ */ jsx2(TableCell, { sx: __spreadProps(__spreadValues({}, bodyCellSx), { whiteSpace: "nowrap" }), children: lead.completedAt ? new Date(lead.completedAt).toLocaleString() : "" }),
|
|
2983
|
+
/* @__PURE__ */ jsx2(TableCell, { sx: __spreadProps(__spreadValues({}, bodyCellSx), { maxWidth: 150, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }), children: lead.notes ? /* @__PURE__ */ jsx2(Tooltip, { title: lead.notes, arrow: true, placement: "top", children: /* @__PURE__ */ jsx2("span", { children: lead.notes }) }) : "" }),
|
|
2984
|
+
/* @__PURE__ */ jsx2(TableCell, { sx: bodyCellSx, children: lead.lastReason || "" }),
|
|
2985
|
+
showVoicemail && /* @__PURE__ */ jsx2(TableCell, { sx: __spreadProps(__spreadValues({}, bodyCellSx), { minWidth: 180 }), children: lead.originalCallId ? /* @__PURE__ */ jsx2(CallRecording, { callUuid: lead.originalCallId, recordingPath: lead.voicemail, iconOnly: true }) : "" }),
|
|
2986
|
+
/* @__PURE__ */ jsxs(TableCell, { sx: __spreadProps(__spreadValues({}, bodyCellSx), { textAlign: "center", whiteSpace: "nowrap" }), children: [
|
|
2987
|
+
/* @__PURE__ */ jsx2(Tooltip, { title: dialTooltip, children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsx2(
|
|
2988
|
+
IconButton,
|
|
2989
|
+
{
|
|
2990
|
+
size: "small",
|
|
2991
|
+
onClick: () => handleDialPreview(lead.id),
|
|
2992
|
+
disabled: !isDialable,
|
|
2993
|
+
sx: {
|
|
2994
|
+
color: isDialable ? "#2e7d32" : "#bdbdbd",
|
|
2995
|
+
backgroundColor: isDialable ? "#e8f5e9" : "transparent",
|
|
2996
|
+
borderRadius: "50%",
|
|
2997
|
+
transition: "all 0.2s ease-in-out",
|
|
2998
|
+
"&:hover": {
|
|
2999
|
+
backgroundColor: isDialable ? "#43a047" : "transparent",
|
|
3000
|
+
color: isDialable ? "#fff" : "#bdbdbd",
|
|
3001
|
+
transform: isDialable ? "scale(1.2)" : "none",
|
|
3002
|
+
boxShadow: isDialable ? "0 0 8px rgba(67,160,71,0.5)" : "none"
|
|
3003
|
+
}
|
|
3004
|
+
},
|
|
3005
|
+
children: dialLoading === lead.id ? /* @__PURE__ */ jsx2(CircularProgress, { size: 16 }) : /* @__PURE__ */ jsx2(PhoneIcon, { sx: { fontSize: 18 } })
|
|
3006
|
+
}
|
|
3007
|
+
) }) }),
|
|
3008
|
+
/* @__PURE__ */ jsx2(Tooltip, { title: lead.latestCallId ? "View call details" : "No call data available", children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsx2(
|
|
3009
|
+
IconButton,
|
|
3010
|
+
{
|
|
3011
|
+
size: "small",
|
|
3012
|
+
onClick: () => handleViewCallData(lead),
|
|
3013
|
+
disabled: !lead.latestCallId,
|
|
3014
|
+
sx: {
|
|
3015
|
+
ml: 0.5,
|
|
3016
|
+
color: lead.latestCallId ? "#1A5F6C" : "#bdbdbd",
|
|
3017
|
+
"&:hover": { backgroundColor: "transparent" }
|
|
3018
|
+
},
|
|
3019
|
+
children: /* @__PURE__ */ jsx2(VisibilityOutlinedIcon, { sx: { fontSize: 18 } })
|
|
3020
|
+
}
|
|
3021
|
+
) }) }),
|
|
3022
|
+
/* @__PURE__ */ jsx2(
|
|
3023
|
+
SDKPermissionGuard,
|
|
3024
|
+
{
|
|
3025
|
+
permissions: [
|
|
3026
|
+
SDK_PERMISSIONS.CAMPAIGNS_LEADS_DELETE
|
|
3027
|
+
],
|
|
3028
|
+
showFallback: false,
|
|
3029
|
+
children: /* @__PURE__ */ jsx2(Tooltip, { title: deleteDisabled ? `Cannot delete \u2014 status is ${leadStatus.toLowerCase().replace("_", " ")}` : `Delete lead ${lead.phoneNumber}`, children: /* @__PURE__ */ jsx2("span", { children: /* @__PURE__ */ jsx2(
|
|
3030
|
+
IconButton,
|
|
3031
|
+
{
|
|
3032
|
+
size: "small",
|
|
3033
|
+
onClick: () => {
|
|
3034
|
+
setDeleteLeadTarget(lead);
|
|
3035
|
+
setDeleteLeadOpen(true);
|
|
3036
|
+
},
|
|
3037
|
+
disabled: deleteDisabled,
|
|
3038
|
+
sx: {
|
|
3039
|
+
ml: 0.5,
|
|
3040
|
+
color: deleteDisabled ? "#bdbdbd" : "#c62828",
|
|
3041
|
+
backgroundColor: deleteDisabled ? "transparent" : "#ffebee",
|
|
3042
|
+
borderRadius: "50%",
|
|
3043
|
+
transition: "all 0.2s ease-in-out",
|
|
3044
|
+
"&:hover": {
|
|
3045
|
+
backgroundColor: deleteDisabled ? "transparent" : "#d32f2f",
|
|
3046
|
+
color: deleteDisabled ? "#bdbdbd" : "#fff",
|
|
3047
|
+
transform: deleteDisabled ? "none" : "scale(1.2)",
|
|
3048
|
+
boxShadow: deleteDisabled ? "none" : "0 0 8px rgba(211,47,47,0.5)"
|
|
3049
|
+
}
|
|
3050
|
+
},
|
|
3051
|
+
children: /* @__PURE__ */ jsx2(DeleteIcon, { sx: { fontSize: 18 } })
|
|
3052
|
+
}
|
|
3053
|
+
) }) })
|
|
3054
|
+
}
|
|
3055
|
+
)
|
|
3056
|
+
] })
|
|
3057
|
+
]
|
|
3058
|
+
}
|
|
3059
|
+
),
|
|
3060
|
+
hasDisplayData && /* @__PURE__ */ jsx2(TableRow, { children: /* @__PURE__ */ jsx2(TableCell, { sx: { py: 0, border: 0 }, colSpan: showVoicemail ? 16 : 15, children: /* @__PURE__ */ jsx2(Collapse, { in: expandedLeadIds.has(lead.id), timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ jsx2(Box, { sx: { display: "flex", flexWrap: "wrap", gap: 3, px: 3, py: 1.5, backgroundColor: "#fafafa" }, children: visibleDisplayData.map((field, idx) => /* @__PURE__ */ jsxs(Box, { sx: { minWidth: 140 }, children: [
|
|
3061
|
+
/* @__PURE__ */ jsx2(Typography, { variant: "caption", color: "text.secondary", sx: { display: "block" }, children: field.label }),
|
|
3062
|
+
/* @__PURE__ */ jsx2(Typography, { variant: "body2", sx: { fontWeight: 600 }, children: Array.isArray(field.value) ? field.value.join(", ") : typeof field.value === "object" ? JSON.stringify(field.value) : String(field.value) })
|
|
3063
|
+
] }, idx)) }) }) }) })
|
|
3030
3064
|
] }, lead.id);
|
|
3031
3065
|
}) })
|
|
3032
3066
|
] }) }),
|
|
@@ -3156,4 +3190,4 @@ var campaigns_default = Campaigns;
|
|
|
3156
3190
|
export {
|
|
3157
3191
|
campaigns_default as default
|
|
3158
3192
|
};
|
|
3159
|
-
//# sourceMappingURL=campaigns-
|
|
3193
|
+
//# sourceMappingURL=campaigns-S4LFD5EX.mjs.map
|