@edvak99/voice-receptionist-widget 1.1.4 → 1.1.6

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.
Files changed (77) hide show
  1. package/README.md +37 -0
  2. package/fesm2022/edvak99-voice-receptionist-widget-activities-page.component-CdrW0He4.mjs +306 -0
  3. package/fesm2022/edvak99-voice-receptionist-widget-activities-page.component-CdrW0He4.mjs.map +1 -0
  4. package/fesm2022/{edvak99-voice-receptionist-widget-ai-receptionist-api.service-48cifVPF.mjs → edvak99-voice-receptionist-widget-ai-receptionist-api.service-DokIb-9r.mjs} +2 -2
  5. package/fesm2022/{edvak99-voice-receptionist-widget-ai-receptionist-api.service-48cifVPF.mjs.map → edvak99-voice-receptionist-widget-ai-receptionist-api.service-DokIb-9r.mjs.map} +1 -1
  6. package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-4GK1vsom.mjs +277 -0
  7. package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-4GK1vsom.mjs.map +1 -0
  8. package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-Bw_Ade1s.mjs +416 -0
  9. package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-Bw_Ade1s.mjs.map +1 -0
  10. package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-DnwYnjIE.mjs +193 -0
  11. package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-DnwYnjIE.mjs.map +1 -0
  12. package/fesm2022/edvak99-voice-receptionist-widget-call-recording-player.component-Pla2UgeZ.mjs +111 -0
  13. package/fesm2022/edvak99-voice-receptionist-widget-call-recording-player.component-Pla2UgeZ.mjs.map +1 -0
  14. package/fesm2022/{edvak99-voice-receptionist-widget-call-review.service-CIMcjGKX.mjs → edvak99-voice-receptionist-widget-call-review.service-Di7GLG9k.mjs} +2 -2
  15. package/fesm2022/{edvak99-voice-receptionist-widget-call-review.service-CIMcjGKX.mjs.map → edvak99-voice-receptionist-widget-call-review.service-Di7GLG9k.mjs.map} +1 -1
  16. package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-DVz0romd.mjs +439 -0
  17. package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-DVz0romd.mjs.map +1 -0
  18. package/fesm2022/{edvak99-voice-receptionist-widget-dashboard-socket.service-BX91r74O.mjs → edvak99-voice-receptionist-widget-dashboard-socket.service-D2pelzu4.mjs} +3 -3
  19. package/fesm2022/{edvak99-voice-receptionist-widget-dashboard-socket.service-BX91r74O.mjs.map → edvak99-voice-receptionist-widget-dashboard-socket.service-D2pelzu4.mjs.map} +1 -1
  20. package/fesm2022/{edvak99-voice-receptionist-widget-eds-avatar.component-CWRiJGfv.mjs → edvak99-voice-receptionist-widget-eds-avatar.component-BJs_TH8X.mjs} +5 -5
  21. package/fesm2022/edvak99-voice-receptionist-widget-eds-avatar.component-BJs_TH8X.mjs.map +1 -0
  22. package/fesm2022/{edvak99-voice-receptionist-widget-eds-pulse-dot.component-BPY6xN7C.mjs → edvak99-voice-receptionist-widget-eds-pulse-dot.component-Ig0Eoq1z.mjs} +6 -6
  23. package/fesm2022/edvak99-voice-receptionist-widget-eds-pulse-dot.component-Ig0Eoq1z.mjs.map +1 -0
  24. package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-Bx7WQ2dg.mjs +81 -0
  25. package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-Bx7WQ2dg.mjs.map +1 -0
  26. package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-DWbA5yAG.mjs +1059 -0
  27. package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-DWbA5yAG.mjs.map +1 -0
  28. package/fesm2022/edvak99-voice-receptionist-widget-modal.component-Cb-FoQ1N.mjs +48 -0
  29. package/fesm2022/edvak99-voice-receptionist-widget-modal.component-Cb-FoQ1N.mjs.map +1 -0
  30. package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-DhoyrHSe.mjs +267 -0
  31. package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-DhoyrHSe.mjs.map +1 -0
  32. package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-CZUDgZ1_.mjs +967 -0
  33. package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-CZUDgZ1_.mjs.map +1 -0
  34. package/fesm2022/edvak99-voice-receptionist-widget-tasks-page.component-DyNG2DZZ.mjs +316 -0
  35. package/fesm2022/edvak99-voice-receptionist-widget-tasks-page.component-DyNG2DZZ.mjs.map +1 -0
  36. package/fesm2022/edvak99-voice-receptionist-widget-wizard-page.component-DjaurkbO.mjs +46 -0
  37. package/fesm2022/edvak99-voice-receptionist-widget-wizard-page.component-DjaurkbO.mjs.map +1 -0
  38. package/fesm2022/edvak99-voice-receptionist-widget.mjs +228 -1
  39. package/fesm2022/edvak99-voice-receptionist-widget.mjs.map +1 -1
  40. package/lib/components/call-conversation-panel/call-conversation-panel.component.d.ts +1 -2
  41. package/lib/components/live-transcript-panel/live-transcript-panel.component.d.ts +0 -3
  42. package/package.json +1 -1
  43. package/public-api.d.ts +3 -0
  44. package/styles/chat-ui.scss +0 -1
  45. package/styles/eds.scss +0 -10
  46. package/fesm2022/edvak99-voice-receptionist-widget-activities-page.component-DT9UKvQO.mjs +0 -307
  47. package/fesm2022/edvak99-voice-receptionist-widget-activities-page.component-DT9UKvQO.mjs.map +0 -1
  48. package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-C5inEHJw.mjs +0 -278
  49. package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-C5inEHJw.mjs.map +0 -1
  50. package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-sYhM20CE.mjs +0 -418
  51. package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-sYhM20CE.mjs.map +0 -1
  52. package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-DpwajEOE.mjs +0 -194
  53. package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-DpwajEOE.mjs.map +0 -1
  54. package/fesm2022/edvak99-voice-receptionist-widget-call-recording-player.component-CgkRcFOl.mjs +0 -111
  55. package/fesm2022/edvak99-voice-receptionist-widget-call-recording-player.component-CgkRcFOl.mjs.map +0 -1
  56. package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-CxbO0eDS.mjs +0 -440
  57. package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-CxbO0eDS.mjs.map +0 -1
  58. package/fesm2022/edvak99-voice-receptionist-widget-eds-avatar.component-CWRiJGfv.mjs.map +0 -1
  59. package/fesm2022/edvak99-voice-receptionist-widget-eds-button.component-Bg5T5BN8.mjs +0 -27
  60. package/fesm2022/edvak99-voice-receptionist-widget-eds-button.component-Bg5T5BN8.mjs.map +0 -1
  61. package/fesm2022/edvak99-voice-receptionist-widget-eds-pulse-dot.component-BPY6xN7C.mjs.map +0 -1
  62. package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-BsBQIS_f.mjs +0 -203
  63. package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-BsBQIS_f.mjs.map +0 -1
  64. package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-CaSDMxpV.mjs +0 -81
  65. package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-CaSDMxpV.mjs.map +0 -1
  66. package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-Cy3ND-c-.mjs +0 -1070
  67. package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-Cy3ND-c-.mjs.map +0 -1
  68. package/fesm2022/edvak99-voice-receptionist-widget-modal.component-COfi7biN.mjs +0 -48
  69. package/fesm2022/edvak99-voice-receptionist-widget-modal.component-COfi7biN.mjs.map +0 -1
  70. package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-fHVzpiVk.mjs +0 -268
  71. package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-fHVzpiVk.mjs.map +0 -1
  72. package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-Bok64X2q.mjs +0 -968
  73. package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-Bok64X2q.mjs.map +0 -1
  74. package/fesm2022/edvak99-voice-receptionist-widget-tasks-page.component-Bb9lPcYi.mjs +0 -317
  75. package/fesm2022/edvak99-voice-receptionist-widget-tasks-page.component-Bb9lPcYi.mjs.map +0 -1
  76. package/fesm2022/edvak99-voice-receptionist-widget-wizard-page.component-BZVlWLWh.mjs +0 -47
  77. package/fesm2022/edvak99-voice-receptionist-widget-wizard-page.component-BZVlWLWh.mjs.map +0 -1
