@propmix/profet-common-header 3.0.15-utility-unstable.4 → 3.0.15-utility-unstable.6
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/esm2020/lib/api-endpoints.def.mjs +3 -2
- package/esm2020/lib/api-gateway.service.mjs +5 -13
- package/esm2020/lib/appraisal-assistant/appraisal-assistant-chat-widget.component.mjs +179 -0
- package/esm2020/lib/appraisal-assistant/appraisal-assistant.interface.mjs +2 -0
- package/esm2020/lib/closable.mixin.mjs +14 -0
- package/esm2020/lib/common-header.interface.mjs +1 -1
- package/esm2020/lib/common-header.service.mjs +28 -1
- package/esm2020/lib/header/header.component.mjs +44 -11
- package/esm2020/lib/utility-widget-config.token.mjs +3 -0
- package/esm2020/lib/utils/chat-time.pipe.mjs +35 -0
- package/esm2020/lib/utils/text-to-html.pipe.mjs +42 -0
- package/fesm2015/propmix-profet-common-header-appraisal-assistant-chat-widget.component-56a1672f.mjs +281 -0
- package/fesm2015/propmix-profet-common-header-appraisal-assistant-chat-widget.component-56a1672f.mjs.map +1 -0
- package/fesm2015/propmix-profet-common-header.mjs +83 -24
- package/fesm2015/propmix-profet-common-header.mjs.map +1 -1
- package/fesm2020/propmix-profet-common-header-appraisal-assistant-chat-widget.component-8816b836.mjs +276 -0
- package/fesm2020/propmix-profet-common-header-appraisal-assistant-chat-widget.component-8816b836.mjs.map +1 -0
- package/fesm2020/propmix-profet-common-header.mjs +77 -24
- package/fesm2020/propmix-profet-common-header.mjs.map +1 -1
- package/lib/api-endpoints.def.d.ts +1 -0
- package/lib/api-gateway.service.d.ts +2 -1
- package/lib/appraisal-assistant/appraisal-assistant-chat-widget.component.d.ts +37 -0
- package/lib/appraisal-assistant/appraisal-assistant.interface.d.ts +4 -0
- package/lib/closable.mixin.d.ts +7 -0
- package/lib/common-header.interface.d.ts +12 -2
- package/lib/common-header.service.d.ts +4 -0
- package/lib/header/header.component.d.ts +10 -4
- package/lib/utility-widget-config.token.d.ts +2 -0
- package/lib/utils/chat-time.pipe.d.ts +7 -0
- package/lib/utils/text-to-html.pipe.d.ts +21 -0
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class ChatTimePipe {
|
|
4
|
+
transform(value) {
|
|
5
|
+
const date = new Date(value);
|
|
6
|
+
const now = new Date();
|
|
7
|
+
const isToday = date.getDate() === now.getDate() &&
|
|
8
|
+
date.getMonth() === now.getMonth() &&
|
|
9
|
+
date.getFullYear() === now.getFullYear();
|
|
10
|
+
const timeString = date.toLocaleTimeString([], {
|
|
11
|
+
hour: '2-digit',
|
|
12
|
+
minute: '2-digit',
|
|
13
|
+
hour12: true,
|
|
14
|
+
});
|
|
15
|
+
if (isToday) {
|
|
16
|
+
return timeString;
|
|
17
|
+
}
|
|
18
|
+
const dateString = date.toLocaleDateString([], {
|
|
19
|
+
year: 'numeric',
|
|
20
|
+
month: 'short',
|
|
21
|
+
day: 'numeric',
|
|
22
|
+
});
|
|
23
|
+
return `${dateString} ${timeString}`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
ChatTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
27
|
+
ChatTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ChatTimePipe, isStandalone: true, name: "chatTime" });
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatTimePipe, decorators: [{
|
|
29
|
+
type: Pipe,
|
|
30
|
+
args: [{
|
|
31
|
+
name: 'chatTime',
|
|
32
|
+
standalone: true
|
|
33
|
+
}]
|
|
34
|
+
}] });
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ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RpbWVTdHJpbmc7XG4gICAgfVxuXG4gICAgY29uc3QgZGF0ZVN0cmluZyA9IGRhdGUudG9Mb2NhbGVEYXRlU3RyaW5nKFtdLCB7XG4gICAgICB5ZWFyOiAnbnVtZXJpYycsXG4gICAgICBtb250aDogJ3Nob3J0JywgLy8gbGlrZSBcIk1heVwiXG4gICAgICBkYXk6ICdudW1lcmljJyxcbiAgICB9KTtcblxuICAgIHJldHVybiBgJHtkYXRlU3RyaW5nfSAke3RpbWVTdHJpbmd9YDtcbiAgfVxuXG59XG4iXX0=
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/platform-browser";
|
|
4
|
+
/**
|
|
5
|
+
* Pipe to convert text with special characters to HTML.
|
|
6
|
+
* It replaces:
|
|
7
|
+
* - \n with <br>
|
|
8
|
+
* - \t with  
|
|
9
|
+
* - \' with '
|
|
10
|
+
* - \" with "
|
|
11
|
+
* - \\ with \
|
|
12
|
+
* - **text** with <strong>text</strong>
|
|
13
|
+
* - _text_ with <em>text</em>
|
|
14
|
+
*/
|
|
15
|
+
export class TextToHtmlPipe {
|
|
16
|
+
constructor(sanitizer) {
|
|
17
|
+
this.sanitizer = sanitizer;
|
|
18
|
+
}
|
|
19
|
+
transform(value) {
|
|
20
|
+
if (!value)
|
|
21
|
+
return '';
|
|
22
|
+
let html = value
|
|
23
|
+
.replace(/\\n|\n/g, '<br>')
|
|
24
|
+
.replace(/\\t|\t/g, ' ');
|
|
25
|
+
// .replace(/\\'/g, `'`)
|
|
26
|
+
// .replace(/\\"/g, '"')
|
|
27
|
+
// .replace(/\\\\/g, `\\`)
|
|
28
|
+
// .replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>')
|
|
29
|
+
// .replace(/_(.+?)_/g, '<em>$1</em>');
|
|
30
|
+
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
TextToHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TextToHtmlPipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
34
|
+
TextToHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TextToHtmlPipe, isStandalone: true, name: "textToHtml" });
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TextToHtmlPipe, decorators: [{
|
|
36
|
+
type: Pipe,
|
|
37
|
+
args: [{
|
|
38
|
+
name: 'textToHtml',
|
|
39
|
+
standalone: true
|
|
40
|
+
}]
|
|
41
|
+
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dC10by1odG1sLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21tb24taGVhZGVyL3NyYy9saWIvdXRpbHMvdGV4dC10by1odG1sLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7OztBQUdwRDs7Ozs7Ozs7OztHQVVHO0FBTUgsTUFBTSxPQUFPLGNBQWM7SUFFekIsWUFBb0IsU0FBdUI7UUFBdkIsY0FBUyxHQUFULFNBQVMsQ0FBYztJQUFJLENBQUM7SUFFaEQsU0FBUyxDQUFDLEtBQWE7UUFDckIsSUFBSSxDQUFDLEtBQUs7WUFBRSxPQUFPLEVBQUUsQ0FBQztRQUV0QixJQUFJLElBQUksR0FBRyxLQUFLO2FBQ2IsT0FBTyxDQUFDLFNBQVMsRUFBRSxNQUFNLENBQUM7YUFD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25zdHJ1Y3Rvcihwcml2YXRlIHNhbml0aXplcjogRG9tU2FuaXRpemVyKSB7IH1cblxuICB0cmFuc2Zvcm0odmFsdWU6IHN0cmluZyk6IFNhZmVIdG1sIHtcbiAgICBpZiAoIXZhbHVlKSByZXR1cm4gJyc7XG5cbiAgICBsZXQgaHRtbCA9IHZhbHVlXG4gICAgICAucmVwbGFjZSgvXFxcXG58XFxuL2csICc8YnI+JylcbiAgICAgIC5yZXBsYWNlKC9cXFxcdHxcXHQvZywgJyZlbXNwOycpXG4gICAgLy8gLnJlcGxhY2UoL1xcXFwnL2csIGAnYClcbiAgICAvLyAucmVwbGFjZSgvXFxcXFwiL2csICdcIicpXG4gICAgLy8gLnJlcGxhY2UoL1xcXFxcXFxcL2csIGBcXFxcYClcbiAgICAvLyAucmVwbGFjZSgvXFwqXFwqKC4rPylcXCpcXCovZywgJzxzdHJvbmc+JDE8L3N0cm9uZz4nKVxuICAgIC8vIC5yZXBsYWNlKC9fKC4rPylfL2csICc8ZW0+JDE8L2VtPicpO1xuXG4gICAgcmV0dXJuIHRoaXMuc2FuaXRpemVyLmJ5cGFzc1NlY3VyaXR5VHJ1c3RIdG1sKGh0bWwpO1xuICB9XG5cbn1cbiJdfQ==
|
package/fesm2015/propmix-profet-common-header-appraisal-assistant-chat-widget.component-56a1672f.mjs
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import * as i1$1 from '@angular/common';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { inject, Pipe, Component, ViewChild, ViewChildren } from '@angular/core';
|
|
5
|
+
import * as i3$1 from '@angular/forms';
|
|
6
|
+
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import * as i4 from '@angular/material/button';
|
|
8
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
9
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
10
|
+
import * as i3 from '@angular/material/icon';
|
|
11
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
12
|
+
import { MatInputModule } from '@angular/material/input';
|
|
13
|
+
import * as i5 from '@angular/material/progress-spinner';
|
|
14
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
15
|
+
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
16
|
+
import * as i7 from '@angular/material/tooltip';
|
|
17
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
18
|
+
import { CommonHeaderService } from './propmix-profet-common-header.mjs';
|
|
19
|
+
import * as i1 from '@angular/platform-browser';
|
|
20
|
+
import '@angular/common/http';
|
|
21
|
+
import '@angular/material/dialog';
|
|
22
|
+
import 'rxjs';
|
|
23
|
+
import '@angular/material/divider';
|
|
24
|
+
import '@angular/material/list';
|
|
25
|
+
import '@angular/material/menu';
|
|
26
|
+
import '@angular/material/select';
|
|
27
|
+
import '@angular/material/snack-bar';
|
|
28
|
+
import '@angular/material/toolbar';
|
|
29
|
+
import 'tslib';
|
|
30
|
+
import '@angular/router';
|
|
31
|
+
import 'aws-amplify/auth';
|
|
32
|
+
import '@angular/material/core';
|
|
33
|
+
|
|
34
|
+
function WithClosable(Base) {
|
|
35
|
+
return class extends Base {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(...arguments);
|
|
38
|
+
this._ser = inject(CommonHeaderService);
|
|
39
|
+
}
|
|
40
|
+
close() {
|
|
41
|
+
this._ser.toggleUtilityContentDrawer();
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
class ChatTimePipe {
|
|
47
|
+
transform(value) {
|
|
48
|
+
const date = new Date(value);
|
|
49
|
+
const now = new Date();
|
|
50
|
+
const isToday = date.getDate() === now.getDate() &&
|
|
51
|
+
date.getMonth() === now.getMonth() &&
|
|
52
|
+
date.getFullYear() === now.getFullYear();
|
|
53
|
+
const timeString = date.toLocaleTimeString([], {
|
|
54
|
+
hour: '2-digit',
|
|
55
|
+
minute: '2-digit',
|
|
56
|
+
hour12: true,
|
|
57
|
+
});
|
|
58
|
+
if (isToday) {
|
|
59
|
+
return timeString;
|
|
60
|
+
}
|
|
61
|
+
const dateString = date.toLocaleDateString([], {
|
|
62
|
+
year: 'numeric',
|
|
63
|
+
month: 'short',
|
|
64
|
+
day: 'numeric',
|
|
65
|
+
});
|
|
66
|
+
return `${dateString} ${timeString}`;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
ChatTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
70
|
+
ChatTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ChatTimePipe, isStandalone: true, name: "chatTime" });
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatTimePipe, decorators: [{
|
|
72
|
+
type: Pipe,
|
|
73
|
+
args: [{
|
|
74
|
+
name: 'chatTime',
|
|
75
|
+
standalone: true
|
|
76
|
+
}]
|
|
77
|
+
}] });
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Pipe to convert text with special characters to HTML.
|
|
81
|
+
* It replaces:
|
|
82
|
+
* - \n with <br>
|
|
83
|
+
* - \t with  
|
|
84
|
+
* - \' with '
|
|
85
|
+
* - \" with "
|
|
86
|
+
* - \\ with \
|
|
87
|
+
* - **text** with <strong>text</strong>
|
|
88
|
+
* - _text_ with <em>text</em>
|
|
89
|
+
*/
|
|
90
|
+
class TextToHtmlPipe {
|
|
91
|
+
constructor(sanitizer) {
|
|
92
|
+
this.sanitizer = sanitizer;
|
|
93
|
+
}
|
|
94
|
+
transform(value) {
|
|
95
|
+
if (!value)
|
|
96
|
+
return '';
|
|
97
|
+
let html = value
|
|
98
|
+
.replace(/\\n|\n/g, '<br>')
|
|
99
|
+
.replace(/\\t|\t/g, ' ');
|
|
100
|
+
// .replace(/\\'/g, `'`)
|
|
101
|
+
// .replace(/\\"/g, '"')
|
|
102
|
+
// .replace(/\\\\/g, `\\`)
|
|
103
|
+
// .replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>')
|
|
104
|
+
// .replace(/_(.+?)_/g, '<em>$1</em>');
|
|
105
|
+
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
TextToHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TextToHtmlPipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
109
|
+
TextToHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TextToHtmlPipe, isStandalone: true, name: "textToHtml" });
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TextToHtmlPipe, decorators: [{
|
|
111
|
+
type: Pipe,
|
|
112
|
+
args: [{
|
|
113
|
+
name: 'textToHtml',
|
|
114
|
+
standalone: true
|
|
115
|
+
}]
|
|
116
|
+
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
|
|
117
|
+
|
|
118
|
+
class EmptyBase {
|
|
119
|
+
}
|
|
120
|
+
class AppraisalAssistantChatWidgetComponent extends WithClosable(class {
|
|
121
|
+
}) {
|
|
122
|
+
constructor() {
|
|
123
|
+
super(...arguments);
|
|
124
|
+
this.isOpen = false;
|
|
125
|
+
this.message = '';
|
|
126
|
+
this.messages = [];
|
|
127
|
+
this.isLoading = false;
|
|
128
|
+
this.conversationId = '';
|
|
129
|
+
this.msgControl = new FormControl('');
|
|
130
|
+
this._chatSer = inject(CommonHeaderService);
|
|
131
|
+
this.shouldScroll = false;
|
|
132
|
+
this.welcomeMessage = '';
|
|
133
|
+
}
|
|
134
|
+
ngOnInit() {
|
|
135
|
+
if ((this.messages.length === 0)) {
|
|
136
|
+
this.sendMessage();
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
ngAfterViewChecked() {
|
|
140
|
+
if (this.shouldScroll) {
|
|
141
|
+
setTimeout(() => {
|
|
142
|
+
this.scrollToLastMessage();
|
|
143
|
+
this.shouldScroll = false;
|
|
144
|
+
}, 100);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
toggleChat() {
|
|
148
|
+
this.close();
|
|
149
|
+
// this.isOpen = !this.isOpen;
|
|
150
|
+
// if (this.isOpen && (this.messages.length === 0)) {
|
|
151
|
+
// this.sendMessage();
|
|
152
|
+
// }
|
|
153
|
+
}
|
|
154
|
+
sendMessage() {
|
|
155
|
+
var _a, _b, _c, _d;
|
|
156
|
+
this.isLoading = true;
|
|
157
|
+
this.msgControl.disable();
|
|
158
|
+
let req = {
|
|
159
|
+
query: ((_a = this.msgControl.value) === null || _a === void 0 ? void 0 : _a.trim()) ? this.msgControl.value.trim() : null,
|
|
160
|
+
};
|
|
161
|
+
if (((_c = (_b = this.msgControl.value) === null || _b === void 0 ? void 0 : _b.trim()) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
162
|
+
this.messages.push({ response: (_d = this.msgControl.value) === null || _d === void 0 ? void 0 : _d.trim(), isUser: true, timeStamp: new Date() });
|
|
163
|
+
}
|
|
164
|
+
this.shouldScroll = true;
|
|
165
|
+
if (this.conversationId)
|
|
166
|
+
req.conversationId = this.conversationId;
|
|
167
|
+
this.msgControl.setValue('');
|
|
168
|
+
this._chatSer.getQueryResponse(req)
|
|
169
|
+
.subscribe({
|
|
170
|
+
next: ((res) => {
|
|
171
|
+
var _a, _b;
|
|
172
|
+
if (res) {
|
|
173
|
+
if (res.message) {
|
|
174
|
+
this.messages.push({ response: res.message, timeStamp: new Date() });
|
|
175
|
+
this.welcomeMessage = res.message;
|
|
176
|
+
}
|
|
177
|
+
else if (((_a = res.result) === null || _a === void 0 ? void 0 : _a.httpCode) == 200) {
|
|
178
|
+
if (res.result.data.response) {
|
|
179
|
+
this.conversationId = res.result.data.conversationId;
|
|
180
|
+
res.result.data.timeStamp = new Date();
|
|
181
|
+
this.messages.push(res.result.data);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else if (((_b = res.result) === null || _b === void 0 ? void 0 : _b.httpCode) == 204) {
|
|
185
|
+
this.messages.push({ response: res.result.message, timeStamp: new Date() });
|
|
186
|
+
}
|
|
187
|
+
this.shouldScroll = true;
|
|
188
|
+
}
|
|
189
|
+
this.isLoading = false;
|
|
190
|
+
this.msgControl.enable();
|
|
191
|
+
this.focusInput();
|
|
192
|
+
}),
|
|
193
|
+
error: ((err) => {
|
|
194
|
+
this.isLoading = false;
|
|
195
|
+
this.msgControl.enable();
|
|
196
|
+
this.focusInput();
|
|
197
|
+
})
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
// scrollToLastMessage() {
|
|
201
|
+
// const container = this.chatContainer?.nativeElement;
|
|
202
|
+
// if (container && container.scrollHeight > container.clientHeight) {
|
|
203
|
+
// container.scrollTop = container.scrollHeight;
|
|
204
|
+
// }
|
|
205
|
+
// }
|
|
206
|
+
scrollToLastMessage() {
|
|
207
|
+
var _a;
|
|
208
|
+
const container = (_a = this.chatContainer) === null || _a === void 0 ? void 0 : _a.nativeElement;
|
|
209
|
+
if (container && this.lastMessageRefs && this.lastMessageRefs.length > 0) {
|
|
210
|
+
const lastMsg = this.lastMessageRefs.last.nativeElement;
|
|
211
|
+
const lastMsgRect = lastMsg.getBoundingClientRect();
|
|
212
|
+
const containerRect = container.getBoundingClientRect();
|
|
213
|
+
// If last message is below the visible area of the container
|
|
214
|
+
if (lastMsgRect.bottom > containerRect.bottom) {
|
|
215
|
+
const scrollOffset = lastMsg.offsetTop - container.offsetTop;
|
|
216
|
+
container.scrollTop = scrollOffset;
|
|
217
|
+
}
|
|
218
|
+
// If last message is above the visible area of the container
|
|
219
|
+
else if (lastMsgRect.top < containerRect.top) {
|
|
220
|
+
const scrollOffset = lastMsg.offsetTop - container.offsetTop;
|
|
221
|
+
container.scrollTop = scrollOffset;
|
|
222
|
+
}
|
|
223
|
+
// Else, it's already visible; do nothing
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
handleKeyDown(event) {
|
|
227
|
+
var _a, _b;
|
|
228
|
+
if (event.key === 'Enter' && !event.shiftKey) {
|
|
229
|
+
event.preventDefault();
|
|
230
|
+
if (((_b = (_a = this.msgControl.value) === null || _a === void 0 ? void 0 : _a.trim()) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
231
|
+
this.sendMessage();
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
// Shift+Enter will be allowed by default
|
|
235
|
+
}
|
|
236
|
+
focusInput() {
|
|
237
|
+
if (this.msgInputRef) {
|
|
238
|
+
this.msgInputRef.nativeElement.focus();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
resetChat() {
|
|
242
|
+
let message = [{ response: this.welcomeMessage, timeStamp: new Date() }];
|
|
243
|
+
this.messages = message;
|
|
244
|
+
this.conversationId = '';
|
|
245
|
+
this.msgControl.setValue('');
|
|
246
|
+
this.shouldScroll = false;
|
|
247
|
+
if (this.msgInputRef) {
|
|
248
|
+
this.msgInputRef.nativeElement.focus();
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
AppraisalAssistantChatWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppraisalAssistantChatWidgetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
253
|
+
AppraisalAssistantChatWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AppraisalAssistantChatWidgetComponent, isStandalone: true, selector: "appraisal-assistant-agent", viewQueries: [{ propertyName: "chatContainer", first: true, predicate: ["chatContainer"], descendants: true }, { propertyName: "msgInputRef", first: true, predicate: ["msgInput"], descendants: true }, { propertyName: "lastMessageRefs", predicate: ["lastMessageRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [class]=\"isOpen?'chat-container-wrap':''\">\n <div class=\"chatbot-container\">\n <div class=\"chatbot-sidenav\">\n <div class=\"chat-header\"><span>Appraisal Assistant (Beta)</span>\n <div class=\"chat-header-actions\">\n <button tabindex=\"-1\" mat-button class=\"reset-button small_btn\" [disabled]=\"isLoading\"\n (click)=\"resetChat()\">Reset\n </button>\n <!-- <span>Reset</span> -->\n <!-- <button mat-icon-button matTooltip=\"Collapse\" class=\"d-flex align-item-center\" (click)=\"toggleChat()\">\n <mat-icon>chevron_right</mat-icon>\n </button> -->\n <button matTooltip=\"Collapse\" class=\"d-flex align-item-center collapse_btn\" (click)=\"toggleChat()\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"chat-messages\" #chatContainer>\n <div *ngFor=\"let message of messages; let isLast = last\" class=\"message-container\"\n [ngClass]=\"{'user-message': message.isUser, 'bot-message': !message.isUser}\"\n style=\"margin-bottom: 15px;\" #lastMessageRef>\n <div class=\"message-content\">\n <span [innerHTML]=\"message.response | textToHtml\"></span>\n <span class=\"message-time\">{{ message.timeStamp | chatTime }} </span>\n </div>\n </div>\n </div>\n <form class=\"chat-input-container\" (submit)=\"sendMessage()\">\n <textarea class=\"chat-textarea\" [formControl]=\"msgControl\" placeholder=\"Start typing here...\" rows=\"1\"\n (keydown)=\"handleKeyDown($event)\" #msgInput></textarea>\n <mat-spinner *ngIf=\"isLoading\" [diameter]=\"24\" strokeWidth=\"3\" color=\"primary\" class=\"position-absolute\"\n style=\"right:22px\"></mat-spinner>\n <button color=\"primary\" [disabled]=\"isLoading || (msgControl.value?.trim()?.length <= 0)\"\n mat-icon-button class=\"d-flex align-items-center\" (click)=\"sendMessage()\">\n <mat-icon *ngIf=\"!isLoading\">send</mat-icon>\n <!-- <mat-spinner *ngIf=\"isLoading\" [diameter]=\"24\" strokeWidth=\"3\"></mat-spinner> -->\n </button>\n </form>\n </div>\n </div>\n <!-- <mat-sidenav-container [hasBackdrop]=\"true\" class=\"chatbot-container\"><mat-sidenav #sidenav position=\"end\"\n mode=\"over\" [(opened)]=\"isOpen\" [disableClose]=\"true\" class=\"chatbot-sidenav\">\n </mat-sidenav></mat-sidenav-container> -->\n</div>\n<!-- <div *ngIf=\"!isOpen\" class=\"chat-launcher\" (click)=\"toggleChat()\">\n <div>\n <div class=\"list-icons-cell\">\n <mat-icon class=\"list-icons\">3p</mat-icon>\n </div>\n </div>\n</div> -->", styles: [":host .chatbot-container{top:0;right:0;height:100vh;background:transparent}:host .chatbot-container .mat-sidenav{z-index:5;pointer-events:auto;width:650px;display:flex;flex-direction:column}:host .chatbot-container .chat-header{display:flex;justify-content:space-between;align-items:center;padding:5px 16px;background:linear-gradient(to right,#3966b6,var(--themelightblue));color:#fff;position:sticky;top:0;z-index:100;box-shadow:0 2px 5px #0000004d;line-height:20px;letter-spacing:normal}:host .chatbot-container .chat-header span{font-size:13.12px;font-weight:550!important;line-height:20px;letter-spacing:normal}:host .chatbot-container .chat-header button:first-child{background-color:#4076d5!important}:host .chatbot-container .chat-messages{flex:1;padding:60px 16px 16px;background-color:#fff;overflow-y:auto;overscroll-behavior:contain;position:relative}:host .chatbot-container .message-container{display:flex;margin-bottom:12px;align-items:flex-start}:host .chat-launcher{background-color:#fff!important;border-radius:3px}:host .chat-launcher span{white-space:nowrap;border-right:1px solid #999999;font-size:13.12px!important;padding-right:5px;color:#fff!important}:host .chat-launcher .list-icons-cell{padding:8px;text-align:center;vertical-align:middle;height:40px;width:40px;cursor:pointer;border-radius:30px;margin-top:10px}:host .chat-launcher .list-icons-cell .list-icons{font-size:25px!important;color:#4b85ea!important}:host .list-icons-cell:hover{background-color:#ccc}:host .chat-header-actions{display:flex;align-items:center;gap:8px}:host .chat-header-actions .reset-button{color:#fff;line-height:20px!important;letter-spacing:.5px!important;font-size:13.12px!important}:host .user-message{justify-content:flex-end}:host .user-message .message-content{background-color:RGB(235,243,255);color:#212121;border:1px solid RGB(220,233,251);padding:10px 14px;border-radius:10px;max-width:70%;margin-left:auto;font-size:13px;line-height:21px!important}:host .user-message .message-time{display:block;font-size:9px;color:#555;margin-top:0;text-align:right}:host .bot-message{justify-content:flex-start}:host .bot-message .message-content{color:#212121;padding:10px 14px;border-radius:10px;width:98%;margin-right:auto;font-size:13px;line-height:21px!important}:host .bot-message .message-time{display:block;font-size:9px;color:#555;margin-top:0;text-align:left}:host .message-content{display:inline-block;word-break:break-word}:host .chat-input-container{display:flex;align-items:center;padding:12px;background-color:#fff;position:sticky;bottom:0;border-top:1px solid #e0e0e0;z-index:10}:host .chat-textarea{flex:1;resize:none;padding:12px 16px;border-radius:20px;font-size:14px;background-color:#f1f1f1;border:none;outline:none;line-height:1.4;max-height:150px;overflow-y:auto}:host .send-button{margin-left:8px;width:40px;height:40px;border-radius:50%;border:none;background-color:#3f51b5;color:#fff;display:flex;align-items:center;justify-content:center}:host .send-button:disabled{background-color:#ccc}:host .chat-container-wrap{position:fixed;inset:0;z-index:99999}:host ::ng-deep .mat-drawer-inner-container{display:flex;flex-direction:column}:host .collapse_btn{width:35px;height:35px;border-radius:50px;display:flex!important;align-items:center;justify-content:center;background-color:transparent!important;border:none}:host .collapse_btn mat-icon{font-size:24px!important;width:24px!important;height:24px!important;color:#fff!important}:host .collapse_btn:hover{background-color:#4076d5!important;transition:all .2s}\n"], dependencies: [{ kind: "ngmodule", type: MatSidenavModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i5.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: ChatTimePipe, name: "chatTime" }, { kind: "pipe", type: TextToHtmlPipe, name: "textToHtml" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
|
|
254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AppraisalAssistantChatWidgetComponent, decorators: [{
|
|
255
|
+
type: Component,
|
|
256
|
+
args: [{ selector: 'appraisal-assistant-agent', standalone: true, imports: [
|
|
257
|
+
MatSidenavModule,
|
|
258
|
+
MatIconModule,
|
|
259
|
+
MatButtonModule,
|
|
260
|
+
MatFormFieldModule,
|
|
261
|
+
ReactiveFormsModule,
|
|
262
|
+
CommonModule,
|
|
263
|
+
MatInputModule,
|
|
264
|
+
MatProgressSpinnerModule,
|
|
265
|
+
ChatTimePipe,
|
|
266
|
+
TextToHtmlPipe,
|
|
267
|
+
MatTooltipModule
|
|
268
|
+
], template: "<div [class]=\"isOpen?'chat-container-wrap':''\">\n <div class=\"chatbot-container\">\n <div class=\"chatbot-sidenav\">\n <div class=\"chat-header\"><span>Appraisal Assistant (Beta)</span>\n <div class=\"chat-header-actions\">\n <button tabindex=\"-1\" mat-button class=\"reset-button small_btn\" [disabled]=\"isLoading\"\n (click)=\"resetChat()\">Reset\n </button>\n <!-- <span>Reset</span> -->\n <!-- <button mat-icon-button matTooltip=\"Collapse\" class=\"d-flex align-item-center\" (click)=\"toggleChat()\">\n <mat-icon>chevron_right</mat-icon>\n </button> -->\n <button matTooltip=\"Collapse\" class=\"d-flex align-item-center collapse_btn\" (click)=\"toggleChat()\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"chat-messages\" #chatContainer>\n <div *ngFor=\"let message of messages; let isLast = last\" class=\"message-container\"\n [ngClass]=\"{'user-message': message.isUser, 'bot-message': !message.isUser}\"\n style=\"margin-bottom: 15px;\" #lastMessageRef>\n <div class=\"message-content\">\n <span [innerHTML]=\"message.response | textToHtml\"></span>\n <span class=\"message-time\">{{ message.timeStamp | chatTime }} </span>\n </div>\n </div>\n </div>\n <form class=\"chat-input-container\" (submit)=\"sendMessage()\">\n <textarea class=\"chat-textarea\" [formControl]=\"msgControl\" placeholder=\"Start typing here...\" rows=\"1\"\n (keydown)=\"handleKeyDown($event)\" #msgInput></textarea>\n <mat-spinner *ngIf=\"isLoading\" [diameter]=\"24\" strokeWidth=\"3\" color=\"primary\" class=\"position-absolute\"\n style=\"right:22px\"></mat-spinner>\n <button color=\"primary\" [disabled]=\"isLoading || (msgControl.value?.trim()?.length <= 0)\"\n mat-icon-button class=\"d-flex align-items-center\" (click)=\"sendMessage()\">\n <mat-icon *ngIf=\"!isLoading\">send</mat-icon>\n <!-- <mat-spinner *ngIf=\"isLoading\" [diameter]=\"24\" strokeWidth=\"3\"></mat-spinner> -->\n </button>\n </form>\n </div>\n </div>\n <!-- <mat-sidenav-container [hasBackdrop]=\"true\" class=\"chatbot-container\"><mat-sidenav #sidenav position=\"end\"\n mode=\"over\" [(opened)]=\"isOpen\" [disableClose]=\"true\" class=\"chatbot-sidenav\">\n </mat-sidenav></mat-sidenav-container> -->\n</div>\n<!-- <div *ngIf=\"!isOpen\" class=\"chat-launcher\" (click)=\"toggleChat()\">\n <div>\n <div class=\"list-icons-cell\">\n <mat-icon class=\"list-icons\">3p</mat-icon>\n </div>\n </div>\n</div> -->", styles: [":host .chatbot-container{top:0;right:0;height:100vh;background:transparent}:host .chatbot-container .mat-sidenav{z-index:5;pointer-events:auto;width:650px;display:flex;flex-direction:column}:host .chatbot-container .chat-header{display:flex;justify-content:space-between;align-items:center;padding:5px 16px;background:linear-gradient(to right,#3966b6,var(--themelightblue));color:#fff;position:sticky;top:0;z-index:100;box-shadow:0 2px 5px #0000004d;line-height:20px;letter-spacing:normal}:host .chatbot-container .chat-header span{font-size:13.12px;font-weight:550!important;line-height:20px;letter-spacing:normal}:host .chatbot-container .chat-header button:first-child{background-color:#4076d5!important}:host .chatbot-container .chat-messages{flex:1;padding:60px 16px 16px;background-color:#fff;overflow-y:auto;overscroll-behavior:contain;position:relative}:host .chatbot-container .message-container{display:flex;margin-bottom:12px;align-items:flex-start}:host .chat-launcher{background-color:#fff!important;border-radius:3px}:host .chat-launcher span{white-space:nowrap;border-right:1px solid #999999;font-size:13.12px!important;padding-right:5px;color:#fff!important}:host .chat-launcher .list-icons-cell{padding:8px;text-align:center;vertical-align:middle;height:40px;width:40px;cursor:pointer;border-radius:30px;margin-top:10px}:host .chat-launcher .list-icons-cell .list-icons{font-size:25px!important;color:#4b85ea!important}:host .list-icons-cell:hover{background-color:#ccc}:host .chat-header-actions{display:flex;align-items:center;gap:8px}:host .chat-header-actions .reset-button{color:#fff;line-height:20px!important;letter-spacing:.5px!important;font-size:13.12px!important}:host .user-message{justify-content:flex-end}:host .user-message .message-content{background-color:RGB(235,243,255);color:#212121;border:1px solid RGB(220,233,251);padding:10px 14px;border-radius:10px;max-width:70%;margin-left:auto;font-size:13px;line-height:21px!important}:host .user-message .message-time{display:block;font-size:9px;color:#555;margin-top:0;text-align:right}:host .bot-message{justify-content:flex-start}:host .bot-message .message-content{color:#212121;padding:10px 14px;border-radius:10px;width:98%;margin-right:auto;font-size:13px;line-height:21px!important}:host .bot-message .message-time{display:block;font-size:9px;color:#555;margin-top:0;text-align:left}:host .message-content{display:inline-block;word-break:break-word}:host .chat-input-container{display:flex;align-items:center;padding:12px;background-color:#fff;position:sticky;bottom:0;border-top:1px solid #e0e0e0;z-index:10}:host .chat-textarea{flex:1;resize:none;padding:12px 16px;border-radius:20px;font-size:14px;background-color:#f1f1f1;border:none;outline:none;line-height:1.4;max-height:150px;overflow-y:auto}:host .send-button{margin-left:8px;width:40px;height:40px;border-radius:50%;border:none;background-color:#3f51b5;color:#fff;display:flex;align-items:center;justify-content:center}:host .send-button:disabled{background-color:#ccc}:host .chat-container-wrap{position:fixed;inset:0;z-index:99999}:host ::ng-deep .mat-drawer-inner-container{display:flex;flex-direction:column}:host .collapse_btn{width:35px;height:35px;border-radius:50px;display:flex!important;align-items:center;justify-content:center;background-color:transparent!important;border:none}:host .collapse_btn mat-icon{font-size:24px!important;width:24px!important;height:24px!important;color:#fff!important}:host .collapse_btn:hover{background-color:#4076d5!important;transition:all .2s}\n"] }]
|
|
269
|
+
}], propDecorators: { chatContainer: [{
|
|
270
|
+
type: ViewChild,
|
|
271
|
+
args: ['chatContainer']
|
|
272
|
+
}], lastMessageRefs: [{
|
|
273
|
+
type: ViewChildren,
|
|
274
|
+
args: ['lastMessageRef']
|
|
275
|
+
}], msgInputRef: [{
|
|
276
|
+
type: ViewChild,
|
|
277
|
+
args: ['msgInput']
|
|
278
|
+
}] } });
|
|
279
|
+
|
|
280
|
+
export { AppraisalAssistantChatWidgetComponent };
|
|
281
|
+
//# sourceMappingURL=propmix-profet-common-header-appraisal-assistant-chat-widget.component-56a1672f.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propmix-profet-common-header-appraisal-assistant-chat-widget.component-56a1672f.mjs","sources":["../../../projects/common-header/src/lib/closable.mixin.ts","../../../projects/common-header/src/lib/utils/chat-time.pipe.ts","../../../projects/common-header/src/lib/utils/text-to-html.pipe.ts","../../../projects/common-header/src/lib/appraisal-assistant/appraisal-assistant-chat-widget.component.ts","../../../projects/common-header/src/lib/appraisal-assistant/appraisal-assistant-chat-widget.component.html"],"sourcesContent":["import { inject } from \"@angular/core\";\nimport { CommonHeaderService } from \"./common-header.service\";\n\nexport function WithClosable<T extends new (...args: any[]) => {}>(Base: T) {\n return class extends Base {\n _ser = inject(CommonHeaderService);\n\n close() {\n this._ser.toggleUtilityContentDrawer();\n }\n };\n}","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'chatTime',\n standalone: true\n})\nexport class ChatTimePipe implements PipeTransform {\n\n transform(value: string | number | Date): string {\n const date = new Date(value);\n const now = new Date();\n\n const isToday =\n date.getDate() === now.getDate() &&\n date.getMonth() === now.getMonth() &&\n date.getFullYear() === now.getFullYear();\n\n const timeString = date.toLocaleTimeString([], {\n hour: '2-digit',\n minute: '2-digit',\n hour12: true,\n });\n\n if (isToday) {\n return timeString;\n }\n\n const dateString = date.toLocaleDateString([], {\n year: 'numeric',\n month: 'short', // like \"May\"\n day: 'numeric',\n });\n\n return `${dateString} ${timeString}`;\n }\n\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n/**\n * Pipe to convert text with special characters to HTML.\n * It replaces:\n * - \\n with <br>\n * - \\t with  \n * - \\' with '\n * - \\\" with \"\n * - \\\\ with \\\n * - **text** with <strong>text</strong>\n * - _text_ with <em>text</em>\n */\n\n@Pipe({\n name: 'textToHtml',\n standalone: true\n})\nexport class TextToHtmlPipe implements PipeTransform {\n\n constructor(private sanitizer: DomSanitizer) { }\n\n transform(value: string): SafeHtml {\n if (!value) return '';\n\n let html = value\n .replace(/\\\\n|\\n/g, '<br>')\n .replace(/\\\\t|\\t/g, ' ')\n // .replace(/\\\\'/g, `'`)\n // .replace(/\\\\\"/g, '\"')\n // .replace(/\\\\\\\\/g, `\\\\`)\n // .replace(/\\*\\*(.+?)\\*\\*/g, '<strong>$1</strong>')\n // .replace(/_(.+?)_/g, '<em>$1</em>');\n\n return this.sanitizer.bypassSecurityTrustHtml(html);\n }\n\n}\n","import { CommonModule } from '@angular/common';\nimport { AfterViewChecked, Component, ElementRef, inject, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatSidenavModule } from '@angular/material/sidenav';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { WithClosable } from '../closable.mixin';\nimport { CommonHeaderService } from '../common-header.service';\nimport { ChatTimePipe } from '../utils/chat-time.pipe';\nimport { TextToHtmlPipe } from \"../utils/text-to-html.pipe\";\nimport { AppraisalChatRequest } from './appraisal-assistant.interface';\n\nclass EmptyBase { }\n\n@Component({\n selector: 'appraisal-assistant-agent',\n templateUrl: './appraisal-assistant-chat-widget.component.html',\n styleUrls: ['./appraisal-assistant-chat-widget.component.scss'],\n standalone: true,\n imports: [\n MatSidenavModule,\n MatIconModule,\n MatButtonModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n CommonModule,\n MatInputModule,\n MatProgressSpinnerModule,\n ChatTimePipe,\n TextToHtmlPipe,\n MatTooltipModule\n ]\n})\nexport class AppraisalAssistantChatWidgetComponent extends WithClosable(class {}) implements OnInit, AfterViewChecked {\n isOpen = false;\n message = '';\n messages: any[] = [];\n isLoading: boolean = false;\n conversationId: string = '';\n msgControl: FormControl = new FormControl('');\n public _chatSer = inject(CommonHeaderService);\n @ViewChild('chatContainer') private chatContainer!: ElementRef;\n @ViewChildren('lastMessageRef') lastMessageRefs!: QueryList<ElementRef>;\n @ViewChild('msgInput') msgInputRef!: ElementRef<HTMLTextAreaElement>;\n\n private shouldScroll = false;\n welcomeMessage: string = '';\n\n\n ngOnInit(): void {\n if ((this.messages.length === 0)) {\n this.sendMessage();\n }\n }\n\n\n\n ngAfterViewChecked(): void {\n if (this.shouldScroll) {\n setTimeout(() => {\n this.scrollToLastMessage();\n this.shouldScroll = false;\n }, 100);\n\n }\n }\n\n toggleChat() {\n this.close();\n // this.isOpen = !this.isOpen;\n // if (this.isOpen && (this.messages.length === 0)) {\n // this.sendMessage();\n // }\n }\n\n sendMessage() {\n this.isLoading = true;\n this.msgControl.disable();\n let req: AppraisalChatRequest = {\n query: this.msgControl.value?.trim() ? this.msgControl.value.trim() : null,\n }\n if (this.msgControl.value?.trim()?.length > 0) {\n this.messages.push({ response: this.msgControl.value?.trim(), isUser: true, timeStamp: new Date() });\n }\n this.shouldScroll = true;\n if (this.conversationId) req.conversationId = this.conversationId;\n this.msgControl.setValue('');\n this._chatSer.getQueryResponse(req)\n .subscribe({\n next: ((res: any) => {\n if (res) {\n if (res.message) {\n this.messages.push({ response: res.message, timeStamp: new Date() });\n this.welcomeMessage = res.message;\n }\n else if (res.result?.httpCode == 200) {\n if (res.result.data.response) {\n this.conversationId = res.result.data.conversationId;\n res.result.data.timeStamp = new Date();\n this.messages.push(res.result.data);\n }\n }\n else if (res.result?.httpCode == 204) {\n this.messages.push({ response: res.result.message, timeStamp: new Date() });\n }\n this.shouldScroll = true;\n }\n this.isLoading = false;\n this.msgControl.enable();\n this.focusInput();\n }),\n error: ((err: any) => {\n this.isLoading = false;\n this.msgControl.enable();\n this.focusInput();\n })\n });\n }\n\n // scrollToLastMessage() {\n // const container = this.chatContainer?.nativeElement;\n // if (container && container.scrollHeight > container.clientHeight) {\n // container.scrollTop = container.scrollHeight;\n // }\n // }\n scrollToLastMessage() {\n const container = this.chatContainer?.nativeElement;\n if (container && this.lastMessageRefs && this.lastMessageRefs.length > 0) {\n const lastMsg: HTMLElement = this.lastMessageRefs.last.nativeElement;\n const lastMsgRect = lastMsg.getBoundingClientRect();\n const containerRect = container.getBoundingClientRect();\n\n // If last message is below the visible area of the container\n if (lastMsgRect.bottom > containerRect.bottom) {\n const scrollOffset = lastMsg.offsetTop - container.offsetTop;\n container.scrollTop = scrollOffset;\n }\n // If last message is above the visible area of the container\n else if (lastMsgRect.top < containerRect.top) {\n const scrollOffset = lastMsg.offsetTop - container.offsetTop;\n container.scrollTop = scrollOffset;\n }\n // Else, it's already visible; do nothing\n }\n }\n\n\n handleKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Enter' && !event.shiftKey) {\n event.preventDefault();\n if (this.msgControl.value?.trim()?.length > 0) {\n this.sendMessage();\n }\n }\n // Shift+Enter will be allowed by default\n }\n\n focusInput() {\n if (this.msgInputRef) {\n this.msgInputRef.nativeElement.focus();\n }\n }\n\n resetChat() {\n let message = [{ response: this.welcomeMessage, timeStamp: new Date() }]\n this.messages = message;\n this.conversationId = '';\n this.msgControl.setValue('');\n this.shouldScroll = false;\n if (this.msgInputRef) {\n this.msgInputRef.nativeElement.focus();\n }\n }\n}\n","<div [class]=\"isOpen?'chat-container-wrap':''\">\n <div class=\"chatbot-container\">\n <div class=\"chatbot-sidenav\">\n <div class=\"chat-header\"><span>Appraisal Assistant (Beta)</span>\n <div class=\"chat-header-actions\">\n <button tabindex=\"-1\" mat-button class=\"reset-button small_btn\" [disabled]=\"isLoading\"\n (click)=\"resetChat()\">Reset\n </button>\n <!-- <span>Reset</span> -->\n <!-- <button mat-icon-button matTooltip=\"Collapse\" class=\"d-flex align-item-center\" (click)=\"toggleChat()\">\n <mat-icon>chevron_right</mat-icon>\n </button> -->\n <button matTooltip=\"Collapse\" class=\"d-flex align-item-center collapse_btn\" (click)=\"toggleChat()\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"chat-messages\" #chatContainer>\n <div *ngFor=\"let message of messages; let isLast = last\" class=\"message-container\"\n [ngClass]=\"{'user-message': message.isUser, 'bot-message': !message.isUser}\"\n style=\"margin-bottom: 15px;\" #lastMessageRef>\n <div class=\"message-content\">\n <span [innerHTML]=\"message.response | textToHtml\"></span>\n <span class=\"message-time\">{{ message.timeStamp | chatTime }} </span>\n </div>\n </div>\n </div>\n <form class=\"chat-input-container\" (submit)=\"sendMessage()\">\n <textarea class=\"chat-textarea\" [formControl]=\"msgControl\" placeholder=\"Start typing here...\" rows=\"1\"\n (keydown)=\"handleKeyDown($event)\" #msgInput></textarea>\n <mat-spinner *ngIf=\"isLoading\" [diameter]=\"24\" strokeWidth=\"3\" color=\"primary\" class=\"position-absolute\"\n style=\"right:22px\"></mat-spinner>\n <button color=\"primary\" [disabled]=\"isLoading || (msgControl.value?.trim()?.length <= 0)\"\n mat-icon-button class=\"d-flex align-items-center\" (click)=\"sendMessage()\">\n <mat-icon *ngIf=\"!isLoading\">send</mat-icon>\n <!-- <mat-spinner *ngIf=\"isLoading\" [diameter]=\"24\" strokeWidth=\"3\"></mat-spinner> -->\n </button>\n </form>\n </div>\n </div>\n <!-- <mat-sidenav-container [hasBackdrop]=\"true\" class=\"chatbot-container\"><mat-sidenav #sidenav position=\"end\"\n mode=\"over\" [(opened)]=\"isOpen\" [disableClose]=\"true\" class=\"chatbot-sidenav\">\n </mat-sidenav></mat-sidenav-container> -->\n</div>\n<!-- <div *ngIf=\"!isOpen\" class=\"chat-launcher\" (click)=\"toggleChat()\">\n <div>\n <div class=\"list-icons-cell\">\n <mat-icon class=\"list-icons\">3p</mat-icon>\n </div>\n </div>\n</div> -->"],"names":["i1","i2","i3","i4","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGM,SAAU,YAAY,CAAuC,IAAO,EAAA;IACtE,OAAO,cAAc,IAAI,CAAA;AAAlB,QAAA,WAAA,GAAA;;AACH,YAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;SAKtC;QAHG,KAAK,GAAA;AACD,YAAA,IAAI,CAAC,IAAI,CAAC,0BAA0B,EAAE,CAAC;SAC1C;KACJ,CAAC;AACN;;MCLa,YAAY,CAAA;AAEvB,IAAA,SAAS,CAAC,KAA6B,EAAA;AACrC,QAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7B,QAAA,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QAEvB,MAAM,OAAO,GACX,IAAI,CAAC,OAAO,EAAE,KAAK,GAAG,CAAC,OAAO,EAAE;AAChC,YAAA,IAAI,CAAC,QAAQ,EAAE,KAAK,GAAG,CAAC,QAAQ,EAAE;YAClC,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,WAAW,EAAE,CAAC;AAE3C,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,EAAE,EAAE;AAC7C,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,MAAM,EAAE,SAAS;AACjB,YAAA,MAAM,EAAE,IAAI;AACb,SAAA,CAAC,CAAC;AAEH,QAAA,IAAI,OAAO,EAAE;AACX,YAAA,OAAO,UAAU,CAAC;AACnB,SAAA;AAED,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,EAAE,EAAE;AAC7C,YAAA,IAAI,EAAE,SAAS;AACf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