@memberjunction/ng-conversations 2.114.0 → 2.116.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +12 -0
  2. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  3. package/dist/lib/components/conversation/conversation-chat-area.component.js +149 -11
  4. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  5. package/dist/lib/components/conversation/conversation-list.component.d.ts +9 -3
  6. package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
  7. package/dist/lib/components/conversation/conversation-list.component.js +398 -197
  8. package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
  9. package/dist/lib/components/mention/mention-dropdown.component.js +31 -23
  10. package/dist/lib/components/mention/mention-dropdown.component.js.map +1 -1
  11. package/dist/lib/components/mention/mention-editor.component.d.ts +117 -0
  12. package/dist/lib/components/mention/mention-editor.component.d.ts.map +1 -0
  13. package/dist/lib/components/mention/mention-editor.component.js +550 -0
  14. package/dist/lib/components/mention/mention-editor.component.js.map +1 -0
  15. package/dist/lib/components/message/message-input-box.component.d.ts +22 -33
  16. package/dist/lib/components/message/message-input-box.component.d.ts.map +1 -1
  17. package/dist/lib/components/message/message-input-box.component.js +71 -172
  18. package/dist/lib/components/message/message-input-box.component.js.map +1 -1
  19. package/dist/lib/components/message/message-input.component.d.ts +18 -15
  20. package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
  21. package/dist/lib/components/message/message-input.component.js +108 -93
  22. package/dist/lib/components/message/message-input.component.js.map +1 -1
  23. package/dist/lib/components/message/message-item.component.d.ts +1 -0
  24. package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
  25. package/dist/lib/components/message/message-item.component.js +49 -7
  26. package/dist/lib/components/message/message-item.component.js.map +1 -1
  27. package/dist/lib/components/navigation/conversation-navigation.component.js +2 -2
  28. package/dist/lib/components/workspace/conversation-workspace.component.d.ts +6 -1
  29. package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
  30. package/dist/lib/components/workspace/conversation-workspace.component.js +115 -73
  31. package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
  32. package/dist/lib/conversations.module.d.ts +55 -54
  33. package/dist/lib/conversations.module.d.ts.map +1 -1
  34. package/dist/lib/conversations.module.js +4 -0
  35. package/dist/lib/conversations.module.js.map +1 -1
  36. package/dist/lib/services/conversation-state.service.d.ts +14 -0
  37. package/dist/lib/services/conversation-state.service.d.ts.map +1 -1
  38. package/dist/lib/services/conversation-state.service.js +32 -0
  39. package/dist/lib/services/conversation-state.service.js.map +1 -1
  40. package/dist/lib/services/conversation-streaming.service.d.ts +101 -0
  41. package/dist/lib/services/conversation-streaming.service.d.ts.map +1 -0
  42. package/dist/lib/services/conversation-streaming.service.js +319 -0
  43. package/dist/lib/services/conversation-streaming.service.js.map +1 -0
  44. package/dist/lib/services/mention-autocomplete.service.d.ts +8 -0
  45. package/dist/lib/services/mention-autocomplete.service.d.ts.map +1 -1
  46. package/dist/lib/services/mention-autocomplete.service.js +34 -3
  47. package/dist/lib/services/mention-autocomplete.service.js.map +1 -1
  48. package/dist/public-api.d.ts +2 -0
  49. package/dist/public-api.d.ts.map +1 -1
  50. package/dist/public-api.js +2 -0
  51. package/dist/public-api.js.map +1 -1
  52. package/package.json +14 -14
@@ -1,14 +1,16 @@
1
- import { EventEmitter, ElementRef, OnInit, AfterViewInit, OnDestroy } from '@angular/core';
1
+ import { EventEmitter } from '@angular/core';
2
2
  import { UserInfo } from '@memberjunction/core';
3
- import { MentionAutocompleteService, MentionSuggestion } from '../../services/mention-autocomplete.service';
3
+ import { MentionSuggestion } from '../../services/mention-autocomplete.service';
4
+ import { MentionEditorComponent } from '../mention/mention-editor.component';
4
5
  import * as i0 from "@angular/core";
5
6
  /**
6
7
  * Reusable message input box component (presentational)
8
+ * Now uses MentionEditorComponent for rich @mention functionality with chips
9
+ *
7
10
  * Handles:
8
- * - Text input with keyboard shortcuts
9
- * - @mention autocomplete (optional)
11
+ * - Text input with keyboard shortcuts via MentionEditorComponent
12
+ * - @mention autocomplete with visual chips (contentEditable)
10
13
  * - Send button
11
- * - Character count (optional)
12
14
  *
13
15
  * Does NOT handle:
14
16
  * - Saving messages to database
@@ -16,8 +18,8 @@ import * as i0 from "@angular/core";
16
18
  * - Artifact creation
17
19
  * - Conversation management
18
20
  */
