@memberjunction/ng-conversations 5.4.1 → 5.6.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/agent/agent-process-panel.component.d.ts.map +1 -1
- package/dist/lib/components/agent/agent-process-panel.component.js +3 -2
- package/dist/lib/components/agent/agent-process-panel.component.js.map +1 -1
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.js +10 -9
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.js.map +1 -1
- package/dist/lib/components/collection/artifact-create-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/artifact-create-modal.component.js +3 -2
- package/dist/lib/components/collection/artifact-create-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.js +4 -3
- package/dist/lib/components/collection/collection-form-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-share-modal.component.js +5 -4
- package/dist/lib/components/collection/collection-share-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.d.ts +2 -0
- package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.js +24 -17
- package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.d.ts +1 -0
- package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.js +14 -10
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +21 -7
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +44 -14
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +3 -0
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +21 -11
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/mention/mention-editor.component.d.ts.map +1 -1
- package/dist/lib/components/mention/mention-editor.component.js +4 -3
- package/dist/lib/components/mention/mention-editor.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/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +21 -7
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +7 -6
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/project/project-selector.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-selector.component.js +3 -2
- package/dist/lib/components/project/project-selector.component.js.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.js +4 -3
- package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
- package/dist/lib/services/agent-state.service.d.ts +4 -0
- package/dist/lib/services/agent-state.service.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.js +15 -6
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-permission.service.js +3 -2
- package/dist/lib/services/artifact-permission.service.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +5 -4
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-attachment.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-attachment.service.js +2 -1
- package/dist/lib/services/conversation-attachment.service.js.map +1 -1
- package/dist/lib/services/conversation-data.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-data.service.js +7 -6
- package/dist/lib/services/conversation-data.service.js.map +1 -1
- package/dist/lib/services/data-cache.service.d.ts.map +1 -1
- package/dist/lib/services/data-cache.service.js +9 -8
- package/dist/lib/services/data-cache.service.js.map +1 -1
- package/package.json +17 -17
|
@@ -49,6 +49,9 @@ export declare class ConversationListComponent implements OnInit, OnDestroy {
|
|
|
49
49
|
onUnpinSidebarClick(event: Event): void;
|
|
50
50
|
toggleDirectMessages(): void;
|
|
51
51
|
togglePinned(): void;
|
|
52
|
+
IsConversationActive(conversation: MJConversationEntity): boolean;
|
|
53
|
+
IsConversationRenamed(conversation: MJConversationEntity): boolean;
|
|
54
|
+
IsMenuOpen(conversation: MJConversationEntity): boolean;
|
|
52
55
|
selectConversation(conversation: MJConversationEntity): void;
|
|
53
56
|
createNewConversation(): Promise<void>;
|
|
54
57
|
renameConversation(conversation: MJConversationEntity): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-list.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/conversation/conversation-list.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,SAAS,EAAgB,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC3H,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;;
|
|
1
|
+
{"version":3,"file":"conversation-list.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/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CAAC,YAAY,EAAE,oBAAoB,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAWjF,cAAc,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO;IAI/C,mBAAmB,IAAI,IAAI;IAO3B,2BAA2B,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI;IAQzD,SAAS,IAAI,IAAI;IAMjB,WAAW,IAAI,IAAI;IAIb,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC;IAqC9C,uBAAuB,CAAC,YAAY,EAAE,oBAAoB,GAAG,IAAI;yCA/StD,yBAAyB;2CAAzB,yBAAyB;CAsTrC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
3
|
import { takeUntil } from 'rxjs/operators';
|
|
4
|
+
import { UUIDsEqual } from '@memberjunction/global';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
import * as i1 from "../../services/conversation-data.service";
|
|
6
7
|
import * as i2 from "../../services/dialog.service";
|
|
@@ -111,7 +112,7 @@ function ConversationListComponent_Conditional_10_For_9_Conditional_11_Template(
|
|
|
111
112
|
const conversation_r7 = i0.ɵɵnextContext().$implicit;
|
|
112
113
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
113
114
|
i0.ɵɵadvance(3);
|
|
114
|
-
i0.ɵɵconditional(ctx_r1.
|
|
115
|
+
i0.ɵɵconditional(ctx_r1.IsMenuOpen(conversation_r7) ? 3 : -1);
|
|
115
116
|
} }
|
|
116
117
|
function ConversationListComponent_Conditional_10_For_9_Template(rf, ctx) { if (rf & 1) {
|
|
117
118
|
const _r6 = i0.ɵɵgetCurrentView();
|
|
@@ -134,7 +135,7 @@ function ConversationListComponent_Conditional_10_For_9_Template(rf, ctx) { if (
|
|
|
134
135
|
} if (rf & 2) {
|
|
135
136
|
const conversation_r7 = ctx.$implicit;
|
|
136
137
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
137
|
-
i0.ɵɵclassProp("active",
|
|
138
|
+
i0.ɵɵclassProp("active", ctx_r1.IsConversationActive(conversation_r7))("renamed", ctx_r1.IsConversationRenamed(conversation_r7));
|
|
138
139
|
i0.ɵɵadvance();
|
|
139
140
|
i0.ɵɵconditional(ctx_r1.isSelectionMode ? 1 : -1);
|
|
140
141
|
i0.ɵɵadvance(2);
|
|
@@ -223,7 +224,7 @@ function ConversationListComponent_For_19_Conditional_11_Template(rf, ctx) { if
|
|
|
223
224
|
const conversation_r12 = i0.ɵɵnextContext().$implicit;
|
|
224
225
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
225
226
|
i0.ɵɵadvance(3);
|
|
226
|
-
i0.ɵɵconditional(ctx_r1.
|
|
227
|
+
i0.ɵɵconditional(ctx_r1.IsMenuOpen(conversation_r12) ? 3 : -1);
|
|
227
228
|
} }
|
|
228
229
|
function ConversationListComponent_For_19_Template(rf, ctx) { if (rf & 1) {
|
|
229
230
|
const _r11 = i0.ɵɵgetCurrentView();
|
|
@@ -246,7 +247,7 @@ function ConversationListComponent_For_19_Template(rf, ctx) { if (rf & 1) {
|
|
|
246
247
|
} if (rf & 2) {
|
|
247
248
|
const conversation_r12 = ctx.$implicit;
|
|
248
249
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
249
|
-
i0.ɵɵclassProp("active",
|
|
250
|
+
i0.ɵɵclassProp("active", ctx_r1.IsConversationActive(conversation_r12))("renamed", ctx_r1.IsConversationRenamed(conversation_r12));
|
|
250
251
|
i0.ɵɵadvance();
|
|
251
252
|
i0.ɵɵconditional(ctx_r1.isSelectionMode ? 1 : -1);
|
|
252
253
|
i0.ɵɵadvance(2);
|
|
@@ -422,6 +423,15 @@ export class ConversationListComponent {
|
|
|
422
423
|
togglePinned() {
|
|
423
424
|
this.pinnedExpanded = !this.pinnedExpanded;
|
|
424
425
|
}
|
|
426
|
+
IsConversationActive(conversation) {
|
|
427
|
+
return UUIDsEqual(conversation.ID, this.selectedConversationId);
|
|
428
|
+
}
|
|
429
|
+
IsConversationRenamed(conversation) {
|
|
430
|
+
return UUIDsEqual(conversation.ID, this.renamedConversationId);
|
|
431
|
+
}
|
|
432
|
+
IsMenuOpen(conversation) {
|
|
433
|
+
return UUIDsEqual(this.openMenuConversationId, conversation.ID);
|
|
434
|
+
}
|
|
425
435
|
selectConversation(conversation) {
|
|
426
436
|
this.conversationSelected.emit(conversation.ID);
|
|
427
437
|
// Clear unread notifications when conversation is opened
|
|
@@ -661,8 +671,8 @@ export class ConversationListComponent {
|
|
|
661
671
|
<div class="chat-list" [class.expanded]="pinnedExpanded">
|
|
662
672
|
@for (conversation of pinnedConversations; track conversation.ID) {
|
|
663
673
|
<div class="conversation-item"
|
|
664
|
-
[class.active]="conversation
|
|
665
|
-
[class.renamed]="conversation
|
|
674
|
+
[class.active]="IsConversationActive(conversation)"
|
|
675
|
+
[class.renamed]="IsConversationRenamed(conversation)"
|
|
666
676
|
(click)="handleConversationClick(conversation)">
|
|
667
677
|
@if (isSelectionMode) {
|
|
668
678
|
<div class="conversation-checkbox">
|
|
@@ -690,7 +700,7 @@ export class ConversationListComponent {
|
|
|
690
700
|
<button class="menu-btn" (click)="toggleMenu(conversation.ID, $event)" title="More options">
|
|
691
701
|
<i class="fas fa-ellipsis"></i>
|
|
692
702
|
</button>
|
|
693
|
-
@if (
|
|
703
|
+
@if (IsMenuOpen(conversation)) {
|
|
694
704
|
<div class="context-menu" (click)="$event.stopPropagation()">
|
|
695
705
|
<button class="menu-item" (click)="togglePin(conversation, $event)">
|
|
696
706
|
<i class="fas fa-thumbtack"></i>
|
|
@@ -726,8 +736,8 @@ export class ConversationListComponent {
|
|
|
726
736
|
<div class="chat-list" [class.expanded]="directMessagesExpanded">
|
|
727
737
|
@for (conversation of unpinnedConversations; track conversation.ID) {
|
|
728
738
|
<div class="conversation-item"
|
|
729
|
-
[class.active]="conversation
|
|
730
|
-
[class.renamed]="conversation
|
|
739
|
+
[class.active]="IsConversationActive(conversation)"
|
|
740
|
+
[class.renamed]="IsConversationRenamed(conversation)"
|
|
731
741
|
(click)="handleConversationClick(conversation)">
|
|
732
742
|
@if (isSelectionMode) {
|
|
733
743
|
<div class="conversation-checkbox">
|
|
@@ -755,7 +765,7 @@ export class ConversationListComponent {
|
|
|
755
765
|
<button class="menu-btn" (click)="toggleMenu(conversation.ID, $event)" title="More options">
|
|
756
766
|
<i class="fas fa-ellipsis"></i>
|
|
757
767
|
</button>
|
|
758
|
-
@if (
|
|
768
|
+
@if (IsMenuOpen(conversation)) {
|
|
759
769
|
<div class="context-menu" (click)="$event.stopPropagation()">
|
|
760
770
|
<button class="menu-item" (click)="togglePin(conversation, $event)">
|
|
761
771
|
<i class="fas fa-thumbtack"></i>
|
|
@@ -834,5 +844,5 @@ export class ConversationListComponent {
|
|
|
834
844
|
type: HostListener,
|
|
835
845
|
args: ['document:click']
|
|
836
846
|
}] }); })();
|
|
837
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationListComponent, { className: "ConversationListComponent", filePath: "src/lib/components/conversation/conversation-list.component.ts", lineNumber:
|
|
847
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationListComponent, { className: "ConversationListComponent", filePath: "src/lib/components/conversation/conversation-list.component.ts", lineNumber: 720 }); })();
|
|
838
848
|
//# sourceMappingURL=conversation-list.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-list.component.js","sourceRoot":"","sources":["../../../../src/lib/components/conversation/conversation-list.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAqB,YAAY,EAAqB,MAAM,eAAe,CAAC;AAO3H,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsMT;;kBA4fA,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBA2DN,YAAY;mBAAC,gBAAgB;;kFAxEnB,yBAAyB","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, OnDestroy, HostListener, ChangeDetectorRef } from '@angular/core';\nimport { UserInfo } from '@memberjunction/core';\nimport { MJConversationEntity } from '@memberjunction/core-entities';\nimport { ConversationDataService } from '../../services/conversation-data.service';\nimport { DialogService } from '../../services/dialog.service';\nimport { NotificationService } from '../../services/notification.service';\nimport { ActiveTasksService } from '../../services/active-tasks.service';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n@Component({\n standalone: false,\n selector: 'mj-conversation-list',\n template: `\n <div class=\"conversation-list\" kendoDialogContainer>\n <div class=\"list-header\">\n <div class=\"header-top\">\n <input\n type=\"text\"\n class=\"search-input\"\n placeholder=\"Search conversations...\"\n [(ngModel)]=\"searchQuery\">\n @if (!isSelectionMode) {\n <div class=\"header-menu-container\">\n <button class=\"btn-menu\" (click)=\"toggleHeaderMenu($event)\" title=\"Options\">\n <i class=\"fas fa-ellipsis-v\"></i>\n </button>\n @if (isHeaderMenuOpen) {\n <div class=\"header-dropdown-menu\">\n <button class=\"dropdown-item\" (click)=\"onRefreshConversationsClick($event)\" [disabled]=\"isRefreshing\">\n <i class=\"fas fa-sync-alt\" [class.fa-spin]=\"isRefreshing\"></i>\n <span>{{ isRefreshing ? 'Refreshing...' : 'Refresh' }}</span>\n </button>\n <button class=\"dropdown-item\" (click)=\"onSelectConversationsClick($event)\">\n <i class=\"fas fa-check-square\"></i>\n <span>Select Conversations</span>\n </button>\n @if (!isMobileView) {\n <button class=\"dropdown-item\" (click)=\"onUnpinSidebarClick($event)\">\n <i class=\"fas fa-table-columns\"></i>\n <span>Hide Sidebar</span>\n </button>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n <button class=\"btn-new-conversation\" (click)=\"createNewConversation()\" title=\"New Conversation\">\n <i class=\"fas fa-plus\"></i>\n <span>New Conversation</span>\n </button>\n <div class=\"list-content\">\n <!-- Pinned Section (only show if there are pinned conversations) -->\n @if (pinnedConversations.length > 0) {\n <div class=\"sidebar-section pinned-section\">\n <div class=\"section-header\" [class.expanded]=\"pinnedExpanded\" (click)=\"togglePinned()\">\n <div class=\"section-title\">\n <i class=\"fas fa-chevron-right\"></i>\n <i class=\"fas fa-thumbtack section-icon\"></i>\n <span>Pinned</span>\n </div>\n </div>\n <div class=\"chat-list\" [class.expanded]=\"pinnedExpanded\">\n @for (conversation of pinnedConversations; track conversation.ID) {\n <div class=\"conversation-item\"\n [class.active]=\"conversation.ID === selectedConversationId\"\n [class.renamed]=\"conversation.ID === renamedConversationId\"\n (click)=\"handleConversationClick(conversation)\">\n @if (isSelectionMode) {\n <div class=\"conversation-checkbox\">\n <input type=\"checkbox\"\n [checked]=\"selectedConversationIds.has(conversation.ID)\"\n (click)=\"$event.stopPropagation(); toggleConversationSelection(conversation.ID)\">\n </div>\n }\n <div class=\"conversation-icon-wrapper\">\n @if (hasActiveTasks(conversation.ID)) {\n <div class=\"conversation-icon has-tasks\">\n <i class=\"fas fa-spinner fa-pulse\"></i>\n </div>\n }\n <div class=\"badge-overlay\">\n <mj-notification-badge [conversationId]=\"conversation.ID\"></mj-notification-badge>\n </div>\n </div>\n <div class=\"conversation-info\" [title]=\"conversation.Name + (conversation.Description ? '\\n' + conversation.Description : '')\">\n <div class=\"conversation-name\">{{ conversation.Name }}</div>\n <div class=\"conversation-preview\">{{ conversation.Description }}</div>\n </div>\n @if (!isSelectionMode) {\n <div class=\"conversation-actions\">\n <button class=\"menu-btn\" (click)=\"toggleMenu(conversation.ID, $event)\" title=\"More options\">\n <i class=\"fas fa-ellipsis\"></i>\n </button>\n @if (openMenuConversationId === conversation.ID) {\n <div class=\"context-menu\" (click)=\"$event.stopPropagation()\">\n <button class=\"menu-item\" (click)=\"togglePin(conversation, $event)\">\n <i class=\"fas fa-thumbtack\"></i>\n <span>Unpin</span>\n </button>\n <button class=\"menu-item\" (click)=\"renameConversation(conversation); closeMenu()\">\n <i class=\"fas fa-edit\"></i>\n <span>Rename</span>\n </button>\n <div class=\"menu-divider\"></div>\n <button class=\"menu-item danger\" (click)=\"deleteConversation(conversation); closeMenu()\">\n <i class=\"fas fa-trash\"></i>\n <span>Delete</span>\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Messages Section -->\n <div class=\"sidebar-section\">\n <div class=\"section-header\" [class.expanded]=\"directMessagesExpanded\" (click)=\"toggleDirectMessages()\">\n <div class=\"section-title\">\n <i class=\"fas fa-chevron-right\"></i>\n <span>Messages</span>\n </div>\n </div>\n <div class=\"chat-list\" [class.expanded]=\"directMessagesExpanded\">\n @for (conversation of unpinnedConversations; track conversation.ID) {\n <div class=\"conversation-item\"\n [class.active]=\"conversation.ID === selectedConversationId\"\n [class.renamed]=\"conversation.ID === renamedConversationId\"\n (click)=\"handleConversationClick(conversation)\">\n @if (isSelectionMode) {\n <div class=\"conversation-checkbox\">\n <input type=\"checkbox\"\n [checked]=\"selectedConversationIds.has(conversation.ID)\"\n (click)=\"$event.stopPropagation(); toggleConversationSelection(conversation.ID)\">\n </div>\n }\n <div class=\"conversation-icon-wrapper\">\n @if (hasActiveTasks(conversation.ID)) {\n <div class=\"conversation-icon has-tasks\">\n <i class=\"fas fa-spinner fa-pulse\"></i>\n </div>\n }\n <div class=\"badge-overlay\">\n <mj-notification-badge [conversationId]=\"conversation.ID\"></mj-notification-badge>\n </div>\n </div>\n <div class=\"conversation-info\" [title]=\"conversation.Name + (conversation.Description ? '\\n' + conversation.Description : '')\">\n <div class=\"conversation-name\">{{ conversation.Name }}</div>\n <div class=\"conversation-preview\">{{ conversation.Description }}</div>\n </div>\n @if (!isSelectionMode) {\n <div class=\"conversation-actions\">\n <button class=\"menu-btn\" (click)=\"toggleMenu(conversation.ID, $event)\" title=\"More options\">\n <i class=\"fas fa-ellipsis\"></i>\n </button>\n @if (openMenuConversationId === conversation.ID) {\n <div class=\"context-menu\" (click)=\"$event.stopPropagation()\">\n <button class=\"menu-item\" (click)=\"togglePin(conversation, $event)\">\n <i class=\"fas fa-thumbtack\"></i>\n <span>Pin</span>\n </button>\n <button class=\"menu-item\" (click)=\"renameConversation(conversation); closeMenu()\">\n <i class=\"fas fa-edit\"></i>\n <span>Rename</span>\n </button>\n <div class=\"menu-divider\"></div>\n <button class=\"menu-item danger\" (click)=\"deleteConversation(conversation); closeMenu()\">\n <i class=\"fas fa-trash\"></i>\n <span>Delete</span>\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Selection Action Bar -->\n @if (isSelectionMode) {\n <div class=\"selection-action-bar\">\n <div class=\"selection-info\">\n <span class=\"selection-count\">{{ selectedConversationIds.size }} selected</span>\n @if (selectedConversationIds.size < filteredConversations.length) {\n <button class=\"link-btn\" (click)=\"selectAll()\">Select All</button>\n } @else {\n <button class=\"link-btn\" (click)=\"deselectAll()\">Deselect All</button>\n }\n </div>\n <div class=\"selection-actions\">\n <button class=\"btn-delete-bulk\"\n (click)=\"bulkDeleteConversations()\"\n [disabled]=\"selectedConversationIds.size === 0\">\n <i class=\"fas fa-trash\"></i>\n Delete ({{ selectedConversationIds.size }})\n </button>\n <button class=\"btn-cancel\" (click)=\"toggleSelectionMode()\">\n Cancel\n </button>\n </div>\n </div>\n }\n </div>\n `,\n styles: [`\n :host { display: block; height: 100%; }\n .conversation-list { display: flex; flex-direction: column; height: 100%; background: #092340; }\n .list-header { padding: 8px; border-bottom: 1px solid rgba(255,255,255,0.1); }\n .search-input {\n width: 100%;\n padding: 8px 12px;\n background: rgba(255,255,255,0.1);\n border: 1px solid rgba(255,255,255,0.2);\n border-radius: 6px;\n color: white;\n font-size: 13px;\n transition: all 0.2s;\n }\n .search-input::placeholder { color: rgba(255,255,255,0.5); }\n .search-input:focus { outline: none; background: rgba(255,255,255,0.15); border-color: #0076B6; }\n .btn-new-conversation {\n width: calc(100% - 16px);\n margin: 8px;\n padding: 10px;\n background: #0076B6;\n color: white;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n transition: background 0.2s;\n flex-shrink: 0;\n }\n .btn-new-conversation:hover { background: #005A8C; }\n .btn-new-conversation i { font-size: 14px; }\n .list-content { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 0; }\n\n /* Collapsible Sections */\n .sidebar-section { margin-bottom: 20px; }\n .pinned-section .section-header {\n background: rgba(255, 193, 7, 0.08);\n border-radius: 4px;\n margin: 0 4px;\n }\n .pinned-section .section-title .section-icon {\n color: #FFC107;\n font-size: 11px;\n margin-left: 2px;\n }\n .section-header {\n padding: 4px 16px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n color: rgba(255, 255, 255, 0.7);\n font-size: 13px;\n font-weight: 500;\n transition: color 0.2s;\n user-select: none;\n }\n .section-header:hover { color: white; }\n .section-title {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n .section-title i {\n font-size: 10px;\n transition: transform 0.2s;\n }\n .section-header.expanded .section-title i { transform: rotate(90deg); }\n .chat-list {\n padding: 4px 0;\n display: none;\n }\n .chat-list.expanded { display: block; }\n\n .conversation-item {\n padding: 6px 5px 6px 16px;\n cursor: pointer;\n display: flex;\n gap: 8px;\n align-items: center;\n transition: all 0.2s;\n position: relative;\n color: rgba(255,255,255,0.7);\n font-size: 14px;\n min-height: 45px;\n }\n .conversation-item:hover { background: rgba(255,255,255,0.08); color: white; }\n .conversation-item:hover .conversation-actions { opacity: 1; }\n .conversation-item.active { background: #0076B6; color: white; }\n .conversation-icon-wrapper { position: relative; flex-shrink: 0; }\n .conversation-icon { font-size: 12px; width: 16px; text-align: center; }\n .conversation-icon.has-tasks { color: #fb923c; }\n .badge-overlay { position: absolute; top: -4px; right: -4px; }\n .conversation-info { flex: 1; min-width: 0; }\n .conversation-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .conversation-preview { font-size: 12px; color: rgba(255,255,255,0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .conversation-item.active .conversation-preview { color: rgba(255,255,255,0.8); }\n .conversation-meta { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }\n\n /* Project Badge */\n .project-badge {\n display: inline-block;\n padding: 2px 6px;\n border-radius: 10px;\n font-size: 10px;\n font-weight: 600;\n margin-left: auto;\n background-color: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.6);\n white-space: nowrap;\n max-width: 80px;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .conversation-item:hover .project-badge {\n background-color: rgba(255, 255, 255, 0.15);\n color: rgba(255, 255, 255, 0.8);\n }\n .conversation-item.active .project-badge {\n background-color: rgba(255, 255, 255, 0.2);\n color: white;\n }\n\n .conversation-actions {\n position: absolute;\n right: 5px;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s;\n z-index: 10;\n }\n .conversation-item:hover .conversation-actions { opacity: 1; pointer-events: auto; }\n .conversation-item.active .conversation-actions { opacity: 1; pointer-events: auto; }\n .conversation-actions > * { pointer-events: auto; }\n .pinned-icon { color: #AAE7FD; font-size: 12px; }\n\n /* Task Indicator */\n .task-indicator {\n color: #fb923c;\n font-size: 12px;\n margin-right: 8px;\n flex-shrink: 0;\n animation: pulse-glow 2s ease-in-out infinite;\n }\n @keyframes pulse-glow {\n 0%, 100% {\n opacity: 1;\n filter: drop-shadow(0 0 2px #fb923c);\n }\n 50% {\n opacity: 0.6;\n filter: drop-shadow(0 0 4px #fb923c);\n }\n }\n .conversation-item.active .task-indicator {\n color: #fbbf24;\n }\n\n .menu-btn {\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n color: rgba(255,255,255,0.7);\n background: #092340 !important;\n border: none;\n cursor: pointer;\n transition: all 0.2s;\n }\n .menu-btn:hover {\n background: rgba(255,255,255,0.15) !important;\n color: white;\n }\n .conversation-item.active .menu-btn {\n background: #005A8C !important;\n color: white;\n }\n .menu-btn i { font-size: 14px; }\n\n .context-menu {\n position: absolute;\n top: 100%;\n right: 0;\n margin-top: 4px;\n min-width: 160px;\n background: #0A2742;\n border: 1px solid rgba(255,255,255,0.15);\n border-radius: 8px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);\n z-index: 1001;\n overflow: hidden;\n pointer-events: auto;\n }\n\n .menu-item {\n width: 100%;\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 14px;\n background: transparent;\n border: none;\n color: rgba(255,255,255,0.85);\n font-size: 14px;\n text-align: left;\n cursor: pointer;\n transition: all 0.15s;\n }\n\n .menu-item:hover {\n background: rgba(255,255,255,0.1);\n color: white;\n }\n\n .menu-item i {\n width: 16px;\n font-size: 13px;\n color: rgba(255,255,255,0.6);\n }\n\n .menu-item:hover i {\n color: white;\n }\n\n .menu-item.danger {\n color: rgba(239, 68, 68, 0.9);\n }\n\n .menu-item.danger:hover {\n background: rgba(239, 68, 68, 0.15);\n color: #ff6b6b;\n }\n\n .menu-item.danger i {\n color: rgba(239, 68, 68, 0.8);\n }\n\n .menu-item.danger:hover i {\n color: #ff6b6b;\n }\n\n .menu-divider {\n height: 1px;\n background: rgba(255,255,255,0.1);\n margin: 4px 0;\n }\n\n /* Rename Animation */\n .conversation-item.renamed {\n animation: renameHighlight 1500ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n @keyframes renameHighlight {\n 0% {\n background: linear-gradient(90deg, rgba(59, 130, 246, 0.4), rgba(147, 51, 234, 0.4));\n transform: scale(1.03);\n box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);\n }\n 25% {\n background: linear-gradient(90deg, rgba(59, 130, 246, 0.35), rgba(147, 51, 234, 0.35));\n box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);\n }\n 50% {\n background: linear-gradient(90deg, rgba(16, 185, 129, 0.3), rgba(59, 130, 246, 0.3));\n transform: scale(1.02);\n box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);\n }\n 75% {\n background: linear-gradient(90deg, rgba(16, 185, 129, 0.2), rgba(59, 130, 246, 0.2));\n box-shadow: 0 0 5px rgba(16, 185, 129, 0.2);\n }\n 100% {\n background: transparent;\n transform: scale(1);\n box-shadow: none;\n }\n }\n\n /* Selection Mode Styles */\n .header-top {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n\n /* Header menu button and dropdown */\n .header-menu-container {\n position: relative;\n flex-shrink: 0;\n }\n\n .btn-menu {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: 1px solid rgba(255,255,255,0.2);\n border-radius: 6px;\n color: rgba(255,255,255,0.7);\n cursor: pointer;\n transition: all 0.2s;\n }\n\n .btn-menu:hover {\n background: rgba(255,255,255,0.1);\n color: white;\n border-color: rgba(255,255,255,0.3);\n }\n\n .header-dropdown-menu {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n min-width: 200px;\n background: #0A2742;\n border: 1px solid rgba(255,255,255,0.15);\n border-radius: 8px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);\n z-index: 1001;\n overflow: hidden;\n padding: 4px 0;\n }\n\n .header-dropdown-menu .dropdown-item {\n width: 100%;\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 14px;\n background: transparent;\n border: none;\n color: rgba(255,255,255,0.85);\n font-size: 13px;\n text-align: left;\n cursor: pointer;\n transition: all 0.15s;\n }\n\n .header-dropdown-menu .dropdown-item:hover {\n background: rgba(255,255,255,0.1);\n color: white;\n }\n\n .header-dropdown-menu .dropdown-item i {\n width: 16px;\n font-size: 13px;\n color: rgba(255,255,255,0.6);\n }\n\n .header-dropdown-menu .dropdown-item:hover i {\n color: white;\n }\n\n .header-dropdown-menu .dropdown-item .shortcut {\n margin-left: auto;\n font-size: 11px;\n color: rgba(255,255,255,0.4);\n font-family: system-ui, -apple-system, sans-serif;\n }\n\n .btn-select {\n padding: 8px 12px;\n background: transparent;\n border: 1px solid rgba(255,255,255,0.2);\n border-radius: 6px;\n color: rgba(255,255,255,0.7);\n font-size: 13px;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 6px;\n cursor: pointer;\n transition: all 0.2s;\n white-space: nowrap;\n flex-shrink: 0;\n }\n\n .btn-select:hover {\n background: rgba(255,255,255,0.1);\n color: white;\n border-color: rgba(255,255,255,0.3);\n }\n\n .conversation-checkbox {\n display: flex;\n align-items: center;\n margin-right: 8px;\n flex-shrink: 0;\n }\n\n .conversation-checkbox input[type=\"checkbox\"] {\n width: 18px;\n height: 18px;\n cursor: pointer;\n accent-color: #0076B6;\n }\n\n .selection-action-bar {\n position: sticky;\n bottom: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n background: #0A2742;\n border-top: 1px solid rgba(255,255,255,0.15);\n gap: 12px;\n flex-wrap: wrap;\n flex-shrink: 0;\n }\n\n .selection-info {\n display: flex;\n align-items: center;\n gap: 12px;\n color: rgba(255,255,255,0.9);\n font-size: 14px;\n font-weight: 500;\n flex: 1 1 auto;\n min-width: 150px;\n }\n\n .selection-count {\n color: white;\n }\n\n .link-btn {\n background: none;\n border: none;\n color: #AAE7FD;\n cursor: pointer;\n font-size: 13px;\n text-decoration: underline;\n padding: 0;\n transition: color 0.2s;\n }\n\n .link-btn:hover {\n color: white;\n }\n\n .selection-actions {\n display: flex;\n gap: 8px;\n flex: 0 0 auto;\n }\n\n .btn-cancel {\n padding: 8px 16px;\n background: transparent;\n border: 1px solid rgba(255,255,255,0.2);\n border-radius: 6px;\n color: rgba(255,255,255,0.7);\n cursor: pointer;\n font-size: 13px;\n font-weight: 500;\n transition: all 0.2s;\n }\n\n .btn-cancel:hover {\n background: rgba(255,255,255,0.1);\n color: white;\n }\n\n .btn-delete-bulk {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 16px;\n background: #DC2626;\n border: none;\n border-radius: 6px;\n color: white;\n cursor: pointer;\n font-size: 13px;\n font-weight: 600;\n transition: all 0.2s;\n }\n\n .btn-delete-bulk:hover:not(:disabled) {\n background: #B91C1C;\n }\n\n .btn-delete-bulk:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .btn-delete-bulk i {\n font-size: 12px;\n }\n `]\n})\nexport class ConversationListComponent implements OnInit, OnDestroy {\n @Input() environmentId!: string;\n @Input() currentUser!: UserInfo;\n @Input() selectedConversationId: string | null = null;\n @Input() renamedConversationId: string | null = null;\n @Input() isSidebarPinned: boolean = true; // Whether sidebar is pinned (stays open after selection)\n @Input() isMobileView: boolean = false; // Whether we're on mobile (no pin options)\n\n @Output() conversationSelected = new EventEmitter<string>();\n @Output() conversationDeleted = new EventEmitter<string>(); // Emits the deleted conversation ID\n @Output() newConversationRequested = new EventEmitter<void>();\n @Output() pinSidebarRequested = new EventEmitter<void>(); // Request to pin sidebar\n @Output() unpinSidebarRequested = new EventEmitter<void>(); // Request to unpin (collapse) sidebar\n @Output() refreshRequested = new EventEmitter<void>(); // Emitted after list refresh so chat area can also reload\n\n public directMessagesExpanded: boolean = true;\n public pinnedExpanded: boolean = true;\n public openMenuConversationId: string | null = null;\n public conversationIdsWithTasks = new Set<string>();\n public isSelectionMode: boolean = false;\n public selectedConversationIds = new Set<string>();\n public searchQuery: string = '';\n public isHeaderMenuOpen: boolean = false;\n public isRefreshing: boolean = false;\n\n private destroy$ = new Subject<void>();\n\n constructor(\n public conversationData: ConversationDataService,\n private dialogService: DialogService,\n private notificationService: NotificationService,\n private activeTasksService: ActiveTasksService,\n private cdr: ChangeDetectorRef\n ) {}\n\n get filteredConversations(): MJConversationEntity[] {\n if (!this.searchQuery || this.searchQuery.trim() === '') {\n return this.conversationData.conversations;\n }\n const lowerQuery = this.searchQuery.toLowerCase();\n return this.conversationData.conversations.filter(c =>\n (c.Name?.toLowerCase().includes(lowerQuery)) ||\n (c.Description?.toLowerCase().includes(lowerQuery))\n );\n }\n\n get pinnedConversations() {\n return this.filteredConversations.filter(c => c.IsPinned);\n }\n\n get unpinnedConversations() {\n return this.filteredConversations.filter(c => !c.IsPinned);\n }\n\n ngOnInit() {\n // Load conversations on init\n this.conversationData.loadConversations(this.environmentId, this.currentUser);\n\n // Subscribe to conversation IDs with active tasks (hot set)\n this.activeTasksService.conversationIdsWithTasks$.pipe(\n takeUntil(this.destroy$)\n ).subscribe(conversationIds => {\n this.conversationIdsWithTasks = conversationIds;\n this.cdr.detectChanges(); // Force change detection to ensure spinner icons update reliably\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n @HostListener('document:click')\n onDocumentClick(): void {\n // Close menus when clicking outside\n if (this.openMenuConversationId) {\n this.closeMenu();\n }\n if (this.isHeaderMenuOpen) {\n this.closeHeaderMenu();\n }\n }\n\n public toggleHeaderMenu(event: Event): void {\n event.stopPropagation();\n this.isHeaderMenuOpen = !this.isHeaderMenuOpen;\n }\n\n public closeHeaderMenu(): void {\n this.isHeaderMenuOpen = false;\n }\n\n public onSelectConversationsClick(event: Event): void {\n event.stopPropagation();\n this.toggleSelectionMode();\n this.closeHeaderMenu();\n }\n\n public async onRefreshConversationsClick(event: Event): Promise<void> {\n event.stopPropagation();\n if (this.isRefreshing) return;\n\n this.isRefreshing = true;\n try {\n await this.conversationData.refreshConversations(this.environmentId, this.currentUser);\n // Signal parent to also reload messages in the active conversation\n this.refreshRequested.emit();\n } catch (error) {\n console.error('Error refreshing conversations:', error);\n await this.dialogService.alert('Error', 'Failed to refresh conversations. Please try again.');\n } finally {\n this.isRefreshing = false;\n this.cdr.detectChanges();\n this.closeHeaderMenu();\n }\n }\n\n public onPinSidebarClick(event: Event): void {\n event.stopPropagation();\n this.closeHeaderMenu();\n this.pinSidebarRequested.emit();\n }\n\n public onUnpinSidebarClick(event: Event): void {\n event.stopPropagation();\n this.closeHeaderMenu();\n this.unpinSidebarRequested.emit();\n }\n\n public toggleDirectMessages(): void {\n this.directMessagesExpanded = !this.directMessagesExpanded;\n }\n\n public togglePinned(): void {\n this.pinnedExpanded = !this.pinnedExpanded;\n }\n\n selectConversation(conversation: MJConversationEntity): void {\n this.conversationSelected.emit(conversation.ID);\n // Clear unread notifications when conversation is opened\n this.notificationService.markConversationAsRead(conversation.ID);\n }\n\n async createNewConversation(): Promise<void> {\n // Don't create DB record yet - just show the welcome screen\n // Conversation will be created when user sends first message\n this.newConversationRequested.emit();\n }\n\n async renameConversation(conversation: MJConversationEntity): Promise<void> {\n try {\n const result = await this.dialogService.input({\n title: 'Edit Conversation',\n message: 'Update the name and description for this conversation',\n inputLabel: 'Conversation Name',\n inputValue: conversation.Name || '',\n placeholder: 'My Conversation',\n required: true,\n secondInputLabel: 'Description',\n secondInputValue: conversation.Description || '',\n secondInputPlaceholder: 'Optional description',\n secondInputRequired: false,\n okText: 'Save',\n cancelText: 'Cancel'\n });\n\n if (result) {\n const newName = typeof result === 'string' ? result : result.value;\n const newDescription = typeof result === 'string' ? conversation.Description : result.secondValue;\n\n if (newName !== conversation.Name || newDescription !== conversation.Description) {\n await this.conversationData.saveConversation(\n conversation.ID,\n { Name: newName, Description: newDescription || '' },\n this.currentUser\n );\n }\n }\n } catch (error) {\n console.error('Error renaming conversation:', error);\n await this.dialogService.alert('Error', 'Failed to update conversation. Please try again.');\n }\n }\n\n async deleteConversation(conversation: MJConversationEntity): Promise<void> {\n try {\n const confirmed = await this.dialogService.confirm({\n title: 'Delete Conversation',\n message: `Are you sure you want to delete \"${conversation.Name}\"? This action cannot be undone.`,\n okText: 'Delete',\n cancelText: 'Cancel'\n });\n\n if (confirmed) {\n const deletedId = conversation.ID;\n await this.conversationData.deleteConversation(deletedId, this.currentUser);\n this.cdr.detectChanges();\n this.conversationDeleted.emit(deletedId);\n }\n } catch (error) {\n console.error('Error deleting conversation:', error);\n await this.dialogService.alert('Error', 'Failed to delete conversation. Please try again.');\n }\n }\n\n toggleMenu(conversationId: string, event: Event): void {\n event.stopPropagation();\n this.openMenuConversationId = this.openMenuConversationId === conversationId ? null : conversationId;\n }\n\n closeMenu(): void {\n this.openMenuConversationId = null;\n }\n\n async togglePin(conversation: MJConversationEntity, event?: Event): Promise<void> {\n if (event) event.stopPropagation();\n try {\n await this.conversationData.togglePin(conversation.ID, this.currentUser);\n this.closeMenu();\n } catch (error) {\n console.error('Error toggling pin:', error);\n await this.dialogService.alert('Error', 'Failed to pin/unpin conversation. Please try again.');\n }\n }\n\n hasActiveTasks(conversationId: string): boolean {\n return this.conversationIdsWithTasks.has(conversationId);\n }\n\n toggleSelectionMode(): void {\n this.isSelectionMode = !this.isSelectionMode;\n if (!this.isSelectionMode) {\n this.selectedConversationIds.clear();\n }\n }\n\n toggleConversationSelection(conversationId: string): void {\n if (this.selectedConversationIds.has(conversationId)) {\n this.selectedConversationIds.delete(conversationId);\n } else {\n this.selectedConversationIds.add(conversationId);\n }\n }\n\n selectAll(): void {\n this.filteredConversations.forEach(c => {\n this.selectedConversationIds.add(c.ID);\n });\n }\n\n deselectAll(): void {\n this.selectedConversationIds.clear();\n }\n\n async bulkDeleteConversations(): Promise<void> {\n const count = this.selectedConversationIds.size;\n\n if (count === 0) return;\n\n const confirmed = await this.dialogService.confirm({\n title: 'Delete Conversations',\n message: `Are you sure you want to delete ${count} conversation${count > 1 ? 's' : ''}? This action cannot be undone.`,\n okText: 'Delete',\n cancelText: 'Cancel'\n });\n\n if (confirmed) {\n try {\n const result = await this.conversationData.deleteMultipleConversations(\n Array.from(this.selectedConversationIds),\n this.currentUser\n );\n\n // Show results if there were any failures\n if (result.failed.length > 0) {\n await this.dialogService.alert(\n 'Partial Success',\n `Deleted ${result.successful.length} of ${count} conversations. ${result.failed.length} failed.`\n );\n }\n\n // Exit selection mode\n this.toggleSelectionMode();\n\n } catch (error) {\n console.error('Error deleting conversations:', error);\n await this.dialogService.alert('Error', 'Failed to delete conversations. Please try again.');\n }\n }\n }\n\n handleConversationClick(conversation: MJConversationEntity): void {\n if (this.isSelectionMode) {\n this.toggleConversationSelection(conversation.ID);\n } else {\n this.selectConversation(conversation);\n }\n }\n}"]}
|
|
1
|
+
{"version":3,"file":"conversation-list.component.js","sourceRoot":"","sources":["../../../../src/lib/components/conversation/conversation-list.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAqB,YAAY,EAAqB,MAAM,eAAe,CAAC;AAO3H,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;;;;;;;;;;;;IA8BhC,kCAAoE;IAAtC,gOAAS,kCAA2B,KAAC;IACjE,wBAAoC;IACpC,4BAAM;IAAA,4BAAY;IACpB,AADoB,iBAAO,EAClB;;;;IAZX,AADF,+BAAkC,iBACsE;IAAxE,kNAAS,0CAAmC,KAAC;IACzE,wBAA8D;IAC9D,4BAAM;IAAA,YAAgD;IACxD,AADwD,iBAAO,EACtD;IACT,kCAA2E;IAA7C,kNAAS,yCAAkC,KAAC;IACxE,wBAAmC;IACnC,4BAAM;IAAA,oCAAoB;IAC5B,AAD4B,iBAAO,EAC1B;IACT,2HAAqB;IAMvB,iBAAM;;;IAdwE,cAAyB;IAAzB,8CAAyB;IACxE,cAA8B;IAA9B,8CAA8B;IACnD,eAAgD;IAAhD,uEAAgD;IAMxD,eAKC;IALD,+CAKC;;;;IAlBL,AADF,8BAAmC,iBAC2C;IAAnD,mMAAS,+BAAwB,KAAC;IACzD,wBAAiC;IACnC,iBAAS;IACT,2GAAwB;IAkB1B,iB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AAC,gBAAgB;;kFAxEnB,yBAAyB","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, OnDestroy, HostListener, ChangeDetectorRef } from '@angular/core';\nimport { UserInfo } from '@memberjunction/core';\nimport { MJConversationEntity } from '@memberjunction/core-entities';\nimport { ConversationDataService } from '../../services/conversation-data.service';\nimport { DialogService } from '../../services/dialog.service';\nimport { NotificationService } from '../../services/notification.service';\nimport { ActiveTasksService } from '../../services/active-tasks.service';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { UUIDsEqual } from '@memberjunction/global';\n\n@Component({\n standalone: false,\n selector: 'mj-conversation-list',\n template: `\n <div class=\"conversation-list\" kendoDialogContainer>\n <div class=\"list-header\">\n <div class=\"header-top\">\n <input\n type=\"text\"\n class=\"search-input\"\n placeholder=\"Search conversations...\"\n [(ngModel)]=\"searchQuery\">\n @if (!isSelectionMode) {\n <div class=\"header-menu-container\">\n <button class=\"btn-menu\" (click)=\"toggleHeaderMenu($event)\" title=\"Options\">\n <i class=\"fas fa-ellipsis-v\"></i>\n </button>\n @if (isHeaderMenuOpen) {\n <div class=\"header-dropdown-menu\">\n <button class=\"dropdown-item\" (click)=\"onRefreshConversationsClick($event)\" [disabled]=\"isRefreshing\">\n <i class=\"fas fa-sync-alt\" [class.fa-spin]=\"isRefreshing\"></i>\n <span>{{ isRefreshing ? 'Refreshing...' : 'Refresh' }}</span>\n </button>\n <button class=\"dropdown-item\" (click)=\"onSelectConversationsClick($event)\">\n <i class=\"fas fa-check-square\"></i>\n <span>Select Conversations</span>\n </button>\n @if (!isMobileView) {\n <button class=\"dropdown-item\" (click)=\"onUnpinSidebarClick($event)\">\n <i class=\"fas fa-table-columns\"></i>\n <span>Hide Sidebar</span>\n </button>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n <button class=\"btn-new-conversation\" (click)=\"createNewConversation()\" title=\"New Conversation\">\n <i class=\"fas fa-plus\"></i>\n <span>New Conversation</span>\n </button>\n <div class=\"list-content\">\n <!-- Pinned Section (only show if there are pinned conversations) -->\n @if (pinnedConversations.length > 0) {\n <div class=\"sidebar-section pinned-section\">\n <div class=\"section-header\" [class.expanded]=\"pinnedExpanded\" (click)=\"togglePinned()\">\n <div class=\"section-title\">\n <i class=\"fas fa-chevron-right\"></i>\n <i class=\"fas fa-thumbtack section-icon\"></i>\n <span>Pinned</span>\n </div>\n </div>\n <div class=\"chat-list\" [class.expanded]=\"pinnedExpanded\">\n @for (conversation of pinnedConversations; track conversation.ID) {\n <div class=\"conversation-item\"\n [class.active]=\"IsConversationActive(conversation)\"\n [class.renamed]=\"IsConversationRenamed(conversation)\"\n (click)=\"handleConversationClick(conversation)\">\n @if (isSelectionMode) {\n <div class=\"conversation-checkbox\">\n <input type=\"checkbox\"\n [checked]=\"selectedConversationIds.has(conversation.ID)\"\n (click)=\"$event.stopPropagation(); toggleConversationSelection(conversation.ID)\">\n </div>\n }\n <div class=\"conversation-icon-wrapper\">\n @if (hasActiveTasks(conversation.ID)) {\n <div class=\"conversation-icon has-tasks\">\n <i class=\"fas fa-spinner fa-pulse\"></i>\n </div>\n }\n <div class=\"badge-overlay\">\n <mj-notification-badge [conversationId]=\"conversation.ID\"></mj-notification-badge>\n </div>\n </div>\n <div class=\"conversation-info\" [title]=\"conversation.Name + (conversation.Description ? '\\n' + conversation.Description : '')\">\n <div class=\"conversation-name\">{{ conversation.Name }}</div>\n <div class=\"conversation-preview\">{{ conversation.Description }}</div>\n </div>\n @if (!isSelectionMode) {\n <div class=\"conversation-actions\">\n <button class=\"menu-btn\" (click)=\"toggleMenu(conversation.ID, $event)\" title=\"More options\">\n <i class=\"fas fa-ellipsis\"></i>\n </button>\n @if (IsMenuOpen(conversation)) {\n <div class=\"context-menu\" (click)=\"$event.stopPropagation()\">\n <button class=\"menu-item\" (click)=\"togglePin(conversation, $event)\">\n <i class=\"fas fa-thumbtack\"></i>\n <span>Unpin</span>\n </button>\n <button class=\"menu-item\" (click)=\"renameConversation(conversation); closeMenu()\">\n <i class=\"fas fa-edit\"></i>\n <span>Rename</span>\n </button>\n <div class=\"menu-divider\"></div>\n <button class=\"menu-item danger\" (click)=\"deleteConversation(conversation); closeMenu()\">\n <i class=\"fas fa-trash\"></i>\n <span>Delete</span>\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Messages Section -->\n <div class=\"sidebar-section\">\n <div class=\"section-header\" [class.expanded]=\"directMessagesExpanded\" (click)=\"toggleDirectMessages()\">\n <div class=\"section-title\">\n <i class=\"fas fa-chevron-right\"></i>\n <span>Messages</span>\n </div>\n </div>\n <div class=\"chat-list\" [class.expanded]=\"directMessagesExpanded\">\n @for (conversation of unpinnedConversations; track conversation.ID) {\n <div class=\"conversation-item\"\n [class.active]=\"IsConversationActive(conversation)\"\n [class.renamed]=\"IsConversationRenamed(conversation)\"\n (click)=\"handleConversationClick(conversation)\">\n @if (isSelectionMode) {\n <div class=\"conversation-checkbox\">\n <input type=\"checkbox\"\n [checked]=\"selectedConversationIds.has(conversation.ID)\"\n (click)=\"$event.stopPropagation(); toggleConversationSelection(conversation.ID)\">\n </div>\n }\n <div class=\"conversation-icon-wrapper\">\n @if (hasActiveTasks(conversation.ID)) {\n <div class=\"conversation-icon has-tasks\">\n <i class=\"fas fa-spinner fa-pulse\"></i>\n </div>\n }\n <div class=\"badge-overlay\">\n <mj-notification-badge [conversationId]=\"conversation.ID\"></mj-notification-badge>\n </div>\n </div>\n <div class=\"conversation-info\" [title]=\"conversation.Name + (conversation.Description ? '\\n' + conversation.Description : '')\">\n <div class=\"conversation-name\">{{ conversation.Name }}</div>\n <div class=\"conversation-preview\">{{ conversation.Description }}</div>\n </div>\n @if (!isSelectionMode) {\n <div class=\"conversation-actions\">\n <button class=\"menu-btn\" (click)=\"toggleMenu(conversation.ID, $event)\" title=\"More options\">\n <i class=\"fas fa-ellipsis\"></i>\n </button>\n @if (IsMenuOpen(conversation)) {\n <div class=\"context-menu\" (click)=\"$event.stopPropagation()\">\n <button class=\"menu-item\" (click)=\"togglePin(conversation, $event)\">\n <i class=\"fas fa-thumbtack\"></i>\n <span>Pin</span>\n </button>\n <button class=\"menu-item\" (click)=\"renameConversation(conversation); closeMenu()\">\n <i class=\"fas fa-edit\"></i>\n <span>Rename</span>\n </button>\n <div class=\"menu-divider\"></div>\n <button class=\"menu-item danger\" (click)=\"deleteConversation(conversation); closeMenu()\">\n <i class=\"fas fa-trash\"></i>\n <span>Delete</span>\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Selection Action Bar -->\n @if (isSelectionMode) {\n <div class=\"selection-action-bar\">\n <div class=\"selection-info\">\n <span class=\"selection-count\">{{ selectedConversationIds.size }} selected</span>\n @if (selectedConversationIds.size < filteredConversations.length) {\n <button class=\"link-btn\" (click)=\"selectAll()\">Select All</button>\n } @else {\n <button class=\"link-btn\" (click)=\"deselectAll()\">Deselect All</button>\n }\n </div>\n <div class=\"selection-actions\">\n <button class=\"btn-delete-bulk\"\n (click)=\"bulkDeleteConversations()\"\n [disabled]=\"selectedConversationIds.size === 0\">\n <i class=\"fas fa-trash\"></i>\n Delete ({{ selectedConversationIds.size }})\n </button>\n <button class=\"btn-cancel\" (click)=\"toggleSelectionMode()\">\n Cancel\n </button>\n </div>\n </div>\n }\n </div>\n `,\n styles: [`\n :host { display: block; height: 100%; }\n .conversation-list { display: flex; flex-direction: column; height: 100%; background: #092340; }\n .list-header { padding: 8px; border-bottom: 1px solid rgba(255,255,255,0.1); }\n .search-input {\n width: 100%;\n padding: 8px 12px;\n background: rgba(255,255,255,0.1);\n border: 1px solid rgba(255,255,255,0.2);\n border-radius: 6px;\n color: white;\n font-size: 13px;\n transition: all 0.2s;\n }\n .search-input::placeholder { color: rgba(255,255,255,0.5); }\n .search-input:focus { outline: none; background: rgba(255,255,255,0.15); border-color: #0076B6; }\n .btn-new-conversation {\n width: calc(100% - 16px);\n margin: 8px;\n padding: 10px;\n background: #0076B6;\n color: white;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n transition: background 0.2s;\n flex-shrink: 0;\n }\n .btn-new-conversation:hover { background: #005A8C; }\n .btn-new-conversation i { font-size: 14px; }\n .list-content { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 0; }\n\n /* Collapsible Sections */\n .sidebar-section { margin-bottom: 20px; }\n .pinned-section .section-header {\n background: rgba(255, 193, 7, 0.08);\n border-radius: 4px;\n margin: 0 4px;\n }\n .pinned-section .section-title .section-icon {\n color: #FFC107;\n font-size: 11px;\n margin-left: 2px;\n }\n .section-header {\n padding: 4px 16px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n color: rgba(255, 255, 255, 0.7);\n font-size: 13px;\n font-weight: 500;\n transition: color 0.2s;\n user-select: none;\n }\n .section-header:hover { color: white; }\n .section-title {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n .section-title i {\n font-size: 10px;\n transition: transform 0.2s;\n }\n .section-header.expanded .section-title i { transform: rotate(90deg); }\n .chat-list {\n padding: 4px 0;\n display: none;\n }\n .chat-list.expanded { display: block; }\n\n .conversation-item {\n padding: 6px 5px 6px 16px;\n cursor: pointer;\n display: flex;\n gap: 8px;\n align-items: center;\n transition: all 0.2s;\n position: relative;\n color: rgba(255,255,255,0.7);\n font-size: 14px;\n min-height: 45px;\n }\n .conversation-item:hover { background: rgba(255,255,255,0.08); color: white; }\n .conversation-item:hover .conversation-actions { opacity: 1; }\n .conversation-item.active { background: #0076B6; color: white; }\n .conversation-icon-wrapper { position: relative; flex-shrink: 0; }\n .conversation-icon { font-size: 12px; width: 16px; text-align: center; }\n .conversation-icon.has-tasks { color: #fb923c; }\n .badge-overlay { position: absolute; top: -4px; right: -4px; }\n .conversation-info { flex: 1; min-width: 0; }\n .conversation-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .conversation-preview { font-size: 12px; color: rgba(255,255,255,0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n .conversation-item.active .conversation-preview { color: rgba(255,255,255,0.8); }\n .conversation-meta { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }\n\n /* Project Badge */\n .project-badge {\n display: inline-block;\n padding: 2px 6px;\n border-radius: 10px;\n font-size: 10px;\n font-weight: 600;\n margin-left: auto;\n background-color: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.6);\n white-space: nowrap;\n max-width: 80px;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .conversation-item:hover .project-badge {\n background-color: rgba(255, 255, 255, 0.15);\n color: rgba(255, 255, 255, 0.8);\n }\n .conversation-item.active .project-badge {\n background-color: rgba(255, 255, 255, 0.2);\n color: white;\n }\n\n .conversation-actions {\n position: absolute;\n right: 5px;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.2s;\n z-index: 10;\n }\n .conversation-item:hover .conversation-actions { opacity: 1; pointer-events: auto; }\n .conversation-item.active .conversation-actions { opacity: 1; pointer-events: auto; }\n .conversation-actions > * { pointer-events: auto; }\n .pinned-icon { color: #AAE7FD; font-size: 12px; }\n\n /* Task Indicator */\n .task-indicator {\n color: #fb923c;\n font-size: 12px;\n margin-right: 8px;\n flex-shrink: 0;\n animation: pulse-glow 2s ease-in-out infinite;\n }\n @keyframes pulse-glow {\n 0%, 100% {\n opacity: 1;\n filter: drop-shadow(0 0 2px #fb923c);\n }\n 50% {\n opacity: 0.6;\n filter: drop-shadow(0 0 4px #fb923c);\n }\n }\n .conversation-item.active .task-indicator {\n color: #fbbf24;\n }\n\n .menu-btn {\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n color: rgba(255,255,255,0.7);\n background: #092340 !important;\n border: none;\n cursor: pointer;\n transition: all 0.2s;\n }\n .menu-btn:hover {\n background: rgba(255,255,255,0.15) !important;\n color: white;\n }\n .conversation-item.active .menu-btn {\n background: #005A8C !important;\n color: white;\n }\n .menu-btn i { font-size: 14px; }\n\n .context-menu {\n position: absolute;\n top: 100%;\n right: 0;\n margin-top: 4px;\n min-width: 160px;\n background: #0A2742;\n border: 1px solid rgba(255,255,255,0.15);\n border-radius: 8px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);\n z-index: 1001;\n overflow: hidden;\n pointer-events: auto;\n }\n\n .menu-item {\n width: 100%;\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 14px;\n background: transparent;\n border: none;\n color: rgba(255,255,255,0.85);\n font-size: 14px;\n text-align: left;\n cursor: pointer;\n transition: all 0.15s;\n }\n\n .menu-item:hover {\n background: rgba(255,255,255,0.1);\n color: white;\n }\n\n .menu-item i {\n width: 16px;\n font-size: 13px;\n color: rgba(255,255,255,0.6);\n }\n\n .menu-item:hover i {\n color: white;\n }\n\n .menu-item.danger {\n color: rgba(239, 68, 68, 0.9);\n }\n\n .menu-item.danger:hover {\n background: rgba(239, 68, 68, 0.15);\n color: #ff6b6b;\n }\n\n .menu-item.danger i {\n color: rgba(239, 68, 68, 0.8);\n }\n\n .menu-item.danger:hover i {\n color: #ff6b6b;\n }\n\n .menu-divider {\n height: 1px;\n background: rgba(255,255,255,0.1);\n margin: 4px 0;\n }\n\n /* Rename Animation */\n .conversation-item.renamed {\n animation: renameHighlight 1500ms cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n @keyframes renameHighlight {\n 0% {\n background: linear-gradient(90deg, rgba(59, 130, 246, 0.4), rgba(147, 51, 234, 0.4));\n transform: scale(1.03);\n box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);\n }\n 25% {\n background: linear-gradient(90deg, rgba(59, 130, 246, 0.35), rgba(147, 51, 234, 0.35));\n box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);\n }\n 50% {\n background: linear-gradient(90deg, rgba(16, 185, 129, 0.3), rgba(59, 130, 246, 0.3));\n transform: scale(1.02);\n box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);\n }\n 75% {\n background: linear-gradient(90deg, rgba(16, 185, 129, 0.2), rgba(59, 130, 246, 0.2));\n box-shadow: 0 0 5px rgba(16, 185, 129, 0.2);\n }\n 100% {\n background: transparent;\n transform: scale(1);\n box-shadow: none;\n }\n }\n\n /* Selection Mode Styles */\n .header-top {\n display: flex;\n gap: 8px;\n align-items: center;\n }\n\n /* Header menu button and dropdown */\n .header-menu-container {\n position: relative;\n flex-shrink: 0;\n }\n\n .btn-menu {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: 1px solid rgba(255,255,255,0.2);\n border-radius: 6px;\n color: rgba(255,255,255,0.7);\n cursor: pointer;\n transition: all 0.2s;\n }\n\n .btn-menu:hover {\n background: rgba(255,255,255,0.1);\n color: white;\n border-color: rgba(255,255,255,0.3);\n }\n\n .header-dropdown-menu {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n min-width: 200px;\n background: #0A2742;\n border: 1px solid rgba(255,255,255,0.15);\n border-radius: 8px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);\n z-index: 1001;\n overflow: hidden;\n padding: 4px 0;\n }\n\n .header-dropdown-menu .dropdown-item {\n width: 100%;\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 14px;\n background: transparent;\n border: none;\n color: rgba(255,255,255,0.85);\n font-size: 13px;\n text-align: left;\n cursor: pointer;\n transition: all 0.15s;\n }\n\n .header-dropdown-menu .dropdown-item:hover {\n background: rgba(255,255,255,0.1);\n color: white;\n }\n\n .header-dropdown-menu .dropdown-item i {\n width: 16px;\n font-size: 13px;\n color: rgba(255,255,255,0.6);\n }\n\n .header-dropdown-menu .dropdown-item:hover i {\n color: white;\n }\n\n .header-dropdown-menu .dropdown-item .shortcut {\n margin-left: auto;\n font-size: 11px;\n color: rgba(255,255,255,0.4);\n font-family: system-ui, -apple-system, sans-serif;\n }\n\n .btn-select {\n padding: 8px 12px;\n background: transparent;\n border: 1px solid rgba(255,255,255,0.2);\n border-radius: 6px;\n color: rgba(255,255,255,0.7);\n font-size: 13px;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 6px;\n cursor: pointer;\n transition: all 0.2s;\n white-space: nowrap;\n flex-shrink: 0;\n }\n\n .btn-select:hover {\n background: rgba(255,255,255,0.1);\n color: white;\n border-color: rgba(255,255,255,0.3);\n }\n\n .conversation-checkbox {\n display: flex;\n align-items: center;\n margin-right: 8px;\n flex-shrink: 0;\n }\n\n .conversation-checkbox input[type=\"checkbox\"] {\n width: 18px;\n height: 18px;\n cursor: pointer;\n accent-color: #0076B6;\n }\n\n .selection-action-bar {\n position: sticky;\n bottom: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n background: #0A2742;\n border-top: 1px solid rgba(255,255,255,0.15);\n gap: 12px;\n flex-wrap: wrap;\n flex-shrink: 0;\n }\n\n .selection-info {\n display: flex;\n align-items: center;\n gap: 12px;\n color: rgba(255,255,255,0.9);\n font-size: 14px;\n font-weight: 500;\n flex: 1 1 auto;\n min-width: 150px;\n }\n\n .selection-count {\n color: white;\n }\n\n .link-btn {\n background: none;\n border: none;\n color: #AAE7FD;\n cursor: pointer;\n font-size: 13px;\n text-decoration: underline;\n padding: 0;\n transition: color 0.2s;\n }\n\n .link-btn:hover {\n color: white;\n }\n\n .selection-actions {\n display: flex;\n gap: 8px;\n flex: 0 0 auto;\n }\n\n .btn-cancel {\n padding: 8px 16px;\n background: transparent;\n border: 1px solid rgba(255,255,255,0.2);\n border-radius: 6px;\n color: rgba(255,255,255,0.7);\n cursor: pointer;\n font-size: 13px;\n font-weight: 500;\n transition: all 0.2s;\n }\n\n .btn-cancel:hover {\n background: rgba(255,255,255,0.1);\n color: white;\n }\n\n .btn-delete-bulk {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 16px;\n background: #DC2626;\n border: none;\n border-radius: 6px;\n color: white;\n cursor: pointer;\n font-size: 13px;\n font-weight: 600;\n transition: all 0.2s;\n }\n\n .btn-delete-bulk:hover:not(:disabled) {\n background: #B91C1C;\n }\n\n .btn-delete-bulk:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .btn-delete-bulk i {\n font-size: 12px;\n }\n `]\n})\nexport class ConversationListComponent implements OnInit, OnDestroy {\n @Input() environmentId!: string;\n @Input() currentUser!: UserInfo;\n @Input() selectedConversationId: string | null = null;\n @Input() renamedConversationId: string | null = null;\n @Input() isSidebarPinned: boolean = true; // Whether sidebar is pinned (stays open after selection)\n @Input() isMobileView: boolean = false; // Whether we're on mobile (no pin options)\n\n @Output() conversationSelected = new EventEmitter<string>();\n @Output() conversationDeleted = new EventEmitter<string>(); // Emits the deleted conversation ID\n @Output() newConversationRequested = new EventEmitter<void>();\n @Output() pinSidebarRequested = new EventEmitter<void>(); // Request to pin sidebar\n @Output() unpinSidebarRequested = new EventEmitter<void>(); // Request to unpin (collapse) sidebar\n @Output() refreshRequested = new EventEmitter<void>(); // Emitted after list refresh so chat area can also reload\n\n public directMessagesExpanded: boolean = true;\n public pinnedExpanded: boolean = true;\n public openMenuConversationId: string | null = null;\n public conversationIdsWithTasks = new Set<string>();\n public isSelectionMode: boolean = false;\n public selectedConversationIds = new Set<string>();\n public searchQuery: string = '';\n public isHeaderMenuOpen: boolean = false;\n public isRefreshing: boolean = false;\n\n private destroy$ = new Subject<void>();\n\n constructor(\n public conversationData: ConversationDataService,\n private dialogService: DialogService,\n private notificationService: NotificationService,\n private activeTasksService: ActiveTasksService,\n private cdr: ChangeDetectorRef\n ) {}\n\n get filteredConversations(): MJConversationEntity[] {\n if (!this.searchQuery || this.searchQuery.trim() === '') {\n return this.conversationData.conversations;\n }\n const lowerQuery = this.searchQuery.toLowerCase();\n return this.conversationData.conversations.filter(c =>\n (c.Name?.toLowerCase().includes(lowerQuery)) ||\n (c.Description?.toLowerCase().includes(lowerQuery))\n );\n }\n\n get pinnedConversations() {\n return this.filteredConversations.filter(c => c.IsPinned);\n }\n\n get unpinnedConversations() {\n return this.filteredConversations.filter(c => !c.IsPinned);\n }\n\n ngOnInit() {\n // Load conversations on init\n this.conversationData.loadConversations(this.environmentId, this.currentUser);\n\n // Subscribe to conversation IDs with active tasks (hot set)\n this.activeTasksService.conversationIdsWithTasks$.pipe(\n takeUntil(this.destroy$)\n ).subscribe(conversationIds => {\n this.conversationIdsWithTasks = conversationIds;\n this.cdr.detectChanges(); // Force change detection to ensure spinner icons update reliably\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n @HostListener('document:click')\n onDocumentClick(): void {\n // Close menus when clicking outside\n if (this.openMenuConversationId) {\n this.closeMenu();\n }\n if (this.isHeaderMenuOpen) {\n this.closeHeaderMenu();\n }\n }\n\n public toggleHeaderMenu(event: Event): void {\n event.stopPropagation();\n this.isHeaderMenuOpen = !this.isHeaderMenuOpen;\n }\n\n public closeHeaderMenu(): void {\n this.isHeaderMenuOpen = false;\n }\n\n public onSelectConversationsClick(event: Event): void {\n event.stopPropagation();\n this.toggleSelectionMode();\n this.closeHeaderMenu();\n }\n\n public async onRefreshConversationsClick(event: Event): Promise<void> {\n event.stopPropagation();\n if (this.isRefreshing) return;\n\n this.isRefreshing = true;\n try {\n await this.conversationData.refreshConversations(this.environmentId, this.currentUser);\n // Signal parent to also reload messages in the active conversation\n this.refreshRequested.emit();\n } catch (error) {\n console.error('Error refreshing conversations:', error);\n await this.dialogService.alert('Error', 'Failed to refresh conversations. Please try again.');\n } finally {\n this.isRefreshing = false;\n this.cdr.detectChanges();\n this.closeHeaderMenu();\n }\n }\n\n public onPinSidebarClick(event: Event): void {\n event.stopPropagation();\n this.closeHeaderMenu();\n this.pinSidebarRequested.emit();\n }\n\n public onUnpinSidebarClick(event: Event): void {\n event.stopPropagation();\n this.closeHeaderMenu();\n this.unpinSidebarRequested.emit();\n }\n\n public toggleDirectMessages(): void {\n this.directMessagesExpanded = !this.directMessagesExpanded;\n }\n\n public togglePinned(): void {\n this.pinnedExpanded = !this.pinnedExpanded;\n }\n\n IsConversationActive(conversation: MJConversationEntity): boolean {\n return UUIDsEqual(conversation.ID, this.selectedConversationId);\n }\n\n IsConversationRenamed(conversation: MJConversationEntity): boolean {\n return UUIDsEqual(conversation.ID, this.renamedConversationId);\n }\n\n IsMenuOpen(conversation: MJConversationEntity): boolean {\n return UUIDsEqual(this.openMenuConversationId, conversation.ID);\n }\n\n selectConversation(conversation: MJConversationEntity): void {\n this.conversationSelected.emit(conversation.ID);\n // Clear unread notifications when conversation is opened\n this.notificationService.markConversationAsRead(conversation.ID);\n }\n\n async createNewConversation(): Promise<void> {\n // Don't create DB record yet - just show the welcome screen\n // Conversation will be created when user sends first message\n this.newConversationRequested.emit();\n }\n\n async renameConversation(conversation: MJConversationEntity): Promise<void> {\n try {\n const result = await this.dialogService.input({\n title: 'Edit Conversation',\n message: 'Update the name and description for this conversation',\n inputLabel: 'Conversation Name',\n inputValue: conversation.Name || '',\n placeholder: 'My Conversation',\n required: true,\n secondInputLabel: 'Description',\n secondInputValue: conversation.Description || '',\n secondInputPlaceholder: 'Optional description',\n secondInputRequired: false,\n okText: 'Save',\n cancelText: 'Cancel'\n });\n\n if (result) {\n const newName = typeof result === 'string' ? result : result.value;\n const newDescription = typeof result === 'string' ? conversation.Description : result.secondValue;\n\n if (newName !== conversation.Name || newDescription !== conversation.Description) {\n await this.conversationData.saveConversation(\n conversation.ID,\n { Name: newName, Description: newDescription || '' },\n this.currentUser\n );\n }\n }\n } catch (error) {\n console.error('Error renaming conversation:', error);\n await this.dialogService.alert('Error', 'Failed to update conversation. Please try again.');\n }\n }\n\n async deleteConversation(conversation: MJConversationEntity): Promise<void> {\n try {\n const confirmed = await this.dialogService.confirm({\n title: 'Delete Conversation',\n message: `Are you sure you want to delete \"${conversation.Name}\"? This action cannot be undone.`,\n okText: 'Delete',\n cancelText: 'Cancel'\n });\n\n if (confirmed) {\n const deletedId = conversation.ID;\n await this.conversationData.deleteConversation(deletedId, this.currentUser);\n this.cdr.detectChanges();\n this.conversationDeleted.emit(deletedId);\n }\n } catch (error) {\n console.error('Error deleting conversation:', error);\n await this.dialogService.alert('Error', 'Failed to delete conversation. Please try again.');\n }\n }\n\n toggleMenu(conversationId: string, event: Event): void {\n event.stopPropagation();\n this.openMenuConversationId = this.openMenuConversationId === conversationId ? null : conversationId;\n }\n\n closeMenu(): void {\n this.openMenuConversationId = null;\n }\n\n async togglePin(conversation: MJConversationEntity, event?: Event): Promise<void> {\n if (event) event.stopPropagation();\n try {\n await this.conversationData.togglePin(conversation.ID, this.currentUser);\n this.closeMenu();\n } catch (error) {\n console.error('Error toggling pin:', error);\n await this.dialogService.alert('Error', 'Failed to pin/unpin conversation. Please try again.');\n }\n }\n\n hasActiveTasks(conversationId: string): boolean {\n return this.conversationIdsWithTasks.has(conversationId);\n }\n\n toggleSelectionMode(): void {\n this.isSelectionMode = !this.isSelectionMode;\n if (!this.isSelectionMode) {\n this.selectedConversationIds.clear();\n }\n }\n\n toggleConversationSelection(conversationId: string): void {\n if (this.selectedConversationIds.has(conversationId)) {\n this.selectedConversationIds.delete(conversationId);\n } else {\n this.selectedConversationIds.add(conversationId);\n }\n }\n\n selectAll(): void {\n this.filteredConversations.forEach(c => {\n this.selectedConversationIds.add(c.ID);\n });\n }\n\n deselectAll(): void {\n this.selectedConversationIds.clear();\n }\n\n async bulkDeleteConversations(): Promise<void> {\n const count = this.selectedConversationIds.size;\n\n if (count === 0) return;\n\n const confirmed = await this.dialogService.confirm({\n title: 'Delete Conversations',\n message: `Are you sure you want to delete ${count} conversation${count > 1 ? 's' : ''}? This action cannot be undone.`,\n okText: 'Delete',\n cancelText: 'Cancel'\n });\n\n if (confirmed) {\n try {\n const result = await this.conversationData.deleteMultipleConversations(\n Array.from(this.selectedConversationIds),\n this.currentUser\n );\n\n // Show results if there were any failures\n if (result.failed.length > 0) {\n await this.dialogService.alert(\n 'Partial Success',\n `Deleted ${result.successful.length} of ${count} conversations. ${result.failed.length} failed.`\n );\n }\n\n // Exit selection mode\n this.toggleSelectionMode();\n\n } catch (error) {\n console.error('Error deleting conversations:', error);\n await this.dialogService.alert('Error', 'Failed to delete conversations. Please try again.');\n }\n }\n }\n\n handleConversationClick(conversation: MJConversationEntity): void {\n if (this.isSelectionMode) {\n this.toggleConversationSelection(conversation.ID);\n } else {\n this.selectConversation(conversation);\n }\n }\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mention-editor.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/mention/mention-editor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEZ,UAAU,EACV,aAAa,EAEb,MAAM,EAEN,iBAAiB,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAqB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAC5G,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;;
|
|
1
|
+
{"version":3,"file":"mention-editor.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/mention/mention-editor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEZ,UAAU,EACV,aAAa,EAEb,MAAM,EAEN,iBAAiB,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAqB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAC5G,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;;AAMhD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,2BAA2B;IAC3B,IAAI,EAAE,IAAI,CAAC;IACX,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC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AK,IAAI,IAAI;IAQpB;;;OAGG;IACI,mBAAmB,IAAI,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IA2BvH;;;;OAIG;IACI,4BAA4B,IAAI,MAAM;IAwD7C;;OAEG;IACH,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAQlC;;OAEG;IACH,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAMnC;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAiB9B;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAYlC;;OAEG;YACW,WAAW;IA4CzB;;OAEG;IACH,OAAO,CAAC,YAAY;IA8BpB;;OAEG;IACH,OAAO,CAAC,cAAc;IA4BtB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IASzB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAa1B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAI5B;;OAEG;IACI,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IASzC;;OAEG;IACI,qBAAqB,IAAI,iBAAiB,EAAE;IAInD;;OAEG;IACI,uBAAuB,IAAI,IAAI;IAMtC;;OAEG;IACI,iBAAiB,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAI7D;;OAEG;IACI,cAAc,IAAI,OAAO;IAIhC;;OAEG;IACI,cAAc,IAAI,IAAI;yCA5nClB,sBAAsB;2CAAtB,sBAAsB;CAooClC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Component, Input, Output, EventEmitter, ViewChild, forwardRef } from '@angular/core';
|
|
2
2
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
3
|
import { AIEngineBase } from '@memberjunction/ai-engine-base';
|
|
4
|
+
import { UUIDsEqual } from '@memberjunction/global';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
import * as i1 from "../../services/mention-autocomplete.service";
|
|
6
7
|
import * as i2 from "./mention-dropdown.component";
|
|
@@ -498,7 +499,7 @@ export class MentionEditorComponent {
|
|
|
498
499
|
`;
|
|
499
500
|
// Check if this is the selected preset
|
|
500
501
|
const currentPresetId = chip.getAttribute('data-preset-id');
|
|
501
|
-
const isSelected = preset.ID
|
|
502
|
+
const isSelected = UUIDsEqual(preset.ID, currentPresetId);
|
|
502
503
|
// Add checkmark for selected option
|
|
503
504
|
const checkmark = document.createElement('i');
|
|
504
505
|
checkmark.className = 'fa-solid fa-check';
|
|
@@ -546,7 +547,7 @@ export class MentionEditorComponent {
|
|
|
546
547
|
chip.setAttribute('data-preset-id', preset.ID || '');
|
|
547
548
|
chip.setAttribute('data-preset-name', preset.Name || '');
|
|
548
549
|
// Update preset indicator visibility and text
|
|
549
|
-
const isDefault = preset.ID
|
|
550
|
+
const isDefault = UUIDsEqual(preset.ID, defaultPreset.ID);
|
|
550
551
|
if (isDefault) {
|
|
551
552
|
presetIndicator.style.display = 'none';
|
|
552
553
|
}
|
|
@@ -1172,5 +1173,5 @@ export class MentionEditorComponent {
|
|
|
1172
1173
|
}], attachmentClicked: [{
|
|
1173
1174
|
type: Output
|
|
1174
1175
|
}] }); })();
|
|
1175
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MentionEditorComponent, { className: "MentionEditorComponent", filePath: "src/lib/components/mention/mention-editor.component.ts", lineNumber:
|
|
1176
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MentionEditorComponent, { className: "MentionEditorComponent", filePath: "src/lib/components/mention/mention-editor.component.ts", lineNumber: 63 }); })();
|
|
1176
1177
|
//# sourceMappingURL=mention-editor.component.js.map
|