@memberjunction/ng-dashboards 5.42.0 → 5.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/AI/components/analytics/ai-analytics-resource.component.d.ts.map +1 -1
  2. package/dist/AI/components/analytics/ai-analytics-resource.component.js +16 -5
  3. package/dist/AI/components/analytics/ai-analytics-resource.component.js.map +1 -1
  4. package/dist/AI/components/analytics/realtime/realtime-transcripts-data.d.ts +59 -0
  5. package/dist/AI/components/analytics/realtime/realtime-transcripts-data.d.ts.map +1 -0
  6. package/dist/AI/components/analytics/realtime/realtime-transcripts-data.js +150 -0
  7. package/dist/AI/components/analytics/realtime/realtime-transcripts-data.js.map +1 -0
  8. package/dist/AI/components/analytics/realtime/realtime-transcripts.component.d.ts +28 -0
  9. package/dist/AI/components/analytics/realtime/realtime-transcripts.component.d.ts.map +1 -0
  10. package/dist/AI/components/analytics/realtime/realtime-transcripts.component.js +235 -0
  11. package/dist/AI/components/analytics/realtime/realtime-transcripts.component.js.map +1 -0
  12. package/dist/AI/index.d.ts +2 -0
  13. package/dist/AI/index.d.ts.map +1 -1
  14. package/dist/AI/index.js +3 -0
  15. package/dist/AI/index.js.map +1 -1
  16. package/dist/BulkOperations/bulk-operations-container.component.d.ts +17 -0
  17. package/dist/BulkOperations/bulk-operations-container.component.d.ts.map +1 -0
  18. package/dist/BulkOperations/bulk-operations-container.component.js +70 -0
  19. package/dist/BulkOperations/bulk-operations-container.component.js.map +1 -0
  20. package/dist/BulkOperations/bulk-operations-operations.component.d.ts +16 -0
  21. package/dist/BulkOperations/bulk-operations-operations.component.d.ts.map +1 -0
  22. package/dist/BulkOperations/bulk-operations-operations.component.js +42 -0
  23. package/dist/BulkOperations/bulk-operations-operations.component.js.map +1 -0
  24. package/dist/BulkOperations/bulk-operations-run-history.component.d.ts +16 -0
  25. package/dist/BulkOperations/bulk-operations-run-history.component.d.ts.map +1 -0
  26. package/dist/BulkOperations/bulk-operations-run-history.component.js +42 -0
  27. package/dist/BulkOperations/bulk-operations-run-history.component.js.map +1 -0
  28. package/dist/ai-dashboards.module.d.ts +20 -19
  29. package/dist/ai-dashboards.module.d.ts.map +1 -1
  30. package/dist/ai-dashboards.module.js +6 -0
  31. package/dist/ai-dashboards.module.js.map +1 -1
  32. package/dist/core-dashboards.module.d.ts +54 -50
  33. package/dist/core-dashboards.module.d.ts.map +1 -1
  34. package/dist/core-dashboards.module.js +24 -2
  35. package/dist/core-dashboards.module.js.map +1 -1
  36. package/package.json +56 -55