19
- export declare class MessageInputBoxComponent implements OnInit, AfterViewInit, OnDestroy {
20
- private mentionAutocomplete;
21
+ export declare class MessageInputBoxComponent {
22
+ mentionEditor?: MentionEditorComponent;
21
23
  placeholder: string;
22
24
  disabled: boolean;
23
25
  value: string;
@@ -27,43 +29,30 @@ export declare class MessageInputBoxComponent implements OnInit, AfterViewInit,
27
29
  rows: number;
28
30
  textSubmitted: EventEmitter<string>;
29
31
  valueChange: EventEmitter<string>;
30
- messageTextarea?: ElementRef;
31
- showMentionDropdown: boolean;
32
- mentionSuggestions: MentionSuggestion[];
33
- mentionDropdownPosition: {
34
- top: number;
35
- left: number;
36
- };
37
- mentionDropdownShowAbove: boolean;
38
- private mentionStartIndex;
39
- private mentionQuery;
40
- constructor(mentionAutocomplete: MentionAutocompleteService);
41
- ngOnInit(): Promise<void>;
42
- ngAfterViewInit(): void;
43
- ngOnDestroy(): void;
44
32
  get canSend(): boolean;
45
- onKeyDown(event: KeyboardEvent): void;
46
- onInput(event: Event): void;
47
- onSendClick(): void;
48
33
  /**
49
- * Handle @mention autocomplete
34
+ * Handle value changes from MentionEditorComponent
50
35
  */
51
- private handleMentionInput;
36
+ onValueChange(newValue: string): void;
52
37
  /**
53
- * Position the mention dropdown near the textarea
54
- * Uses viewport-relative positioning (fixed) to avoid clipping by parent containers
38
+ * Handle Enter key from MentionEditorComponent
55
39
  */
56
- private positionMentionDropdown;
40
+ onEnterPressed(_text: string): void;
57
41
  /**
58
- * Insert selected mention into text
42
+ * Handle mention selection from MentionEditorComponent
59
43
  */
60
44
  onMentionSelected(suggestion: MentionSuggestion): void;
61
45
  /**
62
- * Close mention dropdown
46
+ * Send the message
47
+ */
48
+ onSendClick(): void;
49
+ /**
50
+ * Handle clicks on the container - focus the mention editor
51
+ * Only moves cursor to end if clicking outside the contentEditable area
63
52
  */
64
- closeMentionDropdown(): void;
53
+ onContainerClick(event: MouseEvent): void;
65
54
  /**
66
- * Focus the input
55
+ * Public method to focus the input programmatically
67
56
  */
68
57
  focus(): void;
69
58
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputBoxComponent, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"message-input-box.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/message/message-input-box.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAa,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAChI,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;;AAE5G;;;;;;;;;;;;;GAaG;AACH,qBAKa,wBAAyB,YAAW,MAAM,EAAE,aAAa,EAAE,SAAS;IAuB7E,OAAO,CAAC,mBAAmB;IAtBpB,WAAW,EAAE,MAAM,CAAsD;IACzE,QAAQ,EAAE,OAAO,CAAS;IAC1B,KAAK,EAAE,MAAM,CAAM;IACnB,kBAAkB,EAAE,OAAO,CAAS;IACpC,cAAc,EAAE,OAAO,CAAQ;IAC/B,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,IAAI,EAAE,MAAM,CAAK;IAEhB,aAAa,uBAA8B;IAC3C,WAAW,uBAA8B;IAErB,eAAe,CAAC,EAAE,UAAU,CAAC;IAGpD,mBAAmB,EAAE,OAAO,CAAS;IACrC,kBAAkB,EAAE,iBAAiB,EAAE,CAAM;IAC7C,uBAAuB,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAuB;IAC7E,wBAAwB,EAAE,OAAO,CAAS;IACjD,OAAO,CAAC,iBAAiB,CAAc;IACvC,OAAO,CAAC,YAAY,CAAc;gBAGxB,mBAAmB,EAAE,0BAA0B;IAGnD,QAAQ;IAOd,eAAe;IAOf,WAAW;IAIX,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAerC,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAW3B,WAAW,IAAI,IAAI;IAUnB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAuC1B;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IA6B/B;;OAEG;IACH,iBAAiB,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAsBtD;;OAEG;IACH,oBAAoB,IAAI,IAAI;IAO5B;;OAEG;IACI,KAAK,IAAI,IAAI;yCArMT,wBAAwB;2CAAxB,wBAAwB;CAwMpC"}
1
+ {"version":3,"file":"message-input-box.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/message/message-input-box.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAa,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;;AAE7E;;;;;;;;;;;;;;GAcG;AACH,qBAKa,wBAAwB;IACP,aAAa,CAAC,EAAE,sBAAsB,CAAC;IAE1D,WAAW,EAAE,MAAM,CAAsD;IACzE,QAAQ,EAAE,OAAO,CAAS;IAC1B,KAAK,EAAE,MAAM,CAAM;IACnB,kBAAkB,EAAE,OAAO,CAAS;IACpC,cAAc,EAAE,OAAO,CAAQ;IAC/B,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,IAAI,EAAE,MAAM,CAAK;IAEhB,aAAa,uBAA8B;IAC3C,WAAW,uBAA8B;IAEnD,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;OAEG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKrC;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAInC;;OAEG;IACH,iBAAiB,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAMtD;;OAEG;IACH,WAAW,IAAI,IAAI;IASnB;;;OAGG;IACH,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IA6BzC;;OAEG;IACH,KAAK,IAAI,IAAI;yCA1FF,wBAAwB;2CAAxB,wBAAwB;CAgGpC"}
@@ -1,26 +1,16 @@
1
1
  import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
- import * as i1 from "../../services/mention-autocomplete.service";
4
- import * as i2 from "@angular/common";
5
- import * as i3 from "@angular/forms";
6
- import * as i4 from "../mention/mention-dropdown.component";
7
- const _c0 = ["messageTextarea"];
8
- function MessageInputBoxComponent_mj_mention_dropdown_6_Template(rf, ctx) { if (rf & 1) {
9
- const _r2 = i0.ɵɵgetCurrentView();
10
- i0.ɵɵelementStart(0, "mj-mention-dropdown", 7);
11
- i0.ɵɵlistener("suggestionSelected", function MessageInputBoxComponent_mj_mention_dropdown_6_Template_mj_mention_dropdown_suggestionSelected_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onMentionSelected($event)); })("closed", function MessageInputBoxComponent_mj_mention_dropdown_6_Template_mj_mention_dropdown_closed_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.closeMentionDropdown()); });
12
- i0.ɵɵelementEnd();
13
- } if (rf & 2) {
14
- const ctx_r2 = i0.ɵɵnextContext();
15
- i0.ɵɵproperty("suggestions", ctx_r2.mentionSuggestions)("position", ctx_r2.mentionDropdownPosition)("showAbove", ctx_r2.mentionDropdownShowAbove)("useFixedPositioning", true)("visible", true);
16
- } }
3
+ import * as i1 from "@angular/forms";
4
+ import * as i2 from "../mention/mention-editor.component";
5
+ const _c0 = ["mentionEditor"];
17
6
  /**
18
7
  * Reusable message input box component (presentational)
8
+ * Now uses MentionEditorComponent for rich @mention functionality with chips
9
+ *
19
10
  * Handles:
20
- * - Text input with keyboard shortcuts
21
- * - @mention autocomplete (optional)
11
+ * - Text input with keyboard shortcuts via MentionEditorComponent
12
+ * - @mention autocomplete with visual chips (contentEditable)
22
13
  * - Send button
23
- * - Character count (optional)
24
14
  *
25
15
  * Does NOT handle:
26
16
  * - Saving messages to database
@@ -29,7 +19,7 @@ function MessageInputBoxComponent_mj_mention_dropdown_6_Template(rf, ctx) { if (
29
19
  * - Conversation management
30
20
  */
