@memberjunction/ng-conversations 2.128.0 → 2.130.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/lib/components/attachment/image-viewer.component.d.ts +95 -0
- package/dist/lib/components/attachment/image-viewer.component.d.ts.map +1 -0
- package/dist/lib/components/attachment/image-viewer.component.js +293 -0
- package/dist/lib/components/attachment/image-viewer.component.js.map +1 -0
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +88 -26
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +542 -338
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts +12 -3
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.js +68 -55
- package/dist/lib/components/conversation/conversation-empty-state.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +13 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +237 -119
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/mention/mention-editor.component.d.ts +102 -5
- package/dist/lib/components/mention/mention-editor.component.d.ts.map +1 -1
- package/dist/lib/components/mention/mention-editor.component.js +349 -21
- package/dist/lib/components/mention/mention-editor.component.js.map +1 -1
- package/dist/lib/components/message/agent-response-form.component.d.ts +18 -0
- package/dist/lib/components/message/agent-response-form.component.d.ts.map +1 -1
- package/dist/lib/components/message/agent-response-form.component.js +149 -26
- package/dist/lib/components/message/agent-response-form.component.js.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.js +3 -2
- package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -1
- package/dist/lib/components/message/form-question.component.js +3 -3
- package/dist/lib/components/message/message-input-box.component.d.ts +29 -2
- package/dist/lib/components/message/message-input-box.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input-box.component.js +79 -12
- package/dist/lib/components/message/message-input-box.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +60 -5
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +303 -119
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +41 -3
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +237 -106
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +7 -2
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +19 -4
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +7 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.js +28 -6
- package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +83 -10
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +290 -103
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +26 -25
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +7 -3
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/models/conversation-state.model.d.ts +2 -1
- package/dist/lib/models/conversation-state.model.d.ts.map +1 -1
- package/dist/lib/services/active-tasks.service.d.ts +23 -0
- package/dist/lib/services/active-tasks.service.d.ts.map +1 -1
- package/dist/lib/services/active-tasks.service.js +91 -2
- package/dist/lib/services/active-tasks.service.js.map +1 -1
- package/dist/lib/services/agent-state.service.d.ts +2 -0
- package/dist/lib/services/agent-state.service.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.js +20 -3
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +38 -6
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +233 -71
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-attachment.service.d.ts +79 -0
- package/dist/lib/services/conversation-attachment.service.d.ts.map +1 -0
- package/dist/lib/services/conversation-attachment.service.js +327 -0
- package/dist/lib/services/conversation-attachment.service.js.map +1 -0
- package/dist/lib/services/conversation-data.service.d.ts +15 -1
- package/dist/lib/services/conversation-data.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-data.service.js +23 -1
- package/dist/lib/services/conversation-data.service.js.map +1 -1
- package/dist/lib/services/conversation-streaming.service.d.ts +50 -1
- package/dist/lib/services/conversation-streaming.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-streaming.service.js +92 -4
- package/dist/lib/services/conversation-streaming.service.js.map +1 -1
- package/dist/lib/services/mention-autocomplete.service.d.ts +1 -1
- package/dist/lib/services/mention-autocomplete.service.d.ts.map +1 -1
- package/dist/lib/services/mention-parser.service.d.ts +16 -1
- package/dist/lib/services/mention-parser.service.d.ts.map +1 -1
- package/dist/lib/services/mention-parser.service.js +30 -0
- package/dist/lib/services/mention-parser.service.js.map +1 -1
- package/dist/public-api.d.ts +2 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +2 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +17 -17
|
@@ -1,5 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ============================================================================
|
|
3
|
+
* DEPRECATED - DO NOT USE
|
|
4
|
+
* ============================================================================
|
|
5
|
+
*
|
|
6
|
+
* This workspace component was used when conversations, collections, and tasks
|
|
7
|
+
* were all combined into a single tabbed interface.
|
|
8
|
+
*
|
|
9
|
+
* The new architecture uses SEPARATE resource components for each feature:
|
|
10
|
+
* - ChatConversationsResource for conversations
|
|
11
|
+
* - CollectionsResource for collections
|
|
12
|
+
* - TasksResource for tasks
|
|
13
|
+
*
|
|
14
|
+
* These resource components are located in @memberjunction/ng-explorer-core
|
|
15
|
+
* and integrate with MJExplorer's tab/navigation system.
|
|
16
|
+
*
|
|
17
|
+
* This file is kept for backwards compatibility only. Any new features or
|
|
18
|
+
* bug fixes should be made to the individual resource components instead.
|
|
19
|
+
* ============================================================================
|
|
20
|
+
*/
|
|
1
21
|
import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core';
|
|
2
|
-
import { ArtifactMetadataEngine } from '@memberjunction/core-entities';
|
|
22
|
+
import { ArtifactMetadataEngine, UserInfoEngine } from '@memberjunction/core-entities';
|
|
3
23
|
import { Metadata } from '@memberjunction/core';
|
|
4
24
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
5
25
|
import { Subject, takeUntil } from 'rxjs';
|
|
@@ -33,69 +53,76 @@ function ConversationWorkspaceComponent_Conditional_3_Template(rf, ctx) { if (rf
|
|
|
33
53
|
} }
|
|
34
54
|
function ConversationWorkspaceComponent_Conditional_4_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
35
55
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
36
|
-
i0.ɵɵelementStart(0, "div",
|
|
56
|
+
i0.ɵɵelementStart(0, "div", 14);
|
|
37
57
|
i0.ɵɵlistener("click", function ConversationWorkspaceComponent_Conditional_4_Conditional_1_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.closeSidebar()); });
|
|
38
58
|
i0.ɵɵelementEnd();
|
|
39
59
|
} }
|
|
40
60
|
function ConversationWorkspaceComponent_Conditional_4_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
41
61
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
42
|
-
i0.ɵɵelementStart(0, "div",
|
|
43
|
-
i0.ɵɵlistener("conversationSelected", function ConversationWorkspaceComponent_Conditional_4_div_2_Template_mj_conversation_sidebar_conversationSelected_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConversationSelected($event)); })("newConversationRequested", function ConversationWorkspaceComponent_Conditional_4_div_2_Template_mj_conversation_sidebar_newConversationRequested_1_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.startNewConversation()); });
|
|
62
|
+
i0.ɵɵelementStart(0, "div", 15)(1, "mj-conversation-sidebar", 16);
|
|
63
|
+
i0.ɵɵlistener("conversationSelected", function ConversationWorkspaceComponent_Conditional_4_div_2_Template_mj_conversation_sidebar_conversationSelected_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConversationSelected($event)); })("newConversationRequested", function ConversationWorkspaceComponent_Conditional_4_div_2_Template_mj_conversation_sidebar_newConversationRequested_1_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.startNewConversation()); })("pinSidebarRequested", function ConversationWorkspaceComponent_Conditional_4_div_2_Template_mj_conversation_sidebar_pinSidebarRequested_1_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.pinSidebar()); })("unpinSidebarRequested", function ConversationWorkspaceComponent_Conditional_4_div_2_Template_mj_conversation_sidebar_unpinSidebarRequested_1_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.unpinSidebar()); });
|
|
44
64
|
i0.ɵɵelementEnd()();
|
|
45
65
|
} if (rf & 2) {
|
|
46
66
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
47
|
-
i0.ɵɵstyleProp("width", ctx_r1.sidebarWidth, "px");
|
|
48
|
-
i0.ɵɵclassProp("open", ctx_r1.isSidebarVisible);
|
|
67
|
+
i0.ɵɵstyleProp("width", ctx_r1.isSidebarCollapsed ? 0 : ctx_r1.sidebarWidth, "px");
|
|
68
|
+
i0.ɵɵclassProp("open", ctx_r1.isSidebarVisible)("collapsed", ctx_r1.isSidebarCollapsed)("no-transition", !ctx_r1.sidebarTransitionsEnabled);
|
|
49
69
|
i0.ɵɵadvance();
|
|
50
|
-
i0.ɵɵproperty("activeTab", ctx_r1.activeTab)("environmentId", ctx_r1.environmentId)("currentUser", ctx_r1.currentUser)("selectedConversationId", ctx_r1.selectedConversationId)("renamedConversationId", ctx_r1.renamedConversationId);
|
|
70
|
+
i0.ɵɵproperty("activeTab", ctx_r1.activeTab)("environmentId", ctx_r1.environmentId)("currentUser", ctx_r1.currentUser)("selectedConversationId", ctx_r1.selectedConversationId)("renamedConversationId", ctx_r1.renamedConversationId)("isSidebarPinned", ctx_r1.isSidebarPinned)("isMobileView", ctx_r1.isMobileView);
|
|
51
71
|
} }
|
|
52
|
-
function
|
|
72
|
+
function ConversationWorkspaceComponent_Conditional_4_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
53
73
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
54
|
-
i0.ɵɵelementStart(0, "
|
|
55
|
-
i0.ɵɵlistener("
|
|
74
|
+
i0.ɵɵelementStart(0, "button", 17);
|
|
75
|
+
i0.ɵɵlistener("click", function ConversationWorkspaceComponent_Conditional_4_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.expandSidebar()); });
|
|
76
|
+
i0.ɵɵelement(1, "i", 18);
|
|
56
77
|
i0.ɵɵelementEnd();
|
|
57
78
|
} }
|
|
58
79
|
function ConversationWorkspaceComponent_Conditional_4_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
59
80
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
60
|
-
i0.ɵɵelementStart(0, "div",
|
|
61
|
-
i0.ɵɵlistener("
|
|
81
|
+
i0.ɵɵelementStart(0, "div", 19);
|
|
82
|
+
i0.ɵɵlistener("mousedown", function ConversationWorkspaceComponent_Conditional_4_div_4_Template_div_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onSidebarResizeStart($event)); });
|
|
83
|
+
i0.ɵɵelementEnd();
|
|
84
|
+
} }
|
|
85
|
+
function ConversationWorkspaceComponent_Conditional_4_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
86
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
87
|
+
i0.ɵɵelementStart(0, "div", 20)(1, "mj-collections-full-view", 21);
|
|
88
|
+
i0.ɵɵlistener("collectionNavigated", function ConversationWorkspaceComponent_Conditional_4_div_5_Template_mj_collections_full_view_collectionNavigated_1_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onCollectionNavigated($event)); });
|
|
62
89
|
i0.ɵɵelementEnd()();
|
|
63
90
|
} if (rf & 2) {
|
|
64
91
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
65
92
|
i0.ɵɵadvance();
|
|
66
93
|
i0.ɵɵproperty("environmentId", ctx_r1.environmentId)("currentUser", ctx_r1.currentUser);
|
|
67
94
|
} }
|
|
68
|
-
function
|
|
69
|
-
const
|
|
70
|
-
i0.ɵɵelementStart(0, "div",
|
|
71
|
-
i0.ɵɵlistener("openEntityRecord", function
|
|
95
|
+
function ConversationWorkspaceComponent_Conditional_4_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
96
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
97
|
+
i0.ɵɵelementStart(0, "div", 20)(1, "mj-tasks-full-view", 22);
|
|
98
|
+
i0.ɵɵlistener("openEntityRecord", function ConversationWorkspaceComponent_Conditional_4_div_6_Template_mj_tasks_full_view_openEntityRecord_1_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onOpenEntityRecordFromTasks($event)); });
|
|
72
99
|
i0.ɵɵelementEnd()();
|
|
73
100
|
} if (rf & 2) {
|
|
74
101
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
75
102
|
i0.ɵɵadvance();
|
|
76
103
|
i0.ɵɵproperty("environmentId", ctx_r1.environmentId)("currentUser", ctx_r1.currentUser)("baseFilter", ctx_r1.tasksFilter)("activeTaskId", ctx_r1.activeTaskId);
|
|
77
104
|
} }
|
|
78
|
-
function
|
|
79
|
-
const
|
|
80
|
-
i0.ɵɵelementStart(0, "div",
|
|
81
|
-
i0.ɵɵlistener("conversationRenamed", function
|
|
105
|
+
function ConversationWorkspaceComponent_Conditional_4_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
106
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
107
|
+
i0.ɵɵelementStart(0, "div", 20)(1, "mj-conversation-chat-area", 23);
|
|
108
|
+
i0.ɵɵlistener("conversationRenamed", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_conversationRenamed_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConversationRenamed($event)); })("openEntityRecord", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_openEntityRecord_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onOpenEntityRecord($event)); })("taskClicked", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_taskClicked_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onTaskClicked($event)); })("artifactLinkClicked", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_artifactLinkClicked_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onArtifactLinkNavigation($event)); })("conversationCreated", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_conversationCreated_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConversationCreated($event)); })("threadOpened", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_threadOpened_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onThreadOpened($event)); })("threadClosed", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_threadClosed_1_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onThreadClosed()); })("pendingArtifactConsumed", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_pendingArtifactConsumed_1_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); ctx_r1.pendingArtifactId = null; return i0.ɵɵresetView(ctx_r1.pendingArtifactVersionNumber = null); })("pendingMessageConsumed", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_pendingMessageConsumed_1_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); ctx_r1.pendingMessageToSend = null; return i0.ɵɵresetView(ctx_r1.pendingAttachmentsToSend = null); })("pendingMessageRequested", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_pendingMessageRequested_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onPendingMessageRequested($event)); });
|
|
82
109
|
i0.ɵɵelementEnd()();
|
|
83
110
|
} if (rf & 2) {
|
|
84
111
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
85
112
|
i0.ɵɵadvance();
|
|
86
|
-
i0.ɵɵproperty("environmentId", ctx_r1.environmentId)("currentUser", ctx_r1.currentUser)("conversationId", ctx_r1.selectedConversationId)("conversation", ctx_r1.selectedConversation)("threadId", ctx_r1.selectedThreadId)("isNewConversation", ctx_r1.isNewUnsavedConversation)("pendingMessage", ctx_r1.pendingMessageToSend)("pendingArtifactId", ctx_r1.pendingArtifactId)("pendingArtifactVersionNumber", ctx_r1.pendingArtifactVersionNumber);
|
|
113
|
+
i0.ɵɵproperty("environmentId", ctx_r1.environmentId)("currentUser", ctx_r1.currentUser)("conversationId", ctx_r1.selectedConversationId)("conversation", ctx_r1.selectedConversation)("threadId", ctx_r1.selectedThreadId)("isNewConversation", ctx_r1.isNewUnsavedConversation)("pendingMessage", ctx_r1.pendingMessageToSend)("pendingAttachments", ctx_r1.pendingAttachmentsToSend)("pendingArtifactId", ctx_r1.pendingArtifactId)("pendingArtifactVersionNumber", ctx_r1.pendingArtifactVersionNumber);
|
|
87
114
|
} }
|
|
88
|
-
function
|
|
89
|
-
const
|
|
90
|
-
i0.ɵɵelementStart(0, "div",
|
|
91
|
-
i0.ɵɵlistener("mousedown", function
|
|
115
|
+
function ConversationWorkspaceComponent_Conditional_4_Conditional_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
116
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
117
|
+
i0.ɵɵelementStart(0, "div", 27);
|
|
118
|
+
i0.ɵɵlistener("mousedown", function ConversationWorkspaceComponent_Conditional_4_Conditional_8_Conditional_0_Template_div_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onArtifactPanelResizeStart($event)); });
|
|
92
119
|
i0.ɵɵelementEnd();
|
|
93
120
|
} }
|
|
94
|
-
function
|
|
95
|
-
const
|
|
96
|
-
i0.ɵɵtemplate(0,
|
|
97
|
-
i0.ɵɵelementStart(1, "div",
|
|
98
|
-
i0.ɵɵlistener("closed", function
|
|
121
|
+
function ConversationWorkspaceComponent_Conditional_4_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
122
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
123
|
+
i0.ɵɵtemplate(0, ConversationWorkspaceComponent_Conditional_4_Conditional_8_Conditional_0_Template, 1, 0, "div", 24);
|
|
124
|
+
i0.ɵɵelementStart(1, "div", 25)(2, "mj-artifact-viewer-panel", 26);
|
|
125
|
+
i0.ɵɵlistener("closed", function ConversationWorkspaceComponent_Conditional_4_Conditional_8_Template_mj_artifact_viewer_panel_closed_2_listener() { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.closeArtifactPanel()); })("navigateToLink", function ConversationWorkspaceComponent_Conditional_4_Conditional_8_Template_mj_artifact_viewer_panel_navigateToLink_2_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onArtifactLinkNavigation($event)); })("shareRequested", function ConversationWorkspaceComponent_Conditional_4_Conditional_8_Template_mj_artifact_viewer_panel_shareRequested_2_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onArtifactShareRequested($event)); })("maximizeToggled", function ConversationWorkspaceComponent_Conditional_4_Conditional_8_Template_mj_artifact_viewer_panel_maximizeToggled_2_listener() { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.toggleMaximizeArtifactPanel()); });
|
|
99
126
|
i0.ɵɵelementEnd()();
|
|
100
127
|
} if (rf & 2) {
|
|
101
128
|
let tmp_8_0;
|
|
@@ -110,16 +137,18 @@ function ConversationWorkspaceComponent_Conditional_4_Conditional_7_Template(rf,
|
|
|
110
137
|
} }
|
|
111
138
|
function ConversationWorkspaceComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
112
139
|
i0.ɵɵelementStart(0, "div", 4);
|
|
113
|
-
i0.ɵɵtemplate(1, ConversationWorkspaceComponent_Conditional_4_Conditional_1_Template, 1, 0, "div", 8)(2, ConversationWorkspaceComponent_Conditional_4_div_2_Template, 2,
|
|
140
|
+
i0.ɵɵtemplate(1, ConversationWorkspaceComponent_Conditional_4_Conditional_1_Template, 1, 0, "div", 8)(2, ConversationWorkspaceComponent_Conditional_4_div_2_Template, 2, 15, "div", 9)(3, ConversationWorkspaceComponent_Conditional_4_Conditional_3_Template, 2, 0, "button", 10)(4, ConversationWorkspaceComponent_Conditional_4_div_4_Template, 1, 0, "div", 11)(5, ConversationWorkspaceComponent_Conditional_4_div_5_Template, 2, 2, "div", 12)(6, ConversationWorkspaceComponent_Conditional_4_div_6_Template, 2, 4, "div", 12)(7, ConversationWorkspaceComponent_Conditional_4_div_7_Template, 2, 10, "div", 12)(8, ConversationWorkspaceComponent_Conditional_4_Conditional_8_Template, 3, 15, "div", 13);
|
|
114
141
|
i0.ɵɵelementEnd();
|
|
115
142
|
} if (rf & 2) {
|
|
116
143
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
117
144
|
i0.ɵɵadvance();
|
|
118
145
|
i0.ɵɵconditional(ctx_r1.isMobileView && ctx_r1.isSidebarVisible && ctx_r1.activeTab !== "collections" && ctx_r1.activeTab !== "tasks" ? 1 : -1);
|
|
119
146
|
i0.ɵɵadvance();
|
|
120
|
-
i0.ɵɵproperty("ngIf", ctx_r1.activeTab !== "collections" && ctx_r1.activeTab !== "tasks");
|
|
147
|
+
i0.ɵɵproperty("ngIf", ctx_r1.activeTab !== "collections" && ctx_r1.activeTab !== "tasks" && ctx_r1.isSidebarSettingsLoaded);
|
|
148
|
+
i0.ɵɵadvance();
|
|
149
|
+
i0.ɵɵconditional(ctx_r1.activeTab !== "collections" && ctx_r1.activeTab !== "tasks" && ctx_r1.isSidebarCollapsed && ctx_r1.isSidebarSettingsLoaded ? 3 : -1);
|
|
121
150
|
i0.ɵɵadvance();
|
|
122
|
-
i0.ɵɵproperty("ngIf", ctx_r1.isSidebarVisible && ctx_r1.activeTab !== "collections" && ctx_r1.activeTab !== "tasks");
|
|
151
|
+
i0.ɵɵproperty("ngIf", ctx_r1.isSidebarVisible && !ctx_r1.isSidebarCollapsed && ctx_r1.activeTab !== "collections" && ctx_r1.activeTab !== "tasks" && ctx_r1.isSidebarSettingsLoaded);
|
|
123
152
|
i0.ɵɵadvance();
|
|
124
153
|
i0.ɵɵproperty("ngIf", ctx_r1.activeTab === "collections");
|
|
125
154
|
i0.ɵɵadvance();
|
|
@@ -127,12 +156,16 @@ function ConversationWorkspaceComponent_Conditional_4_Template(rf, ctx) { if (rf
|
|
|
127
156
|
i0.ɵɵadvance();
|
|
128
157
|
i0.ɵɵproperty("ngIf", ctx_r1.activeTab !== "collections" && ctx_r1.activeTab !== "tasks");
|
|
129
158
|
i0.ɵɵadvance();
|
|
130
|
-
i0.ɵɵconditional(ctx_r1.isArtifactPanelOpen && ctx_r1.activeArtifactId ?
|
|
159
|
+
i0.ɵɵconditional(ctx_r1.isArtifactPanelOpen && ctx_r1.activeArtifactId ? 8 : -1);
|
|
131
160
|
} }
|
|
132
161
|
/**
|
|
133
162
|
* Top-level workspace component for conversations
|
|
134
163
|
* Provides 3-column Slack-style layout: Navigation | Sidebar | Chat Area | Artifact Panel
|
|
135
164
|
* Supports context-based navigation (library or task views)
|
|
165
|
+
*
|
|
166
|
+
* @deprecated Use ChatConversationsResource from @memberjunction/ng-explorer-core instead.
|
|
167
|
+
* This component is maintained for backwards compatibility but the resource-wrapper pattern
|
|
168
|
+
* is the preferred approach for MJExplorer integration.
|
|
136
169
|
*/
|
|
137
170
|
export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
138
171
|
conversationData;
|
|
@@ -205,6 +238,7 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
205
238
|
activeVersionNumber = null;
|
|
206
239
|
activeVersionId = null;
|
|
207
240
|
isMobileView = false;
|
|
241
|
+
isSidebarPinned = false; // Default unpinned until settings load (prevents flicker)
|
|
208
242
|
// Artifact permissions
|
|
209
243
|
canShareActiveArtifact = false;
|
|
210
244
|
canEditActiveArtifact = false;
|
|
@@ -213,6 +247,9 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
213
247
|
artifactToShare = null;
|
|
214
248
|
// Resize state - Sidebar
|
|
215
249
|
sidebarWidth = 260; // Default width
|
|
250
|
+
isSidebarCollapsed = true; // Default collapsed until settings load (prevents flicker)
|
|
251
|
+
sidebarTransitionsEnabled = false; // Disabled during initial load to prevent jarring animation
|
|
252
|
+
isSidebarSettingsLoaded = false; // Tracks whether settings have been loaded (prevents render before state is known)
|
|
216
253
|
isSidebarResizing = false;
|
|
217
254
|
sidebarResizeStartX = 0;
|
|
218
255
|
sidebarResizeStartWidth = 0;
|
|
@@ -228,9 +265,10 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
228
265
|
previousVersionId = null; // Used to track version changes in ngDoCheck
|
|
229
266
|
previousIsNewConversation = false; // Track new conversation state changes
|
|
230
267
|
destroy$ = new Subject();
|
|
231
|
-
//
|
|
232
|
-
|
|
233
|
-
|
|
268
|
+
// User Settings key for server-side persistence
|
|
269
|
+
USER_SETTING_SIDEBAR_KEY = 'Conversations.SidebarState';
|
|
270
|
+
saveSettingsTimeout = null;
|
|
271
|
+
isLoadingSettings = false;
|
|
234
272
|
// Task filter for conversation-specific filtering
|
|
235
273
|
tasksFilter = '1=1';
|
|
236
274
|
// LOCAL CONVERSATION STATE - enables multiple workspace instances
|
|
@@ -240,6 +278,7 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
240
278
|
selectedThreadId = null;
|
|
241
279
|
isNewUnsavedConversation = false;
|
|
242
280
|
pendingMessageToSend = null;
|
|
281
|
+
pendingAttachmentsToSend = null;
|
|
243
282
|
pendingArtifactId = null;
|
|
244
283
|
pendingArtifactVersionNumber = null;
|
|
245
284
|
constructor(conversationData, artifactState, collectionState, artifactPermissionService, mentionAutocompleteService, notificationService, streamingService, uiCommandHandler, cdr) {
|
|
@@ -281,6 +320,11 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
281
320
|
this.selectedConversation = null;
|
|
282
321
|
this.isNewUnsavedConversation = true;
|
|
283
322
|
this.pendingMessageToSend = null;
|
|
323
|
+
this.pendingAttachmentsToSend = null;
|
|
324
|
+
// Auto-collapse if mobile OR if sidebar is not pinned
|
|
325
|
+
if (this.isMobileView || !this.isSidebarPinned) {
|
|
326
|
+
this.collapseSidebar();
|
|
327
|
+
}
|
|
284
328
|
}
|
|
285
329
|
/**
|
|
286
330
|
* Clears the new unsaved conversation state
|
|
@@ -307,15 +351,37 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
307
351
|
*/
|
|
308
352
|
onConversationSelected(conversationId) {
|
|
309
353
|
this.setActiveConversation(conversationId);
|
|
354
|
+
// Auto-collapse if mobile OR if sidebar is not pinned
|
|
355
|
+
if (this.isMobileView || !this.isSidebarPinned) {
|
|
356
|
+
this.collapseSidebar();
|
|
357
|
+
}
|
|
310
358
|
}
|
|
311
359
|
/**
|
|
312
360
|
* Handler for new conversation creation from chat area
|
|
361
|
+
* Now includes pending message and attachments to ensure atomic state update
|
|
313
362
|
*/
|
|
314
|
-
onConversationCreated(
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
363
|
+
onConversationCreated(event) {
|
|
364
|
+
try {
|
|
365
|
+
// Set ALL state atomically before Angular change detection runs
|
|
366
|
+
// This ensures the new message-input component receives the pending data
|
|
367
|
+
this.pendingMessageToSend = event.pendingMessage || null;
|
|
368
|
+
this.pendingAttachmentsToSend = event.pendingAttachments || null;
|
|
369
|
+
this.selectedConversationId = event.conversation.ID;
|
|
370
|
+
this.selectedConversation = event.conversation;
|
|
371
|
+
this.isNewUnsavedConversation = false;
|
|
372
|
+
// The conversation is already added to conversationData by the chat area
|
|
373
|
+
}
|
|
374
|
+
catch (error) {
|
|
375
|
+
console.error('onConversationCreated ERROR:', error);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Handler for pending message requested from chat area (empty state)
|
|
380
|
+
* @deprecated Use onConversationCreated with pendingMessage instead
|
|
381
|
+
*/
|
|
382
|
+
onPendingMessageRequested(event) {
|
|
383
|
+
this.pendingMessageToSend = event.text;
|
|
384
|
+
this.pendingAttachmentsToSend = event.attachments;
|
|
319
385
|
}
|
|
320
386
|
/**
|
|
321
387
|
* Handler for thread opened from chat area
|
|
@@ -346,11 +412,27 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
346
412
|
.subscribe(command => {
|
|
347
413
|
this.onAutomaticCommand(command);
|
|
348
414
|
});
|
|
349
|
-
// Check initial mobile state
|
|
415
|
+
// Check initial mobile state FIRST
|
|
350
416
|
this.checkMobileView();
|
|
351
|
-
// Load
|
|
352
|
-
this.
|
|
353
|
-
|
|
417
|
+
// Load sidebar state - but on mobile, always default to collapsed
|
|
418
|
+
if (this.isMobileView) {
|
|
419
|
+
this.isSidebarCollapsed = true;
|
|
420
|
+
this.isSidebarVisible = false;
|
|
421
|
+
this.isSidebarSettingsLoaded = true; // Mobile doesn't need to load settings
|
|
422
|
+
// Enable transitions after a brief delay to ensure initial state is applied
|
|
423
|
+
setTimeout(() => {
|
|
424
|
+
this.sidebarTransitionsEnabled = true;
|
|
425
|
+
}, 50);
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
// Load from User Settings (async) - await before continuing to prevent flicker
|
|
429
|
+
await this.loadSidebarState();
|
|
430
|
+
this.cdr.detectChanges();
|
|
431
|
+
// Enable transitions after state is loaded and applied
|
|
432
|
+
setTimeout(() => {
|
|
433
|
+
this.sidebarTransitionsEnabled = true;
|
|
434
|
+
}, 50);
|
|
435
|
+
}
|
|
354
436
|
// Setup resize listeners
|
|
355
437
|
window.addEventListener('mousemove', this.onResizeMove.bind(this));
|
|
356
438
|
window.addEventListener('mouseup', this.onResizeEnd.bind(this));
|
|
@@ -498,6 +580,10 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
498
580
|
ngOnDestroy() {
|
|
499
581
|
this.destroy$.next();
|
|
500
582
|
this.destroy$.complete();
|
|
583
|
+
// Clear any pending save timeout
|
|
584
|
+
if (this.saveSettingsTimeout) {
|
|
585
|
+
clearTimeout(this.saveSettingsTimeout);
|
|
586
|
+
}
|
|
501
587
|
// Remove resize listeners
|
|
502
588
|
window.removeEventListener('mousemove', this.onResizeMove.bind(this));
|
|
503
589
|
window.removeEventListener('mouseup', this.onResizeEnd.bind(this));
|
|
@@ -507,14 +593,159 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
507
593
|
onWindowResize() {
|
|
508
594
|
this.checkMobileView();
|
|
509
595
|
}
|
|
596
|
+
/**
|
|
597
|
+
* Handle clicks outside the sidebar to auto-collapse when unpinned
|
|
598
|
+
*/
|
|
599
|
+
onDocumentClick(event) {
|
|
600
|
+
// Only handle when sidebar is expanded but unpinned
|
|
601
|
+
if (this.isSidebarCollapsed || this.isSidebarPinned) {
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
604
|
+
// Check if click is outside the sidebar
|
|
605
|
+
const target = event.target;
|
|
606
|
+
const sidebarElement = target.closest('.workspace-sidebar');
|
|
607
|
+
const expandHandle = target.closest('.sidebar-expand-handle');
|
|
608
|
+
// If click is outside sidebar and expand handle, collapse it
|
|
609
|
+
if (!sidebarElement && !expandHandle) {
|
|
610
|
+
this.collapseSidebar();
|
|
611
|
+
}
|
|
612
|
+
}
|
|
510
613
|
checkMobileView() {
|
|
511
614
|
const wasMobile = this.isMobileView;
|
|
512
615
|
this.isMobileView = window.innerWidth < 768;
|
|
513
616
|
if (this.isMobileView && !wasMobile) {
|
|
617
|
+
// Switched to mobile - hide sidebar and default to collapsed
|
|
514
618
|
this.isSidebarVisible = false;
|
|
619
|
+
this.isSidebarCollapsed = true;
|
|
515
620
|
}
|
|
516
621
|
else if (!this.isMobileView && wasMobile) {
|
|
622
|
+
// Switched to desktop - show sidebar, restore state from User Settings
|
|
517
623
|
this.isSidebarVisible = true;
|
|
624
|
+
this.loadSidebarState().then(() => {
|
|
625
|
+
this.cdr.detectChanges();
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* Collapse sidebar
|
|
631
|
+
*/
|
|
632
|
+
collapseSidebar() {
|
|
633
|
+
this.isSidebarCollapsed = true;
|
|
634
|
+
if (this.isMobileView) {
|
|
635
|
+
this.isSidebarVisible = false;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Expand sidebar (unpinned - will auto-collapse on selection)
|
|
640
|
+
*/
|
|
641
|
+
expandSidebar() {
|
|
642
|
+
this.isSidebarCollapsed = false;
|
|
643
|
+
this.isSidebarPinned = false;
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Pin sidebar - keep it open after selection
|
|
647
|
+
*/
|
|
648
|
+
pinSidebar() {
|
|
649
|
+
this.isSidebarPinned = true;
|
|
650
|
+
this.saveSidebarState();
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Unpin sidebar - will auto-collapse on next selection
|
|
654
|
+
*/
|
|
655
|
+
unpinSidebar() {
|
|
656
|
+
this.isSidebarPinned = false;
|
|
657
|
+
this.collapseSidebar();
|
|
658
|
+
this.saveSidebarState();
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Save sidebar state to User Settings (server)
|
|
662
|
+
* Uses debouncing to avoid excessive database writes
|
|
663
|
+
*/
|
|
664
|
+
saveSidebarState() {
|
|
665
|
+
// Debounce the server save to avoid excessive writes
|
|
666
|
+
if (this.saveSettingsTimeout) {
|
|
667
|
+
clearTimeout(this.saveSettingsTimeout);
|
|
668
|
+
}
|
|
669
|
+
this.saveSettingsTimeout = setTimeout(() => {
|
|
670
|
+
this.saveSidebarStateToServer();
|
|
671
|
+
}, 1000); // 1 second debounce
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Save sidebar state to User Settings entity on server using UserInfoEngine for cached lookup
|
|
675
|
+
* Includes collapsed, pinned, sidebarWidth, and artifactPanelWidth
|
|
676
|
+
*/
|
|
677
|
+
async saveSidebarStateToServer() {
|
|
678
|
+
try {
|
|
679
|
+
const userId = this.currentUser?.ID;
|
|
680
|
+
if (!userId) {
|
|
681
|
+
return;
|
|
682
|
+
}
|
|
683
|
+
const stateToSave = {
|
|
684
|
+
collapsed: this.isSidebarCollapsed,
|
|
685
|
+
pinned: this.isSidebarPinned,
|
|
686
|
+
sidebarWidth: this.sidebarWidth,
|
|
687
|
+
artifactPanelWidth: this.artifactPanelWidth
|
|
688
|
+
};
|
|
689
|
+
const engine = UserInfoEngine.Instance;
|
|
690
|
+
const md = new Metadata();
|
|
691
|
+
// Find existing setting from cached user settings
|
|
692
|
+
let setting = engine.UserSettings.find(s => s.Setting === this.USER_SETTING_SIDEBAR_KEY);
|
|
693
|
+
if (!setting) {
|
|
694
|
+
// Create new setting
|
|
695
|
+
setting = await md.GetEntityObject('MJ: User Settings');
|
|
696
|
+
setting.UserID = userId;
|
|
697
|
+
setting.Setting = this.USER_SETTING_SIDEBAR_KEY;
|
|
698
|
+
}
|
|
699
|
+
setting.Value = JSON.stringify(stateToSave);
|
|
700
|
+
await setting.Save();
|
|
701
|
+
}
|
|
702
|
+
catch (error) {
|
|
703
|
+
console.warn('Failed to save sidebar state to User Settings:', error);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* Load sidebar state from User Settings (server) using UserInfoEngine
|
|
708
|
+
* Includes collapsed, pinned, sidebarWidth, and artifactPanelWidth
|
|
709
|
+
* For new users with no saved state, defaults to collapsed with new conversation
|
|
710
|
+
*/
|
|
711
|
+
async loadSidebarState() {
|
|
712
|
+
this.isLoadingSettings = true;
|
|
713
|
+
try {
|
|
714
|
+
const userId = this.currentUser?.ID;
|
|
715
|
+
if (userId) {
|
|
716
|
+
// Try loading from cached User Settings
|
|
717
|
+
const engine = UserInfoEngine.Instance;
|
|
718
|
+
const setting = engine.UserSettings.find(s => s.Setting === this.USER_SETTING_SIDEBAR_KEY);
|
|
719
|
+
if (setting?.Value) {
|
|
720
|
+
const state = JSON.parse(setting.Value);
|
|
721
|
+
this.isSidebarCollapsed = state.collapsed ?? true;
|
|
722
|
+
this.isSidebarPinned = state.pinned ?? false;
|
|
723
|
+
// Load width values if present (with validation)
|
|
724
|
+
if (typeof state.sidebarWidth === 'number' && state.sidebarWidth >= 200 && state.sidebarWidth <= 500) {
|
|
725
|
+
this.sidebarWidth = state.sidebarWidth;
|
|
726
|
+
}
|
|
727
|
+
if (typeof state.artifactPanelWidth === 'number' && state.artifactPanelWidth >= 20 && state.artifactPanelWidth <= 70) {
|
|
728
|
+
this.artifactPanelWidth = state.artifactPanelWidth;
|
|
729
|
+
}
|
|
730
|
+
this.isLoadingSettings = false;
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
// No saved state found - NEW USER DEFAULT:
|
|
735
|
+
// Start with sidebar collapsed and show new conversation screen
|
|
736
|
+
this.isSidebarCollapsed = true;
|
|
737
|
+
this.isSidebarPinned = false;
|
|
738
|
+
this.isNewUnsavedConversation = true;
|
|
739
|
+
}
|
|
740
|
+
catch (error) {
|
|
741
|
+
console.warn('Failed to load sidebar state:', error);
|
|
742
|
+
// Default to collapsed for new users on error
|
|
743
|
+
this.isSidebarCollapsed = true;
|
|
744
|
+
this.isSidebarPinned = false;
|
|
745
|
+
}
|
|
746
|
+
finally {
|
|
747
|
+
this.isLoadingSettings = false;
|
|
748
|
+
this.isSidebarSettingsLoaded = true;
|
|
518
749
|
}
|
|
519
750
|
}
|
|
520
751
|
onTabChanged(tab) {
|
|
@@ -691,13 +922,13 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
691
922
|
this.isSidebarResizing = false;
|
|
692
923
|
document.body.style.cursor = '';
|
|
693
924
|
document.body.style.userSelect = '';
|
|
694
|
-
this.
|
|
925
|
+
this.saveSidebarState(); // Save width to User Settings
|
|
695
926
|
}
|
|
696
927
|
else if (this.isArtifactPanelResizing) {
|
|
697
928
|
this.isArtifactPanelResizing = false;
|
|
698
929
|
document.body.style.cursor = '';
|
|
699
930
|
document.body.style.userSelect = '';
|
|
700
|
-
this.
|
|
931
|
+
this.saveSidebarState(); // Save width to User Settings
|
|
701
932
|
}
|
|
702
933
|
}
|
|
703
934
|
/**
|
|
@@ -741,58 +972,11 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
741
972
|
onResizeTouchEnd(event) {
|
|
742
973
|
if (this.isSidebarResizing) {
|
|
743
974
|
this.isSidebarResizing = false;
|
|
744
|
-
this.
|
|
975
|
+
this.saveSidebarState(); // Save width to User Settings
|
|
745
976
|
}
|
|
746
977
|
else if (this.isArtifactPanelResizing) {
|
|
747
978
|
this.isArtifactPanelResizing = false;
|
|
748
|
-
this.
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
/**
|
|
752
|
-
* LocalStorage persistence methods
|
|
753
|
-
*/
|
|
754
|
-
loadSidebarWidth() {
|
|
755
|
-
try {
|
|
756
|
-
const saved = localStorage.getItem(this.SIDEBAR_WIDTH_KEY);
|
|
757
|
-
if (saved) {
|
|
758
|
-
const width = parseInt(saved, 10);
|
|
759
|
-
if (!isNaN(width) && width >= 200 && width <= 500) {
|
|
760
|
-
this.sidebarWidth = width;
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
catch (error) {
|
|
765
|
-
console.warn('Failed to load sidebar width from localStorage:', error);
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
saveSidebarWidth() {
|
|
769
|
-
try {
|
|
770
|
-
localStorage.setItem(this.SIDEBAR_WIDTH_KEY, this.sidebarWidth.toString());
|
|
771
|
-
}
|
|
772
|
-
catch (error) {
|
|
773
|
-
console.warn('Failed to save sidebar width to localStorage:', error);
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
loadArtifactPanelWidth() {
|
|
777
|
-
try {
|
|
778
|
-
const saved = localStorage.getItem(this.ARTIFACT_PANEL_WIDTH_KEY);
|
|
779
|
-
if (saved) {
|
|
780
|
-
const width = parseFloat(saved);
|
|
781
|
-
if (!isNaN(width) && width >= 20 && width <= 70) {
|
|
782
|
-
this.artifactPanelWidth = width;
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
catch (error) {
|
|
787
|
-
console.warn('Failed to load artifact panel width from localStorage:', error);
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
saveArtifactPanelWidth() {
|
|
791
|
-
try {
|
|
792
|
-
localStorage.setItem(this.ARTIFACT_PANEL_WIDTH_KEY, this.artifactPanelWidth.toString());
|
|
793
|
-
}
|
|
794
|
-
catch (error) {
|
|
795
|
-
console.warn('Failed to save artifact panel width to localStorage:', error);
|
|
979
|
+
this.saveSidebarState(); // Save width to User Settings
|
|
796
980
|
}
|
|
797
981
|
}
|
|
798
982
|
/**
|
|
@@ -998,14 +1182,14 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
998
1182
|
}
|
|
999
1183
|
static ɵfac = function ConversationWorkspaceComponent_Factory(t) { return new (t || ConversationWorkspaceComponent)(i0.ɵɵdirectiveInject(i1.ConversationDataService), i0.ɵɵdirectiveInject(i2.ArtifactStateService), i0.ɵɵdirectiveInject(i3.CollectionStateService), i0.ɵɵdirectiveInject(i4.ArtifactPermissionService), i0.ɵɵdirectiveInject(i5.MentionAutocompleteService), i0.ɵɵdirectiveInject(i6.MJNotificationService), i0.ɵɵdirectiveInject(i7.ConversationStreamingService), i0.ɵɵdirectiveInject(i8.UICommandHandlerService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
1000
1184
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConversationWorkspaceComponent, selectors: [["mj-conversation-workspace"]], hostBindings: function ConversationWorkspaceComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
1001
|
-
i0.ɵɵlistener("resize", function ConversationWorkspaceComponent_resize_HostBindingHandler() { return ctx.onWindowResize(); }, false, i0.ɵɵresolveWindow);
|
|
1002
|
-
} }, inputs: { environmentId: "environmentId", initialConversationId: "initialConversationId", layout: "layout", currentUser: "currentUser", activeContext: "activeContext", contextItemId: "contextItemId", activeTabInput: "activeTabInput", activeConversationInput: "activeConversationInput", activeCollectionInput: "activeCollectionInput", activeVersionIdInput: "activeVersionIdInput", activeTaskInput: "activeTaskInput" }, outputs: { conversationChanged: "conversationChanged", artifactOpened: "artifactOpened", navigationChanged: "navigationChanged", newConversationStarted: "newConversationStarted", actionableCommandExecuted: "actionableCommandExecuted", automaticCommandExecuted: "automaticCommandExecuted" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 13, consts: [["mjSearchShortcut", "", "kendoDialogContainer", "", 1, "conversation-workspace", 3, "searchTriggered"], [1, "workspace-navigation"], [3, "tabChanged", "sidebarToggled", "searchTriggered", "refreshTriggered", "activeTab", "environmentId", "currentUser", "conversationId"], [1, "workspace-loading"], [1, "workspace-content"], [3, "close", "resultSelected", "isOpen", "environmentId", "currentUser"], [3, "saved", "cancelled", "isOpen", "artifact", "currentUser"], ["text", "Loading agents...", "size", "large"], [1, "mobile-sidebar-backdrop", "visible"], ["class", "workspace-sidebar", 3, "open", "width", 4, "ngIf"], ["class", "sidebar-resize-handle", 3, "mousedown", 4, "ngIf"], ["class", "workspace-main", 4, "ngIf"], [1, "workspace-artifact-panel", 3, "width", "maximized"], [1, "mobile-sidebar-backdrop", "visible", 3, "click"], [1, "workspace-sidebar"], [3, "conversationSelected", "newConversationRequested", "activeTab", "environmentId", "currentUser", "selectedConversationId", "renamedConversationId"], [1, "sidebar-resize-handle", 3, "mousedown"], [1, "workspace-main"], [3, "collectionNavigated", "environmentId", "currentUser"], [3, "openEntityRecord", "environmentId", "currentUser", "baseFilter", "activeTaskId"], [3, "conversationRenamed", "openEntityRecord", "taskClicked", "artifactLinkClicked", "conversationCreated", "threadOpened", "threadClosed", "pendingArtifactConsumed", "pendingMessageConsumed", "pendingMessageRequested", "environmentId", "currentUser", "conversationId", "conversation", "threadId", "isNewConversation", "pendingMessage", "pendingArtifactId", "pendingArtifactVersionNumber"], [1, "artifact-panel-resize-handle"], [1, "workspace-artifact-panel"], [3, "closed", "navigateToLink", "shareRequested", "maximizeToggled", "artifactId", "currentUser", "environmentId", "versionNumber", "showSaveToCollection", "viewContext", "contextCollectionId", "canShare", "canEdit", "isMaximized"], [1, "artifact-panel-resize-handle", 3, "mousedown"]], template: function ConversationWorkspaceComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1185
|
+
i0.ɵɵlistener("resize", function ConversationWorkspaceComponent_resize_HostBindingHandler() { return ctx.onWindowResize(); }, false, i0.ɵɵresolveWindow)("click", function ConversationWorkspaceComponent_click_HostBindingHandler($event) { return ctx.onDocumentClick($event); }, false, i0.ɵɵresolveDocument);
|
|
1186
|
+
} }, inputs: { environmentId: "environmentId", initialConversationId: "initialConversationId", layout: "layout", currentUser: "currentUser", activeContext: "activeContext", contextItemId: "contextItemId", activeTabInput: "activeTabInput", activeConversationInput: "activeConversationInput", activeCollectionInput: "activeCollectionInput", activeVersionIdInput: "activeVersionIdInput", activeTaskInput: "activeTaskInput" }, outputs: { conversationChanged: "conversationChanged", artifactOpened: "artifactOpened", navigationChanged: "navigationChanged", newConversationStarted: "newConversationStarted", actionableCommandExecuted: "actionableCommandExecuted", automaticCommandExecuted: "automaticCommandExecuted" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 13, consts: [["mjSearchShortcut", "", "kendoDialogContainer", "", 1, "conversation-workspace", 3, "searchTriggered"], [1, "workspace-navigation"], [3, "tabChanged", "sidebarToggled", "searchTriggered", "refreshTriggered", "activeTab", "environmentId", "currentUser", "conversationId"], [1, "workspace-loading"], [1, "workspace-content"], [3, "close", "resultSelected", "isOpen", "environmentId", "currentUser"], [3, "saved", "cancelled", "isOpen", "artifact", "currentUser"], ["text", "Loading agents...", "size", "large"], [1, "mobile-sidebar-backdrop", "visible"], ["class", "workspace-sidebar", 3, "open", "collapsed", "no-transition", "width", 4, "ngIf"], ["title", "Show conversations", 1, "sidebar-floating-toggle"], ["class", "sidebar-resize-handle", 3, "mousedown", 4, "ngIf"], ["class", "workspace-main", 4, "ngIf"], [1, "workspace-artifact-panel", 3, "width", "maximized"], [1, "mobile-sidebar-backdrop", "visible", 3, "click"], [1, "workspace-sidebar"], [3, "conversationSelected", "newConversationRequested", "pinSidebarRequested", "unpinSidebarRequested", "activeTab", "environmentId", "currentUser", "selectedConversationId", "renamedConversationId", "isSidebarPinned", "isMobileView"], ["title", "Show conversations", 1, "sidebar-floating-toggle", 3, "click"], [1, "fas", "fa-table-columns"], [1, "sidebar-resize-handle", 3, "mousedown"], [1, "workspace-main"], [3, "collectionNavigated", "environmentId", "currentUser"], [3, "openEntityRecord", "environmentId", "currentUser", "baseFilter", "activeTaskId"], [3, "conversationRenamed", "openEntityRecord", "taskClicked", "artifactLinkClicked", "conversationCreated", "threadOpened", "threadClosed", "pendingArtifactConsumed", "pendingMessageConsumed", "pendingMessageRequested", "environmentId", "currentUser", "conversationId", "conversation", "threadId", "isNewConversation", "pendingMessage", "pendingAttachments", "pendingArtifactId", "pendingArtifactVersionNumber"], [1, "artifact-panel-resize-handle"], [1, "workspace-artifact-panel"], [3, "closed", "navigateToLink", "shareRequested", "maximizeToggled", "artifactId", "currentUser", "environmentId", "versionNumber", "showSaveToCollection", "viewContext", "contextCollectionId", "canShare", "canEdit", "isMaximized"], [1, "artifact-panel-resize-handle", 3, "mousedown"]], template: function ConversationWorkspaceComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1003
1187
|
i0.ɵɵelementStart(0, "div", 0);
|
|
1004
1188
|
i0.ɵɵlistener("searchTriggered", function ConversationWorkspaceComponent_Template_div_searchTriggered_0_listener() { return ctx.openSearch(); });
|
|
1005
1189
|
i0.ɵɵelementStart(1, "div", 1)(2, "mj-conversation-navigation", 2);
|
|
1006
1190
|
i0.ɵɵlistener("tabChanged", function ConversationWorkspaceComponent_Template_mj_conversation_navigation_tabChanged_2_listener($event) { return ctx.onTabChanged($event); })("sidebarToggled", function ConversationWorkspaceComponent_Template_mj_conversation_navigation_sidebarToggled_2_listener() { return ctx.toggleSidebar(); })("searchTriggered", function ConversationWorkspaceComponent_Template_mj_conversation_navigation_searchTriggered_2_listener() { return ctx.openSearch(); })("refreshTriggered", function ConversationWorkspaceComponent_Template_mj_conversation_navigation_refreshTriggered_2_listener() { return ctx.onRefreshAgentCache(); });
|
|
1007
1191
|
i0.ɵɵelementEnd()();
|
|
1008
|
-
i0.ɵɵtemplate(3, ConversationWorkspaceComponent_Conditional_3_Template, 2, 0, "div", 3)(4, ConversationWorkspaceComponent_Conditional_4_Template,
|
|
1192
|
+
i0.ɵɵtemplate(3, ConversationWorkspaceComponent_Conditional_3_Template, 2, 0, "div", 3)(4, ConversationWorkspaceComponent_Conditional_4_Template, 9, 8, "div", 4);
|
|
1009
1193
|
i0.ɵɵelementStart(5, "mj-search-panel", 5);
|
|
1010
1194
|
i0.ɵɵlistener("close", function ConversationWorkspaceComponent_Template_mj_search_panel_close_5_listener() { return ctx.closeSearch(); })("resultSelected", function ConversationWorkspaceComponent_Template_mj_search_panel_resultSelected_5_listener($event) { return ctx.handleSearchResult($event); });
|
|
1011
1195
|
i0.ɵɵelementEnd();
|
|
@@ -1025,11 +1209,11 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
1025
1209
|
i0.ɵɵproperty("isOpen", ctx.isSearchPanelOpen)("environmentId", ctx.environmentId)("currentUser", ctx.currentUser);
|
|
1026
1210
|
i0.ɵɵadvance(2);
|
|
1027
1211
|
i0.ɵɵproperty("isOpen", ctx.isArtifactShareModalOpen)("artifact", ctx.artifactToShare)("currentUser", ctx.currentUser);
|
|
1028
|
-
} }, dependencies: [i9.NgIf, i10.DialogContainerDirective, i11.ArtifactViewerPanelComponent, i12.LoadingComponent, i13.TasksFullViewComponent, i14.ArtifactShareModalComponent, i15.ConversationNavigationComponent, i16.ConversationSidebarComponent, i17.ConversationChatAreaComponent, i18.CollectionsFullViewComponent, i19.SearchPanelComponent, i20.ToastComponent, i21.SearchShortcutDirective], styles: [".conversation-workspace[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%; \n\n min-height: 0; \n\n background-color: #F4F4F4;\n position: relative;\n}\n\n.workspace-navigation[_ngcontent-%COMP%] {\n flex-shrink: 0;\n height: 48px;\n background-color: #092340;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.workspace-content[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n overflow: hidden;\n min-height: 0;\n}\n\n.workspace-sidebar[_ngcontent-%COMP%] {\n flex-shrink: 0;\n background-color: #092340;\n border-right: 1px solid #D9D9D9;\n overflow-y: auto;\n}\n\n.sidebar-resize-handle[_ngcontent-%COMP%] {\n width: 4px;\n background: transparent;\n cursor: ew-resize;\n flex-shrink: 0;\n position: relative;\n transition: background-color 0.2s;\n}\n\n.sidebar-resize-handle[_ngcontent-%COMP%]:hover {\n background: #1e40af;\n}\n\n.sidebar-resize-handle[_ngcontent-%COMP%]:active {\n background: #1e3a8a;\n}\n\n.sidebar-resize-handle[_ngcontent-%COMP%]::before {\n content: '';\n position: absolute;\n left: -4px;\n right: -4px;\n top: 0;\n bottom: 0;\n cursor: ew-resize;\n}\n\n.workspace-main[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n background-color: #FFF;\n overflow: hidden;\n min-height: 0;\n}\n\n.workspace-main[_ngcontent-%COMP%] > mj-conversation-chat-area[_ngcontent-%COMP%] {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n\n.workspace-artifact-panel[_ngcontent-%COMP%] {\n flex-shrink: 0;\n background-color: #FFF;\n overflow: hidden;\n min-width: 300px;\n max-width: 70%;\n}\n\n.artifact-panel-resize-handle[_ngcontent-%COMP%] {\n width: 4px;\n background-color: transparent;\n cursor: ew-resize;\n flex-shrink: 0;\n transition: background-color 0.2s;\n position: relative;\n z-index: 10;\n}\n\n\n\n.artifact-panel-resize-handle[_ngcontent-%COMP%]::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: -4px;\n right: -4px;\n cursor: ew-resize;\n}\n\n.artifact-panel-resize-handle[_ngcontent-%COMP%]:hover {\n background-color: #1e40af;\n}\n\n.artifact-panel-resize-handle[_ngcontent-%COMP%]:active {\n background-color: #1e3a8a;\n}\n\n\n\n.workspace-artifact-panel.maximized[_ngcontent-%COMP%] {\n width: 100% !important;\n max-width: 100%;\n}\n\n\n\n.conversation-workspace[data-layout=\"compact\"][_ngcontent-%COMP%] .workspace-sidebar[_ngcontent-%COMP%] {\n width: 240px;\n}\n\n.conversation-workspace[data-layout=\"compact\"][_ngcontent-%COMP%] .workspace-artifact-panel[_ngcontent-%COMP%] {\n width: 400px;\n}\n\n\n\n.conversation-workspace[data-layout=\"embedded\"][_ngcontent-%COMP%] {\n height: 100%;\n}\n\n.conversation-workspace[data-layout=\"embedded\"][_ngcontent-%COMP%] .workspace-navigation[_ngcontent-%COMP%] {\n height: 48px;\n}\n\n\n\n@media (max-width: 1024px) {\n .workspace-sidebar[_ngcontent-%COMP%] {\n position: absolute;\n left: 0;\n top: 60px;\n bottom: 0;\n z-index: 100;\n box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);\n }\n\n .workspace-artifact-panel[_ngcontent-%COMP%] {\n position: fixed;\n right: 0;\n top: 60px;\n bottom: 0;\n z-index: 100;\n box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);\n }\n}\n\n\n\n@media (min-width: 769px) {\n .workspace-sidebar[_ngcontent-%COMP%] {\n transition: width 0.3s ease, min-width 0.3s ease;\n overflow: hidden;\n }\n\n .workspace-sidebar[_ngcontent-%COMP%]:not(.open) {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n }\n\n .sidebar-resize-handle[_ngcontent-%COMP%] {\n transition: opacity 0.3s ease, width 0.3s ease;\n }\n\n .workspace-sidebar[_ngcontent-%COMP%]:not(.open) ~ .sidebar-resize-handle[_ngcontent-%COMP%] {\n opacity: 0;\n width: 0;\n pointer-events: none;\n }\n}\n\n\n\n@media (max-width: 768px) {\n .workspace-sidebar[_ngcontent-%COMP%] {\n position: fixed;\n left: 0;\n top: 80px;\n z-index: 1000;\n width: 260px !important;\n height: calc(100vh - 80px);\n transform: translateX(-100%);\n transition: transform 0.3s ease;\n }\n\n .workspace-sidebar.open[_ngcontent-%COMP%] {\n transform: translateX(0);\n }\n\n .workspace-artifact-panel[_ngcontent-%COMP%] {\n position: fixed;\n width: 100%;\n left: 0;\n right: 0;\n top:
|
|
1212
|
+
} }, dependencies: [i9.NgIf, i10.DialogContainerDirective, i11.ArtifactViewerPanelComponent, i12.LoadingComponent, i13.TasksFullViewComponent, i14.ArtifactShareModalComponent, i15.ConversationNavigationComponent, i16.ConversationSidebarComponent, i17.ConversationChatAreaComponent, i18.CollectionsFullViewComponent, i19.SearchPanelComponent, i20.ToastComponent, i21.SearchShortcutDirective], styles: [".conversation-workspace[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%; \n\n min-height: 0; \n\n background-color: #F4F4F4;\n position: relative;\n}\n\n.workspace-navigation[_ngcontent-%COMP%] {\n flex-shrink: 0;\n height: 48px;\n background-color: #092340;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.workspace-content[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n overflow: hidden;\n min-height: 0;\n position: relative;\n}\n\n.workspace-sidebar[_ngcontent-%COMP%] {\n flex-shrink: 0;\n background-color: #092340;\n border-right: 1px solid #D9D9D9;\n overflow-y: auto;\n transition: width 0.3s ease;\n}\n\n\n\n.workspace-sidebar.no-transition[_ngcontent-%COMP%] {\n transition: none !important;\n}\n\n.workspace-sidebar.collapsed[_ngcontent-%COMP%] {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n overflow: hidden;\n}\n\n\n\n.sidebar-floating-toggle[_ngcontent-%COMP%] {\n position: absolute;\n top: 12px;\n left: 12px;\n z-index: 100;\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: #092340;\n border: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 8px;\n cursor: pointer;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n transition: all 0.2s ease;\n}\n\n.sidebar-floating-toggle[_ngcontent-%COMP%]:hover {\n background: #0a2d4d;\n border-color: rgba(255, 255, 255, 0.3);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);\n transform: scale(1.05);\n}\n\n.sidebar-floating-toggle[_ngcontent-%COMP%]:active {\n transform: scale(0.98);\n}\n\n.sidebar-floating-toggle[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: rgba(255, 255, 255, 0.85);\n font-size: 16px;\n transition: color 0.15s ease;\n}\n\n.sidebar-floating-toggle[_ngcontent-%COMP%]:hover i[_ngcontent-%COMP%] {\n color: white;\n}\n\n.sidebar-resize-handle[_ngcontent-%COMP%] {\n width: 4px;\n background: transparent;\n cursor: ew-resize;\n flex-shrink: 0;\n position: relative;\n transition: background-color 0.2s;\n}\n\n.sidebar-resize-handle[_ngcontent-%COMP%]:hover {\n background: #1e40af;\n}\n\n.sidebar-resize-handle[_ngcontent-%COMP%]:active {\n background: #1e3a8a;\n}\n\n.sidebar-resize-handle[_ngcontent-%COMP%]::before {\n content: '';\n position: absolute;\n left: -4px;\n right: -4px;\n top: 0;\n bottom: 0;\n cursor: ew-resize;\n}\n\n.workspace-main[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n background-color: #FFF;\n overflow: hidden;\n min-height: 0;\n}\n\n.workspace-main[_ngcontent-%COMP%] > mj-conversation-chat-area[_ngcontent-%COMP%] {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n\n.workspace-artifact-panel[_ngcontent-%COMP%] {\n flex-shrink: 0;\n background-color: #FFF;\n overflow: hidden;\n min-width: 300px;\n max-width: 70%;\n}\n\n.artifact-panel-resize-handle[_ngcontent-%COMP%] {\n width: 4px;\n background-color: transparent;\n cursor: ew-resize;\n flex-shrink: 0;\n transition: background-color 0.2s;\n position: relative;\n z-index: 10;\n}\n\n\n\n.artifact-panel-resize-handle[_ngcontent-%COMP%]::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: -4px;\n right: -4px;\n cursor: ew-resize;\n}\n\n.artifact-panel-resize-handle[_ngcontent-%COMP%]:hover {\n background-color: #1e40af;\n}\n\n.artifact-panel-resize-handle[_ngcontent-%COMP%]:active {\n background-color: #1e3a8a;\n}\n\n\n\n.workspace-artifact-panel.maximized[_ngcontent-%COMP%] {\n width: 100% !important;\n max-width: 100%;\n}\n\n\n\n.conversation-workspace[data-layout=\"compact\"][_ngcontent-%COMP%] .workspace-sidebar[_ngcontent-%COMP%] {\n width: 240px;\n}\n\n.conversation-workspace[data-layout=\"compact\"][_ngcontent-%COMP%] .workspace-artifact-panel[_ngcontent-%COMP%] {\n width: 400px;\n}\n\n\n\n.conversation-workspace[data-layout=\"embedded\"][_ngcontent-%COMP%] {\n height: 100%;\n}\n\n.conversation-workspace[data-layout=\"embedded\"][_ngcontent-%COMP%] .workspace-navigation[_ngcontent-%COMP%] {\n height: 48px;\n}\n\n\n\n@media (max-width: 1024px) {\n .workspace-sidebar[_ngcontent-%COMP%] {\n position: absolute;\n left: 0;\n top: 60px;\n bottom: 0;\n z-index: 100;\n box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);\n }\n\n .workspace-artifact-panel[_ngcontent-%COMP%] {\n position: fixed;\n right: 0;\n top: 60px;\n bottom: 0;\n z-index: 100;\n box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);\n }\n}\n\n\n\n@media (min-width: 769px) {\n .workspace-sidebar[_ngcontent-%COMP%] {\n transition: width 0.3s ease, min-width 0.3s ease;\n overflow: hidden;\n }\n\n .workspace-sidebar[_ngcontent-%COMP%]:not(.open) {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n }\n\n .sidebar-resize-handle[_ngcontent-%COMP%] {\n transition: opacity 0.3s ease, width 0.3s ease;\n }\n\n .workspace-sidebar[_ngcontent-%COMP%]:not(.open) ~ .sidebar-resize-handle[_ngcontent-%COMP%] {\n opacity: 0;\n width: 0;\n pointer-events: none;\n }\n}\n\n\n\n@media (max-width: 768px) {\n .workspace-sidebar[_ngcontent-%COMP%] {\n position: fixed;\n left: 0;\n top: 80px;\n z-index: 1000;\n width: 260px !important;\n height: calc(100vh - 80px);\n transform: translateX(-100%);\n transition: transform 0.3s ease;\n }\n\n .workspace-sidebar.open[_ngcontent-%COMP%] {\n transform: translateX(0);\n }\n\n .workspace-artifact-panel[_ngcontent-%COMP%] {\n position: fixed;\n width: 100%;\n left: 0;\n right: 0;\n top: 56px; \n\n bottom: 0;\n z-index: 1000;\n max-width: 100%;\n height: auto;\n }\n\n .sidebar-resize-handle[_ngcontent-%COMP%], \n .artifact-panel-resize-handle[_ngcontent-%COMP%], \n .sidebar-floating-toggle[_ngcontent-%COMP%] {\n display: none;\n }\n\n \n\n .mobile-sidebar-backdrop[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.3s ease;\n z-index: 999;\n }\n\n .mobile-sidebar-backdrop.visible[_ngcontent-%COMP%] {\n opacity: 1;\n pointer-events: auto;\n }\n}\n\n\n\n@media (max-width: 480px) {\n .workspace-navigation[_ngcontent-%COMP%] {\n height: 48px;\n }\n\n .workspace-sidebar[_ngcontent-%COMP%] {\n width: 100%;\n }\n}\n\n\n\n.workspace-loading[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n flex: 1;\n width: 100%;\n background: #FFF;\n gap: 1rem;\n}\n\n.loading-spinner[_ngcontent-%COMP%] {\n font-size: 3rem;\n color: #0078d4;\n}\n\n.workspace-loading[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 1rem;\n color: #666;\n margin: 0;\n}"] });
|
|
1029
1213
|
}
|
|
1030
1214
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConversationWorkspaceComponent, [{
|
|
1031
1215
|
type: Component,
|
|
1032
|
-
args: [{ selector: 'mj-conversation-workspace', template: "<div class=\"conversation-workspace\" [attr.data-layout]=\"layout\" mjSearchShortcut (searchTriggered)=\"openSearch()\" kendoDialogContainer>\n <!-- Top Navigation Bar -->\n <div class=\"workspace-navigation\">\n <mj-conversation-navigation\n [activeTab]=\"activeTab\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [conversationId]=\"selectedConversationId\"\n (tabChanged)=\"onTabChanged($event)\"\n (sidebarToggled)=\"toggleSidebar()\"\n (searchTriggered)=\"openSearch()\"\n (refreshTriggered)=\"onRefreshAgentCache()\">\n </mj-conversation-navigation>\n </div>\n\n <!-- Loading spinner while initializing agents -->\n @if (!isWorkspaceReady) {\n <div class=\"workspace-loading\">\n <mj-loading text=\"Loading agents...\" size=\"large\"></mj-loading>\n </div>\n }\n\n <!-- Main workspace content - only renders when agents are ready -->\n @if (isWorkspaceReady) {\n <div class=\"workspace-content\">\n <!-- Mobile sidebar backdrop -->\n @if (isMobileView && isSidebarVisible && activeTab !== 'collections' && activeTab !== 'tasks') {\n <div class=\"mobile-sidebar-backdrop visible\" (click)=\"closeSidebar()\"></div>\n }\n\n <!-- Left Sidebar (hidden when Collections or Tasks view is active) -->\n <div class=\"workspace-sidebar\"\n *ngIf=\"activeTab !== 'collections' && activeTab !== 'tasks'\"\n [class.open]=\"isSidebarVisible\"\n [style.width.px]=\"sidebarWidth\">\n <mj-conversation-sidebar\n [activeTab]=\"activeTab\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [selectedConversationId]=\"selectedConversationId\"\n [renamedConversationId]=\"renamedConversationId\"\n (conversationSelected)=\"onConversationSelected($event)\"\n (newConversationRequested)=\"startNewConversation()\">\n </mj-conversation-sidebar>\n </div>\n\n <!-- Resize handle for sidebar -->\n <div class=\"sidebar-resize-handle\" *ngIf=\"isSidebarVisible && activeTab !== 'collections' && activeTab !== 'tasks'\" (mousedown)=\"onSidebarResizeStart($event)\"></div>\n\n <!-- Collections Full-Panel View -->\n <div class=\"workspace-main\" *ngIf=\"activeTab === 'collections'\">\n <mj-collections-full-view\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n (collectionNavigated)=\"onCollectionNavigated($event)\">\n </mj-collections-full-view>\n </div>\n\n <!-- Tasks Full-Panel View -->\n <div class=\"workspace-main\" *ngIf=\"activeTab === 'tasks'\">\n <mj-tasks-full-view\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [baseFilter]=\"tasksFilter\"\n [activeTaskId]=\"activeTaskId\"\n (openEntityRecord)=\"onOpenEntityRecordFromTasks($event)\">\n </mj-tasks-full-view>\n </div>\n\n <!-- Main Chat Area (only shown when not in Collections or Tasks view) -->\n <div class=\"workspace-main\" *ngIf=\"activeTab !== 'collections' && activeTab !== 'tasks'\">\n <mj-conversation-chat-area\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [conversationId]=\"selectedConversationId\"\n [conversation]=\"selectedConversation\"\n [threadId]=\"selectedThreadId\"\n [isNewConversation]=\"isNewUnsavedConversation\"\n [pendingMessage]=\"pendingMessageToSend\"\n [pendingArtifactId]=\"pendingArtifactId\"\n [pendingArtifactVersionNumber]=\"pendingArtifactVersionNumber\"\n (conversationRenamed)=\"onConversationRenamed($event)\"\n (openEntityRecord)=\"onOpenEntityRecord($event)\"\n (taskClicked)=\"onTaskClicked($event)\"\n (artifactLinkClicked)=\"onArtifactLinkNavigation($event)\"\n (conversationCreated)=\"onConversationCreated($event)\"\n (threadOpened)=\"onThreadOpened($event)\"\n (threadClosed)=\"onThreadClosed()\"\n (pendingArtifactConsumed)=\"pendingArtifactId = null; pendingArtifactVersionNumber = null\"\n (pendingMessageConsumed)=\"pendingMessageToSend = null\"\n (pendingMessageRequested)=\"pendingMessageToSend = $event\">\n </mj-conversation-chat-area>\n </div>\n\n <!-- Right Artifact Panel -->\n @if (isArtifactPanelOpen && activeArtifactId) {\n @if (!isArtifactPanelMaximized) {\n <div class=\"artifact-panel-resize-handle\" (mousedown)=\"onArtifactPanelResizeStart($event)\"></div>\n }\n <div class=\"workspace-artifact-panel\"\n [style.width.%]=\"artifactPanelWidth\"\n [class.maximized]=\"isArtifactPanelMaximized\">\n <mj-artifact-viewer-panel\n [artifactId]=\"activeArtifactId\"\n [currentUser]=\"currentUser\"\n [environmentId]=\"environmentId\"\n [versionNumber]=\"activeVersionNumber ?? undefined\"\n [showSaveToCollection]=\"activeTab !== 'collections'\"\n [viewContext]=\"activeTab === 'collections' ? 'collection' : 'conversation'\"\n [contextCollectionId]=\"collectionState.activeCollectionId ?? undefined\"\n [canShare]=\"canShareActiveArtifact\"\n [canEdit]=\"canEditActiveArtifact\"\n [isMaximized]=\"isArtifactPanelMaximized\"\n (closed)=\"closeArtifactPanel()\"\n (navigateToLink)=\"onArtifactLinkNavigation($event)\"\n (shareRequested)=\"onArtifactShareRequested($event)\"\n (maximizeToggled)=\"toggleMaximizeArtifactPanel()\">\n </mj-artifact-viewer-panel>\n </div>\n }\n </div>\n }\n\n <!-- Global Search Panel -->\n <mj-search-panel\n [isOpen]=\"isSearchPanelOpen\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n (close)=\"closeSearch()\"\n (resultSelected)=\"handleSearchResult($event)\">\n </mj-search-panel>\n\n <!-- Toast Notifications -->\n <mj-toast></mj-toast>\n\n <!-- Artifact Share Modal -->\n <mj-artifact-share-modal\n [isOpen]=\"isArtifactShareModalOpen\"\n [artifact]=\"artifactToShare\"\n [currentUser]=\"currentUser\"\n (saved)=\"onArtifactShared()\"\n (cancelled)=\"onArtifactShareModalClose()\">\n </mj-artifact-share-modal>\n</div>", styles: [".conversation-workspace {\n display: flex;\n flex-direction: column;\n height: 100%; /* Fill parent container - works in any context (tabs, embedded, etc.) */\n min-height: 0; /* Allow flex shrinking in nested flex containers */\n background-color: #F4F4F4;\n position: relative;\n}\n\n.workspace-navigation {\n flex-shrink: 0;\n height: 48px;\n background-color: #092340;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.workspace-content {\n flex: 1;\n display: flex;\n overflow: hidden;\n min-height: 0;\n}\n\n.workspace-sidebar {\n flex-shrink: 0;\n background-color: #092340;\n border-right: 1px solid #D9D9D9;\n overflow-y: auto;\n}\n\n.sidebar-resize-handle {\n width: 4px;\n background: transparent;\n cursor: ew-resize;\n flex-shrink: 0;\n position: relative;\n transition: background-color 0.2s;\n}\n\n.sidebar-resize-handle:hover {\n background: #1e40af;\n}\n\n.sidebar-resize-handle:active {\n background: #1e3a8a;\n}\n\n.sidebar-resize-handle::before {\n content: '';\n position: absolute;\n left: -4px;\n right: -4px;\n top: 0;\n bottom: 0;\n cursor: ew-resize;\n}\n\n.workspace-main {\n flex: 1;\n display: flex;\n flex-direction: column;\n background-color: #FFF;\n overflow: hidden;\n min-height: 0;\n}\n\n.workspace-main > mj-conversation-chat-area {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n\n.workspace-artifact-panel {\n flex-shrink: 0;\n background-color: #FFF;\n overflow: hidden;\n min-width: 300px;\n max-width: 70%;\n}\n\n.artifact-panel-resize-handle {\n width: 4px;\n background-color: transparent;\n cursor: ew-resize;\n flex-shrink: 0;\n transition: background-color 0.2s;\n position: relative;\n z-index: 10;\n}\n\n/* Wider hit area for easier grabbing */\n.artifact-panel-resize-handle::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: -4px;\n right: -4px;\n cursor: ew-resize;\n}\n\n.artifact-panel-resize-handle:hover {\n background-color: #1e40af;\n}\n\n.artifact-panel-resize-handle:active {\n background-color: #1e3a8a;\n}\n\n/* Maximized artifact panel */\n.workspace-artifact-panel.maximized {\n width: 100% !important;\n max-width: 100%;\n}\n\n/* Compact layout */\n.conversation-workspace[data-layout=\"compact\"] .workspace-sidebar {\n width: 240px;\n}\n\n.conversation-workspace[data-layout=\"compact\"] .workspace-artifact-panel {\n width: 400px;\n}\n\n/* Embedded layout */\n.conversation-workspace[data-layout=\"embedded\"] {\n height: 100%;\n}\n\n.conversation-workspace[data-layout=\"embedded\"] .workspace-navigation {\n height: 48px;\n}\n\n/* Responsive */\n@media (max-width: 1024px) {\n .workspace-sidebar {\n position: absolute;\n left: 0;\n top: 60px;\n bottom: 0;\n z-index: 100;\n box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);\n }\n\n .workspace-artifact-panel {\n position: fixed;\n right: 0;\n top: 60px;\n bottom: 0;\n z-index: 100;\n box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);\n }\n}\n\n/* Desktop sidebar toggle animation */\n@media (min-width: 769px) {\n .workspace-sidebar {\n transition: width 0.3s ease, min-width 0.3s ease;\n overflow: hidden;\n }\n\n .workspace-sidebar:not(.open) {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n }\n\n .sidebar-resize-handle {\n transition: opacity 0.3s ease, width 0.3s ease;\n }\n\n .workspace-sidebar:not(.open) ~ .sidebar-resize-handle {\n opacity: 0;\n width: 0;\n pointer-events: none;\n }\n}\n\n/* Mobile adjustments: 481px - 768px */\n@media (max-width: 768px) {\n .workspace-sidebar {\n position: fixed;\n left: 0;\n top: 80px;\n z-index: 1000;\n width: 260px !important;\n height: calc(100vh - 80px);\n transform: translateX(-100%);\n transition: transform 0.3s ease;\n }\n\n .workspace-sidebar.open {\n transform: translateX(0);\n }\n\n .workspace-artifact-panel {\n position: fixed;\n width: 100%;\n left: 0;\n right: 0;\n top: 48px;\n z-index: 1000;\n max-width: 100%;\n }\n\n .sidebar-resize-handle,\n .artifact-panel-resize-handle {\n display: none;\n }\n\n /* Mobile sidebar backdrop */\n .mobile-sidebar-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.3s ease;\n z-index: 999;\n }\n\n .mobile-sidebar-backdrop.visible {\n opacity: 1;\n pointer-events: auto;\n }\n}\n\n/* Small Phone adjustments: <= 480px */\n@media (max-width: 480px) {\n .workspace-navigation {\n height: 48px;\n }\n\n .workspace-sidebar {\n width: 100%;\n }\n}\n\n/* Loading spinner (shown while initializing agents) */\n.workspace-loading {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n flex: 1;\n width: 100%;\n background: #FFF;\n gap: 1rem;\n}\n\n.loading-spinner {\n font-size: 3rem;\n color: #0078d4;\n}\n\n.workspace-loading p {\n font-size: 1rem;\n color: #666;\n margin: 0;\n}"] }]
|
|
1216
|
+
args: [{ selector: 'mj-conversation-workspace', template: "<div class=\"conversation-workspace\" [attr.data-layout]=\"layout\" mjSearchShortcut (searchTriggered)=\"openSearch()\" kendoDialogContainer>\n <!-- Top Navigation Bar -->\n <div class=\"workspace-navigation\">\n <mj-conversation-navigation\n [activeTab]=\"activeTab\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [conversationId]=\"selectedConversationId\"\n (tabChanged)=\"onTabChanged($event)\"\n (sidebarToggled)=\"toggleSidebar()\"\n (searchTriggered)=\"openSearch()\"\n (refreshTriggered)=\"onRefreshAgentCache()\">\n </mj-conversation-navigation>\n </div>\n\n <!-- Loading spinner while initializing agents -->\n @if (!isWorkspaceReady) {\n <div class=\"workspace-loading\">\n <mj-loading text=\"Loading agents...\" size=\"large\"></mj-loading>\n </div>\n }\n\n <!-- Main workspace content - only renders when agents are ready -->\n @if (isWorkspaceReady) {\n <div class=\"workspace-content\">\n <!-- Mobile sidebar backdrop -->\n @if (isMobileView && isSidebarVisible && activeTab !== 'collections' && activeTab !== 'tasks') {\n <div class=\"mobile-sidebar-backdrop visible\" (click)=\"closeSidebar()\"></div>\n }\n\n <!-- Left Sidebar (hidden when Collections or Tasks view is active) -->\n <div class=\"workspace-sidebar\"\n *ngIf=\"activeTab !== 'collections' && activeTab !== 'tasks' && isSidebarSettingsLoaded\"\n [class.open]=\"isSidebarVisible\"\n [class.collapsed]=\"isSidebarCollapsed\"\n [class.no-transition]=\"!sidebarTransitionsEnabled\"\n [style.width.px]=\"isSidebarCollapsed ? 0 : sidebarWidth\">\n <mj-conversation-sidebar\n [activeTab]=\"activeTab\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [selectedConversationId]=\"selectedConversationId\"\n [renamedConversationId]=\"renamedConversationId\"\n [isSidebarPinned]=\"isSidebarPinned\"\n [isMobileView]=\"isMobileView\"\n (conversationSelected)=\"onConversationSelected($event)\"\n (newConversationRequested)=\"startNewConversation()\"\n (pinSidebarRequested)=\"pinSidebar()\"\n (unpinSidebarRequested)=\"unpinSidebar()\">\n </mj-conversation-sidebar>\n </div>\n\n <!-- Floating toggle button (only visible when sidebar is collapsed and settings loaded) -->\n @if (activeTab !== 'collections' && activeTab !== 'tasks' && isSidebarCollapsed && isSidebarSettingsLoaded) {\n <button class=\"sidebar-floating-toggle\"\n (click)=\"expandSidebar()\"\n title=\"Show conversations\">\n <i class=\"fas fa-table-columns\"></i>\n </button>\n }\n\n <!-- Resize handle for sidebar (only when expanded and settings loaded) -->\n <div class=\"sidebar-resize-handle\"\n *ngIf=\"isSidebarVisible && !isSidebarCollapsed && activeTab !== 'collections' && activeTab !== 'tasks' && isSidebarSettingsLoaded\"\n (mousedown)=\"onSidebarResizeStart($event)\"></div>\n\n <!-- Collections Full-Panel View -->\n <div class=\"workspace-main\" *ngIf=\"activeTab === 'collections'\">\n <mj-collections-full-view\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n (collectionNavigated)=\"onCollectionNavigated($event)\">\n </mj-collections-full-view>\n </div>\n\n <!-- Tasks Full-Panel View -->\n <div class=\"workspace-main\" *ngIf=\"activeTab === 'tasks'\">\n <mj-tasks-full-view\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [baseFilter]=\"tasksFilter\"\n [activeTaskId]=\"activeTaskId\"\n (openEntityRecord)=\"onOpenEntityRecordFromTasks($event)\">\n </mj-tasks-full-view>\n </div>\n\n <!-- Main Chat Area (only shown when not in Collections or Tasks view) -->\n <div class=\"workspace-main\" *ngIf=\"activeTab !== 'collections' && activeTab !== 'tasks'\">\n <mj-conversation-chat-area\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [conversationId]=\"selectedConversationId\"\n [conversation]=\"selectedConversation\"\n [threadId]=\"selectedThreadId\"\n [isNewConversation]=\"isNewUnsavedConversation\"\n [pendingMessage]=\"pendingMessageToSend\"\n [pendingAttachments]=\"pendingAttachmentsToSend\"\n [pendingArtifactId]=\"pendingArtifactId\"\n [pendingArtifactVersionNumber]=\"pendingArtifactVersionNumber\"\n (conversationRenamed)=\"onConversationRenamed($event)\"\n (openEntityRecord)=\"onOpenEntityRecord($event)\"\n (taskClicked)=\"onTaskClicked($event)\"\n (artifactLinkClicked)=\"onArtifactLinkNavigation($event)\"\n (conversationCreated)=\"onConversationCreated($event)\"\n (threadOpened)=\"onThreadOpened($event)\"\n (threadClosed)=\"onThreadClosed()\"\n (pendingArtifactConsumed)=\"pendingArtifactId = null; pendingArtifactVersionNumber = null\"\n (pendingMessageConsumed)=\"pendingMessageToSend = null; pendingAttachmentsToSend = null\"\n (pendingMessageRequested)=\"onPendingMessageRequested($event)\">\n </mj-conversation-chat-area>\n </div>\n\n <!-- Right Artifact Panel -->\n @if (isArtifactPanelOpen && activeArtifactId) {\n @if (!isArtifactPanelMaximized) {\n <div class=\"artifact-panel-resize-handle\" (mousedown)=\"onArtifactPanelResizeStart($event)\"></div>\n }\n <div class=\"workspace-artifact-panel\"\n [style.width.%]=\"artifactPanelWidth\"\n [class.maximized]=\"isArtifactPanelMaximized\">\n <mj-artifact-viewer-panel\n [artifactId]=\"activeArtifactId\"\n [currentUser]=\"currentUser\"\n [environmentId]=\"environmentId\"\n [versionNumber]=\"activeVersionNumber ?? undefined\"\n [showSaveToCollection]=\"activeTab !== 'collections'\"\n [viewContext]=\"activeTab === 'collections' ? 'collection' : 'conversation'\"\n [contextCollectionId]=\"collectionState.activeCollectionId ?? undefined\"\n [canShare]=\"canShareActiveArtifact\"\n [canEdit]=\"canEditActiveArtifact\"\n [isMaximized]=\"isArtifactPanelMaximized\"\n (closed)=\"closeArtifactPanel()\"\n (navigateToLink)=\"onArtifactLinkNavigation($event)\"\n (shareRequested)=\"onArtifactShareRequested($event)\"\n (maximizeToggled)=\"toggleMaximizeArtifactPanel()\">\n </mj-artifact-viewer-panel>\n </div>\n }\n </div>\n }\n\n <!-- Global Search Panel -->\n <mj-search-panel\n [isOpen]=\"isSearchPanelOpen\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n (close)=\"closeSearch()\"\n (resultSelected)=\"handleSearchResult($event)\">\n </mj-search-panel>\n\n <!-- Toast Notifications -->\n <mj-toast></mj-toast>\n\n <!-- Artifact Share Modal -->\n <mj-artifact-share-modal\n [isOpen]=\"isArtifactShareModalOpen\"\n [artifact]=\"artifactToShare\"\n [currentUser]=\"currentUser\"\n (saved)=\"onArtifactShared()\"\n (cancelled)=\"onArtifactShareModalClose()\">\n </mj-artifact-share-modal>\n</div>", styles: [".conversation-workspace {\n display: flex;\n flex-direction: column;\n height: 100%; /* Fill parent container - works in any context (tabs, embedded, etc.) */\n min-height: 0; /* Allow flex shrinking in nested flex containers */\n background-color: #F4F4F4;\n position: relative;\n}\n\n.workspace-navigation {\n flex-shrink: 0;\n height: 48px;\n background-color: #092340;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.workspace-content {\n flex: 1;\n display: flex;\n overflow: hidden;\n min-height: 0;\n position: relative;\n}\n\n.workspace-sidebar {\n flex-shrink: 0;\n background-color: #092340;\n border-right: 1px solid #D9D9D9;\n overflow-y: auto;\n transition: width 0.3s ease;\n}\n\n/* Disable transitions during initial load to prevent jarring animation */\n.workspace-sidebar.no-transition {\n transition: none !important;\n}\n\n.workspace-sidebar.collapsed {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n overflow: hidden;\n}\n\n/* Floating toggle button (only visible when sidebar is collapsed) */\n.sidebar-floating-toggle {\n position: absolute;\n top: 12px;\n left: 12px;\n z-index: 100;\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: #092340;\n border: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 8px;\n cursor: pointer;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n transition: all 0.2s ease;\n}\n\n.sidebar-floating-toggle:hover {\n background: #0a2d4d;\n border-color: rgba(255, 255, 255, 0.3);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);\n transform: scale(1.05);\n}\n\n.sidebar-floating-toggle:active {\n transform: scale(0.98);\n}\n\n.sidebar-floating-toggle i {\n color: rgba(255, 255, 255, 0.85);\n font-size: 16px;\n transition: color 0.15s ease;\n}\n\n.sidebar-floating-toggle:hover i {\n color: white;\n}\n\n.sidebar-resize-handle {\n width: 4px;\n background: transparent;\n cursor: ew-resize;\n flex-shrink: 0;\n position: relative;\n transition: background-color 0.2s;\n}\n\n.sidebar-resize-handle:hover {\n background: #1e40af;\n}\n\n.sidebar-resize-handle:active {\n background: #1e3a8a;\n}\n\n.sidebar-resize-handle::before {\n content: '';\n position: absolute;\n left: -4px;\n right: -4px;\n top: 0;\n bottom: 0;\n cursor: ew-resize;\n}\n\n.workspace-main {\n flex: 1;\n display: flex;\n flex-direction: column;\n background-color: #FFF;\n overflow: hidden;\n min-height: 0;\n}\n\n.workspace-main > mj-conversation-chat-area {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n\n.workspace-artifact-panel {\n flex-shrink: 0;\n background-color: #FFF;\n overflow: hidden;\n min-width: 300px;\n max-width: 70%;\n}\n\n.artifact-panel-resize-handle {\n width: 4px;\n background-color: transparent;\n cursor: ew-resize;\n flex-shrink: 0;\n transition: background-color 0.2s;\n position: relative;\n z-index: 10;\n}\n\n/* Wider hit area for easier grabbing */\n.artifact-panel-resize-handle::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: -4px;\n right: -4px;\n cursor: ew-resize;\n}\n\n.artifact-panel-resize-handle:hover {\n background-color: #1e40af;\n}\n\n.artifact-panel-resize-handle:active {\n background-color: #1e3a8a;\n}\n\n/* Maximized artifact panel */\n.workspace-artifact-panel.maximized {\n width: 100% !important;\n max-width: 100%;\n}\n\n/* Compact layout */\n.conversation-workspace[data-layout=\"compact\"] .workspace-sidebar {\n width: 240px;\n}\n\n.conversation-workspace[data-layout=\"compact\"] .workspace-artifact-panel {\n width: 400px;\n}\n\n/* Embedded layout */\n.conversation-workspace[data-layout=\"embedded\"] {\n height: 100%;\n}\n\n.conversation-workspace[data-layout=\"embedded\"] .workspace-navigation {\n height: 48px;\n}\n\n/* Responsive */\n@media (max-width: 1024px) {\n .workspace-sidebar {\n position: absolute;\n left: 0;\n top: 60px;\n bottom: 0;\n z-index: 100;\n box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);\n }\n\n .workspace-artifact-panel {\n position: fixed;\n right: 0;\n top: 60px;\n bottom: 0;\n z-index: 100;\n box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);\n }\n}\n\n/* Desktop sidebar toggle animation */\n@media (min-width: 769px) {\n .workspace-sidebar {\n transition: width 0.3s ease, min-width 0.3s ease;\n overflow: hidden;\n }\n\n .workspace-sidebar:not(.open) {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n }\n\n .sidebar-resize-handle {\n transition: opacity 0.3s ease, width 0.3s ease;\n }\n\n .workspace-sidebar:not(.open) ~ .sidebar-resize-handle {\n opacity: 0;\n width: 0;\n pointer-events: none;\n }\n}\n\n/* Mobile adjustments: 481px - 768px */\n@media (max-width: 768px) {\n .workspace-sidebar {\n position: fixed;\n left: 0;\n top: 80px;\n z-index: 1000;\n width: 260px !important;\n height: calc(100vh - 80px);\n transform: translateX(-100%);\n transition: transform 0.3s ease;\n }\n\n .workspace-sidebar.open {\n transform: translateX(0);\n }\n\n .workspace-artifact-panel {\n position: fixed;\n width: 100%;\n left: 0;\n right: 0;\n top: 56px; /* 48px nav + 8px dark strip above blue border */\n bottom: 0;\n z-index: 1000;\n max-width: 100%;\n height: auto;\n }\n\n .sidebar-resize-handle,\n .artifact-panel-resize-handle,\n .sidebar-floating-toggle {\n display: none;\n }\n\n /* Mobile sidebar backdrop */\n .mobile-sidebar-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.3s ease;\n z-index: 999;\n }\n\n .mobile-sidebar-backdrop.visible {\n opacity: 1;\n pointer-events: auto;\n }\n}\n\n/* Small Phone adjustments: <= 480px */\n@media (max-width: 480px) {\n .workspace-navigation {\n height: 48px;\n }\n\n .workspace-sidebar {\n width: 100%;\n }\n}\n\n/* Loading spinner (shown while initializing agents) */\n.workspace-loading {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n flex: 1;\n width: 100%;\n background: #FFF;\n gap: 1rem;\n}\n\n.loading-spinner {\n font-size: 3rem;\n color: #0078d4;\n}\n\n.workspace-loading p {\n font-size: 1rem;\n color: #666;\n margin: 0;\n}"] }]
|
|
1033
1217
|
}], () => [{ type: i1.ConversationDataService }, { type: i2.ArtifactStateService }, { type: i3.CollectionStateService }, { type: i4.ArtifactPermissionService }, { type: i5.MentionAutocompleteService }, { type: i6.MJNotificationService }, { type: i7.ConversationStreamingService }, { type: i8.UICommandHandlerService }, { type: i0.ChangeDetectorRef }], { environmentId: [{
|
|
1034
1218
|
type: Input
|
|
1035
1219
|
}], initialConversationId: [{
|
|
@@ -1067,6 +1251,9 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
1067
1251
|
}], onWindowResize: [{
|
|
1068
1252
|
type: HostListener,
|
|
1069
1253
|
args: ['window:resize']
|
|
1254
|
+
}], onDocumentClick: [{
|
|
1255
|
+
type: HostListener,
|
|
1256
|
+
args: ['document:click', ['$event']]
|
|
1070
1257
|
}] }); })();
|
|
1071
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationWorkspaceComponent, { className: "ConversationWorkspaceComponent", filePath: "src/lib/components/workspace/conversation-workspace.component.ts", lineNumber:
|
|
1258
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationWorkspaceComponent, { className: "ConversationWorkspaceComponent", filePath: "src/lib/components/workspace/conversation-workspace.component.ts", lineNumber: 65 }); })();
|
|
1072
1259
|
//# sourceMappingURL=conversation-workspace.component.js.map
|