chordia-ui 3.4.0 → 3.4.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/Timeline.cjs.js +1 -6
- package/dist/Timeline.cjs.js.map +1 -1
- package/dist/Timeline.es.js +129 -597
- package/dist/Timeline.es.js.map +1 -1
- package/dist/TranscriptCard.cjs.js +7 -0
- package/dist/TranscriptCard.cjs.js.map +1 -0
- package/dist/TranscriptCard.es.js +474 -0
- package/dist/TranscriptCard.es.js.map +1 -0
- package/dist/UpdatedInteractionRecording.cjs.js +1 -1
- package/dist/UpdatedInteractionRecording.cjs.js.map +1 -1
- package/dist/UpdatedInteractionRecording.es.js +516 -420
- package/dist/UpdatedInteractionRecording.es.js.map +1 -1
- package/dist/components/UpdatedInteractionDetails.cjs.js +2 -2
- package/dist/components/UpdatedInteractionDetails.cjs.js.map +1 -1
- package/dist/components/UpdatedInteractionDetails.es.js +304 -285
- package/dist/components/UpdatedInteractionDetails.es.js.map +1 -1
- package/dist/components/media.cjs.js +1 -1
- package/dist/components/media.cjs.js.map +1 -1
- package/dist/components/media.es.js +9 -8
- package/dist/components/media.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs2.js +1 -1
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.cjs3.js +2 -2
- package/dist/index.cjs3.js.map +1 -1
- package/dist/index.es.js +53 -52
- package/dist/index.es.js.map +1 -1
- package/dist/index.es2.js +1 -1
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es3.js +11 -4
- package/dist/index.es3.js.map +1 -1
- package/dist/pages/interactionDetails.cjs.js +2 -2
- package/dist/pages/interactionDetails.cjs.js.map +1 -1
- package/dist/pages/interactionDetails.es.js +17 -16
- package/dist/pages/interactionDetails.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionDetails.jsx +125 -107
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionRecording.jsx +342 -178
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ import UpdatedCompassScore from './UpdatedCompassScore';
|
|
|
10
10
|
const TABS = [
|
|
11
11
|
{ key: 'overview', label: 'Overview' },
|
|
12
12
|
{ key: 'coaching', label: 'Coaching Summary' },
|
|
13
|
-
{ key: 'signals', label: 'Signals &
|
|
13
|
+
{ key: 'signals', label: 'Signals & Recording' },
|
|
14
14
|
{ key: 'comments', label: 'Comments' },
|
|
15
15
|
];
|
|
16
16
|
|
|
@@ -21,6 +21,28 @@ const UpdatedInteractionDetails = ({
|
|
|
21
21
|
data,
|
|
22
22
|
coachingData,
|
|
23
23
|
audioUrl,
|
|
24
|
+
// Audio/playback props — pass these when the host app manages audio externally
|
|
25
|
+
// (like InteractionDetailPanel does). If omitted, UpdatedInteractionRecording
|
|
26
|
+
// manages its own audio element internally.
|
|
27
|
+
audioRef: externalAudioRef,
|
|
28
|
+
currentTimeSeconds,
|
|
29
|
+
timelinePlaying,
|
|
30
|
+
playbackRate,
|
|
31
|
+
timelineSegments,
|
|
32
|
+
onSeek,
|
|
33
|
+
onTogglePlay,
|
|
34
|
+
onSeekBack,
|
|
35
|
+
onSeekForward,
|
|
36
|
+
onSetPlaybackRate,
|
|
37
|
+
// Speaker names
|
|
38
|
+
agentName: externalAgentName,
|
|
39
|
+
customerName: externalCustomerName,
|
|
40
|
+
// Transcript props — pass real transcript data from the host app
|
|
41
|
+
transcript,
|
|
42
|
+
activeTurnIndex,
|
|
43
|
+
turnObservations,
|
|
44
|
+
highlightedTurns,
|
|
45
|
+
onTurnPlayPause,
|
|
24
46
|
// Footer navigation
|
|
25
47
|
prevSessionTitle,
|
|
26
48
|
prevSessionDesc,
|
|
@@ -35,6 +57,21 @@ const UpdatedInteractionDetails = ({
|
|
|
35
57
|
const [hoveredSessionIdx, setHoveredSessionIdx] = useState(null);
|
|
36
58
|
const recordingRef = useRef(null);
|
|
37
59
|
|
|
60
|
+
// Section refs for scroll-to-section tab behavior
|
|
61
|
+
const overviewRef = useRef(null);
|
|
62
|
+
const coachingRef = useRef(null);
|
|
63
|
+
const signalsRef = useRef(null);
|
|
64
|
+
const commentsRef = useRef(null);
|
|
65
|
+
const sectionRefs = { overview: overviewRef, coaching: coachingRef, signals: signalsRef, comments: commentsRef };
|
|
66
|
+
|
|
67
|
+
const handleTabClick = (key) => {
|
|
68
|
+
setActiveTab(key);
|
|
69
|
+
const ref = sectionRefs[key];
|
|
70
|
+
if (ref?.current) {
|
|
71
|
+
ref.current.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
38
75
|
const sessionHistory = [
|
|
39
76
|
{ title: 'Tire Repair Appointment', date: '11/12/2025, 2:30:00 PM' },
|
|
40
77
|
{ title: 'Quote Confirmation', date: '10/1/2025, 9:00:00 AM' },
|
|
@@ -123,8 +160,8 @@ const UpdatedInteractionDetails = ({
|
|
|
123
160
|
],
|
|
124
161
|
};
|
|
125
162
|
|
|
126
|
-
const agentName = '
|
|
127
|
-
const customerName =
|
|
163
|
+
const agentName = externalAgentName || 'Agent';
|
|
164
|
+
const customerName = externalCustomerName || 'Customer';
|
|
128
165
|
const customerSessions = 8;
|
|
129
166
|
const dateStr = meta.evaluated_dt ? new Date(meta.evaluated_dt).toLocaleString() : '3/29/2026, 8:30:00 AM';
|
|
130
167
|
const direction = demoCallPurpose.interaction_direction === 'inbound' ? 'Inbound' : 'Outbound';
|
|
@@ -173,7 +210,7 @@ const UpdatedInteractionDetails = ({
|
|
|
173
210
|
{TABS.map((tab) => (
|
|
174
211
|
<button
|
|
175
212
|
key={tab.key}
|
|
176
|
-
onClick={() =>
|
|
213
|
+
onClick={() => handleTabClick(tab.key)}
|
|
177
214
|
style={{
|
|
178
215
|
display: 'flex',
|
|
179
216
|
padding: 16,
|
|
@@ -199,18 +236,17 @@ const UpdatedInteractionDetails = ({
|
|
|
199
236
|
))}
|
|
200
237
|
</div>
|
|
201
238
|
|
|
202
|
-
{/*
|
|
239
|
+
{/* All sections rendered — tabs scroll to them */}
|
|
203
240
|
<div style={{ padding: 24, flex: 1, overflowY: 'auto' }}>
|
|
204
|
-
{/* ═══ OVERVIEW
|
|
205
|
-
{
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}}>
|
|
241
|
+
{/* ═══ OVERVIEW SECTION ═══ */}
|
|
242
|
+
<div ref={overviewRef} style={{
|
|
243
|
+
display: 'flex',
|
|
244
|
+
flexDirection: 'column',
|
|
245
|
+
justifyContent: 'flex-end',
|
|
246
|
+
alignItems: 'flex-start',
|
|
247
|
+
gap: 24,
|
|
248
|
+
alignSelf: 'stretch',
|
|
249
|
+
}}>
|
|
214
250
|
{/* Figma node 106-3508: Section Header — horizontal, gap: 16, height: 40, center */}
|
|
215
251
|
<div style={{
|
|
216
252
|
display: 'flex',
|
|
@@ -443,108 +479,90 @@ const UpdatedInteractionDetails = ({
|
|
|
443
479
|
</div>
|
|
444
480
|
</div>
|
|
445
481
|
|
|
446
|
-
{/* Coaching Summary — full width */}
|
|
447
|
-
<UpdatedCoachingSynthesisCard data={demoCoaching} />
|
|
448
|
-
|
|
449
|
-
{/* Figma node 222-660: SIGNALS & RECORDING section */}
|
|
450
|
-
<div style={{
|
|
451
|
-
display: 'flex',
|
|
452
|
-
flexDirection: 'column',
|
|
453
|
-
gap: 16,
|
|
454
|
-
alignSelf: 'stretch',
|
|
455
|
-
}}>
|
|
456
|
-
{/* Section header — Figma: FileSignal icon + "Signals & Recording" 16px/700 */}
|
|
457
|
-
<div style={{
|
|
458
|
-
display: 'flex',
|
|
459
|
-
alignItems: 'center',
|
|
460
|
-
gap: 8,
|
|
461
|
-
}}>
|
|
462
|
-
<FileSignal size={24} color="#C98A5A" strokeWidth={2} />
|
|
463
|
-
<span style={{
|
|
464
|
-
fontSize: 16,
|
|
465
|
-
fontWeight: 600,
|
|
466
|
-
color: 'var(--Grey-Strong, #2E3236)',
|
|
467
|
-
lineHeight: 1.2,
|
|
468
|
-
textTransform: 'uppercase',
|
|
469
|
-
}}>
|
|
470
|
-
Signals & Recording
|
|
471
|
-
</span>
|
|
472
|
-
</div>
|
|
473
|
-
|
|
474
|
-
{/* Content: Signals (left) | Recording+Transcript (right) */}
|
|
475
|
-
<div style={{
|
|
476
|
-
display: 'flex',
|
|
477
|
-
alignItems: 'flex-start',
|
|
478
|
-
gap: 24,
|
|
479
|
-
alignSelf: 'stretch',
|
|
480
|
-
paddingTop: 16,
|
|
481
|
-
borderTop: '1px solid #D9D9D9',
|
|
482
|
-
}}>
|
|
483
|
-
{/* Left — Signals */}
|
|
484
|
-
<div style={{ flex: 1, minWidth: 0 }}>
|
|
485
|
-
<UpdatedInteractionSignals
|
|
486
|
-
signals={demoSignals}
|
|
487
|
-
expandedSignals={expandedSignals}
|
|
488
|
-
toggleSignal={toggleSignal}
|
|
489
|
-
onShowInTranscript={handleShowInTranscript}
|
|
490
|
-
/>
|
|
491
|
-
</div>
|
|
492
|
-
|
|
493
|
-
{/* Right — Recording + Transcript */}
|
|
494
|
-
<div style={{ flex: 1, minWidth: 0 }}>
|
|
495
|
-
<UpdatedInteractionRecording
|
|
496
|
-
ref={recordingRef}
|
|
497
|
-
audioUrl={audioUrl}
|
|
498
|
-
durationSeconds={demoMeta.duration_seconds}
|
|
499
|
-
currentTimeSeconds={0}
|
|
500
|
-
/>
|
|
501
|
-
</div>
|
|
502
|
-
</div>
|
|
503
|
-
</div>
|
|
504
|
-
|
|
505
482
|
</div>
|
|
506
|
-
)}
|
|
507
483
|
|
|
508
|
-
{/* ═══ COACHING SUMMARY
|
|
509
|
-
{
|
|
484
|
+
{/* ═══ COACHING SUMMARY SECTION ═══ */}
|
|
485
|
+
<div ref={coachingRef} style={{ paddingTop: 24 }}>
|
|
510
486
|
<UpdatedCoachingSynthesisCard data={demoCoaching} />
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
{/* ═══ SIGNALS &
|
|
514
|
-
{
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
487
|
+
</div>
|
|
488
|
+
|
|
489
|
+
{/* ═══ SIGNALS & RECORDING SECTION ═══ */}
|
|
490
|
+
<div ref={signalsRef} style={{
|
|
491
|
+
display: 'flex',
|
|
492
|
+
flexDirection: 'column',
|
|
493
|
+
gap: 16,
|
|
494
|
+
alignSelf: 'stretch',
|
|
495
|
+
paddingTop: 24,
|
|
496
|
+
}}>
|
|
497
|
+
{/* Section header */}
|
|
498
|
+
<div style={{
|
|
499
|
+
display: 'flex',
|
|
500
|
+
alignItems: 'center',
|
|
501
|
+
gap: 8,
|
|
502
|
+
}}>
|
|
503
|
+
<FileSignal size={24} color="#C98A5A" strokeWidth={2} />
|
|
504
|
+
<span style={{
|
|
505
|
+
fontSize: 16,
|
|
506
|
+
fontWeight: 600,
|
|
507
|
+
color: 'var(--Grey-Strong, #2E3236)',
|
|
508
|
+
lineHeight: 1.2,
|
|
509
|
+
textTransform: 'uppercase',
|
|
521
510
|
}}>
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
511
|
+
Signals & Recording
|
|
512
|
+
</span>
|
|
513
|
+
</div>
|
|
514
|
+
|
|
515
|
+
{/* Content: Signals (left) | Recording+Transcript (right) */}
|
|
516
|
+
<div style={{
|
|
517
|
+
display: 'flex',
|
|
518
|
+
alignItems: 'flex-start',
|
|
519
|
+
gap: 24,
|
|
520
|
+
alignSelf: 'stretch',
|
|
521
|
+
paddingTop: 16,
|
|
522
|
+
borderTop: '1px solid #D9D9D9',
|
|
523
|
+
}}>
|
|
524
|
+
<div style={{ flex: 1, minWidth: 0 }}>
|
|
525
|
+
<UpdatedInteractionSignals
|
|
526
|
+
signals={demoSignals}
|
|
527
|
+
expandedSignals={expandedSignals}
|
|
528
|
+
toggleSignal={toggleSignal}
|
|
529
|
+
onShowInTranscript={handleShowInTranscript}
|
|
530
|
+
/>
|
|
531
|
+
</div>
|
|
532
|
+
<div style={{ flex: 1, minWidth: 0 }}>
|
|
533
|
+
<UpdatedInteractionRecording
|
|
534
|
+
ref={recordingRef}
|
|
535
|
+
audioUrl={audioUrl}
|
|
536
|
+
durationSeconds={demoMeta.duration_seconds}
|
|
537
|
+
audioRef={externalAudioRef}
|
|
538
|
+
agentName={agentName}
|
|
539
|
+
customerName={customerName.split(' ')[0]}
|
|
540
|
+
currentTimeSeconds={currentTimeSeconds}
|
|
541
|
+
timelinePlaying={timelinePlaying}
|
|
542
|
+
playbackRate={playbackRate}
|
|
543
|
+
timelineSegments={timelineSegments}
|
|
544
|
+
onSeek={onSeek}
|
|
545
|
+
onTogglePlay={onTogglePlay}
|
|
546
|
+
onSeekBack={onSeekBack}
|
|
547
|
+
onSeekForward={onSeekForward}
|
|
548
|
+
onSetPlaybackRate={onSetPlaybackRate}
|
|
549
|
+
transcript={transcript}
|
|
550
|
+
activeTurnIndex={activeTurnIndex}
|
|
551
|
+
turnObservations={turnObservations}
|
|
552
|
+
highlightedTurns={highlightedTurns}
|
|
553
|
+
onTurnPlayPause={onTurnPlayPause}
|
|
554
|
+
setExpandedSignals={setExpandedSignals}
|
|
555
|
+
/>
|
|
538
556
|
</div>
|
|
539
557
|
</div>
|
|
540
|
-
|
|
558
|
+
</div>
|
|
541
559
|
|
|
542
|
-
{/* ═══ COMMENTS
|
|
543
|
-
{
|
|
560
|
+
{/* ═══ COMMENTS SECTION ═══ */}
|
|
561
|
+
<div ref={commentsRef} style={{ paddingTop: 24 }}>
|
|
544
562
|
<div style={{ fontSize: 14, color: 'var(--Grey-Muted, #808183)', fontFamily: 'var(--font-sans)' }}>
|
|
545
563
|
No comments yet.
|
|
546
564
|
</div>
|
|
547
|
-
|
|
565
|
+
</div>
|
|
548
566
|
</div>
|
|
549
567
|
|
|
550
568
|
{/* Figma node 113-8262: Sticky Footer — Previous / Next Session */}
|