31
21
  export class MessageInputBoxComponent {
32
- mentionAutocomplete;
22
+ mentionEditor;
33
23
  placeholder = 'Type your message to start a new conversation...';
34
24
  disabled = false;
35
25
  value = '';
@@ -39,199 +29,111 @@ export class MessageInputBoxComponent {
39
29
  rows = 3;
40
30
  textSubmitted = new EventEmitter();
41
31
  valueChange = new EventEmitter();
42
- messageTextarea;
43
- // Mention autocomplete state
44
- showMentionDropdown = false;
45
- mentionSuggestions = [];
46
- mentionDropdownPosition = { top: 0, left: 0 };
47
- mentionDropdownShowAbove = false;
48
- mentionStartIndex = -1;
49
- mentionQuery = '';
50
- constructor(mentionAutocomplete) {
51
- this.mentionAutocomplete = mentionAutocomplete;
52
- }
53
- async ngOnInit() {
54
- // Initialize mention autocomplete if enabled and currentUser is available
55
- if (this.enableMentions && this.currentUser) {
56
- await this.mentionAutocomplete.initialize(this.currentUser);
57
- }
58
- }
59
- ngAfterViewInit() {
60
- // Auto-focus the textarea
61
- setTimeout(() => {
62
- this.messageTextarea?.nativeElement?.focus();
63
- }, 100);
64
- }
65
- ngOnDestroy() {
66
- // Cleanup if needed
67
- }
68
32
  get canSend() {
69
33
  return !this.disabled && this.value.trim().length > 0;
70
34
  }
71
- onKeyDown(event) {
72
- // Handle mention dropdown navigation
73
- if (this.showMentionDropdown) {
74
- // Implement arrow key navigation if needed in future
75
- // For now, just let the dropdown handle it
76
- }
77
- // Enter alone: Send message
78
- if (event.key === 'Enter' && !event.shiftKey && !this.showMentionDropdown) {
79
- event.preventDefault();
80
- this.onSendClick();
81
- }
82
- // Shift+Enter: Allow default behavior (add newline)
83
- }
84
- onInput(event) {
85
- const textarea = event.target;
86
- this.value = textarea.value;
35
+ /**
36
+ * Handle value changes from MentionEditorComponent
37
+ */
38
+ onValueChange(newValue) {
39
+ this.value = newValue;
87
40
  this.valueChange.emit(this.value);
88
- // Handle @mention autocomplete
89
- if (this.enableMentions && this.currentUser) {
90
- this.handleMentionInput();
91
- }
92
41
  }
42
+ /**
43
+ * Handle Enter key from MentionEditorComponent
44
+ */
45
+ onEnterPressed(_text) {
46
+ this.onSendClick();
47
+ }
48
+ /**
49
+ * Handle mention selection from MentionEditorComponent
50
+ */
51
+ onMentionSelected(suggestion) {
52
+ // MentionEditorComponent already inserts the mention chip
53
+ // This is just for additional tracking/analytics if needed
54
+ console.log('[MessageInputBox] Mention selected:', suggestion);
55
+ }
56
+ /**
57
+ * Send the message
58
+ */
93
59
  onSendClick() {
94
60
  if (this.canSend) {
95
61
  const textToSend = this.value.trim();
96
62
  this.textSubmitted.emit(textToSend);
97
63
  this.value = ''; // Clear input after sending
98
64
  this.valueChange.emit(this.value);
99
- this.closeMentionDropdown();
100
65
  }
101
66
  }
102
67
  /**
103
- * Handle @mention autocomplete
68
+ * Handle clicks on the container - focus the mention editor
69
+ * Only moves cursor to end if clicking outside the contentEditable area
104
70
  */
105
- handleMentionInput() {
106
- const textarea = this.messageTextarea?.nativeElement;
107
- if (!textarea) {
71
+ onContainerClick(event) {
72
+ const target = event.target;
73
+ // Don't handle clicks on the send button
74
+ if (target.closest('.send-button-icon')) {
108
75
  return;
109
76
  }
110
- const cursorPos = textarea.selectionStart;
111
- const textBeforeCursor = this.value.substring(0, cursorPos);
112
- // Find the last @ before cursor
113
- const lastAtIndex = textBeforeCursor.lastIndexOf('@');
114
- if (lastAtIndex === -1) {
115
- this.closeMentionDropdown();
77
+ const editor = this.mentionEditor?.editorRef?.nativeElement;
78
+ if (!editor)
116
79
  return;
117
- }
118
- // Check if there's a space between @ and cursor (means mention was completed)
119
- const textAfterAt = textBeforeCursor.substring(lastAtIndex + 1);
120
- if (textAfterAt.includes(' ')) {
121
- this.closeMentionDropdown();
80
+ // If clicking directly on the editor or its children, let the browser handle cursor placement
81
+ if (target === editor || editor.contains(target)) {
122
82
  return;
123
83
  }
124
- // Extract query
125
- this.mentionQuery = textAfterAt;
126
- this.mentionStartIndex = lastAtIndex;
127
- // Get suggestions (include users if we have currentUser)
128
- this.mentionSuggestions = this.mentionAutocomplete.getSuggestions(this.mentionQuery, !!this.currentUser);
129
- if (this.mentionSuggestions.length > 0) {
130
- this.showMentionDropdown = true;
131
- this.positionMentionDropdown();
132
- }
133
- else {
134
- this.closeMentionDropdown();
84
+ // Only if clicking on the container (empty space), focus and move cursor to end
85
+ editor.focus();
86
+ const selection = window.getSelection();
87
+ const range = document.createRange();
88
+ if (selection) {
89
+ range.selectNodeContents(editor);
90
+ range.collapse(false); // Collapse to end
91
+ selection.removeAllRanges();
92
+ selection.addRange(range);
135
93
  }
136
94
  }
137
95
  /**
138
- * Position the mention dropdown near the textarea
139
- * Uses viewport-relative positioning (fixed) to avoid clipping by parent containers
140
- */
141
- positionMentionDropdown() {
142
- const textarea = this.messageTextarea?.nativeElement;
143
- if (!textarea)
144
- return;
145
- const textareaRect = textarea.getBoundingClientRect();
146
- // Check if there's enough space below the textarea
147
- const spaceBelow = window.innerHeight - textareaRect.bottom;
148
- const spaceAbove = textareaRect.top;
149
- const dropdownHeight = Math.min(this.mentionSuggestions.length * 48, 240);
150
- this.mentionDropdownShowAbove = spaceBelow < dropdownHeight && spaceAbove > spaceBelow;
151
- // Use viewport-relative coordinates (dropdown will be positioned fixed to viewport)
152
- if (this.mentionDropdownShowAbove) {
153
- // Show above the textarea - anchor to top of textarea
154
- this.mentionDropdownPosition = {
155
- top: textareaRect.top + window.scrollY - 4,
156
- left: textareaRect.left + window.scrollX
157
- };
158
- }
159
- else {
160
- // Show below the textarea (default) - anchor to bottom of textarea
161
- this.mentionDropdownPosition = {
162
- top: textareaRect.bottom + window.scrollY + 4,
163
- left: textareaRect.left + window.scrollX
164
- };
165
- }
166
- }
167
- /**
168
- * Insert selected mention into text
169
- */
170
- onMentionSelected(suggestion) {
171
- const textarea = this.messageTextarea?.nativeElement;
172
- if (!textarea)
173
- return;
174
- const beforeMention = this.value.substring(0, this.mentionStartIndex);
175
- const afterCursor = this.value.substring(textarea.selectionStart);
176
- // Insert mention with @ prefix and space after
177
- this.value = `${beforeMention}@${suggestion.name} ${afterCursor}`;
178
- this.valueChange.emit(this.value);
179
- // Close dropdown
180
- this.closeMentionDropdown();
181
- // Restore focus and set cursor position
182
- setTimeout(() => {
183
- const newCursorPos = this.mentionStartIndex + suggestion.name.length + 2; // +2 for @ and space
184
- textarea.focus();
185
- textarea.setSelectionRange(newCursorPos, newCursorPos);
186
- }, 0);
187
- }
188
- /**
189
- * Close mention dropdown
190
- */
191
- closeMentionDropdown() {
192
- this.showMentionDropdown = false;
193
- this.mentionSuggestions = [];
194
- this.mentionStartIndex = -1;
195
- this.mentionQuery = '';
196
- }
197
- /**
198
- * Focus the input
96
+ * Public method to focus the input programmatically
199
97
  */
200
98
  focus() {
201
- this.messageTextarea?.nativeElement?.focus();
99
+ const editor = this.mentionEditor?.editorRef?.nativeElement;
100
+ if (editor) {
101
+ editor.focus();
102
+ }
202
103
  }
203
- static ɵfac = function MessageInputBoxComponent_Factory(t) { return new (t || MessageInputBoxComponent)(i0.ɵɵdirectiveInject(i1.MentionAutocompleteService)); };
104
+ static ɵfac = function MessageInputBoxComponent_Factory(t) { return new (t || MessageInputBoxComponent)(); };
204
105
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MessageInputBoxComponent, selectors: [["mj-message-input-box"]], viewQuery: function MessageInputBoxComponent_Query(rf, ctx) { if (rf & 1) {
205
106
  i0.ɵɵviewQuery(_c0, 5);
206
107
  } if (rf & 2) {
207
108
  let _t;
208
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.messageTextarea = _t.first);
209
- } }, inputs: { placeholder: "placeholder", disabled: "disabled", value: "value", showCharacterCount: "showCharacterCount", enableMentions: "enableMentions", currentUser: "currentUser", rows: "rows" }, outputs: { textSubmitted: "textSubmitted", valueChange: "valueChange" }, decls: 7, vars: 6, consts: [["messageTextarea", ""], [1, "message-input-box-container"], [1, "input-wrapper"], [1, "message-input-box-textarea", 3, "ngModelChange", "keydown", "input", "ngModel", "disabled", "placeholder", "rows"], ["title", "Send message (Enter)", 1, "send-button-icon", 3, "click", "disabled"], [1, "fa-solid", "fa-paper-plane"], [3, "suggestions", "position", "showAbove", "useFixedPositioning", "visible", "suggestionSelected", "closed", 4, "ngIf"], [3, "suggestionSelected", "closed", "suggestions", "position", "showAbove", "useFixedPositioning", "visible"]], template: function MessageInputBoxComponent_Template(rf, ctx) { if (rf & 1) {
109
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.mentionEditor = _t.first);
110
+ } }, inputs: { placeholder: "placeholder", disabled: "disabled", value: "value", showCharacterCount: "showCharacterCount", enableMentions: "enableMentions", currentUser: "currentUser", rows: "rows" }, outputs: { textSubmitted: "textSubmitted", valueChange: "valueChange" }, decls: 6, vars: 6, consts: [["mentionEditor", ""], [1, "message-input-box-container", 3, "click"], [1, "input-wrapper"], [3, "ngModelChange", "valueChange", "enterPressed", "mentionSelected", "placeholder", "disabled", "currentUser", "enableMentions", "ngModel"], ["title", "Send message (Enter)", 1, "send-button-icon", 3, "click", "disabled"], [1, "fa-solid", "fa-paper-plane"]], template: function MessageInputBoxComponent_Template(rf, ctx) { if (rf & 1) {
210
111
  const _r1 = i0.ɵɵgetCurrentView();
211
- i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "textarea", 3, 0);
212
- i0.ɵɵtwoWayListener("ngModelChange", function MessageInputBoxComponent_Template_textarea_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.value, $event) || (ctx.value = $event); return i0.ɵɵresetView($event); });
213
- i0.ɵɵlistener("keydown", function MessageInputBoxComponent_Template_textarea_keydown_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onKeyDown($event)); })("input", function MessageInputBoxComponent_Template_textarea_input_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onInput($event)); });
112
+ i0.ɵɵelementStart(0, "div", 1);
113
+ i0.ɵɵlistener("click", function MessageInputBoxComponent_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onContainerClick($event)); });
114
+ i0.ɵɵelementStart(1, "div", 2)(2, "mj-mention-editor", 3, 0);
115
+ i0.ɵɵtwoWayListener("ngModelChange", function MessageInputBoxComponent_Template_mj_mention_editor_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.value, $event) || (ctx.value = $event); return i0.ɵɵresetView($event); });
116
+ i0.ɵɵlistener("valueChange", function MessageInputBoxComponent_Template_mj_mention_editor_valueChange_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onValueChange($event)); })("enterPressed", function MessageInputBoxComponent_Template_mj_mention_editor_enterPressed_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onEnterPressed($event)); })("mentionSelected", function MessageInputBoxComponent_Template_mj_mention_editor_mentionSelected_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onMentionSelected($event)); });
214
117
  i0.ɵɵelementEnd();
