@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.
- package/README.md +37 -0
- package/fesm2022/edvak99-voice-receptionist-widget-activities-page.component-CdrW0He4.mjs +306 -0
- package/fesm2022/edvak99-voice-receptionist-widget-activities-page.component-CdrW0He4.mjs.map +1 -0
- 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
- 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
- package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-4GK1vsom.mjs +277 -0
- package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-4GK1vsom.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-Bw_Ade1s.mjs +416 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-Bw_Ade1s.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-DnwYnjIE.mjs +193 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-DnwYnjIE.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-recording-player.component-Pla2UgeZ.mjs +111 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-recording-player.component-Pla2UgeZ.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-call-review.service-CIMcjGKX.mjs → edvak99-voice-receptionist-widget-call-review.service-Di7GLG9k.mjs} +2 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-call-review.service-CIMcjGKX.mjs.map → edvak99-voice-receptionist-widget-call-review.service-Di7GLG9k.mjs.map} +1 -1
- package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-DVz0romd.mjs +439 -0
- package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-DVz0romd.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-dashboard-socket.service-BX91r74O.mjs → edvak99-voice-receptionist-widget-dashboard-socket.service-D2pelzu4.mjs} +3 -3
- package/fesm2022/{edvak99-voice-receptionist-widget-dashboard-socket.service-BX91r74O.mjs.map → edvak99-voice-receptionist-widget-dashboard-socket.service-D2pelzu4.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-eds-avatar.component-CWRiJGfv.mjs → edvak99-voice-receptionist-widget-eds-avatar.component-BJs_TH8X.mjs} +5 -5
- package/fesm2022/edvak99-voice-receptionist-widget-eds-avatar.component-BJs_TH8X.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-eds-pulse-dot.component-BPY6xN7C.mjs → edvak99-voice-receptionist-widget-eds-pulse-dot.component-Ig0Eoq1z.mjs} +6 -6
- package/fesm2022/edvak99-voice-receptionist-widget-eds-pulse-dot.component-Ig0Eoq1z.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-Bx7WQ2dg.mjs +81 -0
- package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-Bx7WQ2dg.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-DWbA5yAG.mjs +1059 -0
- package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-DWbA5yAG.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-modal.component-Cb-FoQ1N.mjs +48 -0
- package/fesm2022/edvak99-voice-receptionist-widget-modal.component-Cb-FoQ1N.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-DhoyrHSe.mjs +267 -0
- package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-DhoyrHSe.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-CZUDgZ1_.mjs +967 -0
- package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-CZUDgZ1_.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-tasks-page.component-DyNG2DZZ.mjs +316 -0
- package/fesm2022/edvak99-voice-receptionist-widget-tasks-page.component-DyNG2DZZ.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-wizard-page.component-DjaurkbO.mjs +46 -0
- package/fesm2022/edvak99-voice-receptionist-widget-wizard-page.component-DjaurkbO.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget.mjs +228 -1
- package/fesm2022/edvak99-voice-receptionist-widget.mjs.map +1 -1
- package/lib/components/call-conversation-panel/call-conversation-panel.component.d.ts +1 -2
- package/lib/components/live-transcript-panel/live-transcript-panel.component.d.ts +0 -3
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
- package/styles/chat-ui.scss +0 -1
- package/styles/eds.scss +0 -10
- package/fesm2022/edvak99-voice-receptionist-widget-activities-page.component-DT9UKvQO.mjs +0 -307
- package/fesm2022/edvak99-voice-receptionist-widget-activities-page.component-DT9UKvQO.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-C5inEHJw.mjs +0 -278
- package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-C5inEHJw.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-sYhM20CE.mjs +0 -418
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-sYhM20CE.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-DpwajEOE.mjs +0 -194
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-DpwajEOE.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-call-recording-player.component-CgkRcFOl.mjs +0 -111
- package/fesm2022/edvak99-voice-receptionist-widget-call-recording-player.component-CgkRcFOl.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-CxbO0eDS.mjs +0 -440
- package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-CxbO0eDS.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-eds-avatar.component-CWRiJGfv.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-eds-button.component-Bg5T5BN8.mjs +0 -27
- package/fesm2022/edvak99-voice-receptionist-widget-eds-button.component-Bg5T5BN8.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-eds-pulse-dot.component-BPY6xN7C.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-BsBQIS_f.mjs +0 -203
- package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-BsBQIS_f.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-CaSDMxpV.mjs +0 -81
- package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-CaSDMxpV.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-Cy3ND-c-.mjs +0 -1070
- package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-Cy3ND-c-.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-modal.component-COfi7biN.mjs +0 -48
- package/fesm2022/edvak99-voice-receptionist-widget-modal.component-COfi7biN.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-fHVzpiVk.mjs +0 -268
- package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-fHVzpiVk.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-Bok64X2q.mjs +0 -968
- package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-Bok64X2q.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-tasks-page.component-Bb9lPcYi.mjs +0 -317
- package/fesm2022/edvak99-voice-receptionist-widget-tasks-page.component-Bb9lPcYi.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-wizard-page.component-BZVlWLWh.mjs +0 -47
- package/fesm2022/edvak99-voice-receptionist-widget-wizard-page.component-BZVlWLWh.mjs.map +0 -1
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { Router, ActivatedRoute } from '@angular/router';
|
|
4
|
-
import { L as LiveCallsListService, E as EdsPulseDotComponent } from './edvak99-voice-receptionist-widget-eds-pulse-dot.component-BPY6xN7C.mjs';
|
|
5
|
-
import { c as callerMetaLine, d as ageFromDob, i as isUnknownCaller } from './edvak99-voice-receptionist-widget-ai-receptionist-api.service-48cifVPF.mjs';
|
|
6
|
-
import { E as EdsAvatarComponent } from './edvak99-voice-receptionist-widget-eds-avatar.component-CWRiJGfv.mjs';
|
|
7
|
-
import { E as EdsIconComponent } from './edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-BsBQIS_f.mjs';
|
|
8
|
-
|
|
9
|
-
class LiveCallsPageComponent {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.router = inject(Router);
|
|
12
|
-
this.route = inject(ActivatedRoute);
|
|
13
|
-
this.liveCallsList = inject(LiveCallsListService);
|
|
14
|
-
this.calls = this.liveCallsList.calls;
|
|
15
|
-
this.loading = this.liveCallsList.loading;
|
|
16
|
-
this.error = this.liveCallsList.error;
|
|
17
|
-
this.emptyState = computed(() => {
|
|
18
|
-
if (this.calls().length > 0)
|
|
19
|
-
return null;
|
|
20
|
-
return {
|
|
21
|
-
title: 'No active calls right now',
|
|
22
|
-
detail: 'When a patient calls your practice, their conversation will appear here for real-time monitoring.',
|
|
23
|
-
icon: 'phone_disabled',
|
|
24
|
-
};
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
ngOnInit() {
|
|
28
|
-
this.liveCallsList.start();
|
|
29
|
-
}
|
|
30
|
-
ngOnDestroy() {
|
|
31
|
-
this.liveCallsList.stop();
|
|
32
|
-
}
|
|
33
|
-
openMonitor(id) {
|
|
34
|
-
void this.router.navigate(['../live', id], { relativeTo: this.route });
|
|
35
|
-
}
|
|
36
|
-
displayName(call) {
|
|
37
|
-
return this.isUnknown(call) ? 'Unknown Caller' : call.name.trim();
|
|
38
|
-
}
|
|
39
|
-
displayMeta(call) {
|
|
40
|
-
return callerMetaLine({
|
|
41
|
-
name: call.name,
|
|
42
|
-
matched: call.matched,
|
|
43
|
-
phone: call.phone,
|
|
44
|
-
dob: call.dob,
|
|
45
|
-
age: call.age ?? ageFromDob(call.dob),
|
|
46
|
-
gender: call.gender,
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
isUnknown(call) {
|
|
50
|
-
return isUnknownCaller(call.name, call.matched);
|
|
51
|
-
}
|
|
52
|
-
sentimentLabel(sentiment) {
|
|
53
|
-
const key = String(sentiment ?? 'neutral').toLowerCase();
|
|
54
|
-
switch (key) {
|
|
55
|
-
case 'calm':
|
|
56
|
-
return 'Calm';
|
|
57
|
-
case 'frustrated':
|
|
58
|
-
return 'Frustrated';
|
|
59
|
-
case 'urgent':
|
|
60
|
-
return 'Urgent';
|
|
61
|
-
case 'neutral':
|
|
62
|
-
default:
|
|
63
|
-
return 'Neutral';
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
avatarInitials(call) {
|
|
67
|
-
return this.isUnknown(call) ? '?' : call.initials || '?';
|
|
68
|
-
}
|
|
69
|
-
avatarTone(call) {
|
|
70
|
-
return this.isUnknown(call) ? 'gray' : 'brand';
|
|
71
|
-
}
|
|
72
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LiveCallsPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
73
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: LiveCallsPageComponent, isStandalone: true, selector: "eds-live-calls-page", ngImport: i0, template: "<div class=\"eds-page live-calls-page\">\n <header class=\"live-calls-page__header\">\n <div>\n <h1 class=\"eds-h1\">Live Calls</h1>\n <p class=\"eds-body-sm\">Monitor active conversations in real time</p>\n </div>\n <eds-pulse-dot />\n </header>\n\n @if (error()) {\n <p class=\"live-calls-page__error eds-body-sm\" role=\"alert\">{{ error() }}</p>\n }\n\n @if (loading()) {\n <p class=\"eds-body-sm\">Loading live calls\u2026</p>\n } @else {\n <div class=\"live-calls-page__list\">\n @for (call of calls(); track call.id) {\n <button\n type=\"button\"\n class=\"live-calls-page__row\"\n (click)=\"openMonitor(call.id)\"\n >\n <eds-avatar\n class=\"live-calls-page__avatar\"\n [initials]=\"avatarInitials(call)\"\n [tone]=\"avatarTone(call)\"\n />\n <div class=\"live-calls-page__meta\">\n <span class=\"live-calls-page__name\">{{ displayName(call) }}</span>\n <span class=\"live-calls-page__sub\">{{ displayMeta(call) }}</span>\n </div>\n <span\n class=\"live-calls-page__sentiment\"\n [attr.data-sentiment]=\"call.sentiment\"\n >\n {{ sentimentLabel(call.sentiment) }}\n </span>\n </button>\n } @empty {\n @if (emptyState(); as state) {\n <div class=\"eds-card live-calls-page__empty\" role=\"status\">\n <eds-icon [name]=\"state.icon\" [size]=\"32\" />\n <p class=\"eds-h2 live-calls-page__empty-title\">{{ state.title }}</p>\n <p class=\"eds-body-sm live-calls-page__empty-detail\">{{ state.detail }}</p>\n </div>\n }\n }\n </div>\n }\n</div>\n", styles: [".live-calls-page__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.live-calls-page__header-actions{display:flex;align-items:center;gap:12px}.live-calls-page__error{color:var(--eds-red-500, #dc2626);margin-bottom:12px}.live-calls-page__list{display:flex;flex-direction:column;gap:10px;width:50%;max-width:50%;min-width:320px}.live-calls-page__row{display:flex;align-items:center;gap:12px;width:100%;padding:14px 16px;border:1px solid var(--eds-border-default, #e4e4e7);border-radius:12px;background:var(--eds-surface-l0, #fff);text-align:left;cursor:pointer;font:inherit;color:inherit;transition:border-color .15s ease,box-shadow .15s ease}.live-calls-page__row:hover{border-color:#cbd5e1;box-shadow:0 2px 8px #0f172a0f}.live-calls-page__row:focus-visible{outline:2px solid var(--eds-brand-500, #2563eb);outline-offset:2px}.live-calls-page__avatar{flex-shrink:0}.live-calls-page__avatar ::ng-deep .eds-avatar{width:40px;height:40px;border-radius:10px;font-size:13px}.live-calls-page__avatar ::ng-deep .eds-avatar[data-tone=brand]{background:#fef3c7;color:#92400e}.live-calls-page__meta{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.live-calls-page__name{font-size:14px;font-weight:700;color:var(--eds-text-primary, #41464c)}.live-calls-page__sub{font-size:12px;color:var(--eds-text-secondary, #53575c)}.live-calls-page__sentiment{flex-shrink:0;font-size:12px;font-weight:600;white-space:nowrap;text-transform:capitalize;color:var(--eds-text-secondary, #53575c)}.live-calls-page__sentiment[data-sentiment=calm]{color:var(--eds-green-600, #16a34a)}.live-calls-page__sentiment[data-sentiment=neutral]{color:var(--eds-text-secondary, #53575c)}.live-calls-page__sentiment[data-sentiment=frustrated]{color:var(--eds-amber-500, #d97706)}.live-calls-page__sentiment[data-sentiment=urgent]{color:var(--eds-red-500, #f03740)}.live-calls-page__empty{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:48px 24px;color:var(--eds-text-secondary)}.live-calls-page__empty-title{margin:0 0 8px;color:var(--eds-text-primary, #333)}.live-calls-page__empty-detail{margin:0;max-width:420px}\n"], dependencies: [{ kind: "component", type: EdsAvatarComponent, selector: "eds-avatar", inputs: ["initials", "tone", "shape", "gradient"] }, { kind: "component", type: EdsIconComponent, selector: "eds-icon", inputs: ["name", "size", "fill", "weight"] }, { kind: "component", type: EdsPulseDotComponent, selector: "eds-pulse-dot" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
74
|
-
}
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: LiveCallsPageComponent, decorators: [{
|
|
76
|
-
type: Component,
|
|
77
|
-
args: [{ selector: 'eds-live-calls-page', imports: [EdsAvatarComponent, EdsIconComponent, EdsPulseDotComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"eds-page live-calls-page\">\n <header class=\"live-calls-page__header\">\n <div>\n <h1 class=\"eds-h1\">Live Calls</h1>\n <p class=\"eds-body-sm\">Monitor active conversations in real time</p>\n </div>\n <eds-pulse-dot />\n </header>\n\n @if (error()) {\n <p class=\"live-calls-page__error eds-body-sm\" role=\"alert\">{{ error() }}</p>\n }\n\n @if (loading()) {\n <p class=\"eds-body-sm\">Loading live calls\u2026</p>\n } @else {\n <div class=\"live-calls-page__list\">\n @for (call of calls(); track call.id) {\n <button\n type=\"button\"\n class=\"live-calls-page__row\"\n (click)=\"openMonitor(call.id)\"\n >\n <eds-avatar\n class=\"live-calls-page__avatar\"\n [initials]=\"avatarInitials(call)\"\n [tone]=\"avatarTone(call)\"\n />\n <div class=\"live-calls-page__meta\">\n <span class=\"live-calls-page__name\">{{ displayName(call) }}</span>\n <span class=\"live-calls-page__sub\">{{ displayMeta(call) }}</span>\n </div>\n <span\n class=\"live-calls-page__sentiment\"\n [attr.data-sentiment]=\"call.sentiment\"\n >\n {{ sentimentLabel(call.sentiment) }}\n </span>\n </button>\n } @empty {\n @if (emptyState(); as state) {\n <div class=\"eds-card live-calls-page__empty\" role=\"status\">\n <eds-icon [name]=\"state.icon\" [size]=\"32\" />\n <p class=\"eds-h2 live-calls-page__empty-title\">{{ state.title }}</p>\n <p class=\"eds-body-sm live-calls-page__empty-detail\">{{ state.detail }}</p>\n </div>\n }\n }\n </div>\n }\n</div>\n", styles: [".live-calls-page__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.live-calls-page__header-actions{display:flex;align-items:center;gap:12px}.live-calls-page__error{color:var(--eds-red-500, #dc2626);margin-bottom:12px}.live-calls-page__list{display:flex;flex-direction:column;gap:10px;width:50%;max-width:50%;min-width:320px}.live-calls-page__row{display:flex;align-items:center;gap:12px;width:100%;padding:14px 16px;border:1px solid var(--eds-border-default, #e4e4e7);border-radius:12px;background:var(--eds-surface-l0, #fff);text-align:left;cursor:pointer;font:inherit;color:inherit;transition:border-color .15s ease,box-shadow .15s ease}.live-calls-page__row:hover{border-color:#cbd5e1;box-shadow:0 2px 8px #0f172a0f}.live-calls-page__row:focus-visible{outline:2px solid var(--eds-brand-500, #2563eb);outline-offset:2px}.live-calls-page__avatar{flex-shrink:0}.live-calls-page__avatar ::ng-deep .eds-avatar{width:40px;height:40px;border-radius:10px;font-size:13px}.live-calls-page__avatar ::ng-deep .eds-avatar[data-tone=brand]{background:#fef3c7;color:#92400e}.live-calls-page__meta{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.live-calls-page__name{font-size:14px;font-weight:700;color:var(--eds-text-primary, #41464c)}.live-calls-page__sub{font-size:12px;color:var(--eds-text-secondary, #53575c)}.live-calls-page__sentiment{flex-shrink:0;font-size:12px;font-weight:600;white-space:nowrap;text-transform:capitalize;color:var(--eds-text-secondary, #53575c)}.live-calls-page__sentiment[data-sentiment=calm]{color:var(--eds-green-600, #16a34a)}.live-calls-page__sentiment[data-sentiment=neutral]{color:var(--eds-text-secondary, #53575c)}.live-calls-page__sentiment[data-sentiment=frustrated]{color:var(--eds-amber-500, #d97706)}.live-calls-page__sentiment[data-sentiment=urgent]{color:var(--eds-red-500, #f03740)}.live-calls-page__empty{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:48px 24px;color:var(--eds-text-secondary)}.live-calls-page__empty-title{margin:0 0 8px;color:var(--eds-text-primary, #333)}.live-calls-page__empty-detail{margin:0;max-width:420px}\n"] }]
|
|
78
|
-
}] });
|
|
79
|
-
|
|
80
|
-
export { LiveCallsPageComponent };
|
|
81
|
-
//# sourceMappingURL=edvak99-voice-receptionist-widget-live-calls-page.component-CaSDMxpV.mjs.map
|
package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-CaSDMxpV.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"edvak99-voice-receptionist-widget-live-calls-page.component-CaSDMxpV.mjs","sources":["../../../projects/voice-receptionist-widget/src/lib/pages/live-calls-page/live-calls-page.component.ts","../../../projects/voice-receptionist-widget/src/lib/pages/live-calls-page/live-calls-page.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\n\nimport { LiveCall, Sentiment } from '../../models/ai-receptionist.types';\nimport { LiveCallsListService } from '../../services/live-calls-list.service';\nimport {\n ageFromDob,\n callerMetaLine,\n isUnknownCaller,\n} from '../../utils/call-history-display.util';\nimport { EdsAvatarComponent } from '../../ui/eds-avatar.component';\nimport { EdsIconComponent } from '../../ui/eds-icon.component';\nimport { EdsPulseDotComponent } from '../../ui/eds-pulse-dot.component';\n\n@Component({\n selector: 'eds-live-calls-page',\n imports: [EdsAvatarComponent, EdsIconComponent, EdsPulseDotComponent],\n templateUrl: './live-calls-page.component.html',\n styleUrl: './live-calls-page.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LiveCallsPageComponent implements OnInit, OnDestroy {\n private readonly router = inject(Router);\n private readonly route = inject(ActivatedRoute);\n private readonly liveCallsList = inject(LiveCallsListService);\n\n protected readonly calls = this.liveCallsList.calls;\n protected readonly loading = this.liveCallsList.loading;\n protected readonly error = this.liveCallsList.error;\n\n protected readonly emptyState = computed(() => {\n if (this.calls().length > 0) return null;\n return {\n title: 'No active calls right now',\n detail:\n 'When a patient calls your practice, their conversation will appear here for real-time monitoring.',\n icon: 'phone_disabled',\n };\n });\n\n ngOnInit(): void {\n this.liveCallsList.start();\n }\n\n ngOnDestroy(): void {\n this.liveCallsList.stop();\n }\n\n protected openMonitor(id: string): void {\n void this.router.navigate(['../live', id], { relativeTo: this.route });\n }\n\n protected displayName(call: LiveCall): string {\n return this.isUnknown(call) ? 'Unknown Caller' : call.name.trim();\n }\n\n protected displayMeta(call: LiveCall): string {\n return callerMetaLine({\n name: call.name,\n matched: call.matched,\n phone: call.phone,\n dob: call.dob,\n age: call.age ?? ageFromDob(call.dob),\n gender: call.gender,\n });\n }\n\n protected isUnknown(call: LiveCall): boolean {\n return isUnknownCaller(call.name, call.matched);\n }\n\n protected sentimentLabel(sentiment: Sentiment | string | null | undefined): string {\n const key = String(sentiment ?? 'neutral').toLowerCase();\n switch (key) {\n case 'calm':\n return 'Calm';\n case 'frustrated':\n return 'Frustrated';\n case 'urgent':\n return 'Urgent';\n case 'neutral':\n default:\n return 'Neutral';\n }\n }\n\n protected avatarInitials(call: LiveCall): string {\n return this.isUnknown(call) ? '?' : call.initials || '?';\n }\n\n protected avatarTone(call: LiveCall): 'gray' | 'brand' {\n return this.isUnknown(call) ? 'gray' : 'brand';\n }\n}\n","<div class=\"eds-page live-calls-page\">\n <header class=\"live-calls-page__header\">\n <div>\n <h1 class=\"eds-h1\">Live Calls</h1>\n <p class=\"eds-body-sm\">Monitor active conversations in real time</p>\n </div>\n <eds-pulse-dot />\n </header>\n\n @if (error()) {\n <p class=\"live-calls-page__error eds-body-sm\" role=\"alert\">{{ error() }}</p>\n }\n\n @if (loading()) {\n <p class=\"eds-body-sm\">Loading live calls…</p>\n } @else {\n <div class=\"live-calls-page__list\">\n @for (call of calls(); track call.id) {\n <button\n type=\"button\"\n class=\"live-calls-page__row\"\n (click)=\"openMonitor(call.id)\"\n >\n <eds-avatar\n class=\"live-calls-page__avatar\"\n [initials]=\"avatarInitials(call)\"\n [tone]=\"avatarTone(call)\"\n />\n <div class=\"live-calls-page__meta\">\n <span class=\"live-calls-page__name\">{{ displayName(call) }}</span>\n <span class=\"live-calls-page__sub\">{{ displayMeta(call) }}</span>\n </div>\n <span\n class=\"live-calls-page__sentiment\"\n [attr.data-sentiment]=\"call.sentiment\"\n >\n {{ sentimentLabel(call.sentiment) }}\n </span>\n </button>\n } @empty {\n @if (emptyState(); as state) {\n <div class=\"eds-card live-calls-page__empty\" role=\"status\">\n <eds-icon [name]=\"state.icon\" [size]=\"32\" />\n <p class=\"eds-h2 live-calls-page__empty-title\">{{ state.title }}</p>\n <p class=\"eds-body-sm live-calls-page__empty-detail\">{{ state.detail }}</p>\n </div>\n }\n }\n </div>\n }\n</div>\n"],"names":[],"mappings":";;;;;;;;MA4Ba,sBAAsB,CAAA;AAPnC,IAAA,WAAA,GAAA;AAQmB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAE1C,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK;AAChC,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO;AACpC,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK;AAEhC,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAK;AAC5C,YAAA,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,GAAG,CAAC;AAAE,gBAAA,OAAO,IAAI;YACxC,OAAO;AACL,gBAAA,KAAK,EAAE,2BAA2B;AAClC,gBAAA,MAAM,EACJ,mGAAmG;AACrG,gBAAA,IAAI,EAAE,gBAAgB;aACvB;AACH,QAAA,CAAC,CAAC;AAuDH,IAAA;IArDC,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE;IAC5B;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE;IAC3B;AAEU,IAAA,WAAW,CAAC,EAAU,EAAA;QAC9B,KAAK,IAAI,CAAC,MA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