@memberjunction/ng-chat 1.5.1 → 1.5.3

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.
@@ -19,130 +19,130 @@ import * as i6 from "@progress/kendo-angular-dialog";
19
19
  const _c0 = ["messagesContainer"];
20
20
  const _c1 = ["theInput"];
21
21
  function ChatComponent_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
22
- i0.ɵɵelement(0, "img", 15);
22
+ i0.ɵɵelement(0, "img", 14);
23
23
  } if (rf & 2) {
24
- const ctx_r6 = i0.ɵɵnextContext(2);
25
- i0.ɵɵproperty("src", ctx_r6.AILargeImageURL, i0.ɵɵsanitizeUrl);
24
+ const ctx_r1 = i0.ɵɵnextContext(2);
25
+ i0.ɵɵproperty("src", ctx_r1.AILargeImageURL, i0.ɵɵsanitizeUrl);
26
26
  } }
27
27
  function ChatComponent_Conditional_1_Conditional_7_Template(rf, ctx) { if (rf & 1) {
28
- const _r12 = i0.ɵɵgetCurrentView();
29
- i0.ɵɵelementStart(0, "div", 20);
30
- i0.ɵɵlistener("click", function ChatComponent_Conditional_1_Conditional_7_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r11.SendUserMessage(ctx_r11.WelcomeQuestions[0].prompt)); });
31
- i0.ɵɵelementStart(1, "span", 21);
28
+ const _r3 = i0.ɵɵgetCurrentView();
29
+ i0.ɵɵelementStart(0, "div", 19);
30
+ i0.ɵɵlistener("click", function ChatComponent_Conditional_1_Conditional_7_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SendUserMessage(ctx_r1.WelcomeQuestions[0].prompt)); });
31
+ i0.ɵɵelementStart(1, "span", 20);
32
32
  i0.ɵɵtext(2);
33
33
  i0.ɵɵelementEnd();
34
34
  i0.ɵɵelementStart(3, "span");
35
35
  i0.ɵɵtext(4);
36
36
  i0.ɵɵelementEnd()();
37
37
  } if (rf & 2) {
38
- const ctx_r7 = i0.ɵɵnextContext(2);
38
+ const ctx_r1 = i0.ɵɵnextContext(2);
39
39
  i0.ɵɵadvance(2);
40
- i0.ɵɵtextInterpolate(ctx_r7.WelcomeQuestions[0].topLine);
40
+ i0.ɵɵtextInterpolate(ctx_r1.WelcomeQuestions[0].topLine);
41
41
  i0.ɵɵadvance(2);
42
- i0.ɵɵtextInterpolate(ctx_r7.WelcomeQuestions[0].bottomLine);
42
+ i0.ɵɵtextInterpolate(ctx_r1.WelcomeQuestions[0].bottomLine);
43
43
  } }
44
44
  function ChatComponent_Conditional_1_Conditional_8_Template(rf, ctx) { if (rf & 1) {
45
- const _r14 = i0.ɵɵgetCurrentView();
46
- i0.ɵɵelementStart(0, "div", 20);
47
- i0.ɵɵlistener("click", function ChatComponent_Conditional_1_Conditional_8_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r13.SendUserMessage(ctx_r13.WelcomeQuestions[1].prompt)); });
48
- i0.ɵɵelementStart(1, "span", 21);
45
+ const _r4 = i0.ɵɵgetCurrentView();
46
+ i0.ɵɵelementStart(0, "div", 19);
47
+ i0.ɵɵlistener("click", function ChatComponent_Conditional_1_Conditional_8_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SendUserMessage(ctx_r1.WelcomeQuestions[1].prompt)); });
48
+ i0.ɵɵelementStart(1, "span", 20);
49
49
  i0.ɵɵtext(2);
50
50
  i0.ɵɵelementEnd();
51
51
  i0.ɵɵelementStart(3, "span");
52
52
  i0.ɵɵtext(4);
53
53
  i0.ɵɵelementEnd()();
54
54
  } if (rf & 2) {
55
- const ctx_r8 = i0.ɵɵnextContext(2);
55
+ const ctx_r1 = i0.ɵɵnextContext(2);
56
56
  i0.ɵɵadvance(2);
57
- i0.ɵɵtextInterpolate(ctx_r8.WelcomeQuestions[1].topLine);
57
+ i0.ɵɵtextInterpolate(ctx_r1.WelcomeQuestions[1].topLine);
58
58
  i0.ɵɵadvance(2);
59
- i0.ɵɵtextInterpolate(ctx_r8.WelcomeQuestions[1].bottomLine);
59
+ i0.ɵɵtextInterpolate(ctx_r1.WelcomeQuestions[1].bottomLine);
60
60
  } }