215
118
  i0.ɵɵelementStart(4, "button", 4);
216
119
  i0.ɵɵlistener("click", function MessageInputBoxComponent_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onSendClick()); });
217
120
  i0.ɵɵelement(5, "i", 5);
218
- i0.ɵɵelementEnd()();
219
- i0.ɵɵtemplate(6, MessageInputBoxComponent_mj_mention_dropdown_6_Template, 1, 5, "mj-mention-dropdown", 6);
220
- i0.ɵɵelementEnd();
121
+ i0.ɵɵelementEnd()()();
221
122
  } if (rf & 2) {
222
123
  i0.ɵɵadvance(2);
124
+ i0.ɵɵproperty("placeholder", ctx.placeholder)("disabled", ctx.disabled)("currentUser", ctx.currentUser)("enableMentions", ctx.enableMentions);
223
125
  i0.ɵɵtwoWayProperty("ngModel", ctx.value);
224
- i0.ɵɵproperty("disabled", ctx.disabled)("placeholder", ctx.placeholder)("rows", ctx.rows);
225
126
  i0.ɵɵadvance(2);
226
127
  i0.ɵɵproperty("disabled", !ctx.canSend);
227
- i0.ɵɵadvance(2);
228
- i0.ɵɵproperty("ngIf", ctx.showMentionDropdown && ctx.enableMentions);
229
- } }, dependencies: [i2.NgIf, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel, i4.MentionDropdownComponent], styles: [".message-input-box-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n background: white;\n border: 2px solid var(--border-color, #e0e0e0);\n border-radius: 12px;\n box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);\n transition: all 0.2s ease;\n overflow: visible; // Allow mention dropdown to escape container\n position: relative;\n\n &:focus-within {\n border-color: var(--primary-color, #007bff);\n box-shadow: 0 4px 16px rgba(0, 123, 255, 0.15);\n }\n}\n\n.input-wrapper[_ngcontent-%COMP%] {\n position: relative;\n display: flex;\n align-items: flex-end; // Align send button to bottom\n}\n\n.message-input-box-textarea[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 100px;\n padding: 1rem;\n padding-right: 3.5rem; // Space for send button\n border: 0 !important;\n outline: 0 !important;\n box-shadow: none !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n appearance: none !important;\n font-family: inherit;\n font-size: 1rem;\n line-height: 1.5;\n resize: vertical;\n background: transparent;\n border: 0 !important;\n\n &::placeholder {\n color: var(--text-tertiary, #999);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n background: var(--background-disabled, #f5f5f5);\n }\n\n &:focus,\n &:active,\n &:focus-visible {\n outline: 0 !important;\n box-shadow: none !important;\n }\n}\n\n.send-button-icon[_ngcontent-%COMP%] {\n position: absolute;\n bottom: 0.75rem;\n right: 0.75rem;\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--primary-color, #007bff);\n color: white;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n\n i {\n font-size: 1rem;\n }\n\n &:hover:not(:disabled) {\n background: var(--primary-color-dark, #0056b3);\n transform: scale(1.05);\n }\n\n &:active:not(:disabled) {\n transform: scale(0.95);\n }\n\n &:disabled {\n background: var(--background-disabled, #d0d0d0);\n color: var(--text-disabled, #999);\n cursor: not-allowed;\n opacity: 0.5;\n }\n}\n\n\n\n@media (max-width: 768px) {\n .message-input-box-container[_ngcontent-%COMP%] {\n border-radius: 10px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n }\n\n .message-input-box-textarea[_ngcontent-%COMP%] {\n min-height: 80px;\n padding: 0.75rem;\n padding-right: 3rem;\n font-size: 16px; // Prevent iOS zoom on focus\n line-height: 1.4;\n }\n\n .send-button-icon[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n bottom: 0.625rem;\n right: 0.625rem;\n border-radius: 6px;\n\n i {\n font-size: 0.875rem;\n }\n }\n}\n\n\n\n@media (max-width: 480px) {\n .message-input-box-container[_ngcontent-%COMP%] {\n border-radius: 8px;\n border-width: 1.5px;\n }\n\n .message-input-box-textarea[_ngcontent-%COMP%] {\n min-height: 60px;\n padding: 0.625rem;\n padding-right: 2.75rem;\n font-size: 16px; // Prevent iOS zoom on focus\n line-height: 1.3;\n }\n\n .send-button-icon[_ngcontent-%COMP%] {\n width: 36px;\n height: 36px;\n bottom: 0.5rem;\n right: 0.5rem;\n border-radius: 6px;\n\n i {\n font-size: 0.875rem;\n }\n }\n}"] });
128
+ } }, dependencies: [i1.NgControlStatus, i1.NgModel, i2.MentionEditorComponent], styles: [".message-input-box-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n background: white;\n border: 2px solid var(--border-color, #e0e0e0);\n border-radius: 12px;\n box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);\n transition: all 0.2s ease;\n overflow: visible; // Allow mention dropdown to escape container\n position: relative;\n cursor: text; // Show text cursor for better UX\n\n &:focus-within {\n border-color: var(--primary-color, #007bff);\n box-shadow: 0 4px 16px rgba(0, 123, 255, 0.15);\n }\n}\n\n.input-wrapper[_ngcontent-%COMP%] {\n position: relative;\n display: flex;\n align-items: flex-end; // Align send button to bottom\n padding: 5px; // Add padding around the editor\n\n // Ensure mention editor takes full width\n mj-mention-editor {\n flex: 1;\n display: block;\n }\n}\n\n.message-input-box-textarea[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 100px;\n padding: 1rem;\n padding-right: 3.5rem; // Space for send button\n border: 0 !important;\n outline: 0 !important;\n box-shadow: none !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n appearance: none !important;\n font-family: inherit;\n font-size: 1rem;\n line-height: 1.5;\n resize: vertical;\n background: transparent;\n border: 0 !important;\n\n &::placeholder {\n color: var(--text-tertiary, #999);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n background: var(--background-disabled, #f5f5f5);\n }\n\n &:focus,\n &:active,\n &:focus-visible {\n outline: 0 !important;\n box-shadow: none !important;\n }\n}\n\n.send-button-icon[_ngcontent-%COMP%] {\n position: absolute;\n bottom: 0.75rem;\n right: 0.75rem;\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--primary-color, #007bff);\n color: white;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n\n i {\n font-size: 1rem;\n }\n\n &:hover:not(:disabled) {\n background: var(--primary-color-dark, #0056b3);\n transform: scale(1.05);\n }\n\n &:active:not(:disabled) {\n transform: scale(0.95);\n }\n\n &:disabled {\n background: var(--background-disabled, #d0d0d0);\n color: var(--text-disabled, #999);\n cursor: not-allowed;\n opacity: 0.5;\n }\n}\n\n\n\n@media (max-width: 768px) {\n .message-input-box-container[_ngcontent-%COMP%] {\n border-radius: 10px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n }\n\n .message-input-box-textarea[_ngcontent-%COMP%] {\n min-height: 80px;\n padding: 0.75rem;\n padding-right: 3rem;\n font-size: 16px; // Prevent iOS zoom on focus\n line-height: 1.4;\n }\n\n .send-button-icon[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n bottom: 0.625rem;\n right: 0.625rem;\n border-radius: 6px;\n\n i {\n font-size: 0.875rem;\n }\n }\n}\n\n\n\n@media (max-width: 480px) {\n .message-input-box-container[_ngcontent-%COMP%] {\n border-radius: 8px;\n border-width: 1.5px;\n }\n\n .message-input-box-textarea[_ngcontent-%COMP%] {\n min-height: 60px;\n padding: 0.625rem;\n padding-right: 2.75rem;\n font-size: 16px; // Prevent iOS zoom on focus\n line-height: 1.3;\n }\n\n .send-button-icon[_ngcontent-%COMP%] {\n width: 36px;\n height: 36px;\n bottom: 0.5rem;\n right: 0.5rem;\n border-radius: 6px;\n\n i {\n font-size: 0.875rem;\n }\n }\n}"] });
230
129
  }
