@memberjunction/ng-skip-chat 2.24.0 → 2.25.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/module.d.ts +3 -2
- package/dist/lib/module.d.ts.map +1 -1
- package/dist/lib/module.js +5 -1
- package/dist/lib/module.js.map +1 -1
- package/dist/lib/skip-chat/skip-chat.component.d.ts +45 -3
- package/dist/lib/skip-chat/skip-chat.component.d.ts.map +1 -1
- package/dist/lib/skip-chat/skip-chat.component.js +330 -97
- package/dist/lib/skip-chat/skip-chat.component.js.map +1 -1
- package/package.json +12 -11
|
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Component, ViewChild, ViewContainerRef, Input, Output, EventEmitter, } from '@angular/core';
|
|
11
11
|
import { ActivationEnd } from '@angular/router';
|
|
12
|
-
import { LogError, CompositeKey, LogStatus } from '@memberjunction/core';
|
|
12
|
+
import { LogError, CompositeKey, LogStatus, RunView } from '@memberjunction/core';
|
|
13
|
+
import { ResourcePermissionEngine } from '@memberjunction/core-entities';
|
|
13
14
|
import { Container } from '@memberjunction/ng-container-directives';
|
|
14
15
|
import { take, filter } from 'rxjs/operators';
|
|
15
16
|
import { SkipResponsePhase, } from '@memberjunction/skip-types';
|
|
@@ -28,27 +29,29 @@ import * as i7 from "@memberjunction/ng-container-directives";
|
|
|
28
29
|
import * as i8 from "@progress/kendo-angular-listview";
|
|
29
30
|
import * as i9 from "@progress/kendo-angular-buttons";
|
|
30
31
|
import * as i10 from "@memberjunction/ng-data-context";
|
|
32
|
+
import * as i11 from "@memberjunction/ng-resource-permissions";
|
|
31
33
|
const _c0 = ["AskSkipPanel"];
|
|
32
34
|
const _c1 = ["mjContainer"];
|
|
33
35
|
const _c2 = ["conversationList"];
|
|
34
36
|
const _c3 = ["AskSkipInput"];
|
|
35
37
|
const _c4 = ["scrollContainer"];
|
|
36
38
|
const _c5 = ["topLevelDiv"];
|
|
37
|
-
const _c6 =
|
|
39
|
+
const _c6 = ["resourcePermissions"];
|
|
40
|
+
const _c7 = () => ({ "item-border": true });
|
|
38
41
|
function SkipChatComponent_Conditional_3_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
39
|
-
i0.ɵɵelement(0, "img",
|
|
42
|
+
i0.ɵɵelement(0, "img", 23);
|
|
40
43
|
} if (rf & 2) {
|
|
41
44
|
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
42
45
|
i0.ɵɵproperty("src", ctx_r2.SkipLogoURL, i0.ɵɵsanitizeUrl);
|
|
43
46
|
} }
|
|
44
47
|
function SkipChatComponent_Conditional_3_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
45
48
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
46
|
-
i0.ɵɵelementStart(0, "span",
|
|
49
|
+
i0.ɵɵelementStart(0, "span", 27);
|
|
47
50
|
i0.ɵɵlistener("click", function SkipChatComponent_Conditional_3_Conditional_5_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.CreateNewConversation()); });
|
|
48
51
|
i0.ɵɵelementEnd();
|
|
49
52
|
} }
|
|
50
53
|
function SkipChatComponent_Conditional_3_ng_template_8_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
51
|
-
i0.ɵɵelement(0, "span",
|
|
54
|
+
i0.ɵɵelement(0, "span", 34);
|
|
52
55
|
} }
|
|
53
56
|
function SkipChatComponent_Conditional_3_ng_template_8_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
54
57
|
i0.ɵɵelementStart(0, "span");
|
|
@@ -61,7 +64,7 @@ function SkipChatComponent_Conditional_3_ng_template_8_span_3_Template(rf, ctx)
|
|
|
61
64
|
} }
|
|
62
65
|
function SkipChatComponent_Conditional_3_ng_template_8_textarea_4_Template(rf, ctx) { if (rf & 1) {
|
|
63
66
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
64
|
-
i0.ɵɵelementStart(0, "textarea",
|
|
67
|
+
i0.ɵɵelementStart(0, "textarea", 35);
|
|
65
68
|
i0.ɵɵtwoWayListener("ngModelChange", function SkipChatComponent_Conditional_3_ng_template_8_textarea_4_Template_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r7); const dataItem_r6 = i0.ɵɵnextContext().dataItem; i0.ɵɵtwoWayBindingSet(dataItem_r6.Name, $event) || (dataItem_r6.Name = $event); return i0.ɵɵresetView($event); });
|
|
66
69
|
i0.ɵɵelementEnd();
|
|
67
70
|
} if (rf & 2) {
|
|
@@ -70,31 +73,31 @@ function SkipChatComponent_Conditional_3_ng_template_8_textarea_4_Template(rf, c
|
|
|
70
73
|
} }
|
|
71
74
|
function SkipChatComponent_Conditional_3_ng_template_8_div_5_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
72
75
|
const _r8 = i0.ɵɵgetCurrentView();
|
|
73
|
-
i0.ɵɵelementStart(0, "span",
|
|
76
|
+
i0.ɵɵelementStart(0, "span", 41);
|
|
74
77
|
i0.ɵɵlistener("click", function SkipChatComponent_Conditional_3_ng_template_8_div_5_span_1_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r8); const dataItem_r6 = i0.ɵɵnextContext(2).dataItem; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.editConvo(dataItem_r6)); });
|
|
75
78
|
i0.ɵɵelementEnd();
|
|
76
79
|
} }
|
|
77
80
|
function SkipChatComponent_Conditional_3_ng_template_8_div_5_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
78
81
|
const _r9 = i0.ɵɵgetCurrentView();
|
|
79
|
-
i0.ɵɵelementStart(0, "span",
|
|
82
|
+
i0.ɵɵelementStart(0, "span", 42);
|
|
80
83
|
i0.ɵɵlistener("click", function SkipChatComponent_Conditional_3_ng_template_8_div_5_span_2_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r9); const dataItem_r6 = i0.ɵɵnextContext(2).dataItem; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.showDeleteConvoDialog(dataItem_r6)); });
|
|
81
84
|
i0.ɵɵelementEnd();
|
|
82
85
|
} }
|
|
83
86
|
function SkipChatComponent_Conditional_3_ng_template_8_div_5_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
84
87
|
const _r10 = i0.ɵɵgetCurrentView();
|
|
85
|
-
i0.ɵɵelementStart(0, "span",
|
|
88
|
+
i0.ɵɵelementStart(0, "span", 43);
|
|
86
89
|
i0.ɵɵlistener("click", function SkipChatComponent_Conditional_3_ng_template_8_div_5_span_3_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r10); const dataItem_r6 = i0.ɵɵnextContext(2).dataItem; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.saveConvoName(dataItem_r6)); });
|
|
87
90
|
i0.ɵɵelementEnd();
|
|
88
91
|
} }
|
|
89
92
|
function SkipChatComponent_Conditional_3_ng_template_8_div_5_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
90
93
|
const _r11 = i0.ɵɵgetCurrentView();
|
|
91
|
-
i0.ɵɵelementStart(0, "span",
|
|
94
|
+
i0.ɵɵelementStart(0, "span", 44);
|
|
92
95
|
i0.ɵɵlistener("click", function SkipChatComponent_Conditional_3_ng_template_8_div_5_span_4_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r11); const dataItem_r6 = i0.ɵɵnextContext(2).dataItem; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.cancelConvoEdit(dataItem_r6)); });
|
|
93
96
|
i0.ɵɵelementEnd();
|
|
94
97
|
} }
|
|
95
98
|
function SkipChatComponent_Conditional_3_ng_template_8_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
96
|
-
i0.ɵɵelementStart(0, "div",
|
|
97
|
-
i0.ɵɵtemplate(1, SkipChatComponent_Conditional_3_ng_template_8_div_5_span_1_Template, 1, 0, "span",
|
|
99
|
+
i0.ɵɵelementStart(0, "div", 36);
|
|
100
|
+
i0.ɵɵtemplate(1, SkipChatComponent_Conditional_3_ng_template_8_div_5_span_1_Template, 1, 0, "span", 37)(2, SkipChatComponent_Conditional_3_ng_template_8_div_5_span_2_Template, 1, 0, "span", 38)(3, SkipChatComponent_Conditional_3_ng_template_8_div_5_span_3_Template, 1, 0, "span", 39)(4, SkipChatComponent_Conditional_3_ng_template_8_div_5_span_4_Template, 1, 0, "span", 40);
|
|
98
101
|
i0.ɵɵelementEnd();
|
|
99
102
|
} if (rf & 2) {
|
|
100
103
|
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
@@ -109,13 +112,13 @@ function SkipChatComponent_Conditional_3_ng_template_8_div_5_Template(rf, ctx) {
|
|
|
109
112
|
} }
|
|
110
113
|
function SkipChatComponent_Conditional_3_ng_template_8_Template(rf, ctx) { if (rf & 1) {
|
|
111
114
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
112
|
-
i0.ɵɵelementStart(0, "div",
|
|
115
|
+
i0.ɵɵelementStart(0, "div", 28);
|
|
113
116
|
i0.ɵɵlistener("click", function SkipChatComponent_Conditional_3_ng_template_8_Template_div_click_0_listener() { const dataItem_r6 = i0.ɵɵrestoreView(_r5).dataItem; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.SelectConversation(dataItem_r6)); });
|
|
114
|
-
i0.ɵɵtemplate(1, SkipChatComponent_Conditional_3_ng_template_8_span_1_Template, 1, 0, "span",
|
|
115
|
-
i0.ɵɵelementStart(2, "div",
|
|
116
|
-
i0.ɵɵtemplate(3, SkipChatComponent_Conditional_3_ng_template_8_span_3_Template, 2, 1, "span",
|
|
117
|
+
i0.ɵɵtemplate(1, SkipChatComponent_Conditional_3_ng_template_8_span_1_Template, 1, 0, "span", 29);
|
|
118
|
+
i0.ɵɵelementStart(2, "div", 30);
|
|
119
|
+
i0.ɵɵtemplate(3, SkipChatComponent_Conditional_3_ng_template_8_span_3_Template, 2, 1, "span", 31)(4, SkipChatComponent_Conditional_3_ng_template_8_textarea_4_Template, 1, 1, "textarea", 32);
|
|
117
120
|
i0.ɵɵelementEnd();
|
|
118
|
-
i0.ɵɵtemplate(5, SkipChatComponent_Conditional_3_ng_template_8_div_5_Template, 5, 4, "div",
|
|
121
|
+
i0.ɵɵtemplate(5, SkipChatComponent_Conditional_3_ng_template_8_div_5_Template, 5, 4, "div", 33);
|
|
119
122
|
i0.ɵɵelementEnd();
|
|
120
123
|
} if (rf & 2) {
|
|
121
124
|
const dataItem_r6 = ctx.dataItem;
|
|
@@ -132,13 +135,13 @@ function SkipChatComponent_Conditional_3_ng_template_8_Template(rf, ctx) { if (r
|
|
|
132
135
|
} }
|
|
133
136
|
function SkipChatComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
134
137
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
135
|
-
i0.ɵɵelementStart(0, "div",
|
|
138
|
+
i0.ɵɵelementStart(0, "div", 7)(1, "div", 20)(2, "div", 21)(3, "span", 22);
|
|
136
139
|
i0.ɵɵlistener("click", function SkipChatComponent_Conditional_3_Template_span_click_3_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.DisplayConversationList(false)); });
|
|
137
140
|
i0.ɵɵelementEnd();
|
|
138
|
-
i0.ɵɵtemplate(4, SkipChatComponent_Conditional_3_Conditional_4_Template, 1, 1, "img",
|
|
141
|
+
i0.ɵɵtemplate(4, SkipChatComponent_Conditional_3_Conditional_4_Template, 1, 1, "img", 23)(5, SkipChatComponent_Conditional_3_Conditional_5_Template, 1, 0, "span", 24);
|
|
139
142
|
i0.ɵɵelementEnd();
|
|
140
|
-
i0.ɵɵelementStart(6, "kendo-listview",
|
|
141
|
-
i0.ɵɵtemplate(8, SkipChatComponent_Conditional_3_ng_template_8_Template, 6, 6, "ng-template",
|
|
143
|
+
i0.ɵɵelementStart(6, "kendo-listview", 25, 2);
|
|
144
|
+
i0.ɵɵtemplate(8, SkipChatComponent_Conditional_3_ng_template_8_Template, 6, 6, "ng-template", 26);
|
|
142
145
|
i0.ɵɵelementEnd()()();
|
|
143
146
|
} if (rf & 2) {
|
|
144
147
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
@@ -148,48 +151,48 @@ function SkipChatComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
148
151
|
i0.ɵɵconditional(ctx_r2.AllowNewConversations ? 5 : -1);
|
|
149
152
|
i0.ɵɵadvance();
|
|
150
153
|
i0.ɵɵstyleProp("height", 280, "px");
|
|
151
|
-
i0.ɵɵproperty("data", ctx_r2.Conversations)("itemClass", i0.ɵɵpureFunction0(8,
|
|
154
|
+
i0.ɵɵproperty("data", ctx_r2.Conversations)("itemClass", i0.ɵɵpureFunction0(8, _c7))("fillWidth", false)("bottomMargin", 50);
|
|
152
155
|
} }
|
|
153
156
|
function SkipChatComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
154
157
|
const _r12 = i0.ɵɵgetCurrentView();
|
|
155
|
-
i0.ɵɵelementStart(0, "span",
|
|
158
|
+
i0.ɵɵelementStart(0, "span", 22);
|
|
156
159
|
i0.ɵɵlistener("click", function SkipChatComponent_Conditional_4_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.DisplayConversationList(true)); });
|
|
157
160
|
i0.ɵɵelementEnd();
|
|
158
161
|
} }
|
|
159
162
|
function SkipChatComponent_div_10_Template(rf, ctx) { if (rf & 1) {
|
|
160
163
|
const _r13 = i0.ɵɵgetCurrentView();
|
|
161
|
-
i0.ɵɵelementStart(0, "div",
|
|
162
|
-
i0.ɵɵelement(2, "img",
|
|
163
|
-
i0.ɵɵelementStart(3, "div",
|
|
164
|
+
i0.ɵɵelementStart(0, "div", 45)(1, "div", 46);
|
|
165
|
+
i0.ɵɵelement(2, "img", 47);
|
|
166
|
+
i0.ɵɵelementStart(3, "div", 48);
|
|
164
167
|
i0.ɵɵtext(4, "What can I help with today?");
|
|
165
168
|
i0.ɵɵelementEnd()();
|
|
166
|
-
i0.ɵɵelementStart(5, "div",
|
|
169
|
+
i0.ɵɵelementStart(5, "div", 49)(6, "div", 50)(7, "div", 51);
|
|
167
170
|
i0.ɵɵlistener("click", function SkipChatComponent_div_10_Template_div_click_7_listener() { i0.ɵɵrestoreView(_r13); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.sendPrompt(ctx_r2.WelcomeQuestions[0].prompt)); });
|
|
168
|
-
i0.ɵɵelementStart(8, "span",
|
|
171
|
+
i0.ɵɵelementStart(8, "span", 52);
|
|
169
172
|
i0.ɵɵtext(9);
|
|
170
173
|
i0.ɵɵelementEnd();
|
|
171
174
|
i0.ɵɵelementStart(10, "span");
|
|
172
175
|
i0.ɵɵtext(11);
|
|
173
176
|
i0.ɵɵelementEnd()();
|
|
174
|
-
i0.ɵɵelementStart(12, "div",
|
|
177
|
+
i0.ɵɵelementStart(12, "div", 51);
|
|
175
178
|
i0.ɵɵlistener("click", function SkipChatComponent_div_10_Template_div_click_12_listener() { i0.ɵɵrestoreView(_r13); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.sendPrompt(ctx_r2.WelcomeQuestions[1].prompt)); });
|
|
176
|
-
i0.ɵɵelementStart(13, "span",
|
|
179
|
+
i0.ɵɵelementStart(13, "span", 52);
|
|
177
180
|
i0.ɵɵtext(14);
|
|
178
181
|
i0.ɵɵelementEnd();
|
|
179
182
|
i0.ɵɵelementStart(15, "span");
|
|
180
183
|
i0.ɵɵtext(16);
|
|
181
184
|
i0.ɵɵelementEnd()()();
|
|
182
|
-
i0.ɵɵelementStart(17, "div",
|
|
185
|
+
i0.ɵɵelementStart(17, "div", 50)(18, "div", 51);
|
|
183
186
|
i0.ɵɵlistener("click", function SkipChatComponent_div_10_Template_div_click_18_listener() { i0.ɵɵrestoreView(_r13); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.sendPrompt(ctx_r2.WelcomeQuestions[2].prompt)); });
|
|
184
|
-
i0.ɵɵelementStart(19, "span",
|
|
187
|
+
i0.ɵɵelementStart(19, "span", 52);
|
|
185
188
|
i0.ɵɵtext(20);
|
|
186
189
|
i0.ɵɵelementEnd();
|
|
187
190
|
i0.ɵɵelementStart(21, "span");
|
|
188
191
|
i0.ɵɵtext(22);
|
|
189
192
|
i0.ɵɵelementEnd()();
|
|
190
|
-
i0.ɵɵelementStart(23, "div",
|
|
193
|
+
i0.ɵɵelementStart(23, "div", 51);
|
|
191
194
|
i0.ɵɵlistener("click", function SkipChatComponent_div_10_Template_div_click_23_listener() { i0.ɵɵrestoreView(_r13); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.sendPrompt(ctx_r2.WelcomeQuestions[3].prompt)); });
|
|
192
|
-
i0.ɵɵelementStart(24, "span",
|
|
195
|
+
i0.ɵɵelementStart(24, "span", 52);
|
|
193
196
|
i0.ɵɵtext(25);
|
|
194
197
|
i0.ɵɵelementEnd();
|
|
195
198
|
i0.ɵɵelementStart(26, "span");
|
|
@@ -217,46 +220,96 @@ function SkipChatComponent_div_10_Template(rf, ctx) { if (rf & 1) {
|
|
|
217
220
|
i0.ɵɵtextInterpolate(ctx_r2.WelcomeQuestions[3].bottomLine);
|
|
218
221
|
} }
|
|
219
222
|
function SkipChatComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
220
|
-
i0.ɵɵelementStart(0, "div",
|
|
223
|
+
i0.ɵɵelementStart(0, "div", 13);
|
|
221
224
|
i0.ɵɵelement(1, "kendo-loader");
|
|
222
225
|
i0.ɵɵelementEnd();
|
|
223
226
|
} }
|
|
224
227
|
function SkipChatComponent_span_13_Template(rf, ctx) { if (rf & 1) {
|
|
225
228
|
const _r14 = i0.ɵɵgetCurrentView();
|
|
226
|
-
i0.ɵɵelementStart(0, "span",
|
|
229
|
+
i0.ɵɵelementStart(0, "span", 53);
|
|
227
230
|
i0.ɵɵlistener("click", function SkipChatComponent_span_13_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.scrollToBottomAnimate()); });
|
|
228
|
-
i0.ɵɵelement(1, "i",
|
|
231
|
+
i0.ɵɵelement(1, "i", 54);
|
|
229
232
|
i0.ɵɵelementEnd();
|
|
230
233
|
} }
|
|
231
|
-
function
|
|
232
|
-
const
|
|
233
|
-
i0.ɵɵelementStart(0, "button",
|
|
234
|
-
i0.ɵɵlistener("click", function
|
|
234
|
+
function SkipChatComponent_Conditional_14_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
235
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
236
|
+
i0.ɵɵelementStart(0, "button", 58)(1, "span", 62);
|
|
237
|
+
i0.ɵɵlistener("click", function SkipChatComponent_Conditional_14_Conditional_5_Template_span_click_1_listener() { i0.ɵɵrestoreView(_r16); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.showDataContextDialog()); });
|
|
235
238
|
i0.ɵɵelementEnd()();
|
|
236
239
|
} }
|
|
237
|
-
function
|
|
238
|
-
const
|
|
239
|
-
i0.ɵɵelementStart(0, "
|
|
240
|
-
i0.ɵɵlistener("
|
|
240
|
+
function SkipChatComponent_Conditional_14_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
241
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
242
|
+
i0.ɵɵelementStart(0, "button", 61)(1, "span", 63);
|
|
243
|
+
i0.ɵɵlistener("click", function SkipChatComponent_Conditional_14_Conditional_8_Template_span_click_1_listener() { i0.ɵɵrestoreView(_r17); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.showSharingDialog()); });
|
|
244
|
+
i0.ɵɵelementEnd()();
|
|
245
|
+
} }
|
|
246
|
+
function SkipChatComponent_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
247
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
248
|
+
i0.ɵɵelementStart(0, "div", 16)(1, "div", 55)(2, "textarea", 56, 3);
|
|
249
|
+
i0.ɵɵlistener("keyup.enter", function SkipChatComponent_Conditional_14_Template_textarea_keyup_enter_2_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onEnter($event)); })("input", function SkipChatComponent_Conditional_14_Template_textarea_input_2_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputChange($event)); });
|
|
250
|
+
i0.ɵɵelementEnd()();
|
|
251
|
+
i0.ɵɵelementStart(4, "div", 57);
|
|
252
|
+
i0.ɵɵtemplate(5, SkipChatComponent_Conditional_14_Conditional_5_Template, 2, 0, "button", 58);
|
|
253
|
+
i0.ɵɵelementStart(6, "button", 59);
|
|
254
|
+
i0.ɵɵlistener("click", function SkipChatComponent_Conditional_14_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r15); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.sendSkipMessage()); });
|
|
255
|
+
i0.ɵɵelement(7, "span", 60);
|
|
256
|
+
i0.ɵɵelementEnd();
|
|
257
|
+
i0.ɵɵtemplate(8, SkipChatComponent_Conditional_14_Conditional_8_Template, 2, 0, "button", 61);
|
|
241
258
|
i0.ɵɵelementEnd()();
|
|
242
259
|
} if (rf & 2) {
|
|
243
260
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
261
|
+
i0.ɵɵadvance(2);
|
|
262
|
+
i0.ɵɵproperty("disabled", ctx_r2.SelectedConversation && ctx_r2.IsSkipProcessing(ctx_r2.SelectedConversation))("placeholder", ctx_r2._AskSkipTextboxPlaceholder);
|
|
263
|
+
i0.ɵɵadvance(2);
|
|
264
|
+
i0.ɵɵstyleProp("margin-left", -35 * ctx_r2.NumVisibleButtons, "px");
|
|
244
265
|
i0.ɵɵadvance();
|
|
266
|
+
i0.ɵɵconditional(ctx_r2.ShowDataContextButton ? 5 : -1);
|
|
267
|
+
i0.ɵɵadvance();
|
|
268
|
+
i0.ɵɵproperty("disabled", ctx_r2.IsTextAreaEmpty() || ctx_r2.SelectedConversation !== undefined && ctx_r2.IsSkipProcessing(ctx_r2.SelectedConversation));
|
|
269
|
+
i0.ɵɵadvance(2);
|
|
270
|
+
i0.ɵɵconditional(ctx_r2.ShowSharingButton && ctx_r2.SelectedConversationCurrentUserPermissionLevel === "Owner" ? 8 : -1);
|
|
271
|
+
} }
|
|
272
|
+
function SkipChatComponent_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
273
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
274
|
+
i0.ɵɵelementStart(0, "mj-data-context-dialog", 64);
|
|
275
|
+
i0.ɵɵlistener("dialogClosed", function SkipChatComponent_Conditional_15_Template_mj_data_context_dialog_dialogClosed_0_listener() { i0.ɵɵrestoreView(_r18); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.closeDataContextDialog()); });
|
|
276
|
+
i0.ɵɵelementEnd();
|
|
277
|
+
} if (rf & 2) {
|
|
278
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
245
279
|
i0.ɵɵproperty("dataContextId", ctx_r2.DataContextID)("Provider", ctx_r2.ProviderToUse);
|
|
246
280
|
} }
|
|
247
|
-
function
|
|
248
|
-
const
|
|
249
|
-
i0.ɵɵelementStart(0, "kendo-dialog",
|
|
250
|
-
i0.ɵɵlistener("close", function
|
|
251
|
-
i0.ɵɵ
|
|
281
|
+
function SkipChatComponent_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
282
|
+
const _r19 = i0.ɵɵgetCurrentView();
|
|
283
|
+
i0.ɵɵelementStart(0, "kendo-dialog", 65);
|
|
284
|
+
i0.ɵɵlistener("close", function SkipChatComponent_Conditional_16_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.closeSharingDialog("no")); });
|
|
285
|
+
i0.ɵɵelement(1, "mj-resource-permissions", 66, 4);
|
|
286
|
+
i0.ɵɵelementStart(3, "kendo-dialog-actions")(4, "button", 67);
|
|
287
|
+
i0.ɵɵlistener("click", function SkipChatComponent_Conditional_16_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.closeSharingDialog("yes")); });
|
|
288
|
+
i0.ɵɵtext(5, " Save ");
|
|
289
|
+
i0.ɵɵelementEnd();
|
|
290
|
+
i0.ɵɵelementStart(6, "button", 68);
|
|
291
|
+
i0.ɵɵlistener("click", function SkipChatComponent_Conditional_16_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.closeSharingDialog("no")); });
|
|
292
|
+
i0.ɵɵtext(7, " Cancel ");
|
|
293
|
+
i0.ɵɵelementEnd()()();
|
|
294
|
+
} if (rf & 2) {
|
|
295
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
296
|
+
i0.ɵɵproperty("width", 650)("height", 400);
|
|
297
|
+
i0.ɵɵadvance();
|
|
298
|
+
i0.ɵɵproperty("Provider", ctx_r2.Provider)("ResourceTypeID", ctx_r2.conversationResourceTypeID)("ResourceRecordID", ctx_r2.SelectedConversation.ID)("ExcludedRoleNames", ctx_r2.SharingExcludeRoleNames)("ExcludedUserEmails", ctx_r2.SharingExcludeEmails);
|
|
299
|
+
} }
|
|
300
|
+
function SkipChatComponent_kendo_dialog_17_Template(rf, ctx) { if (rf & 1) {
|
|
301
|
+
const _r20 = i0.ɵɵgetCurrentView();
|
|
302
|
+
i0.ɵɵelementStart(0, "kendo-dialog", 69);
|
|
303
|
+
i0.ɵɵlistener("close", function SkipChatComponent_kendo_dialog_17_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r20); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.closeDeleteConversation("no")); });
|
|
304
|
+
i0.ɵɵelementStart(1, "p", 70);
|
|
252
305
|
i0.ɵɵtext(2);
|
|
253
306
|
i0.ɵɵelementEnd();
|
|
254
|
-
i0.ɵɵelementStart(3, "kendo-dialog-actions")(4, "button",
|
|
255
|
-
i0.ɵɵlistener("click", function
|
|
307
|
+
i0.ɵɵelementStart(3, "kendo-dialog-actions")(4, "button", 67);
|
|
308
|
+
i0.ɵɵlistener("click", function SkipChatComponent_kendo_dialog_17_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r20); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.closeDeleteConversation("yes")); });
|
|
256
309
|
i0.ɵɵtext(5, " Yes ");
|
|
257
310
|
i0.ɵɵelementEnd();
|
|
258
|
-
i0.ɵɵelementStart(6, "button",
|
|
259
|
-
i0.ɵɵlistener("click", function
|
|
311
|
+
i0.ɵɵelementStart(6, "button", 68);
|
|
312
|
+
i0.ɵɵlistener("click", function SkipChatComponent_kendo_dialog_17_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r20); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.closeDeleteConversation("no")); });
|
|
260
313
|
i0.ɵɵtext(7, " No ");
|
|
261
314
|
i0.ɵɵelementEnd()()();
|
|
262
315
|
} if (rf & 2) {
|
|
@@ -265,19 +318,19 @@ function SkipChatComponent_kendo_dialog_22_Template(rf, ctx) { if (rf & 1) {
|
|
|
265
318
|
i0.ɵɵadvance(2);
|
|
266
319
|
i0.ɵɵtextInterpolate1(" Would you like to delete ", ctx_r2.SelectedConversation == null ? null : ctx_r2.SelectedConversation.Name, "? ");
|
|
267
320
|
} }
|
|
268
|
-
function
|
|
269
|
-
const
|
|
270
|
-
i0.ɵɵelementStart(0, "kendo-dialog",
|
|
271
|
-
i0.ɵɵlistener("close", function
|
|
272
|
-
i0.ɵɵelementStart(1, "p",
|
|
321
|
+
function SkipChatComponent_kendo_dialog_18_Template(rf, ctx) { if (rf & 1) {
|
|
322
|
+
const _r21 = i0.ɵɵgetCurrentView();
|
|
323
|
+
i0.ɵɵelementStart(0, "kendo-dialog", 69);
|
|
324
|
+
i0.ɵɵlistener("close", function SkipChatComponent_kendo_dialog_18_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r21); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.closeMessageEditOrDeleteDialog("no")); });
|
|
325
|
+
i0.ɵɵelementStart(1, "p", 70);
|
|
273
326
|
i0.ɵɵtext(2);
|
|
274
327
|
i0.ɵɵelementEnd();
|
|
275
|
-
i0.ɵɵelementStart(3, "kendo-dialog-actions")(4, "button",
|
|
276
|
-
i0.ɵɵlistener("click", function
|
|
328
|
+
i0.ɵɵelementStart(3, "kendo-dialog-actions")(4, "button", 67);
|
|
329
|
+
i0.ɵɵlistener("click", function SkipChatComponent_kendo_dialog_18_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r21); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.closeMessageEditOrDeleteDialog("yes")); });
|
|
277
330
|
i0.ɵɵtext(5, " Yes ");
|
|
278
331
|
i0.ɵɵelementEnd();
|
|
279
|
-
i0.ɵɵelementStart(6, "button",
|
|
280
|
-
i0.ɵɵlistener("click", function
|
|
332
|
+
i0.ɵɵelementStart(6, "button", 68);
|
|
333
|
+
i0.ɵɵlistener("click", function SkipChatComponent_kendo_dialog_18_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r21); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.closeMessageEditOrDeleteDialog("no")); });
|
|
281
334
|
i0.ɵɵtext(7, " No ");
|
|
282
335
|
i0.ɵɵelementEnd()()();
|
|
283
336
|
} if (rf & 2) {
|
|
@@ -287,6 +340,16 @@ function SkipChatComponent_kendo_dialog_23_Template(rf, ctx) { if (rf & 1) {
|
|
|
287
340
|
i0.ɵɵtextInterpolate1(" Would you like to ", ctx_r2.messageEditOrDeleteType, " this message? Doing so will result in any subsequent messages in the conversation being deleted. ");
|
|
288
341
|
} }
|
|
289
342
|
export class SkipChatComponent extends BaseAngularComponent {
|
|
343
|
+
set resourcePermissionsRef(component) {
|
|
344
|
+
if (component) {
|
|
345
|
+
// Component is instantiated
|
|
346
|
+
this.resourcePermissions = component;
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
// Component is destroyed
|
|
350
|
+
this.resourcePermissions = null;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
290
353
|
constructor(el, renderer, route, router, location, cdRef, notificationService) {
|
|
291
354
|
super();
|
|
292
355
|
this.el = el;
|
|
@@ -317,6 +380,7 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
317
380
|
* Set this property in order to set the user image. This can either be a URL or a Blob
|
|
318
381
|
*/
|
|
319
382
|
this.UserImage = undefined;
|
|
383
|
+
this.VerboseLogging = false;
|
|
320
384
|
/**
|
|
321
385
|
* If true, the component will update the browser URL when the conversation changes. If false, it will not update the URL. Default is true.
|
|
322
386
|
*/
|
|
@@ -325,6 +389,18 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
325
389
|
* When set to true, the small Skip logo is shown in the conversation list on the top left of the component
|
|
326
390
|
*/
|
|
327
391
|
this.ShowSkipLogoInConversationList = false;
|
|
392
|
+
/**
|
|
393
|
+
* When set to true, the component will show a sharing button that allows the user to share the conversation with others. Default is true.
|
|
394
|
+
*/
|
|
395
|
+
this.ShowSharingButton = true;
|
|
396
|
+
/**
|
|
397
|
+
* This array of role names will be excluded from the list of possible roles to share the conversation with.
|
|
398
|
+
*/
|
|
399
|
+
this.SharingExcludeRoleNames = [];
|
|
400
|
+
/**
|
|
401
|
+
* This array of emails will be excluded from the list of possible roles to share the conversation with.
|
|
402
|
+
*/
|
|
403
|
+
this.SharingExcludeEmails = [];
|
|
328
404
|
/**
|
|
329
405
|
* This property is used to set the placeholder text for the textbox where the user types their message to Skip.
|
|
330
406
|
*/
|
|
@@ -345,6 +421,7 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
345
421
|
* This event fires whenever a new report is created.
|
|
346
422
|
*/
|
|
347
423
|
this.NewReportCreated = new EventEmitter();
|
|
424
|
+
this.resourcePermissions = null;
|
|
348
425
|
/**
|
|
349
426
|
* Internal state variable to track if the conversation list is visible or not. Defaults to true. Conversation List only is shown if this is true and ShowConversationList is true.
|
|
350
427
|
*/
|
|
@@ -380,6 +457,7 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
380
457
|
prompt: 'I need help with marketing, can you help me analyze my data and then think about ways to segment my audience and build campaigns to improve revenue and retention?',
|
|
381
458
|
},
|
|
382
459
|
];
|
|
460
|
+
this.conversationResourceTypeID = undefined;
|
|
383
461
|
this._initialLoadComplete = false;
|
|
384
462
|
this._isLoading = false;
|
|
385
463
|
this._numLoads = 0;
|
|
@@ -390,9 +468,11 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
390
468
|
this._scrollToBottom = false;
|
|
391
469
|
this._oldConvoName = '';
|
|
392
470
|
this.confirmDeleteConversationDialogOpen = false;
|
|
471
|
+
this.SelectedConversationCurrentUserPermissionLevel = null;
|
|
393
472
|
this._usedStartMessages = [];
|
|
394
473
|
this._processingStatus = {};
|
|
395
474
|
this.isDataContextDialogVisible = false;
|
|
475
|
+
this.isSharingDialogVisible = false;
|
|
396
476
|
this.confirmMessageEditOrDeleteDialogOpen = false;
|
|
397
477
|
this.messageEditOrDeleteType = 'edit';
|
|
398
478
|
}
|
|
@@ -417,9 +497,10 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
417
497
|
// picking them up and broadcasting via MJ Events, we need this. If we get both, that's okay too as the update will not look any different and be
|
|
418
498
|
// near instant from the user's perspective.
|
|
419
499
|
this.ProviderToUse.PushStatusUpdates().subscribe((status) => {
|
|
500
|
+
this.LogVerbose('Push status update received in Skip Chat: ' + JSON.stringify(status));
|
|
420
501
|
if (status && status.message) {
|
|
421
502
|
const statusObj = SafeJSONParse(status.message);
|
|
422
|
-
if (statusObj) {
|
|
503
|
+
if (statusObj && statusObj.type === 'AskSkip') {
|
|
423
504
|
this.HandlePushStatusUpdate(statusObj);
|
|
424
505
|
}
|
|
425
506
|
}
|
|
@@ -429,6 +510,11 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
429
510
|
LogError(e);
|
|
430
511
|
}
|
|
431
512
|
}
|
|
513
|
+
LogVerbose(message) {
|
|
514
|
+
if (this.VerboseLogging) {
|
|
515
|
+
LogStatus(message);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
432
518
|
HandlePushStatusUpdate(statusObj) {
|
|
433
519
|
var _a, _b, _c;
|
|
434
520
|
try {
|
|
@@ -438,11 +524,24 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
438
524
|
if (obj.conversationID === ((_c = this.SelectedConversation) === null || _c === void 0 ? void 0 : _c.ID)) {
|
|
439
525
|
if (obj.message && obj.message.length > 0) {
|
|
440
526
|
// we are in the midst of a possibly long running process for Skip, and we got a message here, so go ahead and display it in the temporary message
|
|
527
|
+
this.LogVerbose(`Skip Chat: Received Push Status for conversation ${obj.conversationID} with message: ${obj.message}`);
|
|
441
528
|
this.SetSkipStatusMessage(obj.message, 0);
|
|
442
529
|
}
|
|
530
|
+
else {
|
|
531
|
+
this.LogVerbose(`Skip Chat: Received Push Status but no message for conversation ${obj.conversationID}`);
|
|
532
|
+
}
|
|
443
533
|
}
|
|
534
|
+
else {
|
|
535
|
+
this.LogVerbose(`Skip Chat: Received Push Status for conversation ${obj.conversationID} but it's not the current conversation`);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
else {
|
|
539
|
+
this.LogVerbose(`Skip Chat: Received Push Status for conversation ${obj.conversationID} but it's not in progress in this instance of the SkipChat component. Current conversations in progress: ${JSON.stringify(this._conversationsInProgress)} `);
|
|
444
540
|
}
|
|
445
541
|
}
|
|
542
|
+
else {
|
|
543
|
+
this.LogVerbose(`Skip Chat: Received Push Status but it's not for AskSkip or not status of OK: ${JSON.stringify(statusObj)}`);
|
|
544
|
+
}
|
|
446
545
|
}
|
|
447
546
|
catch (e) {
|
|
448
547
|
LogError(e);
|
|
@@ -569,9 +668,15 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
569
668
|
yield this.Load();
|
|
570
669
|
});
|
|
571
670
|
}
|
|
671
|
+
get ResourcePermissionEngine() {
|
|
672
|
+
return ResourcePermissionEngine.GetProviderInstance(this.ProviderToUse, ResourcePermissionEngine);
|
|
673
|
+
}
|
|
572
674
|
Load() {
|
|
573
675
|
return __awaiter(this, arguments, void 0, function* (forceRefresh = false) {
|
|
676
|
+
var _a;
|
|
574
677
|
if (!this._initialLoadComplete || forceRefresh) {
|
|
678
|
+
yield this.ResourcePermissionEngine.Config(false, this.ProviderToUse.CurrentUser, this.ProviderToUse);
|
|
679
|
+
this.conversationResourceTypeID = (_a = this.ResourcePermissionEngine.ResourceTypes.find((rt) => rt.Name === 'Conversations')) === null || _a === void 0 ? void 0 : _a.ID;
|
|
575
680
|
MJGlobal.Instance.ObjectCache.Remove('Conversations'); // clear the cache so we reload the conversations
|
|
576
681
|
if (this.paramsSubscription) {
|
|
577
682
|
this.paramsSubscription.unsubscribe();
|
|
@@ -682,20 +787,34 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
682
787
|
else {
|
|
683
788
|
this.Conversations = cachedConversations.filter((c) => !(c.LinkedEntity && c.LinkedEntity.length > 0 && c.LinkedRecordID && c.LinkedRecordID.length > 0)); // filter OUT linked conversations
|
|
684
789
|
}
|
|
685
|
-
if (this.Conversations.length === 0) {
|
|
686
|
-
// no conversations, so create a new one
|
|
790
|
+
if (this.Conversations.length === 0 && !conversationIdToLoad) {
|
|
791
|
+
// no conversations, so create a new one, BUT ONLY IF we weren't asked to load a specific conversation
|
|
792
|
+
// that can happen when a given user doesn't have their own conversations, but they are trying to view a shared conversation
|
|
687
793
|
yield this.CreateNewConversation();
|
|
688
794
|
InvokeManualResize(1);
|
|
689
795
|
}
|
|
690
796
|
else if (conversationIdToLoad) {
|
|
691
|
-
// we
|
|
797
|
+
// we are being asked to load a specific conversation
|
|
692
798
|
const convo = this.Conversations.find((c) => c.ID == conversationIdToLoad);
|
|
693
799
|
if (convo) {
|
|
694
800
|
yield this.SelectConversation(convo);
|
|
695
801
|
}
|
|
696
802
|
else {
|
|
697
|
-
// we didn't find the conversation so
|
|
698
|
-
yield this.
|
|
803
|
+
// we didn't find the conversation so check to see if it exists at all, could be a shared conversation
|
|
804
|
+
const sharedConvo = yield this.LoadSingleConversation(conversationIdToLoad);
|
|
805
|
+
if (sharedConvo) {
|
|
806
|
+
yield this.SelectConversation(sharedConvo);
|
|
807
|
+
}
|
|
808
|
+
else {
|
|
809
|
+
// no shared conversation, load the first conversation but alert user that the convo they tried to load isn't available
|
|
810
|
+
this.notificationService.CreateSimpleNotification(`Conversation ${conversationIdToLoad} not found`, 'error', 5000);
|
|
811
|
+
if (this.Conversations.length > 0) {
|
|
812
|
+
yield this.SelectConversation(this.Conversations[0]);
|
|
813
|
+
}
|
|
814
|
+
else {
|
|
815
|
+
yield this.CreateNewConversation();
|
|
816
|
+
}
|
|
817
|
+
}
|
|
699
818
|
}
|
|
700
819
|
}
|
|
701
820
|
else {
|
|
@@ -706,6 +825,24 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
706
825
|
this._numLoads++;
|
|
707
826
|
});
|
|
708
827
|
}
|
|
828
|
+
/**
|
|
829
|
+
* Loads a conversation from the database based on the conversation ID provided.
|
|
830
|
+
* @param conversationId
|
|
831
|
+
* @returns
|
|
832
|
+
*/
|
|
833
|
+
LoadSingleConversation(conversationId) {
|
|
834
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
835
|
+
const rv = new RunView(this.RunViewToUse);
|
|
836
|
+
const result = yield rv.RunView({
|
|
837
|
+
EntityName: 'Conversations',
|
|
838
|
+
ExtraFilter: `ID='${conversationId}'`,
|
|
839
|
+
ResultType: 'entity_object'
|
|
840
|
+
});
|
|
841
|
+
if (result && result.Success) {
|
|
842
|
+
return result.Results[0];
|
|
843
|
+
}
|
|
844
|
+
});
|
|
845
|
+
}
|
|
709
846
|
editConvo(conversation) {
|
|
710
847
|
this._oldConvoName = conversation.Name ? conversation.Name : '';
|
|
711
848
|
this.ConversationEditMode = true;
|
|
@@ -862,6 +999,55 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
862
999
|
onEnter(event) {
|
|
863
1000
|
this.sendSkipMessage();
|
|
864
1001
|
}
|
|
1002
|
+
/**
|
|
1003
|
+
* This method returns true if the specified user can access the conversation provided, otherwise false.
|
|
1004
|
+
* @param conversation
|
|
1005
|
+
*/
|
|
1006
|
+
UserCanAccessConversation(user, conversation) {
|
|
1007
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1008
|
+
if (!this.conversationResourceTypeID) {
|
|
1009
|
+
LogError('Resource type ID for conversations is not loaded - metadata loading error');
|
|
1010
|
+
return false;
|
|
1011
|
+
}
|
|
1012
|
+
if (!user || !conversation) {
|
|
1013
|
+
return false;
|
|
1014
|
+
}
|
|
1015
|
+
else {
|
|
1016
|
+
if (conversation.UserID === user.ID) {
|
|
1017
|
+
return true;
|
|
1018
|
+
}
|
|
1019
|
+
else {
|
|
1020
|
+
const level = yield this.GetUserConversationPermissionLevel(user, conversation);
|
|
1021
|
+
return level !== null;
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
/**
|
|
1027
|
+
* Returns the permission level of the user for the conversation provided.
|
|
1028
|
+
* @param user
|
|
1029
|
+
* @param conversation
|
|
1030
|
+
* @returns
|
|
1031
|
+
*/
|
|
1032
|
+
GetUserConversationPermissionLevel(user, conversation) {
|
|
1033
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1034
|
+
if (!this.conversationResourceTypeID) {
|
|
1035
|
+
LogError('Resource type ID for conversations is not loaded - metadata loading error');
|
|
1036
|
+
return null;
|
|
1037
|
+
}
|
|
1038
|
+
else {
|
|
1039
|
+
if (user.ID === conversation.UserID) {
|
|
1040
|
+
return 'Owner';
|
|
1041
|
+
}
|
|
1042
|
+
else {
|
|
1043
|
+
// check resource permissions for sharing
|
|
1044
|
+
const engine = this.ResourcePermissionEngine;
|
|
1045
|
+
yield engine.Config(false, this.ProviderToUse.CurrentUser, this.ProviderToUse);
|
|
1046
|
+
return engine.GetUserResourcePermissionLevel(this.conversationResourceTypeID, conversation.ID, user);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
865
1051
|
/**
|
|
866
1052
|
* Sets the currently displayed conversation to the one provided
|
|
867
1053
|
* @param conversation
|
|
@@ -873,8 +1059,24 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
873
1059
|
if (this.IsSkipProcessing(conversation)) {
|
|
874
1060
|
return; // already processing this conversation so don't go back and forth
|
|
875
1061
|
}
|
|
1062
|
+
// load up the conversation if not already the one that's loaded
|
|
876
1063
|
if (conversation && conversation.ID !== ((_a = this.SelectedConversation) === null || _a === void 0 ? void 0 : _a.ID)) {
|
|
877
|
-
//
|
|
1064
|
+
// check to see if the user has access to the conversation
|
|
1065
|
+
if (!(yield this.UserCanAccessConversation(this.ProviderToUse.CurrentUser, conversation))) {
|
|
1066
|
+
this.notificationService.CreateSimpleNotification(`You do not have access to conversation ${conversation.ID}`, 'error', 5000);
|
|
1067
|
+
if (!this.SelectedConversation) {
|
|
1068
|
+
if (this.Conversations.length > 0) {
|
|
1069
|
+
// no current convo selected, so select the first one in the list
|
|
1070
|
+
yield this.SelectConversation(this.Conversations[0]);
|
|
1071
|
+
}
|
|
1072
|
+
else {
|
|
1073
|
+
// doesn't have any conversations, so create a new one
|
|
1074
|
+
yield this.CreateNewConversation();
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
return;
|
|
1078
|
+
}
|
|
1079
|
+
this.SelectedConversationCurrentUserPermissionLevel = yield this.GetUserConversationPermissionLevel(this.ProviderToUse.CurrentUser, conversation);
|
|
878
1080
|
this._conversationLoadComplete = false;
|
|
879
1081
|
this.ClearMessages();
|
|
880
1082
|
const oldStatus = this.IsSkipProcessing(conversation);
|
|
@@ -1370,12 +1572,30 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
1370
1572
|
}
|
|
1371
1573
|
return false;
|
|
1372
1574
|
}
|
|
1373
|
-
|
|
1575
|
+
showDataContextDialog() {
|
|
1374
1576
|
this.isDataContextDialogVisible = true;
|
|
1375
1577
|
}
|
|
1376
1578
|
closeDataContextDialog() {
|
|
1377
1579
|
this.isDataContextDialogVisible = false;
|
|
1378
1580
|
}
|
|
1581
|
+
showSharingDialog() {
|
|
1582
|
+
this.isSharingDialogVisible = true;
|
|
1583
|
+
}
|
|
1584
|
+
closeSharingDialog(action) {
|
|
1585
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1586
|
+
if (action === 'yes' && this.resourcePermissions) {
|
|
1587
|
+
if (!(yield this.resourcePermissions.SavePermissions())) {
|
|
1588
|
+
// let the user know that sharing failed
|
|
1589
|
+
this.notificationService.CreateSimpleNotification('Failed to save permissions', 'error', 2500);
|
|
1590
|
+
}
|
|
1591
|
+
else {
|
|
1592
|
+
// let the user know that sharing was successful
|
|
1593
|
+
this.notificationService.CreateSimpleNotification('Conversation sharing settings updated', 'success', 1500);
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
this.isSharingDialogVisible = false;
|
|
1597
|
+
});
|
|
1598
|
+
}
|
|
1379
1599
|
CompositeKeyIsPopulated() {
|
|
1380
1600
|
return this.LinkedEntityCompositeKey.KeyValuePairs && this.LinkedEntityCompositeKey.KeyValuePairs.length > 0;
|
|
1381
1601
|
}
|
|
@@ -1488,6 +1708,14 @@ export class SkipChatComponent extends BaseAngularComponent {
|
|
|
1488
1708
|
}
|
|
1489
1709
|
});
|
|
1490
1710
|
}
|
|
1711
|
+
get NumVisibleButtons() {
|
|
1712
|
+
let count = 1;
|
|
1713
|
+
if (this.ShowDataContextButton)
|
|
1714
|
+
count++;
|
|
1715
|
+
if (this.ShowSharingButton && this.SelectedConversationCurrentUserPermissionLevel === 'Owner')
|
|
1716
|
+
count++;
|
|
1717
|
+
return count;
|
|
1718
|
+
}
|
|
1491
1719
|
}
|
|
1492
1720
|
SkipChatComponent.__skipChatWindowsCurrentlyVisible = 0;
|
|
1493
1721
|
SkipChatComponent._startMessages = [
|
|
@@ -1509,6 +1737,7 @@ SkipChatComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SkipChatC
|
|
|
1509
1737
|
i0.ɵɵviewQuery(_c3, 5);
|
|
1510
1738
|
i0.ɵɵviewQuery(_c4, 5);
|
|
1511
1739
|
i0.ɵɵviewQuery(_c5, 5);
|
|
1740
|
+
i0.ɵɵviewQuery(_c6, 5);
|
|
1512
1741
|
} if (rf & 2) {
|
|
1513
1742
|
let _t;
|
|
1514
1743
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.askSkip = _t.first);
|
|
@@ -1518,25 +1747,20 @@ SkipChatComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SkipChatC
|
|
|
1518
1747
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.askSkipInput = _t.first);
|
|
1519
1748
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.scrollContainer = _t.first);
|
|
1520
1749
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.topLevelDiv = _t.first);
|
|
1521
|
-
|
|
1750
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.resourcePermissionsRef = _t.first);
|
|
1751
|
+
} }, inputs: { AllowSend: "AllowSend", Messages: "Messages", Conversations: "Conversations", SelectedConversation: "SelectedConversation", ConversationEditMode: "ConversationEditMode", ShowConversationList: "ShowConversationList", AllowNewConversations: "AllowNewConversations", Title: "Title", DataContextID: "DataContextID", LinkedEntity: "LinkedEntity", LinkedEntityCompositeKey: "LinkedEntityCompositeKey", ShowDataContextButton: "ShowDataContextButton", IncludeLinkedConversationsInList: "IncludeLinkedConversationsInList", SkipLogoURL: "SkipLogoURL", SkipMarkOnlyLogoURL: "SkipMarkOnlyLogoURL", UserImage: "UserImage", VerboseLogging: "VerboseLogging", UpdateAppRoute: "UpdateAppRoute", ShowSkipLogoInConversationList: "ShowSkipLogoInConversationList", ShowSharingButton: "ShowSharingButton", SharingExcludeRoleNames: "SharingExcludeRoleNames", SharingExcludeEmails: "SharingExcludeEmails", DefaultTextboxPlaceholder: "DefaultTextboxPlaceholder", ProcessingTextBoxPlaceholder: "ProcessingTextBoxPlaceholder", WelcomeQuestions: "WelcomeQuestions", AutoLoad: "AutoLoad" }, outputs: { NavigateToMatchingReport: "NavigateToMatchingReport", ConversationSelected: "ConversationSelected", NewReportCreated: "NewReportCreated" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 19, vars: 12, consts: [["topLevelDiv", ""], ["AskSkipPanel", "", "scrollContainer", ""], ["conversationList", ""], ["AskSkipInput", ""], ["resourcePermissions", ""], ["mjFillContainer", "", 1, "chat-container", 3, "bottomMargin", "rightMargin"], [1, "layout"], [1, "left-panel"], [1, "fa-solid", "fa-table-columns", "toggle-icon"], [1, "right-panel"], ["mjFillContainer", "", 1, "conversation-wrapper"], [1, "messages", 3, "scroll"], ["class", "welcome-wrapper", 4, "ngIf"], [1, "loading-convo-messages-wrapper"], ["mjContainer", "", "mjSkipResize", "true"], ["class", "scroll-to-bottom-icon", 3, "click", 4, "ngIf"], [1, "input-area"], [3, "dataContextId", "Provider"], ["title", "Share Conversation", 3, "width", "height"], ["title", "Please confirm", 3, "minWidth", "width", "close", 4, "ngIf"], [1, "conversation-history"], [1, "new-chat-area"], [1, "fa-solid", "fa-table-columns", "toggle-icon", 3, "click"], [1, "avatar", 3, "src"], [1, "fa-solid", "fa-pen-to-square", "new-convo-icon"], ["mjFillContainer", "", 1, "conversation-list", 3, "data", "itemClass", "fillWidth", "bottomMargin"], ["kendoListViewItemTemplate", ""], [1, "fa-solid", "fa-pen-to-square", "new-convo-icon", 3, "click"], [1, "conversation-item", 3, "click", "ngClass", "title"], ["class", "fa-regular fa-clock", 4, "ngIf"], [1, "text-container"], [4, "ngIf"], ["maxlength", "100", 3, "ngModel", "ngModelChange", 4, "ngIf"], ["class", "edit-conversation-panel", 4, "ngIf"], [1, "fa-regular", "fa-clock"], ["maxlength", "100", 3, "ngModelChange", "ngModel"], [1, "edit-conversation-panel"], ["class", "fa-solid fa-pen-to-square", 3, "click", 4, "ngIf"], ["class", "fa-regular fa-trash-can", 3, "click", 4, "ngIf"], ["class", "fa-solid fa-check", 3, "click", 4, "ngIf"], ["class", "fa-solid fa-xmark", 3, "click", 4, "ngIf"], [1, "fa-solid", "fa-pen-to-square", 3, "click"], [1, "fa-regular", "fa-trash-can", 3, "click"], [1, "fa-solid", "fa-check", 3, "click"], [1, "fa-solid", "fa-xmark", 3, "click"], [1, "welcome-wrapper"], [1, "welcome-message"], [3, "src"], [1, "welcome-header-text"], [1, "welcome-suggested-questions"], [1, "welcome-suggested-questions-col"], [1, "welcome-question", 3, "click"], [1, "welcome-question-header"], [1, "scroll-to-bottom-icon", 3, "click"], [1, "fas", "fa-arrow-down"], [1, "text-area-wrapper"], ["type", "text", 3, "keyup.enter", "input", "disabled", "placeholder"], [1, "button-area"], ["kendoButton", ""], ["kendoButton", "", 3, "click", "disabled"], [1, "fas", "fa-solid", "fa-arrow-up"], ["kendoButton", "", 1, "share-button"], [1, "fa-solid", "fa-gear", 3, "click"], [1, "fa-solid", "fa-share", 3, "click"], [3, "dialogClosed", "dataContextId", "Provider"], ["title", "Share Conversation", 3, "close", "width", "height"], [3, "Provider", "ResourceTypeID", "ResourceRecordID", "ExcludedRoleNames", "ExcludedUserEmails"], ["kendoButton", "", "themeColor", "primary", 3, "click"], ["kendoButton", "", 3, "click"], ["title", "Please confirm", 3, "close", "minWidth", "width"], [2, "margin", "30px", "text-align", "center"]], template: function SkipChatComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1522
1752
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
1523
|
-
i0.ɵɵelementStart(0, "div",
|
|
1524
|
-
i0.ɵɵtemplate(3, SkipChatComponent_Conditional_3_Template, 9, 9, "div",
|
|
1525
|
-
i0.ɵɵelementStart(5, "div",
|
|
1753
|
+
i0.ɵɵelementStart(0, "div", 5, 0)(2, "div", 6);
|
|
1754
|
+
i0.ɵɵtemplate(3, SkipChatComponent_Conditional_3_Template, 9, 9, "div", 7)(4, SkipChatComponent_Conditional_4_Template, 1, 0, "span", 8);
|
|
1755
|
+
i0.ɵɵelementStart(5, "div", 9)(6, "div", 10)(7, "div", 11, 1);
|
|
1526
1756
|
i0.ɵɵlistener("scroll", function SkipChatComponent_Template_div_scroll_7_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.checkScroll()); });
|
|
1527
|
-
i0.ɵɵtemplate(10, SkipChatComponent_div_10_Template, 28, 9, "div",
|
|
1528
|
-
i0.ɵɵelement(12, "div",
|
|
1529
|
-
i0.ɵɵtemplate(13, SkipChatComponent_span_13_Template, 2, 0, "span",
|
|
1757
|
+
i0.ɵɵtemplate(10, SkipChatComponent_div_10_Template, 28, 9, "div", 12)(11, SkipChatComponent_Conditional_11_Template, 2, 0, "div", 13);
|
|
1758
|
+
i0.ɵɵelement(12, "div", 14);
|
|
1759
|
+
i0.ɵɵtemplate(13, SkipChatComponent_span_13_Template, 2, 0, "span", 15);
|
|
1530
1760
|
i0.ɵɵelementEnd();
|
|
1531
|
-
i0.ɵɵ
|
|
1532
|
-
i0.ɵɵ
|
|
1533
|
-
i0.ɵɵ
|
|
1534
|
-
i0.ɵɵtemplate(18, SkipChatComponent_Conditional_18_Template, 2, 0, "button", 18);
|
|
1535
|
-
i0.ɵɵelementStart(19, "button", 19);
|
|
1536
|
-
i0.ɵɵlistener("click", function SkipChatComponent_Template_button_click_19_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.sendSkipMessage()); });
|
|
1537
|
-
i0.ɵɵelement(20, "span", 20);
|
|
1538
|
-
i0.ɵɵelementEnd()()()()()();
|
|
1539
|
-
i0.ɵɵtemplate(21, SkipChatComponent_div_21_Template, 2, 2, "div", 21)(22, SkipChatComponent_kendo_dialog_22_Template, 8, 3, "kendo-dialog", 22)(23, SkipChatComponent_kendo_dialog_23_Template, 8, 3, "kendo-dialog", 22);
|
|
1761
|
+
i0.ɵɵtemplate(14, SkipChatComponent_Conditional_14_Template, 9, 7, "div", 16);
|
|
1762
|
+
i0.ɵɵelementEnd()()()();
|
|
1763
|
+
i0.ɵɵtemplate(15, SkipChatComponent_Conditional_15_Template, 1, 2, "mj-data-context-dialog", 17)(16, SkipChatComponent_Conditional_16_Template, 8, 7, "kendo-dialog", 18)(17, SkipChatComponent_kendo_dialog_17_Template, 8, 3, "kendo-dialog", 19)(18, SkipChatComponent_kendo_dialog_18_Template, 8, 3, "kendo-dialog", 19);
|
|
1540
1764
|
} if (rf & 2) {
|
|
1541
1765
|
i0.ɵɵproperty("bottomMargin", 10)("rightMargin", 10);
|
|
1542
1766
|
i0.ɵɵadvance(3);
|
|
@@ -1549,22 +1773,20 @@ SkipChatComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SkipChatC
|
|
|
1549
1773
|
i0.ɵɵconditional(!ctx._conversationLoadComplete ? 11 : -1);
|
|
1550
1774
|
i0.ɵɵadvance(2);
|
|
1551
1775
|
i0.ɵɵproperty("ngIf", ctx._showScrollToBottomIcon && ctx.Messages && ctx.Messages.length > 0);
|
|
1552
|
-
i0.ɵɵadvance(3);
|
|
1553
|
-
i0.ɵɵproperty("disabled", ctx.SelectedConversation && ctx.IsSkipProcessing(ctx.SelectedConversation))("placeholder", ctx._AskSkipTextboxPlaceholder);
|
|
1554
|
-
i0.ɵɵadvance(2);
|
|
1555
|
-
i0.ɵɵconditional(ctx.ShowDataContextButton ? 18 : -1);
|
|
1556
1776
|
i0.ɵɵadvance();
|
|
1557
|
-
i0.ɵɵ
|
|
1558
|
-
i0.ɵɵadvance(
|
|
1559
|
-
i0.ɵɵ
|
|
1777
|
+
i0.ɵɵconditional(ctx.SelectedConversationCurrentUserPermissionLevel === "Owner" || ctx.SelectedConversationCurrentUserPermissionLevel === "Edit" ? 14 : -1);
|
|
1778
|
+
i0.ɵɵadvance();
|
|
1779
|
+
i0.ɵɵconditional(ctx.isDataContextDialogVisible ? 15 : -1);
|
|
1780
|
+
i0.ɵɵadvance();
|
|
1781
|
+
i0.ɵɵconditional(ctx.isSharingDialogVisible && ctx.SelectedConversation && ctx.conversationResourceTypeID ? 16 : -1);
|
|
1560
1782
|
i0.ɵɵadvance();
|
|
1561
1783
|
i0.ɵɵproperty("ngIf", ctx.confirmDeleteConversationDialogOpen);
|
|
1562
1784
|
i0.ɵɵadvance();
|
|
1563
1785
|
i0.ɵɵproperty("ngIf", ctx.confirmMessageEditOrDeleteDialogOpen);
|
|
1564
|
-
} }, dependencies: [i2.NgClass, i2.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.MaxLengthValidator, i4.NgModel, i5.LoaderComponent, i6.DialogComponent, i6.DialogActionsComponent, i7.FillContainer, i7.Container, i8.ItemTemplateDirective, i8.ListViewComponent, i9.ButtonComponent, i10.DataContextDialogComponent], styles: [".layout[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: row; \n\n height: 100%; \n\n width: 100%; \n\n position: relative;\n}\n\n.left-panel[_ngcontent-%COMP%] {\n width: 272px; \n\n background-color: #f8f9fa; \n\n border-right: 1px solid #ddd; \n\n overflow-y: auto; \n\n overflow-x: hidden; \n\n position: relative;\n\n scrollbar-width: thin; \n\n scrollbar-color: #d3d3d3 #f8f9fa; \n\n}\n\n\n\n.left-panel[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 8px; \n\n background-color: #f8f9fa; \n\n}\n\n.left-panel[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background-color: #d3d3d3; \n\n border-radius: 4px; \n\n}\n\n.left-panel[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background-color: #c0c0c0; \n\n}\n\n.left-panel[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background-color: #f8f9fa; \n\n}\n\n.right-panel[_ngcontent-%COMP%] {\n flex: 1; \n\n overflow-y: auto; \n\n}\n\n\n.new-convo-icon[_ngcontent-%COMP%] {\n color: #808080; \n\n font-size: 18px; \n\n cursor: pointer; \n\n z-index: 10; \n\n padding: 5px;\n border-radius: 4px;\n}\n\n.toggle-icon[_ngcontent-%COMP%] {\n color: #808080; \n\n font-size: 18px; \n\n cursor: pointer; \n\n z-index: 10; \n\n margin-left: 6px;\n padding: 3px;\n border-radius: 3px;\n}\n \n\n.right-panel[_ngcontent-%COMP%] .toggle-icon[_ngcontent-%COMP%] {\n margin-left: 3px;\n margin-top: 2px;\n position: absolute;\n top: 10px;\n left: auto;\n right: 10px; \n\n}\n\n\n.chat-container[_ngcontent-%COMP%] {\n padding: 5px;\n display: flex;\n flex-direction: row;\n height: 100%;\n font-family: S\u00F6hne, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, Ubuntu, Cantarell, \"Noto Sans\", sans-serif, \"Helvetica Neue\", Arial, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n font-size: 1rem;\n\n \n\n width: 100%;\n height: 100%;\n\n background-color: #f9f9f9;\n}\n\n.conversation-wrapper[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n position: relative; \n\n background-color: #f9f9f9;\n}\n\n.new-conversation[_ngcontent-%COMP%] {\n height: 30px;\n font-size: large;\n}\n\n.conversation-history[_ngcontent-%COMP%] {\n width: 240px;\n min-width: 240px;\n height: 95%;\n overflow-y: auto; \n\n overflow-x: hidden; \n\n margin-right: 10px;\n padding-top: 5px;\n background-color: #f9f9f9;\n margin-top: 0px; \n padding: 12px; \n}\n\n.k-tabstrip-content-for-skip[_ngcontent-%COMP%] {\n padding: 0;\n padding-block: 0;\n}\n\n\n.conversation-history[_ngcontent-%COMP%] > button[_ngcontent-%COMP%] {\n height: 25px;\n}\n\n.skip-title[_ngcontent-%COMP%] {\n font-size: larger;\n margin-bottom: 5px;\n height: 20px;\n margin-top: 5px;\n}\n\n.conversation-list[_ngcontent-%COMP%] {\n margin-top: 5px;\n padding-top: 5px;\n \n border: 0;\n background-color: #f9f9f9;\n}\n\n\n\n\n\n.welcome-wrapper[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n overflow: hidden;\n}\n\n.welcome-message[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n overflow: hidden;\n height: 100%;\n}\n\n.embedded-conversations[_ngcontent-%COMP%] {\n margin-left: 3px;\n margin-top: 5px;\n font-size: 10pt;\n color: rgb(48, 48, 235);\n}\n.embedded-conversations[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] {\n margin-top: 4px;\n margin-left: 5px;\n cursor: pointer;\n}\n.conversation-item-linked[_ngcontent-%COMP%] {\n color: rgb(48, 48, 235);\n}\n\n.welcome-message[_ngcontent-%COMP%] img[_ngcontent-%COMP%] {\n width: 120px;\n height: 50px;\n margin-bottom: 20px; \n\n}\n\n.welcome-header-text[_ngcontent-%COMP%] {\n font-size: larger;\n font-weight: bold;\n}\n\n\n\n.welcome-suggested-questions[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-content: center;\n}\n.welcome-suggested-questions-col[_ngcontent-%COMP%] {\n display: flex;\n}\n\n\n\n.welcome-question[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column; \n\n align-items: left;;\n width: 300px; \n justify-content: space-between;\n margin: 5px; \n\n border: solid 1px rgba(41, 28, 28, 0.08);\n border-radius: 15px;\n padding: 10px;\n cursor: pointer;\n}\n\n.welcome-question[_ngcontent-%COMP%]:hover {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n\n.welcome-question-header[_ngcontent-%COMP%] {\n font-size: 12pt;\n font-weight: bold;\n display: block; \n\n}\n\n\n\n.welcome-question[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:not(.welcome-question-header) {\n font-weight: normal;\n font-size: 10pt;\n}\n\n\n.messages[_ngcontent-%COMP%] {\n overflow-y: auto; \n\n overflow-x: hidden; \n\n \n\n margin-bottom: 5px;\n\n margin-top: 2px; \n\n\n background-color: #f9f9f9;\n flex: 1;\n scrollbar-width: thin; \n\n scrollbar-color: #d3d3d3 #f8f9fa; \n\n}\n\n\n\n.messages[_ngcontent-%COMP%]::-webkit-scrollbar {\nwidth: 8px; \n\nbackground-color: #f8f9fa; \n\n}\n\n.messages[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\nbackground-color: #d3d3d3; \n\nborder-radius: 4px; \n\n}\n\n.messages[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\nbackground-color: #c0c0c0; \n\n}\n\n.messages[_ngcontent-%COMP%]::-webkit-scrollbar-track {\nbackground-color: #f8f9fa; \n\n}\n\n\n\n.new-chat-area[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between; \n\n align-items: center; \n\n}\n.avatar[_ngcontent-%COMP%] {\n max-height: 24px;\n margin-right: 10px;\n margin-left: 5px;\n margin-bottom: 3px;\n \n\n margin-right: auto; \n\n}\n\n.conversation-item[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-right: 5px;\n padding-top: 10px;\n padding-bottom: 10px;\n padding-left: 5px;\n padding-right: 5px;\n border-radius: 5px;\n cursor: pointer;\n overflow: hidden;\n max-height: 150px;\n font-size: 14px;\n\n display: flex;\n align-items: flex-start; \n\n\n flex-wrap: wrap; \n\n}\n\n.text-container[_ngcontent-%COMP%] {\n flex: 1; \n\n display: flex;\n flex-direction: column; \n\n}\n\n.text-container[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] {\n resize: none; \n\n \n\n}\n\n.conversation-item[_ngcontent-%COMP%] > .conversation-icon[_ngcontent-%COMP%] {\n margin-top: 3px;\n}\n\n.conversation-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n display: inline-block;\n white-space: pre-wrap; \n\n overflow: auto;\n word-wrap: break-word;\n margin-left: 3px; \n\n}\n\n.conversation-item[_ngcontent-%COMP%]:hover {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.conversation-item-selected[_ngcontent-%COMP%] {\n background-color: rgba(0, 0, 0, 0.15);\n}\n\n\n.conversation-item[_ngcontent-%COMP%] > .conversation-icon[_ngcontent-%COMP%] {\n margin-right: 11px;\n}\n.edit-conversation-panel[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end; \n\n margin-top: 2px; \n\n margin-right: 2px; \n\n}\n.edit-conversation-panel[_ngcontent-%COMP%] > .k-icon[_ngcontent-%COMP%] {\n margin-left: 5px;\n cursor: pointer;\n}\n.edit-conversation-panel[_ngcontent-%COMP%] > .k-icon[_ngcontent-%COMP%]:hover {\n color: #ff0000;\n}\n\n\n\n.input-area[_ngcontent-%COMP%] {\n min-height: 35px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 15px;\n}\n\n.input-area[_ngcontent-%COMP%] > button[_ngcontent-%COMP%] {\n vertical-align: top;\n width: 30px;\n height: 30px;\n margin-top: 3px;\n border-radius: 12px;\n}\n.input-area[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:first-of-type {\n margin-left: -40px;\n}\n.input-area[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:last-child {\n margin-left: -65px;\n}\n\n.text-area-wrapper[_ngcontent-%COMP%] {\n padding: 3px;\n border: solid 1px rgba(0, 0, 0, 0.08) ;\n border-radius: 15px;\n\n margin-top: 4px;\n margin-right: -1px;\n min-height: 42px;\n max-height: 100%; \n\n\n overflow: hidden; \n align-items: center;\n\n \n\n width: 710px; \n padding-right: 90px\n} \n.text-area-wrapper[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%] {\n border: 0;\n outline: 0;\n resize: none;\n\n min-height: 20px; \n\n\n width: 100%;\n overflow-y: hidden; \n\n\n font-family: S\u00F6hne, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, Ubuntu, Cantarell, \"Noto Sans\", sans-serif, \"Helvetica Neue\", Arial, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n font-size: 1rem;\n\n margin-left: 7px;\n margin-top: 7px;\n margin-bottom: 5px;\n\n background-color: #f9f9f9;\n}\n\n\n\n\n\n\n.input-wrapper[_ngcontent-%COMP%] {\n flex-grow: 1; \n\n height: 100%;\n}\n\n.waiting-for-ai[_ngcontent-%COMP%] {\n position: absolute;\n display: flex; \n\n bottom: 100px;\n z-index: 999;\n left: 10px; \n}\n \n.scroll-to-bottom-icon[_ngcontent-%COMP%] {\n position: absolute;\n bottom: 100px; \n\n left: 50%; \n\n transform: translateX(-50%); \n\n z-index: 1000; \n\n background-color: white; \n\n color: black; \n\n border-radius: 50%; \n\n width: 40px; \n\n height: 40px; \n\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: 0px 0px 5px rgba(0,0,0,0.3); \n\n cursor: pointer;\n}\n\n.loading-convo-messages-wrapper[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n position: absolute;\n z-index: 1000;\n}\n\n@media (min-width: 600px) {\n .welcome-suggested-questions[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap; \n\n align-content: flex-end; \n\n }\n}"] });
|
|
1786
|
+
} }, dependencies: [i2.NgClass, i2.NgIf, i4.DefaultValueAccessor, i4.NgControlStatus, i4.MaxLengthValidator, i4.NgModel, i5.LoaderComponent, i6.DialogComponent, i6.DialogActionsComponent, i7.FillContainer, i7.Container, i8.ItemTemplateDirective, i8.ListViewComponent, i9.ButtonComponent, i10.DataContextDialogComponent, i11.ResourcePermissionsComponent], styles: [".layout[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: row; \n\n height: 100%; \n\n width: 100%; \n\n position: relative;\n}\n\n.left-panel[_ngcontent-%COMP%] {\n width: 272px; \n\n background-color: #f8f9fa; \n\n border-right: 1px solid #ddd; \n\n overflow-y: auto; \n\n overflow-x: hidden; \n\n position: relative;\n\n scrollbar-width: thin; \n\n scrollbar-color: #d3d3d3 #f8f9fa; \n\n}\n\n\n\n.left-panel[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 8px; \n\n background-color: #f8f9fa; \n\n}\n\n.left-panel[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background-color: #d3d3d3; \n\n border-radius: 4px; \n\n}\n\n.left-panel[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background-color: #c0c0c0; \n\n}\n\n.left-panel[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background-color: #f8f9fa; \n\n}\n\n.right-panel[_ngcontent-%COMP%] {\n flex: 1; \n\n overflow-y: auto; \n\n}\n\n\n.new-convo-icon[_ngcontent-%COMP%] {\n color: #808080; \n\n font-size: 18px; \n\n cursor: pointer; \n\n z-index: 10; \n\n padding: 5px;\n border-radius: 4px;\n}\n\n.toggle-icon[_ngcontent-%COMP%] {\n color: #808080; \n\n font-size: 18px; \n\n cursor: pointer; \n\n z-index: 10; \n\n margin-left: 6px;\n padding: 3px;\n border-radius: 3px;\n}\n \n\n.right-panel[_ngcontent-%COMP%] .toggle-icon[_ngcontent-%COMP%] {\n margin-left: 3px;\n margin-top: 2px;\n position: absolute;\n top: 10px;\n left: auto;\n right: 10px; \n\n}\n\n\n.chat-container[_ngcontent-%COMP%] {\n padding: 5px;\n display: flex;\n flex-direction: row;\n height: 100%;\n font-family: S\u00F6hne, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, Ubuntu, Cantarell, \"Noto Sans\", sans-serif, \"Helvetica Neue\", Arial, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n font-size: 1rem;\n\n \n\n width: 100%;\n height: 100%;\n\n background-color: #f9f9f9;\n}\n\n.conversation-wrapper[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n position: relative; \n\n background-color: #f9f9f9;\n}\n\n.new-conversation[_ngcontent-%COMP%] {\n height: 30px;\n font-size: large;\n}\n\n.conversation-history[_ngcontent-%COMP%] {\n width: 240px;\n min-width: 240px;\n height: 95%;\n overflow-y: auto; \n\n overflow-x: hidden; \n\n margin-right: 10px;\n padding-top: 5px;\n background-color: #f9f9f9;\n margin-top: 0px; \n padding: 12px; \n}\n\n.k-tabstrip-content-for-skip[_ngcontent-%COMP%] {\n padding: 0;\n padding-block: 0;\n}\n\n\n.conversation-history[_ngcontent-%COMP%] > button[_ngcontent-%COMP%] {\n height: 25px;\n}\n\n.skip-title[_ngcontent-%COMP%] {\n font-size: larger;\n margin-bottom: 5px;\n height: 20px;\n margin-top: 5px;\n}\n\n.conversation-list[_ngcontent-%COMP%] {\n margin-top: 5px;\n padding-top: 5px;\n \n border: 0;\n background-color: #f9f9f9;\n}\n\n\n\n\n\n.welcome-wrapper[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n overflow: hidden;\n}\n\n.welcome-message[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n overflow: hidden;\n height: 100%;\n}\n\n.embedded-conversations[_ngcontent-%COMP%] {\n margin-left: 3px;\n margin-top: 5px;\n font-size: 10pt;\n color: rgb(48, 48, 235);\n}\n.embedded-conversations[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] {\n margin-top: 4px;\n margin-left: 5px;\n cursor: pointer;\n}\n.conversation-item-linked[_ngcontent-%COMP%] {\n color: rgb(48, 48, 235);\n}\n\n.welcome-message[_ngcontent-%COMP%] img[_ngcontent-%COMP%] {\n width: 120px;\n height: 50px;\n margin-bottom: 20px; \n\n}\n\n.welcome-header-text[_ngcontent-%COMP%] {\n font-size: larger;\n font-weight: bold;\n}\n\n\n\n.welcome-suggested-questions[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-content: center;\n}\n.welcome-suggested-questions-col[_ngcontent-%COMP%] {\n display: flex;\n}\n\n\n\n.welcome-question[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column; \n\n align-items: left;;\n width: 300px; \n justify-content: space-between;\n margin: 5px; \n\n border: solid 1px rgba(41, 28, 28, 0.08);\n border-radius: 15px;\n padding: 10px;\n cursor: pointer;\n}\n\n.welcome-question[_ngcontent-%COMP%]:hover {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n\n.welcome-question-header[_ngcontent-%COMP%] {\n font-size: 12pt;\n font-weight: bold;\n display: block; \n\n}\n\n\n\n.welcome-question[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:not(.welcome-question-header) {\n font-weight: normal;\n font-size: 10pt;\n}\n\n\n.messages[_ngcontent-%COMP%] {\n overflow-y: auto; \n\n overflow-x: hidden; \n\n \n\n margin-bottom: 5px;\n\n margin-top: 2px; \n\n\n background-color: #f9f9f9;\n flex: 1;\n scrollbar-width: thin; \n\n scrollbar-color: #d3d3d3 #f8f9fa; \n\n}\n\n\n\n.messages[_ngcontent-%COMP%]::-webkit-scrollbar {\nwidth: 8px; \n\nbackground-color: #f8f9fa; \n\n}\n\n.messages[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\nbackground-color: #d3d3d3; \n\nborder-radius: 4px; \n\n}\n\n.messages[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\nbackground-color: #c0c0c0; \n\n}\n\n.messages[_ngcontent-%COMP%]::-webkit-scrollbar-track {\nbackground-color: #f8f9fa; \n\n}\n\n\n\n.new-chat-area[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between; \n\n align-items: center; \n\n}\n.avatar[_ngcontent-%COMP%] {\n max-height: 24px;\n margin-right: 10px;\n margin-left: 5px;\n margin-bottom: 3px;\n \n\n margin-right: auto; \n\n}\n\n.conversation-item[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-right: 5px;\n padding-top: 10px;\n padding-bottom: 10px;\n padding-left: 5px;\n padding-right: 5px;\n border-radius: 5px;\n cursor: pointer;\n overflow: hidden;\n max-height: 150px;\n font-size: 14px;\n\n display: flex;\n align-items: flex-start; \n\n\n flex-wrap: wrap; \n\n}\n\n.text-container[_ngcontent-%COMP%] {\n flex: 1; \n\n display: flex;\n flex-direction: column; \n\n}\n\n.text-container[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] {\n resize: none; \n\n \n\n}\n\n.conversation-item[_ngcontent-%COMP%] > .conversation-icon[_ngcontent-%COMP%] {\n margin-top: 3px;\n}\n\n.conversation-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n display: inline-block;\n white-space: pre-wrap; \n\n overflow: auto;\n word-wrap: break-word;\n margin-left: 3px; \n\n}\n\n.conversation-item[_ngcontent-%COMP%]:hover {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.conversation-item-selected[_ngcontent-%COMP%] {\n background-color: rgba(0, 0, 0, 0.15);\n}\n\n\n.conversation-item[_ngcontent-%COMP%] > .conversation-icon[_ngcontent-%COMP%] {\n margin-right: 11px;\n}\n.edit-conversation-panel[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end; \n\n margin-top: 2px; \n\n margin-right: 2px; \n\n}\n.edit-conversation-panel[_ngcontent-%COMP%] > .k-icon[_ngcontent-%COMP%] {\n margin-left: 5px;\n cursor: pointer;\n}\n.edit-conversation-panel[_ngcontent-%COMP%] > .k-icon[_ngcontent-%COMP%]:hover {\n color: #ff0000;\n}\n\n\n\n.input-area[_ngcontent-%COMP%] {\n min-height: 35px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 15px;\n}\n\n.input-area[_ngcontent-%COMP%] > .button-area[_ngcontent-%COMP%] {\n vertical-align: top;\n margin-top: 3px;\n margin-left: -65px;\n}\n\n\n.button-area[_ngcontent-%COMP%] > button[_ngcontent-%COMP%] {\n width: 30px;\n height: 30px;\n border-radius: 12px;\n margin-left: 3px;\n}\n\n\n\n\n\n\n\n\n\n\n\n.text-area-wrapper[_ngcontent-%COMP%] {\n padding: 3px;\n border: solid 1px rgba(0, 0, 0, 0.08) ;\n border-radius: 15px;\n\n margin-top: 4px;\n margin-right: -1px;\n min-height: 42px;\n max-height: 100%; \n\n\n overflow: hidden; \n align-items: center;\n\n \n\n width: 710px; \n padding-right: 90px\n} \n.text-area-wrapper[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%] {\n border: 0;\n outline: 0;\n resize: none;\n\n min-height: 20px; \n\n\n width: 100%;\n overflow-y: hidden; \n\n\n font-family: S\u00F6hne, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, Ubuntu, Cantarell, \"Noto Sans\", sans-serif, \"Helvetica Neue\", Arial, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n font-size: 1rem;\n\n margin-left: 7px;\n margin-top: 7px;\n margin-bottom: 5px;\n\n background-color: #f9f9f9;\n}\n\n\n\n\n\n\n.input-wrapper[_ngcontent-%COMP%] {\n flex-grow: 1; \n\n height: 100%;\n}\n\n.waiting-for-ai[_ngcontent-%COMP%] {\n position: absolute;\n display: flex; \n\n bottom: 100px;\n z-index: 999;\n left: 10px; \n}\n \n.scroll-to-bottom-icon[_ngcontent-%COMP%] {\n position: absolute;\n bottom: 100px; \n\n left: 50%; \n\n transform: translateX(-50%); \n\n z-index: 1000; \n\n background-color: white; \n\n color: black; \n\n border-radius: 50%; \n\n width: 40px; \n\n height: 40px; \n\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: 0px 0px 5px rgba(0,0,0,0.3); \n\n cursor: pointer;\n}\n\n.loading-convo-messages-wrapper[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n position: absolute;\n z-index: 1000;\n}\n\n@media (min-width: 600px) {\n .welcome-suggested-questions[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap; \n\n align-content: flex-end; \n\n }\n}"] });
|
|
1565
1787
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SkipChatComponent, [{
|
|
1566
1788
|
type: Component,
|
|
1567
|
-
args: [{ selector: 'skip-chat', template: "<div class = \"chat-container\" mjFillContainer #topLevelDiv [bottomMargin]=\"10\" [rightMargin]=\"10\">\n <div class=\"layout\">\n @if (IsConversationListVisible) {\n <div class=\"left-panel\">\n <div class=\"conversation-history\">\n <div class=\"new-chat-area\">\n <span class=\"fa-solid fa-table-columns toggle-icon\" (click)=\"DisplayConversationList(false)\"></span>\n @if (ShowSkipLogoInConversationList) {\n <img [src]=\"SkipLogoURL\" class=\"avatar\" />\n }\n @if (AllowNewConversations) {\n <span class=\"fa-solid fa-pen-to-square new-convo-icon\" (click)=\"CreateNewConversation()\"></span> \n }\n </div>\n <kendo-listview\n class=\"conversation-list\"\n [data]=\"Conversations\"\n [style.height.px]=\"280\"\n [itemClass]=\"{ 'item-border': true }\" \n mjFillContainer \n [fillWidth]=\"false\"\n [bottomMargin]=\"50\"\n #conversationList\n >\n <ng-template kendoListViewItemTemplate let-dataItem=\"dataItem\">\n <div class=\"conversation-item\" \n [ngClass]=\"GetConversationItemClass(dataItem)\"\n [title]=\"dataItem.Name\" \n (click)=\"SelectConversation(dataItem)\"> \n <span *ngIf=\"SelectedConversation && IsSkipProcessing(dataItem)\" class=\"fa-regular fa-clock\"></span>\n <div class=\"text-container\">\n <span *ngIf=\"dataItem.ID !== SelectedConversation?.ID || !ConversationEditMode\">{{ dataItem.Name }}</span>\n <textarea *ngIf=\"dataItem.ID === SelectedConversation?.ID && ConversationEditMode\" [(ngModel)]=\"dataItem.Name\" maxlength=\"100\"></textarea>\n </div>\n <div *ngIf=\"SelectedConversation?.ID === dataItem.ID\" class=\"edit-conversation-panel\">\n <span *ngIf=\"!ConversationEditMode\" class=\"fa-solid fa-pen-to-square\" (click)=\"editConvo(dataItem)\"></span>\n <span *ngIf=\"!ConversationEditMode\" class=\"fa-regular fa-trash-can\" (click)=\"showDeleteConvoDialog(dataItem)\"></span>\n <span *ngIf=\"ConversationEditMode\" class=\"fa-solid fa-check\" (click)=\"saveConvoName(dataItem)\"></span>\n <span *ngIf=\"ConversationEditMode\" class=\"fa-solid fa-xmark\" (click)=\"cancelConvoEdit(dataItem)\"></span>\n </div>\n </div>\n </ng-template>\n </kendo-listview>\n <!-- COMMENTED OUT as we don't want to support embedded conversations in the UI for now\n <div class=\"embedded-conversations\"><input kendoCheckBox type=\"checkbox\" [(ngModel)]=\"IncludeLinkedConversationsInList\" (ngModelChange)=\"loadConversations()\"/> <span (click)=\"FlipEmbeddedConversationState()\">Show Linked Conversations</span></div> -->\n </div> \n </div>\n }\n @if (!IsConversationListVisible) {\n <span class=\"fa-solid fa-table-columns toggle-icon\" (click)=\"DisplayConversationList(true)\"></span>\n }\n\n <div class=\"right-panel\">\n <div class=\"conversation-wrapper\" mjFillContainer>\n <div #AskSkipPanel class=\"messages\" #scrollContainer (scroll)=\"checkScroll()\">\n <div class=\"welcome-wrapper\" *ngIf=\"(!Messages || Messages.length ===0) && _conversationLoadComplete\">\n <div class='welcome-message'>\n <img [src]=\"SkipLogoURL\" />\n <div class=\"welcome-header-text\">What can I help with today?</div>\n </div>\n <div class='welcome-suggested-questions'>\n <div class=\"welcome-suggested-questions-col\">\n <div class=\"welcome-question\" (click)=\"sendPrompt(WelcomeQuestions[0].prompt)\">\n <span class=\"welcome-question-header\">{{WelcomeQuestions[0].topLine}}</span>\n <span>{{WelcomeQuestions[0].bottomLine}}</span>\n </div>\n <div class=\"welcome-question\" (click)=\"sendPrompt(WelcomeQuestions[1].prompt)\">\n <span class=\"welcome-question-header\">{{WelcomeQuestions[1].topLine}}</span>\n <span>{{WelcomeQuestions[1].bottomLine}}</span>\n </div> \n </div>\n <div class=\"welcome-suggested-questions-col\">\n <div class=\"welcome-question\" (click)=\"sendPrompt(WelcomeQuestions[2].prompt)\">\n <span class=\"welcome-question-header\">{{WelcomeQuestions[2].topLine}}</span>\n <span>{{WelcomeQuestions[2].bottomLine}}</span>\n </div>\n <div class=\"welcome-question\" (click)=\"sendPrompt(WelcomeQuestions[3].prompt)\">\n <span class=\"welcome-question-header\">{{WelcomeQuestions[3].topLine}}</span>\n <span>{{WelcomeQuestions[3].bottomLine}}</span>\n </div> \n </div>\n </div> \n </div>\n @if (!_conversationLoadComplete) {\n <div class=\"loading-convo-messages-wrapper\">\n <kendo-loader></kendo-loader>\n </div>\n } \n <div mjContainer mjSkipResize=\"true\"><!--mjSkipResize results in everything below this level NOT being resized, performance optimization-->\n <!-- Dynamic messages will be injected here -->\n </div>\n <span class=\"scroll-to-bottom-icon\" *ngIf=\"_showScrollToBottomIcon && Messages && Messages.length > 0\" (click)=\"scrollToBottomAnimate()\"><i class=\"fas fa-arrow-down\"></i></span>\n </div>\n <div class=\"input-area\">\n <div class=\"text-area-wrapper\">\n <textarea\n #AskSkipInput \n [disabled]=\"SelectedConversation && IsSkipProcessing(SelectedConversation)\" \n (keyup.enter)=\"onEnter($event)\" \n (input)=\"onInputChange($event)\"\n type=\"text\" \n [placeholder]=\"_AskSkipTextboxPlaceholder\"></textarea>\n </div>\n @if (ShowDataContextButton) {\n <button kendoButton >\n <span class=\"fa-solid fa-gear\" \n (click)=\"showDataContext()\"></span>\n </button> \n }\n <button kendoButton \n [disabled]=\"IsTextAreaEmpty() || (SelectedConversation !== undefined && IsSkipProcessing(SelectedConversation))\" \n (click)=\"sendSkipMessage()\">\n <span class=\"fas fa-solid fa-arrow-up\"></span>\n </button>\n </div>\n </div> \n </div>\n </div> \n</div> \n\n<div *ngIf=\"isDataContextDialogVisible\">\n <mj-data-context-dialog [dataContextId]=\"DataContextID\" (dialogClosed)=\"closeDataContextDialog()\" [Provider]=\"ProviderToUse\"></mj-data-context-dialog>\n</div>\n\n\n<kendo-dialog\n title=\"Please confirm\"\n *ngIf=\"confirmDeleteConversationDialogOpen\"\n (close)=\"closeDeleteConversation('no')\"\n [minWidth]=\"250\"\n [width]=\"450\"\n>\n <p style=\"margin: 30px; text-align: center;\">\n Would you like to delete {{SelectedConversation?.Name}}?\n </p>\n <kendo-dialog-actions>\n <button kendoButton (click)=\"closeDeleteConversation('yes')\" themeColor=\"primary\">\n Yes\n </button>\n <button kendoButton (click)=\"closeDeleteConversation('no')\">\n No\n </button>\n </kendo-dialog-actions>\n</kendo-dialog> \n\n<kendo-dialog\n title=\"Please confirm\"\n *ngIf=\"confirmMessageEditOrDeleteDialogOpen\"\n (close)=\"closeMessageEditOrDeleteDialog('no')\"\n [minWidth]=\"250\"\n [width]=\"450\"\n>\n <p style=\"margin: 30px; text-align: center;\">\n Would you like to {{messageEditOrDeleteType}} this message? Doing so will result in any subsequent messages in the conversation being deleted.\n </p>\n <kendo-dialog-actions>\n <button kendoButton (click)=\"closeMessageEditOrDeleteDialog('yes')\" themeColor=\"primary\">\n Yes\n </button>\n <button kendoButton (click)=\"closeMessageEditOrDeleteDialog('no')\">\n No\n </button>\n </kendo-dialog-actions>\n</kendo-dialog> ", styles: [".layout {\n display: flex;\n flex-direction: row; /* Ensures left and right panels are side by side */\n height: 100%; /* Fill the available height */\n width: 100%; /* Fill the available width */\n position: relative;\n}\n\n.left-panel {\n width: 272px; /* Fixed width for the conversation list */\n background-color: #f8f9fa; /* Optional: Background color */\n border-right: 1px solid #ddd; /* Optional: Add a divider */\n overflow-y: auto; /* Enable scrolling if content overflows */\n overflow-x: hidden; /* Hide horizontal scrollbar */\n position: relative;\n\n scrollbar-width: thin; /* For Firefox */\n scrollbar-color: #d3d3d3 #f8f9fa; /* Thumb color and track color */\n}\n\n/* For WebKit-based browsers (Chrome, Edge, Safari) */\n.left-panel::-webkit-scrollbar {\n width: 8px; /* Narrower scrollbar */\n background-color: #f8f9fa; /* Scrollbar track color */\n}\n\n.left-panel::-webkit-scrollbar-thumb {\n background-color: #d3d3d3; /* Lighter gray scrollbar thumb */\n border-radius: 4px; /* Rounded corners for the thumb */\n}\n\n.left-panel::-webkit-scrollbar-thumb:hover {\n background-color: #c0c0c0; /* Slightly darker gray on hover */\n}\n\n.left-panel::-webkit-scrollbar-track {\n background-color: #f8f9fa; /* Background of the scrollbar track */\n}\n\n.right-panel {\n flex: 1; /* Take up the remaining space */\n overflow-y: auto; /* Enable scrolling for the conversation content */\n}\n\n\n.new-convo-icon {\n color: #808080; /* Mid-gray */\n font-size: 18px; /* Adjust icon size */\n cursor: pointer; /* Make it clear the icon is clickable */\n z-index: 10; /* Ensure the icon is above other content */\n padding: 5px;\n border-radius: 4px;\n}\n\n.toggle-icon {\n color: #808080; /* Mid-gray */\n font-size: 18px; /* Adjust icon size */\n cursor: pointer; /* Make it clear the icon is clickable */\n z-index: 10; /* Ensure the icon is above other content */\n margin-left: 6px;\n padding: 3px;\n border-radius: 3px;\n}\n \n\n.right-panel .toggle-icon {\n margin-left: 3px;\n margin-top: 2px;\n position: absolute;\n top: 10px;\n left: auto;\n right: 10px; /* For the right panel toggle */\n}\n\n\n.chat-container {\n padding: 5px;\n display: flex;\n flex-direction: row;\n height: 100%;\n font-family: S\u00F6hne, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, Ubuntu, Cantarell, \"Noto Sans\", sans-serif, \"Helvetica Neue\", Arial, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n font-size: 1rem;\n\n /*initial sizes*/\n width: 100%;\n height: 100%;\n\n background-color: #f9f9f9;\n}\n\n.conversation-wrapper {\n display: flex;\n flex-direction: column;\n position: relative; /* Add this line if the wrapper needs to be a reference point */\n background-color: #f9f9f9;\n}\n\n.new-conversation {\n height: 30px;\n font-size: large;\n}\n\n.conversation-history {\n width: 240px;\n min-width: 240px;\n height: 95%;\n overflow-y: auto; /* Add scroll if the content exceeds the height */\n overflow-x: hidden; /* Hide horizontal scrollbar */\n margin-right: 10px;\n padding-top: 5px;\n background-color: #f9f9f9;\n margin-top: 0px; \n padding: 12px; \n}\n\n.k-tabstrip-content-for-skip {\n padding: 0;\n padding-block: 0;\n}\n\n\n.conversation-history > button {\n height: 25px;\n}\n\n.skip-title {\n font-size: larger;\n margin-bottom: 5px;\n height: 20px;\n margin-top: 5px;\n}\n\n.conversation-list {\n margin-top: 5px;\n padding-top: 5px;\n \n border: 0;\n background-color: #f9f9f9;\n}\n\n\n\n/* Center the welcome message vertically and horizontally */\n.welcome-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n overflow: hidden;\n}\n\n.welcome-message {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n overflow: hidden;\n height: 100%;\n}\n\n.embedded-conversations {\n margin-left: 3px;\n margin-top: 5px;\n font-size: 10pt;\n color: rgb(48, 48, 235);\n}\n.embedded-conversations > span {\n margin-top: 4px;\n margin-left: 5px;\n cursor: pointer;\n}\n.conversation-item-linked {\n color: rgb(48, 48, 235);\n}\n\n.welcome-message img {\n width: 120px;\n height: 50px;\n margin-bottom: 20px; /* Adds some space between the image and the text below */\n}\n\n.welcome-header-text {\n font-size: larger;\n font-weight: bold;\n}\n\n/* Position the welcome-suggested-questions at the bottom of its container */\n.welcome-suggested-questions {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-content: center;\n}\n.welcome-suggested-questions-col {\n display: flex;\n}\n\n/* Flex layout for questions, two per row */\n.welcome-question {\n display: flex;\n flex-direction: column; /* Stack the header and text vertically */\n align-items: left;;\n width: 300px; \n justify-content: space-between;\n margin: 5px; /* Adds some space around each question */\n border: solid 1px rgba(41, 28, 28, 0.08);\n border-radius: 15px;\n padding: 10px;\n cursor: pointer;\n}\n\n.welcome-question:hover {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n\n.welcome-question-header {\n font-size: 12pt;\n font-weight: bold;\n display: block; /* Ensures the header is on its own line */\n}\n\n/* Non-bold text for the content below the header */\n.welcome-question span:not(.welcome-question-header) {\n font-weight: normal;\n font-size: 10pt;\n}\n\n\n.messages {\n overflow-y: auto; /* enable scrolling if the content overflows */\n overflow-x: hidden; /* hide horizontal scrollbar */\n /* border: solid 1px rgba(0, 0, 0, 0.08); */\n margin-bottom: 5px;\n\n margin-top: 2px; /* align it with the top of converation history exactly*/\n\n background-color: #f9f9f9;\n flex: 1;\n scrollbar-width: thin; /* For Firefox */\n scrollbar-color: #d3d3d3 #f8f9fa; /* Thumb color and track color */\n}\n\n/* For WebKit-based browsers (Chrome, Edge, Safari) */\n.messages::-webkit-scrollbar {\nwidth: 8px; /* Narrower scrollbar */\nbackground-color: #f8f9fa; /* Scrollbar track color */\n}\n\n.messages::-webkit-scrollbar-thumb {\nbackground-color: #d3d3d3; /* Lighter gray scrollbar thumb */\nborder-radius: 4px; /* Rounded corners for the thumb */\n}\n\n.messages::-webkit-scrollbar-thumb:hover {\nbackground-color: #c0c0c0; /* Slightly darker gray on hover */\n}\n\n.messages::-webkit-scrollbar-track {\nbackground-color: #f8f9fa; /* Background of the scrollbar track */\n}\n\n\n\n.new-chat-area {\n display: flex;\n justify-content: space-between; /* Aligns children (img and button) to each end */\n align-items: center; /* Centers children vertically */\n}\n.avatar {\n max-height: 24px;\n margin-right: 10px;\n margin-left: 5px;\n margin-bottom: 3px;\n /* Ensure the image aligns to the left */\n margin-right: auto; /* Pushes everything else to the right */\n}\n\n.conversation-item {\n margin-left: 5px;\n margin-right: 5px;\n padding-top: 10px;\n padding-bottom: 10px;\n padding-left: 5px;\n padding-right: 5px;\n border-radius: 5px;\n cursor: pointer;\n overflow: hidden;\n max-height: 150px;\n font-size: 14px;\n\n display: flex;\n align-items: flex-start; /* Align items to the top */\n\n flex-wrap: wrap; /* Allow items to wrap to the next line */\n}\n\n.text-container {\n flex: 1; /* Take up remaining space */\n display: flex;\n flex-direction: column; /* Stack children vertically */\n}\n\n.text-container textarea {\n resize: none; /* Disable resizing */\n /* Add more styles for the textarea if needed */\n}\n\n.conversation-item > .conversation-icon {\n margin-top: 3px;\n}\n\n.conversation-item span {\n display: inline-block;\n white-space: pre-wrap; /* Allow text to wrap */\n overflow: auto;\n word-wrap: break-word;\n margin-left: 3px; /* Move the text to the right */\n}\n\n.conversation-item:hover {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.conversation-item-selected {\n background-color: rgba(0, 0, 0, 0.15);\n}\n\n\n.conversation-item > .conversation-icon {\n margin-right: 11px;\n}\n.edit-conversation-panel {\n display: flex;\n justify-content: flex-end; /* Align icons to the right */\n margin-top: 2px; /* litle buffer on top */\n margin-right: 2px; /* litle buffer to the right */\n}\n.edit-conversation-panel > .k-icon {\n margin-left: 5px;\n cursor: pointer;\n}\n.edit-conversation-panel > .k-icon:hover {\n color: #ff0000;\n}\n\n\n\n.input-area {\n min-height: 35px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 15px;\n}\n\n.input-area > button {\n vertical-align: top;\n width: 30px;\n height: 30px;\n margin-top: 3px;\n border-radius: 12px;\n}\n.input-area > button:first-of-type {\n margin-left: -40px;\n}\n.input-area > button:last-child {\n margin-left: -65px;\n}\n\n.text-area-wrapper {\n padding: 3px;\n border: solid 1px rgba(0, 0, 0, 0.08) ;\n border-radius: 15px;\n\n margin-top: 4px;\n margin-right: -1px;\n min-height: 42px;\n max-height: 100%; /* Prevent it from growing beyond the container */\n\n overflow: hidden; \n align-items: center;\n\n /*combined width and padding is 800*/\n width: 710px; \n padding-right: 90px\n} \n.text-area-wrapper > textarea {\n border: 0;\n outline: 0;\n resize: none;\n\n min-height: 20px; /* Initial height */\n\n width: 100%;\n overflow-y: hidden; /* Hide scrollbar */\n\n font-family: S\u00F6hne, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, Ubuntu, Cantarell, \"Noto Sans\", sans-serif, \"Helvetica Neue\", Arial, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n font-size: 1rem;\n\n margin-left: 7px;\n margin-top: 7px;\n margin-bottom: 5px;\n\n background-color: #f9f9f9;\n}\n\n/* .text-area-wrapper > textarea:disabled {\n background-color: white;\n} */\n\n.input-wrapper {\n flex-grow: 1; /* This will make the input-wrapper take the remaining space */\n height: 100%;\n}\n\n.waiting-for-ai {\n position: absolute;\n display: flex; /* Use flexbox layout */\n bottom: 100px;\n z-index: 999;\n left: 10px; \n}\n \n.scroll-to-bottom-icon {\n position: absolute;\n bottom: 100px; /* Adjust as needed to position away from the bottom edge */\n left: 50%; /* Start at the exact horizontal center */\n transform: translateX(-50%); /* Shift it back by half its width to center it */\n z-index: 1000; /* Ensure it stays on top */\n background-color: white; /* Circle background color - adjust as needed */\n color: black; /* Icon color - adjust as needed */\n border-radius: 50%; /* Makes the background a circle */\n width: 40px; /* Circle size - adjust as needed */\n height: 40px; /* Circle size - adjust as needed */\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: 0px 0px 5px rgba(0,0,0,0.3); /* Optional: Adds a subtle shadow for better visibility */\n cursor: pointer;\n}\n\n.loading-convo-messages-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n position: absolute;\n z-index: 1000;\n}\n\n@media (min-width: 600px) {\n .welcome-suggested-questions {\n display: flex;\n flex-wrap: wrap; /* Allows questions to wrap to the next line */\n align-content: flex-end; /* Aligns the content to the bottom */\n }\n}\n \n"] }]
|
|
1789
|
+
args: [{ selector: 'skip-chat', template: "<div class = \"chat-container\" mjFillContainer #topLevelDiv [bottomMargin]=\"10\" [rightMargin]=\"10\">\n <div class=\"layout\">\n @if (IsConversationListVisible) {\n <div class=\"left-panel\">\n <div class=\"conversation-history\">\n <div class=\"new-chat-area\">\n <span class=\"fa-solid fa-table-columns toggle-icon\" (click)=\"DisplayConversationList(false)\"></span>\n @if (ShowSkipLogoInConversationList) {\n <img [src]=\"SkipLogoURL\" class=\"avatar\" />\n }\n @if (AllowNewConversations) {\n <span class=\"fa-solid fa-pen-to-square new-convo-icon\" (click)=\"CreateNewConversation()\"></span> \n }\n </div>\n <kendo-listview\n class=\"conversation-list\"\n [data]=\"Conversations\"\n [style.height.px]=\"280\"\n [itemClass]=\"{ 'item-border': true }\" \n mjFillContainer \n [fillWidth]=\"false\"\n [bottomMargin]=\"50\"\n #conversationList\n >\n <ng-template kendoListViewItemTemplate let-dataItem=\"dataItem\">\n <div class=\"conversation-item\" \n [ngClass]=\"GetConversationItemClass(dataItem)\"\n [title]=\"dataItem.Name\" \n (click)=\"SelectConversation(dataItem)\"> \n <span *ngIf=\"SelectedConversation && IsSkipProcessing(dataItem)\" class=\"fa-regular fa-clock\"></span>\n <div class=\"text-container\">\n <span *ngIf=\"dataItem.ID !== SelectedConversation?.ID || !ConversationEditMode\">{{ dataItem.Name }}</span>\n <textarea *ngIf=\"dataItem.ID === SelectedConversation?.ID && ConversationEditMode\" [(ngModel)]=\"dataItem.Name\" maxlength=\"100\"></textarea>\n </div>\n <div *ngIf=\"SelectedConversation?.ID === dataItem.ID\" class=\"edit-conversation-panel\">\n <span *ngIf=\"!ConversationEditMode\" class=\"fa-solid fa-pen-to-square\" (click)=\"editConvo(dataItem)\"></span>\n <span *ngIf=\"!ConversationEditMode\" class=\"fa-regular fa-trash-can\" (click)=\"showDeleteConvoDialog(dataItem)\"></span>\n <span *ngIf=\"ConversationEditMode\" class=\"fa-solid fa-check\" (click)=\"saveConvoName(dataItem)\"></span>\n <span *ngIf=\"ConversationEditMode\" class=\"fa-solid fa-xmark\" (click)=\"cancelConvoEdit(dataItem)\"></span>\n </div>\n </div>\n </ng-template>\n </kendo-listview>\n <!-- COMMENTED OUT as we don't want to support embedded conversations in the UI for now\n <div class=\"embedded-conversations\"><input kendoCheckBox type=\"checkbox\" [(ngModel)]=\"IncludeLinkedConversationsInList\" (ngModelChange)=\"loadConversations()\"/> <span (click)=\"FlipEmbeddedConversationState()\">Show Linked Conversations</span></div> -->\n </div> \n </div>\n }\n @if (!IsConversationListVisible) {\n <span class=\"fa-solid fa-table-columns toggle-icon\" (click)=\"DisplayConversationList(true)\"></span>\n }\n\n <div class=\"right-panel\">\n <div class=\"conversation-wrapper\" mjFillContainer>\n <div #AskSkipPanel class=\"messages\" #scrollContainer (scroll)=\"checkScroll()\">\n <div class=\"welcome-wrapper\" *ngIf=\"(!Messages || Messages.length ===0) && _conversationLoadComplete\">\n <div class='welcome-message'>\n <img [src]=\"SkipLogoURL\" />\n <div class=\"welcome-header-text\">What can I help with today?</div>\n </div>\n <div class='welcome-suggested-questions'>\n <div class=\"welcome-suggested-questions-col\">\n <div class=\"welcome-question\" (click)=\"sendPrompt(WelcomeQuestions[0].prompt)\">\n <span class=\"welcome-question-header\">{{WelcomeQuestions[0].topLine}}</span>\n <span>{{WelcomeQuestions[0].bottomLine}}</span>\n </div>\n <div class=\"welcome-question\" (click)=\"sendPrompt(WelcomeQuestions[1].prompt)\">\n <span class=\"welcome-question-header\">{{WelcomeQuestions[1].topLine}}</span>\n <span>{{WelcomeQuestions[1].bottomLine}}</span>\n </div> \n </div>\n <div class=\"welcome-suggested-questions-col\">\n <div class=\"welcome-question\" (click)=\"sendPrompt(WelcomeQuestions[2].prompt)\">\n <span class=\"welcome-question-header\">{{WelcomeQuestions[2].topLine}}</span>\n <span>{{WelcomeQuestions[2].bottomLine}}</span>\n </div>\n <div class=\"welcome-question\" (click)=\"sendPrompt(WelcomeQuestions[3].prompt)\">\n <span class=\"welcome-question-header\">{{WelcomeQuestions[3].topLine}}</span>\n <span>{{WelcomeQuestions[3].bottomLine}}</span>\n </div> \n </div>\n </div> \n </div>\n @if (!_conversationLoadComplete) {\n <div class=\"loading-convo-messages-wrapper\">\n <kendo-loader></kendo-loader>\n </div>\n } \n <div mjContainer mjSkipResize=\"true\"><!--mjSkipResize results in everything below this level NOT being resized, performance optimization-->\n <!-- Dynamic messages will be injected here -->\n </div>\n <span class=\"scroll-to-bottom-icon\" *ngIf=\"_showScrollToBottomIcon && Messages && Messages.length > 0\" (click)=\"scrollToBottomAnimate()\"><i class=\"fas fa-arrow-down\"></i></span>\n </div>\n @if (SelectedConversationCurrentUserPermissionLevel === 'Owner' || \n SelectedConversationCurrentUserPermissionLevel === 'Edit') {\n <div class=\"input-area\">\n <div class=\"text-area-wrapper\">\n <textarea\n #AskSkipInput \n [disabled]=\"SelectedConversation && IsSkipProcessing(SelectedConversation)\" \n (keyup.enter)=\"onEnter($event)\" \n (input)=\"onInputChange($event)\"\n type=\"text\" \n [placeholder]=\"_AskSkipTextboxPlaceholder\"></textarea>\n </div>\n <div class=\"button-area\" [style.marginLeft.px]=\"-35 * NumVisibleButtons\">\n @if (ShowDataContextButton) {\n <button kendoButton >\n <span class=\"fa-solid fa-gear\" \n (click)=\"showDataContextDialog()\"></span>\n </button> \n }\n <button kendoButton \n [disabled]=\"IsTextAreaEmpty() || (SelectedConversation !== undefined && IsSkipProcessing(SelectedConversation))\" \n (click)=\"sendSkipMessage()\">\n <span class=\"fas fa-solid fa-arrow-up\"></span>\n </button>\n @if (ShowSharingButton && SelectedConversationCurrentUserPermissionLevel === 'Owner') {\n <button kendoButton class=\"share-button\">\n <span class=\"fa-solid fa-share\"\n (click)=\"showSharingDialog()\"></span>\n </button> \n }\n </div>\n </div>\n }\n </div> \n </div>\n </div> \n</div> \n\n@if(isDataContextDialogVisible) {\n <mj-data-context-dialog [dataContextId]=\"DataContextID\" (dialogClosed)=\"closeDataContextDialog()\" [Provider]=\"ProviderToUse\"></mj-data-context-dialog>\n}\n@if(isSharingDialogVisible && SelectedConversation && conversationResourceTypeID) {\n <kendo-dialog\n title=\"Share Conversation\"\n (close)=\"closeSharingDialog('no')\"\n [width]=\"650\"\n [height]=\"400\"\n >\n <mj-resource-permissions \n [Provider]=\"Provider\"\n [ResourceTypeID]=\"conversationResourceTypeID\"\n [ResourceRecordID]=\"SelectedConversation.ID\"\n [ExcludedRoleNames]=\"SharingExcludeRoleNames\"\n [ExcludedUserEmails]=\"SharingExcludeEmails\"\n #resourcePermissions\n >\n </mj-resource-permissions>\n <kendo-dialog-actions>\n <button kendoButton (click)=\"closeSharingDialog('yes')\" themeColor=\"primary\">\n Save\n </button>\n <button kendoButton (click)=\"closeSharingDialog('no')\">\n Cancel\n </button>\n </kendo-dialog-actions>\n </kendo-dialog> \n}\n\n<kendo-dialog\n title=\"Please confirm\"\n *ngIf=\"confirmDeleteConversationDialogOpen\"\n (close)=\"closeDeleteConversation('no')\"\n [minWidth]=\"250\"\n [width]=\"450\"\n>\n <p style=\"margin: 30px; text-align: center;\">\n Would you like to delete {{SelectedConversation?.Name}}?\n </p>\n <kendo-dialog-actions>\n <button kendoButton (click)=\"closeDeleteConversation('yes')\" themeColor=\"primary\">\n Yes\n </button>\n <button kendoButton (click)=\"closeDeleteConversation('no')\">\n No\n </button>\n </kendo-dialog-actions>\n</kendo-dialog> \n\n<kendo-dialog\n title=\"Please confirm\"\n *ngIf=\"confirmMessageEditOrDeleteDialogOpen\"\n (close)=\"closeMessageEditOrDeleteDialog('no')\"\n [minWidth]=\"250\"\n [width]=\"450\"\n>\n <p style=\"margin: 30px; text-align: center;\">\n Would you like to {{messageEditOrDeleteType}} this message? Doing so will result in any subsequent messages in the conversation being deleted.\n </p>\n <kendo-dialog-actions>\n <button kendoButton (click)=\"closeMessageEditOrDeleteDialog('yes')\" themeColor=\"primary\">\n Yes\n </button>\n <button kendoButton (click)=\"closeMessageEditOrDeleteDialog('no')\">\n No\n </button>\n </kendo-dialog-actions>\n</kendo-dialog> ", styles: [".layout {\n display: flex;\n flex-direction: row; /* Ensures left and right panels are side by side */\n height: 100%; /* Fill the available height */\n width: 100%; /* Fill the available width */\n position: relative;\n}\n\n.left-panel {\n width: 272px; /* Fixed width for the conversation list */\n background-color: #f8f9fa; /* Optional: Background color */\n border-right: 1px solid #ddd; /* Optional: Add a divider */\n overflow-y: auto; /* Enable scrolling if content overflows */\n overflow-x: hidden; /* Hide horizontal scrollbar */\n position: relative;\n\n scrollbar-width: thin; /* For Firefox */\n scrollbar-color: #d3d3d3 #f8f9fa; /* Thumb color and track color */\n}\n\n/* For WebKit-based browsers (Chrome, Edge, Safari) */\n.left-panel::-webkit-scrollbar {\n width: 8px; /* Narrower scrollbar */\n background-color: #f8f9fa; /* Scrollbar track color */\n}\n\n.left-panel::-webkit-scrollbar-thumb {\n background-color: #d3d3d3; /* Lighter gray scrollbar thumb */\n border-radius: 4px; /* Rounded corners for the thumb */\n}\n\n.left-panel::-webkit-scrollbar-thumb:hover {\n background-color: #c0c0c0; /* Slightly darker gray on hover */\n}\n\n.left-panel::-webkit-scrollbar-track {\n background-color: #f8f9fa; /* Background of the scrollbar track */\n}\n\n.right-panel {\n flex: 1; /* Take up the remaining space */\n overflow-y: auto; /* Enable scrolling for the conversation content */\n}\n\n\n.new-convo-icon {\n color: #808080; /* Mid-gray */\n font-size: 18px; /* Adjust icon size */\n cursor: pointer; /* Make it clear the icon is clickable */\n z-index: 10; /* Ensure the icon is above other content */\n padding: 5px;\n border-radius: 4px;\n}\n\n.toggle-icon {\n color: #808080; /* Mid-gray */\n font-size: 18px; /* Adjust icon size */\n cursor: pointer; /* Make it clear the icon is clickable */\n z-index: 10; /* Ensure the icon is above other content */\n margin-left: 6px;\n padding: 3px;\n border-radius: 3px;\n}\n \n\n.right-panel .toggle-icon {\n margin-left: 3px;\n margin-top: 2px;\n position: absolute;\n top: 10px;\n left: auto;\n right: 10px; /* For the right panel toggle */\n}\n\n\n.chat-container {\n padding: 5px;\n display: flex;\n flex-direction: row;\n height: 100%;\n font-family: S\u00F6hne, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, Ubuntu, Cantarell, \"Noto Sans\", sans-serif, \"Helvetica Neue\", Arial, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n font-size: 1rem;\n\n /*initial sizes*/\n width: 100%;\n height: 100%;\n\n background-color: #f9f9f9;\n}\n\n.conversation-wrapper {\n display: flex;\n flex-direction: column;\n position: relative; /* Add this line if the wrapper needs to be a reference point */\n background-color: #f9f9f9;\n}\n\n.new-conversation {\n height: 30px;\n font-size: large;\n}\n\n.conversation-history {\n width: 240px;\n min-width: 240px;\n height: 95%;\n overflow-y: auto; /* Add scroll if the content exceeds the height */\n overflow-x: hidden; /* Hide horizontal scrollbar */\n margin-right: 10px;\n padding-top: 5px;\n background-color: #f9f9f9;\n margin-top: 0px; \n padding: 12px; \n}\n\n.k-tabstrip-content-for-skip {\n padding: 0;\n padding-block: 0;\n}\n\n\n.conversation-history > button {\n height: 25px;\n}\n\n.skip-title {\n font-size: larger;\n margin-bottom: 5px;\n height: 20px;\n margin-top: 5px;\n}\n\n.conversation-list {\n margin-top: 5px;\n padding-top: 5px;\n \n border: 0;\n background-color: #f9f9f9;\n}\n\n\n\n/* Center the welcome message vertically and horizontally */\n.welcome-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n overflow: hidden;\n}\n\n.welcome-message {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n overflow: hidden;\n height: 100%;\n}\n\n.embedded-conversations {\n margin-left: 3px;\n margin-top: 5px;\n font-size: 10pt;\n color: rgb(48, 48, 235);\n}\n.embedded-conversations > span {\n margin-top: 4px;\n margin-left: 5px;\n cursor: pointer;\n}\n.conversation-item-linked {\n color: rgb(48, 48, 235);\n}\n\n.welcome-message img {\n width: 120px;\n height: 50px;\n margin-bottom: 20px; /* Adds some space between the image and the text below */\n}\n\n.welcome-header-text {\n font-size: larger;\n font-weight: bold;\n}\n\n/* Position the welcome-suggested-questions at the bottom of its container */\n.welcome-suggested-questions {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-content: center;\n}\n.welcome-suggested-questions-col {\n display: flex;\n}\n\n/* Flex layout for questions, two per row */\n.welcome-question {\n display: flex;\n flex-direction: column; /* Stack the header and text vertically */\n align-items: left;;\n width: 300px; \n justify-content: space-between;\n margin: 5px; /* Adds some space around each question */\n border: solid 1px rgba(41, 28, 28, 0.08);\n border-radius: 15px;\n padding: 10px;\n cursor: pointer;\n}\n\n.welcome-question:hover {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n\n.welcome-question-header {\n font-size: 12pt;\n font-weight: bold;\n display: block; /* Ensures the header is on its own line */\n}\n\n/* Non-bold text for the content below the header */\n.welcome-question span:not(.welcome-question-header) {\n font-weight: normal;\n font-size: 10pt;\n}\n\n\n.messages {\n overflow-y: auto; /* enable scrolling if the content overflows */\n overflow-x: hidden; /* hide horizontal scrollbar */\n /* border: solid 1px rgba(0, 0, 0, 0.08); */\n margin-bottom: 5px;\n\n margin-top: 2px; /* align it with the top of converation history exactly*/\n\n background-color: #f9f9f9;\n flex: 1;\n scrollbar-width: thin; /* For Firefox */\n scrollbar-color: #d3d3d3 #f8f9fa; /* Thumb color and track color */\n}\n\n/* For WebKit-based browsers (Chrome, Edge, Safari) */\n.messages::-webkit-scrollbar {\nwidth: 8px; /* Narrower scrollbar */\nbackground-color: #f8f9fa; /* Scrollbar track color */\n}\n\n.messages::-webkit-scrollbar-thumb {\nbackground-color: #d3d3d3; /* Lighter gray scrollbar thumb */\nborder-radius: 4px; /* Rounded corners for the thumb */\n}\n\n.messages::-webkit-scrollbar-thumb:hover {\nbackground-color: #c0c0c0; /* Slightly darker gray on hover */\n}\n\n.messages::-webkit-scrollbar-track {\nbackground-color: #f8f9fa; /* Background of the scrollbar track */\n}\n\n\n\n.new-chat-area {\n display: flex;\n justify-content: space-between; /* Aligns children (img and button) to each end */\n align-items: center; /* Centers children vertically */\n}\n.avatar {\n max-height: 24px;\n margin-right: 10px;\n margin-left: 5px;\n margin-bottom: 3px;\n /* Ensure the image aligns to the left */\n margin-right: auto; /* Pushes everything else to the right */\n}\n\n.conversation-item {\n margin-left: 5px;\n margin-right: 5px;\n padding-top: 10px;\n padding-bottom: 10px;\n padding-left: 5px;\n padding-right: 5px;\n border-radius: 5px;\n cursor: pointer;\n overflow: hidden;\n max-height: 150px;\n font-size: 14px;\n\n display: flex;\n align-items: flex-start; /* Align items to the top */\n\n flex-wrap: wrap; /* Allow items to wrap to the next line */\n}\n\n.text-container {\n flex: 1; /* Take up remaining space */\n display: flex;\n flex-direction: column; /* Stack children vertically */\n}\n\n.text-container textarea {\n resize: none; /* Disable resizing */\n /* Add more styles for the textarea if needed */\n}\n\n.conversation-item > .conversation-icon {\n margin-top: 3px;\n}\n\n.conversation-item span {\n display: inline-block;\n white-space: pre-wrap; /* Allow text to wrap */\n overflow: auto;\n word-wrap: break-word;\n margin-left: 3px; /* Move the text to the right */\n}\n\n.conversation-item:hover {\n background-color: rgba(0, 0, 0, 0.05);\n}\n.conversation-item-selected {\n background-color: rgba(0, 0, 0, 0.15);\n}\n\n\n.conversation-item > .conversation-icon {\n margin-right: 11px;\n}\n.edit-conversation-panel {\n display: flex;\n justify-content: flex-end; /* Align icons to the right */\n margin-top: 2px; /* litle buffer on top */\n margin-right: 2px; /* litle buffer to the right */\n}\n.edit-conversation-panel > .k-icon {\n margin-left: 5px;\n cursor: pointer;\n}\n.edit-conversation-panel > .k-icon:hover {\n color: #ff0000;\n}\n\n\n\n.input-area {\n min-height: 35px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 15px;\n}\n\n.input-area > .button-area {\n vertical-align: top;\n margin-top: 3px;\n margin-left: -65px;\n}\n/*all buttons in the button area within the input area*/\n.button-area > button {\n width: 30px;\n height: 30px;\n border-radius: 12px;\n margin-left: 3px;\n}\n/* .input-area > button:first-of-type {\n margin-left: -40px;\n}\n.input-area > button:last-child {\n margin-left: -65px;\n}\n.input-area > .share-button {\n margin-left: 10px;\n} */\n\n.text-area-wrapper {\n padding: 3px;\n border: solid 1px rgba(0, 0, 0, 0.08) ;\n border-radius: 15px;\n\n margin-top: 4px;\n margin-right: -1px;\n min-height: 42px;\n max-height: 100%; /* Prevent it from growing beyond the container */\n\n overflow: hidden; \n align-items: center;\n\n /*combined width and padding is 800*/\n width: 710px; \n padding-right: 90px\n} \n.text-area-wrapper > textarea {\n border: 0;\n outline: 0;\n resize: none;\n\n min-height: 20px; /* Initial height */\n\n width: 100%;\n overflow-y: hidden; /* Hide scrollbar */\n\n font-family: S\u00F6hne, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, Ubuntu, Cantarell, \"Noto Sans\", sans-serif, \"Helvetica Neue\", Arial, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n font-size: 1rem;\n\n margin-left: 7px;\n margin-top: 7px;\n margin-bottom: 5px;\n\n background-color: #f9f9f9;\n}\n\n/* .text-area-wrapper > textarea:disabled {\n background-color: white;\n} */\n\n.input-wrapper {\n flex-grow: 1; /* This will make the input-wrapper take the remaining space */\n height: 100%;\n}\n\n.waiting-for-ai {\n position: absolute;\n display: flex; /* Use flexbox layout */\n bottom: 100px;\n z-index: 999;\n left: 10px; \n}\n \n.scroll-to-bottom-icon {\n position: absolute;\n bottom: 100px; /* Adjust as needed to position away from the bottom edge */\n left: 50%; /* Start at the exact horizontal center */\n transform: translateX(-50%); /* Shift it back by half its width to center it */\n z-index: 1000; /* Ensure it stays on top */\n background-color: white; /* Circle background color - adjust as needed */\n color: black; /* Icon color - adjust as needed */\n border-radius: 50%; /* Makes the background a circle */\n width: 40px; /* Circle size - adjust as needed */\n height: 40px; /* Circle size - adjust as needed */\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: 0px 0px 5px rgba(0,0,0,0.3); /* Optional: Adds a subtle shadow for better visibility */\n cursor: pointer;\n}\n\n.loading-convo-messages-wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n position: absolute;\n z-index: 1000;\n}\n\n@media (min-width: 600px) {\n .welcome-suggested-questions {\n display: flex;\n flex-wrap: wrap; /* Allows questions to wrap to the next line */\n align-content: flex-end; /* Aligns the content to the bottom */\n }\n}\n \n"] }]
|
|
1568
1790
|
}], () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.ActivatedRoute }, { type: i1.Router }, { type: i2.Location }, { type: i0.ChangeDetectorRef }, { type: i3.MJNotificationService }], { AllowSend: [{
|
|
1569
1791
|
type: Input
|
|
1570
1792
|
}], Messages: [{
|
|
@@ -1597,10 +1819,18 @@ SkipChatComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SkipChatC
|
|
|
1597
1819
|
type: Input
|
|
1598
1820
|
}], UserImage: [{
|
|
1599
1821
|
type: Input
|
|
1822
|
+
}], VerboseLogging: [{
|
|
1823
|
+
type: Input
|
|
1600
1824
|
}], UpdateAppRoute: [{
|
|
1601
1825
|
type: Input
|
|
1602
1826
|
}], ShowSkipLogoInConversationList: [{
|
|
1603
1827
|
type: Input
|
|
1828
|
+
}], ShowSharingButton: [{
|
|
1829
|
+
type: Input
|
|
1830
|
+
}], SharingExcludeRoleNames: [{
|
|
1831
|
+
type: Input
|
|
1832
|
+
}], SharingExcludeEmails: [{
|
|
1833
|
+
type: Input
|
|
1604
1834
|
}], DefaultTextboxPlaceholder: [{
|
|
1605
1835
|
type: Input
|
|
1606
1836
|
}], ProcessingTextBoxPlaceholder: [{
|
|
@@ -1632,10 +1862,13 @@ SkipChatComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SkipChatC
|
|
|
1632
1862
|
}], topLevelDiv: [{
|
|
1633
1863
|
type: ViewChild,
|
|
1634
1864
|
args: ['topLevelDiv']
|
|
1865
|
+
}], resourcePermissionsRef: [{
|
|
1866
|
+
type: ViewChild,
|
|
1867
|
+
args: ['resourcePermissions']
|
|
1635
1868
|
}], WelcomeQuestions: [{
|
|
1636
1869
|
type: Input
|
|
1637
1870
|
}], AutoLoad: [{
|
|
1638
1871
|
type: Input
|
|
1639
1872
|
}] }); })();
|
|
1640
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SkipChatComponent, { className: "SkipChatComponent", filePath: "src/lib/skip-chat/skip-chat.component.ts", lineNumber:
|
|
1873
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SkipChatComponent, { className: "SkipChatComponent", filePath: "src/lib/skip-chat/skip-chat.component.ts", lineNumber: 44 }); })();
|
|
1641
1874
|
//# sourceMappingURL=skip-chat.component.js.map
|