61
61
  function ChatComponent_Conditional_1_Conditional_10_Template(rf, ctx) { if (rf & 1) {
62
- const _r16 = i0.ɵɵgetCurrentView();
63
- i0.ɵɵelementStart(0, "div", 20);
64
- i0.ɵɵlistener("click", function ChatComponent_Conditional_1_Conditional_10_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r16); const ctx_r15 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r15.SendUserMessage(ctx_r15.WelcomeQuestions[2].prompt)); });
65
- i0.ɵɵelementStart(1, "span", 21);
62
+ const _r5 = i0.ɵɵgetCurrentView();
63
+ i0.ɵɵelementStart(0, "div", 19);
64
+ i0.ɵɵlistener("click", function ChatComponent_Conditional_1_Conditional_10_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SendUserMessage(ctx_r1.WelcomeQuestions[2].prompt)); });
65
+ i0.ɵɵelementStart(1, "span", 20);
66
66
  i0.ɵɵtext(2);
67
67
  i0.ɵɵelementEnd();
68
68
  i0.ɵɵelementStart(3, "span");
69
69
  i0.ɵɵtext(4);
70
70
  i0.ɵɵelementEnd()();
71
71
  } if (rf & 2) {
72
- const ctx_r9 = i0.ɵɵnextContext(2);
72
+ const ctx_r1 = i0.ɵɵnextContext(2);
73
73
  i0.ɵɵadvance(2);
74
- i0.ɵɵtextInterpolate(ctx_r9.WelcomeQuestions[2].topLine);
74
+ i0.ɵɵtextInterpolate(ctx_r1.WelcomeQuestions[2].topLine);
75
75
  i0.ɵɵadvance(2);
76
- i0.ɵɵtextInterpolate(ctx_r9.WelcomeQuestions[2].bottomLine);
76
+ i0.ɵɵtextInterpolate(ctx_r1.WelcomeQuestions[2].bottomLine);
77
77
  } }
78
78
  function ChatComponent_Conditional_1_Conditional_11_Template(rf, ctx) { if (rf & 1) {
79
- const _r18 = i0.ɵɵgetCurrentView();
80
- i0.ɵɵelementStart(0, "div", 20);
81
- i0.ɵɵlistener("click", function ChatComponent_Conditional_1_Conditional_11_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r18); const ctx_r17 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r17.SendUserMessage(ctx_r17.WelcomeQuestions[3].prompt)); });
82
- i0.ɵɵelementStart(1, "span", 21);
79
+ const _r6 = i0.ɵɵgetCurrentView();
80
+ i0.ɵɵelementStart(0, "div", 19);
81
+ i0.ɵɵlistener("click", function ChatComponent_Conditional_1_Conditional_11_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SendUserMessage(ctx_r1.WelcomeQuestions[3].prompt)); });
82
+ i0.ɵɵelementStart(1, "span", 20);
83
83
  i0.ɵɵtext(2);
84
84
  i0.ɵɵelementEnd();
85
85
  i0.ɵɵelementStart(3, "span");
86
86
  i0.ɵɵtext(4);
87
87
  i0.ɵɵelementEnd()();
88
88
  } if (rf & 2) {
89
- const ctx_r10 = i0.ɵɵnextContext(2);
89
+ const ctx_r1 = i0.ɵɵnextContext(2);
90
90
  i0.ɵɵadvance(2);
91
- i0.ɵɵtextInterpolate(ctx_r10.WelcomeQuestions[3].topLine);
91
+ i0.ɵɵtextInterpolate(ctx_r1.WelcomeQuestions[3].topLine);
92
92
  i0.ɵɵadvance(2);
93
- i0.ɵɵtextInterpolate(ctx_r10.WelcomeQuestions[3].bottomLine);
93
+ i0.ɵɵtextInterpolate(ctx_r1.WelcomeQuestions[3].bottomLine);
94
94
  } }
95
95
  function ChatComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