@@ -1,194 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, signal, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { ActivatedRoute, Router } from '@angular/router';
4
- import { DatePipe } from '@angular/common';
5
- import * as i1 from '@angular/forms';
6
- import { FormsModule } from '@angular/forms';
7
- import { A as AiReceptionistApiService, D as DEFAULT_PAGE_SIZE, c as callerMetaLine, r as resultChipIcon, h as historyResultChips, b as historyResolution, a as historyResolutionLabel, k as totalPages } from './edvak99-voice-receptionist-widget-ai-receptionist-api.service-48cifVPF.mjs';
8
- import { C as CallReviewService } from './edvak99-voice-receptionist-widget-call-review.service-CIMcjGKX.mjs';
9
- import { i as isNeedsReview } from './edvak99-voice-receptionist-widget-call-review.util-Deh3jPgo.mjs';
10
- import { E as EdsAvatarComponent } from './edvak99-voice-receptionist-widget-eds-avatar.component-CWRiJGfv.mjs';
11
- import { E as EdsButtonComponent } from './edvak99-voice-receptionist-widget-eds-button.component-Bg5T5BN8.mjs';
12
- import { T as ToastService, E as EdsIconComponent } from './edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-BsBQIS_f.mjs';
13
-
14
- class CallHistoryPageComponent {
15
- constructor() {
16
- this.api = inject(AiReceptionistApiService);
17
- this.reviewService = inject(CallReviewService);
18
- this.toast = inject(ToastService);
19
- this.route = inject(ActivatedRoute);
20
- this.router = inject(Router);
21
- this.pageSize = DEFAULT_PAGE_SIZE;
22
- this.rows = signal([]);
23
- this.total = signal(0);
24
- this.page = signal(1);
25
- this.loading = signal(true);
26
- this.reviewingId = signal(null);
27
- this.search = signal('');
28
- this.direction = signal('');
29
- this.outcome = signal('');
30
- this.location = signal('');
31
- this.reviewTab = signal('all');
32
- this.reviewTabs = [
33
- { id: 'all', label: 'All' },
34
- { id: 'needs', label: 'Needs review' },
35
- { id: 'reviewed', label: 'Reviewed' },
36
- ];
37
- this.isNeedsReview = isNeedsReview;
38
- this.callerMetaLine = callerMetaLine;
39
- this.resultChipIcon = resultChipIcon;
40
- this.historyResultChips = historyResultChips;
41
- this.historyResolution = historyResolution;
42
- this.historyResolutionLabel = historyResolutionLabel;
43
- }
44
- ngOnInit() {
45
- const reviewParam = this.route.snapshot.queryParamMap.get('review');
46
- if (reviewParam === 'needs' || reviewParam === 'reviewed') {
47
- this.reviewTab.set(reviewParam);
48
- }
49
- this.load();
50
- }
51
- load() {
52
- this.loading.set(true);
53
- const tab = this.reviewTab();
54
- this.api
55
- .getHistory({
56
- q: this.search() || undefined,
57
- dir: this.direction() || undefined,
58
- outcome: this.outcome() || undefined,
59
- location: this.location() || undefined,
60
- review: tab === 'all' ? undefined : tab,
61
- page: this.page(),
62
- limit: DEFAULT_PAGE_SIZE,
63
- })
64
- .subscribe({
65
- next: ({ items, total, page }) => {
66
- this.rows.set(items);
67
- this.total.set(total);
68
- this.page.set(page);
69
- this.loading.set(false);
70
- },
71
- error: () => this.loading.set(false),
72
- });
73
- }
74
- applyFilters() {
75
- this.page.set(1);
76
- this.load();
77
- }
78
- setReviewTab(tab) {
79
- this.reviewTab.set(tab);
80
- this.page.set(1);
81
- void this.router.navigate([], {
82
- relativeTo: this.route,
83
- queryParams: tab === 'all' ? { review: null } : { review: tab },
84
- queryParamsHandling: 'merge',
85
- replaceUrl: true,
86
- });
87
- this.load();
88
- }
89
- tabBadgeCount(tab) {
90
- if (tab !== 'needs' || this.reviewTab() !== 'needs')
91
- return null;
92
- const count = this.total();
93
- return count > 0 ? count : null;
94
- }
95
- totalPages() {
96
- return totalPages(this.total(), DEFAULT_PAGE_SIZE);
97
- }
98
- prevPage() {
99
- if (this.page() <= 1)
100
- return;
101
- this.page.update((p) => p - 1);
102
- this.load();
103
- }
104
- nextPage() {
105
- if (this.page() >= this.totalPages())
106
- return;
107
- this.page.update((p) => p + 1);
108
- this.load();
109
- }
110
- markReviewed(row, event) {
111
- event.preventDefault();
112
- event.stopPropagation();
113
- if (!isNeedsReview(row.review) || this.reviewingId())
114
- return;
115
- this.reviewingId.set(row.id);
116
- this.rows.update((list) => list.map((r) => (r.id === row.id ? { ...r, review: 'reviewed' } : r)));
117
- this.reviewService.markReviewed(row.id).subscribe({
118
- next: () => {
119
- this.reviewingId.set(null);
120
- this.toast.show('Call marked as reviewed', 'success');
121
- if (this.reviewTab() === 'needs')
122
- this.load();
123
- },
124
- error: () => {
125
- this.reviewingId.set(null);
126
- this.rows.update((list) => list.map((r) => (r.id === row.id ? { ...r, review: 'needs' } : r)));
127
- this.toast.show('Failed to mark call as reviewed', 'error');
128
- },
129
- });
130
- }
131
- formatDuration(sec) {
132
- const m = Math.floor(sec / 60);
133
- const s = sec % 60;
134
- return `${m}:${s.toString().padStart(2, '0')}`;
135
- }
136
- openCallDetail(id) {
137
- void this.router.navigate(['../history', id], { relativeTo: this.route });
138
- }
139
- avatarTone(row) {
140
- if (!row.name?.trim() || /^unknown/i.test(row.name) || row.initials === '?')
141
- return 'gray';
142
- return 'brand';
143
- }
144
- resolutionOf(row) {
145
- return historyResolution({ outcome: row.outcome, risk: row.risk });
146
- }
147
- exportCsv() {
148
- const header = [
149
- 'id',
150
- 'name',
151
- 'phone',
152
- 'direction',
153
- 'goal',
154
- 'handledBy',
155
- 'outcome',
156
- 'results',
157
- 'duration',
158
- 'started',
159
- 'review',
160
- ];
161
- const csvRows = this.rows().map((r) => [
162
- r.id,
163
- r.name,
164
- r.phone,
165
- r.direction,
166
- r.reason,
167
- r.handledBy ?? '',
168
- r.outcome,
169
- (r.results ?? []).join('; '),
170
- String(r.duration),
171
- String(r.started),
172
- r.review,
173
- ]);
174
- const csv = [header, ...csvRows]
175
- .map((row) => row.map((cell) => `"${String(cell).replace(/"/g, '""')}"`).join(','))
176
- .join('\n');
177
- const blob = new Blob([csv], { type: 'text/csv;charset=utf-8' });
178
- const url = URL.createObjectURL(blob);
179
- const a = document.createElement('a');
180
- a.href = url;
181
- a.download = `call-history-page-${this.page()}.csv`;
182
- a.click();
183
- URL.revokeObjectURL(url);
184
- }
185
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CallHistoryPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
186
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: CallHistoryPageComponent, isStandalone: true, selector: "eds-call-history-page", ngImport: i0, template: "<div class=\"eds-page call-history-page\">\n <header class=\"call-history-page__header\">\n <div>\n <h1 class=\"eds-h1\">Call History</h1>\n <p class=\"eds-body-sm\">Search and review completed conversations</p>\n </div>\n <eds-button variant=\"secondary\" (click)=\"exportCsv()\">\n <eds-icon name=\"download\" [size]=\"18\" /> Export CSV\n </eds-button>\n </header>\n\n <div class=\"eds-card call-history-page__filters\">\n <input\n type=\"search\"\n class=\"call-history-page__search\"\n placeholder=\"Search name, phone, reason\u2026\"\n [ngModel]=\"search()\"\n (ngModelChange)=\"search.set($event)\"\n (keyup.enter)=\"applyFilters()\"\n autocomplete=\"off\"\n />\n <select\n class=\"call-history-page__select\"\n [ngModel]=\"direction()\"\n (ngModelChange)=\"direction.set($event)\"\n autocomplete=\"off\"\n >\n <option value=\"\">All directions</option>\n <option value=\"inbound\">Inbound</option>\n <option value=\"outbound\">Outbound</option>\n </select>\n <input\n type=\"text\"\n class=\"call-history-page__select\"\n placeholder=\"Outcome\"\n [ngModel]=\"outcome()\"\n (ngModelChange)=\"outcome.set($event)\"\n autocomplete=\"off\"\n />\n <input\n type=\"text\"\n class=\"call-history-page__select\"\n placeholder=\"Location\"\n [ngModel]=\"location()\"\n (ngModelChange)=\"location.set($event)\"\n autocomplete=\"off\"\n />\n <eds-button variant=\"primary\" (click)=\"applyFilters()\">Apply</eds-button>\n </div>\n\n @if (loading()) {\n <p class=\"eds-body-sm\">Loading history\u2026</p>\n } @else {\n <div class=\"eds-card call-history-page__table-wrap\">\n <table class=\"call-history-page__table\">\n <thead>\n <tr>\n <th>Time</th>\n <th>Patient/Caller</th>\n <th></th>\n <th>Goal Timeline</th>\n <th>Handled By</th>\n <th>Resolution</th>\n <th>Result</th>\n <th>Duration</th>\n <th>Reviewed</th>\n </tr>\n </thead>\n <tbody>\n @for (row of rows(); track row.id) {\n <tr\n class=\"call-history-page__row\"\n [class.call-history-page__row--needs-review]=\"isNeedsReview(row.review)\"\n tabindex=\"0\"\n role=\"link\"\n [attr.aria-label]=\"'View call details for ' + row.name\"\n (click)=\"openCallDetail(row.id)\"\n (keyup.enter)=\"openCallDetail(row.id)\"\n >\n <td>\n <div class=\"call-history-page__time\">\n @if (row.started) {\n <span class=\"call-history-page__time-main\">{{ row.started | date: 'shortTime' }}</span>\n <span class=\"call-history-page__time-sub\">{{ row.started | date: 'MMM d, y' }}</span>\n } @else {\n <span class=\"call-history-page__time-main\">{{ row.whenLabel || '\u2014' }}</span>\n }\n </div>\n </td>\n\n <td>\n <div class=\"call-history-page__caller\">\n <eds-avatar\n class=\"call-history-page__avatar\"\n [initials]=\"row.initials || '?'\"\n [tone]=\"avatarTone(row)\"\n />\n <div class=\"call-history-page__caller-text\">\n <span class=\"call-history-page__caller-name\">{{ row.name || 'Unknown Caller' }}</span>\n <span class=\"call-history-page__caller-meta\">\n {{\n callerMetaLine({\n dob: row.dob,\n age: row.age,\n gender: row.gender,\n phone: row.phone,\n name: row.name,\n })\n }}\n </span>\n </div>\n </div>\n </td>\n\n <td>\n <span\n class=\"call-history-page__dir\"\n [class.call-history-page__dir--in]=\"row.direction === 'inbound'\"\n [class.call-history-page__dir--out]=\"row.direction === 'outbound'\"\n [attr.title]=\"row.direction === 'inbound' ? 'Inbound' : 'Outbound'\"\n >\n <eds-icon\n [name]=\"row.direction === 'inbound' ? 'call_received' : 'call_made'\"\n [size]=\"16\"\n />\n </span>\n </td>\n\n <td>\n <span class=\"call-history-page__goal\">{{ row.reason || '\u2014' }}</span>\n </td>\n\n <td>\n <span\n class=\"call-history-page__handler\"\n [class.call-history-page__handler--ai]=\"(row.handledBy || 'ai') === 'ai'\"\n [class.call-history-page__handler--staff]=\"row.handledBy === 'staff'\"\n >\n {{ row.handledBy === 'staff' ? 'STAFF' : 'AI' }}\n </span>\n </td>\n\n <td>\n @if (resolutionOf(row); as resolution) {\n <span\n class=\"call-history-page__resolution\"\n [class.call-history-page__resolution--ok]=\"resolution === 'resolved'\"\n [class.call-history-page__resolution--attn]=\"resolution === 'needs_attention'\"\n >\n {{ historyResolutionLabel(resolution) }}\n </span>\n }\n </td>\n\n <td>\n <div class=\"call-history-page__results\">\n @for (chip of historyResultChips(row.results, row.outcome); track chip) {\n <span class=\"call-history-page__result-chip\">\n <eds-icon [name]=\"resultChipIcon(chip)\" [size]=\"14\" />\n {{ chip }}\n </span>\n } @empty {\n <span class=\"call-history-page__muted\">\u2014</span>\n }\n </div>\n </td>\n\n <td class=\"call-history-page__duration\">\n {{ row.durationLabel ?? formatDuration(row.duration) }}\n </td>\n\n <td class=\"call-history-page__reviewed\">\n @if (row.review === 'reviewed') {\n <span class=\"call-history-page__reviewed-ok\" title=\"Reviewed\">\n <eds-icon name=\"check_circle\" [size]=\"20\" />\n </span>\n } @else {\n <button\n type=\"button\"\n class=\"call-history-page__mark-btn\"\n title=\"Mark as reviewed\"\n [disabled]=\"reviewingId() === row.id\"\n (click)=\"markReviewed(row, $event)\"\n >\n <eds-icon name=\"radio_button_unchecked\" [size]=\"20\" />\n </button>\n }\n </td>\n </tr>\n } @empty {\n <tr>\n <td colspan=\"9\" class=\"call-history-page__empty\">No calls match this filter.</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n\n <footer class=\"call-history-page__pager\">\n <span class=\"eds-body-sm\">\n Page {{ page() }} of {{ totalPages() }} \u00B7 {{ total() }} total\n </span>\n <div class=\"call-history-page__pager-actions\">\n <eds-button variant=\"secondary\" [disabled]=\"page() <= 1\" (click)=\"prevPage()\">Previous</eds-button>\n <eds-button variant=\"secondary\" [disabled]=\"page() >= totalPages()\" (click)=\"nextPage()\">Next</eds-button>\n </div>\n </footer>\n</div>\n", styles: [".call-history-page__header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:20px}.call-history-page__review-tabs{display:flex;gap:4px;margin-bottom:12px;padding:4px;width:fit-content;background:var(--eds-surface-l1);border-radius:var(--eds-radius-md)}.call-history-page__review-tab{border:none;background:transparent;padding:8px 14px;border-radius:var(--eds-radius-sm);font-size:13px;font-weight:500;cursor:pointer;color:var(--eds-text-secondary);display:inline-flex;align-items:center;gap:6px}.call-history-page__review-tab--active{background:var(--eds-surface-l0);color:var(--eds-text-primary);box-shadow:0 1px 2px #0000000f}.call-history-page__tab-badge{min-width:18px;padding:0 6px;border-radius:999px;background:#f59e0b;color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center}.call-history-page__filters{display:flex;flex-wrap:wrap;gap:10px;padding:14px;margin-bottom:16px;align-items:center}.call-history-page__search{flex:1;min-width:200px;padding:8px 12px;border:1px solid var(--eds-border-default);border-radius:var(--eds-radius-md);font-size:14px}.call-history-page__select{padding:8px 12px;border:1px solid var(--eds-border-default);border-radius:var(--eds-radius-md);font-size:13px;background:var(--eds-surface-l0)}.call-history-page__table-wrap{overflow-x:auto;padding:0}.call-history-page__table{width:100%;border-collapse:collapse;min-width:980px}.call-history-page__table thead th{text-align:left;padding:12px 14px;font-family:var(--eds-font-inter, \"Inter\", sans-serif);font-size:13px;font-weight:600;letter-spacing:normal;text-transform:none;color:var(--eds-text-table-header, #4d5573);background:#f4f4f5;border-bottom:1px solid var(--eds-border-default, #e4e4e7);white-space:nowrap}.call-history-page__table tbody td{padding:14px;vertical-align:middle;border-bottom:1px solid #f1f5f9;font-family:var(--eds-font-inter, \"Inter\", sans-serif);font-size:13px;font-weight:400;color:var(--eds-text-primary, #18181b)}.call-history-page__row{cursor:pointer}.call-history-page__row:hover td{background:#fafafa}.call-history-page__row:focus-visible{outline:2px solid var(--eds-brand-500, #2563eb);outline-offset:-2px}.call-history-page__row--needs-review td:first-child{box-shadow:inset 3px 0 #f59e0b}.call-history-page__time{display:flex;flex-direction:column;gap:2px;white-space:nowrap}.call-history-page__time-main{font-weight:600;font-size:13px}.call-history-page__time-sub{font-size:12px;color:var(--eds-text-secondary, #71717a)}.call-history-page__caller{display:flex;align-items:center;gap:10px;min-width:200px}.call-history-page__avatar ::ng-deep .eds-avatar{width:36px;height:36px;border-radius:10px;font-size:12px}.call-history-page__caller-text{display:flex;flex-direction:column;gap:2px;min-width:0}.call-history-page__caller-name{font-weight:600;font-size:13px;color:#18181b}.call-history-page__caller-meta{font-size:12px;color:var(--eds-text-secondary, #71717a);white-space:nowrap}.call-history-page__dir{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px}.call-history-page__dir--in{background:#eff6ff;color:#2563eb}.call-history-page__dir--out{background:#f5f3ff;color:#7c3aed}.call-history-page__goal{font-size:13px;color:#3f3f46}.call-history-page__handler{display:inline-flex;align-items:center;padding:3px 8px;border-radius:6px;font-size:12px;font-weight:500;letter-spacing:normal}.call-history-page__handler--ai{background:#f5f3ff;color:#7c3aed}.call-history-page__handler--staff{background:#eff6ff;color:#2563eb}.call-history-page__resolution{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:500;letter-spacing:normal;white-space:nowrap}.call-history-page__resolution--ok{background:#ecfdf5;color:#047857}.call-history-page__resolution--attn{background:#fff7ed;color:#c2410c}.call-history-page__results{display:flex;flex-wrap:wrap;gap:6px;max-width:260px}.call-history-page__result-chip{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border-radius:6px;background:#f4f4f5;color:#52525b;font-size:11px;font-weight:500;white-space:nowrap}.call-history-page__duration{font-variant-numeric:tabular-nums;font-size:13px;color:#3f3f46;white-space:nowrap}.call-history-page__reviewed{text-align:center;width:56px}.call-history-page__reviewed-ok{display:inline-flex;color:#16a34a}.call-history-page__mark-btn{border:none;background:transparent;color:#a1a1aa;cursor:pointer;padding:2px;border-radius:6px;line-height:0}.call-history-page__mark-btn:hover:not(:disabled){color:#16a34a;background:#16a34a14}.call-history-page__mark-btn:disabled{opacity:.5;cursor:wait}.call-history-page__muted,.call-history-page__empty{color:var(--eds-text-secondary, #71717a);font-size:13px}.call-history-page__empty{text-align:center;padding:28px 14px!important}.call-history-page__pager{display:flex;align-items:center;justify-content:space-between;margin-top:16px;padding-top:12px;border-top:1px solid var(--eds-border-subtle, #e4e4e7)}.call-history-page__pager-actions{display:flex;gap:8px}\n"], dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: EdsAvatarComponent, selector: "eds-avatar", inputs: ["initials", "tone", "shape", "gradient"] }, { kind: "component", type: EdsButtonComponent, selector: "eds-button", inputs: ["variant", "type", "disabled"] }, { kind: "component", type: EdsIconComponent, selector: "eds-icon", inputs: ["name", "size", "fill", "weight"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
187
- }
188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CallHistoryPageComponent, decorators: [{
189
- type: Component,
190
- args: [{ selector: 'eds-call-history-page', imports: [DatePipe, FormsModule, EdsAvatarComponent, EdsButtonComponent, EdsIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"eds-page call-history-page\">\n <header class=\"call-history-page__header\">\n <div>\n <h1 class=\"eds-h1\">Call History</h1>\n <p class=\"eds-body-sm\">Search and review completed conversations</p>\n </div>\n <eds-button variant=\"secondary\" (click)=\"exportCsv()\">\n <eds-icon name=\"download\" [size]=\"18\" /> Export CSV\n </eds-button>\n </header>\n\n <div class=\"eds-card call-history-page__filters\">\n <input\n type=\"search\"\n class=\"call-history-page__search\"\n placeholder=\"Search name, phone, reason\u2026\"\n [ngModel]=\"search()\"\n (ngModelChange)=\"search.set($event)\"\n (keyup.enter)=\"applyFilters()\"\n autocomplete=\"off\"\n />\n <select\n class=\"call-history-page__select\"\n [ngModel]=\"direction()\"\n (ngModelChange)=\"direction.set($event)\"\n autocomplete=\"off\"\n >\n <option value=\"\">All directions</option>\n <option value=\"inbound\">Inbound</option>\n <option value=\"outbound\">Outbound</option>\n </select>\n <input\n type=\"text\"\n class=\"call-history-page__select\"\n placeholder=\"Outcome\"\n [ngModel]=\"outcome()\"\n (ngModelChange)=\"outcome.set($event)\"\n autocomplete=\"off\"\n />\n <input\n type=\"text\"\n class=\"call-history-page__select\"\n placeholder=\"Location\"\n [ngModel]=\"location()\"\n (ngModelChange)=\"location.set($event)\"\n autocomplete=\"off\"\n />\n <eds-button variant=\"primary\" (click)=\"applyFilters()\">Apply</eds-button>\n </div>\n\n @if (loading()) {\n <p class=\"eds-body-sm\">Loading history\u2026</p>\n } @else {\n <div class=\"eds-card call-history-page__table-wrap\">\n <table class=\"call-history-page__table\">\n <thead>\n <tr>\n <th>Time</th>\n <th>Patient/Caller</th>\n <th></th>\n <th>Goal Timeline</th>\n <th>Handled By</th>\n <th>Resolution</th>\n <th>Result</th>\n <th>Duration</th>\n <th>Reviewed</th>\n </tr>\n </thead>\n <tbody>\n @for (row of rows(); track row.id) {\n <tr\n class=\"call-history-page__row\"\n [class.call-history-page__row--needs-review]=\"isNeedsReview(row.review)\"\n tabindex=\"0\"\n role=\"link\"\n [attr.aria-label]=\"'View call details for ' + row.name\"\n (click)=\"openCallDetail(row.id)\"\n (keyup.enter)=\"openCallDetail(row.id)\"\n >\n <td>\n <div class=\"call-history-page__time\">\n @if (row.started) {\n <span class=\"call-history-page__time-main\">{{ row.started | date: 'shortTime' }}</span>\n <span class=\"call-history-page__time-sub\">{{ row.started | date: 'MMM d, y' }}</span>\n } @else {\n <span class=\"call-history-page__time-main\">{{ row.whenLabel || '\u2014' }}</span>\n }\n </div>\n </td>\n\n <td>\n <div class=\"call-history-page__caller\">\n <eds-avatar\n class=\"call-history-page__avatar\"\n [initials]=\"row.initials || '?'\"\n [tone]=\"avatarTone(row)\"\n />\n <div class=\"call-history-page__caller-text\">\n <span class=\"call-history-page__caller-name\">{{ row.name || 'Unknown Caller' }}</span>\n <span class=\"call-history-page__caller-meta\">\n {{\n callerMetaLine({\n dob: row.dob,\n age: row.age,\n gender: row.gender,\n phone: row.phone,\n name: row.name,\n })\n }}\n </span>\n </div>\n </div>\n </td>\n\n <td>\n <span\n class=\"call-history-page__dir\"\n [class.call-history-page__dir--in]=\"row.direction === 'inbound'\"\n [class.call-history-page__dir--out]=\"row.direction === 'outbound'\"\n [attr.title]=\"row.direction === 'inbound' ? 'Inbound' : 'Outbound'\"\n >\n <eds-icon\n [name]=\"row.direction === 'inbound' ? 'call_received' : 'call_made'\"\n [size]=\"16\"\n />\n </span>\n </td>\n\n <td>\n <span class=\"call-history-page__goal\">{{ row.reason || '\u2014' }}</span>\n </td>\n\n <td>\n <span\n class=\"call-history-page__handler\"\n [class.call-history-page__handler--ai]=\"(row.handledBy || 'ai') === 'ai'\"\n [class.call-history-page__handler--staff]=\"row.handledBy === 'staff'\"\n >\n {{ row.handledBy === 'staff' ? 'STAFF' : 'AI' }}\n </span>\n </td>\n\n <td>\n @if (resolutionOf(row); as resolution) {\n <span\n class=\"call-history-page__resolution\"\n [class.call-history-page__resolution--ok]=\"resolution === 'resolved'\"\n [class.call-history-page__resolution--attn]=\"resolution === 'needs_attention'\"\n >\n {{ historyResolutionLabel(resolution) }}\n </span>\n }\n </td>\n\n <td>\n <div class=\"call-history-page__results\">\n @for (chip of historyResultChips(row.results, row.outcome); track chip) {\n <span class=\"call-history-page__result-chip\">\n <eds-icon [name]=\"resultChipIcon(chip)\" [size]=\"14\" />\n {{ chip }}\n </span>\n } @empty {\n <span class=\"call-history-page__muted\">\u2014</span>\n }\n </div>\n </td>\n\n <td class=\"call-history-page__duration\">\n {{ row.durationLabel ?? formatDuration(row.duration) }}\n </td>\n\n <td class=\"call-history-page__reviewed\">\n @if (row.review === 'reviewed') {\n <span class=\"call-history-page__reviewed-ok\" title=\"Reviewed\">\n <eds-icon name=\"check_circle\" [size]=\"20\" />\n </span>\n } @else {\n <button\n type=\"button\"\n class=\"call-history-page__mark-btn\"\n title=\"Mark as reviewed\"\n [disabled]=\"reviewingId() === row.id\"\n (click)=\"markReviewed(row, $event)\"\n >\n <eds-icon name=\"radio_button_unchecked\" [size]=\"20\" />\n </button>\n }\n </td>\n </tr>\n } @empty {\n <tr>\n <td colspan=\"9\" class=\"call-history-page__empty\">No calls match this filter.</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n\n <footer class=\"call-history-page__pager\">\n <span class=\"eds-body-sm\">\n Page {{ page() }} of {{ totalPages() }} \u00B7 {{ total() }} total\n </span>\n <div class=\"call-history-page__pager-actions\">\n <eds-button variant=\"secondary\" [disabled]=\"page() <= 1\" (click)=\"prevPage()\">Previous</eds-button>\n <eds-button variant=\"secondary\" [disabled]=\"page() >= totalPages()\" (click)=\"nextPage()\">Next</eds-button>\n </div>\n </footer>\n</div>\n", styles: [".call-history-page__header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:20px}.call-history-page__review-tabs{display:flex;gap:4px;margin-bottom:12px;padding:4px;width:fit-content;background:var(--eds-surface-l1);border-radius:var(--eds-radius-md)}.call-history-page__review-tab{border:none;background:transparent;padding:8px 14px;border-radius:var(--eds-radius-sm);font-size:13px;font-weight:500;cursor:pointer;color:var(--eds-text-secondary);display:inline-flex;align-items:center;gap:6px}.call-history-page__review-tab--active{background:var(--eds-surface-l0);color:var(--eds-text-primary);box-shadow:0 1px 2px #0000000f}.call-history-page__tab-badge{min-width:18px;padding:0 6px;border-radius:999px;background:#f59e0b;color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center}.call-history-page__filters{display:flex;flex-wrap:wrap;gap:10px;padding:14px;margin-bottom:16px;align-items:center}.call-history-page__search{flex:1;min-width:200px;padding:8px 12px;border:1px solid var(--eds-border-default);border-radius:var(--eds-radius-md);font-size:14px}.call-history-page__select{padding:8px 12px;border:1px solid var(--eds-border-default);border-radius:var(--eds-radius-md);font-size:13px;background:var(--eds-surface-l0)}.call-history-page__table-wrap{overflow-x:auto;padding:0}.call-history-page__table{width:100%;border-collapse:collapse;min-width:980px}.call-history-page__table thead th{text-align:left;padding:12px 14px;font-family:var(--eds-font-inter, \"Inter\", sans-serif);font-size:13px;font-weight:600;letter-spacing:normal;text-transform:none;color:var(--eds-text-table-header, #4d5573);background:#f4f4f5;border-bottom:1px solid var(--eds-border-default, #e4e4e7);white-space:nowrap}.call-history-page__table tbody td{padding:14px;vertical-align:middle;border-bottom:1px solid #f1f5f9;font-family:var(--eds-font-inter, \"Inter\", sans-serif);font-size:13px;font-weight:400;color:var(--eds-text-primary, #18181b)}.call-history-page__row{cursor:pointer}.call-history-page__row:hover td{background:#fafafa}.call-history-page__row:focus-visible{outline:2px solid var(--eds-brand-500, #2563eb);outline-offset:-2px}.call-history-page__row--needs-review td:first-child{box-shadow:inset 3px 0 #f59e0b}.call-history-page__time{display:flex;flex-direction:column;gap:2px;white-space:nowrap}.call-history-page__time-main{font-weight:600;font-size:13px}.call-history-page__time-sub{font-size:12px;color:var(--eds-text-secondary, #71717a)}.call-history-page__caller{display:flex;align-items:center;gap:10px;min-width:200px}.call-history-page__avatar ::ng-deep .eds-avatar{width:36px;height:36px;border-radius:10px;font-size:12px}.call-history-page__caller-text{display:flex;flex-direction:column;gap:2px;min-width:0}.call-history-page__caller-name{font-weight:600;font-size:13px;color:#18181b}.call-history-page__caller-meta{font-size:12px;color:var(--eds-text-secondary, #71717a);white-space:nowrap}.call-history-page__dir{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px}.call-history-page__dir--in{background:#eff6ff;color:#2563eb}.call-history-page__dir--out{background:#f5f3ff;color:#7c3aed}.call-history-page__goal{font-size:13px;color:#3f3f46}.call-history-page__handler{display:inline-flex;align-items:center;padding:3px 8px;border-radius:6px;font-size:12px;font-weight:500;letter-spacing:normal}.call-history-page__handler--ai{background:#f5f3ff;color:#7c3aed}.call-history-page__handler--staff{background:#eff6ff;color:#2563eb}.call-history-page__resolution{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:500;letter-spacing:normal;white-space:nowrap}.call-history-page__resolution--ok{background:#ecfdf5;color:#047857}.call-history-page__resolution--attn{background:#fff7ed;color:#c2410c}.call-history-page__results{display:flex;flex-wrap:wrap;gap:6px;max-width:260px}.call-history-page__result-chip{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border-radius:6px;background:#f4f4f5;color:#52525b;font-size:11px;font-weight:500;white-space:nowrap}.call-history-page__duration{font-variant-numeric:tabular-nums;font-size:13px;color:#3f3f46;white-space:nowrap}.call-history-page__reviewed{text-align:center;width:56px}.call-history-page__reviewed-ok{display:inline-flex;color:#16a34a}.call-history-page__mark-btn{border:none;background:transparent;color:#a1a1aa;cursor:pointer;padding:2px;border-radius:6px;line-height:0}.call-history-page__mark-btn:hover:not(:disabled){color:#16a34a;background:#16a34a14}.call-history-page__mark-btn:disabled{opacity:.5;cursor:wait}.call-history-page__muted,.call-history-page__empty{color:var(--eds-text-secondary, #71717a);font-size:13px}.call-history-page__empty{text-align:center;padding:28px 14px!important}.call-history-page__pager{display:flex;align-items:center;justify-content:space-between;margin-top:16px;padding-top:12px;border-top:1px solid var(--eds-border-subtle, #e4e4e7)}.call-history-page__pager-actions{display:flex;gap:8px}\n"] }]
191
- }] });
192
-
193
- export { CallHistoryPageComponent };
194
- //# sourceMappingURL=edvak99-voice-receptionist-widget-call-history-page.component-DpwajEOE.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"edvak99-voice-receptionist-widget-call-history-page.component-DpwajEOE.mjs","sources":["../../../projects/voice-receptionist-widget/src/lib/pages/call-history-page/call-history-page.component.ts","../../../projects/voice-receptionist-widget/src/lib/pages/call-history-page/call-history-page.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject, OnInit, signal } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { DatePipe } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { HistoryCall } from '../../models/ai-receptionist.types';\nimport { DEFAULT_PAGE_SIZE, totalPages as calcTotalPages } from '../../models/pagination';\nimport { AiReceptionistApiService } from '../../services/ai-receptionist-api.service';\nimport { CallReviewService } from '../../services/call-review.service';\nimport {\n callerMetaLine,\n historyResolution,\n historyResolutionLabel,\n historyResultChips,\n resultChipIcon,\n} from '../../utils/call-history-display.util';\nimport { isNeedsReview, ReviewFilterTab } from '../../utils/call-review.util';\nimport { EdsAvatarComponent } from '../../ui/eds-avatar.component';\nimport { EdsButtonComponent } from '../../ui/eds-button.component';\nimport { EdsIconComponent } from '../../ui/eds-icon.component';\nimport { ToastService } from '../../shared/toast.service';\n\n@Component({\n selector: 'eds-call-history-page',\n imports: [DatePipe, FormsModule, EdsAvatarComponent, EdsButtonComponent, EdsIconComponent],\n templateUrl: './call-history-page.component.html',\n styleUrl: './call-history-page.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CallHistoryPageComponent implements OnInit {\n private readonly api = inject(AiReceptionistApiService);\n private readonly reviewService = inject(CallReviewService);\n private readonly toast = inject(ToastService);\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n\n protected readonly pageSize = DEFAULT_PAGE_SIZE;\n protected readonly rows = signal<HistoryCall[]>([]);\n protected readonly total = signal(0);\n protected readonly page = signal(1);\n protected readonly loading = signal(true);\n protected readonly reviewingId = signal<string | null>(null);\n protected readonly search = signal('');\n protected readonly direction = signal('');\n protected readonly outcome = signal('');\n protected readonly location = signal('');\n protected readonly reviewTab = signal<ReviewFilterTab>('all');\n\n protected readonly reviewTabs: { id: ReviewFilterTab; label: string }[] = [\n { id: 'all', label: 'All' },\n { id: 'needs', label: 'Needs review' },\n { id: 'reviewed', label: 'Reviewed' },\n ];\n\n protected isNeedsReview = isNeedsReview;\n protected callerMetaLine = callerMetaLine;\n protected resultChipIcon = resultChipIcon;\n protected historyResultChips = historyResultChips;\n protected historyResolution = historyResolution;\n protected historyResolutionLabel = historyResolutionLabel;\n\n ngOnInit(): void {\n const reviewParam = this.route.snapshot.queryParamMap.get('review');\n if (reviewParam === 'needs' || reviewParam === 'reviewed') {\n this.reviewTab.set(reviewParam);\n }\n this.load();\n }\n\n protected load(): void {\n this.loading.set(true);\n const tab = this.reviewTab();\n this.api\n .getHistory({\n q: this.search() || undefined,\n dir: this.direction() || undefined,\n outcome: this.outcome() || undefined,\n location: this.location() || undefined,\n review: tab === 'all' ? undefined : tab,\n page: this.page(),\n limit: DEFAULT_PAGE_SIZE,\n })\n .subscribe({\n next: ({ items, total, page }) => {\n this.rows.set(items);\n this.total.set(total);\n this.page.set(page);\n this.loading.set(false);\n },\n error: () => this.loading.set(false),\n });\n }\n\n protected applyFilters(): void {\n this.page.set(1);\n this.load();\n }\n\n protected setReviewTab(tab: ReviewFilterTab): void {\n this.reviewTab.set(tab);\n this.page.set(1);\n void this.router.navigate([], {\n relativeTo: this.route,\n queryParams: tab === 'all' ? { review: null } : { review: tab },\n queryParamsHandling: 'merge',\n replaceUrl: true,\n });\n this.load();\n }\n\n protected tabBadgeCount(tab: ReviewFilterTab): number | null {\n if (tab !== 'needs' || this.reviewTab() !== 'needs') return null;\n const count = this.total();\n return count > 0 ? count : null;\n }\n\n protected totalPages(): number {\n return calcTotalPages(this.total(), DEFAULT_PAGE_SIZE);\n }\n\n protected prevPage(): void {\n if (this.page() <= 1) return;\n this.page.update((p) => p - 1);\n this.load();\n }\n\n protected nextPage(): void {\n if (this.page() >= this.totalPages()) return;\n this.page.update((p) => p + 1);\n this.load();\n }\n\n protected markReviewed(row: HistoryCall, event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n if (!isNeedsReview(row.review) || this.reviewingId()) return;\n\n this.reviewingId.set(row.id);\n this.rows.update((list) =>\n list.map((r) => (r.id === row.id ? { ...r, review: 'reviewed' as const } : r)),\n );\n\n this.reviewService.markReviewed(row.id).subscribe({\n next: () => {\n this.reviewingId.set(null);\n this.toast.show('Call marked as reviewed', 'success');\n if (this.reviewTab() === 'needs') this.load();\n },\n error: () => {\n this.reviewingId.set(null);\n this.rows.update((list) =>\n list.map((r) => (r.id === row.id ? { ...r, review: 'needs' as const } : r)),\n );\n this.toast.show('Failed to mark call as reviewed', 'error');\n },\n });\n }\n\n protected formatDuration(sec: number): string {\n const m = Math.floor(sec / 60);\n const s = sec % 60;\n return `${m}:${s.toString().padStart(2, '0')}`;\n }\n\n protected openCallDetail(id: string): void {\n void this.router.navigate(['../history', id], { relativeTo: this.route });\n }\n\n protected avatarTone(row: HistoryCall): 'gray' | 'brand' {\n if (!row.name?.trim() || /^unknown/i.test(row.name) || row.initials === '?') return 'gray';\n return 'brand';\n }\n\n protected resolutionOf(row: HistoryCall) {\n return historyResolution({ outcome: row.outcome, risk: row.risk });\n }\n\n protected exportCsv(): void {\n const header = [\n 'id',\n 'name',\n 'phone',\n 'direction',\n 'goal',\n 'handledBy',\n 'outcome',\n 'results',\n 'duration',\n 'started',\n 'review',\n ];\n const csvRows = this.rows().map((r) => [\n r.id,\n r.name,\n r.phone,\n r.direction,\n r.reason,\n r.handledBy ?? '',\n r.outcome,\n (r.results ?? []).join('; '),\n String(r.duration),\n String(r.started),\n r.review,\n ]);\n const csv = [header, ...csvRows]\n .map((row) => row.map((cell) => `\"${String(cell).replace(/\"/g, '\"\"')}\"`).join(','))\n .join('\\n');\n const blob = new Blob([csv], { type: 'text/csv;charset=utf-8' });\n const url = URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.href = url;\n a.download = `call-history-page-${this.page()}.csv`;\n a.click();\n URL.revokeObjectURL(url);\n }\n}\n","<div class=\"eds-page call-history-page\">\n <header class=\"call-history-page__header\">\n <div>\n <h1 class=\"eds-h1\">Call History</h1>\n <p class=\"eds-body-sm\">Search and review completed conversations</p>\n </div>\n <eds-button variant=\"secondary\" (click)=\"exportCsv()\">\n <eds-icon name=\"download\" [size]=\"18\" /> Export CSV\n </eds-button>\n </header>\n\n <div class=\"eds-card call-history-page__filters\">\n <input\n type=\"search\"\n class=\"call-history-page__search\"\n placeholder=\"Search name, phone, reason…\"\n [ngModel]=\"search()\"\n (ngModelChange)=\"search.set($event)\"\n (keyup.enter)=\"applyFilters()\"\n autocomplete=\"off\"\n />\n <select\n class=\"call-history-page__select\"\n [ngModel]=\"direction()\"\n (ngModelChange)=\"direction.set($event)\"\n autocomplete=\"off\"\n >\n <option value=\"\">All directions</option>\n <option value=\"inbound\">Inbound</option>\n <option value=\"outbound\">Outbound</option>\n </select>\n <input\n type=\"text\"\n class=\"call-history-page__select\"\n placeholder=\"Outcome\"\n [ngModel]=\"outcome()\"\n (ngModelChange)=\"outcome.set($event)\"\n autocomplete=\"off\"\n />\n <input\n type=\"text\"\n class=\"call-history-page__select\"\n placeholder=\"Location\"\n [ngModel]=\"location()\"\n (ngModelChange)=\"location.set($event)\"\n autocomplete=\"off\"\n />\n <eds-button variant=\"primary\" (click)=\"applyFilters()\">Apply</eds-button>\n </div>\n\n @if (loading()) {\n <p class=\"eds-body-sm\">Loading history…</p>\n } @else {\n <div class=\"eds-card call-history-page__table-wrap\">\n <table class=\"call-history-page__table\">\n <thead>\n <tr>\n <th>Time</th>\n <th>Patient/Caller</th>\n <th></th>\n <th>Goal Timeline</th>\n <th>Handled By</th>\n <th>Resolution</th>\n <th>Result</th>\n <th>Duration</th>\n <th>Reviewed</th>\n </tr>\n </thead>\n <tbody>\n @for (row of rows(); track row.id) {\n <tr\n class=\"call-history-page__row\"\n [class.call-history-page__row--needs-review]=\"isNeedsReview(row.review)\"\n tabindex=\"0\"\n role=\"link\"\n [attr.aria-label]=\"'View call details for ' + row.name\"\n (click)=\"openCallDetail(row.id)\"\n (keyup.enter)=\"openCallDetail(row.id)\"\n >\n <td>\n <div class=\"call-history-page__time\">\n @if (row.started) {\n <span class=\"call-history-page__time-main\">{{ row.started | date: 'shortTime' }}</span>\n <span class=\"call-history-page__time-sub\">{{ row.started | date: 'MMM d, y' }}</span>\n } @else {\n <span class=\"call-history-page__time-main\">{{ row.whenLabel || '—' }}</span>\n }\n </div>\n </td>\n\n <td>\n <div class=\"call-history-page__caller\">\n <eds-avatar\n class=\"call-history-page__avatar\"\n [initials]=\"row.initials || '?'\"\n [tone]=\"avatarTone(row)\"\n />\n <div class=\"call-history-page__caller-text\">\n <span class=\"call-history-page__caller-name\">{{ row.name || 'Unknown Caller' }}</span>\n <span class=\"call-history-page__caller-meta\">\n {{\n callerMetaLine({\n dob: row.dob,\n age: row.age,\n gender: row.gender,\n phone: row.phone,\n name: row.name,\n })\n }}\n </span>\n </div>\n </div>\n </td>\n\n <td>\n <span\n class=\"call-history-page__dir\"\n [class.call-history-page__dir--in]=\"row.direction === 'inbound'\"\n [class.call-history-page__dir--out]=\"row.direction === 'outbound'\"\n [attr.title]=\"row.direction === 'inbound' ? 'Inbound' : 'Outbound'\"\n >\n <eds-icon\n [name]=\"row.direction === 'inbound' ? 'call_received' : 'call_made'\"\n [size]=\"16\"\n />\n </span>\n </td>\n\n <td>\n <span class=\"call-history-page__goal\">{{ row.reason || '—' }}</span>\n </td>\n\n <td>\n <span\n class=\"call-history-page__handler\"\n [class.call-history-page__handler--ai]=\"(row.handledBy || 'ai') === 'ai'\"\n [class.call-history-page__handler--staff]=\"row.handledBy === 'staff'\"\n >\n {{ row.handledBy === 'staff' ? 'STAFF' : 'AI' }}\n </span>\n </td>\n\n <td>\n @if (resolutionOf(row); as resolution) {\n <span\n class=\"call-history-page__resolution\"\n [class.call-history-page__resolution--ok]=\"resolution === 'resolved'\"\n [class.call-history-page__resolution--attn]=\"resolution === 'needs_attention'\"\n >\n {{ historyResolutionLabel(resolution) }}\n </span>\n }\n </td>\n\n <td>\n <div class=\"call-history-page__results\">\n @for (chip of historyResultChips(row.results, row.outcome); track chip) {\n <span class=\"call-history-page__result-chip\">\n <eds-icon [name]=\"resultChipIcon(chip)\" [size]=\"14\" />\n {{ chip }}\n </span>\n } @empty {\n <span class=\"call-history-page__muted\">—</span>\n }\n </div>\n </td>\n\n <td class=\"call-history-page__duration\">\n {{ row.durationLabel ?? formatDuration(row.duration) }}\n </td>\n\n <td class=\"call-history-page__reviewed\">\n @if (row.review === 'reviewed') {\n <span class=\"call-history-page__reviewed-ok\" title=\"Reviewed\">\n <eds-icon name=\"check_circle\" [size]=\"20\" />\n </span>\n } @else {\n <button\n type=\"button\"\n class=\"call-history-page__mark-btn\"\n title=\"Mark as reviewed\"\n [disabled]=\"reviewingId() === row.id\"\n (click)=\"markReviewed(row, $event)\"\n >\n <eds-icon name=\"radio_button_unchecked\" [size]=\"20\" />\n </button>\n }\n </td>\n </tr>\n } @empty {\n <tr>\n <td colspan=\"9\" class=\"call-history-page__empty\">No calls match this filter.</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n\n <footer class=\"call-history-page__pager\">\n <span class=\"eds-body-sm\">\n Page {{ page() }} of {{ totalPages() }} · {{ total() }} total\n </span>\n <div class=\"call-history-page__pager-actions\">\n <eds-button variant=\"secondary\" [disabled]=\"page() <= 1\" (click)=\"prevPage()\">Previous</eds-button>\n <eds-button variant=\"secondary\" [disabled]=\"page() >= totalPages()\" (click)=\"nextPage()\">Next</eds-button>\n </div>\n </footer>\n</div>\n"],"names":["calcTotalPages"],"mappings":";;;;;;;;;;;;;MA6Ba,wBAAwB,CAAA;AAPrC,IAAA,WAAA,GAAA;AAQmB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACtC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACzC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC;AAC5B,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAErB,IAAA,CAAA,QAAQ,GAAG,iBAAiB;AAC5B,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAgB,EAAE,CAAC;AAChC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC;AACjB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC;AAChB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC;AACtB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAgB,IAAI,CAAC;AACzC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AACnB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,EAAE,CAAC;AACtB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC;AACpB,QAAA,IAAA,CAAA,QAA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A,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAK9E,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAPpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,EAAA,OAAA,EACxB,CAAC,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,EAAA,eAAA,EAGzE,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,g4PAAA,EAAA,MAAA,EAAA,CAAA,m9JAAA,CAAA,EAAA;;;;;"}
@@ -1,111 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, output, viewChild, inject, DestroyRef, signal, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
- import { distinctUntilChanged, tap, switchMap, EMPTY, map, catchError } from 'rxjs';
5
- import { A as AiReceptionistApiService } from './edvak99-voice-receptionist-widget-ai-receptionist-api.service-48cifVPF.mjs';
6
- import { E as EdsIconComponent } from './edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-BsBQIS_f.mjs';
7
-
8
- class CallRecordingPlayerComponent {
9
- constructor() {
10
- this.callId = input.required();
11
- this.currentTimeChange = output();
12
- this.durationChange = output();
13
- this.audioRef = viewChild('audioEl');
14
- this.api = inject(AiReceptionistApiService);
15
- this.destroyRef = inject(DestroyRef);
16
- this.phase = signal('loading');
17
- this.blobUrl = signal(null);
18
- this.durationSeconds = signal(null);
19
- this.message = signal(null);
20
- /** Tracked outside signals so cleanup never reads blobUrl (avoids effect/subscription loops). */
21
- this.objectUrl = null;
22
- toObservable(this.callId)
23
- .pipe(distinctUntilChanged(), tap(() => this.revokeObjectUrl()), switchMap((id) => {
24
- if (!id) {
25
- this.resetUi();
26
- return EMPTY;
27
- }
28
- this.phase.set('loading');
29
- this.message.set(null);
30
- return this.api.getCallRecording(id).pipe(switchMap((meta) => {
31
- if (meta.status !== 'ready' || !meta.url) {
32
- this.phase.set(meta.status);
33
- this.message.set(meta.message ?? null);
34
- this.durationSeconds.set(meta.durationSeconds ?? null);
35
- return EMPTY;
36
- }
37
- this.durationSeconds.set(meta.durationSeconds ?? null);
38
- return this.api.getCallRecordingBlob(meta.url).pipe(map((blob) => blob), catchError(() => {
39
- this.phase.set('error');
40
- this.message.set('Could not load recording audio.');
41
- return EMPTY;
42
- }));
43
- }), catchError(() => {
44
- this.phase.set('unavailable');
45
- this.message.set('Could not load recording metadata.');
46
- return EMPTY;
47
- }));
48
- }), takeUntilDestroyed())
49
- .subscribe((blob) => {
50
- this.revokeObjectUrl();
51
- this.objectUrl = URL.createObjectURL(blob);
52
- this.blobUrl.set(this.objectUrl);
53
- this.phase.set('ready');
54
- this.message.set(null);
55
- const dur = this.durationSeconds();
56
- if (dur != null && dur > 0) {
57
- this.durationChange.emit(dur);
58
- }
59
- });
60
- this.destroyRef.onDestroy(() => this.revokeObjectUrl());
61
- }
62
- formatDuration(seconds) {
63
- const m = Math.floor(seconds / 60);
64
- const s = seconds % 60;
65
- return `${m}:${s.toString().padStart(2, '0')}`;
66
- }
67
- onAudioError() {
68
- this.phase.set('error');
69
- this.message.set('Playback error — try reloading the page.');
70
- }
71
- onTimeUpdate(event) {
72
- const el = event.target;
73
- this.currentTimeChange.emit(el.currentTime);
74
- }
75
- onLoadedMetadata(event) {
76
- const el = event.target;
77
- if (Number.isFinite(el.duration) && el.duration > 0) {
78
- this.durationChange.emit(el.duration);
79
- }
80
- }
81
- /** Seek playback — used by synced transcript lines. */
82
- seekTo(seconds) {
83
- const el = this.audioRef()?.nativeElement;
84
- if (!el)
85
- return;
86
- el.currentTime = Math.max(0, seconds);
87
- void el.play().catch(() => undefined);
88
- this.currentTimeChange.emit(el.currentTime);
89
- }
90
- revokeObjectUrl() {
91
- if (this.objectUrl) {
92
- URL.revokeObjectURL(this.objectUrl);
93
- this.objectUrl = null;
94
- }
95
- this.blobUrl.set(null);
96
- }
97
- resetUi() {
98
- this.phase.set('loading');
99
- this.durationSeconds.set(null);
100
- this.message.set(null);
101
- }
102
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CallRecordingPlayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
103
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: CallRecordingPlayerComponent, isStandalone: true, selector: "eds-call-recording-player", inputs: { callId: { classPropertyName: "callId", publicName: "callId", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { currentTimeChange: "currentTimeChange", durationChange: "durationChange" }, viewQueries: [{ propertyName: "audioRef", first: true, predicate: ["audioEl"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"call-recording-player\" aria-labelledby=\"call-recording-title\">\n <header class=\"call-recording-player__header\">\n <eds-icon name=\"graphic_eq\" [size]=\"20\" />\n <h3 id=\"call-recording-title\" class=\"eds-h3\">Call recording</h3>\n @if (durationSeconds(); as dur) {\n <span class=\"eds-mono-sm call-recording-player__duration\">{{ formatDuration(dur) }}</span>\n }\n </header>\n\n @switch (phase()) {\n @case ('loading') {\n <p class=\"call-recording-player__status eds-body-sm\">Loading recording\u2026</p>\n }\n @case ('ready') {\n @if (blobUrl(); as src) {\n <audio\n #audioEl\n class=\"call-recording-player__audio\"\n controls\n [src]=\"src\"\n (error)=\"onAudioError()\"\n (timeupdate)=\"onTimeUpdate($event)\"\n (loadedmetadata)=\"onLoadedMetadata($event)\"\n >\n Your browser does not support audio playback.\n </audio>\n }\n }\n @case ('pending') {\n <p class=\"call-recording-player__status eds-body-sm\">\n {{ message() ?? 'Recording is still processing\u2026' }}\n </p>\n }\n @case ('unavailable') {\n <p class=\"call-recording-player__status eds-body-sm call-recording-player__status--muted\">\n {{ message() ?? 'No recording available for this call.' }}\n </p>\n }\n @case ('failed') {\n <p class=\"call-recording-player__status eds-body-sm call-recording-player__status--error\">\n {{ message() ?? 'Recording could not be retrieved.' }}\n </p>\n }\n @case ('error') {\n <p class=\"call-recording-player__status eds-body-sm call-recording-player__status--error\">\n {{ message() ?? 'Playback error.' }}\n </p>\n }\n }\n</section>\n", styles: [".call-recording-player{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:var(--eds-radius-md);background:var(--eds-surface-l1);border:1px solid var(--eds-border-default)}.call-recording-player__header{display:flex;align-items:center;gap:8px}.call-recording-player__header .eds-h3{margin:0;flex:1}.call-recording-player__duration{color:var(--eds-text-secondary)}.call-recording-player__status{margin:0;color:var(--eds-text-secondary)}.call-recording-player__status--muted{color:var(--eds-text-secondary)}.call-recording-player__status--error{color:var(--eds-red-500, #dc2626)}.call-recording-player__audio{width:100%;height:40px}\n"], dependencies: [{ kind: "component", type: EdsIconComponent, selector: "eds-icon", inputs: ["name", "size", "fill", "weight"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
104
- }
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: CallRecordingPlayerComponent, decorators: [{
106
- type: Component,
107
- args: [{ selector: 'eds-call-recording-player', imports: [EdsIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"call-recording-player\" aria-labelledby=\"call-recording-title\">\n <header class=\"call-recording-player__header\">\n <eds-icon name=\"graphic_eq\" [size]=\"20\" />\n <h3 id=\"call-recording-title\" class=\"eds-h3\">Call recording</h3>\n @if (durationSeconds(); as dur) {\n <span class=\"eds-mono-sm call-recording-player__duration\">{{ formatDuration(dur) }}</span>\n }\n </header>\n\n @switch (phase()) {\n @case ('loading') {\n <p class=\"call-recording-player__status eds-body-sm\">Loading recording\u2026</p>\n }\n @case ('ready') {\n @if (blobUrl(); as src) {\n <audio\n #audioEl\n class=\"call-recording-player__audio\"\n controls\n [src]=\"src\"\n (error)=\"onAudioError()\"\n (timeupdate)=\"onTimeUpdate($event)\"\n (loadedmetadata)=\"onLoadedMetadata($event)\"\n >\n Your browser does not support audio playback.\n </audio>\n }\n }\n @case ('pending') {\n <p class=\"call-recording-player__status eds-body-sm\">\n {{ message() ?? 'Recording is still processing\u2026' }}\n </p>\n }\n @case ('unavailable') {\n <p class=\"call-recording-player__status eds-body-sm call-recording-player__status--muted\">\n {{ message() ?? 'No recording available for this call.' }}\n </p>\n }\n @case ('failed') {\n <p class=\"call-recording-player__status eds-body-sm call-recording-player__status--error\">\n {{ message() ?? 'Recording could not be retrieved.' }}\n </p>\n }\n @case ('error') {\n <p class=\"call-recording-player__status eds-body-sm call-recording-player__status--error\">\n {{ message() ?? 'Playback error.' }}\n </p>\n }\n }\n</section>\n", styles: [".call-recording-player{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:var(--eds-radius-md);background:var(--eds-surface-l1);border:1px solid var(--eds-border-default)}.call-recording-player__header{display:flex;align-items:center;gap:8px}.call-recording-player__header .eds-h3{margin:0;flex:1}.call-recording-player__duration{color:var(--eds-text-secondary)}.call-recording-player__status{margin:0;color:var(--eds-text-secondary)}.call-recording-player__status--muted{color:var(--eds-text-secondary)}.call-recording-player__status--error{color:var(--eds-red-500, #dc2626)}.call-recording-player__audio{width:100%;height:40px}\n"] }]
108
- }], ctorParameters: () => [] });
109
-
110
- export { CallRecordingPlayerComponent as C };
111
- //# sourceMappingURL=edvak99-voice-receptionist-widget-call-recording-player.component-CgkRcFOl.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"edvak99-voice-receptionist-widget-call-recording-player.component-CgkRcFOl.mjs","sources":["../../../projects/voice-receptionist-widget/src/lib/components/call-recording-player/call-recording-player.component.ts","../../../projects/voice-receptionist-widget/src/lib/components/call-recording-player/call-recording-player.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { catchError, distinctUntilChanged, EMPTY, map, switchMap, tap } from 'rxjs';\n\nimport { CallRecordingStatus } from '../../models/ai-receptionist.types';\nimport { AiReceptionistApiService } from '../../services/ai-receptionist-api.service';\nimport { EdsIconComponent } from '../../ui/eds-icon.component';\n\ntype PlayerPhase = 'loading' | CallRecordingStatus | 'error';\n\n@Component({\n selector: 'eds-call-recording-player',\n imports: [EdsIconComponent],\n templateUrl: './call-recording-player.component.html',\n styleUrl: './call-recording-player.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CallRecordingPlayerComponent {\n readonly callId = input.required<string>();\n readonly currentTimeChange = output<number>();\n readonly durationChange = output<number>();\n\n private readonly audioRef = viewChild<ElementRef<HTMLAudioElement>>('audioEl');\n\n private readonly api = inject(AiReceptionistApiService);\n private readonly destroyRef = inject(DestroyRef);\n\n protected readonly phase = signal<PlayerPhase>('loading');\n protected readonly blobUrl = signal<string | null>(null);\n protected readonly durationSeconds = signal<number | null>(null);\n protected readonly message = signal<string | null>(null);\n\n /** Tracked outside signals so cleanup never reads blobUrl (avoids effect/subscription loops). */\n private objectUrl: string | null = null;\n\n constructor() {\n toObservable(this.callId)\n .pipe(\n distinctUntilChanged(),\n tap(() => this.revokeObjectUrl()),\n switchMap((id) => {\n if (!id) {\n this.resetUi();\n return EMPTY;\n }\n this.phase.set('loading');\n this.message.set(null);\n return this.api.getCallRecording(id).pipe(\n switchMap((meta) => {\n if (meta.status !== 'ready' || !meta.url) {\n this.phase.set(meta.status);\n this.message.set(meta.message ?? null);\n this.durationSeconds.set(meta.durationSeconds ?? null);\n return EMPTY;\n }\n this.durationSeconds.set(meta.durationSeconds ?? null);\n return this.api.getCallRecordingBlob(meta.url).pipe(\n map((blob) => blob),\n catchError(() => {\n this.phase.set('error');\n this.message.set('Could not load recording audio.');\n return EMPTY;\n }),\n );\n }),\n catchError(() => {\n this.phase.set('unavailable');\n this.message.set('Could not load recording metadata.');\n return EMPTY;\n }),\n );\n }),\n takeUntilDestroyed(),\n )\n .subscribe((blob) => {\n this.revokeObjectUrl();\n this.objectUrl = URL.createObjectURL(blob);\n this.blobUrl.set(this.objectUrl);\n this.phase.set('ready');\n this.message.set(null);\n const dur = this.durationSeconds();\n if (dur != null && dur > 0) {\n this.durationChange.emit(dur);\n }\n });\n\n this.destroyRef.onDestroy(() => this.revokeObjectUrl());\n }\n\n protected formatDuration(seconds: number): string {\n const m = Math.floor(seconds / 60);\n const s = seconds % 60;\n return `${m}:${s.toString().padStart(2, '0')}`;\n }\n\n protected onAudioError(): void {\n this.phase.set('error');\n this.message.set('Playback error — try reloading the page.');\n }\n\n protected onTimeUpdate(event: Event): void {\n const el = event.target as HTMLAudioElement;\n this.currentTimeChange.emit(el.currentTime);\n }\n\n protected onLoadedMetadata(event: Event): void {\n const el = event.target as HTMLAudioElement;\n if (Number.isFinite(el.duration) && el.duration > 0) {\n this.durationChange.emit(el.duration);\n }\n }\n\n /** Seek playback — used by synced transcript lines. */\n seekTo(seconds: number): void {\n const el = this.audioRef()?.nativeElement;\n if (!el) return;\n el.currentTime = Math.max(0, seconds);\n void el.play().catch(() => undefined);\n this.currentTimeChange.emit(el.currentTime);\n }\n\n private revokeObjectUrl(): void {\n if (this.objectUrl) {\n URL.revokeObjectURL(this.objectUrl);\n this.objectUrl = null;\n }\n this.blobUrl.set(null);\n }\n\n private resetUi(): void {\n this.phase.set('loading');\n this.durationSeconds.set(null);\n this.message.set(null);\n }\n}\n","<section class=\"call-recording-player\" aria-labelledby=\"call-recording-title\">\n <header class=\"call-recording-player__header\">\n <eds-icon name=\"graphic_eq\" [size]=\"20\" />\n <h3 id=\"call-recording-title\" class=\"eds-h3\">Call recording</h3>\n @if (durationSeconds(); as dur) {\n <span class=\"eds-mono-sm call-recording-player__duration\">{{ formatDuration(dur) }}</span>\n }\n </header>\n\n @switch (phase()) {\n @case ('loading') {\n <p class=\"call-recording-player__status eds-body-sm\">Loading recording…</p>\n }\n @case ('ready') {\n @if (blobUrl(); as src) {\n <audio\n #audioEl\n class=\"call-recording-player__audio\"\n controls\n [src]=\"src\"\n (error)=\"onAudioError()\"\n (timeupdate)=\"onTimeUpdate($event)\"\n (loadedmetadata)=\"onLoadedMetadata($event)\"\n >\n Your browser does not support audio playback.\n </audio>\n }\n }\n @case ('pending') {\n <p class=\"call-recording-player__status eds-body-sm\">\n {{ message() ?? 'Recording is still processing…' }}\n </p>\n }\n @case ('unavailable') {\n <p class=\"call-recording-player__status eds-body-sm call-recording-player__status--muted\">\n {{ message() ?? 'No recording available for this call.' }}\n </p>\n }\n @case ('failed') {\n <p class=\"call-recording-player__status eds-body-sm call-recording-player__status--error\">\n {{ message() ?? 'Recording could not be retrieved.' }}\n </p>\n }\n @case ('error') {\n <p class=\"call-recording-player__status eds-body-sm call-recording-player__status--error\">\n {{ message() ?? 'Playback error.' }}\n </p>\n }\n }\n</section>\n"],"names":[],"mappings":";;;;;;;MA2Ba,4BAA4B,CAAA;AAkBvC,IAAA,WAAA,GAAA;AAjBS,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAU;QACjC,IAAA,CAAA,iBAAiB,GAAG,MAAM,EAAU;QACpC,IAAA,CAAA,cAAc,GAAG,MAAM,EAAU;AAEzB,QAAA,IAAA,CAAA,QAAQ,GAAG,SAAS,CAA+B,SAAS,CAAC;AAE7D,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACtC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAE7B,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAc,SAAS,CAAC;AACtC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAgB,IAAI,CAAC;AACrC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAgB,IAAI,CAAC;AAC7C,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAgB,IAAI,CAAC;;QAGhD,IAAA,CAAA,SAAS,GAAkB,IAAI;AAGrC,QAAA,YAAY,CAAC,IAAI,CAAC,MAAM;aACrB,IAAI,CACH,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