@memberjunction/ng-core-entity-forms 6.2.0-edge.3 → 6.2.0-edge.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts +5 -0
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js +12 -9
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
- package/dist/lib/custom/Conversations/conversation-overview.panel.d.ts +16 -3
- package/dist/lib/custom/Conversations/conversation-overview.panel.d.ts.map +1 -1
- package/dist/lib/custom/Conversations/conversation-overview.panel.js +103 -43
- package/dist/lib/custom/Conversations/conversation-overview.panel.js.map +1 -1
- package/dist/lib/custom/Entities/entity-form.component.d.ts +8 -0
- package/dist/lib/custom/Entities/entity-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Entities/entity-form.component.js +18 -4
- package/dist/lib/custom/Entities/entity-form.component.js.map +1 -1
- package/dist/lib/custom/Files/file-form.component.d.ts +5 -5
- package/dist/lib/custom/Files/file-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Files/file-form.component.js +227 -157
- package/dist/lib/custom/Files/file-form.component.js.map +1 -1
- package/dist/lib/custom/Files/file-form.logic.d.ts +24 -0
- package/dist/lib/custom/Files/file-form.logic.d.ts.map +1 -0
- package/dist/lib/custom/Files/file-form.logic.js +57 -0
- package/dist/lib/custom/Files/file-form.logic.js.map +1 -0
- package/dist/lib/custom/Lists/list-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Lists/list-form.component.js +3 -2
- package/dist/lib/custom/Lists/list-form.component.js.map +1 -1
- package/dist/lib/custom/Queries/query-form.component.js +2 -2
- package/dist/lib/custom/Templates/templates-form.component.js +2 -2
- package/dist/lib/custom/ai-agent-run/agent-run-cost-split.d.ts +34 -0
- package/dist/lib/custom/ai-agent-run/agent-run-cost-split.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/agent-run-cost-split.js +33 -0
- package/dist/lib/custom/ai-agent-run/agent-run-cost-split.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts +3 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js +261 -242
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js.map +1 -1
- package/dist/lib/custom/custom-forms.module.d.ts +35 -34
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +6 -2
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/generated/Entities/MJConversation/mjconversation.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJConversation/mjconversation.form.component.js +32 -14
- package/dist/lib/generated/Entities/MJConversation/mjconversation.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJConversationBranch/mjconversationbranch.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJConversationBranch/mjconversationbranch.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJConversationBranch/mjconversationbranch.form.component.js +111 -0
- package/dist/lib/generated/Entities/MJConversationBranch/mjconversationbranch.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJConversationDetail/mjconversationdetail.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJConversationDetail/mjconversationdetail.form.component.js +73 -75
- package/dist/lib/generated/Entities/MJConversationDetail/mjconversationdetail.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js +112 -94
- package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJScopedNotificationConfig/mjscopednotificationconfig.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJScopedNotificationConfig/mjscopednotificationconfig.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJScopedNotificationConfig/mjscopednotificationconfig.form.component.js +106 -0
- package/dist/lib/generated/Entities/MJScopedNotificationConfig/mjscopednotificationconfig.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js +734 -714
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJUserNotificationType/mjusernotificationtype.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJUserNotificationType/mjusernotificationtype.form.component.js +24 -6
- package/dist/lib/generated/Entities/MJUserNotificationType/mjusernotificationtype.form.component.js.map +1 -1
- package/dist/lib/generated/generated-forms.module.d.ts +283 -281
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
- package/dist/lib/generated/generated-forms.module.js +6 -0
- package/dist/lib/generated/generated-forms.module.js.map +1 -1
- package/package.json +48 -47
|
@@ -10,17 +10,30 @@ interface ConversationDetailRow {
|
|
|
10
10
|
}
|
|
11
11
|
export declare class ConversationOverviewPanel extends BaseFormPanel<MJConversationEntity> implements OnInit {
|
|
12
12
|
private cdr;
|
|
13
|
+
/** The newest messages in Main, newest first. */
|
|
13
14
|
Messages: ConversationDetailRow[];
|
|
14
|
-
/**
|
|
15
|
+
/** Messages in Main. */
|
|
16
|
+
TotalMessageCount: number;
|
|
17
|
+
/** User messages in Main. */
|
|
18
|
+
UserMessageCount: number;
|
|
19
|
+
/** AI messages in Main. */
|
|
20
|
+
AgentMessageCount: number;
|
|
21
|
+
/** Forks of the conversation. */
|
|
22
|
+
ForkCount: number;
|
|
23
|
+
/** Set when a read fails, so the cards show the failure instead of zero messages. */
|
|
15
24
|
LoadError: string | null;
|
|
16
25
|
ngOnInit(): void;
|
|
17
|
-
get UserMessageCount(): number;
|
|
18
|
-
get AgentMessageCount(): number;
|
|
19
26
|
/** A turn the user sent. `Role` is stored as 'User', 'AI' or 'Error'. */
|
|
20
27
|
protected IsUserTurn(detail: ConversationDetailRow): boolean;
|
|
21
28
|
/** A turn an agent sent. An 'Error' turn is neither a user turn nor an agent turn. */
|
|
22
29
|
protected IsAgentTurn(detail: ConversationDetailRow): boolean;
|
|
23
30
|
get RecentMessages(): ConversationDetailRow[];
|
|
31
|
+
/** The host form's provider, or the default provider when the panel has no host form. */
|
|
32
|
+
private get providerToUse();
|
|
33
|
+
/**
|
|
34
|
+
* Loads the counts and newest messages in Main, and the conversation's fork count, in one
|
|
35
|
+
* batch. When a detail read fails, the cards show the failure.
|
|
36
|
+
*/
|
|
24
37
|
private loadConversationMessages;
|
|
25
38
|
/** Shows a short "could not load" line, with the underlying message when there is one. */
|
|
26
39
|
private showLoadError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-overview.panel.d.ts","sourceRoot":"","sources":["../../../../src/lib/custom/Conversations/conversation-overview.panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,MAAM,EAA6B,MAAM,eAAe,CAAC;AAItG,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,
|
|
1
|
+
{"version":3,"file":"conversation-overview.panel.d.ts","sourceRoot":"","sources":["../../../../src/lib/custom/Conversations/conversation-overview.panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsC,MAAM,EAA6B,MAAM,eAAe,CAAC;AAItG,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAsB,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;AAErH,UAAU,qBAAqB;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,0BAA0B,CAAC,MAAM,CAAC,CAAC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACrB;AAKD,qBAqIa,yBAA0B,SAAQ,aAAa,CAAC,oBAAoB,CAAE,YAAW,MAAM;IAChG,OAAO,CAAC,GAAG,CAA6B;IACxC,iDAAiD;IAC1C,QAAQ,EAAE,qBAAqB,EAAE,CAAM;IAC9C,wBAAwB;IACjB,iBAAiB,SAAK;IAC7B,6BAA6B;IACtB,gBAAgB,SAAK;IAC5B,2BAA2B;IACpB,iBAAiB,SAAK;IAC7B,iCAAiC;IAC1B,SAAS,SAAK;IACrB,qFAAqF;IAC9E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEhC,QAAQ,IAAI,IAAI;IAIvB,yEAAyE;IACzE,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO;IAI5D,sFAAsF;IACtF,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO;IAI7D,IAAW,cAAc,IAAI,qBAAqB,EAAE,CAEnD;IAED,yFAAyF;IACzF,OAAO,KAAK,aAAa,GAExB;IAED;;;OAGG;YACW,wBAAwB;IAuDtC,0FAA0F;IAC1F,OAAO,CAAC,aAAa;yCAlGZ,yBAAyB;2CAAzB,yBAAyB;CAqGrC"}
|
|
@@ -6,9 +6,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { Component, ChangeDetectionStrategy, inject, ChangeDetectorRef } from '@angular/core';
|
|
8
8
|
import { CommonModule } from '@angular/common';
|
|
9
|
-
import { RunView } from '@memberjunction/core';
|
|
10
|
-
import { RegisterClassEx } from '@memberjunction/global';
|
|
9
|
+
import { LogError, Metadata, RunView } from '@memberjunction/core';
|
|
10
|
+
import { EscapeSQLString, RegisterClassEx } from '@memberjunction/global';
|
|
11
11
|
import { BaseFormPanel } from '@memberjunction/ng-base-forms';
|
|
12
|
+
import { ConversationEngine } from '@memberjunction/core-entities';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
const _forTrack0 = ($index, $item) => $item.ID;
|
|
14
15
|
function ConversationOverviewPanel_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -18,7 +19,7 @@ function ConversationOverviewPanel_Conditional_6_Template(rf, ctx) { if (rf & 1)
|
|
|
18
19
|
} if (rf & 2) {
|
|
19
20
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
20
21
|
i0.ɵɵadvance();
|
|
21
|
-
i0.ɵɵtextInterpolate1("", ctx_r0.
|
|
22
|
+
i0.ɵɵtextInterpolate1("", ctx_r0.TotalMessageCount, " Turns");
|
|
22
23
|
} }
|
|
23
24
|
function ConversationOverviewPanel_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
24
25
|
i0.ɵɵdomElementStart(0, "span", 7);
|
|
@@ -29,6 +30,15 @@ function ConversationOverviewPanel_Conditional_8_Template(rf, ctx) { if (rf & 1)
|
|
|
29
30
|
i0.ɵɵadvance();
|
|
30
31
|
i0.ɵɵtextInterpolate(ctx_r0.LoadError);
|
|
31
32
|
} }
|
|
33
|
+
function ConversationOverviewPanel_Conditional_9_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
34
|
+
i0.ɵɵdomElementStart(0, "div", 13);
|
|
35
|
+
i0.ɵɵtext(1);
|
|
36
|
+
i0.ɵɵdomElementEnd();
|
|
37
|
+
} if (rf & 2) {
|
|
38
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
39
|
+
i0.ɵɵadvance();
|
|
40
|
+
i0.ɵɵtextInterpolate2("plus ", ctx_r0.ForkCount, " ", ctx_r0.ForkCount === 1 ? "fork" : "forks");
|
|
41
|
+
} }
|
|
32
42
|
function ConversationOverviewPanel_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
33
43
|
i0.ɵɵdomElementStart(0, "div", 10)(1, "span", 11);
|
|
34
44
|
i0.ɵɵtext(2, "Total Messages");
|
|
@@ -36,22 +46,25 @@ function ConversationOverviewPanel_Conditional_9_Template(rf, ctx) { if (rf & 1)
|
|
|
36
46
|
i0.ɵɵdomElementStart(3, "span", 12);
|
|
37
47
|
i0.ɵɵtext(4);
|
|
38
48
|
i0.ɵɵdomElementEnd()();
|
|
39
|
-
i0.ɵɵ
|
|
40
|
-
i0.ɵɵ
|
|
49
|
+
i0.ɵɵconditionalCreate(5, ConversationOverviewPanel_Conditional_9_Conditional_5_Template, 2, 2, "div", 13);
|
|
50
|
+
i0.ɵɵdomElementStart(6, "div", 10)(7, "span", 11);
|
|
51
|
+
i0.ɵɵtext(8, "User Prompts");
|
|
41
52
|
i0.ɵɵdomElementEnd();
|
|
42
|
-
i0.ɵɵdomElementStart(
|
|
43
|
-
i0.ɵɵtext(
|
|
53
|
+
i0.ɵɵdomElementStart(9, "span", 12);
|
|
54
|
+
i0.ɵɵtext(10);
|
|
44
55
|
i0.ɵɵdomElementEnd()();
|
|
45
|
-
i0.ɵɵdomElementStart(
|
|
46
|
-
i0.ɵɵtext(
|
|
56
|
+
i0.ɵɵdomElementStart(11, "div", 10)(12, "span", 11);
|
|
57
|
+
i0.ɵɵtext(13, "Agent Responses");
|
|
47
58
|
i0.ɵɵdomElementEnd();
|
|
48
|
-
i0.ɵɵdomElementStart(
|
|
49
|
-
i0.ɵɵtext(
|
|
59
|
+
i0.ɵɵdomElementStart(14, "span", 12);
|
|
60
|
+
i0.ɵɵtext(15);
|
|
50
61
|
i0.ɵɵdomElementEnd()();
|
|
51
62
|
} if (rf & 2) {
|
|
52
63
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
53
64
|
i0.ɵɵadvance(4);
|
|
54
|
-
i0.ɵɵtextInterpolate(ctx_r0.
|
|
65
|
+
i0.ɵɵtextInterpolate(ctx_r0.TotalMessageCount);
|
|
66
|
+
i0.ɵɵadvance();
|
|
67
|
+
i0.ɵɵconditional(ctx_r0.ForkCount > 0 ? 5 : -1);
|
|
55
68
|
i0.ɵɵadvance(5);
|
|
56
69
|
i0.ɵɵtextInterpolate(ctx_r0.UserMessageCount);
|
|
57
70
|
i0.ɵɵadvance(5);
|
|
@@ -72,12 +85,12 @@ function ConversationOverviewPanel_Conditional_19_Template(rf, ctx) { if (rf & 1
|
|
|
72
85
|
i0.ɵɵdomElementEnd();
|
|
73
86
|
} }
|
|
74
87
|
function ConversationOverviewPanel_Conditional_20_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
75
|
-
i0.ɵɵdomElementStart(0, "div", 10)(1, "span",
|
|
88
|
+
i0.ɵɵdomElementStart(0, "div", 10)(1, "span", 14)(2, "strong");
|
|
76
89
|
i0.ɵɵtext(3);
|
|
77
90
|
i0.ɵɵdomElementEnd();
|
|
78
91
|
i0.ɵɵtext(4);
|
|
79
92
|
i0.ɵɵdomElementEnd();
|
|
80
|
-
i0.ɵɵdomElementStart(5, "span",
|
|
93
|
+
i0.ɵɵdomElementStart(5, "span", 15);
|
|
81
94
|
i0.ɵɵtext(6);
|
|
82
95
|
i0.ɵɵdomElementEnd()();
|
|
83
96
|
} if (rf & 2) {
|
|
@@ -98,23 +111,28 @@ function ConversationOverviewPanel_Conditional_20_Template(rf, ctx) { if (rf & 1
|
|
|
98
111
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
99
112
|
i0.ɵɵrepeater(ctx_r0.RecentMessages);
|
|
100
113
|
} }
|
|
114
|
+
/** Number of newest messages the Recent Turns card shows. */
|
|
115
|
+
const RECENT_MESSAGE_COUNT = 4;
|
|
101
116
|
let ConversationOverviewPanel = class ConversationOverviewPanel extends BaseFormPanel {
|
|
102
117
|
constructor() {
|
|
103
118
|
super(...arguments);
|
|
104
119
|
this.cdr = inject(ChangeDetectorRef);
|
|
120
|
+
/** The newest messages in Main, newest first. */
|
|
105
121
|
this.Messages = [];
|
|
106
|
-
/**
|
|
122
|
+
/** Messages in Main. */
|
|
123
|
+
this.TotalMessageCount = 0;
|
|
124
|
+
/** User messages in Main. */
|
|
125
|
+
this.UserMessageCount = 0;
|
|
126
|
+
/** AI messages in Main. */
|
|
127
|
+
this.AgentMessageCount = 0;
|
|
128
|
+
/** Forks of the conversation. */
|
|
129
|
+
this.ForkCount = 0;
|
|
130
|
+
/** Set when a read fails, so the cards show the failure instead of zero messages. */
|
|
107
131
|
this.LoadError = null;
|
|
108
132
|
}
|
|
109
133
|
ngOnInit() {
|
|
110
134
|
this.loadConversationMessages();
|
|
111
135
|
}
|
|
112
|
-
get UserMessageCount() {
|
|
113
|
-
return this.Messages.filter(m => this.IsUserTurn(m)).length;
|
|
114
|
-
}
|
|
115
|
-
get AgentMessageCount() {
|
|
116
|
-
return this.Messages.filter(m => this.IsAgentTurn(m)).length;
|
|
117
|
-
}
|
|
118
136
|
/** A turn the user sent. `Role` is stored as 'User', 'AI' or 'Error'. */
|
|
119
137
|
IsUserTurn(detail) {
|
|
120
138
|
return detail.Role === 'User';
|
|
@@ -124,31 +142,70 @@ let ConversationOverviewPanel = class ConversationOverviewPanel extends BaseForm
|
|
|
124
142
|
return detail.Role === 'AI';
|
|
125
143
|
}
|
|
126
144
|
get RecentMessages() {
|
|
127
|
-
return this.Messages.slice(0,
|
|
145
|
+
return this.Messages.slice(0, RECENT_MESSAGE_COUNT);
|
|
128
146
|
}
|
|
147
|
+
/** The host form's provider, or the default provider when the panel has no host form. */
|
|
148
|
+
get providerToUse() {
|
|
149
|
+
return this.FormComponent?.ProviderToUse ?? Metadata.Provider; // global-provider-ok: BaseFormPanel has no Provider input; a panel without a host form uses the default provider
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Loads the counts and newest messages in Main, and the conversation's fork count, in one
|
|
153
|
+
* batch. When a detail read fails, the cards show the failure.
|
|
154
|
+
*/
|
|
129
155
|
async loadConversationMessages() {
|
|
130
156
|
if (!this.Record?.ID)
|
|
131
157
|
return;
|
|
158
|
+
const provider = this.providerToUse;
|
|
159
|
+
const scope = ConversationEngine.TrunkScope(this.Record.ID);
|
|
132
160
|
try {
|
|
133
|
-
const rv =
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
161
|
+
const rv = RunView.FromMetadataProvider(provider);
|
|
162
|
+
const [total, user, agent, recent, forks] = await rv.RunViews([
|
|
163
|
+
{
|
|
164
|
+
EntityName: 'MJ: Conversation Details',
|
|
165
|
+
ExtraFilter: ConversationEngine.ScopeFilter(scope),
|
|
166
|
+
ResultType: 'count_only',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
EntityName: 'MJ: Conversation Details',
|
|
170
|
+
ExtraFilter: `${ConversationEngine.ScopeFilter(scope)} AND [Role]='User'`,
|
|
171
|
+
ResultType: 'count_only',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
EntityName: 'MJ: Conversation Details',
|
|
175
|
+
ExtraFilter: `${ConversationEngine.ScopeFilter(scope)} AND [Role]='AI'`,
|
|
176
|
+
ResultType: 'count_only',
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
EntityName: 'MJ: Conversation Details',
|
|
180
|
+
ExtraFilter: ConversationEngine.ScopeFilter(scope),
|
|
181
|
+
Fields: ['ID', 'Role', 'Message', '__mj_CreatedAt'],
|
|
182
|
+
OrderBy: 'Sequence DESC',
|
|
183
|
+
MaxRows: RECENT_MESSAGE_COUNT,
|
|
184
|
+
ResultType: 'simple',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
EntityName: 'MJ: Conversation Branches',
|
|
188
|
+
ExtraFilter: `ConversationID='${EscapeSQLString(this.Record.ID)}'`,
|
|
189
|
+
ResultType: 'count_only',
|
|
190
|
+
},
|
|
191
|
+
], provider.CurrentUser);
|
|
192
|
+
const detailReads = [total, user, agent, recent];
|
|
193
|
+
const failed = detailReads.findIndex(r => !r?.Success);
|
|
194
|
+
if (failed >= 0) {
|
|
195
|
+
this.showLoadError(detailReads[failed]?.ErrorMessage);
|
|
144
196
|
}
|
|
145
197
|
else {
|
|
146
|
-
this.
|
|
198
|
+
this.TotalMessageCount = total?.TotalRowCount ?? 0;
|
|
199
|
+
this.UserMessageCount = user?.TotalRowCount ?? 0;
|
|
200
|
+
this.AgentMessageCount = agent?.TotalRowCount ?? 0;
|
|
201
|
+
this.Messages = recent?.Results ?? [];
|
|
147
202
|
}
|
|
203
|
+
this.ForkCount = forks?.Success ? forks.TotalRowCount : 0;
|
|
148
204
|
}
|
|
149
205
|
catch (e) {
|
|
150
|
-
|
|
151
|
-
|
|
206
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
207
|
+
LogError(`Conversation overview: could not load the details of conversation ${this.Record.ID}: ${message}`);
|
|
208
|
+
this.showLoadError(message);
|
|
152
209
|
}
|
|
153
210
|
this.cdr.markForCheck();
|
|
154
211
|
}
|
|
@@ -157,7 +214,7 @@ let ConversationOverviewPanel = class ConversationOverviewPanel extends BaseForm
|
|
|
157
214
|
this.LoadError = detail ? `Could not load messages: ${detail}` : 'Could not load messages.';
|
|
158
215
|
}
|
|
159
216
|
static { this.ɵfac = /*@__PURE__*/ (() => { let ɵConversationOverviewPanel_BaseFactory; return function ConversationOverviewPanel_Factory(__ngFactoryType__) { return (ɵConversationOverviewPanel_BaseFactory || (ɵConversationOverviewPanel_BaseFactory = i0.ɵɵgetInheritedFactory(ConversationOverviewPanel)))(__ngFactoryType__ || ConversationOverviewPanel); }; })(); }
|
|
160
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConversationOverviewPanel, selectors: [["mj-conversation-overview-panel"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 21, vars: 3, consts: [[1, "mj-convo-overview-grid"], [1, "mj-overview-card"], [1, "mj-card-header"], [1, "mj-card-title"], [1, "fa-solid", "fa-comments", 2, "color", "var(--mj-brand-primary, #38bdf8)"], [1, "mj-card-badge"], [1, "mj-card-body"], [1, "mj-load-error"], [1, "fa-solid", "fa-clock-rotate-left", 2, "color", "#10b981"], [2, "font-size", "12px", "color", "var(--mj-text-muted)"], [1, "mj-metric-row"], [1, "mj-metric-label"], [1, "mj-metric-val"], [1, "mj-metric-label", 2, "text-overflow", "ellipsis", "overflow", "hidden", "white-space", "nowrap", "max-width", "200px"], [1, "mj-pill"]], template: function ConversationOverviewPanel_Template(rf, ctx) { if (rf & 1) {
|
|
217
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConversationOverviewPanel, selectors: [["mj-conversation-overview-panel"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 21, vars: 3, consts: [[1, "mj-convo-overview-grid"], [1, "mj-overview-card"], [1, "mj-card-header"], [1, "mj-card-title"], [1, "fa-solid", "fa-comments", 2, "color", "var(--mj-brand-primary, #38bdf8)"], [1, "mj-card-badge"], [1, "mj-card-body"], [1, "mj-load-error"], [1, "fa-solid", "fa-clock-rotate-left", 2, "color", "#10b981"], [2, "font-size", "12px", "color", "var(--mj-text-muted)"], [1, "mj-metric-row"], [1, "mj-metric-label"], [1, "mj-metric-val"], [1, "mj-fork-note"], [1, "mj-metric-label", 2, "text-overflow", "ellipsis", "overflow", "hidden", "white-space", "nowrap", "max-width", "200px"], [1, "mj-pill"]], template: function ConversationOverviewPanel_Template(rf, ctx) { if (rf & 1) {
|
|
161
218
|
i0.ɵɵdomElementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3);
|
|
162
219
|
i0.ɵɵdomElement(4, "i", 4);
|
|
163
220
|
i0.ɵɵtext(5, " Turn Summary");
|
|
@@ -165,7 +222,7 @@ let ConversationOverviewPanel = class ConversationOverviewPanel extends BaseForm
|
|
|
165
222
|
i0.ɵɵconditionalCreate(6, ConversationOverviewPanel_Conditional_6_Template, 2, 1, "span", 5);
|
|
166
223
|
i0.ɵɵdomElementEnd();
|
|
167
224
|
i0.ɵɵdomElementStart(7, "div", 6);
|
|
168
|
-
i0.ɵɵconditionalCreate(8, ConversationOverviewPanel_Conditional_8_Template, 2, 1, "span", 7)(9, ConversationOverviewPanel_Conditional_9_Template,
|
|
225
|
+
i0.ɵɵconditionalCreate(8, ConversationOverviewPanel_Conditional_8_Template, 2, 1, "span", 7)(9, ConversationOverviewPanel_Conditional_9_Template, 16, 4);
|
|
169
226
|
i0.ɵɵdomElementEnd()();
|
|
170
227
|
i0.ɵɵdomElementStart(10, "div", 1)(11, "div", 2)(12, "div", 3);
|
|
171
228
|
i0.ɵɵdomElement(13, "i", 8);
|
|
@@ -184,7 +241,7 @@ let ConversationOverviewPanel = class ConversationOverviewPanel extends BaseForm
|
|
|
184
241
|
i0.ɵɵconditional(ctx.LoadError ? 8 : 9);
|
|
185
242
|
i0.ɵɵadvance(10);
|
|
186
243
|
i0.ɵɵconditional(ctx.LoadError ? 18 : ctx.Messages.length === 0 ? 19 : 20);
|
|
187
|
-
} }, dependencies: [CommonModule], styles: ["[_nghost-%COMP%] { display: block; width: 100%; margin-bottom: 20px; }\n .mj-convo-overview-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 16px;\n }\n .mj-overview-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-card, #141f36);\n border: 1px solid var(--mj-border-default, #223254);\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n .mj-card-header[_ngcontent-%COMP%] {\n padding: 10px 14px;\n background: var(--mj-bg-surface, #111a2e);\n border-bottom: 1px solid var(--mj-border-default, #223254);\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n .mj-card-title[_ngcontent-%COMP%] {\n font-size: 12.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #f8fafc);\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .mj-card-badge[_ngcontent-%COMP%] {\n font-size: 11px;\n padding: 2px 7px;\n border-radius: 9999px;\n background: var(--mj-bg-surface-elevated, #1a2744);\n color: var(--mj-text-secondary, #94a3b8);\n border: 1px solid var(--mj-border-default, #223254);\n }\n .mj-card-body[_ngcontent-%COMP%] {\n padding: 14px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n .mj-metric-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 12px;\n }\n .mj-metric-label[_ngcontent-%COMP%] { color: var(--mj-text-secondary, #94a3b8); }\n .mj-metric-val[_ngcontent-%COMP%] { font-weight: 600; color: var(--mj-text-primary, #f8fafc); font-family: monospace; }\n .mj-load-error[_ngcontent-%COMP%] { font-size: 12px; color: var(--mj-status-error); }\n .mj-pill[_ngcontent-%COMP%] { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }\n .mj-pill-green[_ngcontent-%COMP%] { background: rgba(16, 185, 129, 0.15); color: #10b981; }\n .mj-pill-blue[_ngcontent-%COMP%] { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }"], changeDetection: 0 }); }
|
|
244
|
+
} }, dependencies: [CommonModule], styles: ["[_nghost-%COMP%] { display: block; width: 100%; margin-bottom: 20px; }\n .mj-convo-overview-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 16px;\n }\n .mj-overview-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-card, #141f36);\n border: 1px solid var(--mj-border-default, #223254);\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n .mj-card-header[_ngcontent-%COMP%] {\n padding: 10px 14px;\n background: var(--mj-bg-surface, #111a2e);\n border-bottom: 1px solid var(--mj-border-default, #223254);\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n .mj-card-title[_ngcontent-%COMP%] {\n font-size: 12.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #f8fafc);\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .mj-card-badge[_ngcontent-%COMP%] {\n font-size: 11px;\n padding: 2px 7px;\n border-radius: 9999px;\n background: var(--mj-bg-surface-elevated, #1a2744);\n color: var(--mj-text-secondary, #94a3b8);\n border: 1px solid var(--mj-border-default, #223254);\n }\n .mj-card-body[_ngcontent-%COMP%] {\n padding: 14px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n .mj-metric-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 12px;\n }\n .mj-metric-label[_ngcontent-%COMP%] { color: var(--mj-text-secondary, #94a3b8); }\n .mj-fork-note[_ngcontent-%COMP%] { font-size: 11px; color: var(--mj-text-muted); margin-top: -6px; }\n .mj-metric-val[_ngcontent-%COMP%] { font-weight: 600; color: var(--mj-text-primary, #f8fafc); font-family: monospace; }\n .mj-load-error[_ngcontent-%COMP%] { font-size: 12px; color: var(--mj-status-error); }\n .mj-pill[_ngcontent-%COMP%] { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }\n .mj-pill-green[_ngcontent-%COMP%] { background: rgba(16, 185, 129, 0.15); color: #10b981; }\n .mj-pill-blue[_ngcontent-%COMP%] { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }"], changeDetection: 0 }); }
|
|
188
245
|
};
|
|
189
246
|
ConversationOverviewPanel = __decorate([
|
|
190
247
|
RegisterClassEx(BaseFormPanel, {
|
|
@@ -206,7 +263,7 @@ export { ConversationOverviewPanel };
|
|
|
206
263
|
<div class="mj-card-header">
|
|
207
264
|
<div class="mj-card-title"><i class="fa-solid fa-comments" style="color: var(--mj-brand-primary, #38bdf8);"></i> Turn Summary</div>
|
|
208
265
|
@if (!LoadError) {
|
|
209
|
-
<span class="mj-card-badge">{{
|
|
266
|
+
<span class="mj-card-badge">{{ TotalMessageCount }} Turns</span>
|
|
210
267
|
}
|
|
211
268
|
</div>
|
|
212
269
|
<div class="mj-card-body">
|
|
@@ -215,8 +272,11 @@ export { ConversationOverviewPanel };
|
|
|
215
272
|
} @else {
|
|
216
273
|
<div class="mj-metric-row">
|
|
217
274
|
<span class="mj-metric-label">Total Messages</span>
|
|
218
|
-
<span class="mj-metric-val">{{
|
|
275
|
+
<span class="mj-metric-val">{{ TotalMessageCount }}</span>
|
|
219
276
|
</div>
|
|
277
|
+
@if (ForkCount > 0) {
|
|
278
|
+
<div class="mj-fork-note">plus {{ ForkCount }} {{ ForkCount === 1 ? 'fork' : 'forks' }}</div>
|
|
279
|
+
}
|
|
220
280
|
<div class="mj-metric-row">
|
|
221
281
|
<span class="mj-metric-label">User Prompts</span>
|
|
222
282
|
<span class="mj-metric-val">{{ UserMessageCount }}</span>
|
|
@@ -255,7 +315,7 @@ export { ConversationOverviewPanel };
|
|
|
255
315
|
</div>
|
|
256
316
|
</div>
|
|
257
317
|
</div>
|
|
258
|
-
`, styles: ["\n :host { display: block; width: 100%; margin-bottom: 20px; }\n .mj-convo-overview-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 16px;\n }\n .mj-overview-card {\n background: var(--mj-bg-surface-card, #141f36);\n border: 1px solid var(--mj-border-default, #223254);\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n .mj-card-header {\n padding: 10px 14px;\n background: var(--mj-bg-surface, #111a2e);\n border-bottom: 1px solid var(--mj-border-default, #223254);\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n .mj-card-title {\n font-size: 12.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #f8fafc);\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .mj-card-badge {\n font-size: 11px;\n padding: 2px 7px;\n border-radius: 9999px;\n background: var(--mj-bg-surface-elevated, #1a2744);\n color: var(--mj-text-secondary, #94a3b8);\n border: 1px solid var(--mj-border-default, #223254);\n }\n .mj-card-body {\n padding: 14px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n .mj-metric-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 12px;\n }\n .mj-metric-label { color: var(--mj-text-secondary, #94a3b8); }\n .mj-metric-val { font-weight: 600; color: var(--mj-text-primary, #f8fafc); font-family: monospace; }\n .mj-load-error { font-size: 12px; color: var(--mj-status-error); }\n .mj-pill { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }\n .mj-pill-green { background: rgba(16, 185, 129, 0.15); color: #10b981; }\n .mj-pill-blue { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }\n "] }]
|
|
318
|
+
`, styles: ["\n :host { display: block; width: 100%; margin-bottom: 20px; }\n .mj-convo-overview-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 16px;\n }\n .mj-overview-card {\n background: var(--mj-bg-surface-card, #141f36);\n border: 1px solid var(--mj-border-default, #223254);\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n .mj-card-header {\n padding: 10px 14px;\n background: var(--mj-bg-surface, #111a2e);\n border-bottom: 1px solid var(--mj-border-default, #223254);\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n .mj-card-title {\n font-size: 12.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #f8fafc);\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .mj-card-badge {\n font-size: 11px;\n padding: 2px 7px;\n border-radius: 9999px;\n background: var(--mj-bg-surface-elevated, #1a2744);\n color: var(--mj-text-secondary, #94a3b8);\n border: 1px solid var(--mj-border-default, #223254);\n }\n .mj-card-body {\n padding: 14px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n .mj-metric-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 12px;\n }\n .mj-metric-label { color: var(--mj-text-secondary, #94a3b8); }\n .mj-fork-note { font-size: 11px; color: var(--mj-text-muted); margin-top: -6px; }\n .mj-metric-val { font-weight: 600; color: var(--mj-text-primary, #f8fafc); font-family: monospace; }\n .mj-load-error { font-size: 12px; color: var(--mj-status-error); }\n .mj-pill { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }\n .mj-pill-green { background: rgba(16, 185, 129, 0.15); color: #10b981; }\n .mj-pill-blue { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }\n "] }]
|
|
259
319
|
}], null, null); })();
|
|
260
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationOverviewPanel, { className: "ConversationOverviewPanel", filePath: "src/lib/custom/Conversations/conversation-overview.panel.ts", lineNumber:
|
|
320
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationOverviewPanel, { className: "ConversationOverviewPanel", filePath: "src/lib/custom/Conversations/conversation-overview.panel.ts", lineNumber: 151 }); })();
|
|
261
321
|
//# sourceMappingURL=conversation-overview.panel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-overview.panel.js","sourceRoot":"","sources":["../../../../src/lib/custom/Conversations/conversation-overview.panel.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAU,MAAM,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACtG,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;;;;IA8BtC,kCAA4B;IAAA,YAA2B;IAAA,oBAAO;;;IAAlC,cAA2B;IAA3B,2DAA2B;;;IAKvD,kCAA4B;IAAA,YAAe;IAAA,oBAAO;;;IAAtB,cAAe;IAAf,sCAAe;;;IAGvC,AADJ,kCAA2B,eACO;IAAA,8BAAc;IAAA,oBAAO;IACnD,mCAA4B;IAAA,YAAqB;IACrD,AADqD,oBAAO,EACtD;IAEF,AADJ,kCAA2B,eACO;IAAA,4BAAY;IAAA,oBAAO;IACjD,mCAA4B;IAAA,YAAsB;IACtD,AADsD,oBAAO,EACvD;IAEF,AADJ,mCAA2B,gBACO;IAAA,gCAAe;IAAA,oBAAO;IACpD,oCAA4B;IAAA,aAAuB;IACvD,AADuD,oBAAO,EACxD;;;IAT0B,eAAqB;IAArB,4CAAqB;IAIrB,eAAsB;IAAtB,6CAAsB;IAItB,eAAuB;I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wRA3DQ,yBAAyB,yBAAzB,yBAAyB;oEAAzB,yBAAyB;YA/GlB,AADJ,AADJ,AAFJ,iCAAoC,aAEF,aACE,aACG;YAAA,0BAAqF;YAAC,6BAAY;YAAA,oBAAM;YACnI,4FAAkB;YAGtB,oBAAM;YACN,iCAA0B;YAGpB,AAFF,4FAAiB,4DAER;YAejB,AADI,oBAAM,EACJ;YAKE,AADJ,AADJ,kCAA8B,cACE,cACG;YAAA,2BAAqE;YAAC,8BAAY;YAAA,oBAAM;YACnH,mCAA4B;YAAA,wBAAO;YACvC,AADuC,oBAAO,EACxC;YACN,kCAA0B;YAKpB,AAFA,AAFF,8FAAiB,wEAEmB,6DAE3B;YAcrB,AADI,AADI,oBAAM,EACJ,EACJ;;YAjDM,eAEC;YAFD,yCAEC;YAGD,eAeC;YAfD,uCAeC;YAWD,gBAeC;YAfD,0EAeC;4BAtDP,YAAY;;AAsHb,yBAAyB;IAjIrC,eAAe,CAAC,aAAa,EAAE;QAC5B,GAAG,EAAE,uCAAuC;QAC5C,QAAQ,EAAE;YACN,MAAM,EAAE,mBAAmB;YAC3B,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE,EAAE;SACd;KACJ,CAAC;GA0HW,yBAAyB,CA4DrC;;iFA5DY,yBAAyB;cAzHrC,SAAS;2BACI,gCAAgC,cAC9B,IAAI,WACP,CAAC,YAAY,CAAC,mBACN,uBAAuB,CAAC,MAAM,YACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwDT;;kFA4DQ,yBAAyB","sourcesContent":["import { Component, ChangeDetectionStrategy, OnInit, inject, ChangeDetectorRef } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RunView } from '@memberjunction/core';\nimport { RegisterClassEx } from '@memberjunction/global';\nimport { BaseFormPanel } from '@memberjunction/ng-base-forms';\nimport { MJConversationDetailEntity, MJConversationEntity } from '@memberjunction/core-entities';\n\ninterface ConversationDetailRow {\n ID: string;\n Role: MJConversationDetailEntity['Role'];\n Message: string;\n CreatedAt: string;\n}\n\n@RegisterClassEx(BaseFormPanel, {\n key: 'form-panel:MJ: Conversations:overview',\n metadata: {\n entity: 'MJ: Conversations',\n slot: 'before-fields',\n sortKey: 10,\n },\n})\n@Component({\n selector: 'mj-conversation-overview-panel',\n standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"mj-convo-overview-grid\">\n <!-- Card 1: Message Flow Metrics -->\n <div class=\"mj-overview-card\">\n <div class=\"mj-card-header\">\n <div class=\"mj-card-title\"><i class=\"fa-solid fa-comments\" style=\"color: var(--mj-brand-primary, #38bdf8);\"></i> Turn Summary</div>\n @if (!LoadError) {\n <span class=\"mj-card-badge\">{{ Messages.length }} Turns</span>\n }\n </div>\n <div class=\"mj-card-body\">\n @if (LoadError) {\n <span class=\"mj-load-error\">{{ LoadError }}</span>\n } @else {\n <div class=\"mj-metric-row\">\n <span class=\"mj-metric-label\">Total Messages</span>\n <span class=\"mj-metric-val\">{{ Messages.length }}</span>\n </div>\n <div class=\"mj-metric-row\">\n <span class=\"mj-metric-label\">User Prompts</span>\n <span class=\"mj-metric-val\">{{ UserMessageCount }}</span>\n </div>\n <div class=\"mj-metric-row\">\n <span class=\"mj-metric-label\">Agent Responses</span>\n <span class=\"mj-metric-val\">{{ AgentMessageCount }}</span>\n </div>\n }\n </div>\n </div>\n\n <!-- Card 2: Recent Activity Stream -->\n <div class=\"mj-overview-card\">\n <div class=\"mj-card-header\">\n <div class=\"mj-card-title\"><i class=\"fa-solid fa-clock-rotate-left\" style=\"color: #10b981;\"></i> Recent Turns</div>\n <span class=\"mj-card-badge\">History</span>\n </div>\n <div class=\"mj-card-body\">\n @if (LoadError) {\n <span class=\"mj-load-error\">{{ LoadError }}</span>\n } @else if (Messages.length === 0) {\n <span style=\"font-size: 12px; color: var(--mj-text-muted);\">No messages in this conversation yet.</span>\n } @else {\n @for (msg of RecentMessages; track msg.ID) {\n <div class=\"mj-metric-row\">\n <span class=\"mj-metric-label\" style=\"text-overflow: ellipsis; overflow: hidden; white-space: nowrap; max-width: 200px;\">\n <strong>{{ msg.Role }}:</strong> {{ msg.Message }}\n </span>\n <span class=\"mj-pill\" [class.mj-pill-blue]=\"IsUserTurn(msg)\" [class.mj-pill-green]=\"IsAgentTurn(msg)\">\n {{ msg.Role }}\n </span>\n </div>\n }\n }\n </div>\n </div>\n </div>\n `,\n styles: [`\n :host { display: block; width: 100%; margin-bottom: 20px; }\n .mj-convo-overview-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 16px;\n }\n .mj-overview-card {\n background: var(--mj-bg-surface-card, #141f36);\n border: 1px solid var(--mj-border-default, #223254);\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n .mj-card-header {\n padding: 10px 14px;\n background: var(--mj-bg-surface, #111a2e);\n border-bottom: 1px solid var(--mj-border-default, #223254);\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n .mj-card-title {\n font-size: 12.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #f8fafc);\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .mj-card-badge {\n font-size: 11px;\n padding: 2px 7px;\n border-radius: 9999px;\n background: var(--mj-bg-surface-elevated, #1a2744);\n color: var(--mj-text-secondary, #94a3b8);\n border: 1px solid var(--mj-border-default, #223254);\n }\n .mj-card-body {\n padding: 14px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n .mj-metric-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 12px;\n }\n .mj-metric-label { color: var(--mj-text-secondary, #94a3b8); }\n .mj-metric-val { font-weight: 600; color: var(--mj-text-primary, #f8fafc); font-family: monospace; }\n .mj-load-error { font-size: 12px; color: var(--mj-status-error); }\n .mj-pill { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }\n .mj-pill-green { background: rgba(16, 185, 129, 0.15); color: #10b981; }\n .mj-pill-blue { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }\n `]\n})\nexport class ConversationOverviewPanel extends BaseFormPanel<MJConversationEntity> implements OnInit {\n private cdr = inject(ChangeDetectorRef);\n public Messages: ConversationDetailRow[] = [];\n /** Set when the query fails, so the cards show the failure instead of zero messages. */\n public LoadError: string | null = null;\n\n public ngOnInit(): void {\n this.loadConversationMessages();\n }\n\n public get UserMessageCount(): number {\n return this.Messages.filter(m => this.IsUserTurn(m)).length;\n }\n\n public get AgentMessageCount(): number {\n return this.Messages.filter(m => this.IsAgentTurn(m)).length;\n }\n\n /** A turn the user sent. `Role` is stored as 'User', 'AI' or 'Error'. */\n protected IsUserTurn(detail: ConversationDetailRow): boolean {\n return detail.Role === 'User';\n }\n\n /** A turn an agent sent. An 'Error' turn is neither a user turn nor an agent turn. */\n protected IsAgentTurn(detail: ConversationDetailRow): boolean {\n return detail.Role === 'AI';\n }\n\n public get RecentMessages(): ConversationDetailRow[] {\n return this.Messages.slice(0, 4);\n }\n\n private async loadConversationMessages(): Promise<void> {\n if (!this.Record?.ID) return;\n try {\n const rv = new RunView();\n const res = await rv.RunView<ConversationDetailRow>({\n EntityName: 'MJ: Conversation Details',\n ExtraFilter: `ConversationID = '${this.Record.ID}'`,\n Fields: ['ID', 'Role', 'Message', '__mj_CreatedAt'],\n OrderBy: '__mj_CreatedAt DESC',\n MaxRows: 50,\n ResultType: 'simple'\n });\n if (res.Success) {\n this.Messages = res.Results ?? [];\n } else {\n this.showLoadError(res.ErrorMessage);\n }\n } catch (e) {\n console.error('Failed to load conversation details:', e);\n this.showLoadError(e instanceof Error ? e.message : undefined);\n }\n this.cdr.markForCheck();\n }\n\n /** Shows a short \"could not load\" line, with the underlying message when there is one. */\n private showLoadError(detail: string | undefined): void {\n this.LoadError = detail ? `Could not load messages: ${detail}` : 'Could not load messages.';\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"conversation-overview.panel.js","sourceRoot":"","sources":["../../../../src/lib/custom/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ClF,aAAa,CAAC,MAA0B;QAC5C,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,4BAA4B,MAAM,EAAE,CAAC,CAAC,CAAC,0BAA0B,CAAC;IAChG,CAAC;wRApGQ,yBAAyB,yBAAzB,yBAAyB;oEAAzB,yBAAyB;YAnHlB,AADJ,AADJ,AAFJ,iCAAoC,aAEF,aACE,aACG;YAAA,0BAAqF;YAAC,6BAAY;YAAA,oBAAM;YACnI,4FAAkB;YAGtB,oBAAM;YACN,iCAA0B;YAGpB,AAFF,4FAAiB,4DAER;YAkBjB,AADI,oBAAM,EACJ;YAKE,AADJ,AADJ,kCAA8B,cACE,cACG;YAAA,2BAAqE;YAAC,8BAAY;YAAA,oBAAM;YACnH,mCAA4B;YAAA,wBAAO;YACvC,AADuC,oBAAO,EACxC;YACN,kCAA0B;YAKpB,AAFA,AAFF,8FAAiB,wEAEmB,6DAE3B;YAcrB,AADI,AADI,oBAAM,EACJ,EACJ;;YApDM,eAEC;YAFD,yCAEC;YAGD,eAkBC;YAlBD,uCAkBC;YAWD,gBAeC;YAfD,0EAeC;4BAzDP,YAAY;;AA0Hb,yBAAyB;IArIrC,eAAe,CAAC,aAAa,EAAE;QAC5B,GAAG,EAAE,uCAAuC;QAC5C,QAAQ,EAAE;YACN,MAAM,EAAE,mBAAmB;YAC3B,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE,EAAE;SACd;KACJ,CAAC;GA8HW,yBAAyB,CAqGrC;;iFArGY,yBAAyB;cA7HrC,SAAS;2BACI,gCAAgC,cAC9B,IAAI,WACP,CAAC,YAAY,CAAC,mBACN,uBAAuB,CAAC,MAAM,YACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2DT;;kFA6DQ,yBAAyB","sourcesContent":["import { Component, ChangeDetectionStrategy, OnInit, inject, ChangeDetectorRef } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IMetadataProvider, LogError, Metadata, RunView } from '@memberjunction/core';\nimport { EscapeSQLString, RegisterClassEx } from '@memberjunction/global';\nimport { BaseFormPanel } from '@memberjunction/ng-base-forms';\nimport { ConversationEngine, MJConversationDetailEntity, MJConversationEntity } from '@memberjunction/core-entities';\n\ninterface ConversationDetailRow {\n ID: string;\n Role: MJConversationDetailEntity['Role'];\n Message: string;\n CreatedAt: string;\n}\n\n/** Number of newest messages the Recent Turns card shows. */\nconst RECENT_MESSAGE_COUNT = 4;\n\n@RegisterClassEx(BaseFormPanel, {\n key: 'form-panel:MJ: Conversations:overview',\n metadata: {\n entity: 'MJ: Conversations',\n slot: 'before-fields',\n sortKey: 10,\n },\n})\n@Component({\n selector: 'mj-conversation-overview-panel',\n standalone: true,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"mj-convo-overview-grid\">\n <!-- Card 1: Message Flow Metrics -->\n <div class=\"mj-overview-card\">\n <div class=\"mj-card-header\">\n <div class=\"mj-card-title\"><i class=\"fa-solid fa-comments\" style=\"color: var(--mj-brand-primary, #38bdf8);\"></i> Turn Summary</div>\n @if (!LoadError) {\n <span class=\"mj-card-badge\">{{ TotalMessageCount }} Turns</span>\n }\n </div>\n <div class=\"mj-card-body\">\n @if (LoadError) {\n <span class=\"mj-load-error\">{{ LoadError }}</span>\n } @else {\n <div class=\"mj-metric-row\">\n <span class=\"mj-metric-label\">Total Messages</span>\n <span class=\"mj-metric-val\">{{ TotalMessageCount }}</span>\n </div>\n @if (ForkCount > 0) {\n <div class=\"mj-fork-note\">plus {{ ForkCount }} {{ ForkCount === 1 ? 'fork' : 'forks' }}</div>\n }\n <div class=\"mj-metric-row\">\n <span class=\"mj-metric-label\">User Prompts</span>\n <span class=\"mj-metric-val\">{{ UserMessageCount }}</span>\n </div>\n <div class=\"mj-metric-row\">\n <span class=\"mj-metric-label\">Agent Responses</span>\n <span class=\"mj-metric-val\">{{ AgentMessageCount }}</span>\n </div>\n }\n </div>\n </div>\n\n <!-- Card 2: Recent Activity Stream -->\n <div class=\"mj-overview-card\">\n <div class=\"mj-card-header\">\n <div class=\"mj-card-title\"><i class=\"fa-solid fa-clock-rotate-left\" style=\"color: #10b981;\"></i> Recent Turns</div>\n <span class=\"mj-card-badge\">History</span>\n </div>\n <div class=\"mj-card-body\">\n @if (LoadError) {\n <span class=\"mj-load-error\">{{ LoadError }}</span>\n } @else if (Messages.length === 0) {\n <span style=\"font-size: 12px; color: var(--mj-text-muted);\">No messages in this conversation yet.</span>\n } @else {\n @for (msg of RecentMessages; track msg.ID) {\n <div class=\"mj-metric-row\">\n <span class=\"mj-metric-label\" style=\"text-overflow: ellipsis; overflow: hidden; white-space: nowrap; max-width: 200px;\">\n <strong>{{ msg.Role }}:</strong> {{ msg.Message }}\n </span>\n <span class=\"mj-pill\" [class.mj-pill-blue]=\"IsUserTurn(msg)\" [class.mj-pill-green]=\"IsAgentTurn(msg)\">\n {{ msg.Role }}\n </span>\n </div>\n }\n }\n </div>\n </div>\n </div>\n `,\n styles: [`\n :host { display: block; width: 100%; margin-bottom: 20px; }\n .mj-convo-overview-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 16px;\n }\n .mj-overview-card {\n background: var(--mj-bg-surface-card, #141f36);\n border: 1px solid var(--mj-border-default, #223254);\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n .mj-card-header {\n padding: 10px 14px;\n background: var(--mj-bg-surface, #111a2e);\n border-bottom: 1px solid var(--mj-border-default, #223254);\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n .mj-card-title {\n font-size: 12.5px;\n font-weight: 700;\n color: var(--mj-text-primary, #f8fafc);\n display: flex;\n align-items: center;\n gap: 8px;\n }\n .mj-card-badge {\n font-size: 11px;\n padding: 2px 7px;\n border-radius: 9999px;\n background: var(--mj-bg-surface-elevated, #1a2744);\n color: var(--mj-text-secondary, #94a3b8);\n border: 1px solid var(--mj-border-default, #223254);\n }\n .mj-card-body {\n padding: 14px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n }\n .mj-metric-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 12px;\n }\n .mj-metric-label { color: var(--mj-text-secondary, #94a3b8); }\n .mj-fork-note { font-size: 11px; color: var(--mj-text-muted); margin-top: -6px; }\n .mj-metric-val { font-weight: 600; color: var(--mj-text-primary, #f8fafc); font-family: monospace; }\n .mj-load-error { font-size: 12px; color: var(--mj-status-error); }\n .mj-pill { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }\n .mj-pill-green { background: rgba(16, 185, 129, 0.15); color: #10b981; }\n .mj-pill-blue { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }\n `]\n})\nexport class ConversationOverviewPanel extends BaseFormPanel<MJConversationEntity> implements OnInit {\n private cdr = inject(ChangeDetectorRef);\n /** The newest messages in Main, newest first. */\n public Messages: ConversationDetailRow[] = [];\n /** Messages in Main. */\n public TotalMessageCount = 0;\n /** User messages in Main. */\n public UserMessageCount = 0;\n /** AI messages in Main. */\n public AgentMessageCount = 0;\n /** Forks of the conversation. */\n public ForkCount = 0;\n /** Set when a read fails, so the cards show the failure instead of zero messages. */\n public LoadError: string | null = null;\n\n public ngOnInit(): void {\n this.loadConversationMessages();\n }\n\n /** A turn the user sent. `Role` is stored as 'User', 'AI' or 'Error'. */\n protected IsUserTurn(detail: ConversationDetailRow): boolean {\n return detail.Role === 'User';\n }\n\n /** A turn an agent sent. An 'Error' turn is neither a user turn nor an agent turn. */\n protected IsAgentTurn(detail: ConversationDetailRow): boolean {\n return detail.Role === 'AI';\n }\n\n public get RecentMessages(): ConversationDetailRow[] {\n return this.Messages.slice(0, RECENT_MESSAGE_COUNT);\n }\n\n /** The host form's provider, or the default provider when the panel has no host form. */\n private get providerToUse(): IMetadataProvider {\n return this.FormComponent?.ProviderToUse ?? Metadata.Provider; // global-provider-ok: BaseFormPanel has no Provider input; a panel without a host form uses the default provider\n }\n\n /**\n * Loads the counts and newest messages in Main, and the conversation's fork count, in one\n * batch. When a detail read fails, the cards show the failure.\n */\n private async loadConversationMessages(): Promise<void> {\n if (!this.Record?.ID) return;\n const provider = this.providerToUse;\n const scope = ConversationEngine.TrunkScope(this.Record.ID);\n try {\n const rv = RunView.FromMetadataProvider(provider);\n const [total, user, agent, recent, forks] = await rv.RunViews<ConversationDetailRow>([\n {\n EntityName: 'MJ: Conversation Details',\n ExtraFilter: ConversationEngine.ScopeFilter(scope),\n ResultType: 'count_only',\n },\n {\n EntityName: 'MJ: Conversation Details',\n ExtraFilter: `${ConversationEngine.ScopeFilter(scope)} AND [Role]='User'`,\n ResultType: 'count_only',\n },\n {\n EntityName: 'MJ: Conversation Details',\n ExtraFilter: `${ConversationEngine.ScopeFilter(scope)} AND [Role]='AI'`,\n ResultType: 'count_only',\n },\n {\n EntityName: 'MJ: Conversation Details',\n ExtraFilter: ConversationEngine.ScopeFilter(scope),\n Fields: ['ID', 'Role', 'Message', '__mj_CreatedAt'],\n OrderBy: 'Sequence DESC',\n MaxRows: RECENT_MESSAGE_COUNT,\n ResultType: 'simple',\n },\n {\n EntityName: 'MJ: Conversation Branches',\n ExtraFilter: `ConversationID='${EscapeSQLString(this.Record.ID)}'`,\n ResultType: 'count_only',\n },\n ], provider.CurrentUser);\n const detailReads = [total, user, agent, recent];\n const failed = detailReads.findIndex(r => !r?.Success);\n if (failed >= 0) {\n this.showLoadError(detailReads[failed]?.ErrorMessage);\n } else {\n this.TotalMessageCount = total?.TotalRowCount ?? 0;\n this.UserMessageCount = user?.TotalRowCount ?? 0;\n this.AgentMessageCount = agent?.TotalRowCount ?? 0;\n this.Messages = recent?.Results ?? [];\n }\n this.ForkCount = forks?.Success ? forks.TotalRowCount : 0;\n } catch (e) {\n const message = e instanceof Error ? e.message : String(e);\n LogError(`Conversation overview: could not load the details of conversation ${this.Record.ID}: ${message}`);\n this.showLoadError(message);\n }\n this.cdr.markForCheck();\n }\n\n /** Shows a short \"could not load\" line, with the underlying message when there is one. */\n private showLoadError(detail: string | undefined): void {\n this.LoadError = detail ? `Could not load messages: ${detail}` : 'Could not load messages.';\n }\n}\n"]}
|
|
@@ -124,6 +124,14 @@ export declare class MJEntityFormComponentExtended extends MJEntityFormComponent
|
|
|
124
124
|
get allEntities(): EntityInfo[];
|
|
125
125
|
/** @deprecated Use {@link AllEntities}. */
|
|
126
126
|
set allEntities(value: EntityInfo[]);
|
|
127
|
+
private allEntitiesIndexSource;
|
|
128
|
+
private allEntitiesIndex;
|
|
129
|
+
/**
|
|
130
|
+
* AllEntities keyed by ID. Rebuilt only when AllEntities is replaced (it is never mutated in
|
|
131
|
+
* place), so per-render callers such as FormChromeCandidates look entities up in O(1) instead
|
|
132
|
+
* of scanning every entity once per relationship.
|
|
133
|
+
*/
|
|
134
|
+
private get allEntitiesByID();
|
|
127
135
|
/** All entity fields (flattened from all entities) for ERD details panel */
|
|
128
136
|
AllEntityFields: EntityFieldInfo[];
|
|
129
137
|
/** @deprecated Use {@link AllEntityFields}. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-form.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/custom/Entities/entity-form.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,MAAM,EACN,SAAS,EAGZ,MAAM,eAAe,CAAC;AAGvB,OAAO,EACH,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,iCAAiC,EACjC,oBAAoB,EAKpB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAChC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAInF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2DAA2D,CAAC;;AAElG,MAAM,MAAM,eAAe,G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,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMzD,0DAA0D;IACnD,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIlD,eAAe,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM;IAUtD,+CAA+C;IACxC,eAAe,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM;IAItD;;;;;OAKG;IACI,WAAW,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM;IAMtD,2CAA2C;IACpC,WAAW,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM;IAItD;;OAEG;IACI,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAY1C,2CAA2C;IACpC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAI1C;;OAEG;IACH,2FAA2F;IACpF,eAAe,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO;IAIhD,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAU7C,+CAA+C;IACxC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;yCAz/CpC,6BAA6B;2CAA7B,6BAA6B;CA4/CzC"}
|
|
1
|
+
{"version":3,"file":"entity-form.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/custom/Entities/entity-form.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,MAAM,EACN,SAAS,EAGZ,MAAM,eAAe,CAAC;AAGvB,OAAO,EACH,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,iCAAiC,EACjC,oBAAoB,EAKpB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAChC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAInF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAA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AAC,KAAK,EAAE,eAAe,GAAG,UAAU,GAAG,IAAI;IAI3D,uBAAuB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAO5D,uDAAuD;IAChD,uBAAuB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAI5D;;OAEG;IACI,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMzD,0DAA0D;IACnD,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIlD,eAAe,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM;IAUtD,+CAA+C;IACxC,eAAe,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM;IAItD;;;;;OAKG;IACI,WAAW,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM;IAMtD,2CAA2C;IACpC,WAAW,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM;IAItD;;OAEG;IACI,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAY1C,2CAA2C;IACpC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAI1C;;OAEG;IACH,2FAA2F;IACpF,eAAe,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO;IAIhD,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAU7C,+CAA+C;IACxC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;yCAzgDpC,6BAA6B;2CAA7B,6BAA6B;CA4gDzC"}
|
|
@@ -8,7 +8,7 @@ import { Component, ChangeDetectionStrategy, inject } from '@angular/core';
|
|
|
8
8
|
import { Subject } from 'rxjs';
|
|
9
9
|
import { debounceTime, takeUntil } from 'rxjs/operators';
|
|
10
10
|
import { CompositeKey, RunView, } from '@memberjunction/core';
|
|
11
|
-
import { RegisterClass, UUIDsEqual } from '@memberjunction/global';
|
|
11
|
+
import { IndexByUUID, RegisterClass, UUIDMap, UUIDsEqual } from '@memberjunction/global';
|
|
12
12
|
import { BaseFormComponent } from '@memberjunction/ng-base-forms';
|
|
13
13
|
import { SharedService } from '@memberjunction/ng-shared';
|
|
14
14
|
import { MJEntityFormComponent } from '../../generated/Entities/MJEntity/mjentity.form.component';
|
|
@@ -2742,6 +2742,8 @@ let MJEntityFormComponentExtended = class MJEntityFormComponentExtended extends
|
|
|
2742
2742
|
this.entity = null;
|
|
2743
2743
|
/** All entities for relationship lookups */
|
|
2744
2744
|
this.AllEntities = [];
|
|
2745
|
+
this.allEntitiesIndexSource = null;
|
|
2746
|
+
this.allEntitiesIndex = new UUIDMap();
|
|
2745
2747
|
/** All entity fields (flattened from all entities) for ERD details panel */
|
|
2746
2748
|
this.AllEntityFields = [];
|
|
2747
2749
|
/** Loading state */
|
|
@@ -2841,6 +2843,18 @@ let MJEntityFormComponentExtended = class MJEntityFormComponentExtended extends
|
|
|
2841
2843
|
set allEntities(value) {
|
|
2842
2844
|
this.AllEntities = value;
|
|
2843
2845
|
}
|
|
2846
|
+
/**
|
|
2847
|
+
* AllEntities keyed by ID. Rebuilt only when AllEntities is replaced (it is never mutated in
|
|
2848
|
+
* place), so per-render callers such as FormChromeCandidates look entities up in O(1) instead
|
|
2849
|
+
* of scanning every entity once per relationship.
|
|
2850
|
+
*/
|
|
2851
|
+
get allEntitiesByID() {
|
|
2852
|
+
if (this.allEntitiesIndexSource !== this.AllEntities) {
|
|
2853
|
+
this.allEntitiesIndex = IndexByUUID(this.AllEntities);
|
|
2854
|
+
this.allEntitiesIndexSource = this.AllEntities;
|
|
2855
|
+
}
|
|
2856
|
+
return this.allEntitiesIndex;
|
|
2857
|
+
}
|
|
2844
2858
|
/** @deprecated Use {@link AllEntityFields}. */
|
|
2845
2859
|
get allEntityFields() {
|
|
2846
2860
|
return this.AllEntityFields;
|
|
@@ -3355,7 +3369,7 @@ let MJEntityFormComponentExtended = class MJEntityFormComponentExtended extends
|
|
|
3355
3369
|
existing.fields.push(field);
|
|
3356
3370
|
}
|
|
3357
3371
|
else {
|
|
3358
|
-
const relatedEntity = this.
|
|
3372
|
+
const relatedEntity = this.allEntitiesByID.Get(field.RelatedEntityID);
|
|
3359
3373
|
outgoingMap.set(field.RelatedEntityID, {
|
|
3360
3374
|
entityId: field.RelatedEntityID,
|
|
3361
3375
|
entityName: relatedEntity?.Name || field.RelatedEntity || 'Unknown',
|
|
@@ -3404,7 +3418,7 @@ let MJEntityFormComponentExtended = class MJEntityFormComponentExtended extends
|
|
|
3404
3418
|
this.OrganicKeysOutgoing = this.entity.OrganicKeys.map(ok => ({
|
|
3405
3419
|
OrganicKey: ok,
|
|
3406
3420
|
RelatedEntities: ok.RelatedEntities.map(re => {
|
|
3407
|
-
const relEntity = this.
|
|
3421
|
+
const relEntity = this.allEntitiesByID.Get(re.RelatedEntityID);
|
|
3408
3422
|
return {
|
|
3409
3423
|
Info: re,
|
|
3410
3424
|
EntityName: re.RelatedEntity || relEntity?.Name || 'Unknown',
|
|
@@ -3483,7 +3497,7 @@ let MJEntityFormComponentExtended = class MJEntityFormComponentExtended extends
|
|
|
3483
3497
|
RelatedEntity: rel.RelatedEntity,
|
|
3484
3498
|
RelatedEntityID: rel.RelatedEntityID,
|
|
3485
3499
|
RelatedEntityJoinField: rel.RelatedEntityJoinField,
|
|
3486
|
-
RelatedEntitySchemaName: this.
|
|
3500
|
+
RelatedEntitySchemaName: this.allEntitiesByID.Get(rel.RelatedEntityID)?.SchemaName ?? '',
|
|
3487
3501
|
DisplayInForm: rel.DisplayInForm,
|
|
3488
3502
|
DisplayLocation: rel.DisplayLocation,
|
|
3489
3503
|
DisplayComponentID: rel.DisplayComponentID,
|