96
- i0.ɵɵelementStart(0, "div", 13)(1, "div", 14);
97
- i0.ɵɵtemplate(2, ChatComponent_Conditional_1_Conditional_2_Template, 1, 1, "img", 15);
98
- i0.ɵɵelementStart(3, "div", 16);
96
+ i0.ɵɵelementStart(0, "div", 3)(1, "div", 13);
97
+ i0.ɵɵtemplate(2, ChatComponent_Conditional_1_Conditional_2_Template, 1, 1, "img", 14);
98
+ i0.ɵɵelementStart(3, "div", 15);
99
99
  i0.ɵɵtext(4, "What can I help with today?");
100
100
  i0.ɵɵelementEnd()();
101
- i0.ɵɵelementStart(5, "div", 17)(6, "div", 18);
102
- i0.ɵɵtemplate(7, ChatComponent_Conditional_1_Conditional_7_Template, 5, 2, "div", 19)(8, ChatComponent_Conditional_1_Conditional_8_Template, 5, 2, "div", 19);
101
+ i0.ɵɵelementStart(5, "div", 16)(6, "div", 17);
102
+ i0.ɵɵtemplate(7, ChatComponent_Conditional_1_Conditional_7_Template, 5, 2, "div", 18)(8, ChatComponent_Conditional_1_Conditional_8_Template, 5, 2, "div", 18);
103
103
  i0.ɵɵelementEnd();
104
- i0.ɵɵelementStart(9, "div", 18);
105
- i0.ɵɵtemplate(10, ChatComponent_Conditional_1_Conditional_10_Template, 5, 2, "div", 19)(11, ChatComponent_Conditional_1_Conditional_11_Template, 5, 2, "div", 19);
104
+ i0.ɵɵelementStart(9, "div", 17);
105
+ i0.ɵɵtemplate(10, ChatComponent_Conditional_1_Conditional_10_Template, 5, 2, "div", 18)(11, ChatComponent_Conditional_1_Conditional_11_Template, 5, 2, "div", 18);
106
106
  i0.ɵɵelementEnd()()();
107
107
  } if (rf & 2) {
108
- const ctx_r0 = i0.ɵɵnextContext();
108
+ const ctx_r1 = i0.ɵɵnextContext();
109
109
  i0.ɵɵadvance(2);
110
- i0.ɵɵconditional(2, ctx_r0.AILargeImageURL ? 2 : -1);
110
+ i0.ɵɵconditional(ctx_r1.AILargeImageURL ? 2 : -1);
111
111
  i0.ɵɵadvance(5);
112
- i0.ɵɵconditional(7, ctx_r0.WelcomeQuestions.length > 0 ? 7 : -1);
112
+ i0.ɵɵconditional(ctx_r1.WelcomeQuestions.length > 0 ? 7 : -1);
113
113
  i0.ɵɵadvance();
114
- i0.ɵɵconditional(8, ctx_r0.WelcomeQuestions.length > 1 ? 8 : -1);
114
+ i0.ɵɵconditional(ctx_r1.WelcomeQuestions.length > 1 ? 8 : -1);
115
115
  i0.ɵɵadvance(2);
116
- i0.ɵɵconditional(10, ctx_r0.WelcomeQuestions.length > 2 ? 10 : -1);
116
+ i0.ɵɵconditional(ctx_r1.WelcomeQuestions.length > 2 ? 10 : -1);
117
117
  i0.ɵɵadvance();
118
- i0.ɵɵconditional(11, ctx_r0.WelcomeQuestions.length > 3 ? 11 : -1);
118
+ i0.ɵɵconditional(ctx_r1.WelcomeQuestions.length > 3 ? 11 : -1);
119
119
  } }
120
120
  function ChatComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
121
- const _r20 = i0.ɵɵgetCurrentView();
122
- i0.ɵɵelementStart(0, "span", 22);
123
- i0.ɵɵlistener("click", function ChatComponent_Conditional_6_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r19.ScrollMessagesToBottom()); });
121
+ const _r7 = i0.ɵɵgetCurrentView();
122
+ i0.ɵɵelementStart(0, "span", 21);
123
+ i0.ɵɵlistener("click", function ChatComponent_Conditional_6_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ScrollMessagesToBottom()); });
124
124
  i0.ɵɵelementEnd();
125
125
  } }
126
126
  function ChatComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
127
- i0.ɵɵelement(0, "kendo-loader", 23);
127
+ i0.ɵɵelement(0, "kendo-loader", 7);
128
128
  } }