231
130
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MessageInputBoxComponent, [{
232
131
  type: Component,
233
- args: [{ selector: 'mj-message-input-box', template: "<div class=\"message-input-box-container\">\n <div class=\"input-wrapper\">\n <textarea\n #messageTextarea\n class=\"message-input-box-textarea\"\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [rows]=\"rows\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"onInput($event)\"\n ></textarea>\n\n <!-- Send Button (Icon Only) - Inside textarea area -->\n <button\n class=\"send-button-icon\"\n [disabled]=\"!canSend\"\n (click)=\"onSendClick()\"\n title=\"Send message (Enter)\"\n >\n <i class=\"fa-solid fa-paper-plane\"></i>\n </button>\n </div>\n\n <!-- Mention Dropdown -->\n <mj-mention-dropdown\n *ngIf=\"showMentionDropdown && enableMentions\"\n [suggestions]=\"mentionSuggestions\"\n [position]=\"mentionDropdownPosition\"\n [showAbove]=\"mentionDropdownShowAbove\"\n [useFixedPositioning]=\"true\"\n [visible]=\"true\"\n (suggestionSelected)=\"onMentionSelected($event)\"\n (closed)=\"closeMentionDropdown()\">\n </mj-mention-dropdown>\n</div>\n", styles: [".message-input-box-container {\n display: flex;\n flex-direction: column;\n background: white;\n border: 2px solid var(--border-color, #e0e0e0);\n border-radius: 12px;\n box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);\n transition: all 0.2s ease;\n overflow: visible; // Allow mention dropdown to escape container\n position: relative;\n\n &:focus-within {\n border-color: var(--primary-color, #007bff);\n box-shadow: 0 4px 16px rgba(0, 123, 255, 0.15);\n }\n}\n\n.input-wrapper {\n position: relative;\n display: flex;\n align-items: flex-end; // Align send button to bottom\n}\n\n.message-input-box-textarea {\n flex: 1;\n min-height: 100px;\n padding: 1rem;\n padding-right: 3.5rem; // Space for send button\n border: 0 !important;\n outline: 0 !important;\n box-shadow: none !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n appearance: none !important;\n font-family: inherit;\n font-size: 1rem;\n line-height: 1.5;\n resize: vertical;\n background: transparent;\n border: 0 !important;\n\n &::placeholder {\n color: var(--text-tertiary, #999);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n background: var(--background-disabled, #f5f5f5);\n }\n\n &:focus,\n &:active,\n &:focus-visible {\n outline: 0 !important;\n box-shadow: none !important;\n }\n}\n\n.send-button-icon {\n position: absolute;\n bottom: 0.75rem;\n right: 0.75rem;\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--primary-color, #007bff);\n color: white;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n\n i {\n font-size: 1rem;\n }\n\n &:hover:not(:disabled) {\n background: var(--primary-color-dark, #0056b3);\n transform: scale(1.05);\n }\n\n &:active:not(:disabled) {\n transform: scale(0.95);\n }\n\n &:disabled {\n background: var(--background-disabled, #d0d0d0);\n color: var(--text-disabled, #999);\n cursor: not-allowed;\n opacity: 0.5;\n }\n}\n\n/* Mobile adjustments: 481px - 768px */\n@media (max-width: 768px) {\n .message-input-box-container {\n border-radius: 10px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n }\n\n .message-input-box-textarea {\n min-height: 80px;\n padding: 0.75rem;\n padding-right: 3rem;\n font-size: 16px; // Prevent iOS zoom on focus\n line-height: 1.4;\n }\n\n .send-button-icon {\n width: 32px;\n height: 32px;\n bottom: 0.625rem;\n right: 0.625rem;\n border-radius: 6px;\n\n i {\n font-size: 0.875rem;\n }\n }\n}\n\n/* Small Phone adjustments: <= 480px */\n@media (max-width: 480px) {\n .message-input-box-container {\n border-radius: 8px;\n border-width: 1.5px;\n }\n\n .message-input-box-textarea {\n min-height: 60px;\n padding: 0.625rem;\n padding-right: 2.75rem;\n font-size: 16px; // Prevent iOS zoom on focus\n line-height: 1.3;\n }\n\n .send-button-icon {\n width: 36px;\n height: 36px;\n bottom: 0.5rem;\n right: 0.5rem;\n border-radius: 6px;\n\n i {\n font-size: 0.875rem;\n }\n }\n}\n"] }]
234
- }], () => [{ type: i1.MentionAutocompleteService }], { placeholder: [{
132
+ args: [{ selector: 'mj-message-input-box', template: "<div class=\"message-input-box-container\" (click)=\"onContainerClick($event)\">\n <div class=\"input-wrapper\">\n <mj-mention-editor\n #mentionEditor\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [currentUser]=\"currentUser\"\n [enableMentions]=\"enableMentions\"\n [(ngModel)]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n (enterPressed)=\"onEnterPressed($event)\"\n (mentionSelected)=\"onMentionSelected($event)\">\n </mj-mention-editor>\n\n <!-- Send Button (Icon Only) - Positioned over editor -->\n <button\n class=\"send-button-icon\"\n [disabled]=\"!canSend\"\n (click)=\"onSendClick()\"\n title=\"Send message (Enter)\"\n >\n <i class=\"fa-solid fa-paper-plane\"></i>\n </button>\n </div>\n</div>\n", styles: [".message-input-box-container {\n display: flex;\n flex-direction: column;\n background: white;\n border: 2px solid var(--border-color, #e0e0e0);\n border-radius: 12px;\n box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);\n transition: all 0.2s ease;\n overflow: visible; // Allow mention dropdown to escape container\n position: relative;\n cursor: text; // Show text cursor for better UX\n\n &:focus-within {\n border-color: var(--primary-color, #007bff);\n box-shadow: 0 4px 16px rgba(0, 123, 255, 0.15);\n }\n}\n\n.input-wrapper {\n position: relative;\n display: flex;\n align-items: flex-end; // Align send button to bottom\n padding: 5px; // Add padding around the editor\n\n // Ensure mention editor takes full width\n mj-mention-editor {\n flex: 1;\n display: block;\n }\n}\n\n.message-input-box-textarea {\n flex: 1;\n min-height: 100px;\n padding: 1rem;\n padding-right: 3.5rem; // Space for send button\n border: 0 !important;\n outline: 0 !important;\n box-shadow: none !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n appearance: none !important;\n font-family: inherit;\n font-size: 1rem;\n line-height: 1.5;\n resize: vertical;\n background: transparent;\n border: 0 !important;\n\n &::placeholder {\n color: var(--text-tertiary, #999);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n background: var(--background-disabled, #f5f5f5);\n }\n\n &:focus,\n &:active,\n &:focus-visible {\n outline: 0 !important;\n box-shadow: none !important;\n }\n}\n\n.send-button-icon {\n position: absolute;\n bottom: 0.75rem;\n right: 0.75rem;\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--primary-color, #007bff);\n color: white;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n\n i {\n font-size: 1rem;\n }\n\n &:hover:not(:disabled) {\n background: var(--primary-color-dark, #0056b3);\n transform: scale(1.05);\n }\n\n &:active:not(:disabled) {\n transform: scale(0.95);\n }\n\n &:disabled {\n background: var(--background-disabled, #d0d0d0);\n color: var(--text-disabled, #999);\n cursor: not-allowed;\n opacity: 0.5;\n }\n}\n\n/* Mobile adjustments: 481px - 768px */\n@media (max-width: 768px) {\n .message-input-box-container {\n border-radius: 10px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n }\n\n .message-input-box-textarea {\n min-height: 80px;\n padding: 0.75rem;\n padding-right: 3rem;\n font-size: 16px; // Prevent iOS zoom on focus\n line-height: 1.4;\n }\n\n .send-button-icon {\n width: 32px;\n height: 32px;\n bottom: 0.625rem;\n right: 0.625rem;\n border-radius: 6px;\n\n i {\n font-size: 0.875rem;\n }\n }\n}\n\n/* Small Phone adjustments: <= 480px */\n@media (max-width: 480px) {\n .message-input-box-container {\n border-radius: 8px;\n border-width: 1.5px;\n }\n\n .message-input-box-textarea {\n min-height: 60px;\n padding: 0.625rem;\n padding-right: 2.75rem;\n font-size: 16px; // Prevent iOS zoom on focus\n line-height: 1.3;\n }\n\n .send-button-icon {\n width: 36px;\n height: 36px;\n bottom: 0.5rem;\n right: 0.5rem;\n border-radius: 6px;\n\n i {\n font-size: 0.875rem;\n }\n }\n}\n"] }]
133
+ }], null, { mentionEditor: [{
134
+ type: ViewChild,
135
+ args: ['mentionEditor']
136
+ }], placeholder: [{
235
137
  type: Input
236
138
  }], disabled: [{
237
139
  type: Input
@@ -249,9 +151,6 @@ export class MessageInputBoxComponent {
249
151
  type: Output
250
152
  }], valueChange: [{
251
153
  type: Output
252
- }], messageTextarea: [{
253
- type: ViewChild,
254
- args: ['messageTextarea']
255
154
  }] }); })();
