@memberjunction/ng-conversations 2.112.0 → 2.113.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/active-agent-indicator.component.d.ts +1 -1
- package/dist/lib/components/agent/active-agent-indicator.component.d.ts.map +1 -1
- package/dist/lib/components/agent/active-agent-indicator.component.js +13 -15
- package/dist/lib/components/agent/active-agent-indicator.component.js.map +1 -1
- package/dist/lib/components/agent/agent-process-panel.component.d.ts +1 -1
- package/dist/lib/components/agent/agent-process-panel.component.d.ts.map +1 -1
- package/dist/lib/components/agent/agent-process-panel.component.js +14 -18
- package/dist/lib/components/agent/agent-process-panel.component.js.map +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.js +11 -11
- package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts +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 +30 -24
- 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 +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 +10 -8
- package/dist/lib/components/collection/artifact-create-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts +9 -8
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-artifact-card.component.js +51 -35
- package/dist/lib/components/collection/collection-artifact-card.component.js.map +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.d.ts +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 +6 -5
- package/dist/lib/components/collection/collection-form-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-share-modal.component.d.ts +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 +12 -12
- package/dist/lib/components/collection/collection-share-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.d.ts +1 -1
- package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.js +11 -11
- package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
- package/dist/lib/components/collection/collection-view.component.d.ts +29 -10
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +128 -62
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.d.ts +19 -7
- package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.js +99 -69
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +38 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +303 -181
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.js +21 -21
- package/dist/lib/components/conversation/conversation-empty-state.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +11 -4
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +122 -81
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/export/export-modal.component.d.ts +1 -1
- package/dist/lib/components/export/export-modal.component.d.ts.map +1 -1
- package/dist/lib/components/export/export-modal.component.js +11 -9
- package/dist/lib/components/export/export-modal.component.js.map +1 -1
- package/dist/lib/components/global-tasks/global-tasks-panel.component.d.ts +25 -0
- package/dist/lib/components/global-tasks/global-tasks-panel.component.d.ts.map +1 -0
- package/dist/lib/components/global-tasks/global-tasks-panel.component.js +206 -0
- package/dist/lib/components/global-tasks/global-tasks-panel.component.js.map +1 -0
- package/dist/lib/components/library/library-full-view.component.d.ts +1 -1
- package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/library/library-full-view.component.js +6 -5
- package/dist/lib/components/library/library-full-view.component.js.map +1 -1
- package/dist/lib/components/members/members-modal.component.d.ts +1 -1
- package/dist/lib/components/members/members-modal.component.d.ts.map +1 -1
- package/dist/lib/components/members/members-modal.component.js +8 -8
- package/dist/lib/components/members/members-modal.component.js.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.d.ts +47 -0
- package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -0
- package/dist/lib/components/message/conversation-message-rating.component.js +224 -0
- package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -0
- package/dist/lib/components/message/message-input-box.component.d.ts +1 -1
- package/dist/lib/components/message/message-input-box.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input-box.component.js +4 -14
- package/dist/lib/components/message/message-input-box.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +18 -3
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +288 -297
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +32 -2
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +253 -129
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +4 -2
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +35 -18
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts +7 -1
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.js +24 -14
- package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.d.ts +1 -1
- package/dist/lib/components/project/project-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.js +7 -7
- package/dist/lib/components/project/project-form-modal.component.js.map +1 -1
- package/dist/lib/components/project/project-selector.component.d.ts +1 -1
- package/dist/lib/components/project/project-selector.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-selector.component.js +10 -10
- package/dist/lib/components/project/project-selector.component.js.map +1 -1
- package/dist/lib/components/search/search-panel.component.d.ts +1 -1
- package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
- package/dist/lib/components/search/search-panel.component.js +16 -8
- package/dist/lib/components/search/search-panel.component.js.map +1 -1
- package/dist/lib/components/share/share-modal.component.d.ts +1 -1
- package/dist/lib/components/share/share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/share/share-modal.component.js +12 -12
- package/dist/lib/components/share/share-modal.component.js.map +1 -1
- package/dist/lib/components/shared/user-picker.component.d.ts +1 -1
- package/dist/lib/components/shared/user-picker.component.d.ts.map +1 -1
- package/dist/lib/components/shared/user-picker.component.js +7 -7
- package/dist/lib/components/shared/user-picker.component.js.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.js +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.d.ts +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 +20 -18
- package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts +18 -29
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.js +178 -218
- package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -1
- package/dist/lib/components/thread/thread-panel.component.d.ts +1 -1
- package/dist/lib/components/thread/thread-panel.component.d.ts.map +1 -1
- package/dist/lib/components/thread/thread-panel.component.js +2 -2
- package/dist/lib/components/thread/thread-panel.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +15 -9
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +126 -79
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +54 -52
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +11 -3
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/models/conversation-complete-query.model.d.ts +31 -22
- package/dist/lib/models/conversation-complete-query.model.d.ts.map +1 -1
- package/dist/lib/models/conversation-complete-query.model.js +5 -2
- package/dist/lib/models/conversation-complete-query.model.js.map +1 -1
- package/dist/lib/models/lazy-artifact-info.d.ts +4 -1
- package/dist/lib/models/lazy-artifact-info.d.ts.map +1 -1
- package/dist/lib/models/lazy-artifact-info.js +12 -4
- package/dist/lib/models/lazy-artifact-info.js.map +1 -1
- package/dist/lib/services/active-tasks.service.d.ts +18 -0
- package/dist/lib/services/active-tasks.service.d.ts.map +1 -1
- package/dist/lib/services/active-tasks.service.js +53 -3
- package/dist/lib/services/active-tasks.service.js.map +1 -1
- package/dist/lib/services/agent-state.service.d.ts +1 -1
- package/dist/lib/services/agent-state.service.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.js +11 -11
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/artifact-permission.service.d.ts +1 -1
- package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-permission.service.js +15 -13
- package/dist/lib/services/artifact-permission.service.js.map +1 -1
- package/dist/lib/services/artifact-state.service.d.ts +23 -6
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-state.service.js +129 -38
- package/dist/lib/services/artifact-state.service.js.map +1 -1
- package/dist/lib/services/artifact-use-tracking.service.d.ts +35 -0
- package/dist/lib/services/artifact-use-tracking.service.d.ts.map +1 -0
- package/dist/lib/services/artifact-use-tracking.service.js +76 -0
- package/dist/lib/services/artifact-use-tracking.service.js.map +1 -0
- package/dist/lib/services/collection-permission.service.d.ts +1 -1
- package/dist/lib/services/collection-permission.service.d.ts.map +1 -1
- package/dist/lib/services/collection-permission.service.js +13 -13
- package/dist/lib/services/collection-permission.service.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +30 -3
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +127 -34
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-state.service.d.ts +14 -1
- package/dist/lib/services/conversation-state.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-state.service.js +36 -9
- package/dist/lib/services/conversation-state.service.js.map +1 -1
- package/dist/lib/services/data-cache.service.d.ts +1 -1
- package/dist/lib/services/data-cache.service.d.ts.map +1 -1
- package/dist/lib/services/data-cache.service.js +13 -13
- package/dist/lib/services/data-cache.service.js.map +1 -1
- package/dist/lib/services/export.service.d.ts +1 -1
- package/dist/lib/services/export.service.d.ts.map +1 -1
- package/dist/lib/services/export.service.js +13 -15
- package/dist/lib/services/export.service.js.map +1 -1
- package/dist/lib/services/mention-autocomplete.service.d.ts +1 -1
- package/dist/lib/services/mention-autocomplete.service.d.ts.map +1 -1
- package/dist/lib/services/mention-autocomplete.service.js +5 -5
- package/dist/lib/services/mention-autocomplete.service.js.map +1 -1
- package/dist/lib/services/mention-parser.service.d.ts +1 -1
- package/dist/lib/services/mention-parser.service.d.ts.map +1 -1
- package/dist/lib/services/mention-parser.service.js +16 -13
- package/dist/lib/services/mention-parser.service.js.map +1 -1
- package/dist/lib/services/search.service.d.ts +1 -1
- package/dist/lib/services/search.service.d.ts.map +1 -1
- package/dist/lib/services/search.service.js +32 -26
- package/dist/lib/services/search.service.js.map +1 -1
- package/dist/public-api.d.ts +3 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +3 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +14 -13
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { Metadata, RunView } from '@memberjunction/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
function ConversationMessageRatingComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
6
|
+
i0.ɵɵelementStart(0, "div", 5)(1, "span", 6);
|
|
7
|
+
i0.ɵɵtext(2);
|
|
8
|
+
i0.ɵɵelementEnd();
|
|
9
|
+
i0.ɵɵelementStart(3, "span", 7);
|
|
10
|
+
i0.ɵɵtext(4);
|
|
11
|
+
i0.ɵɵelementEnd();
|
|
12
|
+
i0.ɵɵelementStart(5, "span", 8);
|
|
13
|
+
i0.ɵɵtext(6);
|
|
14
|
+
i0.ɵɵelementEnd()();
|
|
15
|
+
} if (rf & 2) {
|
|
16
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
17
|
+
i0.ɵɵproperty("title", ctx_r0.getRatingsTooltip());
|
|
18
|
+
i0.ɵɵadvance();
|
|
19
|
+
i0.ɵɵclassProp("has-votes", ctx_r0.thumbsUpCount > 0);
|
|
20
|
+
i0.ɵɵadvance();
|
|
21
|
+
i0.ɵɵtextInterpolate1(" \uD83D\uDC4D ", ctx_r0.thumbsUpCount, " ");
|
|
22
|
+
i0.ɵɵadvance();
|
|
23
|
+
i0.ɵɵclassProp("has-votes", ctx_r0.thumbsDownCount > 0);
|
|
24
|
+
i0.ɵɵadvance();
|
|
25
|
+
i0.ɵɵtextInterpolate1(" \uD83D\uDC4E ", ctx_r0.thumbsDownCount, " ");
|
|
26
|
+
i0.ɵɵadvance(2);
|
|
27
|
+
i0.ɵɵtextInterpolate2("(", ctx_r0.totalRatings, " ", ctx_r0.totalRatings === 1 ? "rating" : "ratings", ")");
|
|
28
|
+
} }
|
|
29
|
+
/**
|
|
30
|
+
* Component for displaying and managing multi-user ratings on conversation messages.
|
|
31
|
+
* Shows aggregate ratings and allows users to provide their own rating.
|
|
32
|
+
*/
|
|
33
|
+
export class ConversationMessageRatingComponent {
|
|
34
|
+
conversationDetailId;
|
|
35
|
+
currentUser;
|
|
36
|
+
ratingsData; // Pre-loaded ratings from parent (RatingsJSON from query)
|
|
37
|
+
thumbsUpCount = 0;
|
|
38
|
+
thumbsDownCount = 0;
|
|
39
|
+
totalRatings = 0;
|
|
40
|
+
currentUserRating = null;
|
|
41
|
+
allRatings = [];
|
|
42
|
+
get currentUserId() {
|
|
43
|
+
return this.currentUser?.ID || '';
|
|
44
|
+
}
|
|
45
|
+
async ngOnInit() {
|
|
46
|
+
if (this.ratingsData) {
|
|
47
|
+
// Use pre-loaded ratings (no database query needed)
|
|
48
|
+
this.ProcessRatings(this.ratingsData);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
// Fallback to loading ratings if not provided
|
|
52
|
+
await this.LoadRatings();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Process ratings data (from query or API)
|
|
57
|
+
*/
|
|
58
|
+
ProcessRatings(ratings) {
|
|
59
|
+
this.allRatings = ratings;
|
|
60
|
+
this.thumbsUpCount = ratings.filter(r => r.Rating ? r.Rating >= 8 : false).length;
|
|
61
|
+
this.thumbsDownCount = ratings.filter(r => r.Rating ? r.Rating <= 3 : false).length;
|
|
62
|
+
this.totalRatings = ratings.length;
|
|
63
|
+
const currentUserRating = ratings.find(r => r.UserID === this.currentUserId);
|
|
64
|
+
this.currentUserRating = currentUserRating?.Rating ?? null;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get tooltip showing who rated this message
|
|
68
|
+
*/
|
|
69
|
+
getRatingsTooltip() {
|
|
70
|
+
if (this.allRatings.length === 0)
|
|
71
|
+
return '';
|
|
72
|
+
const thumbsUpUsers = this.allRatings
|
|
73
|
+
.filter(r => r.Rating ? r.Rating >= 8 : false)
|
|
74
|
+
.map(r => r.UserName || 'Unknown')
|
|
75
|
+
.join(', ');
|
|
76
|
+
const thumbsDownUsers = this.allRatings
|
|
77
|
+
.filter(r => r.Rating ? r.Rating <= 3 : false)
|
|
78
|
+
.map(r => r.UserName || 'Unknown')
|
|
79
|
+
.join(', ');
|
|
80
|
+
const parts = [];
|
|
81
|
+
if (thumbsUpUsers)
|
|
82
|
+
parts.push(`👍 ${thumbsUpUsers}`);
|
|
83
|
+
if (thumbsDownUsers)
|
|
84
|
+
parts.push(`👎 ${thumbsDownUsers}`);
|
|
85
|
+
return parts.join('\n');
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Load all ratings for this message (fallback if not pre-loaded)
|
|
89
|
+
*/
|
|
90
|
+
async LoadRatings() {
|
|
91
|
+
try {
|
|
92
|
+
const rv = new RunView();
|
|
93
|
+
const result = await rv.RunView({
|
|
94
|
+
EntityName: 'MJ: Conversation Detail Ratings',
|
|
95
|
+
ExtraFilter: `ConversationDetailID='${this.conversationDetailId}'`,
|
|
96
|
+
ResultType: 'entity_object'
|
|
97
|
+
});
|
|
98
|
+
if (!result.Success || !result.Results) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
this.ProcessRatings(result.Results);
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
console.error('Failed to load ratings:', error);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Rate message as thumbs up (10/10)
|
|
109
|
+
*/
|
|
110
|
+
async RateThumbsUp() {
|
|
111
|
+
await this.SaveRating(10);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Rate message as thumbs down (1/10)
|
|
115
|
+
*/
|
|
116
|
+
async RateThumbsDown() {
|
|
117
|
+
await this.SaveRating(1);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Save or update user's rating for this message
|
|
121
|
+
*/
|
|
122
|
+
async SaveRating(rating) {
|
|
123
|
+
try {
|
|
124
|
+
const md = new Metadata();
|
|
125
|
+
let ratingEntity;
|
|
126
|
+
// Try to load existing rating
|
|
127
|
+
const rv = new RunView();
|
|
128
|
+
const existing = await rv.RunView({
|
|
129
|
+
EntityName: 'MJ: Conversation Detail Ratings',
|
|
130
|
+
ExtraFilter: `ConversationDetailID='${this.conversationDetailId}' AND UserID='${this.currentUserId}'`,
|
|
131
|
+
MaxRows: 1,
|
|
132
|
+
ResultType: 'entity_object'
|
|
133
|
+
});
|
|
134
|
+
if (existing.Success && existing.Results && existing.Results.length > 0) {
|
|
135
|
+
// Update existing
|
|
136
|
+
ratingEntity = existing.Results[0];
|
|
137
|
+
// If clicking same rating, remove it (toggle off)
|
|
138
|
+
if (ratingEntity.Rating === rating) {
|
|
139
|
+
await ratingEntity.Delete();
|
|
140
|
+
await this.LoadRatings();
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
ratingEntity.Rating = rating;
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
// Create new
|
|
147
|
+
ratingEntity = await md.GetEntityObject('MJ: Conversation Detail Ratings');
|
|
148
|
+
ratingEntity.ConversationDetailID = this.conversationDetailId;
|
|
149
|
+
ratingEntity.UserID = this.currentUserId;
|
|
150
|
+
ratingEntity.Rating = rating;
|
|
151
|
+
}
|
|
152
|
+
await ratingEntity.Save();
|
|
153
|
+
await this.LoadRatings();
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
console.error('Failed to save rating:', error);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
static ɵfac = function ConversationMessageRatingComponent_Factory(t) { return new (t || ConversationMessageRatingComponent)(); };
|
|
160
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConversationMessageRatingComponent, selectors: [["mj-conversation-message-rating"]], inputs: { conversationDetailId: "conversationDetailId", currentUser: "currentUser", ratingsData: "ratingsData" }, decls: 7, vars: 7, consts: [[1, "rating-container"], ["class", "aggregate-rating", 3, "title", 4, "ngIf"], [1, "user-rating"], ["title", "This was helpful", "type", "button", 1, "rating-button", "thumbs-up-btn", 3, "click"], ["title", "This was not helpful", "type", "button", 1, "rating-button", "thumbs-down-btn", 3, "click"], [1, "aggregate-rating", 3, "title"], [1, "thumbs-up"], [1, "thumbs-down"], [1, "total-count"]], template: function ConversationMessageRatingComponent_Template(rf, ctx) { if (rf & 1) {
|
|
161
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
162
|
+
i0.ɵɵtemplate(1, ConversationMessageRatingComponent_div_1_Template, 7, 9, "div", 1);
|
|
163
|
+
i0.ɵɵelementStart(2, "div", 2)(3, "button", 3);
|
|
164
|
+
i0.ɵɵlistener("click", function ConversationMessageRatingComponent_Template_button_click_3_listener() { return ctx.RateThumbsUp(); });
|
|
165
|
+
i0.ɵɵtext(4, " \uD83D\uDC4D ");
|
|
166
|
+
i0.ɵɵelementEnd();
|
|
167
|
+
i0.ɵɵelementStart(5, "button", 4);
|
|
168
|
+
i0.ɵɵlistener("click", function ConversationMessageRatingComponent_Template_button_click_5_listener() { return ctx.RateThumbsDown(); });
|
|
169
|
+
i0.ɵɵtext(6, " \uD83D\uDC4E ");
|
|
170
|
+
i0.ɵɵelementEnd()()();
|
|
171
|
+
} if (rf & 2) {
|
|
172
|
+
i0.ɵɵadvance();
|
|
173
|
+
i0.ɵɵproperty("ngIf", ctx.totalRatings > 0);
|
|
174
|
+
i0.ɵɵadvance();
|
|
175
|
+
i0.ɵɵclassProp("has-rated", ctx.currentUserRating != null);
|
|
176
|
+
i0.ɵɵadvance();
|
|
177
|
+
i0.ɵɵclassProp("active", ctx.currentUserRating != null && ctx.currentUserRating >= 8);
|
|
178
|
+
i0.ɵɵadvance(2);
|
|
179
|
+
i0.ɵɵclassProp("active", ctx.currentUserRating != null && ctx.currentUserRating <= 3);
|
|
180
|
+
} }, dependencies: [i1.NgIf], styles: [".rating-container[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 4px 0;\n }\n\n .aggregate-rating[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: #666;\n }\n\n .thumbs-up[_ngcontent-%COMP%], .thumbs-down[_ngcontent-%COMP%] {\n opacity: 0.5;\n }\n\n .thumbs-up.has-votes[_ngcontent-%COMP%], .thumbs-down.has-votes[_ngcontent-%COMP%] {\n opacity: 1;\n }\n\n .total-count[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #999;\n }\n\n .user-rating[_ngcontent-%COMP%] {\n display: flex;\n gap: 4px;\n margin-left: auto;\n }\n\n .rating-button[_ngcontent-%COMP%] {\n background: white;\n border: 1px solid #9CA3AF;\n border-radius: 6px;\n padding: 6px 10px;\n cursor: pointer;\n font-size: 16px;\n opacity: 0.6;\n transition: all 0.2s;\n min-width: 36px;\n }\n\n .rating-button[_ngcontent-%COMP%]:hover {\n opacity: 1;\n border-color: #6B7280;\n }\n\n .rating-button.active[_ngcontent-%COMP%] {\n opacity: 1;\n }\n\n .thumbs-up-btn[_ngcontent-%COMP%] {\n color: #16A34A;\n }\n\n .thumbs-up-btn[_ngcontent-%COMP%]:hover {\n background: #F0FDF4;\n }\n\n .thumbs-up-btn.active[_ngcontent-%COMP%] {\n border-color: #16A34A;\n background: #DCFCE7;\n }\n\n .thumbs-down-btn[_ngcontent-%COMP%] {\n color: #DC2626;\n }\n\n .thumbs-down-btn[_ngcontent-%COMP%]:hover {\n background: #FEF2F2;\n }\n\n .thumbs-down-btn.active[_ngcontent-%COMP%] {\n border-color: #DC2626;\n background: #FEE2E2;\n }"] });
|
|
181
|
+
}
|
|
182
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConversationMessageRatingComponent, [{
|
|
183
|
+
type: Component,
|
|
184
|
+
args: [{ selector: 'mj-conversation-message-rating', template: `
|
|
185
|
+
<div class="rating-container">
|
|
186
|
+
<div class="aggregate-rating" *ngIf="totalRatings > 0" [title]="getRatingsTooltip()">
|
|
187
|
+
<span class="thumbs-up" [class.has-votes]="thumbsUpCount > 0">
|
|
188
|
+
👍 {{ thumbsUpCount }}
|
|
189
|
+
</span>
|
|
190
|
+
<span class="thumbs-down" [class.has-votes]="thumbsDownCount > 0">
|
|
191
|
+
👎 {{ thumbsDownCount }}
|
|
192
|
+
</span>
|
|
193
|
+
<span class="total-count">({{ totalRatings }} {{ totalRatings === 1 ? 'rating' : 'ratings' }})</span>
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
<div class="user-rating" [class.has-rated]="currentUserRating != null">
|
|
197
|
+
<button
|
|
198
|
+
class="rating-button thumbs-up-btn"
|
|
199
|
+
[class.active]="currentUserRating != null && currentUserRating >= 8"
|
|
200
|
+
(click)="RateThumbsUp()"
|
|
201
|
+
title="This was helpful"
|
|
202
|
+
type="button">
|
|
203
|
+
👍
|
|
204
|
+
</button>
|
|
205
|
+
<button
|
|
206
|
+
class="rating-button thumbs-down-btn"
|
|
207
|
+
[class.active]="currentUserRating != null && currentUserRating <= 3"
|
|
208
|
+
(click)="RateThumbsDown()"
|
|
209
|
+
title="This was not helpful"
|
|
210
|
+
type="button">
|
|
211
|
+
👎
|
|
212
|
+
</button>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
`, styles: ["\n .rating-container {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 4px 0;\n }\n\n .aggregate-rating {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: #666;\n }\n\n .thumbs-up, .thumbs-down {\n opacity: 0.5;\n }\n\n .thumbs-up.has-votes, .thumbs-down.has-votes {\n opacity: 1;\n }\n\n .total-count {\n font-size: 12px;\n color: #999;\n }\n\n .user-rating {\n display: flex;\n gap: 4px;\n margin-left: auto;\n }\n\n .rating-button {\n background: white;\n border: 1px solid #9CA3AF;\n border-radius: 6px;\n padding: 6px 10px;\n cursor: pointer;\n font-size: 16px;\n opacity: 0.6;\n transition: all 0.2s;\n min-width: 36px;\n }\n\n .rating-button:hover {\n opacity: 1;\n border-color: #6B7280;\n }\n\n .rating-button.active {\n opacity: 1;\n }\n\n .thumbs-up-btn {\n color: #16A34A;\n }\n\n .thumbs-up-btn:hover {\n background: #F0FDF4;\n }\n\n .thumbs-up-btn.active {\n border-color: #16A34A;\n background: #DCFCE7;\n }\n\n .thumbs-down-btn {\n color: #DC2626;\n }\n\n .thumbs-down-btn:hover {\n background: #FEF2F2;\n }\n\n .thumbs-down-btn.active {\n border-color: #DC2626;\n background: #FEE2E2;\n }\n "] }]
|
|
216
|
+
}], null, { conversationDetailId: [{
|
|
217
|
+
type: Input
|
|
218
|
+
}], currentUser: [{
|
|
219
|
+
type: Input
|
|
220
|
+
}], ratingsData: [{
|
|
221
|
+
type: Input
|
|
222
|
+
}] }); })();
|
|
223
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationMessageRatingComponent, { className: "ConversationMessageRatingComponent", filePath: "src/lib/components/message/conversation-message-rating.component.ts", lineNumber: 127 }); })();
|
|
224
|
+
//# sourceMappingURL=conversation-message-rating.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-message-rating.component.js","sourceRoot":"","sources":["../../../../src/lib/components/message/conversation-message-rating.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAY,MAAM,sBAA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AAS,oBAAgB,IAAC;YAG1B,8BACJ;YAER,AADI,AADI,iBAAS,EACP,EACJ;;YA5B6B,cAAsB;YAAtB,2CAAsB;YAU5B,cAA6C;YAA7C,0DAA6C;YAG9D,cAAoE;YAApE,qFAAoE;YAQpE,eAAoE;YAApE,qFAAoE;;;iFA4F3E,kCAAkC;cArH9C,SAAS;2BACI,gCAAgC,YAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+BT;gBAqFQ,oBAAoB;kBAA5B,KAAK;YACG,WAAW;kBAAnB,KAAK;YACG,WAAW;kBAAnB,KAAK;;kFAHG,kCAAkC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter, ElementRef, OnInit, AfterViewInit, OnDestroy } from '@angular/core';
|
|
2
|
-
import { UserInfo } from '@memberjunction/
|
|
2
|
+
import { UserInfo } from '@memberjunction/core';
|
|
3
3
|
import { MentionAutocompleteService, MentionSuggestion } from '../../services/mention-autocomplete.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
@@ -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,
|
|
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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|
}
|
|
53
53
|
async ngOnInit() {
|
|
54
54
|
// Initialize mention autocomplete if enabled and currentUser is available
|
|
55
|
-
console.log('[MessageInputBox] ngOnInit - enableMentions:', this.enableMentions, 'currentUser:', !!this.currentUser);
|
|
56
55
|
if (this.enableMentions && this.currentUser) {
|
|
57
56
|
await this.mentionAutocomplete.initialize(this.currentUser);
|
|
58
|
-
console.log('[MessageInputBox] Mention autocomplete initialized');
|
|
59
57
|
}
|
|
60
58
|
}
|
|
61
59
|
ngAfterViewInit() {
|
|
@@ -87,7 +85,6 @@ export class MessageInputBoxComponent {
|
|
|
87
85
|
const textarea = event.target;
|
|
88
86
|
this.value = textarea.value;
|
|
89
87
|
this.valueChange.emit(this.value);
|
|
90
|
-
console.log('[MessageInputBox] onInput - value:', this.value, 'enableMentions:', this.enableMentions, 'currentUser:', !!this.currentUser);
|
|
91
88
|
// Handle @mention autocomplete
|
|
92
89
|
if (this.enableMentions && this.currentUser) {
|
|
93
90
|
this.handleMentionInput();
|
|
@@ -96,7 +93,6 @@ export class MessageInputBoxComponent {
|
|
|
96
93
|
onSendClick() {
|
|
97
94
|
if (this.canSend) {
|
|
98
95
|
const textToSend = this.value.trim();
|
|
99
|
-
console.log('[MessageInputBox] onSendClick - emitting text:', textToSend);
|
|
100
96
|
this.textSubmitted.emit(textToSend);
|
|
101
97
|
this.value = ''; // Clear input after sending
|
|
102
98
|
this.valueChange.emit(this.value);
|
|
@@ -109,12 +105,10 @@ export class MessageInputBoxComponent {
|
|
|
109
105
|
handleMentionInput() {
|
|
110
106
|
const textarea = this.messageTextarea?.nativeElement;
|
|
111
107
|
if (!textarea) {
|
|
112
|
-
console.log('[MessageInputBox] No textarea element');
|
|
113
108
|
return;
|
|
114
109
|
}
|
|
115
110
|
const cursorPos = textarea.selectionStart;
|
|
116
111
|
const textBeforeCursor = this.value.substring(0, cursorPos);
|
|
117
|
-
console.log('[MessageInputBox] handleMentionInput - textBeforeCursor:', textBeforeCursor);
|
|
118
112
|
// Find the last @ before cursor
|
|
119
113
|
const lastAtIndex = textBeforeCursor.lastIndexOf('@');
|
|
120
114
|
if (lastAtIndex === -1) {
|
|
@@ -130,14 +124,11 @@ export class MessageInputBoxComponent {
|
|
|
130
124
|
// Extract query
|
|
131
125
|
this.mentionQuery = textAfterAt;
|
|
132
126
|
this.mentionStartIndex = lastAtIndex;
|
|
133
|
-
console.log('[MessageInputBox] Mention detected - query:', this.mentionQuery);
|
|
134
127
|
// Get suggestions (include users if we have currentUser)
|
|
135
128
|
this.mentionSuggestions = this.mentionAutocomplete.getSuggestions(this.mentionQuery, !!this.currentUser);
|
|
136
|
-
console.log('[MessageInputBox] Got suggestions:', this.mentionSuggestions.length, this.mentionSuggestions);
|
|
137
129
|
if (this.mentionSuggestions.length > 0) {
|
|
138
130
|
this.showMentionDropdown = true;
|
|
139
131
|
this.positionMentionDropdown();
|
|
140
|
-
console.log('[MessageInputBox] Showing dropdown at position:', this.mentionDropdownPosition);
|
|
141
132
|
}
|
|
142
133
|
else {
|
|
143
134
|
this.closeMentionDropdown();
|
|
@@ -162,17 +153,16 @@ export class MessageInputBoxComponent {
|
|
|
162
153
|
// Show above the textarea - anchor to top of textarea
|
|
163
154
|
this.mentionDropdownPosition = {
|
|
164
155
|
top: textareaRect.top + window.scrollY - 4,
|
|
165
|
-
left: textareaRect.left + window.scrollX
|
|
156
|
+
left: textareaRect.left + window.scrollX
|
|
166
157
|
};
|
|
167
158
|
}
|
|
168
159
|
else {
|
|
169
160
|
// Show below the textarea (default) - anchor to bottom of textarea
|
|
170
161
|
this.mentionDropdownPosition = {
|
|
171
162
|
top: textareaRect.bottom + window.scrollY + 4,
|
|
172
|
-
left: textareaRect.left + window.scrollX
|
|
163
|
+
left: textareaRect.left + window.scrollX
|
|
173
164
|
};
|
|
174
165
|
}
|
|
175
|
-
console.log('[MessageInputBox] Dropdown position calculated (viewport coords):', this.mentionDropdownPosition, 'showAbove:', this.mentionDropdownShowAbove);
|
|
176
166
|
}
|
|
177
167
|
/**
|
|
178
168
|
* Insert selected mention into text
|
|
@@ -236,11 +226,11 @@ export class MessageInputBoxComponent {
|
|
|
236
226
|
i0.ɵɵproperty("disabled", !ctx.canSend);
|
|
237
227
|
i0.ɵɵadvance(2);
|
|
238
228
|
i0.ɵɵproperty("ngIf", ctx.showMentionDropdown && ctx.enableMentions);
|
|
239
|
-
} }, 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\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
|
|
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}"] });
|
|
240
230
|
}
|
|
241
231
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MessageInputBoxComponent, [{
|
|
242
232
|
type: Component,
|
|
243
|
-
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\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
|
|
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"] }]
|
|
244
234
|
}], () => [{ type: i1.MentionAutocompleteService }], { placeholder: [{
|
|
245
235
|
type: Input
|
|
246
236
|
}], disabled: [{
|
|
@@ -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;
|
|
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,uBAAuB,GAAkC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAC7E,wBAAwB,GAAY,KAAK,CAAC;IACzC,iBAAiB,GAAW,CAAC,CAAC,CAAC;IAC/B,YAAY,GAAW,EAAE,CAAC;IAElC,YACU,mBAA+C;QAA/C,wBAAmB,GAAnB,mBAAmB,CAA4B;IACtD,CAAC;IAEJ,KAAK,CAAC,QAAQ;QACZ,0EAA0E;QAC1E,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YAC5C,MAAM,IAAI,CAAC,mBAAmB,C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wB;;;;;;;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,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnInit, OnDestroy, OnChanges, SimpleChanges, AfterViewInit } from '@angular/core';
|
|
2
|
-
import { UserInfo } from '@memberjunction/
|
|
3
|
-
import { ConversationDetailEntity, AIAgentEntityExtended } from '@memberjunction/core-entities';
|
|
2
|
+
import { UserInfo } from '@memberjunction/core';
|
|
3
|
+
import { ConversationDetailEntity, AIAgentEntityExtended, AIAgentRunEntityExtended } from '@memberjunction/core-entities';
|
|
4
4
|
import { DialogService } from '../../services/dialog.service';
|
|
5
5
|
import { ToastService } from '../../services/toast.service';
|
|
6
6
|
import { ConversationAgentService } from '../../services/conversation-agent.service';
|
|
@@ -10,6 +10,7 @@ import { ActiveTasksService } from '../../services/active-tasks.service';
|
|
|
10
10
|
import { BaseAgentSuggestedResponse } from '@memberjunction/ai-core-plus';
|
|
11
11
|
import { MentionAutocompleteService } from '../../services/mention-autocomplete.service';
|
|
12
12
|
import { MentionParserService } from '../../services/mention-parser.service';
|
|
13
|
+
import { LazyArtifactInfo } from '../../models/lazy-artifact-info';
|
|
13
14
|
import * as i0 from "@angular/core";
|
|
14
15
|
export declare class MessageInputComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit {
|
|
15
16
|
private dialogService;
|
|
@@ -22,12 +23,16 @@ export declare class MessageInputComponent implements OnInit, OnDestroy, OnChang
|
|
|
22
23
|
private mentionAutocomplete;
|
|
23
24
|
private readonly JSON_ARTIFACT_TYPE_ID;
|
|
24
25
|
conversationId: string;
|
|
26
|
+
conversationName?: string | null;
|
|
25
27
|
currentUser: UserInfo;
|
|
26
28
|
disabled: boolean;
|
|
27
29
|
placeholder: string;
|
|
28
30
|
parentMessageId?: string;
|
|
29
31
|
conversationHistory: ConversationDetailEntity[];
|
|
30
32
|
initialMessage: string | null;
|
|
33
|
+
artifactsByDetailId?: Map<string, LazyArtifactInfo[]>;
|
|
34
|
+
agentRunsByDetailId?: Map<string, AIAgentRunEntityExtended>;
|
|
35
|
+
inProgressMessageIds?: string[];
|
|
31
36
|
messageSent: EventEmitter<ConversationDetailEntity>;
|
|
32
37
|
agentResponse: EventEmitter<{
|
|
33
38
|
message: ConversationDetailEntity;
|
|
@@ -78,6 +83,14 @@ export declare class MessageInputComponent implements OnInit, OnDestroy, OnChang
|
|
|
78
83
|
* Focus the message input textarea
|
|
79
84
|
*/
|
|
80
85
|
private focusInput;
|
|
86
|
+
/**
|
|
87
|
+
* Reconnect to in-progress messages for streaming updates
|
|
88
|
+
* This is called when:
|
|
89
|
+
* 1. Component initializes (ngOnInit)
|
|
90
|
+
* 2. Conversation changes (ngOnChanges)
|
|
91
|
+
* 3. User returns to a conversation with in-progress messages
|
|
92
|
+
*/
|
|
93
|
+
private reconnectInProgressMessages;
|
|
81
94
|
/**
|
|
82
95
|
* Subscribe to PubSub for real-time task orchestration progress updates
|
|
83
96
|
*/
|
|
@@ -207,6 +220,8 @@ export declare class MessageInputComponent implements OnInit, OnDestroy, OnChang
|
|
|
207
220
|
/**
|
|
208
221
|
* Continue with the same agent from previous message (implicit continuation)
|
|
209
222
|
* Bypasses Sage - no status messages
|
|
223
|
+
*
|
|
224
|
+
* @param targetArtifactVersionId Optional specific artifact version to use as payload (from intent check)
|
|
210
225
|
*/
|
|
211
226
|
private continueWithAgent;
|
|
212
227
|
/**
|
|
@@ -223,6 +238,6 @@ export declare class MessageInputComponent implements OnInit, OnDestroy, OnChang
|
|
|
223
238
|
*/
|
|
224
239
|
private cleanupCompletionTimestamp;
|
|
225
240
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputComponent, never>;
|
|
226
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "mj-message-input", never, { "conversationId": { "alias": "conversationId"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "parentMessageId": { "alias": "parentMessageId"; "required": false; }; "conversationHistory": { "alias": "conversationHistory"; "required": false; }; "initialMessage": { "alias": "initialMessage"; "required": false; }; }, { "messageSent": "messageSent"; "agentResponse": "agentResponse"; "agentRunDetected": "agentRunDetected"; "agentRunUpdate": "agentRunUpdate"; "messageComplete": "messageComplete"; "artifactCreated": "artifactCreated"; "conversationRenamed": "conversationRenamed"; "intentCheckStarted": "intentCheckStarted"; "intentCheckCompleted": "intentCheckCompleted"; }, never, never, false, never>;
|
|
241
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "mj-message-input", never, { "conversationId": { "alias": "conversationId"; "required": false; }; "conversationName": { "alias": "conversationName"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "parentMessageId": { "alias": "parentMessageId"; "required": false; }; "conversationHistory": { "alias": "conversationHistory"; "required": false; }; "initialMessage": { "alias": "initialMessage"; "required": false; }; "artifactsByDetailId": { "alias": "artifactsByDetailId"; "required": false; }; "agentRunsByDetailId": { "alias": "agentRunsByDetailId"; "required": false; }; "inProgressMessageIds": { "alias": "inProgressMessageIds"; "required": false; }; }, { "messageSent": "messageSent"; "agentResponse": "agentResponse"; "agentRunDetected": "agentRunDetected"; "agentRunUpdate": "agentRunUpdate"; "messageComplete": "messageComplete"; "artifactCreated": "artifactCreated"; "conversationRenamed": "conversationRenamed"; "intentCheckStarted": "intentCheckStarted"; "intentCheckCompleted": "intentCheckCompleted"; }, never, never, false, never>;
|
|
227
242
|
}
|
|
228
243
|
//# sourceMappingURL=message-input.component.d.ts.map
|
|
@@ -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,
|
|
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,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC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