129
129
  function ChatComponent_Conditional_17_Template(rf, ctx) { if (rf & 1) {
130
- const _r22 = i0.ɵɵgetCurrentView();
130
+ const _r8 = i0.ɵɵgetCurrentView();
131
131
  i0.ɵɵelementStart(0, "kendo-dialog")(1, "p");
132
132
  i0.ɵɵtext(2);
133
133
  i0.ɵɵelementEnd();
134
- i0.ɵɵelementStart(3, "kendo-dialog-actions")(4, "button", 24);
135
- i0.ɵɵlistener("click", function ChatComponent_Conditional_17_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r22); const ctx_r21 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r21.HandleClearChat()); });
134
+ i0.ɵɵelementStart(3, "kendo-dialog-actions")(4, "button", 22);
135
+ i0.ɵɵlistener("click", function ChatComponent_Conditional_17_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.HandleClearChat()); });
136
136
  i0.ɵɵtext(5, "Yes");
137
137
  i0.ɵɵelementEnd();
138
- i0.ɵɵelementStart(6, "button", 25);
139
- i0.ɵɵlistener("click", function ChatComponent_Conditional_17_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r22); const ctx_r23 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r23.showingClearAllDialog = false); });
138
+ i0.ɵɵelementStart(6, "button", 23);
139
+ i0.ɵɵlistener("click", function ChatComponent_Conditional_17_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.showingClearAllDialog = false); });
140
140
  i0.ɵɵtext(7, "No");
141
141
  i0.ɵɵelementEnd()()();
142
142
  } if (rf & 2) {
143
- const ctx_r5 = i0.ɵɵnextContext();
143
+ const ctx_r1 = i0.ɵɵnextContext();
144
144
  i0.ɵɵadvance(2);
145
- i0.ɵɵtextInterpolate(ctx_r5.ClearAllMessagesPrompt);
145
+ i0.ɵɵtextInterpolate(ctx_r1.ClearAllMessagesPrompt);
146
146
  } }
