@edvak99/voice-receptionist-widget 1.1.3 → 1.1.4
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/fesm2022/edvak99-voice-receptionist-widget-activities-page.component-DT9UKvQO.mjs +307 -0
- package/fesm2022/edvak99-voice-receptionist-widget-activities-page.component-DT9UKvQO.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-Dn0GrZ6_.mjs → edvak99-voice-receptionist-widget-ai-receptionist-api.service-48cifVPF.mjs} +1275 -561
- package/fesm2022/edvak99-voice-receptionist-widget-ai-receptionist-api.service-48cifVPF.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-C5inEHJw.mjs +278 -0
- package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-C5inEHJw.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-sYhM20CE.mjs +418 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-sYhM20CE.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-DpwajEOE.mjs +194 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-DpwajEOE.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-call-recording-player.component-B8_qp7Fe.mjs → edvak99-voice-receptionist-widget-call-recording-player.component-CgkRcFOl.mjs} +3 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-call-recording-player.component-B8_qp7Fe.mjs.map → edvak99-voice-receptionist-widget-call-recording-player.component-CgkRcFOl.mjs.map} +1 -1
- package/fesm2022/{edvak99-voice-receptionist-widget-call-review.service-Cj2XTeK4.mjs → edvak99-voice-receptionist-widget-call-review.service-CIMcjGKX.mjs} +2 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-call-review.service-Cj2XTeK4.mjs.map → edvak99-voice-receptionist-widget-call-review.service-CIMcjGKX.mjs.map} +1 -1
- package/fesm2022/edvak99-voice-receptionist-widget-call-review.util-Deh3jPgo.mjs +21 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-review.util-Deh3jPgo.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-CxbO0eDS.mjs +440 -0
- package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-CxbO0eDS.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-eds-elapsed.pipe-BgLsnq6A.mjs → edvak99-voice-receptionist-widget-dashboard-socket.service-BX91r74O.mjs} +5 -21
- package/fesm2022/edvak99-voice-receptionist-widget-dashboard-socket.service-BX91r74O.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-eds-avatar.component-CWRiJGfv.mjs +38 -0
- package/fesm2022/edvak99-voice-receptionist-widget-eds-avatar.component-CWRiJGfv.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-eds-button.component-Bg5T5BN8.mjs +27 -0
- package/fesm2022/edvak99-voice-receptionist-widget-eds-button.component-Bg5T5BN8.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-eds-elapsed.pipe-BFCiJOT3.mjs +22 -0
- package/fesm2022/edvak99-voice-receptionist-widget-eds-elapsed.pipe-BFCiJOT3.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-live-calls-list.service-0kGWO6sh.mjs → edvak99-voice-receptionist-widget-eds-pulse-dot.component-BPY6xN7C.mjs} +15 -5
- package/fesm2022/edvak99-voice-receptionist-widget-eds-pulse-dot.component-BPY6xN7C.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-BsBQIS_f.mjs +203 -0
- package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-BsBQIS_f.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-CaSDMxpV.mjs +81 -0
- package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-CaSDMxpV.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-Cy3ND-c-.mjs +1070 -0
- package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-Cy3ND-c-.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-modal.component-COfi7biN.mjs +48 -0
- package/fesm2022/edvak99-voice-receptionist-widget-modal.component-COfi7biN.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-outbound-purpose.util-Bdh4QfFe.mjs +127 -0
- package/fesm2022/edvak99-voice-receptionist-widget-outbound-purpose.util-Bdh4QfFe.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-fHVzpiVk.mjs +268 -0
- package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-fHVzpiVk.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-Bok64X2q.mjs +968 -0
- package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-Bok64X2q.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-tasks-page.component-DXxjMVUv.mjs → edvak99-voice-receptionist-widget-tasks-page.component-Bb9lPcYi.mjs} +56 -5
- package/fesm2022/edvak99-voice-receptionist-widget-tasks-page.component-Bb9lPcYi.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-wizard-page.component-C1Z6yC0q.mjs → edvak99-voice-receptionist-widget-wizard-page.component-BZVlWLWh.mjs} +4 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-wizard-page.component-C1Z6yC0q.mjs.map → edvak99-voice-receptionist-widget-wizard-page.component-BZVlWLWh.mjs.map} +1 -1
- package/fesm2022/edvak99-voice-receptionist-widget.mjs +1 -1
- package/lib/components/call-conversation-panel/call-conversation-panel.component.d.ts +9 -6
- package/lib/components/call-tasks-panel/call-tasks-panel.component.d.ts +8 -8
- package/lib/components/knowledge-test-modal/knowledge-test-modal.component.d.ts +28 -0
- package/lib/components/live-transcript-panel/live-transcript-panel.component.d.ts +7 -4
- package/lib/components/outbound-dial-modal/outbound-dial-modal.component.d.ts +26 -0
- package/lib/layout/eds-module-nav.component.d.ts +0 -3
- package/lib/mocks/agent-activity.seed.d.ts +2 -0
- package/lib/models/agent-activity.types.d.ts +54 -0
- package/lib/models/ai-receptionist.types.d.ts +25 -0
- package/lib/models/api-dto.types.d.ts +18 -0
- package/lib/models/live-transcript.types.d.ts +2 -1
- package/lib/models/outbound-patient.types.d.ts +23 -0
- package/lib/models/outbound-purpose.types.d.ts +2 -0
- package/lib/models/staff-media.types.d.ts +36 -0
- package/lib/pages/activities-page/activities-page.component.d.ts +57 -0
- package/lib/pages/analytics-page/analytics-page.component.d.ts +38 -14
- package/lib/pages/call-history-detail-page/call-history-detail-page.component.d.ts +2 -3
- package/lib/pages/call-history-page/call-history-page.component.d.ts +9 -6
- package/lib/pages/dashboard-page/dashboard-page.component.d.ts +12 -8
- package/lib/pages/live-calls-page/live-calls-page.component.d.ts +14 -24
- package/lib/pages/live-monitor-page/live-monitor-page.component.d.ts +34 -1
- package/lib/pages/settings-page/settings-fields.config.d.ts +16 -0
- package/lib/pages/settings-page/settings-page.component.d.ts +48 -14
- package/lib/services/ai-receptionist-api.mock.d.ts +34 -0
- package/lib/services/ai-receptionist-api.service.d.ts +56 -1
- package/lib/services/live-transcript.service.d.ts +1 -0
- package/lib/services/staff-media.service.d.ts +52 -0
- package/lib/ui/eds-avatar.component.d.ts +5 -2
- package/lib/ui/eds-button.component.d.ts +1 -1
- package/lib/utils/call-history-display.util.d.ts +21 -0
- package/lib/utils/outbound-purpose.util.d.ts +19 -0
- package/lib/utils/transcript-timing.util.d.ts +1 -1
- package/lib/utils/welcome-message.util.d.ts +1 -1
- package/package.json +2 -1
- package/styles/eds.scss +95 -66
- package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-Dsujn5az.mjs +0 -113
- package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-Dsujn5az.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-audit-page.component-xoLlHj8K.mjs +0 -67
- package/fesm2022/edvak99-voice-receptionist-widget-audit-page.component-xoLlHj8K.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-2K9W77As.mjs +0 -316
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-2K9W77As.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-B5AnEjoh.mjs +0 -174
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-B5AnEjoh.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-call-review.util-BgsBCKgZ.mjs +0 -70
- package/fesm2022/edvak99-voice-receptionist-widget-call-review.util-BgsBCKgZ.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-BNdnbAVM.mjs +0 -248
- package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-BNdnbAVM.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-eds-avatar.component-CbphhP6o.mjs +0 -27
- package/fesm2022/edvak99-voice-receptionist-widget-eds-avatar.component-CbphhP6o.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-eds-elapsed.pipe-BgLsnq6A.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-Dn0GrZ6_.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-knowledge-hub.page-BngGx_Lc.mjs +0 -609
- package/fesm2022/edvak99-voice-receptionist-widget-knowledge-hub.page-BngGx_Lc.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-live-calls-list.service-0kGWO6sh.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-DfLmK89M.mjs +0 -115
- package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-DfLmK89M.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-DNpLFqBw.mjs +0 -574
- package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-DNpLFqBw.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-outbound-purpose.util-BQECIuJu.mjs +0 -54
- package/fesm2022/edvak99-voice-receptionist-widget-outbound-purpose.util-BQECIuJu.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-CYSZ832p.mjs +0 -265
- package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-CYSZ832p.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-B9nv6wtB.mjs +0 -509
- package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-B9nv6wtB.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-task.util-DdtI0CR3.mjs +0 -52
- package/fesm2022/edvak99-voice-receptionist-widget-task.util-DdtI0CR3.mjs.map +0 -1
- package/fesm2022/edvak99-voice-receptionist-widget-tasks-page.component-DXxjMVUv.mjs.map +0 -1
- package/lib/knowledge/components/faq-empty-state/faq-empty-state.component.d.ts +0 -22
- package/lib/knowledge/components/faq-form/faq-form.component.d.ts +0 -27
- package/lib/knowledge/components/faq-search-tester/faq-search-tester.component.d.ts +0 -17
- package/lib/knowledge/mocks/practice-faq.seed.d.ts +0 -2
- package/lib/knowledge/models/practice-faq.model.d.ts +0 -50
- package/lib/knowledge/pages/knowledge-hub.page.d.ts +0 -54
- package/lib/knowledge/services/practice-faq-api.mock.d.ts +0 -16
- package/lib/knowledge/services/practice-faq-api.service.d.ts +0 -26
- package/lib/knowledge/utils/faq.util.d.ts +0 -3
- package/lib/layout/eds-topbar.component.d.ts +0 -29
- package/lib/pages/audit-page/audit-page.component.d.ts +0 -21
- package/lib/ui/eds-waveform.component.d.ts +0 -8
package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-BsBQIS_f.mjs
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, makeEnvironmentProviders, signal, Injectable, inject, ChangeDetectionStrategy, Component, input, computed } from '@angular/core';
|
|
3
|
+
import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';
|
|
4
|
+
|
|
5
|
+
const VOICE_RECEPTIONIST_CONFIG = new InjectionToken('VOICE_RECEPTIONIST_CONFIG');
|
|
6
|
+
const VOICE_RECEPTIONIST_SESSION = new InjectionToken('VOICE_RECEPTIONIST_SESSION', { factory: () => null });
|
|
7
|
+
|
|
8
|
+
function provideVoiceReceptionist(options) {
|
|
9
|
+
const { session = null, ...config } = options;
|
|
10
|
+
return makeEnvironmentProviders([
|
|
11
|
+
{ provide: VOICE_RECEPTIONIST_CONFIG, useValue: config },
|
|
12
|
+
{ provide: VOICE_RECEPTIONIST_SESSION, useValue: session },
|
|
13
|
+
]);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class ToastService {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.nextId = 1;
|
|
19
|
+
this.timers = new Map();
|
|
20
|
+
this._toasts = signal([]);
|
|
21
|
+
this.toasts = this._toasts.asReadonly();
|
|
22
|
+
}
|
|
23
|
+
show(text, variant = 'info', durationMs = 3500) {
|
|
24
|
+
const id = this.nextId++;
|
|
25
|
+
this._toasts.update((list) => [...list, { id, text, variant }]);
|
|
26
|
+
const timer = setTimeout(() => this.dismiss(id), durationMs);
|
|
27
|
+
this.timers.set(id, timer);
|
|
28
|
+
}
|
|
29
|
+
dismiss(id) {
|
|
30
|
+
const timer = this.timers.get(id);
|
|
31
|
+
if (timer) {
|
|
32
|
+
clearTimeout(timer);
|
|
33
|
+
this.timers.delete(id);
|
|
34
|
+
}
|
|
35
|
+
this._toasts.update((list) => list.filter((t) => t.id !== id));
|
|
36
|
+
}
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ToastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
38
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ToastService, providedIn: 'root' }); }
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ToastService, decorators: [{
|
|
41
|
+
type: Injectable,
|
|
42
|
+
args: [{ providedIn: 'root' }]
|
|
43
|
+
}] });
|
|
44
|
+
|
|
45
|
+
class ToastContainerComponent {
|
|
46
|
+
constructor() {
|
|
47
|
+
this.toastService = inject(ToastService);
|
|
48
|
+
}
|
|
49
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ToastContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: ToastContainerComponent, isStandalone: true, selector: "app-toast-container", ngImport: i0, template: "<div class=\"toast-stack\" aria-live=\"polite\" aria-atomic=\"false\">\n @for (toast of toastService.toasts(); track toast.id) {\n <div class=\"toast\" [class]=\"'toast-' + toast.variant\" role=\"status\">\n <span class=\"toast-icon\" aria-hidden=\"true\">\n @switch (toast.variant) {\n @case ('success') {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n }\n @case ('error') {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"13\" />\n <line x1=\"12\" y1=\"16\" x2=\"12.01\" y2=\"16\" />\n </svg>\n }\n @default {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"12\" />\n <line x1=\"12\" y1=\"16\" x2=\"12.01\" y2=\"16\" />\n </svg>\n }\n }\n </span>\n <span class=\"toast-text\">{{ toast.text }}</span>\n <button\n type=\"button\"\n class=\"toast-dismiss\"\n (click)=\"toastService.dismiss(toast.id)\"\n aria-label=\"Dismiss notification\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </div>\n }\n</div>\n", styles: [":host{position:fixed;bottom:24px;right:24px;z-index:1100;pointer-events:none}.toast-stack{display:flex;flex-direction:column;gap:10px;max-width:380px}.toast{pointer-events:auto;display:flex;align-items:flex-start;gap:10px;padding:12px 14px;background:var(--eds-color-surface);border:1px solid var(--eds-color-border);border-radius:var(--eds-radius-md);box-shadow:0 6px 24px #141e321f;font-size:13px;color:var(--eds-color-text);animation:slide-in .16s ease}.toast-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;flex-shrink:0}.toast-info .toast-icon{background:var(--eds-color-primary-soft);color:var(--eds-color-primary)}.toast-success .toast-icon{background:var(--eds-color-success-soft);color:var(--eds-color-success)}.toast-error .toast-icon{background:var(--eds-color-danger-soft);color:var(--eds-color-danger)}.toast-text{flex:1;line-height:1.45}.toast-dismiss{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;background:transparent;color:var(--eds-color-text-soft);border-radius:4px;transition:background .12s ease,color .12s ease}.toast-dismiss:hover{background:var(--eds-color-surface-alt);color:var(--eds-color-text)}@keyframes slide-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
51
|
+
}
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ToastContainerComponent, decorators: [{
|
|
53
|
+
type: Component,
|
|
54
|
+
args: [{ selector: 'app-toast-container', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"toast-stack\" aria-live=\"polite\" aria-atomic=\"false\">\n @for (toast of toastService.toasts(); track toast.id) {\n <div class=\"toast\" [class]=\"'toast-' + toast.variant\" role=\"status\">\n <span class=\"toast-icon\" aria-hidden=\"true\">\n @switch (toast.variant) {\n @case ('success') {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n }\n @case ('error') {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"13\" />\n <line x1=\"12\" y1=\"16\" x2=\"12.01\" y2=\"16\" />\n </svg>\n }\n @default {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"12\" />\n <line x1=\"12\" y1=\"16\" x2=\"12.01\" y2=\"16\" />\n </svg>\n }\n }\n </span>\n <span class=\"toast-text\">{{ toast.text }}</span>\n <button\n type=\"button\"\n class=\"toast-dismiss\"\n (click)=\"toastService.dismiss(toast.id)\"\n aria-label=\"Dismiss notification\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </div>\n }\n</div>\n", styles: [":host{position:fixed;bottom:24px;right:24px;z-index:1100;pointer-events:none}.toast-stack{display:flex;flex-direction:column;gap:10px;max-width:380px}.toast{pointer-events:auto;display:flex;align-items:flex-start;gap:10px;padding:12px 14px;background:var(--eds-color-surface);border:1px solid var(--eds-color-border);border-radius:var(--eds-radius-md);box-shadow:0 6px 24px #141e321f;font-size:13px;color:var(--eds-color-text);animation:slide-in .16s ease}.toast-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;flex-shrink:0}.toast-info .toast-icon{background:var(--eds-color-primary-soft);color:var(--eds-color-primary)}.toast-success .toast-icon{background:var(--eds-color-success-soft);color:var(--eds-color-success)}.toast-error .toast-icon{background:var(--eds-color-danger-soft);color:var(--eds-color-danger)}.toast-text{flex:1;line-height:1.45}.toast-dismiss{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;background:transparent;color:var(--eds-color-text-soft);border-radius:4px;transition:background .12s ease,color .12s ease}.toast-dismiss:hover{background:var(--eds-color-surface-alt);color:var(--eds-color-text)}@keyframes slide-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
55
|
+
}] });
|
|
56
|
+
|
|
57
|
+
class EdsIconComponent {
|
|
58
|
+
constructor() {
|
|
59
|
+
this.name = input.required();
|
|
60
|
+
this.size = input(20);
|
|
61
|
+
this.fill = input(0);
|
|
62
|
+
this.weight = input(400);
|
|
63
|
+
this.variation = computed(() => `'FILL' ${this.fill()}, 'wght' ${this.weight()}, 'GRAD' 0, 'opsz' ${this.size()}`);
|
|
64
|
+
}
|
|
65
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EdsIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
66
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", type: EdsIconComponent, isStandalone: true, selector: "eds-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fill: { classPropertyName: "fill", publicName: "fill", isSignal: true, isRequired: false, transformFunction: null }, weight: { classPropertyName: "weight", publicName: "weight", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<span class="eds-icon" [style.font-size.px]="size()" [style.font-variation-settings]="variation()">{{ name() }}</span>`, isInline: true, styles: [":host{display:inline-flex;line-height:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
67
|
+
}
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EdsIconComponent, decorators: [{
|
|
69
|
+
type: Component,
|
|
70
|
+
args: [{ selector: 'eds-icon', standalone: true, template: `<span class="eds-icon" [style.font-size.px]="size()" [style.font-variation-settings]="variation()">{{ name() }}</span>`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:inline-flex;line-height:0}\n"] }]
|
|
71
|
+
}] });
|
|
72
|
+
|
|
73
|
+
class EdsModuleNavComponent {
|
|
74
|
+
constructor() {
|
|
75
|
+
this.config = inject(VOICE_RECEPTIONIST_CONFIG);
|
|
76
|
+
this.session = inject(VOICE_RECEPTIONIST_SESSION);
|
|
77
|
+
this.includePracticeNav = !!this.config.includePracticeNav;
|
|
78
|
+
this.receptionistNav = [
|
|
79
|
+
{ id: 'dashboard', label: 'Home', icon: 'home', route: 'dashboard' },
|
|
80
|
+
{ id: 'live', label: 'Live Calls', icon: 'phone_in_talk', route: 'live' },
|
|
81
|
+
{ id: 'history', label: 'Call History', icon: 'history', route: 'history' },
|
|
82
|
+
{ id: 'activities', label: 'Activities', icon: 'format_list_bulleted', route: 'activities' },
|
|
83
|
+
{ id: 'analytics', label: 'Analytics', icon: 'show_chart', route: 'analytics' },
|
|
84
|
+
{ id: 'settings', label: 'Agent Setting', icon: 'settings', route: 'settings' },
|
|
85
|
+
];
|
|
86
|
+
this.practiceNav = [
|
|
87
|
+
{ id: 'patients', label: 'Patients', icon: 'groups', route: 'patients' },
|
|
88
|
+
{ id: 'providers', label: 'Providers', icon: 'medical_services', route: 'providers' },
|
|
89
|
+
{ id: 'appointments', label: 'Appointments', icon: 'calendar_month', route: 'appointments' },
|
|
90
|
+
{ id: 'admin', label: 'Admin', icon: 'admin_panel_settings', route: 'admin', adminOnly: true },
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
showNavItem(item) {
|
|
94
|
+
return !item.adminOnly || !!this.session?.isAdmin();
|
|
95
|
+
}
|
|
96
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EdsModuleNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
97
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: EdsModuleNavComponent, isStandalone: true, selector: "eds-module-nav", ngImport: i0, template: "<nav class=\"eds-modnav\" aria-label=\"AI Receptionist\">\n <div class=\"eds-modnav-header\">\n <span class=\"eds-modnav-icon\" aria-hidden=\"true\">\n <eds-icon name=\"auto_awesome\" [size]=\"20\" [fill]=\"1\" />\n </span>\n <div class=\"eds-modnav-titles\">\n <span class=\"eds-modnav-name\">AI Receptionist</span>\n </div>\n </div>\n\n <div class=\"eds-modnav-links\">\n @for (item of receptionistNav; track item.id) {\n <a\n [routerLink]=\"item.route\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: item.route === 'dashboard' }\"\n >\n <eds-icon [name]=\"item.icon\" [size]=\"24\" />\n <span class=\"eds-modnav-label\">{{ item.label }}</span>\n </a>\n }\n </div>\n\n @if (includePracticeNav) {\n <p class=\"eds-modnav-section\">Practice</p>\n <div class=\"eds-modnav-links eds-modnav-links--practice\">\n @for (item of practiceNav; track item.id) {\n @if (showNavItem(item)) {\n <a [routerLink]=\"item.route\" routerLinkActive=\"active\">\n <eds-icon [name]=\"item.icon\" [size]=\"24\" />\n <span class=\"eds-modnav-label\">{{ item.label }}</span>\n </a>\n }\n }\n </div>\n }\n</nav>\n", styles: [":host{display:block;flex-shrink:0}.eds-modnav{width:var(--eds-nav-width);min-height:100vh;background:#fff;border-right:1px solid var(--eds-border-default);display:flex;flex-direction:column;padding:20px 16px;position:sticky;top:0;height:100vh;overflow-y:auto}.eds-modnav-header{display:flex;align-items:center;gap:12px;padding:4px 4px 16px;border-bottom:1px solid var(--eds-border-default);margin-bottom:16px}.eds-modnav-icon{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;flex-shrink:0;background:color-mix(in srgb,var(--eds-violet-500) 14%,#fff);color:var(--eds-violet-500)}.eds-modnav-titles{display:flex;flex-direction:column;gap:2px;min-width:0}.eds-modnav-name{font-family:var(--eds-font-inter);font-size:15px;font-weight:600;letter-spacing:-.01em;color:var(--eds-text-primary);line-height:1.2}.eds-modnav-links{display:flex;flex-direction:column;gap:4px}.eds-modnav-links a{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:10px;text-decoration:none;color:#334155;font-size:14px;font-weight:500;line-height:1.2;position:relative;transition:background .12s ease,color .12s ease}.eds-modnav-links a eds-icon{color:#475569;flex-shrink:0}.eds-modnav-links a:hover{background:#f8fafc;color:#0f172a}.eds-modnav-links a:hover eds-icon{color:#0f172a}.eds-modnav-links a.active{background:#f1f5f9;color:#0f172a;font-weight:600}.eds-modnav-links a.active eds-icon{color:#0f172a}.eds-modnav-links--practice{margin-bottom:12px}.eds-modnav-section{margin:18px 12px 8px;font-family:var(--eds-font-inter);font-size:13px;font-weight:600;letter-spacing:normal;text-transform:none;color:var(--eds-text-table-header, #4d5573)}.eds-modnav-label{flex:1;min-width:0}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: EdsIconComponent, selector: "eds-icon", inputs: ["name", "size", "fill", "weight"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
98
|
+
}
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EdsModuleNavComponent, decorators: [{
|
|
100
|
+
type: Component,
|
|
101
|
+
args: [{ selector: 'eds-module-nav', imports: [RouterLink, RouterLinkActive, EdsIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav class=\"eds-modnav\" aria-label=\"AI Receptionist\">\n <div class=\"eds-modnav-header\">\n <span class=\"eds-modnav-icon\" aria-hidden=\"true\">\n <eds-icon name=\"auto_awesome\" [size]=\"20\" [fill]=\"1\" />\n </span>\n <div class=\"eds-modnav-titles\">\n <span class=\"eds-modnav-name\">AI Receptionist</span>\n </div>\n </div>\n\n <div class=\"eds-modnav-links\">\n @for (item of receptionistNav; track item.id) {\n <a\n [routerLink]=\"item.route\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: item.route === 'dashboard' }\"\n >\n <eds-icon [name]=\"item.icon\" [size]=\"24\" />\n <span class=\"eds-modnav-label\">{{ item.label }}</span>\n </a>\n }\n </div>\n\n @if (includePracticeNav) {\n <p class=\"eds-modnav-section\">Practice</p>\n <div class=\"eds-modnav-links eds-modnav-links--practice\">\n @for (item of practiceNav; track item.id) {\n @if (showNavItem(item)) {\n <a [routerLink]=\"item.route\" routerLinkActive=\"active\">\n <eds-icon [name]=\"item.icon\" [size]=\"24\" />\n <span class=\"eds-modnav-label\">{{ item.label }}</span>\n </a>\n }\n }\n </div>\n }\n</nav>\n", styles: [":host{display:block;flex-shrink:0}.eds-modnav{width:var(--eds-nav-width);min-height:100vh;background:#fff;border-right:1px solid var(--eds-border-default);display:flex;flex-direction:column;padding:20px 16px;position:sticky;top:0;height:100vh;overflow-y:auto}.eds-modnav-header{display:flex;align-items:center;gap:12px;padding:4px 4px 16px;border-bottom:1px solid var(--eds-border-default);margin-bottom:16px}.eds-modnav-icon{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;flex-shrink:0;background:color-mix(in srgb,var(--eds-violet-500) 14%,#fff);color:var(--eds-violet-500)}.eds-modnav-titles{display:flex;flex-direction:column;gap:2px;min-width:0}.eds-modnav-name{font-family:var(--eds-font-inter);font-size:15px;font-weight:600;letter-spacing:-.01em;color:var(--eds-text-primary);line-height:1.2}.eds-modnav-links{display:flex;flex-direction:column;gap:4px}.eds-modnav-links a{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:10px;text-decoration:none;color:#334155;font-size:14px;font-weight:500;line-height:1.2;position:relative;transition:background .12s ease,color .12s ease}.eds-modnav-links a eds-icon{color:#475569;flex-shrink:0}.eds-modnav-links a:hover{background:#f8fafc;color:#0f172a}.eds-modnav-links a:hover eds-icon{color:#0f172a}.eds-modnav-links a.active{background:#f1f5f9;color:#0f172a;font-weight:600}.eds-modnav-links a.active eds-icon{color:#0f172a}.eds-modnav-links--practice{margin-bottom:12px}.eds-modnav-section{margin:18px 12px 8px;font-family:var(--eds-font-inter);font-size:13px;font-weight:600;letter-spacing:normal;text-transform:none;color:var(--eds-text-table-header, #4d5573)}.eds-modnav-label{flex:1;min-width:0}\n"] }]
|
|
102
|
+
}] });
|
|
103
|
+
|
|
104
|
+
class EdsAppShellComponent {
|
|
105
|
+
constructor() {
|
|
106
|
+
/** EHR embed: false (default). Standalone Voice Hub: set showModuleNav: true. */
|
|
107
|
+
this.showModuleNav = !!inject(VOICE_RECEPTIONIST_CONFIG).showModuleNav;
|
|
108
|
+
}
|
|
109
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EdsAppShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
110
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: EdsAppShellComponent, isStandalone: true, selector: "eds-app-shell", ngImport: i0, template: "<div class=\"eds-layout\">\n @if (showModuleNav) {\n <eds-module-nav />\n }\n <div class=\"eds-main\">\n <div class=\"eds-content\">\n <router-outlet />\n </div>\n </div>\n <app-toast-container />\n</div>\n", styles: [":host{display:block}.eds-layout{display:flex;min-height:100vh;background:var(--eds-surface-l1);font-family:var(--eds-font-inter, \"Inter\", sans-serif);font-size:var(--eds-font-size-base, 13px);font-weight:var(--eds-font-weight-regular, 400);color:var(--eds-text-primary, #41464c)}.eds-main{flex:1;min-width:0;display:flex;flex-direction:column}.eds-content{flex:1;overflow:auto}\n"], dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: EdsModuleNavComponent, selector: "eds-module-nav" }, { kind: "component", type: ToastContainerComponent, selector: "app-toast-container" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
111
|
+
}
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EdsAppShellComponent, decorators: [{
|
|
113
|
+
type: Component,
|
|
114
|
+
args: [{ selector: 'eds-app-shell', imports: [RouterOutlet, EdsModuleNavComponent, ToastContainerComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"eds-layout\">\n @if (showModuleNav) {\n <eds-module-nav />\n }\n <div class=\"eds-main\">\n <div class=\"eds-content\">\n <router-outlet />\n </div>\n </div>\n <app-toast-container />\n</div>\n", styles: [":host{display:block}.eds-layout{display:flex;min-height:100vh;background:var(--eds-surface-l1);font-family:var(--eds-font-inter, \"Inter\", sans-serif);font-size:var(--eds-font-size-base, 13px);font-weight:var(--eds-font-weight-regular, 400);color:var(--eds-text-primary, #41464c)}.eds-main{flex:1;min-width:0;display:flex;flex-direction:column}.eds-content{flex:1;overflow:auto}\n"] }]
|
|
115
|
+
}] });
|
|
116
|
+
|
|
117
|
+
/** Feature child routes (under the embed shell). */
|
|
118
|
+
const VOICE_RECEPTIONIST_FEATURE_ROUTES = [
|
|
119
|
+
{ path: '', pathMatch: 'full', redirectTo: 'dashboard' },
|
|
120
|
+
{
|
|
121
|
+
path: 'dashboard',
|
|
122
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-dashboard-page.component-CxbO0eDS.mjs').then((m) => m.DashboardPageComponent),
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
path: 'live',
|
|
126
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-live-calls-page.component-CaSDMxpV.mjs').then((m) => m.LiveCallsPageComponent),
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
path: 'live/:id',
|
|
130
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-live-monitor-page.component-Cy3ND-c-.mjs').then((m) => m.LiveMonitorPageComponent),
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
path: 'history',
|
|
134
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-call-history-page.component-DpwajEOE.mjs').then((m) => m.CallHistoryPageComponent),
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
path: 'history/:id',
|
|
138
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-call-history-detail-page.component-sYhM20CE.mjs').then((m) => m.CallHistoryDetailPageComponent),
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
path: 'activities',
|
|
142
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-activities-page.component-DT9UKvQO.mjs').then((m) => m.ActivitiesPageComponent),
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
path: 'tasks',
|
|
146
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-tasks-page.component-Bb9lPcYi.mjs').then((m) => m.TasksPageComponent),
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
path: 'analytics',
|
|
150
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-analytics-page.component-C5inEHJw.mjs').then((m) => m.AnalyticsPageComponent),
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
path: 'settings',
|
|
154
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-settings-page.component-Bok64X2q.mjs').then((m) => m.SettingsPageComponent),
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
path: 'settings/outbound-purposes',
|
|
158
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-outbound-purposes-page.component-fHVzpiVk.mjs').then((m) => m.OutboundPurposesPageComponent),
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
path: 'knowledge',
|
|
162
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-settings-page.component-Bok64X2q.mjs').then((m) => m.SettingsPageComponent),
|
|
163
|
+
data: { settingsTab: 'knowledge' },
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
path: 'wizard',
|
|
167
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-wizard-page.component-BZVlWLWh.mjs').then((m) => m.WizardPageComponent),
|
|
168
|
+
},
|
|
169
|
+
];
|
|
170
|
+
/**
|
|
171
|
+
* Lazy-loadable routes for EHR (and standalone hosts).
|
|
172
|
+
* Mount under a host path, e.g. `{ path: 'ai-receptionist', children: VOICE_RECEPTIONIST_ROUTES }`.
|
|
173
|
+
*/
|
|
174
|
+
const VOICE_RECEPTIONIST_ROUTES = [
|
|
175
|
+
{
|
|
176
|
+
path: '',
|
|
177
|
+
component: EdsAppShellComponent,
|
|
178
|
+
children: VOICE_RECEPTIONIST_FEATURE_ROUTES,
|
|
179
|
+
},
|
|
180
|
+
];
|
|
181
|
+
|
|
182
|
+
class EdsBadgeComponent {
|
|
183
|
+
constructor() {
|
|
184
|
+
this.tone = input('gray');
|
|
185
|
+
}
|
|
186
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EdsBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
187
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", type: EdsBadgeComponent, isStandalone: true, selector: "eds-badge", inputs: { tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<span class="eds-badge" [attr.data-tone]="tone()"><ng-content /></span>`, isInline: true, styles: [".eds-badge{display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border-radius:var(--eds-radius-sm);font-family:var(--eds-font-inter);font-size:12px;font-weight:500;line-height:1.4;white-space:nowrap}.eds-badge[data-tone=brand]{background:#3681f41f;color:var(--eds-brand-600)}.eds-badge[data-tone=pos]{background:#0abf521f;color:var(--eds-green-500)}.eds-badge[data-tone=notice]{background:#ffb90026;color:#b45309}.eds-badge[data-tone=neg]{background:#f037401f;color:var(--eds-red-500)}.eds-badge[data-tone=violet]{background:#8e51ff1f;color:var(--eds-violet-500)}.eds-badge[data-tone=gray]{background:var(--eds-gray-100);color:var(--eds-gray-600)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
188
|
+
}
|
|
189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: EdsBadgeComponent, decorators: [{
|
|
190
|
+
type: Component,
|
|
191
|
+
args: [{ selector: 'eds-badge', standalone: true, template: `<span class="eds-badge" [attr.data-tone]="tone()"><ng-content /></span>`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".eds-badge{display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border-radius:var(--eds-radius-sm);font-family:var(--eds-font-inter);font-size:12px;font-weight:500;line-height:1.4;white-space:nowrap}.eds-badge[data-tone=brand]{background:#3681f41f;color:var(--eds-brand-600)}.eds-badge[data-tone=pos]{background:#0abf521f;color:var(--eds-green-500)}.eds-badge[data-tone=notice]{background:#ffb90026;color:#b45309}.eds-badge[data-tone=neg]{background:#f037401f;color:var(--eds-red-500)}.eds-badge[data-tone=violet]{background:#8e51ff1f;color:var(--eds-violet-500)}.eds-badge[data-tone=gray]{background:var(--eds-gray-100);color:var(--eds-gray-600)}\n"] }]
|
|
192
|
+
}] });
|
|
193
|
+
|
|
194
|
+
/*
|
|
195
|
+
* Public API Surface of @edvak99/voice-receptionist-widget
|
|
196
|
+
*/
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Generated bundle index. Do not edit.
|
|
200
|
+
*/
|
|
201
|
+
|
|
202
|
+
export { EdsIconComponent as E, ToastService as T, VOICE_RECEPTIONIST_CONFIG as V, EdsBadgeComponent as a, EdsAppShellComponent as b, VOICE_RECEPTIONIST_FEATURE_ROUTES as c, VOICE_RECEPTIONIST_ROUTES as d, VOICE_RECEPTIONIST_SESSION as e, provideVoiceReceptionist as p };
|
|
203
|
+
//# sourceMappingURL=edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-BsBQIS_f.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-BsBQIS_f.mjs","sources":["../../../projects/voice-receptionist-widget/src/lib/config.ts","../../../projects/voice-receptionist-widget/src/lib/provide-voice-receptionist.ts","../../../projects/voice-receptionist-widget/src/lib/shared/toast.service.ts","../../../projects/voice-receptionist-widget/src/lib/shared/toast-container.component.ts","../../../projects/voice-receptionist-widget/src/lib/shared/toast-container.component.html","../../../projects/voice-receptionist-widget/src/lib/ui/eds-icon.component.ts","../../../projects/voice-receptionist-widget/src/lib/layout/eds-module-nav.component.ts","../../../projects/voice-receptionist-widget/src/lib/layout/eds-module-nav.component.html","../../../projects/voice-receptionist-widget/src/lib/layout/eds-app-shell.component.ts","../../../projects/voice-receptionist-widget/src/lib/layout/eds-app-shell.component.html","../../../projects/voice-receptionist-widget/src/lib/routes.ts","../../../projects/voice-receptionist-widget/src/lib/ui/eds-badge.component.ts","../../../projects/voice-receptionist-widget/src/public-api.ts","../../../projects/voice-receptionist-widget/src/edvak99-voice-receptionist-widget.ts"],"sourcesContent":["import { InjectionToken, Signal } from '@angular/core';\n\n/** Host-provided session for topbar / admin-only nav. */\nexport interface VoiceReceptionistSession {\n /** Current user email for display. */\n readonly email: Signal<string | null>;\n isAdmin(): boolean;\n logout(): void;\n}\n\nexport interface VoiceReceptionistConfig {\n /** Backend base URL (no trailing slash), e.g. https://api.example.com */\n apiBaseUrl: string;\n /** Use in-memory mock API (local demos). Default false. */\n useMockApi?: boolean;\n callLogsLimit?: number;\n liveCallsPollIntervalMs?: number;\n /**\n * Show Practice nav links (patients / providers / appointments / admin).\n * Enable in the standalone Voice Hub host; leave false for EHR embed.\n */\n includePracticeNav?: boolean;\n /**\n * Show the AI Receptionist side nav (Dashboard, Live Calls, …).\n * Default false for EHR embed (host owns primary nav). Standalone Voice Hub should set true.\n */\n showModuleNav?: boolean;\n}\n\nexport const VOICE_RECEPTIONIST_CONFIG = new InjectionToken<VoiceReceptionistConfig>(\n 'VOICE_RECEPTIONIST_CONFIG',\n);\n\nexport const VOICE_RECEPTIONIST_SESSION = new InjectionToken<VoiceReceptionistSession | null>(\n 'VOICE_RECEPTIONIST_SESSION',\n { factory: () => null },\n);\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\n\nimport {\n VOICE_RECEPTIONIST_CONFIG,\n VOICE_RECEPTIONIST_SESSION,\n VoiceReceptionistConfig,\n VoiceReceptionistSession,\n} from './config';\n\nexport interface ProvideVoiceReceptionistOptions extends VoiceReceptionistConfig {\n session?: VoiceReceptionistSession | null;\n}\n\nexport function provideVoiceReceptionist(\n options: ProvideVoiceReceptionistOptions,\n): EnvironmentProviders {\n const { session = null, ...config } = options;\n return makeEnvironmentProviders([\n { provide: VOICE_RECEPTIONIST_CONFIG, useValue: config },\n { provide: VOICE_RECEPTIONIST_SESSION, useValue: session },\n ]);\n}\n","import { Injectable, signal } from '@angular/core';\n\nexport interface ToastMessage {\n id: number;\n text: string;\n variant: 'info' | 'success' | 'error';\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ToastService {\n private nextId = 1;\n private timers = new Map<number, ReturnType<typeof setTimeout>>();\n\n private readonly _toasts = signal<ToastMessage[]>([]);\n readonly toasts = this._toasts.asReadonly();\n\n show(text: string, variant: ToastMessage['variant'] = 'info', durationMs = 3500): void {\n const id = this.nextId++;\n this._toasts.update((list) => [...list, { id, text, variant }]);\n const timer = setTimeout(() => this.dismiss(id), durationMs);\n this.timers.set(id, timer);\n }\n\n dismiss(id: number): void {\n const timer = this.timers.get(id);\n if (timer) {\n clearTimeout(timer);\n this.timers.delete(id);\n }\n this._toasts.update((list) => list.filter((t) => t.id !== id));\n }\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\n\nimport { ToastService } from './toast.service';\n\n@Component({\n selector: 'app-toast-container',\n standalone: true,\n templateUrl: './toast-container.component.html',\n styleUrl: './toast-container.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ToastContainerComponent {\n protected readonly toastService = inject(ToastService);\n}\n","<div class=\"toast-stack\" aria-live=\"polite\" aria-atomic=\"false\">\n @for (toast of toastService.toasts(); track toast.id) {\n <div class=\"toast\" [class]=\"'toast-' + toast.variant\" role=\"status\">\n <span class=\"toast-icon\" aria-hidden=\"true\">\n @switch (toast.variant) {\n @case ('success') {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n }\n @case ('error') {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"13\" />\n <line x1=\"12\" y1=\"16\" x2=\"12.01\" y2=\"16\" />\n </svg>\n }\n @default {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2.2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"12\" />\n <line x1=\"12\" y1=\"16\" x2=\"12.01\" y2=\"16\" />\n </svg>\n }\n }\n </span>\n <span class=\"toast-text\">{{ toast.text }}</span>\n <button\n type=\"button\"\n class=\"toast-dismiss\"\n (click)=\"toastService.dismiss(toast.id)\"\n aria-label=\"Dismiss notification\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\"\n stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </div>\n }\n</div>\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\n\n@Component({\n selector: 'eds-icon',\n standalone: true,\n template: `<span class=\"eds-icon\" [style.font-size.px]=\"size()\" [style.font-variation-settings]=\"variation()\">{{ name() }}</span>`,\n styles: `:host { display: inline-flex; line-height: 0; }`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsIconComponent {\n readonly name = input.required<string>();\n readonly size = input(20);\n readonly fill = input(0);\n readonly weight = input(400);\n\n protected readonly variation = computed(\n () => `'FILL' ${this.fill()}, 'wght' ${this.weight()}, 'GRAD' 0, 'opsz' ${this.size()}`,\n );\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\n\nimport {\n VOICE_RECEPTIONIST_CONFIG,\n VOICE_RECEPTIONIST_SESSION,\n} from '../config';\nimport { EdsIconComponent } from '../ui/eds-icon.component';\n\ninterface NavItem {\n id: string;\n label: string;\n icon: string;\n route: string;\n badge?: number;\n pulse?: boolean;\n adminOnly?: boolean;\n}\n\n@Component({\n selector: 'eds-module-nav',\n imports: [RouterLink, RouterLinkActive, EdsIconComponent],\n templateUrl: './eds-module-nav.component.html',\n styleUrl: './eds-module-nav.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsModuleNavComponent {\n private readonly config = inject(VOICE_RECEPTIONIST_CONFIG);\n private readonly session = inject(VOICE_RECEPTIONIST_SESSION);\n\n protected readonly includePracticeNav = !!this.config.includePracticeNav;\n\n protected readonly receptionistNav: NavItem[] = [\n { id: 'dashboard', label: 'Home', icon: 'home', route: 'dashboard' },\n { id: 'live', label: 'Live Calls', icon: 'phone_in_talk', route: 'live' },\n { id: 'history', label: 'Call History', icon: 'history', route: 'history' },\n { id: 'activities', label: 'Activities', icon: 'format_list_bulleted', route: 'activities' },\n { id: 'analytics', label: 'Analytics', icon: 'show_chart', route: 'analytics' },\n { id: 'settings', label: 'Agent Setting', icon: 'settings', route: 'settings' },\n ];\n\n protected readonly practiceNav: NavItem[] = [\n { id: 'patients', label: 'Patients', icon: 'groups', route: 'patients' },\n { id: 'providers', label: 'Providers', icon: 'medical_services', route: 'providers' },\n { id: 'appointments', label: 'Appointments', icon: 'calendar_month', route: 'appointments' },\n { id: 'admin', label: 'Admin', icon: 'admin_panel_settings', route: 'admin', adminOnly: true },\n ];\n\n protected showNavItem(item: NavItem): boolean {\n return !item.adminOnly || !!this.session?.isAdmin();\n }\n}\n","<nav class=\"eds-modnav\" aria-label=\"AI Receptionist\">\n <div class=\"eds-modnav-header\">\n <span class=\"eds-modnav-icon\" aria-hidden=\"true\">\n <eds-icon name=\"auto_awesome\" [size]=\"20\" [fill]=\"1\" />\n </span>\n <div class=\"eds-modnav-titles\">\n <span class=\"eds-modnav-name\">AI Receptionist</span>\n </div>\n </div>\n\n <div class=\"eds-modnav-links\">\n @for (item of receptionistNav; track item.id) {\n <a\n [routerLink]=\"item.route\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: item.route === 'dashboard' }\"\n >\n <eds-icon [name]=\"item.icon\" [size]=\"24\" />\n <span class=\"eds-modnav-label\">{{ item.label }}</span>\n </a>\n }\n </div>\n\n @if (includePracticeNav) {\n <p class=\"eds-modnav-section\">Practice</p>\n <div class=\"eds-modnav-links eds-modnav-links--practice\">\n @for (item of practiceNav; track item.id) {\n @if (showNavItem(item)) {\n <a [routerLink]=\"item.route\" routerLinkActive=\"active\">\n <eds-icon [name]=\"item.icon\" [size]=\"24\" />\n <span class=\"eds-modnav-label\">{{ item.label }}</span>\n </a>\n }\n }\n </div>\n }\n</nav>\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\n\nimport { VOICE_RECEPTIONIST_CONFIG } from '../config';\nimport { ToastContainerComponent } from '../shared/toast-container.component';\nimport { EdsModuleNavComponent } from './eds-module-nav.component';\n\n@Component({\n selector: 'eds-app-shell',\n imports: [RouterOutlet, EdsModuleNavComponent, ToastContainerComponent],\n templateUrl: './eds-app-shell.component.html',\n styleUrl: './eds-app-shell.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsAppShellComponent {\n /** EHR embed: false (default). Standalone Voice Hub: set showModuleNav: true. */\n protected readonly showModuleNav = !!inject(VOICE_RECEPTIONIST_CONFIG).showModuleNav;\n}\n","<div class=\"eds-layout\">\n @if (showModuleNav) {\n <eds-module-nav />\n }\n <div class=\"eds-main\">\n <div class=\"eds-content\">\n <router-outlet />\n </div>\n </div>\n <app-toast-container />\n</div>\n","import { Routes } from '@angular/router';\n\nimport { EdsAppShellComponent } from './layout/eds-app-shell.component';\n\n/** Feature child routes (under the embed shell). */\nexport const VOICE_RECEPTIONIST_FEATURE_ROUTES: Routes = [\n { path: '', pathMatch: 'full', redirectTo: 'dashboard' },\n {\n path: 'dashboard',\n loadComponent: () =>\n import('./pages/dashboard-page/dashboard-page.component').then(\n (m) => m.DashboardPageComponent,\n ),\n },\n {\n path: 'live',\n loadComponent: () =>\n import('./pages/live-calls-page/live-calls-page.component').then(\n (m) => m.LiveCallsPageComponent,\n ),\n },\n {\n path: 'live/:id',\n loadComponent: () =>\n import('./pages/live-monitor-page/live-monitor-page.component').then(\n (m) => m.LiveMonitorPageComponent,\n ),\n },\n {\n path: 'history',\n loadComponent: () =>\n import('./pages/call-history-page/call-history-page.component').then(\n (m) => m.CallHistoryPageComponent,\n ),\n },\n {\n path: 'history/:id',\n loadComponent: () =>\n import('./pages/call-history-detail-page/call-history-detail-page.component').then(\n (m) => m.CallHistoryDetailPageComponent,\n ),\n },\n {\n path: 'activities',\n loadComponent: () =>\n import('./pages/activities-page/activities-page.component').then(\n (m) => m.ActivitiesPageComponent,\n ),\n },\n {\n path: 'tasks',\n loadComponent: () =>\n import('./pages/tasks-page/tasks-page.component').then((m) => m.TasksPageComponent),\n },\n {\n path: 'analytics',\n loadComponent: () =>\n import('./pages/analytics-page/analytics-page.component').then(\n (m) => m.AnalyticsPageComponent,\n ),\n },\n {\n path: 'settings',\n loadComponent: () =>\n import('./pages/settings-page/settings-page.component').then(\n (m) => m.SettingsPageComponent,\n ),\n },\n {\n path: 'settings/outbound-purposes',\n loadComponent: () =>\n import('./pages/outbound-purposes-page/outbound-purposes-page.component').then(\n (m) => m.OutboundPurposesPageComponent,\n ),\n },\n {\n path: 'knowledge',\n loadComponent: () =>\n import('./pages/settings-page/settings-page.component').then(\n (m) => m.SettingsPageComponent,\n ),\n data: { settingsTab: 'knowledge' },\n },\n {\n path: 'wizard',\n loadComponent: () =>\n import('./pages/wizard-page/wizard-page.component').then((m) => m.WizardPageComponent),\n },\n];\n\n/**\n * Lazy-loadable routes for EHR (and standalone hosts).\n * Mount under a host path, e.g. `{ path: 'ai-receptionist', children: VOICE_RECEPTIONIST_ROUTES }`.\n */\nexport const VOICE_RECEPTIONIST_ROUTES: Routes = [\n {\n path: '',\n component: EdsAppShellComponent,\n children: VOICE_RECEPTIONIST_FEATURE_ROUTES,\n },\n];\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nexport type BadgeTone = 'brand' | 'pos' | 'notice' | 'neg' | 'violet' | 'gray';\n\n@Component({\n selector: 'eds-badge',\n standalone: true,\n template: `<span class=\"eds-badge\" [attr.data-tone]=\"tone()\"><ng-content /></span>`,\n styleUrl: './eds-badge.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class EdsBadgeComponent {\n readonly tone = input<BadgeTone>('gray');\n}\n","/*\n * Public API Surface of @edvak99/voice-receptionist-widget\n */\n\nexport {\n VOICE_RECEPTIONIST_CONFIG,\n VOICE_RECEPTIONIST_SESSION,\n type VoiceReceptionistConfig,\n type VoiceReceptionistSession,\n} from './lib/config';\nexport {\n provideVoiceReceptionist,\n type ProvideVoiceReceptionistOptions,\n} from './lib/provide-voice-receptionist';\nexport {\n VOICE_RECEPTIONIST_ROUTES,\n VOICE_RECEPTIONIST_FEATURE_ROUTES,\n} from './lib/routes';\nexport { EdsAppShellComponent } from './lib/layout/eds-app-shell.component';\nexport { ToastService, type ToastMessage } from './lib/shared/toast.service';\nexport { EdsBadgeComponent, type BadgeTone } from './lib/ui/eds-badge.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MA6Ba,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B;AAGtB,MAAM,0BAA0B,GAAG,IAAI,cAAc,CAC1D,4BAA4B,EAC5B,EAAE,OAAO,EAAE,MAAM,IAAI,EAAE;;ACtBnB,SAAU,wBAAwB,CACtC,OAAwC,EAAA;IAExC,MAAM,EAAE,OAAO,GAAG,IAAI,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO;AAC7C,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,EAAE,OAAO,EAAE,yBAAyB,EAAE,QAAQ,EAAE,MAAM,EAAE;AACxD,QAAA,EAAE,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE,OAAO,EAAE;AAC3D,KAAA,CAAC;AACJ;;MCZa,YAAY,CAAA;AADzB,IAAA,WAAA,GAAA;QAEU,IAAA,CAAA,MAAM,GAAG,CAAC;AACV,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,GAAG,EAAyC;AAEhD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAiB,EAAE,CAAC;AAC5C,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;AAiB5C,IAAA;IAfC,IAAI,CAAC,IAAY,EAAE,OAAA,GAAmC,MAAM,EAAE,UAAU,GAAG,IAAI,EAAA;AAC7E,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE;QACxB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAC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rategy, 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
|
|
@@ -0,0 +1 @@
|
|
|
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;AAQ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