@thisispamela/react 1.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/README.md +293 -0
- package/dist/CallButton.d.ts +4 -0
- package/dist/CallButton.d.ts.map +1 -0
- package/dist/CallHistory.d.ts +4 -0
- package/dist/CallHistory.d.ts.map +1 -0
- package/dist/CallStatus.d.ts +4 -0
- package/dist/CallStatus.d.ts.map +1 -0
- package/dist/PamelaProvider.d.ts +14 -0
- package/dist/PamelaProvider.d.ts.map +1 -0
- package/dist/TranscriptViewer.d.ts +4 -0
- package/dist/TranscriptViewer.d.ts.map +1 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +417 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +424 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +42 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
import React, { createContext, useContext, useState, useEffect } from 'react';
|
|
2
|
+
import { PamelaClient } from '@thisispamela/sdk';
|
|
3
|
+
|
|
4
|
+
function styleInject(css, ref) {
|
|
5
|
+
if ( ref === void 0 ) ref = {};
|
|
6
|
+
var insertAt = ref.insertAt;
|
|
7
|
+
|
|
8
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
9
|
+
|
|
10
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
11
|
+
var style = document.createElement('style');
|
|
12
|
+
style.type = 'text/css';
|
|
13
|
+
|
|
14
|
+
if (insertAt === 'top') {
|
|
15
|
+
if (head.firstChild) {
|
|
16
|
+
head.insertBefore(style, head.firstChild);
|
|
17
|
+
} else {
|
|
18
|
+
head.appendChild(style);
|
|
19
|
+
}
|
|
20
|
+
} else {
|
|
21
|
+
head.appendChild(style);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (style.styleSheet) {
|
|
25
|
+
style.styleSheet.cssText = css;
|
|
26
|
+
} else {
|
|
27
|
+
style.appendChild(document.createTextNode(css));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var css_248z = "/**\n * Pamela B2B React Component Library - Default Styles\n * \n * These styles match the Pamela B2C design system:\n * - Colors: Orange (#FA931C), Beige (#e7ab84), Blue (#4b4bea)\n * - Fonts: Poppins, Inter\n * - Dark mode support\n */\n\n/* Pulse animation for status indicators */\n@keyframes pamela-pulse {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n}\n\n/* Call Button - matches your gradient style */\n.pamela-call-button {\n font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;\n background: linear-gradient(to right, #FA931C, #fd8b74);\n color: white;\n border: none;\n border-radius: 0.5rem;\n font-weight: 600;\n transition: opacity 0.2s;\n box-shadow: 0 2px 4px rgba(250, 147, 28, 0.2);\n}\n\n.pamela-call-button:hover:not(:disabled) {\n opacity: 0.9;\n}\n\n.pamela-call-button:disabled {\n opacity: 0.7;\n cursor: not-allowed;\n background: linear-gradient(to right, #ccc, #aaa);\n}\n\n/* Call Status - matches your card style */\n.pamela-call-status {\n font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;\n}\n\n/* Transcript Viewer - matches your message bubble style */\n.pamela-transcript-viewer {\n font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;\n}\n\n/* Dark mode support */\n@media (prefers-color-scheme: dark) {\n .pamela-call-status {\n color: #ffffff;\n }\n \n .pamela-transcript-viewer {\n color: #ffffff;\n }\n}\n\n";
|
|
32
|
+
styleInject(css_248z);
|
|
33
|
+
|
|
34
|
+
const PamelaContext = createContext(null);
|
|
35
|
+
function PamelaProvider({ config, children }) {
|
|
36
|
+
const client = new PamelaClient({
|
|
37
|
+
apiKey: config.apiKey,
|
|
38
|
+
baseUrl: config.baseUrl,
|
|
39
|
+
});
|
|
40
|
+
return (React.createElement(PamelaContext.Provider, { value: { client } }, children));
|
|
41
|
+
}
|
|
42
|
+
function usePamela() {
|
|
43
|
+
const context = useContext(PamelaContext);
|
|
44
|
+
if (!context) {
|
|
45
|
+
throw new Error('usePamela must be used within a PamelaProvider');
|
|
46
|
+
}
|
|
47
|
+
return context;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function CallButton({ to, task, country, locale, instructions, end_user_id, metadata, onCallStart, onCallComplete, onError, disabled = false, className = '', children, }) {
|
|
51
|
+
const { client } = usePamela();
|
|
52
|
+
const [loading, setLoading] = useState(false);
|
|
53
|
+
const [callId, setCallId] = useState(null);
|
|
54
|
+
const handleClick = async () => {
|
|
55
|
+
if (loading || disabled)
|
|
56
|
+
return;
|
|
57
|
+
setLoading(true);
|
|
58
|
+
try {
|
|
59
|
+
const call = await client.createCall({
|
|
60
|
+
to,
|
|
61
|
+
task,
|
|
62
|
+
country,
|
|
63
|
+
locale,
|
|
64
|
+
instructions,
|
|
65
|
+
end_user_id,
|
|
66
|
+
metadata,
|
|
67
|
+
});
|
|
68
|
+
setCallId(call.id);
|
|
69
|
+
onCallStart?.(call.id);
|
|
70
|
+
// Poll for call completion
|
|
71
|
+
const pollInterval = setInterval(async () => {
|
|
72
|
+
try {
|
|
73
|
+
const status = await client.getCall(call.id);
|
|
74
|
+
if (status.status === 'completed' || status.status === 'failed' || status.status === 'cancelled') {
|
|
75
|
+
clearInterval(pollInterval);
|
|
76
|
+
setLoading(false);
|
|
77
|
+
onCallComplete?.(status);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
clearInterval(pollInterval);
|
|
82
|
+
setLoading(false);
|
|
83
|
+
onError?.(error);
|
|
84
|
+
}
|
|
85
|
+
}, 2000);
|
|
86
|
+
// Timeout after 5 minutes
|
|
87
|
+
setTimeout(() => {
|
|
88
|
+
clearInterval(pollInterval);
|
|
89
|
+
setLoading(false);
|
|
90
|
+
}, 5 * 60 * 1000);
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
setLoading(false);
|
|
94
|
+
onError?.(error);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
return (React.createElement("button", { onClick: handleClick, disabled: loading || disabled, className: `pamela-call-button ${className}`, style: {
|
|
98
|
+
padding: '10px 20px',
|
|
99
|
+
background: loading
|
|
100
|
+
? 'linear-gradient(to right, #ccc, #aaa)'
|
|
101
|
+
: 'linear-gradient(to right, #FA931C, #fd8b74)',
|
|
102
|
+
color: 'white',
|
|
103
|
+
border: 'none',
|
|
104
|
+
borderRadius: '0.5rem',
|
|
105
|
+
cursor: loading || disabled ? 'not-allowed' : 'pointer',
|
|
106
|
+
fontSize: '16px',
|
|
107
|
+
fontWeight: '600',
|
|
108
|
+
fontFamily: 'Poppins, Inter, -apple-system, BlinkMacSystemFont, sans-serif',
|
|
109
|
+
transition: 'opacity 0.2s',
|
|
110
|
+
opacity: loading || disabled ? 0.7 : 1,
|
|
111
|
+
boxShadow: loading || disabled ? 'none' : '0 2px 4px rgba(250, 147, 28, 0.2)',
|
|
112
|
+
} }, loading ? 'Calling...' : children || 'Call Now'));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function TranscriptViewer({ transcript, className = '' }) {
|
|
116
|
+
const getMessageStyle = (speaker) => {
|
|
117
|
+
if (speaker === 'pamela' || speaker === 'agent') {
|
|
118
|
+
// Pamela messages: white background with beige border
|
|
119
|
+
return {
|
|
120
|
+
backgroundColor: '#ffffff',
|
|
121
|
+
border: '1px solid rgba(231, 171, 132, 0.3)',
|
|
122
|
+
color: '#1f2937',
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
else if (speaker === 'user' || speaker === 'caller') {
|
|
126
|
+
// User messages: orange background
|
|
127
|
+
return {
|
|
128
|
+
backgroundColor: '#FA931C',
|
|
129
|
+
border: 'none',
|
|
130
|
+
color: '#ffffff',
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
// Call recipient: blue background
|
|
135
|
+
return {
|
|
136
|
+
backgroundColor: '#4b4bea',
|
|
137
|
+
border: 'none',
|
|
138
|
+
color: '#ffffff',
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
return (React.createElement("div", { className: `pamela-transcript-viewer ${className}`, style: {
|
|
143
|
+
fontFamily: 'Poppins, Inter, -apple-system, BlinkMacSystemFont, sans-serif',
|
|
144
|
+
} },
|
|
145
|
+
React.createElement("h3", { style: {
|
|
146
|
+
marginBottom: '16px',
|
|
147
|
+
fontSize: '18px',
|
|
148
|
+
fontWeight: '600',
|
|
149
|
+
color: '#1f2937',
|
|
150
|
+
} }, "Transcript"),
|
|
151
|
+
React.createElement("div", { style: {
|
|
152
|
+
maxHeight: '400px',
|
|
153
|
+
overflowY: 'auto',
|
|
154
|
+
borderRadius: '0.5rem',
|
|
155
|
+
padding: '16px',
|
|
156
|
+
backgroundColor: '#F7F4ED',
|
|
157
|
+
} }, transcript.map((entry, index) => {
|
|
158
|
+
const style = getMessageStyle(entry.speaker);
|
|
159
|
+
return (React.createElement("div", { key: index, style: {
|
|
160
|
+
marginBottom: '12px',
|
|
161
|
+
padding: '12px 16px',
|
|
162
|
+
...style,
|
|
163
|
+
borderRadius: '0.75rem',
|
|
164
|
+
maxWidth: '75%',
|
|
165
|
+
marginLeft: entry.speaker === 'pamela' || entry.speaker === 'agent' ? '0' : 'auto',
|
|
166
|
+
marginRight: entry.speaker === 'pamela' || entry.speaker === 'agent' ? 'auto' : '0',
|
|
167
|
+
} },
|
|
168
|
+
React.createElement("div", { style: {
|
|
169
|
+
fontSize: '12px',
|
|
170
|
+
fontWeight: '600',
|
|
171
|
+
color: style.color === '#ffffff' ? 'rgba(255, 255, 255, 0.9)' : '#6b7280',
|
|
172
|
+
marginBottom: '6px',
|
|
173
|
+
textTransform: 'capitalize',
|
|
174
|
+
} }, entry.speaker === 'pamela' || entry.speaker === 'agent'
|
|
175
|
+
? 'Pamela'
|
|
176
|
+
: entry.speaker === 'user' || entry.speaker === 'caller'
|
|
177
|
+
? 'You'
|
|
178
|
+
: 'Call Recipient'),
|
|
179
|
+
React.createElement("div", { style: {
|
|
180
|
+
fontSize: '14px',
|
|
181
|
+
lineHeight: '1.6',
|
|
182
|
+
color: style.color,
|
|
183
|
+
whiteSpace: 'pre-wrap',
|
|
184
|
+
wordBreak: 'break-word',
|
|
185
|
+
} }, entry.text),
|
|
186
|
+
entry.timestamp && (React.createElement("div", { style: {
|
|
187
|
+
fontSize: '11px',
|
|
188
|
+
color: style.color === '#ffffff' ? 'rgba(255, 255, 255, 0.7)' : '#9ca3af',
|
|
189
|
+
marginTop: '6px',
|
|
190
|
+
} }, new Date(entry.timestamp).toLocaleTimeString()))));
|
|
191
|
+
}))));
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Status indicator component matching your 3-color system
|
|
195
|
+
function StatusIndicator({ status }) {
|
|
196
|
+
const getStatusConfig = () => {
|
|
197
|
+
switch (status) {
|
|
198
|
+
case 'ringing':
|
|
199
|
+
return {
|
|
200
|
+
dots: [
|
|
201
|
+
{ color: '#10b981', pulse: true }, // green-500 (first dot)
|
|
202
|
+
{ color: '#eab308', pulse: true }, // yellow-500 (second dot)
|
|
203
|
+
{ color: '#d1d5db', pulse: false }, // gray-300 (third dot)
|
|
204
|
+
{ color: '#d1d5db', pulse: false }, // gray-300 (fourth dot)
|
|
205
|
+
],
|
|
206
|
+
text: 'Ringing...',
|
|
207
|
+
textColor: '#eab308', // yellow-600
|
|
208
|
+
};
|
|
209
|
+
case 'in_progress':
|
|
210
|
+
case 'in-progress':
|
|
211
|
+
return {
|
|
212
|
+
dots: [
|
|
213
|
+
{ color: '#10b981', pulse: false }, // green-500
|
|
214
|
+
{ color: '#10b981', pulse: false },
|
|
215
|
+
{ color: '#10b981', pulse: true }, // third dot pulses
|
|
216
|
+
{ color: '#d1d5db', pulse: false }, // gray-300
|
|
217
|
+
],
|
|
218
|
+
text: 'In progress',
|
|
219
|
+
textColor: '#10b981', // green-600
|
|
220
|
+
};
|
|
221
|
+
case 'completed':
|
|
222
|
+
return {
|
|
223
|
+
dots: [
|
|
224
|
+
{ color: '#10b981', pulse: false },
|
|
225
|
+
{ color: '#10b981', pulse: false },
|
|
226
|
+
{ color: '#10b981', pulse: false },
|
|
227
|
+
{ color: '#10b981', pulse: false, icon: true },
|
|
228
|
+
],
|
|
229
|
+
text: 'Completed',
|
|
230
|
+
textColor: '#10b981',
|
|
231
|
+
};
|
|
232
|
+
case 'failed':
|
|
233
|
+
return {
|
|
234
|
+
dots: [],
|
|
235
|
+
text: 'Failed',
|
|
236
|
+
textColor: '#ef4444', // red-500
|
|
237
|
+
};
|
|
238
|
+
default:
|
|
239
|
+
return {
|
|
240
|
+
dots: [],
|
|
241
|
+
text: status,
|
|
242
|
+
textColor: '#6b7280', // gray-500
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
const config = getStatusConfig();
|
|
247
|
+
return (React.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '6px' } },
|
|
248
|
+
config.dots.length > 0 && (React.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '4px' } }, config.dots.map((dot, idx) => (React.createElement("div", { key: idx }, dot.icon ? (React.createElement("svg", { style: { width: '12px', height: '12px', color: dot.color }, fill: "currentColor", viewBox: "0 0 20 20" },
|
|
249
|
+
React.createElement("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }))) : (React.createElement("div", { style: {
|
|
250
|
+
width: '8px',
|
|
251
|
+
height: '8px',
|
|
252
|
+
borderRadius: '50%',
|
|
253
|
+
backgroundColor: dot.color,
|
|
254
|
+
animation: dot.pulse ? 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite' : 'none',
|
|
255
|
+
} }))))))),
|
|
256
|
+
React.createElement("span", { style: {
|
|
257
|
+
fontSize: '12px',
|
|
258
|
+
fontWeight: '500',
|
|
259
|
+
color: config.textColor,
|
|
260
|
+
fontFamily: 'Poppins, Inter, sans-serif',
|
|
261
|
+
} }, config.text)));
|
|
262
|
+
}
|
|
263
|
+
function CallStatus({ callId, pollInterval = 5000, onStatusChange, showTranscript = true, className = '', }) {
|
|
264
|
+
const { client } = usePamela();
|
|
265
|
+
const [status, setStatus] = useState(null);
|
|
266
|
+
const [loading, setLoading] = useState(true);
|
|
267
|
+
const [error, setError] = useState(null);
|
|
268
|
+
useEffect(() => {
|
|
269
|
+
if (!callId)
|
|
270
|
+
return;
|
|
271
|
+
const fetchStatus = async () => {
|
|
272
|
+
try {
|
|
273
|
+
const callStatus = await client.getCall(callId);
|
|
274
|
+
setStatus(callStatus);
|
|
275
|
+
setLoading(false);
|
|
276
|
+
onStatusChange?.(callStatus);
|
|
277
|
+
}
|
|
278
|
+
catch (err) {
|
|
279
|
+
setError(err);
|
|
280
|
+
setLoading(false);
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
fetchStatus();
|
|
284
|
+
const interval = setInterval(fetchStatus, pollInterval);
|
|
285
|
+
return () => clearInterval(interval);
|
|
286
|
+
}, [callId, pollInterval, client, onStatusChange]);
|
|
287
|
+
if (loading) {
|
|
288
|
+
return (React.createElement("div", { className: `pamela-call-status ${className}` },
|
|
289
|
+
React.createElement("div", { style: { color: '#6b7280', fontFamily: 'Poppins, Inter, sans-serif' } }, "Loading call status...")));
|
|
290
|
+
}
|
|
291
|
+
if (error) {
|
|
292
|
+
return (React.createElement("div", { className: `pamela-call-status ${className}` },
|
|
293
|
+
React.createElement("div", { style: { color: '#ef4444', fontFamily: 'Poppins, Inter, sans-serif' } },
|
|
294
|
+
"Error: ",
|
|
295
|
+
error.message)));
|
|
296
|
+
}
|
|
297
|
+
if (!status) {
|
|
298
|
+
return (React.createElement("div", { className: `pamela-call-status ${className}` },
|
|
299
|
+
React.createElement("div", { style: { color: '#6b7280', fontFamily: 'Poppins, Inter, sans-serif' } }, "Call not found")));
|
|
300
|
+
}
|
|
301
|
+
return (React.createElement("div", { className: `pamela-call-status ${className}`, style: {
|
|
302
|
+
fontFamily: 'Poppins, Inter, -apple-system, BlinkMacSystemFont, sans-serif',
|
|
303
|
+
} },
|
|
304
|
+
React.createElement("div", { style: {
|
|
305
|
+
marginBottom: '16px',
|
|
306
|
+
padding: '16px',
|
|
307
|
+
backgroundColor: '#ffffff',
|
|
308
|
+
borderRadius: '0.75rem',
|
|
309
|
+
border: '1px solid rgba(231, 171, 132, 0.3)',
|
|
310
|
+
boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 0.1)',
|
|
311
|
+
} },
|
|
312
|
+
React.createElement("div", { style: { marginBottom: '12px' } },
|
|
313
|
+
React.createElement(StatusIndicator, { status: status.status })),
|
|
314
|
+
React.createElement("div", { style: { fontSize: '14px', color: '#1f2937', lineHeight: '1.6' } },
|
|
315
|
+
React.createElement("div", { style: { marginBottom: '8px' } },
|
|
316
|
+
React.createElement("span", { style: { fontWeight: '600', color: '#6b7280' } }, "To:"),
|
|
317
|
+
' ',
|
|
318
|
+
React.createElement("span", { style: { color: '#1f2937' } }, status.to)),
|
|
319
|
+
React.createElement("div", { style: { marginBottom: '8px' } },
|
|
320
|
+
React.createElement("span", { style: { fontWeight: '600', color: '#6b7280' } }, "From:"),
|
|
321
|
+
' ',
|
|
322
|
+
React.createElement("span", { style: { color: '#1f2937' } }, status.from_)),
|
|
323
|
+
status.duration_seconds && (React.createElement("div", { style: { marginBottom: '8px' } },
|
|
324
|
+
React.createElement("span", { style: { fontWeight: '600', color: '#6b7280' } }, "Duration:"),
|
|
325
|
+
' ',
|
|
326
|
+
React.createElement("span", { style: { color: '#1f2937' } },
|
|
327
|
+
status.duration_seconds,
|
|
328
|
+
"s")))),
|
|
329
|
+
status.summary && (React.createElement("div", { style: {
|
|
330
|
+
marginTop: '16px',
|
|
331
|
+
padding: '16px',
|
|
332
|
+
background: 'linear-gradient(to right, rgba(250, 147, 28, 0.1), rgba(253, 139, 116, 0.1))',
|
|
333
|
+
border: '1px solid rgba(250, 147, 28, 0.3)',
|
|
334
|
+
borderRadius: '0.75rem',
|
|
335
|
+
} },
|
|
336
|
+
React.createElement("div", { style: {
|
|
337
|
+
display: 'flex',
|
|
338
|
+
alignItems: 'center',
|
|
339
|
+
gap: '8px',
|
|
340
|
+
marginBottom: '8px',
|
|
341
|
+
} },
|
|
342
|
+
React.createElement("svg", { style: { width: '20px', height: '20px', color: '#FA931C' }, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" },
|
|
343
|
+
React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" })),
|
|
344
|
+
React.createElement("h4", { style: { fontWeight: '600', color: '#1f2937', fontSize: '14px' } }, "Call Summary")),
|
|
345
|
+
React.createElement("p", { style: { fontSize: '14px', color: '#1f2937', lineHeight: '1.6' } }, status.summary)))),
|
|
346
|
+
showTranscript && status.transcript && status.transcript.length > 0 && (React.createElement(TranscriptViewer, { transcript: status.transcript })),
|
|
347
|
+
React.createElement("style", null, `
|
|
348
|
+
@keyframes pulse {
|
|
349
|
+
0%, 100% {
|
|
350
|
+
opacity: 1;
|
|
351
|
+
}
|
|
352
|
+
50% {
|
|
353
|
+
opacity: 0.5;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
`)));
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
function CallHistory({ limit = 10, onCallSelect, className = '', }) {
|
|
360
|
+
const { client } = usePamela();
|
|
361
|
+
const [calls, setCalls] = useState([]);
|
|
362
|
+
const [loading, setLoading] = useState(true);
|
|
363
|
+
const [error, setError] = useState(null);
|
|
364
|
+
// Note: This requires a list endpoint in the API
|
|
365
|
+
// For now, this is a placeholder that shows the structure
|
|
366
|
+
useEffect(() => {
|
|
367
|
+
// TODO: Implement when /api/b2b/v1/calls list endpoint is available
|
|
368
|
+
setLoading(false);
|
|
369
|
+
}, [client]);
|
|
370
|
+
if (loading) {
|
|
371
|
+
return (React.createElement("div", { className: `pamela-call-history ${className}` },
|
|
372
|
+
React.createElement("div", { style: { color: '#6b7280', fontFamily: 'Poppins, Inter, sans-serif' } }, "Loading call history...")));
|
|
373
|
+
}
|
|
374
|
+
if (error) {
|
|
375
|
+
return (React.createElement("div", { className: `pamela-call-history ${className}` },
|
|
376
|
+
React.createElement("div", { style: { color: '#ef4444', fontFamily: 'Poppins, Inter, sans-serif' } },
|
|
377
|
+
"Error: ",
|
|
378
|
+
error.message)));
|
|
379
|
+
}
|
|
380
|
+
return (React.createElement("div", { className: `pamela-call-history ${className}`, style: {
|
|
381
|
+
fontFamily: 'Poppins, Inter, -apple-system, BlinkMacSystemFont, sans-serif',
|
|
382
|
+
} },
|
|
383
|
+
React.createElement("h3", { style: {
|
|
384
|
+
marginBottom: '16px',
|
|
385
|
+
fontSize: '18px',
|
|
386
|
+
fontWeight: '600',
|
|
387
|
+
color: '#1f2937',
|
|
388
|
+
} }, "Call History"),
|
|
389
|
+
calls.length === 0 ? (React.createElement("div", { style: { color: '#6b7280', fontSize: '14px' } }, "No calls yet")) : (React.createElement("div", null, calls.map((call) => (React.createElement("div", { key: call.id, onClick: () => onCallSelect?.(call.id), style: {
|
|
390
|
+
padding: '12px',
|
|
391
|
+
marginBottom: '8px',
|
|
392
|
+
border: '1px solid rgba(231, 171, 132, 0.3)',
|
|
393
|
+
borderRadius: '0.5rem',
|
|
394
|
+
cursor: onCallSelect ? 'pointer' : 'default',
|
|
395
|
+
backgroundColor: '#ffffff',
|
|
396
|
+
transition: 'background-color 0.2s',
|
|
397
|
+
...(onCallSelect && {
|
|
398
|
+
':hover': {
|
|
399
|
+
backgroundColor: '#F7F4ED',
|
|
400
|
+
},
|
|
401
|
+
}),
|
|
402
|
+
}, onMouseEnter: (e) => {
|
|
403
|
+
if (onCallSelect) {
|
|
404
|
+
e.currentTarget.style.backgroundColor = '#F7F4ED';
|
|
405
|
+
}
|
|
406
|
+
}, onMouseLeave: (e) => {
|
|
407
|
+
e.currentTarget.style.backgroundColor = '#ffffff';
|
|
408
|
+
} },
|
|
409
|
+
React.createElement("div", { style: { fontWeight: '600', color: '#1f2937', marginBottom: '4px' } }, call.to),
|
|
410
|
+
React.createElement("div", { style: { fontSize: '14px', color: '#6b7280' } },
|
|
411
|
+
call.status,
|
|
412
|
+
" \u2022 ",
|
|
413
|
+
new Date(call.created_at).toLocaleString()))))))));
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
export { CallButton, CallHistory, CallStatus, PamelaProvider, TranscriptViewer, usePamela };
|
|
417
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/PamelaProvider.tsx","../src/CallButton.tsx","../src/TranscriptViewer.tsx","../src/CallStatus.tsx","../src/CallHistory.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React, { createContext, useContext, ReactNode } from 'react';\nimport { PamelaClient, PamelaClientConfig } from '@thisispamela/sdk';\nimport { PamelaConfig } from './types';\n\ninterface PamelaContextValue {\n client: PamelaClient;\n}\n\nconst PamelaContext = createContext<PamelaContextValue | null>(null);\n\nexport interface PamelaProviderProps {\n config: PamelaConfig;\n children: ReactNode;\n}\n\nexport function PamelaProvider({ config, children }: PamelaProviderProps) {\n const client = new PamelaClient({\n apiKey: config.apiKey,\n baseUrl: config.baseUrl,\n });\n\n return (\n <PamelaContext.Provider value={{ client }}>\n {children}\n </PamelaContext.Provider>\n );\n}\n\nexport function usePamela(): PamelaContextValue {\n const context = useContext(PamelaContext);\n if (!context) {\n throw new Error('usePamela must be used within a PamelaProvider');\n }\n return context;\n}\n\n","import React, { useState } from 'react';\nimport { usePamela } from './PamelaProvider';\nimport { CallButtonProps } from './types';\n\nexport function CallButton({\n to,\n task,\n country,\n locale,\n instructions,\n end_user_id,\n metadata,\n onCallStart,\n onCallComplete,\n onError,\n disabled = false,\n className = '',\n children,\n}: CallButtonProps) {\n const { client } = usePamela();\n const [loading, setLoading] = useState(false);\n const [callId, setCallId] = useState<string | null>(null);\n\n const handleClick = async () => {\n if (loading || disabled) return;\n\n setLoading(true);\n try {\n const call = await client.createCall({\n to,\n task,\n country,\n locale,\n instructions,\n end_user_id,\n metadata,\n });\n\n setCallId(call.id);\n onCallStart?.(call.id);\n\n // Poll for call completion\n const pollInterval = setInterval(async () => {\n try {\n const status = await client.getCall(call.id);\n if (status.status === 'completed' || status.status === 'failed' || status.status === 'cancelled') {\n clearInterval(pollInterval);\n setLoading(false);\n onCallComplete?.(status);\n }\n } catch (error) {\n clearInterval(pollInterval);\n setLoading(false);\n onError?.(error as Error);\n }\n }, 2000);\n\n // Timeout after 5 minutes\n setTimeout(() => {\n clearInterval(pollInterval);\n setLoading(false);\n }, 5 * 60 * 1000);\n } catch (error) {\n setLoading(false);\n onError?.(error as Error);\n }\n };\n\n return (\n <button\n onClick={handleClick}\n disabled={loading || disabled}\n className={`pamela-call-button ${className}`}\n style={{\n padding: '10px 20px',\n background: loading \n ? 'linear-gradient(to right, #ccc, #aaa)' \n : 'linear-gradient(to right, #FA931C, #fd8b74)',\n color: 'white',\n border: 'none',\n borderRadius: '0.5rem',\n cursor: loading || disabled ? 'not-allowed' : 'pointer',\n fontSize: '16px',\n fontWeight: '600',\n fontFamily: 'Poppins, Inter, -apple-system, BlinkMacSystemFont, sans-serif',\n transition: 'opacity 0.2s',\n opacity: loading || disabled ? 0.7 : 1,\n boxShadow: loading || disabled ? 'none' : '0 2px 4px rgba(250, 147, 28, 0.2)',\n }}\n >\n {loading ? 'Calling...' : children || 'Call Now'}\n </button>\n );\n}\n\n","import React from 'react';\nimport { TranscriptViewerProps } from './types';\n\nexport function TranscriptViewer({ transcript, className = '' }: TranscriptViewerProps) {\n const getMessageStyle = (speaker: string) => {\n if (speaker === 'pamela' || speaker === 'agent') {\n // Pamela messages: white background with beige border\n return {\n backgroundColor: '#ffffff',\n border: '1px solid rgba(231, 171, 132, 0.3)',\n color: '#1f2937',\n };\n } else if (speaker === 'user' || speaker === 'caller') {\n // User messages: orange background\n return {\n backgroundColor: '#FA931C',\n border: 'none',\n color: '#ffffff',\n };\n } else {\n // Call recipient: blue background\n return {\n backgroundColor: '#4b4bea',\n border: 'none',\n color: '#ffffff',\n };\n }\n };\n\n return (\n <div\n className={`pamela-transcript-viewer ${className}`}\n style={{\n fontFamily: 'Poppins, Inter, -apple-system, BlinkMacSystemFont, sans-serif',\n }}\n >\n <h3\n style={{\n marginBottom: '16px',\n fontSize: '18px',\n fontWeight: '600',\n color: '#1f2937',\n }}\n >\n Transcript\n </h3>\n <div\n style={{\n maxHeight: '400px',\n overflowY: 'auto',\n borderRadius: '0.5rem',\n padding: '16px',\n backgroundColor: '#F7F4ED',\n }}\n >\n {transcript.map((entry, index) => {\n const style = getMessageStyle(entry.speaker);\n return (\n <div\n key={index}\n style={{\n marginBottom: '12px',\n padding: '12px 16px',\n ...style,\n borderRadius: '0.75rem',\n maxWidth: '75%',\n marginLeft: entry.speaker === 'pamela' || entry.speaker === 'agent' ? '0' : 'auto',\n marginRight: entry.speaker === 'pamela' || entry.speaker === 'agent' ? 'auto' : '0',\n }}\n >\n <div\n style={{\n fontSize: '12px',\n fontWeight: '600',\n color: style.color === '#ffffff' ? 'rgba(255, 255, 255, 0.9)' : '#6b7280',\n marginBottom: '6px',\n textTransform: 'capitalize',\n }}\n >\n {entry.speaker === 'pamela' || entry.speaker === 'agent'\n ? 'Pamela'\n : entry.speaker === 'user' || entry.speaker === 'caller'\n ? 'You'\n : 'Call Recipient'}\n </div>\n <div\n style={{\n fontSize: '14px',\n lineHeight: '1.6',\n color: style.color,\n whiteSpace: 'pre-wrap',\n wordBreak: 'break-word',\n }}\n >\n {entry.text}\n </div>\n {entry.timestamp && (\n <div\n style={{\n fontSize: '11px',\n color: style.color === '#ffffff' ? 'rgba(255, 255, 255, 0.7)' : '#9ca3af',\n marginTop: '6px',\n }}\n >\n {new Date(entry.timestamp).toLocaleTimeString()}\n </div>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n\n","import React, { useState, useEffect } from 'react';\nimport { usePamela } from './PamelaProvider';\nimport { CallStatusProps } from './types';\nimport { CallStatus as CallStatusType } from '@thisispamela/sdk';\nimport { TranscriptViewer } from './TranscriptViewer';\n\n// Status indicator component matching your 3-color system\nfunction StatusIndicator({ status }: { status: string }) {\n const getStatusConfig = () => {\n switch (status) {\n case 'ringing':\n return {\n dots: [\n { color: '#10b981', pulse: true }, // green-500 (first dot)\n { color: '#eab308', pulse: true }, // yellow-500 (second dot)\n { color: '#d1d5db', pulse: false }, // gray-300 (third dot)\n { color: '#d1d5db', pulse: false }, // gray-300 (fourth dot)\n ],\n text: 'Ringing...',\n textColor: '#eab308', // yellow-600\n };\n case 'in_progress':\n case 'in-progress':\n return {\n dots: [\n { color: '#10b981', pulse: false }, // green-500\n { color: '#10b981', pulse: false },\n { color: '#10b981', pulse: true }, // third dot pulses\n { color: '#d1d5db', pulse: false }, // gray-300\n ],\n text: 'In progress',\n textColor: '#10b981', // green-600\n };\n case 'completed':\n return {\n dots: [\n { color: '#10b981', pulse: false },\n { color: '#10b981', pulse: false },\n { color: '#10b981', pulse: false },\n { color: '#10b981', pulse: false, icon: true },\n ],\n text: 'Completed',\n textColor: '#10b981',\n };\n case 'failed':\n return {\n dots: [],\n text: 'Failed',\n textColor: '#ef4444', // red-500\n };\n default:\n return {\n dots: [],\n text: status,\n textColor: '#6b7280', // gray-500\n };\n }\n };\n\n const config = getStatusConfig();\n\n return (\n <div style={{ display: 'flex', alignItems: 'center', gap: '6px' }}>\n {config.dots.length > 0 && (\n <div style={{ display: 'flex', alignItems: 'center', gap: '4px' }}>\n {config.dots.map((dot, idx) => (\n <div key={idx}>\n {dot.icon ? (\n <svg\n style={{ width: '12px', height: '12px', color: dot.color }}\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n ) : (\n <div\n style={{\n width: '8px',\n height: '8px',\n borderRadius: '50%',\n backgroundColor: dot.color,\n animation: dot.pulse ? 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite' : 'none',\n }}\n />\n )}\n </div>\n ))}\n </div>\n )}\n <span\n style={{\n fontSize: '12px',\n fontWeight: '500',\n color: config.textColor,\n fontFamily: 'Poppins, Inter, sans-serif',\n }}\n >\n {config.text}\n </span>\n </div>\n );\n}\n\nexport function CallStatus({\n callId,\n pollInterval = 5000,\n onStatusChange,\n showTranscript = true,\n className = '',\n}: CallStatusProps) {\n const { client } = usePamela();\n const [status, setStatus] = useState<CallStatusType | null>(null);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n\n useEffect(() => {\n if (!callId) return;\n\n const fetchStatus = async () => {\n try {\n const callStatus = await client.getCall(callId);\n setStatus(callStatus);\n setLoading(false);\n onStatusChange?.(callStatus);\n } catch (err) {\n setError(err as Error);\n setLoading(false);\n }\n };\n\n fetchStatus();\n\n const interval = setInterval(fetchStatus, pollInterval);\n return () => clearInterval(interval);\n }, [callId, pollInterval, client, onStatusChange]);\n\n if (loading) {\n return (\n <div className={`pamela-call-status ${className}`}>\n <div style={{ color: '#6b7280', fontFamily: 'Poppins, Inter, sans-serif' }}>\n Loading call status...\n </div>\n </div>\n );\n }\n\n if (error) {\n return (\n <div className={`pamela-call-status ${className}`}>\n <div style={{ color: '#ef4444', fontFamily: 'Poppins, Inter, sans-serif' }}>\n Error: {error.message}\n </div>\n </div>\n );\n }\n\n if (!status) {\n return (\n <div className={`pamela-call-status ${className}`}>\n <div style={{ color: '#6b7280', fontFamily: 'Poppins, Inter, sans-serif' }}>\n Call not found\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={`pamela-call-status ${className}`}\n style={{\n fontFamily: 'Poppins, Inter, -apple-system, BlinkMacSystemFont, sans-serif',\n }}\n >\n <div\n style={{\n marginBottom: '16px',\n padding: '16px',\n backgroundColor: '#ffffff',\n borderRadius: '0.75rem',\n border: '1px solid rgba(231, 171, 132, 0.3)',\n boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 0.1)',\n }}\n >\n <div style={{ marginBottom: '12px' }}>\n <StatusIndicator status={status.status} />\n </div>\n <div style={{ fontSize: '14px', color: '#1f2937', lineHeight: '1.6' }}>\n <div style={{ marginBottom: '8px' }}>\n <span style={{ fontWeight: '600', color: '#6b7280' }}>To:</span>{' '}\n <span style={{ color: '#1f2937' }}>{status.to}</span>\n </div>\n <div style={{ marginBottom: '8px' }}>\n <span style={{ fontWeight: '600', color: '#6b7280' }}>From:</span>{' '}\n <span style={{ color: '#1f2937' }}>{status.from_}</span>\n </div>\n {status.duration_seconds && (\n <div style={{ marginBottom: '8px' }}>\n <span style={{ fontWeight: '600', color: '#6b7280' }}>Duration:</span>{' '}\n <span style={{ color: '#1f2937' }}>{status.duration_seconds}s</span>\n </div>\n )}\n </div>\n {status.summary && (\n <div\n style={{\n marginTop: '16px',\n padding: '16px',\n background: 'linear-gradient(to right, rgba(250, 147, 28, 0.1), rgba(253, 139, 116, 0.1))',\n border: '1px solid rgba(250, 147, 28, 0.3)',\n borderRadius: '0.75rem',\n }}\n >\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n marginBottom: '8px',\n }}\n >\n <svg\n style={{ width: '20px', height: '20px', color: '#FA931C' }}\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z\"\n />\n </svg>\n <h4 style={{ fontWeight: '600', color: '#1f2937', fontSize: '14px' }}>\n Call Summary\n </h4>\n </div>\n <p style={{ fontSize: '14px', color: '#1f2937', lineHeight: '1.6' }}>\n {status.summary}\n </p>\n </div>\n )}\n </div>\n {showTranscript && status.transcript && status.transcript.length > 0 && (\n <TranscriptViewer transcript={status.transcript as Array<{ speaker: string; text: string; timestamp: string }>} />\n )}\n <style>{`\n @keyframes pulse {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n }\n `}</style>\n </div>\n );\n}\n\n","import React, { useState, useEffect } from 'react';\nimport { usePamela } from './PamelaProvider';\nimport { CallHistoryProps } from './types';\nimport { CallStatus } from '@thisispamela/sdk';\n\nexport function CallHistory({\n limit = 10,\n onCallSelect,\n className = '',\n}: CallHistoryProps) {\n const { client } = usePamela();\n const [calls, setCalls] = useState<CallStatus[]>([]);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<Error | null>(null);\n\n // Note: This requires a list endpoint in the API\n // For now, this is a placeholder that shows the structure\n useEffect(() => {\n // TODO: Implement when /api/b2b/v1/calls list endpoint is available\n setLoading(false);\n }, [client]);\n\n if (loading) {\n return (\n <div className={`pamela-call-history ${className}`}>\n <div style={{ color: '#6b7280', fontFamily: 'Poppins, Inter, sans-serif' }}>\n Loading call history...\n </div>\n </div>\n );\n }\n\n if (error) {\n return (\n <div className={`pamela-call-history ${className}`}>\n <div style={{ color: '#ef4444', fontFamily: 'Poppins, Inter, sans-serif' }}>\n Error: {error.message}\n </div>\n </div>\n );\n }\n\n return (\n <div\n className={`pamela-call-history ${className}`}\n style={{\n fontFamily: 'Poppins, Inter, -apple-system, BlinkMacSystemFont, sans-serif',\n }}\n >\n <h3\n style={{\n marginBottom: '16px',\n fontSize: '18px',\n fontWeight: '600',\n color: '#1f2937',\n }}\n >\n Call History\n </h3>\n {calls.length === 0 ? (\n <div style={{ color: '#6b7280', fontSize: '14px' }}>No calls yet</div>\n ) : (\n <div>\n {calls.map((call) => (\n <div\n key={call.id}\n onClick={() => onCallSelect?.(call.id)}\n style={{\n padding: '12px',\n marginBottom: '8px',\n border: '1px solid rgba(231, 171, 132, 0.3)',\n borderRadius: '0.5rem',\n cursor: onCallSelect ? 'pointer' : 'default',\n backgroundColor: '#ffffff',\n transition: 'background-color 0.2s',\n ...(onCallSelect && {\n ':hover': {\n backgroundColor: '#F7F4ED',\n },\n }),\n }}\n onMouseEnter={(e) => {\n if (onCallSelect) {\n e.currentTarget.style.backgroundColor = '#F7F4ED';\n }\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.backgroundColor = '#ffffff';\n }}\n >\n <div style={{ fontWeight: '600', color: '#1f2937', marginBottom: '4px' }}>\n {call.to}\n </div>\n <div style={{ fontSize: '14px', color: '#6b7280' }}>\n {call.status} • {new Date(call.created_at).toLocaleString()}\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n );\n}\n"],"names":[],"mappings":";;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ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