147
147
  export class ChatWelcomeQuestion {
148
148
  constructor() {
@@ -257,8 +257,8 @@ export class ChatComponent {
257
257
  FocusTextArea() {
258
258
  setTimeout(() => { var _a; return (_a = this.theInput) === null || _a === void 0 ? void 0 : _a.nativeElement.focus(); }, 0); // use a timeout to ensure that angular has updated the DOM
259
259
  }
260
- AppendMessage(message, fireEvent = true) {
261
- return __awaiter(this, void 0, void 0, function* () {
260
+ AppendMessage(message_1) {
261
+ return __awaiter(this, arguments, void 0, function* (message, fireEvent = true) {
262
262
  const messageWrapElement = document.createElement('div');
263
263
  messageWrapElement.className = "chat-message-wrap";
264
264
  const imageElement = document.createElement('span');
@@ -329,40 +329,41 @@ ChatComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ChatComponent
329
329
  let _t;
330
330
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.messagesContainer = _t.first);
331
331
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.theInput = _t.first);
332
- } }, inputs: { InitialMessage: "InitialMessage", Messages: "Messages", AIImageURL: "AIImageURL", AILargeImageURL: "AILargeImageURL", WelcomeQuestions: "WelcomeQuestions", ClearAllMessagesPrompt: "ClearAllMessagesPrompt", AllowSend: "AllowSend", Placeholder: "Placeholder", ShowWaitingIndicator: "ShowWaitingIndicator" }, outputs: { MessageAdded: "MessageAdded", ClearChatRequested: "ClearChatRequested" }, decls: 18, vars: 10, consts: [["mjFillContainer", "", 1, "chat-wrapper"], ["class", "welcome-wrapper"], [1, "chat-messages", 3, "scroll"], ["messagesContainer", ""], ["class", "scroll-to-bottom fas fa-arrow-down"], [1, "chat-input-area"], ["type", "converging-spinner", "class", "loader"], [1, "text-area-wrapper"], [3, "ngModel", "disabled", "placeholder", "ngModelChange", "input", "keyup.enter"], ["theInput", ""], ["kendoButton", "", 3, "disabled", "click"], ["title", "Clear Chat", 1, "fa-solid", "fa-trash-can"], ["title", "Send Message", 1, "fas", "fa-solid", "fa-arrow-up"], [1, "welcome-wrapper"], [1, "welcome-message"], [3, "src"], [1, "welcome-header-text"], [1, "welcome-suggested-questions"], [1, "welcome-suggested-questions-col"], ["class", "welcome-question"], [1, "welcome-question", 3, "click"], [1, "welcome-question-header"], [1, "scroll-to-bottom", "fas", "fa-arrow-down", 3, "click"], ["type", "converging-spinner", 1, "loader"], ["kendoButton", "", "themeColor", "primary", 3, "click"], ["kendoButton", "", 3, "click"]], template: function ChatComponent_Template(rf, ctx) { if (rf & 1) {
333
- i0.ɵɵelementStart(0, "div", 0);
334
- i0.ɵɵtemplate(1, ChatComponent_Conditional_1_Template, 12, 5, "div", 1);
335
- i0.ɵɵelementStart(2, "div", 2, 3);
336
- i0.ɵɵlistener("scroll", function ChatComponent_Template_div_scroll_2_listener() { return ctx.handleCheckScroll(); });
332
+ } }, inputs: { InitialMessage: "InitialMessage", Messages: "Messages", AIImageURL: "AIImageURL", AILargeImageURL: "AILargeImageURL", WelcomeQuestions: "WelcomeQuestions", ClearAllMessagesPrompt: "ClearAllMessagesPrompt", AllowSend: "AllowSend", Placeholder: "Placeholder", ShowWaitingIndicator: "ShowWaitingIndicator" }, outputs: { MessageAdded: "MessageAdded", ClearChatRequested: "ClearChatRequested" }, decls: 18, vars: 10, consts: [["messagesContainer", ""], ["theInput", ""], ["mjFillContainer", "", 1, "chat-wrapper"], [1, "welcome-wrapper"], [1, "chat-messages", 3, "scroll"], [1, "scroll-to-bottom", "fas", "fa-arrow-down"], [1, "chat-input-area"], ["type", "converging-spinner", 1, "loader"], [1, "text-area-wrapper"], [3, "ngModelChange", "input", "keyup.enter", "ngModel", "disabled", "placeholder"], ["kendoButton", "", 3, "click", "disabled"], ["title", "Clear Chat", 1, "fa-solid", "fa-trash-can"], ["title", "Send Message", 1, "fas", "fa-solid", "fa-arrow-up"], [1, "welcome-message"], [3, "src"], [1, "welcome-header-text"], [1, "welcome-suggested-questions"], [1, "welcome-suggested-questions-col"], [1, "welcome-question"], [1, "welcome-question", 3, "click"], [1, "welcome-question-header"], [1, "scroll-to-bottom", "fas", "fa-arrow-down", 3, "click"], ["kendoButton", "", "themeColor", "primary", 3, "click"], ["kendoButton", "", 3, "click"]], template: function ChatComponent_Template(rf, ctx) { if (rf & 1) {
333
+ const _r1 = i0.ɵɵgetCurrentView();
334
+ i0.ɵɵelementStart(0, "div", 2);
335
+ i0.ɵɵtemplate(1, ChatComponent_Conditional_1_Template, 12, 5, "div", 3);
336
+ i0.ɵɵelementStart(2, "div", 4, 0);
337
+ i0.ɵɵlistener("scroll", function ChatComponent_Template_div_scroll_2_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleCheckScroll()); });
337
338
  i0.ɵɵelementStart(4, "span");
338
339
  i0.ɵɵtext(5);
339
340
  i0.ɵɵelementEnd()();
340
- i0.ɵɵtemplate(6, ChatComponent_Conditional_6_Template, 1, 0, "span", 4);
341
- i0.ɵɵelementStart(7, "div", 5);
342
- i0.ɵɵtemplate(8, ChatComponent_Conditional_8_Template, 1, 0, "kendo-loader", 6);
343
- i0.ɵɵelementStart(9, "div", 7)(10, "textarea", 8, 9);
344
- i0.ɵɵtwoWayListener("ngModelChange", function ChatComponent_Template_textarea_ngModelChange_10_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.currentMessage, $event) || (ctx.currentMessage = $event); return $event; });
345
- i0.ɵɵlistener("input", function ChatComponent_Template_textarea_input_10_listener($event) { return ctx.handleInputChange($event); })("keyup.enter", function ChatComponent_Template_textarea_keyup_enter_10_listener() { return ctx.SendCurrentMessage(); });
341
+ i0.ɵɵtemplate(6, ChatComponent_Conditional_6_Template, 1, 0, "span", 5);
342
+ i0.ɵɵelementStart(7, "div", 6);
343
+ i0.ɵɵtemplate(8, ChatComponent_Conditional_8_Template, 1, 0, "kendo-loader", 7);
344
+ i0.ɵɵelementStart(9, "div", 8)(10, "textarea", 9, 1);
345
+ i0.ɵɵtwoWayListener("ngModelChange", function ChatComponent_Template_textarea_ngModelChange_10_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.currentMessage, $event) || (ctx.currentMessage = $event); return i0.ɵɵresetView($event); });
346
+ i0.ɵɵlistener("input", function ChatComponent_Template_textarea_input_10_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleInputChange($event)); })("keyup.enter", function ChatComponent_Template_textarea_keyup_enter_10_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.SendCurrentMessage()); });
346
347
  i0.ɵɵtext(12, " ");
