chordia-ui 3.9.8 → 4.0.0
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/AgentLiftAnalysisCard.cjs.js +2 -2
- package/dist/AgentLiftAnalysisCard.cjs.js.map +1 -1
- package/dist/AgentLiftAnalysisCard.es.js +154 -306
- package/dist/AgentLiftAnalysisCard.es.js.map +1 -1
- package/dist/DataTable2.cjs.js +1 -1
- package/dist/DataTable2.cjs.js.map +1 -1
- package/dist/DataTable2.es.js +712 -665
- package/dist/DataTable2.es.js.map +1 -1
- package/dist/components/UpdatedInteractionDetails.cjs.js +4 -4
- package/dist/components/UpdatedInteractionDetails.cjs.js.map +1 -1
- package/dist/components/UpdatedInteractionDetails.es.js +1024 -988
- package/dist/components/UpdatedInteractionDetails.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/UpdatedInteractionDetails/UpdatedCompassScore.jsx +18 -2
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionContext.jsx +43 -4
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionDetails.jsx +57 -86
- package/src/components/common/AgentLiftAnalysisCard.jsx +13 -204
- package/src/components/data/DataTable2.jsx +94 -9
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Info as
|
|
4
|
-
import { u as
|
|
5
|
-
const
|
|
6
|
-
if (typeof document < "u" && !document.getElementById(
|
|
7
|
-
const
|
|
8
|
-
|
|
1
|
+
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v, useRef as _ } from "react";
|
|
3
|
+
import { Info as F, Settings as k } from "lucide-react";
|
|
4
|
+
import { u as W } from "./useMediaQuery.es.js";
|
|
5
|
+
const E = "chordia-cog-spin-style";
|
|
6
|
+
if (typeof document < "u" && !document.getElementById(E)) {
|
|
7
|
+
const r = document.createElement("style");
|
|
8
|
+
r.id = E, r.textContent = `
|
|
9
9
|
@keyframes chordia-cog-spin {
|
|
10
10
|
from { transform: rotate(0deg); }
|
|
11
11
|
to { transform: rotate(360deg); }
|
|
@@ -13,9 +13,9 @@ if (typeof document < "u" && !document.getElementById(A)) {
|
|
|
13
13
|
@media (prefers-reduced-motion: reduce) {
|
|
14
14
|
.chordia-cog-spin { animation: none !important; }
|
|
15
15
|
}
|
|
16
|
-
`, document.head.appendChild(
|
|
16
|
+
`, document.head.appendChild(r);
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const o = {
|
|
19
19
|
strong: "var(--Grey-Strong, #2E3236)",
|
|
20
20
|
muted: "var(--Grey-Muted, #808183)",
|
|
21
21
|
faint: "var(--Grey-Faint, #ACADAD)",
|
|
@@ -26,47 +26,44 @@ const i = {
|
|
|
26
26
|
surface: "#FAF9F5",
|
|
27
27
|
// Gauge ring (background semicircle)
|
|
28
28
|
gaugeTrack: "#E3E1D7"
|
|
29
|
-
},
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
},
|
|
33
|
-
const
|
|
34
|
-
return
|
|
35
|
-
}, H = ({ text: l, children: n, maxWidth: r = 280 }) => {
|
|
36
|
-
const [t, o] = E(!1), a = _(null), [c, h] = E({ top: 0, left: 0 });
|
|
37
|
-
return l ? /* @__PURE__ */ d(
|
|
29
|
+
}, i = "var(--font-sans, 'Averta', ui-sans-serif, system-ui, sans-serif)", b = (r, e, n) => Math.max(e, Math.min(n, r)), A = (r) => {
|
|
30
|
+
const e = b(Number(r) || 0, -1, 1);
|
|
31
|
+
return e >= 0.6 ? "High" : e >= 0.15 ? "Above Average" : e <= -0.6 ? "Low" : e <= -0.15 ? "Below Average" : "Average";
|
|
32
|
+
}, $ = ({ text: r, children: e, maxWidth: n = 280 }) => {
|
|
33
|
+
const [h, a] = v(!1), l = _(null), [s, d] = v({ top: 0, left: 0 });
|
|
34
|
+
return r ? /* @__PURE__ */ c(
|
|
38
35
|
"div",
|
|
39
36
|
{
|
|
40
|
-
ref:
|
|
37
|
+
ref: l,
|
|
41
38
|
style: { position: "relative", display: "inline-flex" },
|
|
42
39
|
onMouseEnter: () => {
|
|
43
|
-
if (
|
|
44
|
-
const f =
|
|
45
|
-
|
|
40
|
+
if (l.current) {
|
|
41
|
+
const f = l.current.getBoundingClientRect();
|
|
42
|
+
d({
|
|
46
43
|
top: f.bottom + 6,
|
|
47
44
|
left: f.left + f.width / 2
|
|
48
45
|
});
|
|
49
46
|
}
|
|
50
|
-
|
|
47
|
+
a(!0);
|
|
51
48
|
},
|
|
52
|
-
onMouseLeave: () =>
|
|
49
|
+
onMouseLeave: () => a(!1),
|
|
53
50
|
children: [
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
e,
|
|
52
|
+
h && /* @__PURE__ */ t(
|
|
56
53
|
"div",
|
|
57
54
|
{
|
|
58
55
|
style: {
|
|
59
56
|
position: "fixed",
|
|
60
|
-
top:
|
|
61
|
-
left:
|
|
57
|
+
top: s.top,
|
|
58
|
+
left: s.left,
|
|
62
59
|
transform: "translate(-50%, 0)",
|
|
63
|
-
maxWidth:
|
|
60
|
+
maxWidth: n,
|
|
64
61
|
padding: "8px 12px",
|
|
65
62
|
borderRadius: 6,
|
|
66
63
|
border: "1px solid var(--Grey-absent, #D9D9D9)",
|
|
67
64
|
background: "var(--Grey-Strong, #2E3236)",
|
|
68
65
|
color: "#FFF",
|
|
69
|
-
fontFamily:
|
|
66
|
+
fontFamily: i,
|
|
70
67
|
fontSize: 12,
|
|
71
68
|
fontWeight: 400,
|
|
72
69
|
lineHeight: 1.4,
|
|
@@ -76,20 +73,20 @@ const i = {
|
|
|
76
73
|
whiteSpace: "normal",
|
|
77
74
|
textAlign: "left"
|
|
78
75
|
},
|
|
79
|
-
children:
|
|
76
|
+
children: r
|
|
80
77
|
}
|
|
81
78
|
)
|
|
82
79
|
]
|
|
83
80
|
}
|
|
84
|
-
) :
|
|
85
|
-
},
|
|
86
|
-
const
|
|
87
|
-
let
|
|
88
|
-
if (
|
|
89
|
-
const
|
|
90
|
-
if (
|
|
91
|
-
const
|
|
92
|
-
|
|
81
|
+
) : e;
|
|
82
|
+
}, z = ({ value: r = 0, highlight: e = null }) => {
|
|
83
|
+
const m = b(Number(r) || 0, -1, 1) * (Math.PI / 2), x = 60 + 38 * Math.sin(m), p = 56 - 38 * Math.cos(m);
|
|
84
|
+
let g = null;
|
|
85
|
+
if (e != null) {
|
|
86
|
+
const y = b(Number(e) || 0, -1, 1);
|
|
87
|
+
if (y !== 0) {
|
|
88
|
+
const R = y * (Math.PI / 2), S = 60, w = 56 - 26.65, T = 60 + 26.65 * Math.sin(R), L = 56 - 26.65 * Math.cos(R), N = y > 0 ? 1 : 0;
|
|
89
|
+
g = `M ${S} ${w} A ${26.65} ${26.65} 0 0 ${N} ${T} ${L}`;
|
|
93
90
|
}
|
|
94
91
|
}
|
|
95
92
|
return (
|
|
@@ -99,7 +96,7 @@ const i = {
|
|
|
99
96
|
// doesn't reserve that empty space in the flow — matches Figma's
|
|
100
97
|
// `mb-[-30px]` on the gauge wrapper and keeps the Outcome column's
|
|
101
98
|
// bottom-anchored percent block from being pushed too far down.
|
|
102
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ c(
|
|
103
100
|
"svg",
|
|
104
101
|
{
|
|
105
102
|
width: "120",
|
|
@@ -109,89 +106,89 @@ const i = {
|
|
|
109
106
|
"aria-hidden": "true",
|
|
110
107
|
style: { marginBottom: -20, display: "block" },
|
|
111
108
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ t(
|
|
113
110
|
"path",
|
|
114
111
|
{
|
|
115
112
|
d: `M ${60 - 26.65} 56 A ${26.65} ${26.65} 0 0 1 ${60 + 26.65} 56`,
|
|
116
113
|
fill: "none",
|
|
117
|
-
stroke:
|
|
114
|
+
stroke: o.gaugeTrack,
|
|
118
115
|
strokeWidth: 28.7,
|
|
119
116
|
strokeLinecap: "butt"
|
|
120
117
|
}
|
|
121
118
|
),
|
|
122
|
-
|
|
119
|
+
g && /* @__PURE__ */ t(
|
|
123
120
|
"path",
|
|
124
121
|
{
|
|
125
|
-
d:
|
|
122
|
+
d: g,
|
|
126
123
|
fill: "none",
|
|
127
|
-
stroke:
|
|
124
|
+
stroke: o.strong,
|
|
128
125
|
strokeWidth: 28.7,
|
|
129
126
|
strokeLinecap: "butt"
|
|
130
127
|
}
|
|
131
128
|
),
|
|
132
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ t(
|
|
133
130
|
"text",
|
|
134
131
|
{
|
|
135
132
|
x: 60,
|
|
136
133
|
y: 56 - 41 - 4,
|
|
137
134
|
textAnchor: "middle",
|
|
138
135
|
fontSize: "13",
|
|
139
|
-
fontFamily:
|
|
140
|
-
fill:
|
|
136
|
+
fontFamily: i,
|
|
137
|
+
fill: o.orange,
|
|
141
138
|
children: "0"
|
|
142
139
|
}
|
|
143
140
|
),
|
|
144
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ t(
|
|
145
142
|
"text",
|
|
146
143
|
{
|
|
147
144
|
x: 60 - 41 - 9,
|
|
148
145
|
y: 56 + 5,
|
|
149
146
|
textAnchor: "middle",
|
|
150
147
|
fontSize: "14",
|
|
151
|
-
fontFamily:
|
|
152
|
-
fill:
|
|
148
|
+
fontFamily: i,
|
|
149
|
+
fill: o.strong,
|
|
153
150
|
children: "−"
|
|
154
151
|
}
|
|
155
152
|
),
|
|
156
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ t(
|
|
157
154
|
"text",
|
|
158
155
|
{
|
|
159
156
|
x: 60 + 41 + 9,
|
|
160
157
|
y: 56 + 5,
|
|
161
158
|
textAnchor: "middle",
|
|
162
159
|
fontSize: "14",
|
|
163
|
-
fontFamily:
|
|
164
|
-
fill:
|
|
160
|
+
fontFamily: i,
|
|
161
|
+
fill: o.strong,
|
|
165
162
|
children: "+"
|
|
166
163
|
}
|
|
167
164
|
),
|
|
168
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ t(
|
|
169
166
|
"line",
|
|
170
167
|
{
|
|
171
168
|
x1: 60,
|
|
172
169
|
y1: 56,
|
|
173
|
-
x2:
|
|
174
|
-
y2:
|
|
175
|
-
stroke:
|
|
170
|
+
x2: x,
|
|
171
|
+
y2: p,
|
|
172
|
+
stroke: o.orange,
|
|
176
173
|
strokeWidth: 2,
|
|
177
174
|
strokeLinecap: "round"
|
|
178
175
|
}
|
|
179
176
|
),
|
|
180
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ t("circle", { cx: 60, cy: 56, r: 2.5, fill: o.orange })
|
|
181
178
|
]
|
|
182
179
|
}
|
|
183
180
|
)
|
|
184
181
|
);
|
|
185
|
-
},
|
|
186
|
-
title:
|
|
187
|
-
value:
|
|
188
|
-
highlight:
|
|
189
|
-
centerLabel:
|
|
190
|
-
centerLabelColor:
|
|
191
|
-
sublabel:
|
|
192
|
-
footer:
|
|
193
|
-
description:
|
|
194
|
-
}) => /* @__PURE__ */
|
|
182
|
+
}, C = ({
|
|
183
|
+
title: r,
|
|
184
|
+
value: e,
|
|
185
|
+
highlight: n,
|
|
186
|
+
centerLabel: h,
|
|
187
|
+
centerLabelColor: a,
|
|
188
|
+
sublabel: l,
|
|
189
|
+
footer: s,
|
|
190
|
+
description: d
|
|
191
|
+
}) => /* @__PURE__ */ c(
|
|
195
192
|
"div",
|
|
196
193
|
{
|
|
197
194
|
style: {
|
|
@@ -203,7 +200,7 @@ const i = {
|
|
|
203
200
|
gap: 10
|
|
204
201
|
},
|
|
205
202
|
children: [
|
|
206
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ t(
|
|
207
204
|
"div",
|
|
208
205
|
{
|
|
209
206
|
style: {
|
|
@@ -213,28 +210,28 @@ const i = {
|
|
|
213
210
|
justifyContent: "center",
|
|
214
211
|
width: "100%"
|
|
215
212
|
},
|
|
216
|
-
children: /* @__PURE__ */
|
|
213
|
+
children: /* @__PURE__ */ t(
|
|
217
214
|
"span",
|
|
218
215
|
{
|
|
219
216
|
style: {
|
|
220
|
-
fontFamily:
|
|
217
|
+
fontFamily: i,
|
|
221
218
|
fontSize: 14,
|
|
222
219
|
fontWeight: 400,
|
|
223
|
-
color:
|
|
220
|
+
color: o.strong,
|
|
224
221
|
lineHeight: "20px",
|
|
225
222
|
textAlign: "center",
|
|
226
223
|
width: "100%"
|
|
227
224
|
},
|
|
228
|
-
children:
|
|
225
|
+
children: r
|
|
229
226
|
}
|
|
230
227
|
)
|
|
231
228
|
}
|
|
232
229
|
),
|
|
233
|
-
|
|
230
|
+
e == null ? (
|
|
234
231
|
// Gauge swapped for an em-dash placeholder when the API ships no
|
|
235
232
|
// numeric value for this column. Same 60px height as the gauge SVG
|
|
236
233
|
// (after its -20 negative margin) so the columns stay aligned.
|
|
237
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ t(
|
|
238
235
|
"div",
|
|
239
236
|
{
|
|
240
237
|
style: {
|
|
@@ -245,14 +242,14 @@ const i = {
|
|
|
245
242
|
justifyContent: "center",
|
|
246
243
|
marginBottom: -20
|
|
247
244
|
},
|
|
248
|
-
children: /* @__PURE__ */
|
|
245
|
+
children: /* @__PURE__ */ t(
|
|
249
246
|
"span",
|
|
250
247
|
{
|
|
251
248
|
style: {
|
|
252
|
-
fontFamily:
|
|
249
|
+
fontFamily: i,
|
|
253
250
|
fontSize: 28,
|
|
254
251
|
fontWeight: 400,
|
|
255
|
-
color:
|
|
252
|
+
color: o.muted,
|
|
256
253
|
lineHeight: 1
|
|
257
254
|
},
|
|
258
255
|
children: "—"
|
|
@@ -260,8 +257,8 @@ const i = {
|
|
|
260
257
|
)
|
|
261
258
|
}
|
|
262
259
|
)
|
|
263
|
-
) : /* @__PURE__ */
|
|
264
|
-
/* @__PURE__ */
|
|
260
|
+
) : /* @__PURE__ */ t(z, { value: e, highlight: n }),
|
|
261
|
+
/* @__PURE__ */ c(
|
|
265
262
|
"div",
|
|
266
263
|
{
|
|
267
264
|
style: {
|
|
@@ -272,66 +269,66 @@ const i = {
|
|
|
272
269
|
width: "100%"
|
|
273
270
|
},
|
|
274
271
|
children: [
|
|
275
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ t(
|
|
276
273
|
"span",
|
|
277
274
|
{
|
|
278
275
|
style: {
|
|
279
|
-
fontFamily:
|
|
276
|
+
fontFamily: i,
|
|
280
277
|
// Figma 1463:4261 spec: 14px Averta-Semibold, Neutral/850
|
|
281
278
|
// (#272727) for both "Average" and "Above Average".
|
|
282
279
|
fontSize: 14,
|
|
283
280
|
fontWeight: 600,
|
|
284
|
-
color:
|
|
281
|
+
color: h ? a || "#272727" : o.muted,
|
|
285
282
|
lineHeight: "normal",
|
|
286
283
|
textAlign: "center"
|
|
287
284
|
},
|
|
288
|
-
children:
|
|
285
|
+
children: h || "—"
|
|
289
286
|
}
|
|
290
287
|
),
|
|
291
|
-
|
|
288
|
+
l && /* @__PURE__ */ t(
|
|
292
289
|
"span",
|
|
293
290
|
{
|
|
294
291
|
style: {
|
|
295
|
-
fontFamily:
|
|
292
|
+
fontFamily: i,
|
|
296
293
|
fontSize: 13,
|
|
297
294
|
fontWeight: 400,
|
|
298
|
-
color:
|
|
295
|
+
color: o.muted,
|
|
299
296
|
lineHeight: "normal",
|
|
300
297
|
textAlign: "center",
|
|
301
298
|
width: "100%"
|
|
302
299
|
},
|
|
303
|
-
children:
|
|
300
|
+
children: l
|
|
304
301
|
}
|
|
305
302
|
),
|
|
306
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ t(
|
|
307
304
|
"span",
|
|
308
305
|
{
|
|
309
306
|
style: {
|
|
310
|
-
fontFamily:
|
|
307
|
+
fontFamily: i,
|
|
311
308
|
fontSize: 13,
|
|
312
309
|
fontWeight: 400,
|
|
313
|
-
color:
|
|
310
|
+
color: s ? o.strong : o.muted,
|
|
314
311
|
lineHeight: "normal",
|
|
315
312
|
textAlign: "center",
|
|
316
313
|
width: "100%"
|
|
317
314
|
},
|
|
318
|
-
children:
|
|
315
|
+
children: s || "—"
|
|
319
316
|
}
|
|
320
317
|
),
|
|
321
|
-
|
|
318
|
+
d && /* @__PURE__ */ t(
|
|
322
319
|
"span",
|
|
323
320
|
{
|
|
324
321
|
style: {
|
|
325
|
-
fontFamily:
|
|
322
|
+
fontFamily: i,
|
|
326
323
|
fontSize: 13,
|
|
327
324
|
fontWeight: 400,
|
|
328
|
-
color:
|
|
325
|
+
color: o.muted,
|
|
329
326
|
lineHeight: "normal",
|
|
330
327
|
textAlign: "center",
|
|
331
328
|
width: "100%",
|
|
332
329
|
marginTop: 4
|
|
333
330
|
},
|
|
334
|
-
children:
|
|
331
|
+
children: d
|
|
335
332
|
}
|
|
336
333
|
)
|
|
337
334
|
]
|
|
@@ -339,157 +336,24 @@ const i = {
|
|
|
339
336
|
)
|
|
340
337
|
]
|
|
341
338
|
}
|
|
342
|
-
),
|
|
343
|
-
percent: l,
|
|
344
|
-
label: n,
|
|
345
|
-
totalLabel: r = "Total",
|
|
346
|
-
description: t,
|
|
347
|
-
status: o
|
|
348
|
-
}) => {
|
|
349
|
-
const a = (o == null ? void 0 : o.label) ?? n;
|
|
350
|
-
return (
|
|
351
|
-
// Top-aligned stack — pill → percent → Total / description, all hugging
|
|
352
|
-
// the top of the column with the root `gap: 16` between them. The row
|
|
353
|
-
// still uses `align-items: stretch` so the column visually fills the
|
|
354
|
-
// row height, but any leftover space falls to the BOTTOM of the column
|
|
355
|
-
// (after the description) rather than being distributed between the
|
|
356
|
-
// pill and the percent. This keeps the Outcome content tight even
|
|
357
|
-
// when the gauge columns are taller, matching the visual rhythm
|
|
358
|
-
// requested in the latest review.
|
|
359
|
-
/* @__PURE__ */ d(
|
|
360
|
-
"div",
|
|
361
|
-
{
|
|
362
|
-
style: {
|
|
363
|
-
flex: 1,
|
|
364
|
-
minWidth: 0,
|
|
365
|
-
display: "flex",
|
|
366
|
-
flexDirection: "column",
|
|
367
|
-
alignItems: "center",
|
|
368
|
-
justifyContent: "flex-start",
|
|
369
|
-
gap: 16
|
|
370
|
-
},
|
|
371
|
-
children: [
|
|
372
|
-
a && /* @__PURE__ */ e(
|
|
373
|
-
"div",
|
|
374
|
-
{
|
|
375
|
-
style: {
|
|
376
|
-
minHeight: 40,
|
|
377
|
-
display: "flex",
|
|
378
|
-
alignItems: "center",
|
|
379
|
-
justifyContent: "center",
|
|
380
|
-
width: "100%"
|
|
381
|
-
},
|
|
382
|
-
children: /* @__PURE__ */ e(
|
|
383
|
-
"span",
|
|
384
|
-
{
|
|
385
|
-
style: {
|
|
386
|
-
fontFamily: s,
|
|
387
|
-
fontSize: 14,
|
|
388
|
-
fontWeight: 600,
|
|
389
|
-
color: i.strong,
|
|
390
|
-
lineHeight: "normal",
|
|
391
|
-
whiteSpace: "nowrap"
|
|
392
|
-
},
|
|
393
|
-
children: a
|
|
394
|
-
}
|
|
395
|
-
)
|
|
396
|
-
}
|
|
397
|
-
),
|
|
398
|
-
/* @__PURE__ */ d(
|
|
399
|
-
"div",
|
|
400
|
-
{
|
|
401
|
-
style: {
|
|
402
|
-
display: "flex",
|
|
403
|
-
flexDirection: "column",
|
|
404
|
-
alignItems: "center",
|
|
405
|
-
gap: 20,
|
|
406
|
-
width: "100%"
|
|
407
|
-
},
|
|
408
|
-
children: [
|
|
409
|
-
/* @__PURE__ */ e(
|
|
410
|
-
"span",
|
|
411
|
-
{
|
|
412
|
-
style: {
|
|
413
|
-
fontFamily: s,
|
|
414
|
-
fontSize: 34,
|
|
415
|
-
fontWeight: 400,
|
|
416
|
-
color: i.strong,
|
|
417
|
-
lineHeight: 1.2,
|
|
418
|
-
textAlign: "center",
|
|
419
|
-
whiteSpace: "nowrap"
|
|
420
|
-
},
|
|
421
|
-
children: l != null ? `${l}%` : "—"
|
|
422
|
-
}
|
|
423
|
-
),
|
|
424
|
-
/* @__PURE__ */ d(
|
|
425
|
-
"div",
|
|
426
|
-
{
|
|
427
|
-
style: {
|
|
428
|
-
display: "flex",
|
|
429
|
-
flexDirection: "column",
|
|
430
|
-
alignItems: "center",
|
|
431
|
-
gap: 4,
|
|
432
|
-
width: "100%"
|
|
433
|
-
},
|
|
434
|
-
children: [
|
|
435
|
-
r && /* @__PURE__ */ e(
|
|
436
|
-
"span",
|
|
437
|
-
{
|
|
438
|
-
style: {
|
|
439
|
-
fontFamily: s,
|
|
440
|
-
fontSize: 14,
|
|
441
|
-
fontWeight: 600,
|
|
442
|
-
color: "#272727",
|
|
443
|
-
lineHeight: "normal",
|
|
444
|
-
textAlign: "center",
|
|
445
|
-
whiteSpace: "nowrap"
|
|
446
|
-
},
|
|
447
|
-
children: r
|
|
448
|
-
}
|
|
449
|
-
),
|
|
450
|
-
t && /* @__PURE__ */ e(
|
|
451
|
-
"span",
|
|
452
|
-
{
|
|
453
|
-
style: {
|
|
454
|
-
fontFamily: s,
|
|
455
|
-
fontSize: 13,
|
|
456
|
-
fontWeight: 400,
|
|
457
|
-
color: i.muted,
|
|
458
|
-
lineHeight: "normal",
|
|
459
|
-
textAlign: "center",
|
|
460
|
-
width: "100%"
|
|
461
|
-
},
|
|
462
|
-
children: t
|
|
463
|
-
}
|
|
464
|
-
)
|
|
465
|
-
]
|
|
466
|
-
}
|
|
467
|
-
)
|
|
468
|
-
]
|
|
469
|
-
}
|
|
470
|
-
)
|
|
471
|
-
]
|
|
472
|
-
}
|
|
473
|
-
)
|
|
474
|
-
);
|
|
475
|
-
}, C = ({ variant: l = "dashed", horizontal: n = !1 }) => /* @__PURE__ */ e(
|
|
339
|
+
), M = ({ variant: r = "dashed", horizontal: e = !1 }) => /* @__PURE__ */ t(
|
|
476
340
|
"div",
|
|
477
341
|
{
|
|
478
342
|
"aria-hidden": "true",
|
|
479
|
-
style:
|
|
343
|
+
style: e ? {
|
|
480
344
|
// Stacked (mobile) layout: a full-width horizontal rule between gauges.
|
|
481
345
|
height: 0,
|
|
482
346
|
width: "100%",
|
|
483
|
-
borderTop: `1px ${
|
|
347
|
+
borderTop: `1px ${r} ${o.border}`,
|
|
484
348
|
flexShrink: 0
|
|
485
349
|
} : {
|
|
486
350
|
width: 0,
|
|
487
351
|
alignSelf: "stretch",
|
|
488
|
-
borderLeft: `1px ${
|
|
352
|
+
borderLeft: `1px ${r} ${o.border}`,
|
|
489
353
|
flexShrink: 0
|
|
490
354
|
}
|
|
491
355
|
}
|
|
492
|
-
),
|
|
356
|
+
), H = () => /* @__PURE__ */ c(
|
|
493
357
|
"div",
|
|
494
358
|
{
|
|
495
359
|
style: {
|
|
@@ -503,11 +367,11 @@ const i = {
|
|
|
503
367
|
padding: "0 8px"
|
|
504
368
|
},
|
|
505
369
|
children: [
|
|
506
|
-
/* @__PURE__ */
|
|
507
|
-
|
|
370
|
+
/* @__PURE__ */ t(
|
|
371
|
+
k,
|
|
508
372
|
{
|
|
509
373
|
size: 28,
|
|
510
|
-
color:
|
|
374
|
+
color: o.orange,
|
|
511
375
|
strokeWidth: 2,
|
|
512
376
|
className: "chordia-cog-spin",
|
|
513
377
|
"aria-hidden": "true",
|
|
@@ -518,14 +382,14 @@ const i = {
|
|
|
518
382
|
}
|
|
519
383
|
}
|
|
520
384
|
),
|
|
521
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ t(
|
|
522
386
|
"span",
|
|
523
387
|
{
|
|
524
388
|
style: {
|
|
525
|
-
fontFamily:
|
|
389
|
+
fontFamily: i,
|
|
526
390
|
fontSize: 14,
|
|
527
391
|
fontWeight: 400,
|
|
528
|
-
color:
|
|
392
|
+
color: o.strong,
|
|
529
393
|
lineHeight: 1.2,
|
|
530
394
|
textAlign: "center",
|
|
531
395
|
maxWidth: 120
|
|
@@ -535,30 +399,25 @@ const i = {
|
|
|
535
399
|
)
|
|
536
400
|
]
|
|
537
401
|
}
|
|
538
|
-
),
|
|
539
|
-
title:
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
showInfoIcon: a = !0,
|
|
545
|
-
onInfoClick: c,
|
|
402
|
+
), j = ({
|
|
403
|
+
title: r = "Agent Lift Analysis",
|
|
404
|
+
interactionDifficulty: e,
|
|
405
|
+
agentImpact: n,
|
|
406
|
+
showInfoIcon: h = !0,
|
|
407
|
+
onInfoClick: a,
|
|
546
408
|
// Tooltip text rendered on hover of the (i) icon next to the card
|
|
547
409
|
// title. The default explains what this section measures; hosts can
|
|
548
410
|
// override per-context if needed.
|
|
549
|
-
infoTooltip:
|
|
411
|
+
infoTooltip: l = "Measures the agent's contribution to the call outcome by comparing actual performance against the expected result for similar calls."
|
|
550
412
|
}) => {
|
|
551
|
-
const
|
|
552
|
-
if ((
|
|
413
|
+
const s = W("(max-width: 640px)"), d = Number(e == null ? void 0 : e.value) || 0, u = Number(n == null ? void 0 : n.value) || 0, f = (e == null ? void 0 : e.label) ?? A(d), m = (n == null ? void 0 : n.label) ?? A(u), x = "#272727", p = (() => {
|
|
414
|
+
if ((n == null ? void 0 : n.impactPercent) == null)
|
|
553
415
|
return;
|
|
554
|
-
const
|
|
555
|
-
if (Number.isFinite(
|
|
556
|
-
return `${
|
|
557
|
-
})()
|
|
558
|
-
|
|
559
|
-
direction: t != null ? k(g) : "positive"
|
|
560
|
-
};
|
|
561
|
-
return /* @__PURE__ */ d(
|
|
416
|
+
const g = Number(n.impactPercent);
|
|
417
|
+
if (Number.isFinite(g))
|
|
418
|
+
return `${g < 0 ? "-" : ""}${Math.abs(g)}% Score impact`;
|
|
419
|
+
})();
|
|
420
|
+
return /* @__PURE__ */ c(
|
|
562
421
|
"div",
|
|
563
422
|
{
|
|
564
423
|
style: {
|
|
@@ -566,14 +425,14 @@ const i = {
|
|
|
566
425
|
flexDirection: "column",
|
|
567
426
|
gap: 16,
|
|
568
427
|
padding: "24px 16px",
|
|
569
|
-
background:
|
|
570
|
-
border: `1px solid ${
|
|
428
|
+
background: o.surface,
|
|
429
|
+
border: `1px solid ${o.border}`,
|
|
571
430
|
borderRadius: 8,
|
|
572
431
|
width: "100%",
|
|
573
432
|
boxSizing: "border-box"
|
|
574
433
|
},
|
|
575
434
|
children: [
|
|
576
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ c(
|
|
577
436
|
"div",
|
|
578
437
|
{
|
|
579
438
|
style: {
|
|
@@ -583,25 +442,25 @@ const i = {
|
|
|
583
442
|
width: "100%"
|
|
584
443
|
},
|
|
585
444
|
children: [
|
|
586
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ t(
|
|
587
446
|
"span",
|
|
588
447
|
{
|
|
589
448
|
style: {
|
|
590
|
-
fontFamily:
|
|
449
|
+
fontFamily: i,
|
|
591
450
|
fontSize: 15,
|
|
592
451
|
fontWeight: 700,
|
|
593
|
-
color:
|
|
452
|
+
color: o.strong,
|
|
594
453
|
lineHeight: 1.2,
|
|
595
454
|
whiteSpace: "nowrap"
|
|
596
455
|
},
|
|
597
|
-
children:
|
|
456
|
+
children: r
|
|
598
457
|
}
|
|
599
458
|
),
|
|
600
|
-
|
|
459
|
+
h && /* @__PURE__ */ t($, { text: l, children: /* @__PURE__ */ t(
|
|
601
460
|
"button",
|
|
602
461
|
{
|
|
603
462
|
type: "button",
|
|
604
|
-
onClick:
|
|
463
|
+
onClick: a,
|
|
605
464
|
"aria-label": "About Agent Lift Analysis",
|
|
606
465
|
style: {
|
|
607
466
|
display: "inline-flex",
|
|
@@ -616,63 +475,52 @@ const i = {
|
|
|
616
475
|
// a tooltip on hover or a click handler. Since `infoTooltip`
|
|
617
476
|
// defaults to a non-empty string, the icon almost always
|
|
618
477
|
// reads as interactive.
|
|
619
|
-
cursor:
|
|
620
|
-
color:
|
|
478
|
+
cursor: l || a ? "pointer" : "default",
|
|
479
|
+
color: o.muted
|
|
621
480
|
},
|
|
622
|
-
children: /* @__PURE__ */
|
|
481
|
+
children: /* @__PURE__ */ t(F, { size: 16, strokeWidth: 1.75 })
|
|
623
482
|
}
|
|
624
483
|
) })
|
|
625
484
|
]
|
|
626
485
|
}
|
|
627
486
|
),
|
|
628
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ c(
|
|
629
488
|
"div",
|
|
630
489
|
{
|
|
631
490
|
style: {
|
|
632
491
|
display: "flex",
|
|
633
|
-
flexDirection:
|
|
492
|
+
flexDirection: s ? "column" : "row",
|
|
634
493
|
alignItems: "stretch",
|
|
635
494
|
gap: 16,
|
|
636
495
|
width: "100%"
|
|
637
496
|
},
|
|
638
497
|
children: [
|
|
639
|
-
|
|
640
|
-
|
|
498
|
+
e && /* @__PURE__ */ t(
|
|
499
|
+
C,
|
|
641
500
|
{
|
|
642
501
|
title: "Interaction Difficulty",
|
|
643
|
-
value:
|
|
502
|
+
value: d,
|
|
644
503
|
highlight: null,
|
|
645
|
-
centerLabel:
|
|
646
|
-
centerLabelColor:
|
|
647
|
-
sublabel:
|
|
648
|
-
footer:
|
|
504
|
+
centerLabel: f,
|
|
505
|
+
centerLabelColor: x,
|
|
506
|
+
sublabel: e.sublabel,
|
|
507
|
+
footer: e.footer
|
|
649
508
|
}
|
|
650
509
|
),
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
510
|
+
e && n && /* @__PURE__ */ t(M, { variant: "dashed", horizontal: s }),
|
|
511
|
+
n && (n.isLearning ? /* @__PURE__ */ t(H, {}) : /* @__PURE__ */ t(
|
|
512
|
+
C,
|
|
654
513
|
{
|
|
655
514
|
title: "Agent Impact",
|
|
656
|
-
value:
|
|
657
|
-
highlight:
|
|
658
|
-
centerLabel:
|
|
659
|
-
centerLabelColor:
|
|
660
|
-
sublabel:
|
|
661
|
-
footer:
|
|
662
|
-
description:
|
|
663
|
-
}
|
|
664
|
-
)),
|
|
665
|
-
(r || t) && o && /* @__PURE__ */ e(C, { variant: "solid", horizontal: p }),
|
|
666
|
-
o && /* @__PURE__ */ e(
|
|
667
|
-
O,
|
|
668
|
-
{
|
|
669
|
-
percent: o.percent,
|
|
670
|
-
label: o.label,
|
|
671
|
-
totalLabel: o.totalLabel ?? "Total",
|
|
672
|
-
description: o.description,
|
|
673
|
-
status: x
|
|
515
|
+
value: u,
|
|
516
|
+
highlight: u,
|
|
517
|
+
centerLabel: m,
|
|
518
|
+
centerLabelColor: x,
|
|
519
|
+
sublabel: n.sublabel,
|
|
520
|
+
footer: p,
|
|
521
|
+
description: n.description
|
|
674
522
|
}
|
|
675
|
-
)
|
|
523
|
+
))
|
|
676
524
|
]
|
|
677
525
|
}
|
|
678
526
|
)
|
|
@@ -681,6 +529,6 @@ const i = {
|
|
|
681
529
|
);
|
|
682
530
|
};
|
|
683
531
|
export {
|
|
684
|
-
|
|
532
|
+
j as A
|
|
685
533
|
};
|
|
686
534
|
//# sourceMappingURL=AgentLiftAnalysisCard.es.js.map
|