@edvak99/voice-receptionist-widget 1.1.4 → 1.1.5
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-pQM1L7lO.mjs +307 -0
- package/fesm2022/edvak99-voice-receptionist-widget-activities-page.component-pQM1L7lO.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-ai-receptionist-api.service-48cifVPF.mjs → edvak99-voice-receptionist-widget-ai-receptionist-api.service-srM0jC46.mjs} +2 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-ai-receptionist-api.service-48cifVPF.mjs.map → edvak99-voice-receptionist-widget-ai-receptionist-api.service-srM0jC46.mjs.map} +1 -1
- package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-B6O-PZHz.mjs +278 -0
- package/fesm2022/edvak99-voice-receptionist-widget-analytics-page.component-B6O-PZHz.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-0rW-PPWM.mjs +417 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-detail-page.component-0rW-PPWM.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-Cec1ngRf.mjs +194 -0
- package/fesm2022/edvak99-voice-receptionist-widget-call-history-page.component-Cec1ngRf.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-call-recording-player.component-CgkRcFOl.mjs → edvak99-voice-receptionist-widget-call-recording-player.component-DGg_nI--.mjs} +5 -5
- package/fesm2022/edvak99-voice-receptionist-widget-call-recording-player.component-DGg_nI--.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-call-review.service-CIMcjGKX.mjs → edvak99-voice-receptionist-widget-call-review.service-j_XV5a8S.mjs} +2 -2
- package/fesm2022/{edvak99-voice-receptionist-widget-call-review.service-CIMcjGKX.mjs.map → edvak99-voice-receptionist-widget-call-review.service-j_XV5a8S.mjs.map} +1 -1
- package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-DD0tMAah.mjs +440 -0
- package/fesm2022/edvak99-voice-receptionist-widget-dashboard-page.component-DD0tMAah.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-dashboard-socket.service-BX91r74O.mjs → edvak99-voice-receptionist-widget-dashboard-socket.service-CsfNZeQ4.mjs} +3 -3
- package/fesm2022/{edvak99-voice-receptionist-widget-dashboard-socket.service-BX91r74O.mjs.map → edvak99-voice-receptionist-widget-dashboard-socket.service-CsfNZeQ4.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-button.component-CAfTt7zB.mjs +27 -0
- package/fesm2022/edvak99-voice-receptionist-widget-eds-button.component-CAfTt7zB.mjs.map +1 -0
- package/fesm2022/{edvak99-voice-receptionist-widget-eds-pulse-dot.component-BPY6xN7C.mjs → edvak99-voice-receptionist-widget-eds-pulse-dot.component-DymAM4YH.mjs} +6 -6
- package/fesm2022/edvak99-voice-receptionist-widget-eds-pulse-dot.component-DymAM4YH.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-JWqRMt9T.mjs +203 -0
- package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-JWqRMt9T.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-D5znr-Sx.mjs +81 -0
- package/fesm2022/edvak99-voice-receptionist-widget-live-calls-page.component-D5znr-Sx.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-1elUtWOw.mjs +1059 -0
- package/fesm2022/edvak99-voice-receptionist-widget-live-monitor-page.component-1elUtWOw.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-CwLxW1W9.mjs +268 -0
- package/fesm2022/edvak99-voice-receptionist-widget-outbound-purposes-page.component-CwLxW1W9.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-DAr4wuUk.mjs +968 -0
- package/fesm2022/edvak99-voice-receptionist-widget-settings-page.component-DAr4wuUk.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-tasks-page.component-BGSupnFa.mjs +317 -0
- package/fesm2022/edvak99-voice-receptionist-widget-tasks-page.component-BGSupnFa.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget-wizard-page.component-5iG9eQRi.mjs +47 -0
- package/fesm2022/edvak99-voice-receptionist-widget-wizard-page.component-5iG9eQRi.mjs.map +1 -0
- package/fesm2022/edvak99-voice-receptionist-widget.mjs +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/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.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
package/fesm2022/edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-JWqRMt9T.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=\"fixed bottom-6 right-6 z-[1100] flex max-w-[380px] flex-col gap-2.5 pointer-events-none\" aria-live=\"polite\" aria-atomic=\"false\">\n @for (toast of toastService.toasts(); track toast.id) {\n <div\n class=\"toast pointer-events-auto flex items-start gap-2.5 rounded-[var(--eds-radius-md)] border border-[var(--eds-color-border)] bg-[var(--eds-color-surface)] px-3.5 py-3 text-[13px] text-[var(--eds-color-text)] shadow-[0_6px_24px_rgba(20,30,50,0.12)]\"\n role=\"status\"\n >\n <span\n class=\"inline-flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-full\"\n [class]=\"toast.variant === 'success' ? 'bg-[var(--eds-color-success-soft)] text-[var(--eds-color-success)]' : toast.variant === 'error' ? 'bg-[var(--eds-color-danger-soft)] text-[var(--eds-color-danger)]' : 'bg-[var(--eds-color-primary-soft)] text-[var(--eds-color-primary)]'\"\n aria-hidden=\"true\"\n >\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=\"flex-1 leading-snug\">{{ toast.text }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded border-none bg-transparent text-[var(--eds-color-text-soft)] transition-colors duration-150 hover:bg-[var(--eds-color-surface-alt)] hover:text-[var(--eds-color-text)]\"\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: [".toast{animation:slide-in .16s ease}@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=\"fixed bottom-6 right-6 z-[1100] flex max-w-[380px] flex-col gap-2.5 pointer-events-none\" aria-live=\"polite\" aria-atomic=\"false\">\n @for (toast of toastService.toasts(); track toast.id) {\n <div\n class=\"toast pointer-events-auto flex items-start gap-2.5 rounded-[var(--eds-radius-md)] border border-[var(--eds-color-border)] bg-[var(--eds-color-surface)] px-3.5 py-3 text-[13px] text-[var(--eds-color-text)] shadow-[0_6px_24px_rgba(20,30,50,0.12)]\"\n role=\"status\"\n >\n <span\n class=\"inline-flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-full\"\n [class]=\"toast.variant === 'success' ? 'bg-[var(--eds-color-success-soft)] text-[var(--eds-color-success)]' : toast.variant === 'error' ? 'bg-[var(--eds-color-danger-soft)] text-[var(--eds-color-danger)]' : 'bg-[var(--eds-color-primary-soft)] text-[var(--eds-color-primary)]'\"\n aria-hidden=\"true\"\n >\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=\"flex-1 leading-snug\">{{ toast.text }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded border-none bg-transparent text-[var(--eds-color-text-soft)] transition-colors duration-150 hover:bg-[var(--eds-color-surface-alt)] hover:text-[var(--eds-color-text)]\"\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: [".toast{animation:slide-in .16s ease}@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", host: { classAttribute: "block shrink-0" }, ngImport: i0, template: "<nav\n class=\"flex h-screen min-h-screen w-[var(--eds-nav-width)] flex-col overflow-y-auto sticky top-0 border-r border-[var(--eds-border-default)] bg-white py-5 px-4\"\n aria-label=\"AI Receptionist\"\n>\n <div class=\"mb-4 flex items-center gap-3 border-b border-[var(--eds-border-default)] px-1 pb-4 pt-1\">\n <span class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-[10px] bg-violet-500/15 text-[var(--eds-violet-500)]\" aria-hidden=\"true\">\n <eds-icon name=\"auto_awesome\" [size]=\"20\" [fill]=\"1\" />\n </span>\n <div class=\"flex min-w-0 flex-col gap-0.5\">\n <span class=\"text-[15px] font-semibold leading-tight tracking-tight text-[var(--eds-text-primary)]\">AI Receptionist</span>\n </div>\n </div>\n\n <div class=\"flex flex-col gap-1\">\n @for (item of receptionistNav; track item.id) {\n <a\n class=\"group/link relative flex items-center gap-3 rounded-[10px] px-3 py-2.5 text-sm font-medium leading-tight text-slate-700 no-underline transition-colors duration-150 hover:bg-slate-50 hover:text-slate-900 [&.active]:bg-slate-100 [&.active]:font-semibold [&.active]:text-slate-900\"\n [routerLink]=\"item.route\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: item.route === 'dashboard' }\"\n >\n <eds-icon class=\"shrink-0 text-slate-600 group-hover/link:text-slate-900 group-[.active]/link:text-slate-900\" [name]=\"item.icon\" [size]=\"24\" />\n <span class=\"min-w-0 flex-1\">{{ item.label }}</span>\n </a>\n }\n </div>\n\n @if (includePracticeNav) {\n <p class=\"mx-3 mb-2 mt-4.5 text-sm font-semibold text-[var(--eds-text-table-header,#4d5573)]\">Practice</p>\n <div class=\"mb-3 flex flex-col gap-1\">\n @for (item of practiceNav; track item.id) {\n @if (showNavItem(item)) {\n <a\n class=\"group/link relative flex items-center gap-3 rounded-[10px] px-3 py-2.5 text-sm font-medium leading-tight text-slate-700 no-underline transition-colors duration-150 hover:bg-slate-50 hover:text-slate-900 [&.active]:bg-slate-100 [&.active]:font-semibold [&.active]:text-slate-900\"\n [routerLink]=\"item.route\"\n routerLinkActive=\"active\"\n >\n <eds-icon class=\"shrink-0 text-slate-600 group-hover/link:text-slate-900 group-[.active]/link:text-slate-900\" [name]=\"item.icon\" [size]=\"24\" />\n <span class=\"min-w-0 flex-1\">{{ item.label }}</span>\n </a>\n }\n }\n </div>\n }\n</nav>\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, host: { class: 'block shrink-0' }, template: "<nav\n class=\"flex h-screen min-h-screen w-[var(--eds-nav-width)] flex-col overflow-y-auto sticky top-0 border-r border-[var(--eds-border-default)] bg-white py-5 px-4\"\n aria-label=\"AI Receptionist\"\n>\n <div class=\"mb-4 flex items-center gap-3 border-b border-[var(--eds-border-default)] px-1 pb-4 pt-1\">\n <span class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-[10px] bg-violet-500/15 text-[var(--eds-violet-500)]\" aria-hidden=\"true\">\n <eds-icon name=\"auto_awesome\" [size]=\"20\" [fill]=\"1\" />\n </span>\n <div class=\"flex min-w-0 flex-col gap-0.5\">\n <span class=\"text-[15px] font-semibold leading-tight tracking-tight text-[var(--eds-text-primary)]\">AI Receptionist</span>\n </div>\n </div>\n\n <div class=\"flex flex-col gap-1\">\n @for (item of receptionistNav; track item.id) {\n <a\n class=\"group/link relative flex items-center gap-3 rounded-[10px] px-3 py-2.5 text-sm font-medium leading-tight text-slate-700 no-underline transition-colors duration-150 hover:bg-slate-50 hover:text-slate-900 [&.active]:bg-slate-100 [&.active]:font-semibold [&.active]:text-slate-900\"\n [routerLink]=\"item.route\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: item.route === 'dashboard' }\"\n >\n <eds-icon class=\"shrink-0 text-slate-600 group-hover/link:text-slate-900 group-[.active]/link:text-slate-900\" [name]=\"item.icon\" [size]=\"24\" />\n <span class=\"min-w-0 flex-1\">{{ item.label }}</span>\n </a>\n }\n </div>\n\n @if (includePracticeNav) {\n <p class=\"mx-3 mb-2 mt-4.5 text-sm font-semibold text-[var(--eds-text-table-header,#4d5573)]\">Practice</p>\n <div class=\"mb-3 flex flex-col gap-1\">\n @for (item of practiceNav; track item.id) {\n @if (showNavItem(item)) {\n <a\n class=\"group/link relative flex items-center gap-3 rounded-[10px] px-3 py-2.5 text-sm font-medium leading-tight text-slate-700 no-underline transition-colors duration-150 hover:bg-slate-50 hover:text-slate-900 [&.active]:bg-slate-100 [&.active]:font-semibold [&.active]:text-slate-900\"\n [routerLink]=\"item.route\"\n routerLinkActive=\"active\"\n >\n <eds-icon class=\"shrink-0 text-slate-600 group-hover/link:text-slate-900 group-[.active]/link:text-slate-900\" [name]=\"item.icon\" [size]=\"24\" />\n <span class=\"min-w-0 flex-1\">{{ item.label }}</span>\n </a>\n }\n }\n </div>\n }\n</nav>\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 flex min-h-screen\">\n @if (showModuleNav) {\n <eds-module-nav />\n }\n <div class=\"eds-main flex min-w-0 flex-1 flex-col\">\n <div class=\"eds-content flex-1 overflow-auto\">\n <router-outlet />\n </div>\n </div>\n <app-toast-container />\n</div>\n", styles: [":host{display:block}.eds-layout{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)}\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 flex min-h-screen\">\n @if (showModuleNav) {\n <eds-module-nav />\n }\n <div class=\"eds-main flex min-w-0 flex-1 flex-col\">\n <div class=\"eds-content flex-1 overflow-auto\">\n <router-outlet />\n </div>\n </div>\n <app-toast-container />\n</div>\n", styles: [":host{display:block}.eds-layout{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)}\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-DD0tMAah.mjs').then((m) => m.DashboardPageComponent),
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
path: 'live',
|
|
126
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-live-calls-page.component-D5znr-Sx.mjs').then((m) => m.LiveCallsPageComponent),
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
path: 'live/:id',
|
|
130
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-live-monitor-page.component-1elUtWOw.mjs').then((m) => m.LiveMonitorPageComponent),
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
path: 'history',
|
|
134
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-call-history-page.component-Cec1ngRf.mjs').then((m) => m.CallHistoryPageComponent),
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
path: 'history/:id',
|
|
138
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-call-history-detail-page.component-0rW-PPWM.mjs').then((m) => m.CallHistoryDetailPageComponent),
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
path: 'activities',
|
|
142
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-activities-page.component-pQM1L7lO.mjs').then((m) => m.ActivitiesPageComponent),
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
path: 'tasks',
|
|
146
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-tasks-page.component-BGSupnFa.mjs').then((m) => m.TasksPageComponent),
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
path: 'analytics',
|
|
150
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-analytics-page.component-B6O-PZHz.mjs').then((m) => m.AnalyticsPageComponent),
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
path: 'settings',
|
|
154
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-settings-page.component-DAr4wuUk.mjs').then((m) => m.SettingsPageComponent),
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
path: 'settings/outbound-purposes',
|
|
158
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-outbound-purposes-page.component-CwLxW1W9.mjs').then((m) => m.OutboundPurposesPageComponent),
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
path: 'knowledge',
|
|
162
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-settings-page.component-DAr4wuUk.mjs').then((m) => m.SettingsPageComponent),
|
|
163
|
+
data: { settingsTab: 'knowledge' },
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
path: 'wizard',
|
|
167
|
+
loadComponent: () => import('./edvak99-voice-receptionist-widget-wizard-page.component-5iG9eQRi.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 inline-flex items-center gap-1.5 py-0.5 px-2" [attr.data-tone]="tone()"><ng-content /></span>`, isInline: true, styles: [".eds-badge{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 inline-flex items-center gap-1.5 py-0.5 px-2" [attr.data-tone]="tone()"><ng-content /></span>`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".eds-badge{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-JWqRMt9T.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-JWqRMt9T.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=\"fixed bottom-6 right-6 z-[1100] flex max-w-[380px] flex-col gap-2.5 pointer-events-none\" aria-live=\"polite\" aria-atomic=\"false\">\n @for (toast of toastService.toasts(); track toast.id) {\n <div\n class=\"toast pointer-events-auto flex items-start gap-2.5 rounded-[var(--eds-radius-md)] border border-[var(--eds-color-border)] bg-[var(--eds-color-surface)] px-3.5 py-3 text-[13px] text-[var(--eds-color-text)] shadow-[0_6px_24px_rgba(20,30,50,0.12)]\"\n role=\"status\"\n >\n <span\n class=\"inline-flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-full\"\n [class]=\"toast.variant === 'success' ? 'bg-[var(--eds-color-success-soft)] text-[var(--eds-color-success)]' : toast.variant === 'error' ? 'bg-[var(--eds-color-danger-soft)] text-[var(--eds-color-danger)]' : 'bg-[var(--eds-color-primary-soft)] text-[var(--eds-color-primary)]'\"\n aria-hidden=\"true\"\n >\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=\"flex-1 leading-snug\">{{ toast.text }}</span>\n <button\n type=\"button\"\n class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded border-none bg-transparent text-[var(--eds-color-text-soft)] transition-colors duration-150 hover:bg-[var(--eds-color-surface-alt)] hover:text-[var(--eds-color-text)]\"\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 changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'block shrink-0' },\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\n class=\"flex h-screen min-h-screen w-[var(--eds-nav-width)] flex-col overflow-y-auto sticky top-0 border-r border-[var(--eds-border-default)] bg-white py-5 px-4\"\n aria-label=\"AI Receptionist\"\n>\n <div class=\"mb-4 flex items-center gap-3 border-b border-[var(--eds-border-default)] px-1 pb-4 pt-1\">\n <span class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-[10px] bg-violet-500/15 text-[var(--eds-violet-500)]\" aria-hidden=\"true\">\n <eds-icon name=\"auto_awesome\" [size]=\"20\" [fill]=\"1\" />\n </span>\n <div class=\"flex min-w-0 flex-col gap-0.5\">\n <span class=\"text-[15px] font-semibold leading-tight tracking-tight text-[var(--eds-text-primary)]\">AI Receptionist</span>\n </div>\n </div>\n\n <div class=\"flex flex-col gap-1\">\n @for (item of receptionistNav; track item.id) {\n <a\n class=\"group/link relative flex items-center gap-3 rounded-[10px] px-3 py-2.5 text-sm font-medium leading-tight text-slate-700 no-underline transition-colors duration-150 hover:bg-slate-50 hover:text-slate-900 [&.active]:bg-slate-100 [&.active]:font-semibold [&.active]:text-slate-900\"\n [routerLink]=\"item.route\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: item.route === 'dashboard' }\"\n >\n <eds-icon class=\"shrink-0 text-slate-600 group-hover/link:text-slate-900 group-[.active]/link:text-slate-900\" [name]=\"item.icon\" [size]=\"24\" />\n <span class=\"min-w-0 flex-1\">{{ item.label }}</span>\n </a>\n }\n </div>\n\n @if (includePracticeNav) {\n <p class=\"mx-3 mb-2 mt-4.5 text-sm font-semibold text-[var(--eds-text-table-header,#4d5573)]\">Practice</p>\n <div class=\"mb-3 flex flex-col gap-1\">\n @for (item of practiceNav; track item.id) {\n @if (showNavItem(item)) {\n <a\n class=\"group/link relative flex items-center gap-3 rounded-[10px] px-3 py-2.5 text-sm font-medium leading-tight text-slate-700 no-underline transition-colors duration-150 hover:bg-slate-50 hover:text-slate-900 [&.active]:bg-slate-100 [&.active]:font-semibold [&.active]:text-slate-900\"\n [routerLink]=\"item.route\"\n routerLinkActive=\"active\"\n >\n <eds-icon class=\"shrink-0 text-slate-600 group-hover/link:text-slate-900 group-[.active]/link:text-slate-900\" [name]=\"item.icon\" [size]=\"24\" />\n <span class=\"min-w-0 flex-1\">{{ 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 flex min-h-screen\">\n @if (showModuleNav) {\n <eds-module-nav />\n }\n <div class=\"eds-main flex min-w-0 flex-1 flex-col\">\n <div class=\"eds-content flex-1 overflow-auto\">\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 inline-flex items-center gap-1.5 py-0.5 px-2\" [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,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AS,EAAE,oBAAoB;AAC/B,QAAA,QAAQ,EAAE,iCAAiC;AAC5C,KAAA;;;MCxFU,iBAAiB,CAAA;AAP9B,IAAA,WAAA,GAAA;AAQW,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAY,MAAM,CAAC;AACzC,IAAA;+GAFY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,iBAAiB,sMAJlB,CAAA,oHAAA,CAAsH,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,slBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAIrH,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,cACT,IAAI,EAAA,QAAA,EACN,sHAAsH,EAAA,eAAA,EAE/G,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,slBAAA,CAAA,EAAA;;;ACTjD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,81 @@
|
|
|
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-DymAM4YH.mjs';
|
|
5
|
+
import { c as callerMetaLine, d as ageFromDob, i as isUnknownCaller } from './edvak99-voice-receptionist-widget-ai-receptionist-api.service-srM0jC46.mjs';
|
|
6
|
+
import { E as EdsAvatarComponent } from './edvak99-voice-receptionist-widget-eds-avatar.component-BJs_TH8X.mjs';
|
|
7
|
+
import { E as EdsIconComponent } from './edvak99-voice-receptionist-widget-edvak99-voice-receptionist-widget-JWqRMt9T.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=\"mb-5 flex items-center justify-between\">\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=\"eds-body-sm mb-3 text-sm text-red-600\" 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=\"flex w-1/2 min-w-80 max-w-1/2 flex-col gap-2.5\">\n @for (call of calls(); track call.id) {\n <button\n type=\"button\"\n class=\"flex w-full cursor-pointer items-center gap-3 rounded-xl border border-zinc-200 bg-white px-4 py-3.5 text-left transition hover:border-slate-300 hover:shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600 focus-visible:outline-offset-2\"\n (click)=\"openMonitor(call.id)\"\n >\n <eds-avatar\n class=\"live-calls-page__avatar shrink-0\"\n [initials]=\"avatarInitials(call)\"\n [tone]=\"avatarTone(call)\"\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <span class=\"text-sm font-bold text-zinc-700\">{{ displayName(call) }}</span>\n <span class=\"text-xs text-zinc-600\">{{ displayMeta(call) }}</span>\n </div>\n <span\n class=\"live-calls-page__sentiment shrink-0 text-xs font-semibold capitalize whitespace-nowrap text-zinc-600\"\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 flex flex-col items-center gap-2 px-6 py-12 text-center text-zinc-500 shadow-sm\" role=\"status\">\n <eds-icon [name]=\"state.icon\" [size]=\"32\" />\n <p class=\"eds-h2 mb-2 text-zinc-800\">{{ state.title }}</p>\n <p class=\"eds-body-sm m-0 max-w-md\">{{ state.detail }}</p>\n </div>\n }\n }\n </div>\n }\n</div>\n", styles: [".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__sentiment[data-sentiment=calm]{color:#16a34a}.live-calls-page__sentiment[data-sentiment=neutral]{color:#71717a}.live-calls-page__sentiment[data-sentiment=frustrated]{color:#d97706}.live-calls-page__sentiment[data-sentiment=urgent]{color:#dc2626}\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=\"mb-5 flex items-center justify-between\">\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=\"eds-body-sm mb-3 text-sm text-red-600\" 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=\"flex w-1/2 min-w-80 max-w-1/2 flex-col gap-2.5\">\n @for (call of calls(); track call.id) {\n <button\n type=\"button\"\n class=\"flex w-full cursor-pointer items-center gap-3 rounded-xl border border-zinc-200 bg-white px-4 py-3.5 text-left transition hover:border-slate-300 hover:shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600 focus-visible:outline-offset-2\"\n (click)=\"openMonitor(call.id)\"\n >\n <eds-avatar\n class=\"live-calls-page__avatar shrink-0\"\n [initials]=\"avatarInitials(call)\"\n [tone]=\"avatarTone(call)\"\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <span class=\"text-sm font-bold text-zinc-700\">{{ displayName(call) }}</span>\n <span class=\"text-xs text-zinc-600\">{{ displayMeta(call) }}</span>\n </div>\n <span\n class=\"live-calls-page__sentiment shrink-0 text-xs font-semibold capitalize whitespace-nowrap text-zinc-600\"\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 flex flex-col items-center gap-2 px-6 py-12 text-center text-zinc-500 shadow-sm\" role=\"status\">\n <eds-icon [name]=\"state.icon\" [size]=\"32\" />\n <p class=\"eds-h2 mb-2 text-zinc-800\">{{ state.title }}</p>\n <p class=\"eds-body-sm m-0 max-w-md\">{{ state.detail }}</p>\n </div>\n }\n }\n </div>\n }\n</div>\n", styles: [".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__sentiment[data-sentiment=calm]{color:#16a34a}.live-calls-page__sentiment[data-sentiment=neutral]{color:#71717a}.live-calls-page__sentiment[data-sentiment=frustrated]{color:#d97706}.live-calls-page__sentiment[data-sentiment=urgent]{color:#dc2626}\n"] }]
|
|
78
|
+
}] });
|
|
79
|
+
|
|
80
|
+
export { LiveCallsPageComponent };
|
|
81
|
+
//# sourceMappingURL=edvak99-voice-receptionist-widget-live-calls-page.component-D5znr-Sx.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edvak99-voice-receptionist-widget-live-calls-page.component-D5znr-Sx.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=\"mb-5 flex items-center justify-between\">\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=\"eds-body-sm mb-3 text-sm text-red-600\" role=\"alert\">{{ error() }}</p>\n }\n\n @if (loading()) {\n <p class=\"eds-body-sm\">Loading live calls…</p>\n } @else {\n <div class=\"flex w-1/2 min-w-80 max-w-1/2 flex-col gap-2.5\">\n @for (call of calls(); track call.id) {\n <button\n type=\"button\"\n class=\"flex w-full cursor-pointer items-center gap-3 rounded-xl border border-zinc-200 bg-white px-4 py-3.5 text-left transition hover:border-slate-300 hover:shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-600 focus-visible:outline-offset-2\"\n (click)=\"openMonitor(call.id)\"\n >\n <eds-avatar\n class=\"live-calls-page__avatar shrink-0\"\n [initials]=\"avatarInitials(call)\"\n [tone]=\"avatarTone(call)\"\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <span class=\"text-sm font-bold text-zinc-700\">{{ displayName(call) }}</span>\n <span class=\"text-xs text-zinc-600\">{{ displayMeta(call) }}</span>\n </div>\n <span\n class=\"live-calls-page__sentiment shrink-0 text-xs font-semibold capitalize whitespace-nowrap text-zinc-600\"\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 flex flex-col items-center gap-2 px-6 py-12 text-center text-zinc-500 shadow-sm\" role=\"status\">\n <eds-icon [name]=\"state.icon\" [size]=\"32\" />\n <p class=\"eds-h2 mb-2 text-zinc-800\">{{ state.title }}</p>\n <p class=\"eds-body-sm m-0 max-w-md\">{{ 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,KAA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