256
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MessageInputBoxComponent, { className: "MessageInputBoxComponent", filePath: "src/lib/components/message/message-input-box.component.ts", lineNumber: 24 }); })();
155
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MessageInputBoxComponent, { className: "MessageInputBoxComponent", filePath: "src/lib/components/message/message-input-box.component.ts", lineNumber: 26 }); })();
257
156
  //# sourceMappingURL=message-input-box.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"message-input-box.component.js","sourceRoot":"","sources":["../../../../src/lib/components/message/message-input-box.component.ts","../../../../src/lib/components/message/message-input-box.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAgD,MAAM,eAAe,CAAC;;;;;;;;;ICyB9H,8CAQoC;IAAlC,AADA,iPAAsB,gCAAyB,KAAC,sMACtC,6BAAsB,KAAC;IACnC,iBAAsB;;;IAHpB,AADA,AADA,AADA,AADA,uDAAkC,4CACE,8CACE,6BACV,iBACZ;;AD3BpB;;;;;;;;;;;;;GAaG;AAMH,MAAM,OAAO,wBAAwB;IAuBzB;IAtBD,WAAW,GAAW,kDAAkD,CAAC;IACzE,QAAQ,GAAY,KAAK,CAAC;IAC1B,KAAK,GAAW,EAAE,CAAC;IACnB,kBAAkB,GAAY,KAAK,CAAC;IACpC,cAAc,GAAY,IAAI,CAAC;IAC/B,WAAW,CAAY;IACvB,IAAI,GAAW,CAAC,CAAC;IAEhB,aAAa,GAAG,IAAI,YAAY,EAAU,CAAC;IAC3C,WAAW,GAAG,IAAI,YAAY,EAAU,CAAC;IAErB,eAAe,CAAc;IAE3D,6BAA6B;IACtB,mBAAmB,GAAY,KAAK,CAAC;IACrC,kBAAkB,GAAwB,EAAE,CAAC;IAC7C,uBA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,CAAC,EAAE,CAAC,CAAC,CAAC;IACR,CAAC;IAED;;OAEG;IACH,oBAAoB;QAClB,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;QACjC,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAC7B,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC,CAAC;QAC5B,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,KAAK;QACV,IAAI,CAAC,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;IAC/C,CAAC;kFAvMU,wBAAwB;6DAAxB,wBAAwB;;;;;;;YCrBjC,AADF,AADF,8BAAyC,aACZ,qBAUxB;YANC,sPAAmB;YAKnB,AADA,uJAAW,qBAAiB,KAAC,sIACpB,mBAAe,KAAC;YAC1B,iBAAW;YAGZ,iCAKC;YAFC,2IAAS,iBAAa,KAAC;YAGvB,uBAAuC;YAE3C,AADE,iBAAS,EACL;YAGN,yGAQoC;YAEtC,iBAAM;;YA9BA,eAAmB;YAAnB,yCAAmB;YAGnB,AADA,AADA,uCAAqB,gCACM,kBACd;YAQb,eAAqB;YAArB,uCAAqB;YAUtB,eAA2C;YAA3C,oEAA2C;;;iFDHnC,wBAAwB;cALpC,SAAS;2BACE,sBAAsB;2DAKvB,WAAW;kBAAnB,KAAK;YACG,QAAQ;kBAAhB,KAAK;YACG,KAAK;kBAAb,KAAK;YACG,kBAAkB;kBAA1B,KAAK;YACG,cAAc;kBAAtB,KAAK;YACG,WAAW;kBAAnB,KAAK;YACG,IAAI;kBAAZ,KAAK;YAEI,aAAa;kBAAtB,MAAM;YACG,WAAW;kBAApB,MAAM;YAEuB,eAAe;kBAA5C,SAAS;mBAAC,iBAAiB;;kFAZjB,wBAAwB"}
