chordia-ui 3.8.2 → 3.8.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chordia-ui",
3
- "version": "3.8.2",
3
+ "version": "3.8.3",
4
4
  "description": "Chordia Design System - UI components, tokens, and Tailwind preset",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
@@ -72,6 +72,7 @@ const UpdatedInteractionContext = ({
72
72
  const resolvedResolutionOutcome = resolutionOutcome ?? (dimResolution ? fmtValue(dimResolution.value) : null);
73
73
  const resolvedCustomerIntent = customerIntent ?? (dimIntent ? fmtValue(dimIntent.value) : null);
74
74
  const resolvedLocation = location ?? (dimLocation ? fmtValue(dimLocation.value) : null);
75
+ const resolvedParadigm = paradigm != null ? fmtValue(paradigm) : null;
75
76
 
76
77
  // Keys to exclude from the generic dimensions grid (they go in dedicated spots)
77
78
  const excludedKeys = new Set(['resolution_outcome', 'customer_intent', 'location', 'outcome_quality'].map((k) => `dim.${k}`));
@@ -86,7 +87,8 @@ const UpdatedInteractionContext = ({
86
87
  ],
87
88
  [
88
89
  driver != null ? { label: 'Driver', value: driver } : null,
89
- paradigm != null ? { label: 'Paradigm', value: paradigm } : null,
90
+ // paradigm != null ? { label: 'Paradigm', value: paradigm } : null,
91
+ resolvedLocation != null ? { label: 'Location', value: resolvedLocation } : null,
90
92
  ],
91
93
  ];
92
94
 
@@ -109,7 +111,8 @@ const UpdatedInteractionContext = ({
109
111
  const detailRows = [
110
112
  resolvedResolutionOutcome != null && { label: 'Resolution Outcome', value: resolvedResolutionOutcome },
111
113
  resolvedCustomerIntent != null && { label: 'Customer Intent', value: resolvedCustomerIntent },
112
- resolvedLocation != null && { label: 'Location', value: resolvedLocation },
114
+ // resolvedLocation != null && { label: 'Location', value: resolvedLocation },
115
+ resolvedParadigm != null && { label: 'Paradigm', value: resolvedParadigm },
113
116
  ...(moreDetails || []),
114
117
  ].filter(Boolean);
115
118
 
@@ -1,5 +1,5 @@
1
1
  import { useState, useRef, useEffect } from 'react';
2
- import { ArrowLeft, ArrowRight, CalendarDays, PhoneIncoming, ClipboardList, FileSignal, Repeat, ChevronDown, ChevronRight, Headset, CircleUser, History, ExternalLink, Mail } from 'lucide-react';
2
+ import { ArrowLeft, ArrowRight, CalendarDays, PhoneIncoming, PhoneOutgoing, ClipboardList, FileSignal, Repeat, ChevronDown, ChevronRight, Headset, CircleUser, History, ExternalLink, Mail } from 'lucide-react';
3
3
  import UpdatedInteractionContext from './UpdatedInteractionContext';
4
4
  import UpdatedInteractionRecording from './UpdatedInteractionRecording';
5
5
  import UpdatedInteractionScores from './UpdatedInteractionScores';
@@ -75,6 +75,20 @@ const TABS = [
75
75
  { key: 'comments', label: 'Feedback' },
76
76
  ];
77
77
 
78
+ /** inbound | outbound | null — for session drawer title icons */
79
+ function resolveSessionDirection(session, fallbackDirection) {
80
+ const raw =
81
+ session?.direction ??
82
+ session?.interaction_direction ??
83
+ session?.call_direction ??
84
+ fallbackDirection;
85
+ if (raw == null || raw === '') return null;
86
+ const d = String(raw).toLowerCase().trim();
87
+ if (d === 'outbound' || d.startsWith('outbound')) return 'outbound';
88
+ if (d === 'inbound' || d.startsWith('inbound')) return 'inbound';
89
+ return null;
90
+ }
91
+
78
92
  const UpdatedInteractionDetails = ({
79
93
  title = 'Wheel Stud Replacement Enquiry',
80
94
  onBack,
@@ -975,6 +989,12 @@ const UpdatedInteractionDetails = ({
975
989
  // page you're already on).
976
990
  const isCurrent = !!session.isCurrent;
977
991
  const isHovered = !isCurrent && hoveredSessionIdx === i;
992
+ const sessionDirection = resolveSessionDirection(
993
+ session,
994
+ resolvedCallPurpose.interaction_direction
995
+ );
996
+ const SessionDirectionIcon =
997
+ sessionDirection === 'outbound' ? PhoneOutgoing : PhoneIncoming;
978
998
  return (
979
999
  <div
980
1000
  key={session.id || i}
@@ -1021,7 +1041,25 @@ const UpdatedInteractionDetails = ({
1021
1041
  textOverflow: 'ellipsis',
1022
1042
  }}
1023
1043
  >
1024
- {session.title}
1044
+ {/* {session.title} */}
1045
+ {sessionDirection && (
1046
+ <SessionDirectionIcon
1047
+ size={16}
1048
+ color="var(--Grey-Muted, #808183)"
1049
+ strokeWidth={1.5}
1050
+ style={{ flexShrink: 0 }}
1051
+ aria-hidden
1052
+ />
1053
+ )}
1054
+ <span
1055
+ style={{
1056
+ overflow: 'hidden',
1057
+ textOverflow: 'ellipsis',
1058
+ minWidth: 0,
1059
+ }}
1060
+ >
1061
+ {session.title}
1062
+ </span>
1025
1063
  </div>
1026
1064
  {session.status && (
1027
1065
  <div style={{ fontSize: 13, color: 'var(--Grey-Strong, #2E3236)', marginBottom: 12, lineHeight: 1.2 }}>