347
348
  i0.ɵɵelementEnd()();
348
349
  i0.ɵɵelementStart(13, "button", 10);
349
- i0.ɵɵlistener("click", function ChatComponent_Template_button_click_13_listener() { return ctx.showingClearAllDialog = true; });
350
+ i0.ɵɵlistener("click", function ChatComponent_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.showingClearAllDialog = true); });
350
351
  i0.ɵɵelement(14, "span", 11);
351
352
  i0.ɵɵelementEnd();
352
353
  i0.ɵɵelementStart(15, "button", 10);
353
- i0.ɵɵlistener("click", function ChatComponent_Template_button_click_15_listener() { return ctx.SendCurrentMessage(); });
354
+ i0.ɵɵlistener("click", function ChatComponent_Template_button_click_15_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.SendCurrentMessage()); });
354
355
  i0.ɵɵelement(16, "span", 12);
355
356
  i0.ɵɵelementEnd()()();
356
357
  i0.ɵɵtemplate(17, ChatComponent_Conditional_17_Template, 8, 1, "kendo-dialog");
357
358
  } if (rf & 2) {
358
359
  i0.ɵɵadvance();
359
- i0.ɵɵconditional(1, ctx.Messages.length === 0 && !ctx.ShowWaitingIndicator ? 1 : -1);
360
+ i0.ɵɵconditional(ctx.Messages.length === 0 && !ctx.ShowWaitingIndicator ? 1 : -1);
360
361
  i0.ɵɵadvance(4);
361
362
  i0.ɵɵtextInterpolate(ctx.InitialMessage);
362
363
  i0.ɵɵadvance();
363
- i0.ɵɵconditional(6, ctx.ShowScrollToBottomButton ? 6 : -1);
364
+ i0.ɵɵconditional(ctx.ShowScrollToBottomButton ? 6 : -1);
364
365
  i0.ɵɵadvance(2);
365
- i0.ɵɵconditional(8, ctx.ShowWaitingIndicator ? 8 : -1);
366
+ i0.ɵɵconditional(ctx.ShowWaitingIndicator ? 8 : -1);
366
367
  i0.ɵɵadvance(2);
367
368
  i0.ɵɵtwoWayProperty("ngModel", ctx.currentMessage);
368
369
  i0.ɵɵproperty("disabled", ctx.ShowWaitingIndicator)("placeholder", ctx.Placeholder);
@@ -371,7 +372,7 @@ ChatComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ChatComponent
371
372
  i0.ɵɵadvance(2);
372
373
  i0.ɵɵproperty("disabled", !ctx.InternalAllowSend || ctx.currentMessage.length === 0 || ctx.ShowWaitingIndicator);
373
374
  i0.ɵɵadvance(2);
374
- i0.ɵɵconditional(17, ctx.showingClearAllDialog ? 17 : -1);
375
+ i0.ɵɵconditional(ctx.showingClearAllDialog ? 17 : -1);
375
376
  } }, dependencies: [i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgModel, i3.FillContainer, i4.LoaderComponent, i5.ButtonComponent, i6.DialogComponent, i6.DialogActionsComponent], styles: [".loader[_ngcontent-%COMP%] {\n position: absolute;\n left: 0px;\n}\n\n.chat-wrapper[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n position: relative; \n\n}\n\n.chat-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 flex: 1;\n}\n\n\n\n.chat-messages[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 0;\n background: transparent; \n\n}\n\n\n\n.chat-messages[_ngcontent-%COMP%]:hover::-webkit-scrollbar {\n width: 12px; \n\n background-color: #f0f0f0; \n\n\n}\n\n\n\n.chat-messages[_ngcontent-%COMP%]:hover::-webkit-scrollbar-thumb {\n background-color: #888; \n\n opacity: 0.5; \n\n}\n\n\n\n.chat-messages[_ngcontent-%COMP%]:hover::-webkit-scrollbar-thumb {\n border-radius: 10px;\n}\n\n\n\n.chat-messages[_ngcontent-%COMP%]:hover::-webkit-scrollbar-thumb:hover {\n background: #555; \n\n}\n\n\n.chat-messages[_ngcontent-%COMP%] {\n scrollbar-width: thin; \n\n scrollbar-color: #888 #f0f0f0; \n\n}\n \n\n\n\n.chat-input-area[_ngcontent-%COMP%] {\n background: #fff;\n display: flex;\n justify-content: center;\n align-items: center;\n padding-top: 12px;\n min-height: 35px;\n margin-bottom: 15px;\n}\n.chat-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.chat-input-area[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:first-of-type {\n margin-left: -40px;\n}\n.chat-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 max-width: 710px; \n width: 75%; \n\n padding-right: 90px; \n\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\n.text-area-wrapper[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:disabled {\n background-color: white;\n}\n\n\n .chat-message-wrap {\n display: flex;\n align-items: flex-start; \n\n margin-bottom: 10px;\n margin-right: 10px;\n}\n\n .chat-message-image {\n margin-top: 12px;\n font-size: 24px; \n\n margin-right: 10px; \n\n width: 50px;\n flex-shrink: 0; \n \n}\n\n\n\n .chat-message {\n padding-left: 7px;\n padding-right: 7px;\n margin-bottom: 10px;\n border-radius: 5px;\n background-color: rgb(255, 255, 240);\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n word-wrap: break-word;\n}\n\n .chat-message-ai {\n background-color: rgb(230, 246, 253);\n}\n\n.scroll-to-bottom[_ngcontent-%COMP%] {\n position: absolute; \n\n left: 50%; \n\n transform: translateX(-50%); \n\n bottom: 100px; \n\n z-index: 1000; \n\n border-radius: 50%;\n width: 35px;\n height: 35px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 22px;\n background-color: #f8f8f8;\n box-shadow: 0px 0px 5px rgba(0,0,0,0.3); \n\n cursor: pointer;\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\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}"] });