1
+ {"version":3,"file":"message-input-box.component.js","sourceRoot":"","sources":["../../../../src/lib/components/message/message-input-box.component.ts","../../../../src/lib/components/message/message-input-box.component.html"],"names":[],"mappings":"AAAA,OAAO,EAA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YAH9C,+PAAmB;YAGnB,AADA,AADA,wKAAe,yBAAqB,KAAC,6JACrB,0BAAsB,KAAC,mKACpB,6BAAyB,KAAC;YAC/C,iBAAoB;YAGpB,iCAKC;YAFC,2IAAS,iBAAa,KAAC;YAGvB,uBAAuC;YAG7C,AADE,AADE,iBAAS,EACL,EACF;;YApBA,eAA2B;YAG3B,AADA,AADA,AADA,6CAA2B,0BACN,gCACM,sCACM;YACjC,yCAAmB;YASnB,eAAqB;YAArB,uCAAqB;;;iFDQd,wBAAwB;cALpC,SAAS;2BACE,sBAAsB;gBAKJ,aAAa;kBAAxC,SAAS;mBAAC,eAAe;YAEjB,WAAW;kBAAnB,KAAK;YACG,QAAQ;kBAAhB,KAAK;YACG,KAAK;kBAAb,KAAK;YACG,kBAAkB;kBAA1B,KAAK;YACG,cAAc;kBAAtB,KAAK;YACG,WAAW;kBAAnB,KAAK;YACG,IAAI;kBAAZ,KAAK;YAEI,aAAa;kBAAtB,MAAM;YACG,WAAW;kBAApB,MAAM;;kFAZI,wBAAwB"}
@@ -7,10 +7,12 @@ import { ConversationAgentService } from '../../services/conversation-agent.serv
7
7
  import { ConversationStateService } from '../../services/conversation-state.service';
