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
|
@@ -10,7 +10,7 @@ var require = function (id) {
|
|
|
10
10
|
|
|
11
11
|
import {
|
|
12
12
|
agentDetailReport_default
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IYYH5PCQ.mjs";
|
|
14
14
|
import "./chunk-KRXHK4AU.mjs";
|
|
15
15
|
import "./chunk-LX6I32Y4.mjs";
|
|
16
16
|
import "./chunk-GKP4CDJS.mjs";
|
|
@@ -20,4 +20,4 @@ import "./chunk-SQSETW3L.mjs";
|
|
|
20
20
|
export {
|
|
21
21
|
agentDetailReport_default as default
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=agentDetailReport-
|
|
23
|
+
//# sourceMappingURL=agentDetailReport-D6YX5EWT.mjs.map
|
package/dist-react/{agentPerformanceReport-PBIC23DB.mjs → agentPerformanceReport-IGTLLSZV.mjs}
RENAMED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
agentDetailReport_default,
|
|
22
22
|
exportAgentBreakSessionsToExcel,
|
|
23
23
|
getAgentBreakSessions
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-IYYH5PCQ.mjs";
|
|
25
25
|
import {
|
|
26
26
|
PageHeader
|
|
27
27
|
} from "./chunk-KRXHK4AU.mjs";
|
|
@@ -30,7 +30,8 @@ import {
|
|
|
30
30
|
} from "./chunk-LX6I32Y4.mjs";
|
|
31
31
|
import "./chunk-GKP4CDJS.mjs";
|
|
32
32
|
import {
|
|
33
|
-
SDKProvider
|
|
33
|
+
SDKProvider,
|
|
34
|
+
useToast
|
|
34
35
|
} from "./chunk-4YF4IDV6.mjs";
|
|
35
36
|
import {
|
|
36
37
|
END_POINT,
|
|
@@ -8451,10 +8452,24 @@ function fmtDur(s) {
|
|
|
8451
8452
|
const h = Math.floor(s / 3600), m = Math.floor(s % 3600 / 60), sc = Math.floor(s % 60);
|
|
8452
8453
|
return [h, m, sc].map((x) => String(x).padStart(2, "0")).join(":");
|
|
8453
8454
|
}
|
|
8454
|
-
function
|
|
8455
|
-
if (
|
|
8455
|
+
function cleanVal(v) {
|
|
8456
|
+
if (v == null) return "";
|
|
8457
|
+
const s = String(v).trim();
|
|
8458
|
+
return s.toLowerCase() === "null" || s.toLowerCase() === "undefined" ? "" : s;
|
|
8459
|
+
}
|
|
8460
|
+
function fmtDateParts(v) {
|
|
8461
|
+
if (!cleanVal(v)) return { date: "", time: "" };
|
|
8456
8462
|
const d = dayjs2(String(v).replace(" ", "T"));
|
|
8457
|
-
|
|
8463
|
+
if (!d.isValid()) return { date: "", time: "" };
|
|
8464
|
+
return { date: d.format("MMM D, YYYY"), time: d.format("h:mm A") };
|
|
8465
|
+
}
|
|
8466
|
+
function DateTimeCell({ value }) {
|
|
8467
|
+
const { date, time } = fmtDateParts(value);
|
|
8468
|
+
if (!date) return null;
|
|
8469
|
+
return /* @__PURE__ */ jsxs3("span", { style: { display: "flex", flexDirection: "column", lineHeight: 1.35, fontVariantNumeric: "tabular-nums" }, children: [
|
|
8470
|
+
/* @__PURE__ */ jsx4("span", { style: { fontSize: 13, color: C2.t1, fontWeight: 700 }, children: date }),
|
|
8471
|
+
/* @__PURE__ */ jsx4("span", { style: { fontSize: 11.5, color: C2.t2, fontWeight: 500 }, children: time })
|
|
8472
|
+
] });
|
|
8458
8473
|
}
|
|
8459
8474
|
function toEpoch(v) {
|
|
8460
8475
|
if (!v) return 0;
|
|
@@ -8507,7 +8522,7 @@ function HeatColumn({ title, rows, variant }) {
|
|
|
8507
8522
|
"&:hover": { background: C2.s2 }
|
|
8508
8523
|
}, children: [
|
|
8509
8524
|
/* @__PURE__ */ jsx4(Typography3, { sx: __spreadProps(__spreadValues({}, mono), { fontSize: 10, fontWeight: 700, color: tone.rank, textAlign: "right" }), children: i + 1 }),
|
|
8510
|
-
/* @__PURE__ */ jsx4(
|
|
8525
|
+
/* @__PURE__ */ jsx4(Typography3, { sx: { fontSize: 11.5, fontWeight: 600, color: C2.t1, lineHeight: 1.25, wordBreak: "break-word" }, children: r.name }),
|
|
8511
8526
|
/* @__PURE__ */ jsx4(Box4, { sx: __spreadProps(__spreadValues({ background: tone.pillBg, color: tone.pillTx, borderRadius: "5px", textAlign: "center", px: 0.9, py: 0.3, minWidth: 62 }, mono), { fontSize: 10.5 }), children: fmtDur(r.secs) })
|
|
8512
8527
|
] }, i)),
|
|
8513
8528
|
rows.length === 0 && /* @__PURE__ */ jsx4(Typography3, { sx: { fontSize: 11.5, color: C2.t3, textAlign: "center", py: 3 }, children: "No data" })
|
|
@@ -8562,24 +8577,25 @@ function BarCell({ value, pct, accent, count: count2, onCountClick }) {
|
|
|
8562
8577
|
}
|
|
8563
8578
|
),
|
|
8564
8579
|
/* @__PURE__ */ jsxs3(Typography3, { sx: __spreadValues({
|
|
8565
|
-
fontSize:
|
|
8580
|
+
fontSize: 13,
|
|
8581
|
+
fontWeight: 800,
|
|
8566
8582
|
fontVariantNumeric: "tabular-nums",
|
|
8567
8583
|
whiteSpace: "nowrap"
|
|
8568
8584
|
}, pct > 100 ? { color: C2.red, background: C2.rlt, borderRadius: "4px", px: 0.5 } : { color: C2.t2 }), children: [
|
|
8569
8585
|
pct.toFixed(1),
|
|
8570
8586
|
"%"
|
|
8571
8587
|
] }),
|
|
8572
|
-
/* @__PURE__ */ jsx4(Typography3, { sx: { fontSize:
|
|
8588
|
+
/* @__PURE__ */ jsx4(Typography3, { sx: { fontSize: 11.5, color: C2.t1, fontWeight: 800, fontVariantNumeric: "tabular-nums", whiteSpace: "nowrap" }, children: cleanVal(value) })
|
|
8573
8589
|
] }),
|
|
8574
8590
|
/* @__PURE__ */ jsx4(Box4, { sx: { width: "100%", height: 8, background: C2.s3, borderRadius: "4px", overflow: "hidden" }, children: width > 0 && /* @__PURE__ */ jsx4(Box4, { sx: { height: "100%", width: `${width}%`, background: accent, borderRadius: "4px" } }) })
|
|
8575
8591
|
] });
|
|
8576
8592
|
}
|
|
8577
|
-
var InOut = ({ i, o }) => /* @__PURE__ */ jsxs3(Typography3, { sx: { fontSize:
|
|
8578
|
-
/* @__PURE__ */ jsx4("span", { style: { color: C2.
|
|
8593
|
+
var InOut = ({ i, o }) => /* @__PURE__ */ jsxs3(Typography3, { sx: { fontSize: 13, color: C2.t1, fontWeight: 600, whiteSpace: "nowrap" }, children: [
|
|
8594
|
+
/* @__PURE__ */ jsx4("span", { style: { color: C2.t1, fontWeight: 400 }, children: "In:" }),
|
|
8579
8595
|
" ",
|
|
8580
8596
|
i,
|
|
8581
8597
|
" ",
|
|
8582
|
-
/* @__PURE__ */ jsx4("span", { style: { color: C2.
|
|
8598
|
+
/* @__PURE__ */ jsx4("span", { style: { color: C2.t1, fontWeight: 400 }, children: "Out:" }),
|
|
8583
8599
|
" ",
|
|
8584
8600
|
o
|
|
8585
8601
|
] });
|
|
@@ -8600,9 +8616,12 @@ function AgentPerformanceReportContent() {
|
|
|
8600
8616
|
const [exportMode, setExportMode] = useState5("summary");
|
|
8601
8617
|
const [exporting, setExporting] = useState5(false);
|
|
8602
8618
|
const loading = loadingTop || loadingTable;
|
|
8619
|
+
const toast = useToast();
|
|
8603
8620
|
const onErr = (err) => {
|
|
8604
|
-
var _a2, _b2;
|
|
8605
|
-
|
|
8621
|
+
var _a2, _b2, _c2, _d2;
|
|
8622
|
+
const msg = ((_b2 = (_a2 = err == null ? void 0 : err.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || ((_d2 = (_c2 = err == null ? void 0 : err.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.detail) || (err == null ? void 0 : err.message) || "Failed to load agents report";
|
|
8623
|
+
setError(msg);
|
|
8624
|
+
toast.showToast(msg, "error");
|
|
8606
8625
|
};
|
|
8607
8626
|
const fetchDashboard = useCallback2((showSpinner = true) => {
|
|
8608
8627
|
if (!startDate || !endDate) return;
|
|
@@ -8667,7 +8686,7 @@ function AgentPerformanceReportContent() {
|
|
|
8667
8686
|
size: 220,
|
|
8668
8687
|
accessorFn: (r) => r.agentName,
|
|
8669
8688
|
Cell: ({ row }) => {
|
|
8670
|
-
const name = row.original.agentName
|
|
8689
|
+
const name = cleanVal(row.original.agentName);
|
|
8671
8690
|
return /* @__PURE__ */ jsxs3(Box4, { sx: { display: "flex", alignItems: "center", gap: 1, minWidth: 0 }, children: [
|
|
8672
8691
|
/* @__PURE__ */ jsx4(Box4, { sx: {
|
|
8673
8692
|
width: 30,
|
|
@@ -8683,8 +8702,8 @@ function AgentPerformanceReportContent() {
|
|
|
8683
8702
|
letterSpacing: 0.3
|
|
8684
8703
|
}, children: getInitials(name) }),
|
|
8685
8704
|
/* @__PURE__ */ jsxs3(Box4, { sx: { minWidth: 0 }, children: [
|
|
8686
|
-
/* @__PURE__ */ jsx4(Typography3, { sx: { fontSize:
|
|
8687
|
-
/* @__PURE__ */ jsx4(Typography3, { noWrap: true, sx: { fontSize:
|
|
8705
|
+
/* @__PURE__ */ jsx4(Typography3, { sx: { fontSize: 13, color: C2.t1, fontWeight: 600, lineHeight: 1.3 }, children: name }),
|
|
8706
|
+
/* @__PURE__ */ jsx4(Typography3, { noWrap: true, sx: { fontSize: 11.5, color: C2.t3, fontWeight: 500, fontVariantNumeric: "tabular-nums", lineHeight: 1.3 }, children: cleanVal(row.original.agentId) })
|
|
8688
8707
|
] })
|
|
8689
8708
|
] });
|
|
8690
8709
|
}
|
|
@@ -8694,14 +8713,14 @@ function AgentPerformanceReportContent() {
|
|
|
8694
8713
|
header: "First Login",
|
|
8695
8714
|
size: 160,
|
|
8696
8715
|
accessorFn: (r) => toEpoch(r.firstLoginTime),
|
|
8697
|
-
Cell: ({ row }) => /* @__PURE__ */ jsx4(
|
|
8716
|
+
Cell: ({ row }) => /* @__PURE__ */ jsx4(DateTimeCell, { value: row.original.firstLoginTime })
|
|
8698
8717
|
},
|
|
8699
8718
|
{
|
|
8700
8719
|
id: "lastLogout",
|
|
8701
8720
|
header: "Last Logout",
|
|
8702
8721
|
size: 160,
|
|
8703
8722
|
accessorFn: (r) => toEpoch(r.logoutTime),
|
|
8704
|
-
Cell: ({ row }) => /* @__PURE__ */ jsx4(
|
|
8723
|
+
Cell: ({ row }) => /* @__PURE__ */ jsx4(DateTimeCell, { value: row.original.logoutTime })
|
|
8705
8724
|
},
|
|
8706
8725
|
{
|
|
8707
8726
|
id: "total",
|
|
@@ -8729,14 +8748,14 @@ function AgentPerformanceReportContent() {
|
|
|
8729
8748
|
header: "AHT",
|
|
8730
8749
|
size: 100,
|
|
8731
8750
|
accessorFn: (r) => parseDur(r.avgCallHandleTime),
|
|
8732
|
-
Cell: ({ row }) => /* @__PURE__ */ jsx4("span", { style: { fontWeight:
|
|
8751
|
+
Cell: ({ row }) => /* @__PURE__ */ jsx4("span", { style: { fontWeight: 600, fontSize: 13, color: C2.purple, fontVariantNumeric: "tabular-nums" }, children: cleanVal(row.original.avgCallHandleTime) })
|
|
8733
8752
|
},
|
|
8734
8753
|
{
|
|
8735
8754
|
id: "loggedInDuration",
|
|
8736
8755
|
header: "Logged In Duration",
|
|
8737
8756
|
size: 130,
|
|
8738
8757
|
accessorFn: (r) => parseDur(r.loggedInDuration),
|
|
8739
|
-
Cell: ({ row }) => /* @__PURE__ */ jsx4("span", { style: { fontWeight:
|
|
8758
|
+
Cell: ({ row }) => /* @__PURE__ */ jsx4("span", { style: { fontWeight: 600, fontSize: 13, color: C2.teal, fontVariantNumeric: "tabular-nums" }, children: cleanVal(row.original.loggedInDuration) })
|
|
8740
8759
|
},
|
|
8741
8760
|
{
|
|
8742
8761
|
id: "production",
|
|
@@ -8993,4 +9012,4 @@ export {
|
|
|
8993
9012
|
* @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
|
|
8994
9013
|
*)
|
|
8995
9014
|
*/
|
|
8996
|
-
//# sourceMappingURL=agentPerformanceReport-
|
|
9015
|
+
//# sourceMappingURL=agentPerformanceReport-IGTLLSZV.mjs.map
|