@memberjunction/ng-explorer-core 5.41.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.
- package/dist/generated/lazy-feature-config.d.ts +1 -1
- package/dist/generated/lazy-feature-config.d.ts.map +1 -1
- package/dist/generated/lazy-feature-config.js +5 -2
- package/dist/generated/lazy-feature-config.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts +7 -0
- package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-collections-resource.component.js +42 -22
- package/dist/lib/resource-wrappers/chat-collections-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/livekit-room-resource.component.d.ts +179 -0
- package/dist/lib/resource-wrappers/livekit-room-resource.component.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/livekit-room-resource.component.js +1197 -0
- package/dist/lib/resource-wrappers/livekit-room-resource.component.js.map +1 -0
- package/dist/lib/shell/components/header/app-nav.component.js +7 -4
- package/dist/lib/shell/components/header/app-nav.component.js.map +1 -1
- package/dist/lib/shell/components/header/app-switcher.component.js +11 -6
- package/dist/lib/shell/components/header/app-switcher.component.js.map +1 -1
- package/dist/lib/shell/shell.module.d.ts +1 -1
- package/dist/lib/shell/shell.module.d.ts.map +1 -1
- package/dist/lib/shell/shell.module.js +3 -1
- package/dist/lib/shell/shell.module.js.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.d.ts +6 -0
- package/dist/lib/user-notifications/user-notifications.component.d.ts.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.js +32 -1
- package/dist/lib/user-notifications/user-notifications.component.js.map +1 -1
- package/dist/module.d.ts +33 -31
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +11 -4
- package/dist/module.js.map +1 -1
- package/package.json +47 -46
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { BaseResourceComponent } from '@memberjunction/ng-shared';
|
|
3
|
+
import { ResourceData } from '@memberjunction/core-entities';
|
|
4
|
+
import { UUIDsEqual } from '@memberjunction/global';
|
|
5
|
+
import { RealtimeModelVoices, RealtimeVoiceOption } from '@memberjunction/graphql-dataprovider';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/** A selectable target agent for the pre-join picker. */
|
|
8
|
+
interface TargetAgentChoice {
|
|
9
|
+
ID: string;
|
|
10
|
+
Name: string;
|
|
11
|
+
Description: string | null;
|
|
12
|
+
}
|
|
13
|
+
/** A user shown in the "Invite people" search/selection. */
|
|
14
|
+
interface InviteeChoice {
|
|
15
|
+
ID: string;
|
|
16
|
+
Name: string;
|
|
17
|
+
Email: string | null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* LiveKit Room Resource — hosts the MJ-native LiveKit room (`mj-livekit-agent-room`) as an Explorer tab
|
|
21
|
+
* (the **Meet** app's "Live Room").
|
|
22
|
+
*
|
|
23
|
+
* Flow: resolve the Realtime **co-agent** (voice front-end), then show a **pre-join picker** to choose
|
|
24
|
+
* the **target** agent you're "calling" (the co-agent voices it via `invoke-target-agent` — without a
|
|
25
|
+
* target it sits idle). "Start call" joins the room. An explicit `ResourceRecordID` skips the picker and
|
|
26
|
+
* calls that agent directly.
|
|
27
|
+
*
|
|
28
|
+
* Registered via `@RegisterClass(BaseResourceComponent, 'LiveKitRoomResource')`.
|
|
29
|
+
*/
|
|
30
|
+
export declare class LiveKitRoomResource extends BaseResourceComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
31
|
+
/** Render phase: spinner while resolving → landing (new/existing/history) → picker/existing/history → live room. */
|
|
32
|
+
phase: 'loading' | 'landing' | 'picking' | 'existing' | 'history' | 'live' | 'error';
|
|
33
|
+
/** Currently-active rooms (a distinct `ExternalConnectionID` with ≥1 connected agent bridge). */
|
|
34
|
+
activeRooms: {
|
|
35
|
+
RoomName: string;
|
|
36
|
+
Label: string;
|
|
37
|
+
AgentCount: number;
|
|
38
|
+
}[];
|
|
39
|
+
/** True while loading the active-rooms list. */
|
|
40
|
+
loadingActive: boolean;
|
|
41
|
+
/** Free-text room name to join directly (the "join by name/code" path). */
|
|
42
|
+
manualRoomName: string;
|
|
43
|
+
/** Past meeting rooms (the `MJ: Conversations` of Type='Meeting Room' the bridge recorded). */
|
|
44
|
+
historyRooms: {
|
|
45
|
+
ConversationID: string;
|
|
46
|
+
Name: string;
|
|
47
|
+
At: Date;
|
|
48
|
+
}[];
|
|
49
|
+
/** True while loading the history list. */
|
|
50
|
+
loadingHistory: boolean;
|
|
51
|
+
/** The history room whose transcript is open (drill-in), or null for the list. */
|
|
52
|
+
openHistoryRoom: {
|
|
53
|
+
ConversationID: string;
|
|
54
|
+
Name: string;
|
|
55
|
+
} | null;
|
|
56
|
+
/** The opened room's transcript lines. */
|
|
57
|
+
historyTranscript: {
|
|
58
|
+
Kind: 'agent' | 'human' | 'error';
|
|
59
|
+
Speaker: string;
|
|
60
|
+
Message: string;
|
|
61
|
+
}[];
|
|
62
|
+
/** True while loading a room's transcript. */
|
|
63
|
+
loadingTranscript: boolean;
|
|
64
|
+
/** `'agent'` to start/voice an agent (the default), or `'join'` when opened from an invite link. */
|
|
65
|
+
roomMode: 'agent' | 'join';
|
|
66
|
+
/** The room to JOIN when opened via an invite link (`?room=…`); null in agent mode. */
|
|
67
|
+
joinRoomName: string | null;
|
|
68
|
+
/** The Realtime co-agent (voice front-end) id — the resolved default Realtime-type agent. */
|
|
69
|
+
agentId: string | null;
|
|
70
|
+
/** The TARGET agent the co-agent voices (the one being "called"); the bot is named after it. */
|
|
71
|
+
targetAgentId: string | null;
|
|
72
|
+
/** The target agent's display name — used as the bot name + addressing word ("Sage, …"). */
|
|
73
|
+
targetAgentName: string | null;
|
|
74
|
+
/** The agents offered in the pre-join picker (active, excluding the Realtime co-agent itself). */
|
|
75
|
+
agents: TargetAgentChoice[];
|
|
76
|
+
/** The currently-selected target in the picker (defaults to "Sage" when present). */
|
|
77
|
+
selectedTargetId: string | null;
|
|
78
|
+
/** Whether the current user may override the realtime model/voice (drives the dev pickers). */
|
|
79
|
+
canPickModelVoice: boolean;
|
|
80
|
+
/** Active Realtime models + their voices (loaded once when the user can override). */
|
|
81
|
+
realtimeModels: RealtimeModelVoices[];
|
|
82
|
+
/** The MODEL override chosen for the FIRST agent in the pre-join picker (null = default). */
|
|
83
|
+
selectedModelId: string | null;
|
|
84
|
+
/** The VOICE override chosen for the FIRST agent in the pre-join picker (null = default). */
|
|
85
|
+
selectedVoice: string | null;
|
|
86
|
+
/** Voices for the model chosen in the pre-join picker. */
|
|
87
|
+
get selectedModelVoices(): RealtimeVoiceOption[];
|
|
88
|
+
/** Records the pre-join MODEL choice; clears the voice so it can't outlive a model switch. */
|
|
89
|
+
onModelChange(event: Event): void;
|
|
90
|
+
/** Records the pre-join VOICE choice. */
|
|
91
|
+
onVoiceChange(event: Event): void;
|
|
92
|
+
/** Exposed for template use — platform-safe UUID equality (SQL upper vs PG lower). */
|
|
93
|
+
UUIDsEqual: typeof UUIDsEqual;
|
|
94
|
+
/** Set when no co-agent could be resolved — shown instead of the room. */
|
|
95
|
+
resolveError: string | null;
|
|
96
|
+
/** Whether the invite-people dialog is open. */
|
|
97
|
+
showInvite: boolean;
|
|
98
|
+
/** The room the invite targets (the live room name). */
|
|
99
|
+
inviteRoomName: string | null;
|
|
100
|
+
/** Current search text in the people search box. */
|
|
101
|
+
userSearch: string;
|
|
102
|
+
/** People matching the last search (minus already-selected + the current user). */
|
|
103
|
+
userResults: InviteeChoice[];
|
|
104
|
+
/** People chosen to invite. */
|
|
105
|
+
selectedInvitees: InviteeChoice[];
|
|
106
|
+
/** True while a people search is running. */
|
|
107
|
+
searching: boolean;
|
|
108
|
+
/** True once a search has run (drives the "no matches" empty state). */
|
|
109
|
+
searched: boolean;
|
|
110
|
+
/** True while invites are being sent. */
|
|
111
|
+
inviting: boolean;
|
|
112
|
+
/** Result/status message under the dialog. */
|
|
113
|
+
inviteMessage: string | null;
|
|
114
|
+
private readonly cdr;
|
|
115
|
+
/** Description of the selected target, shown under the picker. */
|
|
116
|
+
get selectedDescription(): string | null;
|
|
117
|
+
ngOnInit(): void;
|
|
118
|
+
/**
|
|
119
|
+
* Resolves the co-agent + target choices. Synchronous when the AI engine is already loaded (the common
|
|
120
|
+
* case — it bootstraps at startup) so the first render is settled (avoids NG0100 from an async branch
|
|
121
|
+
* flip under the app's frequent change-detection); a cold engine takes the async path and flushes.
|
|
122
|
+
*/
|
|
123
|
+
private resolve;
|
|
124
|
+
/** Resolves the co-agent, builds the target list, and chooses the next phase (live for an explicit record, else picker). */
|
|
125
|
+
private applyResolution;
|
|
126
|
+
/**
|
|
127
|
+
* The room disconnected (the user clicked **Leave** or **End meeting**, or the room dropped). Return to the
|
|
128
|
+
* Meet landing so they can start a new room, join another, or review history — rather than being stranded
|
|
129
|
+
* on a dead room. Resets the join state so the next "New room" / "Join existing" starts clean.
|
|
130
|
+
*/
|
|
131
|
+
onRoomLeft(): void;
|
|
132
|
+
/** Go to the "start a new room" picker. */
|
|
133
|
+
startNewRoom(): void;
|
|
134
|
+
/** Open the "join existing room" view and load the active rooms. */
|
|
135
|
+
openExisting(): void;
|
|
136
|
+
/** Open the "past meetings" history view and load the list. */
|
|
137
|
+
openHistory(): void;
|
|
138
|
+
/** Back to the Meet home. */
|
|
139
|
+
backToLanding(): void;
|
|
140
|
+
/** Joins an existing room by its LiveKit room name (the bridge `ExternalConnectionID`). */
|
|
141
|
+
joinExistingRoom(roomName: string): void;
|
|
142
|
+
/** Loads currently-active rooms: distinct rooms that have a Connected/Connecting agent bridge. */
|
|
143
|
+
private loadActiveRooms;
|
|
144
|
+
/** Loads past meetings: the `Meeting Room` conversations the bridge recorded, newest first. */
|
|
145
|
+
private loadHistory;
|
|
146
|
+
/** Opens a past meeting's transcript (drill-in). */
|
|
147
|
+
openTranscript(room: {
|
|
148
|
+
ConversationID: string;
|
|
149
|
+
Name: string;
|
|
150
|
+
}): Promise<void>;
|
|
151
|
+
/** Back to the history list from a transcript drill-in. */
|
|
152
|
+
closeTranscript(): void;
|
|
153
|
+
/** Formats a meeting timestamp for the history list (avoids a `date` pipe / CommonModule dependency). */
|
|
154
|
+
formatTime(d: Date): string;
|
|
155
|
+
/** Picker selection handler (native select; avoids a FormsModule dependency). */
|
|
156
|
+
onTargetChange(event: Event): void;
|
|
157
|
+
/** Loads active Realtime models + their voices for the dev pickers (best-effort; empty on failure). */
|
|
158
|
+
private loadRealtimeModels;
|
|
159
|
+
/** Commits the chosen target and switches to the live room. */
|
|
160
|
+
startCall(): void;
|
|
161
|
+
/** Opens the invite-people dialog for the given room. */
|
|
162
|
+
openInvite(roomName: string): void;
|
|
163
|
+
/** Searches `MJ: Users` by name/email, excluding the current user + already-selected people. */
|
|
164
|
+
searchUsers(): Promise<void>;
|
|
165
|
+
/** Adds a person to the invite list (and out of the results). */
|
|
166
|
+
addInvitee(user: InviteeChoice): void;
|
|
167
|
+
/** Removes a person from the invite list. */
|
|
168
|
+
removeInvitee(userId: string): void;
|
|
169
|
+
/** Sends the invites — the server notifies each person (in-app + Comms when configured). */
|
|
170
|
+
sendInvites(): Promise<void>;
|
|
171
|
+
ngAfterViewInit(): void;
|
|
172
|
+
ngOnDestroy(): void;
|
|
173
|
+
GetResourceDisplayName(_data: ResourceData): Promise<string>;
|
|
174
|
+
GetResourceIconClass(_data: ResourceData): Promise<string>;
|
|
175
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LiveKitRoomResource, never>;
|
|
176
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LiveKitRoomResource, "mj-livekit-room-resource", never, {}, {}, never, never, false, never>;
|
|
177
|
+
}
|
|
178
|
+
export {};
|
|
179
|
+
//# sourceMappingURL=livekit-room-resource.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"livekit-room-resource.component.d.ts","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/livekit-room-resource.component.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