@progress/kendo-angular-conversational-ui 4.1.0 → 5.0.0-dev.202204131603

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/{dist/es2015/api → api}/action.interface.d.ts +0 -0
  2. package/{dist/es2015/api → api}/attachment.interface.d.ts +0 -0
  3. package/{dist/es2015/api → api}/execute-action-event.d.ts +1 -1
  4. package/{dist/es/api/user.interface.js → api/index.d.ts} +6 -0
  5. package/{dist/es2015/api → api}/message.interface.d.ts +0 -0
  6. package/{dist/es2015/api → api}/post-message-event.d.ts +0 -0
  7. package/{dist/es2015/api → api}/preventable-event.d.ts +0 -0
  8. package/{dist/es2015/api → api}/user.interface.d.ts +0 -0
  9. package/bundles/kendo-angular-conversational-ui.umd.js +5 -0
  10. package/{dist/es2015/cards → cards}/hero-card.component.d.ts +3 -0
  11. package/{dist/es2015/chat → chat}/attachment-template.directive.d.ts +3 -0
  12. package/{dist/es2015/chat → chat}/attachment.component.d.ts +9 -5
  13. package/{dist/es2015/chat → chat}/builtin-actions.d.ts +0 -0
  14. package/{dist/es2015/chat → chat}/chat-item.d.ts +0 -0
  15. package/{dist/es2015/chat → chat}/chat-view.d.ts +1 -1
  16. package/{dist/es2015/chat → chat}/chat.component.d.ts +7 -7
  17. package/{dist/es2015/chat → chat}/chat.directives.d.ts +0 -0
  18. package/chat/chat.module.d.ts +49 -0
  19. package/{dist/es2015/chat → chat}/l10n/custom-messages.component.d.ts +4 -1
  20. package/{dist/es2015/chat → chat}/l10n/localized-messages.directive.d.ts +3 -0
  21. package/{dist/es2015/chat → chat}/l10n/messages.d.ts +3 -0
  22. package/{dist/es2015/chat → chat}/message-attachments.component.d.ts +5 -2
  23. package/{dist/es2015/chat → chat}/message-box.component.d.ts +4 -1
  24. package/{dist/es2015/chat → chat}/message-box.directive.d.ts +3 -0
  25. package/{dist/es2015/chat → chat}/message-list.component.d.ts +9 -8
  26. package/{dist/es2015/chat → chat}/message-template.directive.d.ts +3 -0
  27. package/{dist/es2015/chat → chat}/message.component.d.ts +4 -1
  28. package/{dist/es2015/chat → chat}/suggested-actions.component.d.ts +4 -1
  29. package/common/focused-state.directive.d.ts +15 -0
  30. package/{dist/es2015/common → common}/keys.enum.d.ts +0 -0
  31. package/{dist/es2015/common → common}/models/message-box-options.d.ts +0 -0
  32. package/{dist/es2015/common → common}/scroll-anchor.directive.d.ts +3 -0
  33. package/{dist/es2015/common → common}/utils.d.ts +0 -0
  34. package/{dist/es2015 → esm2015}/api/action.interface.js +2 -1
  35. package/{dist/es2015 → esm2015}/api/attachment.interface.js +1 -0
  36. package/{dist/es2015 → esm2015}/api/execute-action-event.js +0 -0
  37. package/{dist/es/api/attachment.interface.js → esm2015/api/index.js} +6 -0
  38. package/{dist/es → esm2015}/api/message.interface.js +1 -0
  39. package/{dist/es2015 → esm2015}/api/post-message-event.js +0 -0
  40. package/{dist/es2015 → esm2015}/api/preventable-event.js +0 -0
  41. package/{dist/es2015 → esm2015}/api/user.interface.js +1 -0
  42. package/esm2015/cards/hero-card.component.js +90 -0
  43. package/{dist/es2015 → esm2015}/chat/attachment-template.directive.js +14 -12
  44. package/esm2015/chat/attachment.component.js +83 -0
  45. package/{dist/es2015 → esm2015}/chat/builtin-actions.js +13 -16
  46. package/{dist/es2015 → esm2015}/chat/chat-item.js +0 -0
  47. package/{dist/es2015 → esm2015}/chat/chat-view.js +0 -6
  48. package/esm2015/chat/chat.component.js +246 -0
  49. package/{dist/es → esm2015}/chat/chat.directives.js +0 -0
  50. package/{dist/es2015 → esm2015}/chat/chat.module.js +43 -15
  51. package/esm2015/chat/l10n/custom-messages.component.js +42 -0
  52. package/esm2015/chat/l10n/localized-messages.directive.js +37 -0
  53. package/esm2015/chat/l10n/messages.js +25 -0
  54. package/{dist/es2015 → esm2015}/chat/message-attachments.component.js +71 -48
  55. package/esm2015/chat/message-box.component.js +141 -0
  56. package/esm2015/chat/message-box.directive.js +24 -0
  57. package/esm2015/chat/message-list.component.js +279 -0
  58. package/{dist/es2015 → esm2015}/chat/message-template.directive.js +14 -12
  59. package/esm2015/chat/message.component.js +140 -0
  60. package/esm2015/chat/suggested-actions.component.js +113 -0
  61. package/esm2015/common/focused-state.directive.js +37 -0
  62. package/{dist/es2015 → esm2015}/common/keys.enum.js +1 -0
  63. package/{dist/es → esm2015}/common/models/message-box-options.js +1 -0
  64. package/{dist/es2015 → esm2015}/common/scroll-anchor.directive.js +20 -26
  65. package/{dist/es2015 → esm2015}/common/utils.js +0 -0
  66. package/{dist/es/api/action.interface.js → esm2015/kendo-angular-conversational-ui.js} +4 -1
  67. package/esm2015/main.js +10 -0
  68. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  69. package/fesm2015/kendo-angular-conversational-ui.js +1757 -0
  70. package/{dist/es2015/common/focused-state.directive.d.ts → kendo-angular-conversational-ui.d.ts} +3 -6
  71. package/main.d.ts +11 -0
  72. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  73. package/package.json +38 -107
  74. package/schematics/ngAdd/index.js +5 -2
  75. package/schematics/ngAdd/index.js.map +1 -1
  76. package/dist/cdn/js/kendo-angular-conversational-ui.js +0 -20
  77. package/dist/cdn/main.js +0 -5
  78. package/dist/es/api/execute-action-event.js +0 -24
  79. package/dist/es/api/post-message-event.js +0 -18
  80. package/dist/es/api/preventable-event.js +0 -32
  81. package/dist/es/cards/hero-card.component.js +0 -54
  82. package/dist/es/chat/attachment-template.directive.js +0 -32
  83. package/dist/es/chat/attachment.component.js +0 -65
  84. package/dist/es/chat/builtin-actions.js +0 -28
  85. package/dist/es/chat/chat-item.js +0 -13
  86. package/dist/es/chat/chat-view.js +0 -92
  87. package/dist/es/chat/chat.component.js +0 -190
  88. package/dist/es/chat/chat.module.js +0 -80
  89. package/dist/es/chat/l10n/custom-messages.component.js +0 -45
  90. package/dist/es/chat/l10n/localized-messages.directive.js +0 -36
  91. package/dist/es/chat/l10n/messages.js +0 -26
  92. package/dist/es/chat/message-attachments.component.js +0 -148
  93. package/dist/es/chat/message-box.component.js +0 -124
  94. package/dist/es/chat/message-box.directive.js +0 -24
  95. package/dist/es/chat/message-list.component.js +0 -165
  96. package/dist/es/chat/message-template.directive.js +0 -32
  97. package/dist/es/chat/message.component.js +0 -77
  98. package/dist/es/chat/suggested-actions.component.js +0 -91
  99. package/dist/es/common/focused-state.directive.js +0 -43
  100. package/dist/es/common/keys.enum.js +0 -4
  101. package/dist/es/common/scroll-anchor.directive.js +0 -87
  102. package/dist/es/common/utils.js +0 -13
  103. package/dist/es/index.js +0 -22
  104. package/dist/es/main.js +0 -8
  105. package/dist/es/package-metadata.js +0 -15
  106. package/dist/es2015/api/message.interface.js +0 -4
  107. package/dist/es2015/cards/hero-card.component.js +0 -79
  108. package/dist/es2015/chat/attachment.component.js +0 -66
  109. package/dist/es2015/chat/chat.component.js +0 -214
  110. package/dist/es2015/chat/chat.directives.js +0 -8
  111. package/dist/es2015/chat/chat.module.d.ts +0 -27
  112. package/dist/es2015/chat/l10n/custom-messages.component.js +0 -37
  113. package/dist/es2015/chat/l10n/localized-messages.directive.js +0 -32
  114. package/dist/es2015/chat/l10n/messages.js +0 -20
  115. package/dist/es2015/chat/message-box.component.js +0 -157
  116. package/dist/es2015/chat/message-box.directive.js +0 -23
  117. package/dist/es2015/chat/message-list.component.js +0 -227
  118. package/dist/es2015/chat/message.component.js +0 -107
  119. package/dist/es2015/chat/suggested-actions.component.js +0 -105
  120. package/dist/es2015/common/focused-state.directive.js +0 -45
  121. package/dist/es2015/common/models/message-box-options.js +0 -4
  122. package/dist/es2015/index.d.ts +0 -22
  123. package/dist/es2015/index.js +0 -22
  124. package/dist/es2015/index.metadata.json +0 -1
  125. package/dist/es2015/main.d.ts +0 -13
  126. package/dist/es2015/main.js +0 -8
  127. package/dist/fesm2015/index.js +0 -1554
  128. package/dist/fesm5/index.js +0 -1383
  129. package/dist/npm/api/action.interface.js +0 -7
  130. package/dist/npm/api/attachment.interface.js +0 -6
  131. package/dist/npm/api/execute-action-event.js +0 -26
  132. package/dist/npm/api/message.interface.js +0 -6
  133. package/dist/npm/api/post-message-event.js +0 -20
  134. package/dist/npm/api/preventable-event.js +0 -34
  135. package/dist/npm/api/user.interface.js +0 -6
  136. package/dist/npm/cards/hero-card.component.js +0 -56
  137. package/dist/npm/chat/attachment-template.directive.js +0 -34
  138. package/dist/npm/chat/attachment.component.js +0 -67
  139. package/dist/npm/chat/builtin-actions.js +0 -33
  140. package/dist/npm/chat/chat-item.js +0 -15
  141. package/dist/npm/chat/chat-view.js +0 -98
  142. package/dist/npm/chat/chat.component.js +0 -192
  143. package/dist/npm/chat/chat.directives.js +0 -14
  144. package/dist/npm/chat/chat.module.js +0 -82
  145. package/dist/npm/chat/l10n/custom-messages.component.js +0 -47
  146. package/dist/npm/chat/l10n/localized-messages.directive.js +0 -38
  147. package/dist/npm/chat/l10n/messages.js +0 -28
  148. package/dist/npm/chat/message-attachments.component.js +0 -150
  149. package/dist/npm/chat/message-box.component.js +0 -126
  150. package/dist/npm/chat/message-box.directive.js +0 -26
  151. package/dist/npm/chat/message-list.component.js +0 -167
  152. package/dist/npm/chat/message-template.directive.js +0 -34
  153. package/dist/npm/chat/message.component.js +0 -79
  154. package/dist/npm/chat/suggested-actions.component.js +0 -93
  155. package/dist/npm/common/focused-state.directive.js +0 -45
  156. package/dist/npm/common/keys.enum.js +0 -6
  157. package/dist/npm/common/models/message-box-options.js +0 -6
  158. package/dist/npm/common/scroll-anchor.directive.js +0 -89
  159. package/dist/npm/common/utils.js +0 -15
  160. package/dist/npm/index.js +0 -39
  161. package/dist/npm/main.js +0 -11
  162. package/dist/npm/package-metadata.js +0 -17
  163. package/dist/systemjs/kendo-angular-conversational-ui.js +0 -5