8
8
  import { DataCacheService } from '../../services/data-cache.service';
9
9
  import { ActiveTasksService } from '../../services/active-tasks.service';
10
+ import { ConversationStreamingService } from '../../services/conversation-streaming.service';
10
11
  import { BaseAgentSuggestedResponse } from '@memberjunction/ai-core-plus';
11
12
  import { MentionAutocompleteService } from '../../services/mention-autocomplete.service';
12
13
  import { MentionParserService } from '../../services/mention-parser.service';
13
14
  import { LazyArtifactInfo } from '../../models/lazy-artifact-info';
15
+ import { MessageInputBoxComponent } from './message-input-box.component';
14
16
  import * as i0 from "@angular/core";
15
17
  export declare class MessageInputComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit {
16
18
  private dialogService;
@@ -19,6 +21,7 @@ export declare class MessageInputComponent implements OnInit, OnDestroy, OnChang
19
21
  private conversationState;
20
22
  private dataCache;
21
23
  private activeTasks;
24
+ private streamingService;
22
25
  private mentionParser;
23
26
  private mentionAutocomplete;
24
27
  private readonly JSON_ARTIFACT_TYPE_ID;
@@ -33,7 +36,9 @@ export declare class MessageInputComponent implements OnInit, OnDestroy, OnChang
33
36
  artifactsByDetailId?: Map<string, LazyArtifactInfo[]>;
34
37
  systemArtifactsByDetailId?: Map<string, LazyArtifactInfo[]>;
35
38
  agentRunsByDetailId?: Map<string, AIAgentRunEntityExtended>;
36
- inProgressMessageIds?: string[];
39
+ private _inProgressMessageIds?;
40
+ set inProgressMessageIds(value: string[] | undefined);
41
+ get inProgressMessageIds(): string[] | undefined;
37
42
  messageSent: EventEmitter<ConversationDetailEntity>;
38
43
  agentResponse: EventEmitter<{
39
44
  message: ConversationDetailEntity;
@@ -66,16 +71,15 @@ export declare class MessageInputComponent implements OnInit, OnDestroy, OnChang
66
71
  }>;
67
72
  intentCheckStarted: EventEmitter<void>;
68
73
  intentCheckCompleted: EventEmitter<void>;
69
- inputBox: any;
74
+ inputBox: MessageInputBoxComponent;
70
75
  messageText: string;
71
76
  isSending: boolean;
72
77
  isProcessing: boolean;
73
78
  processingMessage: string;
74
79
  converationManagerAgent: AIAgentEntityExtended | null;
75
- private pushStatusSubscription?;
76
- private activeTaskExecutionMessageIds;
77
80
  private completionTimestamps;
78
- constructor(dialogService: DialogService, toastService: ToastService, agentService: ConversationAgentService, conversationState: ConversationStateService, dataCache: DataCacheService, activeTasks: ActiveTasksService, mentionParser: MentionParserService, mentionAutocomplete: MentionAutocompleteService);
81
+ private registeredCallbacks;
82
+ constructor(dialogService: DialogService, toastService: ToastService, agentService: ConversationAgentService, conversationState: ConversationStateService, dataCache: DataCacheService, activeTasks: ActiveTasksService, streamingService: ConversationStreamingService, mentionParser: MentionParserService, mentionAutocomplete: MentionAutocompleteService);
79
83
  ngOnInit(): Promise<void>;
80
84
  ngOnChanges(changes: SimpleChanges): void;
81
85
  ngAfterViewInit(): void;
@@ -85,25 +89,24 @@ export declare class MessageInputComponent implements OnInit, OnDestroy, OnChang
85
89
  */
86
90
  private focusInput;
87
91
  /**
88
- * Reconnect to in-progress messages for streaming updates
92
+ * Reconnect to in-progress messages for streaming updates via global streaming service.
89
93
  * This is called when:
90
94
  * 1. Component initializes (ngOnInit)
91
95
  * 2. Conversation changes (ngOnChanges)
92
96
  * 3. User returns to a conversation with in-progress messages
97
+ * 4. Parent component explicitly triggers reconnection
93
98
  */
94
- private reconnectInProgressMessages;
99
+ reconnectInProgressMessages(): void;
95
100
  /**
96
- * Subscribe to PubSub for real-time task orchestration progress updates
101
+ * Create a progress callback for a specific message ID.
102
+ * This callback will be invoked by the streaming service when progress updates arrive.
97
103
  */
98
- private subscribeToPushStatus;
104
+ private createMessageProgressCallback;
99
105
  /**
100
- * Handle task progress updates from PubSub
106
+ * Unregister all callbacks registered by this component.
107
+ * Called during cleanup and when switching conversations.
101
108
  */
102
- private handleTaskProgress;
103
- /**
104
- * Update task execution messages in real-time based on progress updates
105
- */
106
- private updateTaskExecutionMessages;
109
+ private unregisterAllCallbacks;
107
110
  get canSend(): boolean;
108
111
  /**
109
112
  * Handle text submitted from the input box
@@ -1 +1 @@
1
- {"version":3,"file":"message-input.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/message/message-input.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAyB,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC1J,OAAO,EAAE,QAAQ,EAAY,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAkC,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC1J,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,wBAAwB,E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3B;;OAEG;IACH,OAAO,CAAC,0BAA0B;yCA79DvB,qBAAqB;2CAArB,qBAAqB;CAm+DjC"}
1
+ {"version":3,"file":"message-input.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/message/message-input.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAa,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9I,OAAO,EAAE,QAAQ,EAAY,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAkC,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC1J,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAyB,MAAM,+CAA+C,CAAC;AAGpH,OAAO,EAAsD,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC9H,OAAO,EAAE,0BAA0B,EAAqB,MAAM,6CAA6C,CAAC;AAC5G,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;;AAEzE,qBAKa,qBAAsB,YAAW,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa;IAwDrF,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,iBAAiB;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