@@ -1 +1 @@
1
- {"version":3,"file":"ai-analytics-resource.component.d.ts","sourceRoot":"","sources":["../../../../src/AI/components/analytics/ai-analytics-resource.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAgC,MAAM,EAAE,SAAS,EAAqB,MAAM,eAAe,CAAC;AAGnG,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAkB,MAAM,+BAA+B,CAAC;AAE7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAA0B,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAE7G,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;;AAEtG,UAAU,OAAO;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qBA6Na,4BAA6B,SAAQ,qBAAsB,YAAW,MAAM,EAAE,SAAS;IAChG,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAkC;IACpE,OAAO,CAAC,sBAAsB,CAAuB;IACrD,UAAmB,QAAQ,gBAAuB;IAClD,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,C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F;IACpF,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAI7C,6EAA6E;IACtE,eAAe,IAAI,IAAI;IAM9B,OAAO,CAAC,qBAAqB;YAOf,gBAAgB;IAqB9B,OAAO,CAAC,gBAAgB;YAMV,mBAAmB;yCAzcxB,4BAA4B;2CAA5B,4BAA4B;CAkfxC;AAED,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C"}
1
+ {"version":3,"file":"ai-analytics-resource.component.d.ts","sourceRoot":"","sources":["../../../../src/AI/components/analytics/ai-analytics-resource.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAgC,MAAM,EAAE,SAAS,EAAqB,MAAM,eAAe,CAAC;AAGnG,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAkB,MAAM,+BAA+B,CAAC;AAE7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAA0B,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAE7G,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;;AAEtG,UAAU,OAAO;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,qBAgOa,4BAA6B,SAAQ,qBAAsB,YAAW,MAAM,EAAE,SAAS;IAChG,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAkC;IACpE,OAAO,CAAC,sBAAsB,CAAuB;IACrD,UAAmB,QAAQ,gBAAuB;IAClD,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,GAAG,CAA6B;IAET,OAAO,CAAC,gBAAgB,CAAC,CAAqC;IACpE,OAAO,CAAC,UAAU,CAAC,CAA+B;IAE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B,OAAO,CAAC,qBAAqB;YAOf,gBAAgB;IAqB9B,OAAO,CAAC,gBAAgB;YAMV,mBAAmB;yCA7cxB,4BAA4B;2CAA5B,4BAA4B;CAsfxC;AAED,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C"}
@@ -34,6 +34,7 @@ import * as i8 from "./usage-patterns/usage-patterns.component";
34
34
  import * as i9 from "./realtime/realtime-overview.component";
35
35
  import * as i10 from "./realtime/realtime-sessions.component";
36
36
  import * as i11 from "./realtime/realtime-management.component";
37
+ import * as i12 from "./realtime/realtime-transcripts.component";
37
38
  const _c0 = ["executiveSummary"];
38
39
  const _c1 = ["promptRuns"];
39
40
  const _forTrack0 = ($index, $item) => $item.value;
@@ -158,6 +159,9 @@ function AIAnalyticsResourceComponent_Case_22_Template(rf, ctx) { if (rf & 1) {
158
159
  const ctx_r1 = i0.ɵɵnextContext();
159
160
  i0.ɵɵproperty("TimeRange", ctx_r1.CurrentTimeRange);
160
161
  } }
162
+ function AIAnalyticsResourceComponent_Case_23_Template(rf, ctx) { if (rf & 1) {
163
+ i0.ɵɵelement(0, "app-analytics-realtime-transcripts");
164
+ } }
161
165
  let AIAnalyticsResourceComponent = class AIAnalyticsResourceComponent extends BaseResourceComponent {
162
166
  USER_SETTINGS_KEY = 'AI.Analytics.UserPreferences';
163
167
  settingsPersistSubject = new Subject();
@@ -239,6 +243,8 @@ let AIAnalyticsResourceComponent = class AIAnalyticsResourceComponent extends Ba
239
243
  // sub-day ranges are dropped.
240
244
  case 'realtime-overview':
241
245
  case 'realtime-sessions':
246
+ // Voice Transcripts is a self-contained browser (it loads all rooms; no shared filters apply).
247
+ case 'realtime-transcripts':
242
248
  // Realtime management owns its sub-tab rail + per-surface filters
243
249
  // internally; only the time-range chips come from the shared chrome
244
250
  // (it windows session history daily, so sub-day ranges are dropped).
@@ -453,6 +459,8 @@ let AIAnalyticsResourceComponent = class AIAnalyticsResourceComponent extends Ba
453
459
  Description: 'Every long-lived agent session — live calls, idle holds, and closed history' },
454
460
  { Label: 'Realtime Management', Icon: 'fa-solid fa-satellite-dish', Key: 'realtime-management',
455
461
  Description: 'Manage the realtime + bridge surface — live sessions, bridge providers, agent identities, channels, co-agents, history, and metrics' },
462
+ { Label: 'Voice Transcripts', Icon: 'fa-solid fa-comments', Key: 'realtime-transcripts',
463
+ Description: 'Browse recorded meeting-room transcripts — diarized, per-speaker, with each utterance attributed' },
456
464
  ];
457
465
  /**
458
466
  * Active section metadata — drives <mj-page-header-interior> Title +
@@ -623,7 +631,7 @@ let AIAnalyticsResourceComponent = class AIAnalyticsResourceComponent extends Ba
623
631
  let _t;
624
632
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.executiveSummary = _t.first);
625
633
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.promptRuns = _t.first);
626
- } }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 23, vars: 11, consts: [["executiveSummary", ""], ["promptRuns", ""], ["Title", "AI Analytics", "Icon", "fa-solid fa-chart-line", "Subtitle", "Performance, cost, and usage analytics"], [1, "analytics-shell", 3, "Padding"], ["MobileTitle", "Analytics", 3, "ItemClicked", "Sections", "ActiveId"], [3, "Title", "Subtitle"], ["actions", ""], [3, "ActiveCount", "ShowClearAll"], ["mjButton", "", "variant", "secondary", "size", "sm", 3, "toggleable", "selected"], ["mjButton", "", "variant", "secondary", "size", "sm"], ["toolbar", "", 1, "time-range-chips"], [3, "Padding"], [1, "analytics-content"], [3, "TimeRange", "Filters"], [3, "TimeRange", "SortBy", "SelectedVendor"], [3, "TimeRange"], [3, "ClearAllRequested", "ActiveCount", "ShowClearAll"], [3, "ValuesChange", "Reset", "Fields", "Values"], ["mjButton", "", "variant", "secondary", "size", "sm", 3, "selectedChange", "toggleable", "selected"], [1, "fa-solid", "fa-code-compare"], [1, "mj-action-label"], ["mjButton", "", "variant", "secondary", "size", "sm", 3, "click"], [1, "fa-solid", "fa-download"], [3, "Label", "Active"], [3, "Clicked", "Label", "Active"], [3, "SectionNavigate", "TimeRange", "Filters"], [3, "SectionNavigate", "TimeRange"]], template: function AIAnalyticsResourceComponent_Template(rf, ctx) { if (rf & 1) {
634
+ } }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 24, vars: 11, consts: [["executiveSummary", ""], ["promptRuns", ""], ["Title", "AI Analytics", "Icon", "fa-solid fa-chart-line", "Subtitle", "Performance, cost, and usage analytics"], [1, "analytics-shell", 3, "Padding"], ["MobileTitle", "Analytics", 3, "ItemClicked", "Sections", "ActiveId"], [3, "Title", "Subtitle"], ["actions", ""], [3, "ActiveCount", "ShowClearAll"], ["mjButton", "", "variant", "secondary", "size", "sm", 3, "toggleable", "selected"], ["mjButton", "", "variant", "secondary", "size", "sm"], ["toolbar", "", 1, "time-range-chips"], [3, "Padding"], [1, "analytics-content"], [3, "TimeRange", "Filters"], [3, "TimeRange", "SortBy", "SelectedVendor"], [3, "TimeRange"], [3, "ClearAllRequested", "ActiveCount", "ShowClearAll"], [3, "ValuesChange", "Reset", "Fields", "Values"], ["mjButton", "", "variant", "secondary", "size", "sm", 3, "selectedChange", "toggleable", "selected"], [1, "fa-solid", "fa-code-compare"], [1, "mj-action-label"], ["mjButton", "", "variant", "secondary", "size", "sm", 3, "click"], [1, "fa-solid", "fa-download"], [3, "Label", "Active"], [3, "Clicked", "Label", "Active"], [3, "SectionNavigate", "TimeRange", "Filters"], [3, "SectionNavigate", "TimeRange"]], template: function AIAnalyticsResourceComponent_Template(rf, ctx) { if (rf & 1) {
627
635
  i0.ɵɵelementStart(0, "mj-page-layout");
628
636
  i0.ɵɵelement(1, "mj-page-header", 2);
629
637
  i0.ɵɵelementStart(2, "mj-page-body", 3)(3, "mj-left-nav", 4);
@@ -637,7 +645,7 @@ let AIAnalyticsResourceComponent = class AIAnalyticsResourceComponent extends Ba
637
645
  i0.ɵɵconditionalCreate(10, AIAnalyticsResourceComponent_Conditional_10_Template, 3, 0, "div", 10);
638
646
  i0.ɵɵelementEnd();
639
647
  i0.ɵɵelementStart(11, "mj-page-body-interior", 11)(12, "div", 12);
640
- i0.ɵɵconditionalCreate(13, AIAnalyticsResourceComponent_Case_13_Template, 2, 2, "app-analytics-executive-summary", 13)(14, AIAnalyticsResourceComponent_Case_14_Template, 2, 2, "app-analytics-prompt-runs", 13)(15, AIAnalyticsResourceComponent_Case_15_Template, 1, 2, "app-analytics-agent-runs", 13)(16, AIAnalyticsResourceComponent_Case_16_Template, 1, 3, "app-analytics-model-performance", 14)(17, AIAnalyticsResourceComponent_Case_17_Template, 1, 2, "app-analytics-cost-budget", 13)(18, AIAnalyticsResourceComponent_Case_18_Template, 1, 2, "app-analytics-error-analysis", 13)(19, AIAnalyticsResourceComponent_Case_19_Template, 1, 1, "app-analytics-usage-patterns", 15)(20, AIAnalyticsResourceComponent_Case_20_Template, 1, 1, "app-analytics-realtime-overview", 15)(21, AIAnalyticsResourceComponent_Case_21_Template, 1, 1, "app-analytics-realtime-sessions", 15)(22, AIAnalyticsResourceComponent_Case_22_Template, 1, 1, "app-realtime-management", 15);
648
+ i0.ɵɵconditionalCreate(13, AIAnalyticsResourceComponent_Case_13_Template, 2, 2, "app-analytics-executive-summary", 13)(14, AIAnalyticsResourceComponent_Case_14_Template, 2, 2, "app-analytics-prompt-runs", 13)(15, AIAnalyticsResourceComponent_Case_15_Template, 1, 2, "app-analytics-agent-runs", 13)(16, AIAnalyticsResourceComponent_Case_16_Template, 1, 3, "app-analytics-model-performance", 14)(17, AIAnalyticsResourceComponent_Case_17_Template, 1, 2, "app-analytics-cost-budget", 13)(18, AIAnalyticsResourceComponent_Case_18_Template, 1, 2, "app-analytics-error-analysis", 13)(19, AIAnalyticsResourceComponent_Case_19_Template, 1, 1, "app-analytics-usage-patterns", 15)(20, AIAnalyticsResourceComponent_Case_20_Template, 1, 1, "app-analytics-realtime-overview", 15)(21, AIAnalyticsResourceComponent_Case_21_Template, 1, 1, "app-analytics-realtime-sessions", 15)(22, AIAnalyticsResourceComponent_Case_22_Template, 1, 1, "app-realtime-management", 15)(23, AIAnalyticsResourceComponent_Case_23_Template, 1, 0, "app-analytics-realtime-transcripts");
641
649
  i0.ɵɵelementEnd()()()()();
642
650
  } if (rf & 2) {
643
651
  let tmp_10_0;
@@ -658,8 +666,8 @@ let AIAnalyticsResourceComponent = class AIAnalyticsResourceComponent extends Ba
658
666
  i0.ɵɵadvance();
659
667
  i0.ɵɵproperty("Padding", false);
660
668
  i0.ɵɵadvance(2);
661
- i0.ɵɵconditional((tmp_10_0 = ctx.ActiveSection) === "executive-summary" ? 13 : tmp_10_0 === "prompt-runs" ? 14 : tmp_10_0 === "agent-runs" ? 15 : tmp_10_0 === "model-performance" ? 16 : tmp_10_0 === "cost-budget" ? 17 : tmp_10_0 === "error-analysis" ? 18 : tmp_10_0 === "usage-patterns" ? 19 : tmp_10_0 === "realtime-overview" ? 20 : tmp_10_0 === "realtime-sessions" ? 21 : tmp_10_0 === "realtime-management" ? 22 : -1);
662
- } }, dependencies: [i1.MJButtonDirective, i1.MJPageHeaderComponent, i1.MJPageLayoutComponent, i1.MJPageBodyComponent, i1.MJPageHeaderInteriorComponent, i1.MJPageBodyInteriorComponent, i1.MJLeftNavComponent, i1.MJLeftNavContentComponent, i1.MJFilterPopoverComponent, i1.MJFilterPanelComponent, i1.MJFilterChipComponent, i2.AnalyticsExecutiveSummaryComponent, i3.AnalyticsPromptRunsComponent, i4.AnalyticsAgentRunsComponent, i5.AnalyticsModelPerformanceComponent, i6.AnalyticsCostBudgetComponent, i7.AnalyticsErrorAnalysisComponent, i8.AnalyticsUsagePatternsComponent, i9.AnalyticsRealtimeOverviewComponent, i10.AnalyticsRealtimeSessionsComponent, i11.RealtimeManagementComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n height: 100%;\n }\n\n .analytics-shell[_ngcontent-%COMP%] {\n display: flex;\n flex: 1;\n min-height: 0;\n background: var(--mj-bg-page);\n }\n\n \n\n\n \n\n\n\n\n \n\n\n .analytics-content[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n padding: 24px;\n }\n\n \n\n\n .section-placeholder[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 80px 24px;\n color: var(--mj-text-muted);\n }\n\n .placeholder-icon[_ngcontent-%COMP%] {\n font-size: 48px;\n margin-bottom: 20px;\n color: var(--mj-brand-primary);\n opacity: 0.4;\n }\n\n .section-placeholder[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n font-size: 20px;\n font-weight: 600;\n color: var(--mj-text-primary);\n margin: 0 0 8px;\n }\n\n .section-placeholder[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 14px;\n color: var(--mj-text-muted);\n margin: 0;\n max-width: 420px;\n }\n\n \n\n\n \n\n\n @media (max-width: 768px) {\n .analytics-content[_ngcontent-%COMP%] {\n padding: 16px;\n }\n }\n\n \n\n\n\n @media (max-width: 700px) {\n .analytics-shell[_ngcontent-%COMP%] {\n flex-direction: column;\n }\n }"] });
669
+ i0.ɵɵconditional((tmp_10_0 = ctx.ActiveSection) === "executive-summary" ? 13 : tmp_10_0 === "prompt-runs" ? 14 : tmp_10_0 === "agent-runs" ? 15 : tmp_10_0 === "model-performance" ? 16 : tmp_10_0 === "cost-budget" ? 17 : tmp_10_0 === "error-analysis" ? 18 : tmp_10_0 === "usage-patterns" ? 19 : tmp_10_0 === "realtime-overview" ? 20 : tmp_10_0 === "realtime-sessions" ? 21 : tmp_10_0 === "realtime-management" ? 22 : tmp_10_0 === "realtime-transcripts" ? 23 : -1);
670
+ } }, dependencies: [i1.MJButtonDirective, i1.MJPageHeaderComponent, i1.MJPageLayoutComponent, i1.MJPageBodyComponent, i1.MJPageHeaderInteriorComponent, i1.MJPageBodyInteriorComponent, i1.MJLeftNavComponent, i1.MJLeftNavContentComponent, i1.MJFilterPopoverComponent, i1.MJFilterPanelComponent, i1.MJFilterChipComponent, i2.AnalyticsExecutiveSummaryComponent, i3.AnalyticsPromptRunsComponent, i4.AnalyticsAgentRunsComponent, i5.AnalyticsModelPerformanceComponent, i6.AnalyticsCostBudgetComponent, i7.AnalyticsErrorAnalysisComponent, i8.AnalyticsUsagePatternsComponent, i9.AnalyticsRealtimeOverviewComponent, i10.AnalyticsRealtimeSessionsComponent, i11.RealtimeManagementComponent, i12.AnalyticsRealtimeTranscriptsComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n height: 100%;\n }\n\n .analytics-shell[_ngcontent-%COMP%] {\n display: flex;\n flex: 1;\n min-height: 0;\n background: var(--mj-bg-page);\n }\n\n \n\n\n \n\n\n\n\n \n\n\n .analytics-content[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n padding: 24px;\n }\n\n \n\n\n .section-placeholder[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 80px 24px;\n color: var(--mj-text-muted);\n }\n\n .placeholder-icon[_ngcontent-%COMP%] {\n font-size: 48px;\n margin-bottom: 20px;\n color: var(--mj-brand-primary);\n opacity: 0.4;\n }\n\n .section-placeholder[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n font-size: 20px;\n font-weight: 600;\n color: var(--mj-text-primary);\n margin: 0 0 8px;\n }\n\n .section-placeholder[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 14px;\n color: var(--mj-text-muted);\n margin: 0;\n max-width: 420px;\n }\n\n \n\n\n \n\n\n @media (max-width: 768px) {\n .analytics-content[_ngcontent-%COMP%] {\n padding: 16px;\n }\n }\n\n \n\n\n\n @media (max-width: 700px) {\n .analytics-shell[_ngcontent-%COMP%] {\n flex-direction: column;\n }\n }"] });
663
671
  };
664
672
  AIAnalyticsResourceComponent = __decorate([
665
673
  RegisterClass(BaseResourceComponent, 'AIAnalyticsResource')
@@ -797,6 +805,9 @@ export { AIAnalyticsResourceComponent };
797
805
  [TimeRange]="CurrentTimeRange"
798
806
  ></app-realtime-management>
799
807
  }
808
+ @case ('realtime-transcripts') {
809
+ <app-analytics-realtime-transcripts></app-analytics-realtime-transcripts>
810
+ }
800
811
  }
801
812
  </div>
802
813
  </mj-page-body-interior>
@@ -811,7 +822,7 @@ export { AIAnalyticsResourceComponent };
811
822
  type: ViewChild,
812
823
  args: ['promptRuns']
813
824
  }] }); })();
814
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AIAnalyticsResourceComponent, { className: "AIAnalyticsResourceComponent", filePath: "src/AI/components/analytics/ai-analytics-resource.component.ts", lineNumber: 257 }); })();
825
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AIAnalyticsResourceComponent, { className: "AIAnalyticsResourceComponent", filePath: "src/AI/components/analytics/ai-analytics-resource.component.ts", lineNumber: 260 }); })();
815
826
  export function LoadAIAnalyticsResource() {
816
827
  // Prevents tree-shaking of the @RegisterClass decorator
817
828
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ai-analytics-resource.component.js","sourceRoot":"","sources":["../../../../src/AI/components/analytics/ai-analytics-resource.component.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAqB,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGnG,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAgB,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;;;;;;;;;;;;;;;;;;IAiDtC,6CAGgD;IAA5C,mOAAqB,4BAAqB,KAAC;IAC3C,2CAIoC;IAAhC,AADA,6NAAgB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B;YACxB,AADA,0CAAwB,+BACE;YAY1B,eAAqC;YACrC,AADA,4FAAqC,wFACS;YAE1C,eAYC;YAZD,+DAYC;YACD,cAIC;YAJD,gEAIC;YACD,cAIC;YAJD,+DAIC;YAEL,cAUC;YAVD,+DAUC;YAEkB,cAAiB;YAAjB,+BAAiB;YAEpC,eA8DC;YA9DD,oDAAA,mBAAmB,qBAAnB,aAAa,qBAAb,YAAY,qBAAZ,mBAAmB,qBAAnB,aAAa,qBAAb,gBAAgB,qBAAhB,gBAAgB,qBAAhB,mBAAmB,qBAAnB,mBAAmB,qBAAnB,qBAAqB,WA8DpB;;;AAuFJ,4BAA4B;IA7NxC,aAAa,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;GA6N/C,4BAA4B,CAkfxC;;iFAlfY,4BAA4B;cA5NxC,SAAS;6BACM,KAAK,YACP,2BAA2B,YAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwIT;;kBAwFA,SAAS;mBAAC,kBAAkB;;kBAC5B,SAAS;mBAAC,YAAY;;kFARd,4BAA4B;AAofzC,MAAM,UAAU,uBAAuB;IACnC,wDAAwD;AAC5D,CAAC","sourcesContent":["/**\n * @fileoverview AI Analytics Shell — Resource Component\n *\n * Main resource component for the AI Analytics dashboard. Provides a left\n * navigation panel and content area that switches between analytics sections:\n * Executive Summary, Prompt Runs, Agent Runs, Model Performance, Cost & Budget,\n * Error Analysis, and Usage Patterns.\n *\n * Persists the active section and filter state via UserInfoEngine settings\n * with debounced writes.\n */\n\nimport { Component, ChangeDetectorRef, OnInit, OnDestroy, ViewChild, inject } from '@angular/core';\nimport { AnalyticsExecutiveSummaryComponent } from './executive-summary/executive-summary.component';\nimport { AnalyticsPromptRunsComponent } from './prompt-runs/prompt-run-analysis.component';\nimport { Subject } from 'rxjs';\nimport { debounceTime, takeUntil } from 'rxjs/operators';\nimport { ResourceData, UserInfoEngine } from '@memberjunction/core-entities';\nimport { RegisterClass } from '@memberjunction/global';\nimport { BaseResourceComponent } from '@memberjunction/ng-shared';\nimport { AIAnalyticsPreferences, GlobalFilterState } from '../../interfaces/analytics-preferences.interface';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport { FilterFieldConfig, MJLeftNavItem, MJLeftNavSection } from '@memberjunction/ng-ui-components';\n\ninterface NavItem {\n Label?: string;\n Icon?: string;\n Key: string;\n /**\n * Short prose used as the Subtitle on this section's\n * <mj-page-header-interior> card. Omitted for the `divider` entry.\n */\n Description?: string;\n}\n\n@RegisterClass(BaseResourceComponent, 'AIAnalyticsResource')\n@Component({\n standalone: false,\n selector: 'app-ai-analytics-resource',\n template: `\n <mj-page-layout>\n <!-- Outer chrome — pure identity. Every control (filter-popover,\n TimeRange chips, Compare, Export) lives in the per-section\n <mj-page-header-interior> card below because each section\n configures its own filter fields and time-range options. -->\n <mj-page-header\n Title=\"AI Analytics\"\n Icon=\"fa-solid fa-chart-line\"\n Subtitle=\"Performance, cost, and usage analytics\">\n </mj-page-header>\n <mj-page-body [Padding]=\"false\" class=\"analytics-shell\">\n <mj-left-nav\n MobileTitle=\"Analytics\"\n [Sections]=\"navSections\"\n [ActiveId]=\"ActiveSection\"\n (ItemClicked)=\"onNavItemClicked($event)\">\n </mj-left-nav>\n\n <mj-left-nav-content>\n <!-- Per-section interior chrome owns the complete control surface\n for the active section: identity + actions + the section's\n own time-range chip strip. Even TimeRange options vary per\n section (Cost & Budget adds MTD / YTD, Model Performance\n drops 1h / 6h, etc.) so it belongs here rather than in the\n outer chrome. -->\n <mj-page-header-interior\n [Title]=\"currentSection?.Label || ''\"\n [Subtitle]=\"currentSection?.Description || ''\">\n <div actions>\n @if (analyticsFilterFields.length > 0) {\n <mj-filter-popover\n [ActiveCount]=\"ActiveFilterCount\"\n [ShowClearAll]=\"ActiveFilterCount > 0\"\n (ClearAllRequested)=\"resetPopoverFilters()\">\n <mj-filter-panel\n [Fields]=\"analyticsFilterFields\"\n [Values]=\"analyticsFilterValues\"\n (ValuesChange)=\"onAnalyticsFilterValuesChange($event)\"\n (Reset)=\"resetPopoverFilters()\">\n </mj-filter-panel>\n </mj-filter-popover>\n }\n @if (FilterBarConfig.ShowCompareToggle) {\n <button mjButton variant=\"secondary\" size=\"sm\" [toggleable]=\"true\" [(selected)]=\"compareActive\" (selectedChange)=\"toggleCompare()\">\n <i class=\"fa-solid fa-code-compare\"></i> <span class=\"mj-action-label\">Compare</span>\n </button>\n }\n @if (FilterBarConfig.ShowExportButton) {\n <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"OnExportClicked()\">\n <i class=\"fa-solid fa-download\"></i> <span class=\"mj-action-label\">Export</span>\n </button>\n }\n </div>\n @if (timeRangeChipOptions.length > 0) {\n <div toolbar class=\"time-range-chips\">\n @for (chip of timeRangeChipOptions; track chip.value) {\n <mj-filter-chip\n [Label]=\"chip.text\"\n [Active]=\"CurrentTimeRange === chip.value\"\n (Clicked)=\"OnTimeRangeChange(chip.value)\">\n </mj-filter-chip>\n }\n </div>\n }\n </mj-page-header-interior>\n <mj-page-body-interior [Padding]=\"false\">\n <div class=\"analytics-content\">\n @switch (ActiveSection) {\n @case ('executive-summary') {\n <app-analytics-executive-summary\n #executiveSummary\n [TimeRange]=\"CurrentTimeRange\"\n [Filters]=\"CurrentFilters\"\n (SectionNavigate)=\"OnSectionChange($event)\"\n ></app-analytics-executive-summary>\n }\n @case ('prompt-runs') {\n <app-analytics-prompt-runs\n #promptRuns\n [TimeRange]=\"CurrentTimeRange\"\n [Filters]=\"CurrentFilters\"\n ></app-analytics-prompt-runs>\n }\n @case ('agent-runs') {\n <app-analytics-agent-runs\n [TimeRange]=\"CurrentTimeRange\"\n [Filters]=\"CurrentFilters\"\n ></app-analytics-agent-runs>\n }\n @case ('model-performance') {\n <app-analytics-model-performance\n [TimeRange]=\"CurrentTimeRange\"\n [SortBy]=\"CurrentSortBy\"\n [SelectedVendor]=\"CurrentVendor\"\n ></app-analytics-model-performance>\n }\n @case ('cost-budget') {\n <app-analytics-cost-budget\n [TimeRange]=\"CurrentTimeRange\"\n [Filters]=\"CurrentFilters\"\n ></app-analytics-cost-budget>\n }\n @case ('error-analysis') {\n <app-analytics-error-analysis\n [TimeRange]=\"CurrentTimeRange\"\n [Filters]=\"CurrentFilters\"\n ></app-analytics-error-analysis>\n }\n @case ('usage-patterns') {\n <app-analytics-usage-patterns\n [TimeRange]=\"CurrentTimeRange\"\n ></app-analytics-usage-patterns>\n }\n @case ('realtime-overview') {\n <app-analytics-realtime-overview\n [TimeRange]=\"CurrentTimeRange\"\n (SectionNavigate)=\"OnSectionChange($event)\"\n ></app-analytics-realtime-overview>\n }\n @case ('realtime-sessions') {\n <app-analytics-realtime-sessions\n [TimeRange]=\"CurrentTimeRange\"\n ></app-analytics-realtime-sessions>\n }\n @case ('realtime-management') {\n <app-realtime-management\n [TimeRange]=\"CurrentTimeRange\"\n ></app-realtime-management>\n }\n }\n </div>\n </mj-page-body-interior>\n </mj-left-nav-content>\n </mj-page-body>\n </mj-page-layout>\n `,\n styles: [`\n :host {\n display: block;\n height: 100%;\n }\n\n .analytics-shell {\n display: flex;\n flex: 1;\n min-height: 0;\n background: var(--mj-bg-page);\n }\n\n /* ── Left Navigation ── */\n\n /* Rail width + nav-item styling now owned by <mj-left-nav>; the\n divider is expressed as a new MJLeftNavSection rather than a CSS\n rule. */\n\n /* ── Content Area ── */\n\n .analytics-content {\n flex: 1;\n overflow-y: auto;\n padding: 24px;\n }\n\n /* ── Section Placeholders ── */\n\n .section-placeholder {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 80px 24px;\n color: var(--mj-text-muted);\n }\n\n .placeholder-icon {\n font-size: 48px;\n margin-bottom: 20px;\n color: var(--mj-brand-primary);\n opacity: 0.4;\n }\n\n .section-placeholder h2 {\n font-size: 20px;\n font-weight: 600;\n color: var(--mj-text-primary);\n margin: 0 0 8px;\n }\n\n .section-placeholder p {\n font-size: 14px;\n color: var(--mj-text-muted);\n margin: 0;\n max-width: 420px;\n }\n\n /* ── Responsive: collapse nav to horizontal strip ── */\n\n /* Responsive — <mj-left-nav> handles its own collapse-to-row at\n narrow viewports. We only need to tune the content padding. */\n @media (max-width: 768px) {\n .analytics-content {\n padding: 16px;\n }\n }\n\n /* <mj-left-nav> collapses to a full-width top bar at ≤700px; stack the\n shell vertically so the content pane sits below it instead of being\n squeezed to zero width in the flex row. */\n @media (max-width: 700px) {\n .analytics-shell {\n flex-direction: column;\n }\n }\n `]\n})\nexport class AIAnalyticsResourceComponent extends BaseResourceComponent implements OnInit, OnDestroy {\n private readonly USER_SETTINGS_KEY = 'AI.Analytics.UserPreferences';\n private settingsPersistSubject = new Subject<void>();\n protected override destroy$ = new Subject<void>();\n private settingsLoaded = false;\n private cdr = inject(ChangeDetectorRef);\n\n @ViewChild('executiveSummary') private executiveSummary?: AnalyticsExecutiveSummaryComponent;\n @ViewChild('promptRuns') private promptRuns?: AnalyticsPromptRunsComponent;\n\n /**\n * Active analytics section. Implemented as a getter/setter so that changing\n * it recomputes the (section-dependent) filter-field config exactly once,\n * rather than rebuilding the whole FilterFieldConfig[] on every\n * change-detection pass (the field config is template-bound twice).\n */\n private _activeSection = 'executive-summary';\n public get ActiveSection(): string {\n return this._activeSection;\n }\n public set ActiveSection(value: string) {\n if (value !== this._activeSection) {\n this._activeSection = value;\n this.recomputeFilterFields();\n }\n }\n public CurrentTimeRange = '24h';\n public CurrentFilters: GlobalFilterState = {\n Models: [],\n Agents: [],\n Prompts: [],\n Statuses: []\n };\n /** Single-value SortBy used by Model Performance (lives on the shared chrome). */\n public CurrentSortBy: string = 'cost-efficiency';\n /** Single-value Vendor filter used by Model Performance (lives on the shared chrome). */\n public CurrentVendor: string = '';\n\n /** SortBy options for Model Performance leaderboard. */\n public readonly sortByOptions = [\n { text: 'By Performance', value: 'cost-efficiency' },\n { text: 'By Cost', value: 'cost' },\n { text: 'By Speed', value: 'speed' },\n { text: 'By Reliability', value: 'reliability' },\n { text: 'By Usage', value: 'usage-volume' }\n ];\n\n // ── Precomputed option lists ────────────────────────────────────────────\n // Built ONCE from AIEngineBase's (process-cached, load-once) lists in\n // ngOnInit — see recomputeOptionLists. Each used to be a getter doing\n // .map().sort() (and .filter() for agents) over engine-wide lists; because\n // analyticsFilterFields is template-bound twice they re-ran 2×/CD. The\n // backing fields are read by both the public getters (kept for any external\n // callers) and by recomputeFilterFields.\n private _modelOptions: { text: string; value: string }[] = [];\n private _agentOptions: { text: string; value: string }[] = [];\n private _promptOptions: { text: string; value: string }[] = [];\n private _vendorOptions: { text: string; value: string }[] = [];\n\n /** Vendor options, built from AIEngineBase for the Model Performance leaderboard. */\n public get vendorOptions(): { text: string; value: string }[] {\n return this._vendorOptions;\n }\n\n /** Per-section filter-bar config — switched on ActiveSection. */\n public get FilterBarConfig() {\n switch (this.ActiveSection) {\n case 'executive-summary':\n return { ShowModelFilter: false, ShowAgentFilter: false, ShowPromptFilter: false, ShowStatusFilter: false, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: true, ShowExportButton: false, TimeRangeOptions: ['1h', '6h', '24h', '7d', '30d'] };\n case 'prompt-runs':\n return { ShowModelFilter: true, ShowAgentFilter: true, ShowPromptFilter: true, ShowStatusFilter: true, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: false, ShowExportButton: true, TimeRangeOptions: ['1h', '6h', '24h', '7d', '30d'] };\n case 'agent-runs':\n return { ShowModelFilter: false, ShowAgentFilter: true, ShowPromptFilter: false, ShowStatusFilter: true, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: false, ShowExportButton: false, TimeRangeOptions: ['1h', '6h', '24h', '7d', '30d'] };\n case 'model-performance':\n return { ShowModelFilter: false, ShowAgentFilter: false, ShowPromptFilter: false, ShowStatusFilter: false, ShowSortBy: true, ShowVendor: true, ShowCompareToggle: false, ShowExportButton: false, TimeRangeOptions: ['24h', '7d', '30d'] };\n case 'cost-budget':\n return { ShowModelFilter: true, ShowAgentFilter: false, ShowPromptFilter: false, ShowStatusFilter: false, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: false, ShowExportButton: false, TimeRangeOptions: ['7d', '30d', '90d', 'MTD', 'YTD'] };\n case 'error-analysis':\n return { ShowModelFilter: true, ShowAgentFilter: false, ShowPromptFilter: true, ShowStatusFilter: false, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: false, ShowExportButton: false, TimeRangeOptions: ['1h', '6h', '24h', '7d', '30d'] };\n case 'usage-patterns':\n return { ShowModelFilter: false, ShowAgentFilter: false, ShowPromptFilter: false, ShowStatusFilter: false, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: false, ShowExportButton: false, TimeRangeOptions: ['1h', '6h', '24h', '7d', '30d'] };\n // Realtime Voice sections own their filters internally (search/status/\n // target/user/host live with the grid); only the time-range chips come\n // from the shared chrome. Session data is bucketed daily, so the\n // sub-day ranges are dropped.\n case 'realtime-overview':\n case 'realtime-sessions':\n // Realtime management owns its sub-tab rail + per-surface filters\n // internally; only the time-range chips come from the shared chrome\n // (it windows session history daily, so sub-day ranges are dropped).\n case 'realtime-management':\n return { ShowModelFilter: false, ShowAgentFilter: false, ShowPromptFilter: false, ShowStatusFilter: false, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: false, ShowExportButton: false, TimeRangeOptions: ['24h', '7d', '30d'] };\n default:\n return { ShowModelFilter: false, ShowAgentFilter: false, ShowPromptFilter: false, ShowStatusFilter: false, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: false, ShowExportButton: false, TimeRangeOptions: ['1h', '6h', '24h', '7d', '30d'] };\n }\n }\n\n /**\n * Always true now — every section uses the shared chrome filter bar.\n * Kept as a getter for future per-section carve-outs.\n */\n public get ShowSharedFilterBar(): boolean {\n return true;\n }\n\n /** Status options used by the popover dropdown when the section has ShowStatusFilter. */\n public readonly statusOptions = [\n { text: 'Success', value: 'Success' },\n { text: 'Error', value: 'Error' },\n { text: 'Running', value: 'Running' },\n { text: 'Pending', value: 'Pending' },\n { text: 'Canceled', value: 'Canceled' },\n ];\n\n /** Built from AIEngineBase (see recomputeOptionLists). */\n public get modelOptions(): { text: string; value: string }[] {\n return this._modelOptions;\n }\n\n public get agentOptions(): { text: string; value: string }[] {\n return this._agentOptions;\n }\n\n public get promptOptions(): { text: string; value: string }[] {\n return this._promptOptions;\n }\n\n /**\n * Build the four option lists from AIEngineBase's cached metadata. Called once\n * after the engine is loaded (ngOnInit). Mirrors the exact map/filter/sort the\n * former getters performed, so the values are identical — just computed once.\n *\n * Accepted staleness tradeoff: these lists are built once after engine load and\n * are NOT reactive — a mid-session AIEngineBase metadata reload (new model/agent/\n * prompt/vendor) would not refresh them until this component is re-created. That\n * is acceptable for an analytics surface (its option lists are near-static within\n * a session); we deliberately do NOT wire observable reactivity here. The former\n * getters re-read the engine on every CD, which was the perf cost we removed.\n */\n private recomputeOptionLists(): void {\n const engine = AIEngineBase.Instance;\n this._modelOptions = engine?.Models?.map(m => ({ text: m.Name ?? '', value: m.ID }))\n ?.sort((a, b) => a.text.localeCompare(b.text)) ?? [];\n this._agentOptions = engine?.Agents\n ?.filter(a => a.Status === 'Active')\n ?.map(a => ({ text: a.Name ?? '', value: a.ID }))\n ?.sort((a, b) => a.text.localeCompare(b.text)) ?? [];\n this._promptOptions = engine?.Prompts?.map(p => ({ text: p.Name ?? '', value: p.ID }))\n ?.sort((a, b) => a.text.localeCompare(b.text)) ?? [];\n this._vendorOptions = engine?.Vendors?.map(v => ({ text: v.Name ?? '', value: v.ID ?? '' }))\n ?.sort((a, b) => a.text.localeCompare(b.text)) ?? [];\n }\n\n /** Time-range chip options for the toolbar slot. */\n public get timeRangeChipOptions(): { text: string; value: string }[] {\n return this.FilterBarConfig.TimeRangeOptions.map(t => ({ text: t, value: t }));\n }\n\n /** Compare-mode visual state (kept on the shell now that analytics-filter-bar is gone). */\n public compareActive = false;\n\n /**\n * Precomputed popover field config for the active section. Recomputed only when\n * ActiveSection changes (via its setter) or after the option lists load — NOT\n * on every CD pass, even though the template binds this twice (the `@if` guard\n * and the `[Fields]` input).\n */\n private _analyticsFilterFields: FilterFieldConfig[] = [];\n\n /** Field config for the popover, based on the active section (precomputed). */\n public get analyticsFilterFields(): FilterFieldConfig[] {\n return this._analyticsFilterFields;\n }\n\n /** Rebuild {@link _analyticsFilterFields} for the current section from the option lists. */\n private recomputeFilterFields(): void {\n const cfg = this.FilterBarConfig;\n const fields: FilterFieldConfig[] = [];\n if (cfg.ShowModelFilter) {\n fields.push({\n key: 'Models',\n type: 'dropdown',\n label: 'Model',\n icon: 'fa-solid fa-microchip',\n filterable: this.modelOptions.length > 10,\n options: [{ text: 'All Models', value: '' }, ...this.modelOptions],\n });\n }\n if (cfg.ShowAgentFilter) {\n fields.push({\n key: 'Agents',\n type: 'dropdown',\n label: 'Agent',\n icon: 'fa-solid fa-robot',\n filterable: this.agentOptions.length > 10,\n options: [{ text: 'All Agents', value: '' }, ...this.agentOptions],\n });\n }\n if (cfg.ShowPromptFilter) {\n fields.push({\n key: 'Prompts',\n type: 'dropdown',\n label: 'Prompt',\n icon: 'fa-solid fa-comment-dots',\n filterable: this.promptOptions.length > 10,\n options: [{ text: 'All Prompts', value: '' }, ...this.promptOptions],\n });\n }\n if (cfg.ShowStatusFilter) {\n fields.push({\n key: 'Statuses',\n type: 'dropdown',\n label: 'Status',\n icon: 'fa-solid fa-toggle-on',\n options: [{ text: 'All Statuses', value: '' }, ...this.statusOptions],\n });\n }\n if (cfg.ShowSortBy) {\n fields.push({\n key: 'SortBy',\n type: 'dropdown',\n label: 'Sort By',\n icon: 'fa-solid fa-arrow-down-wide-short',\n options: this.sortByOptions,\n });\n }\n if (cfg.ShowVendor) {\n fields.push({\n key: 'Vendor',\n type: 'dropdown',\n label: 'Vendor',\n icon: 'fa-solid fa-building',\n filterable: this.vendorOptions.length > 10,\n options: [{ text: 'All Vendors', value: '' }, ...this.vendorOptions],\n });\n }\n this._analyticsFilterFields = fields;\n }\n\n /** Single-value flattened state for the centralized panel (the panel takes scalar values; we hold arrays in CurrentFilters). */\n public get analyticsFilterValues(): Record<string, unknown> {\n return {\n Models: this.CurrentFilters.Models?.[0] ?? '',\n Agents: this.CurrentFilters.Agents?.[0] ?? '',\n Prompts: this.CurrentFilters.Prompts?.[0] ?? '',\n Statuses: this.CurrentFilters.Statuses?.[0] ?? '',\n SortBy: this.CurrentSortBy,\n Vendor: this.CurrentVendor,\n };\n }\n\n /** Receive popover updates and translate scalar → array shape used by GlobalFilterState. */\n public onAnalyticsFilterValuesChange(values: Record<string, unknown>): void {\n const next: GlobalFilterState = {\n Models: values['Models'] ? [values['Models'] as string] : [],\n Agents: values['Agents'] ? [values['Agents'] as string] : [],\n Prompts: values['Prompts'] ? [values['Prompts'] as string] : [],\n Statuses: values['Statuses'] ? [values['Statuses'] as string] : [],\n };\n this.OnFiltersChange(next);\n if ('SortBy' in values) {\n this.CurrentSortBy = (values['SortBy'] as string) || 'cost-efficiency';\n }\n if ('Vendor' in values) {\n this.CurrentVendor = (values['Vendor'] as string) || '';\n }\n }\n\n /** Reset only the popover filters — leaves TimeRange and CompareActive alone. */\n public resetPopoverFilters(): void {\n this.OnFiltersChange({ Models: [], Agents: [], Prompts: [], Statuses: [] });\n // SortBy + Vendor reset only when Model Performance is the active section.\n if (this.ActiveSection === 'model-performance') {\n this.CurrentSortBy = 'cost-efficiency';\n this.CurrentVendor = '';\n }\n }\n\n /** Active filter count for the popover badge. */\n public get ActiveFilterCount(): number {\n const f = this.CurrentFilters;\n let count = (f.Models?.length ?? 0) + (f.Agents?.length ?? 0) + (f.Prompts?.length ?? 0) + (f.Statuses?.length ?? 0);\n // SortBy counts as \"active\" when it differs from the default.\n if (this.FilterBarConfig.ShowSortBy && this.CurrentSortBy && this.CurrentSortBy !== 'cost-efficiency') count++;\n if (this.FilterBarConfig.ShowVendor && this.CurrentVendor) count++;\n return count;\n }\n\n /** Toggle Compare mode — the mjButton directive owns the [(selected)] flip, so this handler only forwards the new value. */\n public toggleCompare(): void {\n this.OnCompareToggled(this.compareActive);\n }\n\n readonly NavItems: NavItem[] = [\n { Label: 'Executive Summary', Icon: 'fa-solid fa-gauge-high', Key: 'executive-summary',\n Description: 'High-level KPIs and trends across the platform' },\n { Label: 'Prompt Runs', Icon: 'fa-solid fa-comment-dots', Key: 'prompt-runs',\n Description: 'Detailed analysis of individual prompt executions' },\n { Label: 'Agent Runs', Icon: 'fa-solid fa-robot', Key: 'agent-runs',\n Description: 'Performance breakdown by agent' },\n { Label: 'Model Performance', Icon: 'fa-solid fa-microchip', Key: 'model-performance',\n Description: 'Compare models across cost, speed, and quality' },\n { Key: 'divider' },\n { Label: 'Cost & Budget', Icon: 'fa-solid fa-coins', Key: 'cost-budget',\n Description: 'Spend trends and budget tracking' },\n { Label: 'Error Analysis', Icon: 'fa-solid fa-triangle-exclamation', Key: 'error-analysis',\n Description: 'Failure patterns and root causes' },\n { Label: 'Usage Patterns', Icon: 'fa-solid fa-clock', Key: 'usage-patterns',\n Description: 'Volume, frequency, and concurrency over time' },\n { Key: 'divider2' },\n { Label: 'Realtime Voice', Icon: 'fa-solid fa-tower-broadcast', Key: 'realtime-overview',\n Description: 'Operational analytics for voice-agent sessions — sessions, channels, and delegated runs' },\n { Label: 'Voice Sessions', Icon: 'fa-solid fa-table-list', Key: 'realtime-sessions',\n Description: 'Every long-lived agent session — live calls, idle holds, and closed history' },\n { Label: 'Realtime Management', Icon: 'fa-solid fa-satellite-dish', Key: 'realtime-management',\n Description: 'Manage the realtime + bridge surface — live sessions, bridge providers, agent identities, channels, co-agents, history, and metrics' },\n ];\n\n /**\n * Active section metadata — drives <mj-page-header-interior> Title +\n * Subtitle. Mirrors the pattern in KH Configuration / KH Analytics: one\n * source of truth (NavItems) used both to build the rail and to render\n * per-section identity.\n */\n get currentSection(): NavItem | undefined {\n return this.NavItems.find(n => n.Key === this.ActiveSection);\n }\n\n /**\n * Wraps `NavItems` for `<mj-left-nav>`. The `{ Key: 'divider' }` entry\n * splits the items into two `MJLeftNavSection`s (an unlabeled section per\n * group) — the rail's natural section break replaces the bespoke\n * `.nav-divider` line.\n */\n get navSections(): MJLeftNavSection[] {\n const sections: MJLeftNavSection[] = [{ items: [] }];\n for (const item of this.NavItems) {\n if (item.Key.startsWith('divider')) {\n sections.push({ items: [] });\n } else {\n sections[sections.length - 1].items.push({\n id: item.Key,\n label: item.Label ?? '',\n icon: item.Icon\n });\n }\n }\n return sections;\n }\n\n /** Adapter for `<mj-left-nav>`'s `(ItemClicked)` output. */\n onNavItemClicked(item: MJLeftNavItem): void {\n this.OnSectionChange(item.id);\n }\n\n async ngOnInit(): Promise<void> {\n super.ngOnInit();\n this.setupSettingsDebounce();\n // AIEngineBase is deferred at startup — ensure it's loaded, then build the\n // option lists ONCE so the precomputed filter-field config has real data.\n try {\n await AIEngineBase.Instance.EnsureLoaded();\n } catch {\n // Fall through with whatever (possibly empty) cache exists — the option\n // lists tolerate an unloaded engine (same as the former lazy getters).\n }\n this.recomputeOptionLists();\n await this.loadUserSettings();\n // Final rebuild: covers both the initial section and any section restored\n // from user settings, now that the option lists are populated.\n this.recomputeFilterFields();\n this.cdr.detectChanges();\n this.NotifyLoadComplete();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n async GetResourceDisplayName(data: ResourceData): Promise<string> {\n return 'AI Analytics';\n }\n\n async GetResourceIconClass(data: ResourceData): Promise<string> {\n return 'fa-solid fa-chart-line';\n }\n\n /** Navigate to a different analytics section */\n public OnSectionChange(key: string): void {\n if (key.startsWith('divider') || key === this.ActiveSection) {\n return;\n }\n this.ActiveSection = key;\n this.saveUserSettings();\n this.cdr.detectChanges();\n }\n\n /** Handle time range changes from the filter bar */\n public OnTimeRangeChange(range: string): void {\n this.CurrentTimeRange = range;\n this.saveUserSettings();\n }\n\n /** Handle filter changes from the filter bar */\n public OnFiltersChange(filters: GlobalFilterState): void {\n this.CurrentFilters = filters;\n this.saveUserSettings();\n }\n\n /** Compare-toggle button — only visible on Executive Summary; forwards to that section. */\n public OnCompareToggled(value: boolean): void {\n this.executiveSummary?.OnCompareToggled?.(value);\n }\n\n /** Export button — only visible on Prompt Runs; forwards to that section. */\n public OnExportClicked(): void {\n this.promptRuns?.ExportCSV?.();\n }\n\n // ── Private Helpers ──\n\n private setupSettingsDebounce(): void {\n this.settingsPersistSubject.pipe(\n debounceTime(500),\n takeUntil(this.destroy$)\n ).subscribe(() => this.persistUserSettings());\n }\n\n private async loadUserSettings(): Promise<void> {\n try {\n const raw = UserInfoEngine.Instance.GetSetting(this.USER_SETTINGS_KEY);\n if (raw) {\n const prefs: AIAnalyticsPreferences = JSON.parse(raw);\n if (prefs.ActiveSection) {\n this.ActiveSection = prefs.ActiveSection;\n }\n if (prefs.ExecutiveSummary?.Filters) {\n this.CurrentFilters = { ...this.CurrentFilters, ...prefs.ExecutiveSummary.Filters };\n }\n if (prefs.ExecutiveSummary?.TimeRange) {\n this.CurrentTimeRange = prefs.ExecutiveSummary.TimeRange;\n }\n }\n } catch {\n // Use defaults on parse failure\n }\n this.settingsLoaded = true;\n }\n\n private saveUserSettings(): void {\n if (this.settingsLoaded) {\n this.settingsPersistSubject.next();\n }\n }\n\n private async persistUserSettings(): Promise<void> {\n try {\n const prefs: AIAnalyticsPreferences = {\n ActiveSection: this.ActiveSection,\n ExecutiveSummary: {\n TimeRange: this.CurrentTimeRange,\n ComparisonEnabled: false,\n Filters: this.CurrentFilters\n },\n PromptRuns: {\n TimeRange: this.CurrentTimeRange,\n Filters: this.CurrentFilters,\n ChartMetric: 'count',\n SortField: 'StartedAt',\n SortDirection: 'desc'\n },\n AgentRuns: {\n TimeRange: this.CurrentTimeRange,\n Filters: {\n Agents: this.CurrentFilters.Agents,\n Statuses: this.CurrentFilters.Statuses\n }\n },\n ModelPerformance: {\n TimeRange: this.CurrentTimeRange,\n SortBy: 'latency',\n VendorFilter: []\n },\n CostBudget: {\n TimeRange: this.CurrentTimeRange,\n Filters: this.CurrentFilters\n }\n };\n await UserInfoEngine.Instance.SetSetting(\n this.USER_SETTINGS_KEY,\n JSON.stringify(prefs)\n );\n } catch {\n // Silent failure for settings persistence\n }\n }\n}\n\nexport function LoadAIAnalyticsResource(): void {\n // Prevents tree-shaking of the @RegisterClass decorator\n}\n"]}
1
+ {"version":3,"file":"ai-analytics-resource.component.js","sourceRoot":"","sources":["../../../../src/AI/components/analytics/ai-analytics-resource.component.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAqB,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGnG,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAgB,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;;;;;;;;;;;;;;;;;;;IAiDtC,6CAGgD;IAA5C,mOAAqB,4BAAqB,KAAC;IAC3C,2CAIoC;IAAhC,AADA,6NAAgB,4CAAqC,KAAC,4LAC7C,4BAAqB,KAAC;IAEvC,AADI,iBAAkB,EACF;;;IARhB,AADA,sDAAiC,8CACK;IAGlC,cAAgC;IAChC,AADA,qDAAgC,wCACA;;;;IAOxC,kCAAmI;IAAhE,iUAA4B;IAAC,kNAAkB,sBAAe,KAAC;IAC9H,wBAAwC;IAAC,gCAA8B;IAAA,uBAAO;IAClF,AADkF,iBAAO,EAChF;;;IAFsC,iCAAmB;IAAC,qDAA4B;;;;IAK/F,kCAA2E;IAA5B,gMAAS,wBAAiB,KAAC;IACtE,wBAAoC;IAAC,gCAA8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iB;YAAjB,+BAAiB;YAEpC,eAiEC;YAjED,oDAAA,mBAAmB,qBAAnB,aAAa,qBAAb,YAAY,qBAAZ,mBAAmB,qBAAnB,aAAa,qBAAb,gBAAgB,qBAAhB,gBAAgB,qBAAhB,mBAAmB,qBAAnB,mBAAmB,qBAAnB,qBAAqB,qBAArB,sBAAsB,WAiErB;;;AAuFJ,4BAA4B;IAhOxC,aAAa,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;GAgO/C,4BAA4B,CAsfxC;;iFAtfY,4BAA4B;cA/NxC,SAAS;6BACM,KAAK,YACP,2BAA2B,YAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2IT;;kBAwFA,SAAS;mBAAC,kBAAkB;;kBAC5B,SAAS;mBAAC,YAAY;;kFARd,4BAA4B;AAwfzC,MAAM,UAAU,uBAAuB;IACnC,wDAAwD;AAC5D,CAAC","sourcesContent":["/**\n * @fileoverview AI Analytics Shell — Resource Component\n *\n * Main resource component for the AI Analytics dashboard. Provides a left\n * navigation panel and content area that switches between analytics sections:\n * Executive Summary, Prompt Runs, Agent Runs, Model Performance, Cost & Budget,\n * Error Analysis, and Usage Patterns.\n *\n * Persists the active section and filter state via UserInfoEngine settings\n * with debounced writes.\n */\n\nimport { Component, ChangeDetectorRef, OnInit, OnDestroy, ViewChild, inject } from '@angular/core';\nimport { AnalyticsExecutiveSummaryComponent } from './executive-summary/executive-summary.component';\nimport { AnalyticsPromptRunsComponent } from './prompt-runs/prompt-run-analysis.component';\nimport { Subject } from 'rxjs';\nimport { debounceTime, takeUntil } from 'rxjs/operators';\nimport { ResourceData, UserInfoEngine } from '@memberjunction/core-entities';\nimport { RegisterClass } from '@memberjunction/global';\nimport { BaseResourceComponent } from '@memberjunction/ng-shared';\nimport { AIAnalyticsPreferences, GlobalFilterState } from '../../interfaces/analytics-preferences.interface';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport { FilterFieldConfig, MJLeftNavItem, MJLeftNavSection } from '@memberjunction/ng-ui-components';\n\ninterface NavItem {\n Label?: string;\n Icon?: string;\n Key: string;\n /**\n * Short prose used as the Subtitle on this section's\n * <mj-page-header-interior> card. Omitted for the `divider` entry.\n */\n Description?: string;\n}\n\n@RegisterClass(BaseResourceComponent, 'AIAnalyticsResource')\n@Component({\n standalone: false,\n selector: 'app-ai-analytics-resource',\n template: `\n <mj-page-layout>\n <!-- Outer chrome — pure identity. Every control (filter-popover,\n TimeRange chips, Compare, Export) lives in the per-section\n <mj-page-header-interior> card below because each section\n configures its own filter fields and time-range options. -->\n <mj-page-header\n Title=\"AI Analytics\"\n Icon=\"fa-solid fa-chart-line\"\n Subtitle=\"Performance, cost, and usage analytics\">\n </mj-page-header>\n <mj-page-body [Padding]=\"false\" class=\"analytics-shell\">\n <mj-left-nav\n MobileTitle=\"Analytics\"\n [Sections]=\"navSections\"\n [ActiveId]=\"ActiveSection\"\n (ItemClicked)=\"onNavItemClicked($event)\">\n </mj-left-nav>\n\n <mj-left-nav-content>\n <!-- Per-section interior chrome owns the complete control surface\n for the active section: identity + actions + the section's\n own time-range chip strip. Even TimeRange options vary per\n section (Cost & Budget adds MTD / YTD, Model Performance\n drops 1h / 6h, etc.) so it belongs here rather than in the\n outer chrome. -->\n <mj-page-header-interior\n [Title]=\"currentSection?.Label || ''\"\n [Subtitle]=\"currentSection?.Description || ''\">\n <div actions>\n @if (analyticsFilterFields.length > 0) {\n <mj-filter-popover\n [ActiveCount]=\"ActiveFilterCount\"\n [ShowClearAll]=\"ActiveFilterCount > 0\"\n (ClearAllRequested)=\"resetPopoverFilters()\">\n <mj-filter-panel\n [Fields]=\"analyticsFilterFields\"\n [Values]=\"analyticsFilterValues\"\n (ValuesChange)=\"onAnalyticsFilterValuesChange($event)\"\n (Reset)=\"resetPopoverFilters()\">\n </mj-filter-panel>\n </mj-filter-popover>\n }\n @if (FilterBarConfig.ShowCompareToggle) {\n <button mjButton variant=\"secondary\" size=\"sm\" [toggleable]=\"true\" [(selected)]=\"compareActive\" (selectedChange)=\"toggleCompare()\">\n <i class=\"fa-solid fa-code-compare\"></i> <span class=\"mj-action-label\">Compare</span>\n </button>\n }\n @if (FilterBarConfig.ShowExportButton) {\n <button mjButton variant=\"secondary\" size=\"sm\" (click)=\"OnExportClicked()\">\n <i class=\"fa-solid fa-download\"></i> <span class=\"mj-action-label\">Export</span>\n </button>\n }\n </div>\n @if (timeRangeChipOptions.length > 0) {\n <div toolbar class=\"time-range-chips\">\n @for (chip of timeRangeChipOptions; track chip.value) {\n <mj-filter-chip\n [Label]=\"chip.text\"\n [Active]=\"CurrentTimeRange === chip.value\"\n (Clicked)=\"OnTimeRangeChange(chip.value)\">\n </mj-filter-chip>\n }\n </div>\n }\n </mj-page-header-interior>\n <mj-page-body-interior [Padding]=\"false\">\n <div class=\"analytics-content\">\n @switch (ActiveSection) {\n @case ('executive-summary') {\n <app-analytics-executive-summary\n #executiveSummary\n [TimeRange]=\"CurrentTimeRange\"\n [Filters]=\"CurrentFilters\"\n (SectionNavigate)=\"OnSectionChange($event)\"\n ></app-analytics-executive-summary>\n }\n @case ('prompt-runs') {\n <app-analytics-prompt-runs\n #promptRuns\n [TimeRange]=\"CurrentTimeRange\"\n [Filters]=\"CurrentFilters\"\n ></app-analytics-prompt-runs>\n }\n @case ('agent-runs') {\n <app-analytics-agent-runs\n [TimeRange]=\"CurrentTimeRange\"\n [Filters]=\"CurrentFilters\"\n ></app-analytics-agent-runs>\n }\n @case ('model-performance') {\n <app-analytics-model-performance\n [TimeRange]=\"CurrentTimeRange\"\n [SortBy]=\"CurrentSortBy\"\n [SelectedVendor]=\"CurrentVendor\"\n ></app-analytics-model-performance>\n }\n @case ('cost-budget') {\n <app-analytics-cost-budget\n [TimeRange]=\"CurrentTimeRange\"\n [Filters]=\"CurrentFilters\"\n ></app-analytics-cost-budget>\n }\n @case ('error-analysis') {\n <app-analytics-error-analysis\n [TimeRange]=\"CurrentTimeRange\"\n [Filters]=\"CurrentFilters\"\n ></app-analytics-error-analysis>\n }\n @case ('usage-patterns') {\n <app-analytics-usage-patterns\n [TimeRange]=\"CurrentTimeRange\"\n ></app-analytics-usage-patterns>\n }\n @case ('realtime-overview') {\n <app-analytics-realtime-overview\n [TimeRange]=\"CurrentTimeRange\"\n (SectionNavigate)=\"OnSectionChange($event)\"\n ></app-analytics-realtime-overview>\n }\n @case ('realtime-sessions') {\n <app-analytics-realtime-sessions\n [TimeRange]=\"CurrentTimeRange\"\n ></app-analytics-realtime-sessions>\n }\n @case ('realtime-management') {\n <app-realtime-management\n [TimeRange]=\"CurrentTimeRange\"\n ></app-realtime-management>\n }\n @case ('realtime-transcripts') {\n <app-analytics-realtime-transcripts></app-analytics-realtime-transcripts>\n }\n }\n </div>\n </mj-page-body-interior>\n </mj-left-nav-content>\n </mj-page-body>\n </mj-page-layout>\n `,\n styles: [`\n :host {\n display: block;\n height: 100%;\n }\n\n .analytics-shell {\n display: flex;\n flex: 1;\n min-height: 0;\n background: var(--mj-bg-page);\n }\n\n /* ── Left Navigation ── */\n\n /* Rail width + nav-item styling now owned by <mj-left-nav>; the\n divider is expressed as a new MJLeftNavSection rather than a CSS\n rule. */\n\n /* ── Content Area ── */\n\n .analytics-content {\n flex: 1;\n overflow-y: auto;\n padding: 24px;\n }\n\n /* ── Section Placeholders ── */\n\n .section-placeholder {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 80px 24px;\n color: var(--mj-text-muted);\n }\n\n .placeholder-icon {\n font-size: 48px;\n margin-bottom: 20px;\n color: var(--mj-brand-primary);\n opacity: 0.4;\n }\n\n .section-placeholder h2 {\n font-size: 20px;\n font-weight: 600;\n color: var(--mj-text-primary);\n margin: 0 0 8px;\n }\n\n .section-placeholder p {\n font-size: 14px;\n color: var(--mj-text-muted);\n margin: 0;\n max-width: 420px;\n }\n\n /* ── Responsive: collapse nav to horizontal strip ── */\n\n /* Responsive — <mj-left-nav> handles its own collapse-to-row at\n narrow viewports. We only need to tune the content padding. */\n @media (max-width: 768px) {\n .analytics-content {\n padding: 16px;\n }\n }\n\n /* <mj-left-nav> collapses to a full-width top bar at ≤700px; stack the\n shell vertically so the content pane sits below it instead of being\n squeezed to zero width in the flex row. */\n @media (max-width: 700px) {\n .analytics-shell {\n flex-direction: column;\n }\n }\n `]\n})\nexport class AIAnalyticsResourceComponent extends BaseResourceComponent implements OnInit, OnDestroy {\n private readonly USER_SETTINGS_KEY = 'AI.Analytics.UserPreferences';\n private settingsPersistSubject = new Subject<void>();\n protected override destroy$ = new Subject<void>();\n private settingsLoaded = false;\n private cdr = inject(ChangeDetectorRef);\n\n @ViewChild('executiveSummary') private executiveSummary?: AnalyticsExecutiveSummaryComponent;\n @ViewChild('promptRuns') private promptRuns?: AnalyticsPromptRunsComponent;\n\n /**\n * Active analytics section. Implemented as a getter/setter so that changing\n * it recomputes the (section-dependent) filter-field config exactly once,\n * rather than rebuilding the whole FilterFieldConfig[] on every\n * change-detection pass (the field config is template-bound twice).\n */\n private _activeSection = 'executive-summary';\n public get ActiveSection(): string {\n return this._activeSection;\n }\n public set ActiveSection(value: string) {\n if (value !== this._activeSection) {\n this._activeSection = value;\n this.recomputeFilterFields();\n }\n }\n public CurrentTimeRange = '24h';\n public CurrentFilters: GlobalFilterState = {\n Models: [],\n Agents: [],\n Prompts: [],\n Statuses: []\n };\n /** Single-value SortBy used by Model Performance (lives on the shared chrome). */\n public CurrentSortBy: string = 'cost-efficiency';\n /** Single-value Vendor filter used by Model Performance (lives on the shared chrome). */\n public CurrentVendor: string = '';\n\n /** SortBy options for Model Performance leaderboard. */\n public readonly sortByOptions = [\n { text: 'By Performance', value: 'cost-efficiency' },\n { text: 'By Cost', value: 'cost' },\n { text: 'By Speed', value: 'speed' },\n { text: 'By Reliability', value: 'reliability' },\n { text: 'By Usage', value: 'usage-volume' }\n ];\n\n // ── Precomputed option lists ────────────────────────────────────────────\n // Built ONCE from AIEngineBase's (process-cached, load-once) lists in\n // ngOnInit — see recomputeOptionLists. Each used to be a getter doing\n // .map().sort() (and .filter() for agents) over engine-wide lists; because\n // analyticsFilterFields is template-bound twice they re-ran 2×/CD. The\n // backing fields are read by both the public getters (kept for any external\n // callers) and by recomputeFilterFields.\n private _modelOptions: { text: string; value: string }[] = [];\n private _agentOptions: { text: string; value: string }[] = [];\n private _promptOptions: { text: string; value: string }[] = [];\n private _vendorOptions: { text: string; value: string }[] = [];\n\n /** Vendor options, built from AIEngineBase for the Model Performance leaderboard. */\n public get vendorOptions(): { text: string; value: string }[] {\n return this._vendorOptions;\n }\n\n /** Per-section filter-bar config — switched on ActiveSection. */\n public get FilterBarConfig() {\n switch (this.ActiveSection) {\n case 'executive-summary':\n return { ShowModelFilter: false, ShowAgentFilter: false, ShowPromptFilter: false, ShowStatusFilter: false, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: true, ShowExportButton: false, TimeRangeOptions: ['1h', '6h', '24h', '7d', '30d'] };\n case 'prompt-runs':\n return { ShowModelFilter: true, ShowAgentFilter: true, ShowPromptFilter: true, ShowStatusFilter: true, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: false, ShowExportButton: true, TimeRangeOptions: ['1h', '6h', '24h', '7d', '30d'] };\n case 'agent-runs':\n return { ShowModelFilter: false, ShowAgentFilter: true, ShowPromptFilter: false, ShowStatusFilter: true, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: false, ShowExportButton: false, TimeRangeOptions: ['1h', '6h', '24h', '7d', '30d'] };\n case 'model-performance':\n return { ShowModelFilter: false, ShowAgentFilter: false, ShowPromptFilter: false, ShowStatusFilter: false, ShowSortBy: true, ShowVendor: true, ShowCompareToggle: false, ShowExportButton: false, TimeRangeOptions: ['24h', '7d', '30d'] };\n case 'cost-budget':\n return { ShowModelFilter: true, ShowAgentFilter: false, ShowPromptFilter: false, ShowStatusFilter: false, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: false, ShowExportButton: false, TimeRangeOptions: ['7d', '30d', '90d', 'MTD', 'YTD'] };\n case 'error-analysis':\n return { ShowModelFilter: true, ShowAgentFilter: false, ShowPromptFilter: true, ShowStatusFilter: false, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: false, ShowExportButton: false, TimeRangeOptions: ['1h', '6h', '24h', '7d', '30d'] };\n case 'usage-patterns':\n return { ShowModelFilter: false, ShowAgentFilter: false, ShowPromptFilter: false, ShowStatusFilter: false, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: false, ShowExportButton: false, TimeRangeOptions: ['1h', '6h', '24h', '7d', '30d'] };\n // Realtime Voice sections own their filters internally (search/status/\n // target/user/host live with the grid); only the time-range chips come\n // from the shared chrome. Session data is bucketed daily, so the\n // sub-day ranges are dropped.\n case 'realtime-overview':\n case 'realtime-sessions':\n // Voice Transcripts is a self-contained browser (it loads all rooms; no shared filters apply).\n case 'realtime-transcripts':\n // Realtime management owns its sub-tab rail + per-surface filters\n // internally; only the time-range chips come from the shared chrome\n // (it windows session history daily, so sub-day ranges are dropped).\n case 'realtime-management':\n return { ShowModelFilter: false, ShowAgentFilter: false, ShowPromptFilter: false, ShowStatusFilter: false, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: false, ShowExportButton: false, TimeRangeOptions: ['24h', '7d', '30d'] };\n default:\n return { ShowModelFilter: false, ShowAgentFilter: false, ShowPromptFilter: false, ShowStatusFilter: false, ShowSortBy: false, ShowVendor: false, ShowCompareToggle: false, ShowExportButton: false, TimeRangeOptions: ['1h', '6h', '24h', '7d', '30d'] };\n }\n }\n\n /**\n * Always true now — every section uses the shared chrome filter bar.\n * Kept as a getter for future per-section carve-outs.\n */\n public get ShowSharedFilterBar(): boolean {\n return true;\n }\n\n /** Status options used by the popover dropdown when the section has ShowStatusFilter. */\n public readonly statusOptions = [\n { text: 'Success', value: 'Success' },\n { text: 'Error', value: 'Error' },\n { text: 'Running', value: 'Running' },\n { text: 'Pending', value: 'Pending' },\n { text: 'Canceled', value: 'Canceled' },\n ];\n\n /** Built from AIEngineBase (see recomputeOptionLists). */\n public get modelOptions(): { text: string; value: string }[] {\n return this._modelOptions;\n }\n\n public get agentOptions(): { text: string; value: string }[] {\n return this._agentOptions;\n }\n\n public get promptOptions(): { text: string; value: string }[] {\n return this._promptOptions;\n }\n\n /**\n * Build the four option lists from AIEngineBase's cached metadata. Called once\n * after the engine is loaded (ngOnInit). Mirrors the exact map/filter/sort the\n * former getters performed, so the values are identical — just computed once.\n *\n * Accepted staleness tradeoff: these lists are built once after engine load and\n * are NOT reactive — a mid-session AIEngineBase metadata reload (new model/agent/\n * prompt/vendor) would not refresh them until this component is re-created. That\n * is acceptable for an analytics surface (its option lists are near-static within\n * a session); we deliberately do NOT wire observable reactivity here. The former\n * getters re-read the engine on every CD, which was the perf cost we removed.\n */\n private recomputeOptionLists(): void {\n const engine = AIEngineBase.Instance;\n this._modelOptions = engine?.Models?.map(m => ({ text: m.Name ?? '', value: m.ID }))\n ?.sort((a, b) => a.text.localeCompare(b.text)) ?? [];\n this._agentOptions = engine?.Agents\n ?.filter(a => a.Status === 'Active')\n ?.map(a => ({ text: a.Name ?? '', value: a.ID }))\n ?.sort((a, b) => a.text.localeCompare(b.text)) ?? [];\n this._promptOptions = engine?.Prompts?.map(p => ({ text: p.Name ?? '', value: p.ID }))\n ?.sort((a, b) => a.text.localeCompare(b.text)) ?? [];\n this._vendorOptions = engine?.Vendors?.map(v => ({ text: v.Name ?? '', value: v.ID ?? '' }))\n ?.sort((a, b) => a.text.localeCompare(b.text)) ?? [];\n }\n\n /** Time-range chip options for the toolbar slot. */\n public get timeRangeChipOptions(): { text: string; value: string }[] {\n return this.FilterBarConfig.TimeRangeOptions.map(t => ({ text: t, value: t }));\n }\n\n /** Compare-mode visual state (kept on the shell now that analytics-filter-bar is gone). */\n public compareActive = false;\n\n /**\n * Precomputed popover field config for the active section. Recomputed only when\n * ActiveSection changes (via its setter) or after the option lists load — NOT\n * on every CD pass, even though the template binds this twice (the `@if` guard\n * and the `[Fields]` input).\n */\n private _analyticsFilterFields: FilterFieldConfig[] = [];\n\n /** Field config for the popover, based on the active section (precomputed). */\n public get analyticsFilterFields(): FilterFieldConfig[] {\n return this._analyticsFilterFields;\n }\n\n /** Rebuild {@link _analyticsFilterFields} for the current section from the option lists. */\n private recomputeFilterFields(): void {\n const cfg = this.FilterBarConfig;\n const fields: FilterFieldConfig[] = [];\n if (cfg.ShowModelFilter) {\n fields.push({\n key: 'Models',\n type: 'dropdown',\n label: 'Model',\n icon: 'fa-solid fa-microchip',\n filterable: this.modelOptions.length > 10,\n options: [{ text: 'All Models', value: '' }, ...this.modelOptions],\n });\n }\n if (cfg.ShowAgentFilter) {\n fields.push({\n key: 'Agents',\n type: 'dropdown',\n label: 'Agent',\n icon: 'fa-solid fa-robot',\n filterable: this.agentOptions.length > 10,\n options: [{ text: 'All Agents', value: '' }, ...this.agentOptions],\n });\n }\n if (cfg.ShowPromptFilter) {\n fields.push({\n key: 'Prompts',\n type: 'dropdown',\n label: 'Prompt',\n icon: 'fa-solid fa-comment-dots',\n filterable: this.promptOptions.length > 10,\n options: [{ text: 'All Prompts', value: '' }, ...this.promptOptions],\n });\n }\n if (cfg.ShowStatusFilter) {\n fields.push({\n key: 'Statuses',\n type: 'dropdown',\n label: 'Status',\n icon: 'fa-solid fa-toggle-on',\n options: [{ text: 'All Statuses', value: '' }, ...this.statusOptions],\n });\n }\n if (cfg.ShowSortBy) {\n fields.push({\n key: 'SortBy',\n type: 'dropdown',\n label: 'Sort By',\n icon: 'fa-solid fa-arrow-down-wide-short',\n options: this.sortByOptions,\n });\n }\n if (cfg.ShowVendor) {\n fields.push({\n key: 'Vendor',\n type: 'dropdown',\n label: 'Vendor',\n icon: 'fa-solid fa-building',\n filterable: this.vendorOptions.length > 10,\n options: [{ text: 'All Vendors', value: '' }, ...this.vendorOptions],\n });\n }\n this._analyticsFilterFields = fields;\n }\n\n /** Single-value flattened state for the centralized panel (the panel takes scalar values; we hold arrays in CurrentFilters). */\n public get analyticsFilterValues(): Record<string, unknown> {\n return {\n Models: this.CurrentFilters.Models?.[0] ?? '',\n Agents: this.CurrentFilters.Agents?.[0] ?? '',\n Prompts: this.CurrentFilters.Prompts?.[0] ?? '',\n Statuses: this.CurrentFilters.Statuses?.[0] ?? '',\n SortBy: this.CurrentSortBy,\n Vendor: this.CurrentVendor,\n };\n }\n\n /** Receive popover updates and translate scalar → array shape used by GlobalFilterState. */\n public onAnalyticsFilterValuesChange(values: Record<string, unknown>): void {\n const next: GlobalFilterState = {\n Models: values['Models'] ? [values['Models'] as string] : [],\n Agents: values['Agents'] ? [values['Agents'] as string] : [],\n Prompts: values['Prompts'] ? [values['Prompts'] as string] : [],\n Statuses: values['Statuses'] ? [values['Statuses'] as string] : [],\n };\n this.OnFiltersChange(next);\n if ('SortBy' in values) {\n this.CurrentSortBy = (values['SortBy'] as string) || 'cost-efficiency';\n }\n if ('Vendor' in values) {\n this.CurrentVendor = (values['Vendor'] as string) || '';\n }\n }\n\n /** Reset only the popover filters — leaves TimeRange and CompareActive alone. */\n public resetPopoverFilters(): void {\n this.OnFiltersChange({ Models: [], Agents: [], Prompts: [], Statuses: [] });\n // SortBy + Vendor reset only when Model Performance is the active section.\n if (this.ActiveSection === 'model-performance') {\n this.CurrentSortBy = 'cost-efficiency';\n this.CurrentVendor = '';\n }\n }\n\n /** Active filter count for the popover badge. */\n public get ActiveFilterCount(): number {\n const f = this.CurrentFilters;\n let count = (f.Models?.length ?? 0) + (f.Agents?.length ?? 0) + (f.Prompts?.length ?? 0) + (f.Statuses?.length ?? 0);\n // SortBy counts as \"active\" when it differs from the default.\n if (this.FilterBarConfig.ShowSortBy && this.CurrentSortBy && this.CurrentSortBy !== 'cost-efficiency') count++;\n if (this.FilterBarConfig.ShowVendor && this.CurrentVendor) count++;\n return count;\n }\n\n /** Toggle Compare mode — the mjButton directive owns the [(selected)] flip, so this handler only forwards the new value. */\n public toggleCompare(): void {\n this.OnCompareToggled(this.compareActive);\n }\n\n readonly NavItems: NavItem[] = [\n { Label: 'Executive Summary', Icon: 'fa-solid fa-gauge-high', Key: 'executive-summary',\n Description: 'High-level KPIs and trends across the platform' },\n { Label: 'Prompt Runs', Icon: 'fa-solid fa-comment-dots', Key: 'prompt-runs',\n Description: 'Detailed analysis of individual prompt executions' },\n { Label: 'Agent Runs', Icon: 'fa-solid fa-robot', Key: 'agent-runs',\n Description: 'Performance breakdown by agent' },\n { Label: 'Model Performance', Icon: 'fa-solid fa-microchip', Key: 'model-performance',\n Description: 'Compare models across cost, speed, and quality' },\n { Key: 'divider' },\n { Label: 'Cost & Budget', Icon: 'fa-solid fa-coins', Key: 'cost-budget',\n Description: 'Spend trends and budget tracking' },\n { Label: 'Error Analysis', Icon: 'fa-solid fa-triangle-exclamation', Key: 'error-analysis',\n Description: 'Failure patterns and root causes' },\n { Label: 'Usage Patterns', Icon: 'fa-solid fa-clock', Key: 'usage-patterns',\n Description: 'Volume, frequency, and concurrency over time' },\n { Key: 'divider2' },\n { Label: 'Realtime Voice', Icon: 'fa-solid fa-tower-broadcast', Key: 'realtime-overview',\n Description: 'Operational analytics for voice-agent sessions — sessions, channels, and delegated runs' },\n { Label: 'Voice Sessions', Icon: 'fa-solid fa-table-list', Key: 'realtime-sessions',\n Description: 'Every long-lived agent session — live calls, idle holds, and closed history' },\n { Label: 'Realtime Management', Icon: 'fa-solid fa-satellite-dish', Key: 'realtime-management',\n Description: 'Manage the realtime + bridge surface — live sessions, bridge providers, agent identities, channels, co-agents, history, and metrics' },\n { Label: 'Voice Transcripts', Icon: 'fa-solid fa-comments', Key: 'realtime-transcripts',\n Description: 'Browse recorded meeting-room transcripts — diarized, per-speaker, with each utterance attributed' },\n ];\n\n /**\n * Active section metadata — drives <mj-page-header-interior> Title +\n * Subtitle. Mirrors the pattern in KH Configuration / KH Analytics: one\n * source of truth (NavItems) used both to build the rail and to render\n * per-section identity.\n */\n get currentSection(): NavItem | undefined {\n return this.NavItems.find(n => n.Key === this.ActiveSection);\n }\n\n /**\n * Wraps `NavItems` for `<mj-left-nav>`. The `{ Key: 'divider' }` entry\n * splits the items into two `MJLeftNavSection`s (an unlabeled section per\n * group) — the rail's natural section break replaces the bespoke\n * `.nav-divider` line.\n */\n get navSections(): MJLeftNavSection[] {\n const sections: MJLeftNavSection[] = [{ items: [] }];\n for (const item of this.NavItems) {\n if (item.Key.startsWith('divider')) {\n sections.push({ items: [] });\n } else {\n sections[sections.length - 1].items.push({\n id: item.Key,\n label: item.Label ?? '',\n icon: item.Icon\n });\n }\n }\n return sections;\n }\n\n /** Adapter for `<mj-left-nav>`'s `(ItemClicked)` output. */\n onNavItemClicked(item: MJLeftNavItem): void {\n this.OnSectionChange(item.id);\n }\n\n async ngOnInit(): Promise<void> {\n super.ngOnInit();\n this.setupSettingsDebounce();\n // AIEngineBase is deferred at startup — ensure it's loaded, then build the\n // option lists ONCE so the precomputed filter-field config has real data.\n try {\n await AIEngineBase.Instance.EnsureLoaded();\n } catch {\n // Fall through with whatever (possibly empty) cache exists — the option\n // lists tolerate an unloaded engine (same as the former lazy getters).\n }\n this.recomputeOptionLists();\n await this.loadUserSettings();\n // Final rebuild: covers both the initial section and any section restored\n // from user settings, now that the option lists are populated.\n this.recomputeFilterFields();\n this.cdr.detectChanges();\n this.NotifyLoadComplete();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n async GetResourceDisplayName(data: ResourceData): Promise<string> {\n return 'AI Analytics';\n }\n\n async GetResourceIconClass(data: ResourceData): Promise<string> {\n return 'fa-solid fa-chart-line';\n }\n\n /** Navigate to a different analytics section */\n public OnSectionChange(key: string): void {\n if (key.startsWith('divider') || key === this.ActiveSection) {\n return;\n }\n this.ActiveSection = key;\n this.saveUserSettings();\n this.cdr.detectChanges();\n }\n\n /** Handle time range changes from the filter bar */\n public OnTimeRangeChange(range: string): void {\n this.CurrentTimeRange = range;\n this.saveUserSettings();\n }\n\n /** Handle filter changes from the filter bar */\n public OnFiltersChange(filters: GlobalFilterState): void {\n this.CurrentFilters = filters;\n this.saveUserSettings();\n }\n\n /** Compare-toggle button — only visible on Executive Summary; forwards to that section. */\n public OnCompareToggled(value: boolean): void {\n this.executiveSummary?.OnCompareToggled?.(value);\n }\n\n /** Export button — only visible on Prompt Runs; forwards to that section. */\n public OnExportClicked(): void {\n this.promptRuns?.ExportCSV?.();\n }\n\n // ── Private Helpers ──\n\n private setupSettingsDebounce(): void {\n this.settingsPersistSubject.pipe(\n debounceTime(500),\n takeUntil(this.destroy$)\n ).subscribe(() => this.persistUserSettings());\n }\n\n private async loadUserSettings(): Promise<void> {\n try {\n const raw = UserInfoEngine.Instance.GetSetting(this.USER_SETTINGS_KEY);\n if (raw) {\n const prefs: AIAnalyticsPreferences = JSON.parse(raw);\n if (prefs.ActiveSection) {\n this.ActiveSection = prefs.ActiveSection;\n }\n if (prefs.ExecutiveSummary?.Filters) {\n this.CurrentFilters = { ...this.CurrentFilters, ...prefs.ExecutiveSummary.Filters };\n }\n if (prefs.ExecutiveSummary?.TimeRange) {\n this.CurrentTimeRange = prefs.ExecutiveSummary.TimeRange;\n }\n }\n } catch {\n // Use defaults on parse failure\n }\n this.settingsLoaded = true;\n }\n\n private saveUserSettings(): void {\n if (this.settingsLoaded) {\n this.settingsPersistSubject.next();\n }\n }\n\n private async persistUserSettings(): Promise<void> {\n try {\n const prefs: AIAnalyticsPreferences = {\n ActiveSection: this.ActiveSection,\n ExecutiveSummary: {\n TimeRange: this.CurrentTimeRange,\n ComparisonEnabled: false,\n Filters: this.CurrentFilters\n },\n PromptRuns: {\n TimeRange: this.CurrentTimeRange,\n Filters: this.CurrentFilters,\n ChartMetric: 'count',\n SortField: 'StartedAt',\n SortDirection: 'desc'\n },\n AgentRuns: {\n TimeRange: this.CurrentTimeRange,\n Filters: {\n Agents: this.CurrentFilters.Agents,\n Statuses: this.CurrentFilters.Statuses\n }\n },\n ModelPerformance: {\n TimeRange: this.CurrentTimeRange,\n SortBy: 'latency',\n VendorFilter: []\n },\n CostBudget: {\n TimeRange: this.CurrentTimeRange,\n Filters: this.CurrentFilters\n }\n };\n await UserInfoEngine.Instance.SetSetting(\n this.USER_SETTINGS_KEY,\n JSON.stringify(prefs)\n );\n } catch {\n // Silent failure for settings persistence\n }\n }\n}\n\nexport function LoadAIAnalyticsResource(): void {\n // Prevents tree-shaking of the @RegisterClass decorator\n}\n"]}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * @fileoverview Pure data layer for the Realtime "Voice Transcripts" view. Loads the unified per-room
3
+ * meeting transcripts the bridge writes (one `MJ: Conversations` of `Type='Meeting Room'` per room +
4
+ * `MJ: Conversation Details` per utterance), and resolves each line's speaker — agent lines via `AgentID`,
5
+ * heard ('User') lines via the diarized `ExternalID` → the room's `AIAgentSessionBridgeParticipant` roster
6
+ * (DisplayName + IsAgent). No Angular imports — RunView(s) + client-side aggregation only.
7
+ *
8
+ * @module @memberjunction/ng-dashboards
9
+ */
10
+ import { IMetadataProvider } from '@memberjunction/core';
11
+ /** One meeting-room transcript in the list view. */
12
+ export interface MeetingRoomSummary {
13
+ ConversationID: string;
14
+ Name: string;
15
+ /** The room's external connection id (`ExternalID`) — the join key to the bridge/participant rows. */
16
+ RoomKey: string;
17
+ CreatedAt: Date;
18
+ LastActivity: Date;
19
+ }
20
+ /** A speaker-attributed transcript line for the drill-in view. */
21
+ export interface TranscriptLine {
22
+ ID: string;
23
+ /** `'agent'` = an agent spoke; `'human'` = a human/participant spoke; `'error'` = an error row. */
24
+ Kind: 'agent' | 'human' | 'error';
25
+ /** Resolved display name of the speaker (agent name, participant name, or a sensible fallback). */
26
+ Speaker: string;
27
+ Message: string;
28
+ At: Date;
29
+ }
30
+ /**
31
+ * Loads the meeting-room transcript LIST (light — no per-room detail load). Newest activity first.
32
+ *
33
+ * @param provider The request-scoped metadata provider.
34
+ * @param maxRows Cap on rooms returned (default 500).
35
+ */
36
+ export declare function LoadMeetingRooms(provider: IMetadataProvider, maxRows?: number): Promise<MeetingRoomSummary[]>;
37
+ /**
38
+ * Loads + speaker-attributes one room's transcript. Resolves agent lines via `AgentID` (AIEngine cache) and
39
+ * heard lines via the diarized `ExternalID` against the room's participant roster (so a `User` line reads as
40
+ * the actual person, and another agent heard in the room reads as that agent — not a generic "User").
41
+ *
42
+ * @param provider The request-scoped metadata provider.
43
+ * @param conversationID The room conversation id.
44
+ * @param roomKey The room's external id (to load its bridge participants for attribution).
45
+ */
46
+ export declare function LoadRoomTranscript(provider: IMetadataProvider, conversationID: string, roomKey: string): Promise<TranscriptLine[]>;
47
+ /**
48
+ * Resolves one raw detail row into a display-ready, speaker-attributed line — the diarization-attribution
49
+ * core. Exported for unit testing (the maps are easy to construct directly, no RunView mocking needed).
50
+ *
51
+ * @param d The raw `MJ: Conversation Details` row.
52
+ * @param participantNames `ExternalParticipantID(lower) → { name, isAgent }` from the room roster.
53
+ * @param agentName `AgentID(lower) → agent name`.
54
+ */
55
+ export declare function attributeLine(d: Record<string, unknown>, participantNames: Map<string, {
56
+ name: string;
57
+ isAgent: boolean;
58
+ }>, agentName: Map<string, string>): TranscriptLine;
59
+ //# sourceMappingURL=realtime-transcripts-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realtime-transcripts-data.d.ts","sourceRoot":"","sources":["../../../../../src/AI/components/analytics/realtime/realtime-transcripts-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,iBAAiB,EAAW,MAAM,sBAAsB,CAAC;AAQlE,oDAAoD;AACpD,MAAM,WAAW,kBAAkB;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,sGAAsG;IACtG,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,YAAY,EAAE,IAAI,CAAC;CACtB;AAED,kEAAkE;AAClE,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,mGAAmG;IACnG,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IAClC,mGAAmG;IACnG,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,IAAI,CAAC;CACZ;AAKD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,OAAO,SAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAuBhH;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACpC,QAAQ,EAAE,iBAAiB,EAC3B,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,GAChB,OAAO,CAAC,cAAc,EAAE,CAAC,CAyB3B;AAqDD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CACzB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1B,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,EACjE,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,cAAc,CAqBhB"}
@@ -0,0 +1,150 @@
1
+ /**
2
+ * @fileoverview Pure data layer for the Realtime "Voice Transcripts" view. Loads the unified per-room
3
+ * meeting transcripts the bridge writes (one `MJ: Conversations` of `Type='Meeting Room'` per room +
4
+ * `MJ: Conversation Details` per utterance), and resolves each line's speaker — agent lines via `AgentID`,
5
+ * heard ('User') lines via the diarized `ExternalID` → the room's `AIAgentSessionBridgeParticipant` roster
6
+ * (DisplayName + IsAgent). No Angular imports — RunView(s) + client-side aggregation only.
7
+ *
8
+ * @module @memberjunction/ng-dashboards
9
+ */
10
+ import { RunView } from '@memberjunction/core';
11
+ import { AIEngineBase } from '@memberjunction/ai-engine-base';
12
+ const CONVERSATION_ENTITY = 'MJ: Conversations';
13
+ const CONVERSATION_DETAIL_ENTITY = 'MJ: Conversation Details';
14
+ const BRIDGE_ENTITY = 'MJ: AI Agent Session Bridges';
15
+ const PARTICIPANT_ENTITY = 'MJ: AI Agent Session Bridge Participants';
16
+ const escapeSql = (v) => v.replace(/'/g, "''");
17
+ const toDate = (v) => (v instanceof Date ? v : new Date(String(v ?? '')));
18
+ /**
19
+ * Loads the meeting-room transcript LIST (light — no per-room detail load). Newest activity first.
20
+ *
21
+ * @param provider The request-scoped metadata provider.
22
+ * @param maxRows Cap on rooms returned (default 500).
23
+ */
24
+ export async function LoadMeetingRooms(provider, maxRows = 500) {
25
+ const rv = RunView.FromMetadataProvider(provider);
26
+ const result = await rv.RunView({
27
+ EntityName: CONVERSATION_ENTITY,
28
+ ExtraFilter: `Type='Meeting Room'`,
29
+ Fields: ['ID', 'Name', 'ExternalID', '__mj_CreatedAt', '__mj_UpdatedAt'],
30
+ OrderBy: '__mj_UpdatedAt DESC',
31
+ MaxRows: maxRows,
32
+ ResultType: 'simple',
33
+ }, provider.CurrentUser);
34
+ if (!result.Success) {
35
+ return [];
36
+ }
37
+ return result.Results.map((r) => ({
38
+ ConversationID: String(r['ID']),
39
+ Name: String(r['Name'] ?? 'Meeting Room'),
40
+ RoomKey: String(r['ExternalID'] ?? ''),
41
+ CreatedAt: toDate(r['__mj_CreatedAt']),
42
+ LastActivity: toDate(r['__mj_UpdatedAt']),
43
+ }));
44
+ }
45
+ /**
46
+ * Loads + speaker-attributes one room's transcript. Resolves agent lines via `AgentID` (AIEngine cache) and
47
+ * heard lines via the diarized `ExternalID` against the room's participant roster (so a `User` line reads as
48
+ * the actual person, and another agent heard in the room reads as that agent — not a generic "User").
49
+ *
50
+ * @param provider The request-scoped metadata provider.
51
+ * @param conversationID The room conversation id.
52
+ * @param roomKey The room's external id (to load its bridge participants for attribution).
53
+ */
54
+ export async function LoadRoomTranscript(provider, conversationID, roomKey) {
55
+ const rv = RunView.FromMetadataProvider(provider);
56
+ const [detailResult, bridgeResult] = await rv.RunViews([
57
+ {
58
+ EntityName: CONVERSATION_DETAIL_ENTITY,
59
+ ExtraFilter: `ConversationID='${escapeSql(conversationID)}'`,
60
+ Fields: ['ID', 'Role', 'Message', 'AgentID', 'ExternalID', 'Error', '__mj_CreatedAt'],
61
+ OrderBy: '__mj_CreatedAt ASC',
62
+ MaxRows: 5000,
63
+ ResultType: 'simple',
64
+ },
65
+ {
66
+ EntityName: BRIDGE_ENTITY,
67
+ ExtraFilter: roomKey ? `ExternalConnectionID='${escapeSql(roomKey)}'` : `1=0`,
68
+ Fields: ['ID'],
69
+ MaxRows: 100,
70
+ ResultType: 'simple',
71
+ },
72
+ ], provider.CurrentUser);
73
+ const participantNames = await loadParticipantNames(provider, rv, (bridgeResult?.Results ?? []).map((b) => String(b['ID'])));
74
+ const agentName = buildAgentNameLookup();
75
+ const details = detailResult?.Success ? detailResult.Results : [];
76
+ return details.map((d) => attributeLine(d, participantNames, agentName));
77
+ }
78
+ /** roomBridges → a map of `ExternalParticipantID → { name, isAgent }` for diarized-line attribution. */
79
+ async function loadParticipantNames(provider, rv, bridgeIds) {
80
+ const map = new Map();
81
+ if (bridgeIds.length === 0) {
82
+ return map;
83
+ }
84
+ const inClause = bridgeIds.map((id) => `'${escapeSql(id)}'`).join(',');
85
+ const result = await rv.RunView({
86
+ EntityName: PARTICIPANT_ENTITY,
87
+ ExtraFilter: `SessionBridgeID IN (${inClause})`,
88
+ Fields: ['ExternalParticipantID', 'DisplayName', 'IsAgent'],
89
+ MaxRows: 1000,
90
+ ResultType: 'simple',
91
+ }, provider.CurrentUser);
92
+ if (result.Success) {
93
+ for (const p of result.Results) {
94
+ const id = String(p['ExternalParticipantID'] ?? '').toLowerCase();
95
+ if (!id) {
96
+ continue;
97
+ }
98
+ // Each agent appears on multiple bridges' rosters — `IsAgent=1` only on its OWN bridge (where it's
99
+ // the bot), `IsAgent=0` where another agent merely heard it. OR-reduce so it resolves to an agent,
100
+ // and keep the most specific (non-fallback) DisplayName we've seen for the identity.
101
+ const isAgent = p['IsAgent'] === true;
102
+ const name = String(p['DisplayName'] ?? '');
103
+ const prev = map.get(id);
104
+ map.set(id, {
105
+ name: name || prev?.name || 'Participant',
106
+ isAgent: (prev?.isAgent ?? false) || isAgent,
107
+ });
108
+ }
109
+ }
110
+ return map;
111
+ }
112
+ /** AgentID → agent name, from the AIEngine cache (agents are always loaded for the analytics shell). */
113
+ function buildAgentNameLookup() {
114
+ const map = new Map();
115
+ for (const a of AIEngineBase.Instance.Agents ?? []) {
116
+ map.set(a.ID.toLowerCase(), a.Name ?? 'Agent');
117
+ }
118
+ return map;
119
+ }
120
+ /**
121
+ * Resolves one raw detail row into a display-ready, speaker-attributed line — the diarization-attribution
122
+ * core. Exported for unit testing (the maps are easy to construct directly, no RunView mocking needed).
123
+ *
124
+ * @param d The raw `MJ: Conversation Details` row.
125
+ * @param participantNames `ExternalParticipantID(lower) → { name, isAgent }` from the room roster.
126
+ * @param agentName `AgentID(lower) → agent name`.
127
+ */
128
+ export function attributeLine(d, participantNames, agentName) {
129
+ const role = String(d['Role'] ?? 'User');
130
+ const externalId = String(d['ExternalID'] ?? '').toLowerCase();
131
+ const base = {
132
+ ID: String(d['ID']),
133
+ Message: String(d['Message'] ?? d['Error'] ?? ''),
134
+ At: toDate(d['__mj_CreatedAt']),
135
+ };
136
+ if (role === 'Error') {
137
+ return { ...base, Kind: 'error', Speaker: 'Error' };
138
+ }
139
+ if (role === 'AI') {
140
+ const agentId = String(d['AgentID'] ?? '').toLowerCase();
141
+ return { ...base, Kind: 'agent', Speaker: agentName.get(agentId) ?? 'Agent' };
142
+ }
143
+ // 'User' — diarized to a participant when we have the speaker label; another agent heard reads as agent.
144
+ const participant = externalId ? participantNames.get(externalId) : undefined;
145
+ if (participant) {
146
+ return { ...base, Kind: participant.isAgent ? 'agent' : 'human', Speaker: participant.name };
147
+ }
148
+ return { ...base, Kind: 'human', Speaker: 'Participant' };
149
+ }
150
+ //# sourceMappingURL=realtime-transcripts-data.js.map