@@ -1,1383 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { __decorate, __param, __metadata, __extends } from 'tslib';
6
- import { Directive, Optional, TemplateRef, HostBinding, ViewChild, ElementRef, Input, Output, EventEmitter, Component, isDevMode, ContentChild, NgZone, forwardRef, HostListener, ViewChildren, QueryList, Renderer2, NgModule } from '@angular/core';
7
- import { LocalizationService, L10N_PREFIX, ComponentMessages } from '@progress/kendo-angular-l10n';
8
- import { validatePackage } from '@progress/kendo-licensing';
9
- import { Keys, ResizeSensorModule } from '@progress/kendo-angular-common';
10
- import { ButtonModule } from '@progress/kendo-angular-buttons';
11
- import { CommonModule } from '@angular/common';
12
- import { fromEvent } from 'rxjs';
13
- import { debounceTime } from 'rxjs/operators';
14
- import { IntlService } from '@progress/kendo-angular-intl';
15
-
16
- /**
17
- * Defines a template that will be used for displaying message attachments. To define an attachment
18
- * template, nest an `<ng-template>` tag with the `kendoChatAttachmentTemplate` attribute inside the
19
- * `<kendo-chat>` component. The template context is set to the attachment instance. For more information,
20
- * refer to the article on [message attachments]({% slug attachments_chat %}).
21
- *
22
- * {% meta height:700 %}
23
- * {% embed_file attachments/templates/app.component.ts preview %}
24
- * {% embed_file shared/app.module.ts preview %}
25
- * {% embed_file shared/main.ts hidden %}
26
- * {% endmeta %}
27
- */
28
- var AttachmentTemplateDirective = /** @class */ (function () {
29
- function AttachmentTemplateDirective(templateRef) {
30
- this.templateRef = templateRef;
31
- }
32
- AttachmentTemplateDirective = __decorate([
33
- Directive({
34
- selector: '[kendoChatAttachmentTemplate]'
35
- }),
36
- __param(0, Optional()),
37
- __metadata("design:paramtypes", [TemplateRef])
38
- ], AttachmentTemplateDirective);
39
- return AttachmentTemplateDirective;
40
- }());
41
-
42
- /**
43
- * Arguments for the `SendMessage` event.
44
- *
45
- */
46
- var SendMessageEvent = /** @class */ (function () {
47
- /**
48
- * @hidden
49
- */
50
- function SendMessageEvent(message) {
51
- this.message = message;
52
- }
53
- return SendMessageEvent;
54
- }());
55
-
56
- var noop = function () { };
57
- var ɵ1 = function (action, sender) {
58
- sender.sendMessage.emit(new SendMessageEvent({
59
- author: sender.user,
60
- text: action.value,
61
- timestamp: new Date()
62
- }));
63
- }, ɵ2 = function (action) {
64
- window.open('tel:' + action.value);
65
- }, ɵ3 = function (action) {
66
- window.open(action.value);
67
- };
68
- var handlers = {
69
- 'reply': ɵ1,
70
- 'call': ɵ2,
71
- 'openUrl': ɵ3
72
- };
73
- /**
74
- * @hidden
75
- */
76
- var makeHandler = function (action) { return handlers[action.type] || noop; };
77
-
78
- /**
79
- * Defines a template that will be used for displaying Chat messages. To define an attachment
80
- * template, nest an `<ng-template>` tag with the `kendoChatMessageTemplate` attribute inside the
81
- * `<kendo-chat>` component. The template context is set to the message instance. For more information,
82
- * refer to the article on [message templates]({% slug message_templates_chat %}).
83
- *
84
- * {% meta height:700 %}
85
- * {% embed_file messages/templates/app.component.ts preview %}
86
- * {% embed_file shared/app.module.ts preview %}
87
- * {% embed_file shared/main.ts hidden %}
88
- * {% endmeta %}
89
- */
90
- var MessageTemplateDirective = /** @class */ (function () {
91
- function MessageTemplateDirective(templateRef) {
92
- this.templateRef = templateRef;
93
- }
94
- MessageTemplateDirective = __decorate([
95
- Directive({
96
- selector: '[kendoChatMessageTemplate]'
97
- }),
98
- __param(0, Optional()),
99
- __metadata("design:paramtypes", [TemplateRef])
100
- ], MessageTemplateDirective);
101
- return MessageTemplateDirective;
102
- }());
103
-
104
- /**
105
- * @hidden
106
- */
107
- var packageMetadata = {
108
- name: '@progress/kendo-angular-conversational-ui',
109
- productName: 'Kendo UI for Angular',
110
- productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
111
- publishDate: 1649323827,
112
- version: '',
113
- licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
114
- };
115
-
116
- /**
117
- * Creates a message box area that overrides the default message box of the Conversational UI Component.
118
- * To define a message-box template, nest an `<ng-template>` tag with the `kendoChatMessageBoxTemplate` directive inside the `<kendo-chat>` tag
119
- * [see example]({% slug message_box %}#toc-message-box-template).
120
- */
121
- var ChatMessageBoxTemplateDirective = /** @class */ (function () {
122
- function ChatMessageBoxTemplateDirective(templateRef) {
123
- this.templateRef = templateRef;
124
- }
125
- ChatMessageBoxTemplateDirective = __decorate([
126
- Directive({
127
- selector: '[kendoChatMessageBoxTemplate]'
128
- }),
129
- __metadata("design:paramtypes", [TemplateRef])
130
- ], ChatMessageBoxTemplateDirective);
131
- return ChatMessageBoxTemplateDirective;
132
- }());
133
-
134
- // tslint:disable-next-line:max-line-length
135
- var sendIcon = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path d="M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z"/></svg>';
136
- /**
137
- * @hidden
138
- */
139
- var MessageBoxComponent = /** @class */ (function () {
140
- function MessageBoxComponent() {
141
- this.hostClasses = 'k-message-box k-input k-input-md k-rounded-md k-input-solid';
142
- this.sendMessage = new EventEmitter();
143
- }
144
- Object.defineProperty(MessageBoxComponent.prototype, "messageBoxValue", {
145
- get: function () {
146
- return this.type === 'textarea';
147
- },
148
- enumerable: true,
149
- configurable: true
150
- });
151
- /**
152
- * @hidden
153
- */
154
- MessageBoxComponent.prototype.sendClick = function () {
155
- var input = this.messageBoxInput.nativeElement;
156
- var value = input.value;
157
- if (!value) {
158
- return;
159
- }
160
- var message = {
161
- author: this.user,
162
- text: value,
163
- timestamp: new Date()
164
- };
165
- this.sendMessage.emit(new SendMessageEvent(message));
166
- input.value = null;
167
- input.focus();
168
- this.autoScroll = true;
169
- };
170
- /**
171
- * @hidden
172
- */
173
- MessageBoxComponent.prototype.inputKeydown = function (e) {
174
- if (e.keyCode === Keys.Enter) {
175
- this.sendClick();
176
- }
177
- };
178
- /**
179
- * @hidden
180
- */
181
- MessageBoxComponent.prototype.textAreaKeydown = function (e) {
182
- var isEnter = e.keyCode === Keys.Enter;
183
- if (!isEnter) {
184
- return;
185
- }
186
- var newLine = (e.metaKey || e.ctrlKey);
187
- var enterOnly = !(e.shiftKey || e.metaKey || e.ctrlKey);
188
- if (enterOnly) {
189
- e.preventDefault();
190
- this.sendClick();
191
- }
192
- if (newLine) {
193
- this.messageBoxInput.nativeElement.value += "\r\n";
194
- }
195
- };
196
- /**
197
- * @hidden
198
- */
199
- MessageBoxComponent.prototype.textFor = function (key) {
200
- return this.localization.get(key);
201
- };
202
- __decorate([
203
- HostBinding('class'),
204
- __metadata("design:type", String)
205
- ], MessageBoxComponent.prototype, "hostClasses", void 0);
206
- __decorate([
207
- HostBinding('class.\!k-align-items-end'),
208
- __metadata("design:type", Boolean),
209
- __metadata("design:paramtypes", [])
210
- ], MessageBoxComponent.prototype, "messageBoxValue", null);
211
- __decorate([
212
- ViewChild('messageBoxInput', { static: false }),
213
- __metadata("design:type", ElementRef)
214
- ], MessageBoxComponent.prototype, "messageBoxInput", void 0);
215
- __decorate([
216
- Input(),
217
- __metadata("design:type", Object)
218
- ], MessageBoxComponent.prototype, "user", void 0);
219
- __decorate([
220
- Input(),
221
- __metadata("design:type", Boolean)
222
- ], MessageBoxComponent.prototype, "autoScroll", void 0);
223
- __decorate([
224
- Input(),
225
- __metadata("design:type", String)
226
- ], MessageBoxComponent.prototype, "type", void 0);
227
- __decorate([
228
- Input(),
229
- __metadata("design:type", LocalizationService)
230
- ], MessageBoxComponent.prototype, "localization", void 0);
231
- __decorate([
232
- Input(),
233
- __metadata("design:type", ChatMessageBoxTemplateDirective)
234
- ], MessageBoxComponent.prototype, "messageBoxTemplate", void 0);
235
- __decorate([
236
- Output(),
237
- __metadata("design:type", EventEmitter)
238
- ], MessageBoxComponent.prototype, "sendMessage", void 0);
239
- MessageBoxComponent = __decorate([
240
- Component({
241
- selector: 'kendo-message-box',
242
- template: "\n <ng-container *ngIf=\"!messageBoxTemplate\">\n <input\n *ngIf=\"type === 'textbox'\"\n #messageBoxInput\n kendoChatFocusedState\n type=\"text\"\n class=\"k-textbox k-input k-input-md k-input-solid\"\n [placeholder]=\"textFor('messagePlaceholder')\"\n (keydown)=\"inputKeydown($event)\"\n />\n\n <textarea\n *ngIf=\"type === 'textarea'\"\n #messageBoxInput\n kendoChatFocusedState\n [rows]=\"3\"\n class=\"k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none\"\n [placeholder]=\"textFor('messagePlaceholder')\"\n (keydown)=\"textAreaKeydown($event)\"\n ></textarea>\n\n <button\n kendoButton\n fillMode=\"flat\"\n class=\"k-button-send\"\n [tabindex]=\"0\"\n [attr.title]=\"textFor('send')\"\n (click)=\"sendClick()\"\n >\n " + sendIcon + "\n </button>\n </ng-container>\n\n <ng-template *ngIf=\"messageBoxTemplate\" [ngTemplateOutlet]=\"messageBoxTemplate?.templateRef\"></ng-template>\n"
243
- })
244
- ], MessageBoxComponent);
245
- return MessageBoxComponent;
246
- }());
247
-
248
- /**
249
- * Represents the Kendo UI Chat component for Angular.
250
- *
251
- * {% meta height:700 %}
252
- * {% embed_file echo/app.component.ts preview %}
253
- * {% embed_file shared/app.module.ts %}
254
- * {% embed_file shared/main.ts hidden %}
255
- * {% endmeta %}
256
- *
257
- */
258
- var ChatComponent = /** @class */ (function () {
259
- function ChatComponent(localization, zone) {
260
- var _this = this;
261
- this.localization = localization;
262
- this.zone = zone;
263
- /**
264
- * Used to switch between a one-liner input or a textarea.
265
- * ([see example]({% slug message_box %})#toc-message-box-types).
266
- * @default input
267
- */
268
- this.messageBoxType = 'textbox';
269
- /**
270
- * Fires when the user types a message and clicks the **Send** button or presses **Enter**.
271
- * Emits the [`SendMessageEvent`]({% slug api_conversational-ui_sendmessageevent %}).
272
- *
273
- * > The message is not automatically appended to the `messages` array.
274
- */
275
- this.sendMessage = new EventEmitter();
276
- /**
277
- * Fires when the user clicks a quick action button.
278
- * The Chat internally handles the `reply`, `openUrl`, and `call` [known actions]({% slug api_conversational-ui_actiontype %}).
279
- *
280
- * Emits the [`ExecuteActionEvent`]({% slug api_conversational-ui_executeactionevent %}).
281
- * The event is preventable. If `preventDefault` is called, the built-in action will be suppressed.
282
- */
283
- this.executeAction = new EventEmitter();
284
- /**
285
- * @hidden
286
- */
287
- this.autoScroll = true;
288
- validatePackage(packageMetadata);
289
- this.direction = localization.rtl ? 'rtl' : 'ltr';
290
- this.localizationChangeSubscription = localization.changes.subscribe(function (_a) {
291
- var rtl = _a.rtl;
292
- _this.direction = rtl ? 'rtl' : 'ltr';
293
- });
294
- }
295
- Object.defineProperty(ChatComponent.prototype, "className", {
296
- get: function () {
297
- return 'k-chat';
298
- },
299
- enumerable: true,
300
- configurable: true
301
- });
302
- Object.defineProperty(ChatComponent.prototype, "dirAttr", {
303
- get: function () {
304
- return this.direction;
305
- },
306
- enumerable: true,
307
- configurable: true
308
- });
309
- Object.defineProperty(ChatComponent.prototype, "localizationText", {
310
- /**
311
- * @hidden
312
- */
313
- get: function () {
314
- return this.localization;
315
- },
316
- enumerable: true,
317
- configurable: true
318
- });
319
- ChatComponent.prototype.ngOnChanges = function () {
320
- var _this = this;
321
- this.zone.runOutsideAngular(function () { return setTimeout(function () {
322
- _this.messageList.nativeElement.style.flex = '1 1 auto';
323
- }); });
324
- };
325
- ChatComponent.prototype.ngAfterViewInit = function () {
326
- if (!isDevMode()) {
327
- return;
328
- }
329
- if (!this.user) {
330
- throw new Error('User must be set and have a valid id.');
331
- }
332
- };
333
- ChatComponent.prototype.ngOnDestroy = function () {
334
- if (this.localizationChangeSubscription) {
335
- this.localizationChangeSubscription.unsubscribe();
336
- }
337
- };
338
- /**
339
- * @hidden
340
- */
341
- ChatComponent.prototype.dispatchAction = function (e) {
342
- this.executeAction.emit(e);
343
- if (!e.isDefaultPrevented()) {
344
- var handler = makeHandler(e.action);
345
- handler(e.action, this);
346
- if (!this.messageBoxTemplate) {
347
- this.messageBox.messageBoxInput.nativeElement.focus();
348
- }
349
- }
350
- };
351
- /**
352
- * @hidden
353
- */
354
- ChatComponent.prototype.textFor = function (key) {
355
- return this.localization.get(key);
356
- };
357
- __decorate([
358
- Input(),
359
- __metadata("design:type", Array)
360
- ], ChatComponent.prototype, "messages", void 0);
361
- __decorate([
362
- Input(),
363
- __metadata("design:type", Object)
364
- ], ChatComponent.prototype, "user", void 0);
365
- __decorate([
366
- Input(),
367
- __metadata("design:type", String)
368
- ], ChatComponent.prototype, "messageBoxType", void 0);
369
- __decorate([
370
- Output(),
371
- __metadata("design:type", EventEmitter)
372
- ], ChatComponent.prototype, "sendMessage", void 0);
373
- __decorate([
374
- Output(),
375
- __metadata("design:type", EventEmitter)
376
- ], ChatComponent.prototype, "executeAction", void 0);
377
- __decorate([
378
- HostBinding('class'),
379
- __metadata("design:type", String),
380
- __metadata("design:paramtypes", [])
381
- ], ChatComponent.prototype, "className", null);
382
- __decorate([
383
- HostBinding('attr.dir'),
384
- __metadata("design:type", String),
385
- __metadata("design:paramtypes", [])
386
- ], ChatComponent.prototype, "dirAttr", null);
387
- __decorate([
388
- ContentChild(AttachmentTemplateDirective, { static: false }),
389
- __metadata("design:type", AttachmentTemplateDirective)
390
- ], ChatComponent.prototype, "attachmentTemplate", void 0);
391
- __decorate([
392
- ContentChild(MessageTemplateDirective, { static: false }),
393
- __metadata("design:type", MessageTemplateDirective)
394
- ], ChatComponent.prototype, "messageTemplate", void 0);
395
- __decorate([
396
- ContentChild(ChatMessageBoxTemplateDirective, { static: false }),
397
- __metadata("design:type", ChatMessageBoxTemplateDirective)
398
- ], ChatComponent.prototype, "messageBoxTemplate", void 0);
399
- __decorate([
400
- ViewChild('messageBox', { static: false }),
401
- __metadata("design:type", MessageBoxComponent)
402
- ], ChatComponent.prototype, "messageBox", void 0);
403
- __decorate([
404
- ViewChild('messageList', { static: true }),
405
- __metadata("design:type", ElementRef)
406
- ], ChatComponent.prototype, "messageList", void 0);
407
- ChatComponent = __decorate([
408
- Component({
409
- providers: [
410
- LocalizationService,
411
- {
412
- provide: L10N_PREFIX,
413
- useValue: 'kendo.chat'
414
- }
415
- ],
416
- selector: 'kendo-chat',
417
- template: "\n <ng-container\n kendoChatLocalizedMessages\n i18n-messagePlaceholder=\"kendo.chat.messagePlaceholder|The placholder text of the message text input\"\n messagePlaceholder=\"Type a message...\"\n\n i18n-send=\"kendo.chat.send|The text for the Send button\"\n send=\"Send...\"\n >\n </ng-container>\n\n <div\n #messageList\n class=\"k-message-list k-avatars\"\n aria-live=\"polite\" role=\"log\"\n kendoChatScrollAnchor\n #anchor=\"scrollAnchor\"\n [(autoScroll)]=\"autoScroll\"\n >\n <kendo-chat-message-list\n [messages]=\"messages\"\n [messageTemplate]=\"messageTemplate\"\n [attachmentTemplate]=\"attachmentTemplate\"\n [user]=\"user\"\n (executeAction)=\"dispatchAction($event)\"\n (resize)=\"anchor.scrollToBottom()\"\n (navigate)=\"this.autoScroll = false\"\n >\n </kendo-chat-message-list>\n </div>\n <kendo-message-box\n #messageBox\n [messageBoxTemplate]=\"messageBoxTemplate\"\n [type]=\"messageBoxType\"\n [user]=\"user\"\n [autoScroll]=\"autoScroll\"\n [localization]=\"localizationText\"\n (sendMessage)=\"sendMessage.emit($event)\"\n >\n </kendo-message-box>\n "
418
- }),
419
- __metadata("design:paramtypes", [LocalizationService, NgZone])
420
- ], ChatComponent);
421
- return ChatComponent;
422
- }());
423
-
424
- /**
425
- * @hidden
426
- */
427
- var AttachmentComponent = /** @class */ (function () {
428
- function AttachmentComponent() {
429
- }
430
- Object.defineProperty(AttachmentComponent.prototype, "attachment", {
431
- get: function () {
432
- return this._attachment;
433
- },
434
- set: function (value) {
435
- this._attachment = value;
436
- this.context = {
437
- $implicit: this.attachment
438
- };
439
- },
440
- enumerable: true,
441
- configurable: true
442
- });
443
- Object.defineProperty(AttachmentComponent.prototype, "image", {
444
- get: function () {
445
- return this.contentType.indexOf('image/') === 0;
446
- },
447
- enumerable: true,
448
- configurable: true
449
- });
450
- Object.defineProperty(AttachmentComponent.prototype, "unknown", {
451
- get: function () {
452
- return !this.image;
453
- },
454
- enumerable: true,
455
- configurable: true
456
- });
457
- Object.defineProperty(AttachmentComponent.prototype, "contentType", {
458
- get: function () {
459
- return this.attachment.contentType || '';
460
- },
461
- enumerable: true,
462
- configurable: true
463
- });
464
- __decorate([
465
- Input(),
466
- __metadata("design:type", Object),
467
- __metadata("design:paramtypes", [Object])
468
- ], AttachmentComponent.prototype, "attachment", null);
469
- __decorate([
470
- Input(),
471
- __metadata("design:type", AttachmentTemplateDirective)
472
- ], AttachmentComponent.prototype, "template", void 0);
473
- AttachmentComponent = __decorate([
474
- Component({
475
- selector: 'kendo-chat-attachment',
476
- template: "\n <ng-container *ngIf=\"template\">\n <ng-container *ngTemplateOutlet=\"template.templateRef; context: context;\">\n </ng-container>\n </ng-container>\n\n <div *ngIf=\"!template\" class=\"k-card\">\n <div class=\"k-card-body\">\n <h5 class=\"k-card-title\" *ngIf=\"attachment.title\">\n {{ attachment.title }}\n </h5>\n <h6 class=\"k-card-subtitle\" *ngIf=\"attachment.subtitle\">\n {{ attachment.subtitle }}\n </h6>\n <img *ngIf=\"image\" [attr.src]=\"attachment.content\" />\n <ng-container *ngIf=\"unknown\">\n {{ attachment.content }}\n </ng-container>\n </div>\n </div>\n "
477
- })
478
- ], AttachmentComponent);
479
- return AttachmentComponent;
480
- }());
481
-
482
- /**
483
- * @hidden
484
- */
485
- var Messages = /** @class */ (function (_super) {
486
- __extends(Messages, _super);
487
- function Messages() {
488
- return _super !== null && _super.apply(this, arguments) || this;
489
- }
490
- __decorate([
491
- Input(),
492
- __metadata("design:type", String)
493
- ], Messages.prototype, "messagePlaceholder", void 0);
494
- __decorate([
495
- Input(),
496
- __metadata("design:type", String)
497
- ], Messages.prototype, "send", void 0);
498
- return Messages;
499
- }(ComponentMessages));
500
-
501
- // tslint:disable:no-forward-ref
502
- /**
503
- * Custom component messages override default component messages
504
- * ([see example]({% slug globalization_chat %}#toc-custom-messages)).
505
- */
506
- var CustomMessagesComponent = /** @class */ (function (_super) {
507
- __extends(CustomMessagesComponent, _super);
508
- function CustomMessagesComponent(service) {
509
- var _this = _super.call(this) || this;
510
- _this.service = service;
511
- return _this;
512
- }
513
- CustomMessagesComponent_1 = CustomMessagesComponent;
514
- Object.defineProperty(CustomMessagesComponent.prototype, "override", {
515
- get: function () {
516
- return true;
517
- },
518
- enumerable: true,
519
- configurable: true
520
- });
521
- var CustomMessagesComponent_1;
522
- CustomMessagesComponent = CustomMessagesComponent_1 = __decorate([
523
- Component({
524
- providers: [
525
- {
526
- provide: Messages,
527
- useExisting: forwardRef(function () { return CustomMessagesComponent_1; })
528
- }
529
- ],
530
- selector: 'kendo-chat-messages',
531
- template: ""
532
- }),
533
- __metadata("design:paramtypes", [LocalizationService])
534
- ], CustomMessagesComponent);
535
- return CustomMessagesComponent;
536
- }(Messages));
537
-
538
- /**
539
- * @hidden
540
- */
541
- var FocusedStateDirective = /** @class */ (function () {
542
- function FocusedStateDirective() {
543
- this.focused = false;
544
- }
545
- FocusedStateDirective.prototype.onFocus = function () {
546
- this.focused = true;
547
- };
548
- FocusedStateDirective.prototype.onBlur = function () {
549
- this.focused = false;
550
- };
551
- __decorate([
552
- HostBinding('class.k-focus'),
553
- __metadata("design:type", Boolean)
554
- ], FocusedStateDirective.prototype, "focused", void 0);
555
- __decorate([
556
- HostListener('focusin'),
557
- __metadata("design:type", Function),
558
- __metadata("design:paramtypes", []),
559
- __metadata("design:returntype", void 0)
560
- ], FocusedStateDirective.prototype, "onFocus", null);
561
- __decorate([
562
- HostListener('focusout'),
563
- __metadata("design:type", Function),
564
- __metadata("design:paramtypes", []),
565
- __metadata("design:returntype", void 0)
566
- ], FocusedStateDirective.prototype, "onBlur", null);
567
- FocusedStateDirective = __decorate([
568
- Directive({
569
- selector: '[kendoChatFocusedState]'
570
- })
571
- ], FocusedStateDirective);
572
- return FocusedStateDirective;
573
- }());
574
-
575
- /**
576
- * Represents a Hero Card component ([see example]({% slug dialogflow_chat %})).
577
- * Hero cards host a single large image and action buttons with text content.
578
- */
579
- var HeroCardComponent = /** @class */ (function () {
580
- function HeroCardComponent() {
581
- this.cssClass = true;
582
- /**
583
- * Fires when the user clicks a button.
584
- */
585
- this.executeAction = new EventEmitter();
586
- }
587
- HeroCardComponent.prototype.onClick = function (action) {
588
- this.executeAction.next(action);
589
- };
590
- __decorate([
591
- Input(),
592
- __metadata("design:type", String)
593
- ], HeroCardComponent.prototype, "imageUrl", void 0);
594
- __decorate([
595
- Input(),
596
- __metadata("design:type", String)
597
- ], HeroCardComponent.prototype, "title", void 0);
598
- __decorate([
599
- Input(),
600
- __metadata("design:type", String)
601
- ], HeroCardComponent.prototype, "subtitle", void 0);
602
- __decorate([
603
- Input(),
604
- __metadata("design:type", Array)
605
- ], HeroCardComponent.prototype, "actions", void 0);
606
- __decorate([
607
- HostBinding('class.k-card'),
608
- __metadata("design:type", Boolean)
609
- ], HeroCardComponent.prototype, "cssClass", void 0);
610
- __decorate([
611
- Output(),
612
- __metadata("design:type", EventEmitter)
613
- ], HeroCardComponent.prototype, "executeAction", void 0);
614
- HeroCardComponent = __decorate([
615
- Component({
616
- selector: 'kendo-chat-hero-card',
617
- template: "\n <img class=\"k-card-image\" [src]=\"imageUrl\" *ngIf=\"imageUrl\" />\n <div class=\"k-card-body\">\n <h5 class=\"k-card-title\" *ngIf=\"title\">\n {{ title }}\n </h5>\n <h6 class=\"k-card-subtitle\" *ngIf=\"subtitle\">\n {{ subtitle }}\n </h6>\n </div>\n <div class=\"k-card-actions k-card-actions-vertical\">\n <span class=\"k-card-action\"\n *ngFor=\"let act of actions\"\n >\n <button\n kendoButton fillMode=\"flat\"\n (click)=\"onClick(act)\"\n >\n {{ act.title }}\n </button>\n </span>\n </div>\n "
618
- })
619
- ], HeroCardComponent);
620
- return HeroCardComponent;
621
- }());
622
-
623
- // tslint:disable:no-forward-ref
624
- /**
625
- * @hidden
626
- */
627
- var LocalizedMessagesDirective = /** @class */ (function (_super) {
628
- __extends(LocalizedMessagesDirective, _super);
629
- function LocalizedMessagesDirective(service) {
630
- var _this = _super.call(this) || this;
631
- _this.service = service;
632
- return _this;
633
- }
634
- LocalizedMessagesDirective_1 = LocalizedMessagesDirective;
635
- var LocalizedMessagesDirective_1;
636
- LocalizedMessagesDirective = LocalizedMessagesDirective_1 = __decorate([
637
- Directive({
638
- providers: [
639
- {
640
- provide: Messages,
641
- useExisting: forwardRef(function () { return LocalizedMessagesDirective_1; })
642
- }
643
- ],
644
- selector: '[kendoChatLocalizedMessages]'
645
- }),
646
- __metadata("design:paramtypes", [LocalizationService])
647
- ], LocalizedMessagesDirective);
648
- return LocalizedMessagesDirective;
649
- }(Messages));
650
-
651
- /**
652
- * @hidden
653
- */
654
- var ChatItem = /** @class */ (function () {
655
- function ChatItem() {
656
- }
657
- return ChatItem;
658
- }());
659
-
660
- // tslint:disable:no-forward-ref
661
- /**
662
- * @hidden
663
- */
664
- var MessageAttachmentsComponent = /** @class */ (function (_super) {
665
- __extends(MessageAttachmentsComponent, _super);
666
- function MessageAttachmentsComponent(zone) {
667
- var _a, _b;
668
- var _this = _super.call(this) || this;
669
- _this.zone = zone;
670
- _this.scrollPosition = 0;
671
- _this.selectedIndex = 0;
672
- _this.carouselKeyHandlers = (_a = {},
673
- _a[37 /* left */] = function (e) { return _this.navigateTo(e, -1); },
674
- _a[39 /* right */] = function (e) { return _this.navigateTo(e, 1); },
675
- _a);
676
- _this.listKeyHandlers = (_b = {},
677
- _b[38 /* up */] = function (e) { return _this.navigateTo(e, -1); },
678
- _b[40 /* down */] = function (e) { return _this.navigateTo(e, 1); },
679
- _b);
680
- return _this;
681
- }
682
- MessageAttachmentsComponent_1 = MessageAttachmentsComponent;
683
- Object.defineProperty(MessageAttachmentsComponent.prototype, "carousel", {
684
- get: function () {
685
- return this.layout !== 'list';
686
- },
687
- enumerable: true,
688
- configurable: true
689
- });
690
- MessageAttachmentsComponent.prototype.ngAfterViewInit = function () {
691
- var _this = this;
692
- this.zone.runOutsideAngular(function () {
693
- var scrollDebounceTime = 100;
694
- _this.scrollSubscription = fromEvent(_this.deck.nativeElement, 'scroll')
695
- .pipe(debounceTime(scrollDebounceTime))
696
- .subscribe(function () { return _this.onScroll(); });
697
- });
698
- };
699
- MessageAttachmentsComponent.prototype.ngOnDestroy = function () {
700
- this.scrollSubscription.unsubscribe();
701
- };
702
- MessageAttachmentsComponent.prototype.isSelected = function (index) {
703
- return this.selectedIndex === index;
704
- };
705
- MessageAttachmentsComponent.prototype.itemKeydown = function (e, attachment) {
706
- var keyHandlers = this.layout === 'list' ?
707
- this.listKeyHandlers : this.carouselKeyHandlers;
708
- var handler = keyHandlers[e.keyCode];
709
- if (handler) {
710
- handler(e, attachment);
711
- }
712
- };
713
- MessageAttachmentsComponent.prototype.itemClick = function (index) {
714
- this.select(index);
715
- };
716
- MessageAttachmentsComponent.prototype.focus = function () {
717
- this.select(this.selectedIndex);
718
- };
719
- MessageAttachmentsComponent.prototype.scrollTo = function (dir) {
720
- var el = this.deck.nativeElement;
721
- var scrollStep = el.scrollWidth / this.items.length;
722
- var max = el.scrollWidth - el.offsetWidth;
723
- var pos = el.scrollLeft + scrollStep * dir;
724
- el.scrollLeft = Math.max(0, Math.min(max, pos));
725
- };
726
- MessageAttachmentsComponent.prototype.select = function (index) {
727
- this.selectedIndex = index;
728
- var item = this.items.toArray()[index];
729
- if (item) {
730
- item.nativeElement.focus();
731
- }
732
- };
733
- MessageAttachmentsComponent.prototype.navigateTo = function (e, offset) {
734
- var prevIndex = this.selectedIndex;
735
- var nextIndex = Math.max(0, Math.min(prevIndex + offset, this.items.length - 1));
736
- if (nextIndex !== prevIndex) {
737
- this.select(nextIndex);
738
- e.preventDefault();
739
- }
740
- };
741
- MessageAttachmentsComponent.prototype.onScroll = function () {
742
- var _this = this;
743
- var el = this.deck.nativeElement;
744
- if (el.scrollWidth === 0) {
745
- return;
746
- }
747
- var pos = el.scrollLeft / (el.scrollWidth - el.offsetWidth);
748
- if (pos !== this.scrollPosition) {
749
- this.zone.run(function () {
750
- _this.scrollPosition = pos;
751
- });
752
- }
753
- };
754
- var MessageAttachmentsComponent_1;
755
- __decorate([
756
- Input(),
757
- __metadata("design:type", Array)
758
- ], MessageAttachmentsComponent.prototype, "attachments", void 0);
759
- __decorate([
760
- Input(),
761
- __metadata("design:type", String)
762
- ], MessageAttachmentsComponent.prototype, "layout", void 0);
763
- __decorate([
764
- Input(),
765
- __metadata("design:type", Boolean)
766
- ], MessageAttachmentsComponent.prototype, "tabbable", void 0);
767
- __decorate([
768
- Input(),
769
- __metadata("design:type", AttachmentTemplateDirective)
770
- ], MessageAttachmentsComponent.prototype, "template", void 0);
771
- __decorate([
772
- HostBinding('class.k-card-deck-scrollwrap'),
773
- __metadata("design:type", Boolean),
774
- __metadata("design:paramtypes", [])
775
- ], MessageAttachmentsComponent.prototype, "carousel", null);
776
- __decorate([
777
- ViewChild('deck', { read: ElementRef, static: true }),
778
- __metadata("design:type", ElementRef)
779
- ], MessageAttachmentsComponent.prototype, "deck", void 0);
780
- __decorate([
781
- ViewChildren('item', { read: ElementRef }),
782
- __metadata("design:type", QueryList)
783
- ], MessageAttachmentsComponent.prototype, "items", void 0);
784
- MessageAttachmentsComponent = MessageAttachmentsComponent_1 = __decorate([
785
- Component({
786
- providers: [{
787
- provide: ChatItem,
788
- useExisting: forwardRef(function () { return MessageAttachmentsComponent_1; })
789
- }],
790
- selector: 'kendo-chat-message-attachments',
791
- template: "\n <button\n *ngIf=\"carousel && scrollPosition > 0\"\n (click)=\"scrollTo(-1)\"\n class=\"k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base\"\n tabindex=\"-1\">\n <span class=\"k-icon k-button-icon k-i-arrow-chevron-left\"></span>\n </button>\n <div #deck [class.k-card-deck]=\"carousel\">\n <kendo-chat-attachment #item\n *ngFor=\"let att of attachments; index as index; first as first; last as last\"\n [attachment]=\"att\"\n [template]=\"template\"\n [class.k-state-selected]=\"isSelected(index)\"\n [class.k-state-focused]=\"isSelected(index)\"\n [class.k-card-wrap]=\"true\"\n [class.k-first]=\"first\"\n [class.k-last]=\"last\"\n [attr.tabindex]=\"tabbable && isSelected(index) ? '0' : '-1'\"\n (click)=\"itemClick(index)\"\n (keydown)=\"itemKeydown($event, att)\"\n >\n </kendo-chat-attachment>\n </div>\n <button\n *ngIf=\"carousel && scrollPosition < 1\"\n (click)=\"scrollTo(1)\"\n class=\"k-button k-icon-button k-button-md k-rounded-md k-button-solid k-button-solid-base\"\n tabindex=\"-1\">\n <span class=\"k-icon k-button-icon k-i-arrow-chevron-right\"></span>\n </button>\n "
792
- }),
793
- __metadata("design:paramtypes", [NgZone])
794
- ], MessageAttachmentsComponent);
795
- return MessageAttachmentsComponent;
796
- }(ChatItem));
797
-
798
- // tslint:disable:no-forward-ref
799
- /**
800
- * @hidden
801
- */
802
- var MessageComponent = /** @class */ (function (_super) {
803
- __extends(MessageComponent, _super);
804
- function MessageComponent(element, intl) {
805
- var _this = _super.call(this) || this;
806
- _this.element = element;
807
- _this.intl = intl;
808
- _this.cssClass = true;
809
- return _this;
810
- }
811
- MessageComponent_1 = MessageComponent;
812
- Object.defineProperty(MessageComponent.prototype, "tabIndex", {
813
- get: function () {
814
- return this.tabbable ? '0' : '-1';
815
- },
816
- enumerable: true,
817
- configurable: true
818
- });
819
- MessageComponent.prototype.formatTimeStamp = function (date) {
820
- return this.intl.formatDate(date, { datetime: 'short' });
821
- };
822
- MessageComponent.prototype.focus = function () {
823
- this.element.nativeElement.focus();
824
- };
825
- var MessageComponent_1;
826
- __decorate([
827
- Input(),
828
- __metadata("design:type", Object)
829
- ], MessageComponent.prototype, "message", void 0);
830
- __decorate([
831
- Input(),
832
- __metadata("design:type", Boolean)
833
- ], MessageComponent.prototype, "tabbable", void 0);
834
- __decorate([
835
- Input(),
836
- __metadata("design:type", MessageTemplateDirective)
837
- ], MessageComponent.prototype, "template", void 0);
838
- __decorate([
839
- HostBinding('class.k-message'),
840
- __metadata("design:type", Boolean)
841
- ], MessageComponent.prototype, "cssClass", void 0);
842
- __decorate([
843
- HostBinding('class.k-state-selected'),
844
- HostBinding('class.k-state-focused'),
845
- __metadata("design:type", Boolean)
846
- ], MessageComponent.prototype, "selected", void 0);
847
- __decorate([
848
- HostBinding('attr.tabIndex'),
849
- __metadata("design:type", String),
850
- __metadata("design:paramtypes", [])
851
- ], MessageComponent.prototype, "tabIndex", null);
852
- MessageComponent = MessageComponent_1 = __decorate([
853
- Component({
854
- selector: 'kendo-chat-message',
855
- providers: [{
856
- provide: ChatItem,
857
- useExisting: forwardRef(function () { return MessageComponent_1; })
858
- }],
859
- template: "\n <time\n [attr.aria-hidden]=\"!selected\"\n class=\"k-message-time\"\n *ngIf=\"message.timestamp\"\n >\n {{ formatTimeStamp(message.timestamp) }}\n </time>\n\n <ng-container *ngIf=\"!message.typing; else typing\">\n <div class=\"k-bubble\" *ngIf=\"template\">\n <ng-container\n *ngTemplateOutlet=\"template.templateRef; context: { $implicit: message };\"\n >\n </ng-container>\n </div>\n\n <div class=\"k-bubble\" *ngIf=\"!template && message.text\">\n {{message.text}}\n </div>\n </ng-container>\n\n <span\n class=\"k-message-status\"\n *ngIf=\"message.status\"\n >\n {{ message.status }}\n </span>\n\n <ng-template #typing>\n <div class=\"k-bubble\">\n <div class=\"k-typing-indicator\">\n <span></span>\n <span></span>\n <span></span>\n </div>\n </div>\n </ng-template>\n "
860
- }),
861
- __metadata("design:paramtypes", [ElementRef, IntlService])
862
- ], MessageComponent);
863
- return MessageComponent;
864
- }(ChatItem));
865
-
866
- /**
867
- * @hidden
868
- */
869
- var PreventableEvent = /** @class */ (function () {
870
- function PreventableEvent() {
871
- this.prevented = false;
872
- }
873
- /**
874
- * Prevents the default action for a specified event.
875
- * In this way, the source component suppresses
876
- * the built-in behavior that follows the event.
877
- */
878
- PreventableEvent.prototype.preventDefault = function () {
879
- this.prevented = true;
880
- };
881
- /**
882
- * Returns `true` if the event was prevented
883
- * by any of its subscribers.
884
- *
885
- * @returns `true` if the default action was prevented.
886
- * Otherwise, returns `false`.
887
- */
888
- PreventableEvent.prototype.isDefaultPrevented = function () {
889
- return this.prevented;
890
- };
891
- return PreventableEvent;
892
- }());
893
-
894
- /**
895
- * Arguments for the `executeAction` event. The `executeAction` event fires when the user clicks
896
- * a quick action button. Calling `preventDefault()` suppresses the built-in action handler.
897
- */
898
- var ExecuteActionEvent = /** @class */ (function (_super) {
899
- __extends(ExecuteActionEvent, _super);
900
- /**
901
- * @hidden
902
- */
903
- function ExecuteActionEvent(action, message) {
904
- var _this = _super.call(this) || this;
905
- _this.action = action;
906
- _this.message = message;
907
- return _this;
908
- }
909
- return ExecuteActionEvent;
910
- }(PreventableEvent));
911
-
912
- /**
913
- * @hidden
914
- */
915
- var closest = function (node, predicate) {
916
- while (node && !predicate(node)) {
917
- node = node.parentNode;
918
- }
919
- return node;
920
- };
921
-
922
- /**
923
- * @hidden
924
- */
925
- var isAuthor = function (user, msg) {
926
- return user && msg.author && user.id === msg.author.id;
927
- };
928
- var last = function (arr) { return arr[arr.length - 1]; };
929
- var dateChanged = function (curr, prev) {
930
- return (curr && prev) && (prev.getDate() !== curr.getDate() ||
931
- prev.getMonth() !== curr.getMonth() ||
932
- prev.getFullYear() !== curr.getFullYear());
933
- };
934
- var addDateMarker = function (acc, msg) {
935
- var timestamp = msg.timestamp;
936
- var lastItem = last(acc);
937
- if (!timestamp) {
938
- return;
939
- }
940
- if (!lastItem || dateChanged(timestamp, lastItem.timestamp)) {
941
- var dateMarker = {
942
- type: 'date-marker',
943
- timestamp: timestamp,
944
- trackBy: timestamp.getTime()
945
- };
946
- acc.push(dateMarker);
947
- }
948
- };
949
- var groupMessages = function (acc, msg, isLastMessage) {
950
- var lastItem = last(acc);
951
- var messages;
952
- if (isDevMode() && !msg.author) {
953
- throw new Error('Author must be set for message: ' + JSON.stringify(msg));
954
- }
955
- if (msg.typing && !isLastMessage) {
956
- return;
957
- }
958
- if (lastItem && lastItem.type === 'message-group') {
959
- messages = lastItem.messages;
960
- }
961
- if (messages && isAuthor(msg.author, last(messages))) {
962
- messages.push(msg);
963
- }
964
- else {
965
- acc.push({
966
- type: 'message-group',
967
- messages: [msg],
968
- author: msg.author,
969
- timestamp: msg.timestamp,
970
- trackBy: msg
971
- });
972
- }
973
- };
974
- var groupItems = function (total) { return function (acc, msg, index) {
975
- var isLastMessage = index === total - 1;
976
- addDateMarker(acc, msg);
977
- groupMessages(acc, msg, isLastMessage);
978
- if (msg.attachments && msg.attachments.length > 1) {
979
- acc.push({
980
- type: 'attachment-group',
981
- attachments: msg.attachments,
982
- attachmentLayout: msg.attachmentLayout,
983
- timestamp: msg.timestamp,
984
- trackBy: msg
985
- });
986
- }
987
- if (msg.suggestedActions && isLastMessage) {
988
- acc.push({
989
- type: 'action-group',
990
- actions: msg.suggestedActions,
991
- timestamp: msg.timestamp,
992
- trackBy: msg
993
- });
994
- }
995
- return acc;
996
- }; };
997
- /**
998
- * @hidden
999
- */
1000
- var chatView = function (messages) {
1001
- return messages.reduce(groupItems(messages.length), []);
1002
- };
1003
-
1004
- /**
1005
- * @hidden
1006
- */
1007
- var MessageListComponent = /** @class */ (function () {
1008
- function MessageListComponent(element, intl) {
1009
- var _this = this;
1010
- var _a;
1011
- this.element = element;
1012
- this.intl = intl;
1013
- this.executeAction = new EventEmitter();
1014
- this.navigate = new EventEmitter();
1015
- this.resize = new EventEmitter();
1016
- this.cssClass = true;
1017
- this.view = [];
1018
- this.keyActions = (_a = {},
1019
- _a[38 /* up */] = function (e) { return _this.navigateTo(e, -1); },
1020
- _a[40 /* down */] = function (e) { return _this.navigateTo(e, 1); },
1021
- _a);
1022
- }
1023
- Object.defineProperty(MessageListComponent.prototype, "messages", {
1024
- get: function () {
1025
- return this._messages;
1026
- },
1027
- set: function (value) {
1028
- var data = value || [];
1029
- this.view = chatView(data);
1030
- this._messages = data;
1031
- },
1032
- enumerable: true,
1033
- configurable: true
1034
- });
1035
- MessageListComponent.prototype.ngAfterViewInit = function () {
1036
- this.selectedItem = this.items.last;
1037
- };
1038
- MessageListComponent.prototype.onResize = function () {
1039
- this.resize.emit();
1040
- };
1041
- MessageListComponent.prototype.formatTimeStamp = function (date) {
1042
- return this.intl.formatDate(date, { date: 'full' });
1043
- };
1044
- MessageListComponent.prototype.onKeydown = function (e) {
1045
- var action = this.keyActions[e.keyCode];
1046
- if (action) {
1047
- action(e);
1048
- }
1049
- };
1050
- MessageListComponent.prototype.onBlur = function (args) {
1051
- var _this = this;
1052
- var next = args.relatedTarget || document.activeElement;
1053
- var outside = !closest(next, function (node) { return node === _this.element.nativeElement; });
1054
- if (outside) {
1055
- this.select(null);
1056
- }
1057
- };
1058
- MessageListComponent.prototype.isOwnMessage = function (msg) {
1059
- return isAuthor(this.user, msg);
1060
- };
1061
- MessageListComponent.prototype.dispatchAction = function (action, message) {
1062
- var args = new ExecuteActionEvent(action, message);
1063
- this.executeAction.emit(args);
1064
- };
1065
- MessageListComponent.prototype.trackGroup = function (_index, item) {
1066
- return item.trackBy;
1067
- };
1068
- MessageListComponent.prototype.select = function (item) {
1069
- var prevItem = this.selectedItem;
1070
- if (prevItem) {
1071
- prevItem.selected = false;
1072
- }
1073
- if (item) {
1074
- item.selected = true;
1075
- this.selectedItem = item;
1076
- }
1077
- };
1078
- MessageListComponent.prototype.last = function (items) {
1079
- if (!items || items.length === 0) {
1080
- return;
1081
- }
1082
- return items[items.length - 1];
1083
- };
1084
- MessageListComponent.prototype.navigateTo = function (e, offset) {
1085
- var items = this.items.toArray();
1086
- var prevItem = this.selectedItem;
1087
- var prevIndex = items.indexOf(prevItem);
1088
- var nextIndex = Math.max(0, Math.min(prevIndex + offset, this.items.length - 1));
1089
- var nextItem = items[nextIndex];
1090
- if (nextItem !== prevItem) {
1091
- this.select(nextItem);
1092
- nextItem.focus();
1093
- this.navigate.emit();
1094
- e.preventDefault();
1095
- }
1096
- };
1097
- __decorate([
1098
- Input(),
1099
- __metadata("design:type", Array),
1100
- __metadata("design:paramtypes", [Array])
1101
- ], MessageListComponent.prototype, "messages", null);
1102
- __decorate([
1103
- Input(),
1104
- __metadata("design:type", AttachmentTemplateDirective)
1105
- ], MessageListComponent.prototype, "attachmentTemplate", void 0);
1106
- __decorate([
1107
- Input(),
1108
- __metadata("design:type", MessageTemplateDirective)
1109
- ], MessageListComponent.prototype, "messageTemplate", void 0);
1110
- __decorate([
1111
- Input(),
1112
- __metadata("design:type", Object)
1113
- ], MessageListComponent.prototype, "user", void 0);
1114
- __decorate([
1115
- Output(),
1116
- __metadata("design:type", EventEmitter)
1117
- ], MessageListComponent.prototype, "executeAction", void 0);
1118
- __decorate([
1119
- Output(),
1120
- __metadata("design:type", EventEmitter)
1121
- ], MessageListComponent.prototype, "navigate", void 0);
1122
- __decorate([
1123
- Output(),
1124
- __metadata("design:type", EventEmitter)
1125
- ], MessageListComponent.prototype, "resize", void 0);
1126
- __decorate([
1127
- ViewChildren(ChatItem),
1128
- __metadata("design:type", QueryList)
1129
- ], MessageListComponent.prototype, "items", void 0);
1130
- __decorate([
1131
- HostBinding('class.k-message-list-content'),
1132
- __metadata("design:type", Boolean)
1133
- ], MessageListComponent.prototype, "cssClass", void 0);
1134
- __decorate([
1135
- HostListener('keydown', ['$event']),
1136
- __metadata("design:type", Function),
1137
- __metadata("design:paramtypes", [Object]),
1138
- __metadata("design:returntype", void 0)
1139
- ], MessageListComponent.prototype, "onKeydown", null);
1140
- __decorate([
1141
- HostListener('focusout', ['$event']),
1142
- __metadata("design:type", Function),
1143
- __metadata("design:paramtypes", [FocusEvent]),
1144
- __metadata("design:returntype", void 0)
1145
- ], MessageListComponent.prototype, "onBlur", null);
1146
- MessageListComponent = __decorate([
1147
- Component({
1148
- selector: 'kendo-chat-message-list',
1149
- template: "\n <ng-container *ngFor=\"let group of view; last as lastGroup; trackBy: trackGroup\">\n <ng-container [ngSwitch]=\"group.type\">\n <div\n *ngSwitchCase=\"'date-marker'\"\n class=\"k-timestamp\"\n >\n {{ formatTimeStamp(group.timestamp) }}\n </div>\n <div\n *ngSwitchCase=\"'message-group'\"\n class=\"k-message-group\"\n [class.k-alt]=\"isOwnMessage(group.messages[0])\"\n [class.k-no-avatar]=\"!group.author.avatarUrl\"\n >\n <img\n *ngIf=\"group.author.avatarUrl\"\n [attr.src]=\"group.author.avatarUrl\"\n class=\"k-avatar\"\n />\n <p *ngIf=\"group.author.name\" class=\"k-author\">{{ group.author.name }}</p>\n <ng-container\n *ngFor=\"let msg of group.messages; first as firstMessage; last as lastMessage\"\n >\n <img *ngIf=\"msg.user?.avatarUrl\" [src]=\"msg.user?.avatarUrl\" class=\"k-avatar\">\n <kendo-chat-message #message\n [message]=\"msg\"\n [tabbable]=\"lastGroup && lastMessage\"\n [template]=\"messageTemplate\"\n (click)=\"select(message)\"\n (focus)=\"select(message)\"\n [class.k-only]=\"group.messages.length === 1\"\n [class.k-first]=\"group.messages.length > 1 && firstMessage\"\n [class.k-last]=\"group.messages.length > 1 && lastMessage\"\n >\n </kendo-chat-message>\n\n <kendo-chat-attachment\n *ngIf=\"msg.attachments && msg.attachments.length === 1\"\n [attachment]=\"msg.attachments[0]\"\n [template]=\"attachmentTemplate\"\n >\n </kendo-chat-attachment>\n </ng-container>\n </div>\n\n <kendo-chat-message-attachments #attachments\n *ngSwitchCase=\"'attachment-group'\"\n [attachments]=\"group.attachments\"\n [layout]=\"group.attachmentLayout\"\n [tabbable]=\"lastGroup\"\n [template]=\"attachmentTemplate\"\n (click)=\"select(attachments)\"\n (focus)=\"select(attachments)\"\n >\n </kendo-chat-message-attachments>\n\n <kendo-chat-suggested-actions #actions\n *ngSwitchCase=\"'action-group'\"\n [actions]=\"group.actions\"\n [tabbable]=\"lastGroup\"\n (dispatch)=\"dispatchAction($event, last(group.messages))\"\n (click)=\"select(actions)\"\n (focus)=\"select(actions)\"\n >\n </kendo-chat-suggested-actions>\n </ng-container>\n </ng-container>\n <kendo-resize-sensor (resize)=\"onResize()\">\n </kendo-resize-sensor>\n "
1150
- }),
1151
- __metadata("design:paramtypes", [ElementRef, IntlService])
1152
- ], MessageListComponent);
1153
- return MessageListComponent;
1154
- }());
1155
-
1156
- // Consider scroll to be at the bottom when within this number of pixels from the container height.
1157
- var maxDelta = 2;
1158
- /**
1159
- * @hidden
1160
- */
1161
- var ScrollAnchorDirective = /** @class */ (function () {
1162
- function ScrollAnchorDirective(element, zone, renderer) {
1163
- this.element = element;
1164
- this.zone = zone;
1165
- this.renderer = renderer;
1166
- this.autoScroll = true;
1167
- this.autoScrollChange = new EventEmitter();
1168
- this.overflowAnchor = 'none';
1169
- this.scrolling = false;
1170
- }
1171
- ScrollAnchorDirective.prototype.ngOnInit = function () {
1172
- var _this = this;
1173
- this.zone.runOutsideAngular(function () {
1174
- _this.unsubscribe = _this.renderer.listen(_this.element.nativeElement, 'scroll', function () { return _this.onScroll(); });
1175
- });
1176
- };
1177
- ScrollAnchorDirective.prototype.ngAfterViewInit = function () {
1178
- this.scrollToBottom();
1179
- };
1180
- ScrollAnchorDirective.prototype.ngOnDestroy = function () {
1181
- if (this.unsubscribe) {
1182
- this.unsubscribe();
1183
- }
1184
- };
1185
- ScrollAnchorDirective.prototype.onScroll = function () {
1186
- var _this = this;
1187
- if (this.scrolling) {
1188
- return;
1189
- }
1190
- var el = this.element.nativeElement;
1191
- var bottom = el.scrollTop + el.offsetHeight;
1192
- var height = el.scrollHeight;
1193
- var atBottom = height - bottom < maxDelta;
1194
- if (this.autoScroll !== atBottom) {
1195
- this.zone.run(function () {
1196
- _this.autoScroll = atBottom;
1197
- _this.autoScrollChange.emit(_this.autoScroll);
1198
- });
1199
- }
1200
- };
1201
- ScrollAnchorDirective.prototype.scrollToBottom = function () {
1202
- var _this = this;
1203
- if (!this.autoScroll) {
1204
- return;
1205
- }
1206
- var el = this.element.nativeElement;
1207
- el.scrollTop = el.scrollHeight - el.clientHeight;
1208
- this.scrolling = true;
1209
- this.zone.runOutsideAngular(function () {
1210
- return setTimeout(function () { return _this.scrolling = false; }, 1000);
1211
- });
1212
- };
1213
- __decorate([
1214
- Input(),
1215
- __metadata("design:type", Boolean)
1216
- ], ScrollAnchorDirective.prototype, "autoScroll", void 0);
1217
- __decorate([
1218
- Output(),
1219
- __metadata("design:type", EventEmitter)
1220
- ], ScrollAnchorDirective.prototype, "autoScrollChange", void 0);
1221
- __decorate([
1222
- HostBinding('style.overflow-anchor'),
1223
- __metadata("design:type", String)
1224
- ], ScrollAnchorDirective.prototype, "overflowAnchor", void 0);
1225
- ScrollAnchorDirective = __decorate([
1226
- Directive({
1227
- selector: '[kendoChatScrollAnchor]',
1228
- exportAs: 'scrollAnchor'
1229
- }),
1230
- __metadata("design:paramtypes", [ElementRef,
1231
- NgZone,
1232
- Renderer2])
1233
- ], ScrollAnchorDirective);
1234
- return ScrollAnchorDirective;
1235
- }());
1236
-
1237
- // tslint:disable:no-forward-ref
1238
- /**
1239
- * @hidden
1240
- */
1241
- var SuggestedActionsComponent = /** @class */ (function (_super) {
1242
- __extends(SuggestedActionsComponent, _super);
1243
- function SuggestedActionsComponent() {
1244
- var _a;
1245
- var _this = _super !== null && _super.apply(this, arguments) || this;
1246
- _this.dispatch = new EventEmitter();
1247
- _this.defaultClass = true;
1248
- _this.selectedIndex = 0;
1249
- _this.keyHandlers = (_a = {},
1250
- _a[37 /* left */] = function (e) { return _this.navigateTo(e, -1); },
1251
- _a[39 /* right */] = function (e) { return _this.navigateTo(e, 1); },
1252
- _a[13 /* enter */] = function (_, action) { return _this.actionClick(action); },
1253
- _a);
1254
- return _this;
1255
- }
1256
- SuggestedActionsComponent_1 = SuggestedActionsComponent;
1257
- SuggestedActionsComponent.prototype.isSelected = function (index) {
1258
- return this.selected && this.selectedIndex === index;
1259
- };
1260
- SuggestedActionsComponent.prototype.actionClick = function (action) {
1261
- this.dispatch.next(action);
1262
- };
1263
- SuggestedActionsComponent.prototype.actionKeydown = function (e, action) {
1264
- var handler = this.keyHandlers[e.keyCode];
1265
- if (handler) {
1266
- handler(e, action);
1267
- }
1268
- };
1269
- SuggestedActionsComponent.prototype.focus = function () {
1270
- this.select(this.selectedIndex);
1271
- };
1272
- SuggestedActionsComponent.prototype.select = function (index) {
1273
- this.selectedIndex = index;
1274
- var item = this.items.toArray()[index];
1275
- if (item) {
1276
- item.nativeElement.focus();
1277
- }
1278
- };
1279
- SuggestedActionsComponent.prototype.navigateTo = function (e, offset) {
1280
- var prevIndex = this.selectedIndex;
1281
- var nextIndex = Math.max(0, Math.min(prevIndex + offset, this.items.length - 1));
1282
- if (nextIndex !== prevIndex) {
1283
- this.select(nextIndex);
1284
- e.preventDefault();
1285
- }
1286
- };
1287
- var SuggestedActionsComponent_1;
1288
- __decorate([
1289
- Input(),
1290
- __metadata("design:type", Array)
1291
- ], SuggestedActionsComponent.prototype, "actions", void 0);
1292
- __decorate([
1293
- Input(),
1294
- __metadata("design:type", Boolean)
1295
- ], SuggestedActionsComponent.prototype, "tabbable", void 0);
1296
- __decorate([
1297
- Output(),
1298
- __metadata("design:type", EventEmitter)
1299
- ], SuggestedActionsComponent.prototype, "dispatch", void 0);
1300
- __decorate([
1301
- HostBinding('class.k-quick-replies'),
1302
- __metadata("design:type", Boolean)
1303
- ], SuggestedActionsComponent.prototype, "defaultClass", void 0);
1304
- __decorate([
1305
- ViewChildren('item'),
1306
- __metadata("design:type", QueryList)
1307
- ], SuggestedActionsComponent.prototype, "items", void 0);
1308
- SuggestedActionsComponent = SuggestedActionsComponent_1 = __decorate([
1309
- Component({
1310
- selector: 'kendo-chat-suggested-actions',
1311
- providers: [{
1312
- provide: ChatItem,
1313
- useExisting: forwardRef(function () { return SuggestedActionsComponent_1; })
1314
- }],
1315
- template: "\n <span\n #item\n *ngFor=\"let action of actions; index as index; first as first; last as last\"\n class=\"k-quick-reply\"\n [class.k-state-selected]=\"isSelected(index)\"\n [class.k-state-focused]=\"isSelected(index)\"\n [class.k-first]=\"first\"\n [class.k-last]=\"last\"\n [attr.tabindex]=\"tabbable && selectedIndex === index ? '0' : '-1'\"\n (click)=\"actionClick(action)\"\n (keydown)=\"actionKeydown($event, action)\"\n >\n {{ action.title || action.value }}\n </span>\n "
1316
- })
1317
- ], SuggestedActionsComponent);
1318
- return SuggestedActionsComponent;
1319
- }(ChatItem));
1320
-
1321
- var PUBLIC_DIRECTIVES = [
1322
- ChatComponent,
1323
- CustomMessagesComponent,
1324
- AttachmentTemplateDirective,
1325
- MessageTemplateDirective,
1326
- HeroCardComponent,
1327
- ChatMessageBoxTemplateDirective
1328
- ];
1329
- var PRIVATE_DIRECTIVES = [
1330
- AttachmentComponent,
1331
- FocusedStateDirective,
1332
- LocalizedMessagesDirective,
1333
- MessageAttachmentsComponent,
1334
- MessageComponent,
1335
- MessageListComponent,
1336
- MessageTemplateDirective,
1337
- ScrollAnchorDirective,
1338
- SuggestedActionsComponent,
1339
- MessageBoxComponent
1340
- ];
1341
- /**
1342
- * The [NgModule]({{ site.data.urls.angular['ngmodules'] }}) for the Chat component.
1343
- *
1344
- * @example
1345
- * ```ts-no-run
1346
- * import { NgModule } from '@angular/core';
1347
- * import { Component } from '@angular/core';
1348
- * import { BrowserModule } from '@angular/platform-browser';
1349
- *
1350
- * import { ChatModule } from '@progress/kendo-angular-conversational-ui';
1351
- * import { AppComponent } from './app.component';
1352
- *
1353
- * _@NgModule({
1354
- * imports: [ BrowserModule, ChatModule ],
1355
- * declarations: [ AppComponent ],
1356
- * bootstrap: [ AppComponent ]
1357
- * })
1358
- *
1359
- * export class AppModule { }
1360
- * ```
1361
- */
1362
- var ChatModule = /** @class */ (function () {
1363
- function ChatModule() {
1364
- }
1365
- ChatModule = __decorate([
1366
- NgModule({
1367
- declarations: PUBLIC_DIRECTIVES.concat(PRIVATE_DIRECTIVES),
1368
- exports: [PUBLIC_DIRECTIVES],
1369
- imports: [
1370
- ButtonModule,
1371
- CommonModule,
1372
- ResizeSensorModule
1373
- ]
1374
- })
1375
- ], ChatModule);
1376
- return ChatModule;
1377
- }());
1378
-
1379
- /**
1380
- * Generated bundle index. Do not edit.
1381
- */
1382
-
1383
- export { PreventableEvent, HeroCardComponent, AttachmentComponent, ChatItem, CustomMessagesComponent, LocalizedMessagesDirective, Messages, MessageAttachmentsComponent, MessageBoxComponent, MessageListComponent, MessageComponent, SuggestedActionsComponent, FocusedStateDirective, ScrollAnchorDirective, ChatComponent, AttachmentTemplateDirective, MessageTemplateDirective, ChatMessageBoxTemplateDirective, ChatModule, ExecuteActionEvent, SendMessageEvent };