376
377
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ChatComponent, [{
377
378
  type: Component,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-chat",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
4
4
  "description": "MemberJunction: Reusable Chat Component - can be used for AI or peer to peer chat applications.",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -15,22 +15,22 @@
15
15
  "author": "",
16
16
  "license": "ISC",
17
17
  "devDependencies": {
18
- "@angular/compiler": "~17.2.2",
19
- "@angular/compiler-cli": "~17.2.2"
18
+ "@angular/compiler": "18.0.2",
19
+ "@angular/compiler-cli": "18.0.2"
20
20
  },
21
21
  "peerDependencies": {
22
- "@angular/common": "~17.2.2",
23
- "@angular/core": "~17.2.2",
24
- "@angular/forms": "~17.2.2"
22
+ "@angular/common": "18.0.2",
23
+ "@angular/core": "18.0.2",
24
+ "@angular/forms": "18.0.2"
25
25
  },
26
26
  "dependencies": {
27
- "@memberjunction/codegen-lib": "1.5.1",
28
- "@memberjunction/ng-container-directives": "1.5.1",
29
- "@progress/kendo-angular-indicators": "~15.1.0",
30
- "@progress/kendo-angular-buttons": "~15.1.0",
31
- "@progress/kendo-angular-dialog": "~15.1.0",
27
+ "@memberjunction/codegen-lib": "1.5.3",
28
+ "@memberjunction/ng-container-directives": "1.5.3",
29
+ "@progress/kendo-angular-indicators": "16.2.0",
30
+ "@progress/kendo-angular-buttons": "16.2.0",
31
+ "@progress/kendo-angular-dialog": "16.2.0",
32
32
  "tslib": "^2.3.0",
33
- "ngx-markdown": "^17.1.1"
33
+ "ngx-markdown": "18.0.0"
34
34
  },
35
35
  "sideEffects": false
36
36
  }