@progress/kendo-angular-conversational-ui 20.1.2-develop.2 → 21.0.0-develop.11

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 (103) hide show
  1. package/chat/api/files-layout.d.ts +12 -0
  2. package/chat/api/index.d.ts +3 -1
  3. package/chat/api/message-settings.interface.d.ts +33 -0
  4. package/chat/api/message.interface.d.ts +5 -1
  5. package/chat/api/suggestions-layout.d.ts +20 -0
  6. package/chat/chat.component.d.ts +92 -34
  7. package/chat/chat.directives.d.ts +18 -0
  8. package/chat/chat.module.d.ts +15 -8
  9. package/chat/common/chat.service.d.ts +32 -3
  10. package/chat/common/models/model-fields.d.ts +0 -6
  11. package/chat/common/scroll-button.component.d.ts +32 -0
  12. package/chat/common/scroll.service.d.ts +39 -0
  13. package/chat/common/utils.d.ts +13 -1
  14. package/chat/l10n/messages.d.ts +9 -1
  15. package/chat/message-list.component.d.ts +20 -3
  16. package/chat/message.component.d.ts +40 -16
  17. package/chat/suggested-actions.component.d.ts +30 -5
  18. package/chat/templates/author-message-content-template.directive.d.ts +28 -0
  19. package/chat/templates/author-message-template.directive.d.ts +28 -0
  20. package/chat/templates/message-content-template.directive.d.ts +28 -0
  21. package/chat/templates/message-template.directive.d.ts +1 -1
  22. package/chat/templates/no-data-template.directive.d.ts +27 -0
  23. package/chat/templates/receiver-message-content-template.directive.d.ts +28 -0
  24. package/chat/templates/receiver-message-template.directive.d.ts +28 -0
  25. package/chat/templates/user-status-template.directive.d.ts +27 -0
  26. package/codemods/template-transformer/index.js +1 -2
  27. package/codemods/utils.js +2 -2
  28. package/codemods/v20/chat-user.js +1 -1
  29. package/conversational-ui.module.d.ts +18 -11
  30. package/directives.d.ts +9 -2
  31. package/esm2022/ai-prompt/aiprompt.component.mjs +13 -11
  32. package/esm2022/ai-prompt/aiprompt.module.mjs +4 -4
  33. package/esm2022/ai-prompt/common/aiprompt.service.mjs +3 -3
  34. package/esm2022/ai-prompt/common/output-card.component.mjs +4 -4
  35. package/esm2022/ai-prompt/common/toolbar-focusable.directive.mjs +4 -4
  36. package/esm2022/ai-prompt/common/toolbar-navigation.service.mjs +4 -4
  37. package/esm2022/ai-prompt/localization/custom-messages.component.mjs +4 -4
  38. package/esm2022/ai-prompt/localization/localized-messages.directive.mjs +4 -4
  39. package/esm2022/ai-prompt/localization/messages.mjs +3 -3
  40. package/esm2022/ai-prompt/templates/aiprompt-output-body-template.directive.mjs +4 -4
  41. package/esm2022/ai-prompt/templates/aiprompt-output-template.directive.mjs +4 -4
  42. package/esm2022/ai-prompt/templates/toolbar-actions.template.mjs +5 -5
  43. package/esm2022/ai-prompt/views/base-view.mjs +5 -5
  44. package/esm2022/ai-prompt/views/command-view.component.mjs +4 -4
  45. package/esm2022/ai-prompt/views/custom-view.component.mjs +4 -4
  46. package/esm2022/ai-prompt/views/output-view.component.mjs +4 -4
  47. package/esm2022/ai-prompt/views/prompt-view.component.mjs +4 -4
  48. package/esm2022/chat/api/index.mjs +3 -1
  49. package/{chat/api/message-toolbar-visibility.d.ts → esm2022/chat/api/message-settings.interface.mjs} +1 -4
  50. package/esm2022/chat/api/suggestions-layout.mjs +5 -0
  51. package/esm2022/chat/attachment.component.mjs +3 -3
  52. package/esm2022/chat/builtin-actions.mjs +2 -0
  53. package/esm2022/chat/cards/hero-card.component.mjs +3 -3
  54. package/esm2022/chat/chat-file.component.mjs +6 -6
  55. package/esm2022/chat/chat.component.mjs +268 -74
  56. package/esm2022/chat/chat.directives.mjs +18 -0
  57. package/esm2022/chat/chat.module.mjs +18 -11
  58. package/esm2022/chat/common/chat.service.mjs +86 -7
  59. package/esm2022/chat/common/models/default-model-fields.mjs +0 -1
  60. package/esm2022/chat/common/scroll-anchor.directive.mjs +4 -4
  61. package/esm2022/chat/common/scroll-button.component.mjs +81 -0
  62. package/esm2022/chat/common/scroll.service.mjs +110 -0
  63. package/esm2022/chat/common/utils.mjs +22 -3
  64. package/esm2022/chat/l10n/custom-messages.component.mjs +4 -4
  65. package/esm2022/chat/l10n/localized-messages.directive.mjs +4 -4
  66. package/esm2022/chat/l10n/messages.mjs +15 -3
  67. package/esm2022/chat/message-attachments.component.mjs +6 -6
  68. package/esm2022/chat/message-box.component.mjs +12 -7
  69. package/esm2022/chat/message-list.component.mjs +168 -22
  70. package/esm2022/chat/message-reference-content.component.mjs +4 -4
  71. package/esm2022/chat/message.component.mjs +491 -328
  72. package/esm2022/chat/suggested-actions.component.mjs +299 -81
  73. package/esm2022/chat/templates/attachment-template.directive.mjs +5 -5
  74. package/esm2022/chat/templates/author-message-content-template.directive.mjs +39 -0
  75. package/esm2022/chat/templates/author-message-template.directive.mjs +39 -0
  76. package/esm2022/chat/templates/header-template.directive.mjs +4 -4
  77. package/esm2022/chat/templates/message-box.directive.mjs +4 -4
  78. package/esm2022/chat/templates/message-content-template.directive.mjs +39 -0
  79. package/esm2022/chat/templates/message-template.directive.mjs +6 -6
  80. package/esm2022/chat/templates/no-data-template.directive.mjs +38 -0
  81. package/esm2022/chat/templates/receiver-message-content-template.directive.mjs +39 -0
  82. package/esm2022/chat/templates/receiver-message-template.directive.mjs +39 -0
  83. package/esm2022/chat/templates/status-template.directive.mjs +4 -4
  84. package/esm2022/chat/templates/suggestion-template.directive.mjs +4 -4
  85. package/esm2022/chat/templates/timestamp-template.directive.mjs +5 -5
  86. package/esm2022/chat/templates/user-status-template.directive.mjs +38 -0
  87. package/esm2022/conversational-ui.module.mjs +21 -14
  88. package/esm2022/directives.mjs +15 -1
  89. package/esm2022/index.mjs +7 -0
  90. package/esm2022/inline-ai-prompt/inlineaiprompt-content.component.mjs +5 -5
  91. package/esm2022/inline-ai-prompt/inlineaiprompt.component.mjs +4 -4
  92. package/esm2022/inline-ai-prompt/inlineaiprompt.module.mjs +4 -4
  93. package/esm2022/inline-ai-prompt/inlineaiprompt.service.mjs +4 -4
  94. package/esm2022/inline-ai-prompt/localization/custom-messages.component.mjs +4 -4
  95. package/esm2022/inline-ai-prompt/localization/localized-messages.directive.mjs +4 -4
  96. package/esm2022/inline-ai-prompt/localization/messages.mjs +3 -3
  97. package/esm2022/inline-ai-prompt/output-template.directive.mjs +5 -5
  98. package/esm2022/package-metadata.mjs +2 -2
  99. package/fesm2022/progress-kendo-angular-conversational-ui.mjs +1969 -739
  100. package/index.d.ts +7 -0
  101. package/package.json +18 -18
  102. package/schematics/ngAdd/index.js +1 -1
  103. /package/esm2022/chat/api/{message-toolbar-visibility.mjs → files-layout.mjs} +0 -0
@@ -3,15 +3,15 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from '@angular/core';
6
- import { InjectionToken, Directive, Inject, HostBinding, ViewChild, Input, Injectable, Optional, forwardRef, EventEmitter, Component, ContentChildren, ContentChild, Output, isDevMode, ViewChildren, HostListener, ElementRef, ViewContainerRef, inject, SkipSelf, NgModule } from '@angular/core';
6
+ import { InjectionToken, Directive, Inject, HostBinding, ViewChild, Input, Injectable, Optional, forwardRef, EventEmitter, Component, ContentChildren, ContentChild, Output, isDevMode, ElementRef, ViewChildren, HostListener, ViewContainerRef, inject, SkipSelf, NgModule } from '@angular/core';
7
7
  import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
8
8
  import * as i1$2 from '@progress/kendo-angular-popup';
9
9
  import { PopupComponent, KENDO_POPUP, PopupService } from '@progress/kendo-angular-popup';
10
- import { isPresent, normalizeNumpadKeys, Keys, focusableSelector, guid, getter, closest as closest$1, ResizeSensorComponent, isChanged, processCssValue, isDocumentAvailable, ResizeBatchService } from '@progress/kendo-angular-common';
10
+ import { isPresent, normalizeNumpadKeys, Keys, focusableSelector, guid, getter, isDocumentAvailable, closest as closest$1, ResizeSensorComponent, isChanged, processCssValue, ResizeBatchService } from '@progress/kendo-angular-common';
11
11
  import { DialogContainerService, DialogService, WindowService, WindowContainerService } from '@progress/kendo-angular-dialog';
12
12
  import { NgFor, NgIf, NgTemplateOutlet, NgClass, NgSwitch, NgSwitchCase } from '@angular/common';
13
13
  import { Subject, Subscription, fromEvent } from 'rxjs';
14
- import { sparklesIcon, commentIcon, moreHorizontalIcon, stopSmIcon, thumbUpIcon, thumbDownOutlineIcon, thumbDownIcon, thumbUpOutlineIcon, copyIcon, arrowRotateCwIcon, chevronUpIcon, chevronDownIcon, paperPlaneIcon, undoIcon, downloadIcon, xIcon, moreVerticalIcon, paperclipIcon, fileIcon, chevronLeftIcon, chevronRightIcon, pinIcon, cancelOutlineIcon, menuIcon } from '@progress/kendo-svg-icons';
14
+ import { sparklesIcon, commentIcon, moreHorizontalIcon, stopSmIcon, thumbUpIcon, thumbDownOutlineIcon, thumbDownIcon, thumbUpOutlineIcon, copyIcon, arrowRotateCwIcon, chevronUpIcon, chevronDownIcon, paperPlaneIcon, undoIcon, downloadIcon, chevronLeftIcon, chevronRightIcon, xIcon, moreVerticalIcon, paperclipIcon, fileIcon, pinIcon, cancelOutlineIcon, menuIcon } from '@progress/kendo-svg-icons';
15
15
  import * as i1 from '@progress/kendo-angular-l10n';
16
16
  import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
17
17
  import { validatePackage } from '@progress/kendo-licensing';
@@ -25,10 +25,10 @@ import { TextAreaComponent, TextAreaSuffixComponent, TextAreaPrefixComponent, In
25
25
  import { fileSVGGroupIcon, fileGroupClass, getTotalFilesSizeMessage, FileSelectComponent } from '@progress/kendo-angular-upload';
26
26
  import { FormsModule } from '@angular/forms';
27
27
  import * as i1$1 from '@progress/kendo-angular-intl';
28
- import * as i4 from '@progress/kendo-angular-menu';
29
- import { ContextMenuComponent, KENDO_CONTEXTMENU } from '@progress/kendo-angular-menu';
30
28
  import { ToolBarComponent, ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
31
29
  import { AppBarComponent } from '@progress/kendo-angular-navigation';
30
+ import * as i4 from '@progress/kendo-angular-menu';
31
+ import { ContextMenuComponent, KENDO_CONTEXTMENU } from '@progress/kendo-angular-menu';
32
32
 
33
33
  /**
34
34
  * @hidden
@@ -186,15 +186,15 @@ class BaseView {
186
186
  _buttonText;
187
187
  _icon;
188
188
  _svgIcon;
189
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BaseView, deps: [{ token: MY_TOKEN }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
190
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: BaseView, inputs: { buttonText: "buttonText", icon: "icon", svgIcon: "svgIcon" }, host: { properties: { "class.k-prompt-view": "this.hostClasses" } }, viewQueries: [{ propertyName: "template", first: true, predicate: ["content"], descendants: true, static: true }], ngImport: i0 });
189
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BaseView, deps: [{ token: MY_TOKEN }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
190
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: BaseView, inputs: { buttonText: "buttonText", icon: "icon", svgIcon: "svgIcon" }, host: { properties: { "class.k-prompt-view": "this.hostClasses" } }, viewQueries: [{ propertyName: "template", first: true, predicate: ["content"], descendants: true, static: true }], ngImport: i0 });
191
191
  }
192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BaseView, decorators: [{
192
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BaseView, decorators: [{
193
193
  type: Directive
194
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
194
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
195
195
  type: Inject,
196
196
  args: [MY_TOKEN]
197
- }] }, { type: i1.LocalizationService }]; }, propDecorators: { hostClasses: [{
197
+ }] }, { type: i1.LocalizationService }], propDecorators: { hostClasses: [{
198
198
  type: HostBinding,
199
199
  args: ['class.k-prompt-view']
200
200
  }], template: [{
@@ -216,8 +216,8 @@ const packageMetadata = {
216
216
  productName: 'Kendo UI for Angular',
217
217
  productCode: 'KENDOUIANGULAR',
218
218
  productCodes: ['KENDOUIANGULAR'],
219
- publishDate: 1761309969,
220
- version: '20.1.2-develop.2',
219
+ publishDate: 1761916527,
220
+ version: '21.0.0-develop.11',
221
221
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
222
222
  };
223
223
 
@@ -283,10 +283,10 @@ class AIPromptService {
283
283
  });
284
284
  return newArr.concat(this.promptCommands);
285
285
  }
286
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
287
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptService });
286
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
287
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptService });
288
288
  }
289
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptService, decorators: [{
289
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptService, decorators: [{
290
290
  type: Injectable
291
291
  }] });
292
292
 
@@ -311,18 +311,18 @@ class AIPromptToolbarActionsDirective {
311
311
  constructor(templateRef) {
312
312
  this.templateRef = templateRef;
313
313
  }
314
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptToolbarActionsDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
315
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AIPromptToolbarActionsDirective, isStandalone: true, selector: "[kendoAIPromptToolbarActionsTemplate]", ngImport: i0 });
314
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptToolbarActionsDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
315
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: AIPromptToolbarActionsDirective, isStandalone: true, selector: "[kendoAIPromptToolbarActionsTemplate]", ngImport: i0 });
316
316
  }
317
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptToolbarActionsDirective, decorators: [{
317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptToolbarActionsDirective, decorators: [{
318
318
  type: Directive,
319
319
  args: [{
320
320
  selector: '[kendoAIPromptToolbarActionsTemplate]',
321
321
  standalone: true
322
322
  }]
323
- }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
323
+ }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
324
324
  type: Optional
325
- }] }]; } });
325
+ }] }] });
326
326
 
327
327
  /**
328
328
  * @hidden
@@ -366,12 +366,12 @@ class ToolbarNavigationService {
366
366
  focusFirst() {
367
367
  this.focusableElements[this.currentFocusedIndex].activate();
368
368
  }
369
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarNavigationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
370
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarNavigationService });
369
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
370
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService });
371
371
  }
372
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarNavigationService, decorators: [{
372
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ToolbarNavigationService, decorators: [{
373
373
  type: Injectable
374
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
374
+ }], ctorParameters: () => [{ type: i1.LocalizationService }] });
375
375
 
376
376
  /**
377
377
  * @hidden
@@ -426,16 +426,16 @@ class AIPromptToolbarFocusableDirective {
426
426
  clickHandler = () => {
427
427
  this.navigationService.setActiveIndex(this);
428
428
  };
429
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptToolbarFocusableDirective, deps: [{ token: i0.ElementRef }, { token: ToolbarNavigationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
430
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AIPromptToolbarFocusableDirective, isStandalone: true, selector: "[kendoAIPromptToolbarFocusable]", ngImport: i0 });
429
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptToolbarFocusableDirective, deps: [{ token: i0.ElementRef }, { token: ToolbarNavigationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
430
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: AIPromptToolbarFocusableDirective, isStandalone: true, selector: "[kendoAIPromptToolbarFocusable]", ngImport: i0 });
431
431
  }
432
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptToolbarFocusableDirective, decorators: [{
432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptToolbarFocusableDirective, decorators: [{
433
433
  type: Directive,
434
434
  args: [{
435
435
  selector: '[kendoAIPromptToolbarFocusable]',
436
436
  standalone: true
437
437
  }]
438
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ToolbarNavigationService }, { type: i0.Renderer2 }]; } });
438
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: ToolbarNavigationService }, { type: i0.Renderer2 }] });
439
439
 
440
440
  /**
441
441
  * @hidden
@@ -481,10 +481,10 @@ let Messages$2 = class Messages extends ComponentMessages {
481
481
  * Sets the aria-label for the **Speech to Text** button.
482
482
  */
483
483
  speechToTextButton;
484
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
485
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: Messages, inputs: { promptView: "promptView", outputView: "outputView", generateOutput: "generateOutput", promptPlaceholder: "promptPlaceholder", copyOutput: "copyOutput", retryGeneration: "retryGeneration", outputTitle: "outputTitle", outputRetryTitle: "outputRetryTitle", promptSuggestions: "promptSuggestions", speechToTextButton: "speechToTextButton" }, usesInheritance: true, ngImport: i0 });
484
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
485
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: Messages, inputs: { promptView: "promptView", outputView: "outputView", generateOutput: "generateOutput", promptPlaceholder: "promptPlaceholder", copyOutput: "copyOutput", retryGeneration: "retryGeneration", outputTitle: "outputTitle", outputRetryTitle: "outputRetryTitle", promptSuggestions: "promptSuggestions", speechToTextButton: "speechToTextButton" }, usesInheritance: true, ngImport: i0 });
486
486
  };
487
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages$2, decorators: [{
487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages$2, decorators: [{
488
488
  type: Directive
489
489
  }], propDecorators: { promptView: [{
490
490
  type: Input
@@ -517,15 +517,15 @@ let LocalizedMessagesDirective$2 = class LocalizedMessagesDirective extends Mess
517
517
  super();
518
518
  this.service = service;
519
519
  }
520
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
521
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoAIPromptLocalizedMessages]", providers: [
520
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
521
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoAIPromptLocalizedMessages]", providers: [
522
522
  {
523
523
  provide: Messages$2,
524
524
  useExisting: forwardRef(() => LocalizedMessagesDirective)
525
525
  }
526
526
  ], usesInheritance: true, ngImport: i0 });
527
527
  };
528
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective$2, decorators: [{
528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective$2, decorators: [{
529
529
  type: Directive,
530
530
  args: [{
531
531
  providers: [
@@ -537,7 +537,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
537
537
  selector: '[kendoAIPromptLocalizedMessages]',
538
538
  standalone: true
539
539
  }]
540
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
540
+ }], ctorParameters: () => [{ type: i1.LocalizationService }] });
541
541
 
542
542
  /**
543
543
  * Represents the template for the response in the AIPrompt component. The template context is set to the current output object.
@@ -556,16 +556,16 @@ class AIPromptOutputTemplateDirective {
556
556
  constructor(templateRef) {
557
557
  this.templateRef = templateRef;
558
558
  }
559
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptOutputTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
560
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AIPromptOutputTemplateDirective, isStandalone: true, selector: "[kendoAIPromptOutputTemplate]", ngImport: i0 });
559
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptOutputTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
560
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: AIPromptOutputTemplateDirective, isStandalone: true, selector: "[kendoAIPromptOutputTemplate]", ngImport: i0 });
561
561
  }
562
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptOutputTemplateDirective, decorators: [{
562
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptOutputTemplateDirective, decorators: [{
563
563
  type: Directive,
564
564
  args: [{
565
565
  selector: '[kendoAIPromptOutputTemplate]',
566
566
  standalone: true
567
567
  }]
568
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
568
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
569
569
 
570
570
  /**
571
571
  * Represents the template for the body of the response in the AIPrompt component. The template context is set to the current output object.
@@ -584,16 +584,16 @@ class AIPromptOutputBodyTemplateDirective {
584
584
  constructor(templateRef) {
585
585
  this.templateRef = templateRef;
586
586
  }
587
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptOutputBodyTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
588
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AIPromptOutputBodyTemplateDirective, isStandalone: true, selector: "[kendoAIPromptOutputBodyTemplate]", ngImport: i0 });
587
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptOutputBodyTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
588
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: AIPromptOutputBodyTemplateDirective, isStandalone: true, selector: "[kendoAIPromptOutputBodyTemplate]", ngImport: i0 });
589
589
  }
590
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptOutputBodyTemplateDirective, decorators: [{
590
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptOutputBodyTemplateDirective, decorators: [{
591
591
  type: Directive,
592
592
  args: [{
593
593
  selector: '[kendoAIPromptOutputBodyTemplate]',
594
594
  standalone: true
595
595
  }]
596
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
596
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
597
597
 
598
598
  /**
599
599
  * Represents the [Kendo UI AIPrompt component for Angular](slug:overview_aiprompt).
@@ -662,7 +662,9 @@ class AIPromptComponent {
662
662
  set activeView(idx) {
663
663
  if (this._activeView !== idx) {
664
664
  this._activeView = idx;
665
- this.service.promptValue && (this.service.promptValue = '');
665
+ if (this.service.promptValue) {
666
+ this.service.promptValue = '';
667
+ }
666
668
  }
667
669
  }
668
670
  get activeView() {
@@ -869,8 +871,8 @@ class AIPromptComponent {
869
871
  };
870
872
  this.promptRequest.emit(eventArgs);
871
873
  }
872
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }, { token: ToolbarNavigationService }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
873
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AIPromptComponent, isStandalone: true, selector: "kendo-aiprompt", inputs: { activeView: "activeView", promptCommands: "promptCommands", promptSuggestions: "promptSuggestions", promptOutputs: "promptOutputs", showOutputRating: "showOutputRating", streaming: "streaming", speechToTextButton: "speechToTextButton", textAreaSettings: "textAreaSettings", generateButtonSVGIcon: "generateButtonSVGIcon", generateButtonIcon: "generateButtonIcon", disabledGenerateButton: "disabledGenerateButton" }, outputs: { activeViewChange: "activeViewChange", promptRequest: "promptRequest", commandExecute: "commandExecute", outputCopy: "outputCopy", outputRatingChange: "outputRatingChange", promptRequestCancel: "promptRequestCancel" }, host: { properties: { "class.k-prompt": "this.hostClasses", "attr.dir": "this.dirAttr" } }, providers: [
874
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }, { token: ToolbarNavigationService }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
875
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: AIPromptComponent, isStandalone: true, selector: "kendo-aiprompt", inputs: { activeView: "activeView", promptCommands: "promptCommands", promptSuggestions: "promptSuggestions", promptOutputs: "promptOutputs", showOutputRating: "showOutputRating", streaming: "streaming", speechToTextButton: "speechToTextButton", textAreaSettings: "textAreaSettings", generateButtonSVGIcon: "generateButtonSVGIcon", generateButtonIcon: "generateButtonIcon", disabledGenerateButton: "disabledGenerateButton" }, outputs: { activeViewChange: "activeViewChange", promptRequest: "promptRequest", commandExecute: "commandExecute", outputCopy: "outputCopy", outputRatingChange: "outputRatingChange", promptRequestCancel: "promptRequestCancel" }, host: { properties: { "class.k-prompt": "this.hostClasses", "attr.dir": "this.dirAttr" } }, providers: [
874
876
  LocalizationService,
875
877
  AIPromptService,
876
878
  ToolbarNavigationService,
@@ -924,10 +926,10 @@ class AIPromptComponent {
924
926
  </div>
925
927
  </div>
926
928
  <div class="k-prompt-content">
927
- <kendo-floatingactionbutton #fabButton *ngIf="streaming && selectedView?.viewType === 'output'"
929
+ <kendo-floatingactionbutton #fabButton *ngIf="streaming && selectedView?.viewType === 'output'"
928
930
  class="k-prompt-stop-fab"
929
- buttonClass="k-generating k-active"
930
- [positionMode]="fabPositionMode"
931
+ buttonClass="k-generating k-active"
932
+ [positionMode]="fabPositionMode"
931
933
  [align]="fabAlignment"
932
934
  [svgIcon]="fabStopGenerationSVGIcon"
933
935
  icon="stop"
@@ -957,7 +959,7 @@ class AIPromptComponent {
957
959
  </div>
958
960
  `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective$2, selector: "[kendoAIPromptLocalizedMessages]" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: AIPromptToolbarFocusableDirective, selector: "[kendoAIPromptToolbarFocusable]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FloatingActionButtonComponent, selector: "kendo-floatingactionbutton", inputs: ["themeColor", "size", "rounded", "disabled", "align", "offset", "positionMode", "icon", "svgIcon", "iconClass", "buttonClass", "dialClass", "text", "dialItemAnimation", "tabIndex", "dialItems"], outputs: ["blur", "focus", "dialItemClick", "open", "close"] }] });
959
961
  }
960
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptComponent, decorators: [{
962
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptComponent, decorators: [{
961
963
  type: Component,
962
964
  args: [{
963
965
  exportAs: 'kendoAIPrompt',
@@ -1017,10 +1019,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1017
1019
  </div>
1018
1020
  </div>
1019
1021
  <div class="k-prompt-content">
1020
- <kendo-floatingactionbutton #fabButton *ngIf="streaming && selectedView?.viewType === 'output'"
1022
+ <kendo-floatingactionbutton #fabButton *ngIf="streaming && selectedView?.viewType === 'output'"
1021
1023
  class="k-prompt-stop-fab"
1022
- buttonClass="k-generating k-active"
1023
- [positionMode]="fabPositionMode"
1024
+ buttonClass="k-generating k-active"
1025
+ [positionMode]="fabPositionMode"
1024
1026
  [align]="fabAlignment"
1025
1027
  [svgIcon]="fabStopGenerationSVGIcon"
1026
1028
  icon="stop"
@@ -1052,7 +1054,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1052
1054
  standalone: true,
1053
1055
  imports: [LocalizedMessagesDirective$2, NgFor, ButtonComponent, AIPromptToolbarFocusableDirective, NgIf, NgTemplateOutlet, FloatingActionButtonComponent]
1054
1056
  }]
1055
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: AIPromptService }, { type: ToolbarNavigationService }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { hostClasses: [{
1057
+ }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }, { type: ToolbarNavigationService }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { hostClasses: [{
1056
1058
  type: HostBinding,
1057
1059
  args: ['class.k-prompt']
1058
1060
  }], dirAttr: [{
@@ -1160,8 +1162,8 @@ class CommandViewComponent extends BaseView {
1160
1162
  children: c.children ? this.getPanelBarItems(c.children) : null
1161
1163
  }));
1162
1164
  }
1163
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CommandViewComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
1164
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CommandViewComponent, isStandalone: true, selector: "kendo-aiprompt-command-view", providers: [{
1165
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CommandViewComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
1166
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: CommandViewComponent, isStandalone: true, selector: "kendo-aiprompt-command-view", providers: [{
1165
1167
  provide: BaseView,
1166
1168
  useExisting: forwardRef(() => CommandViewComponent)
1167
1169
  }], usesInheritance: true, ngImport: i0, template: `
@@ -1175,7 +1177,7 @@ class CommandViewComponent extends BaseView {
1175
1177
  </ng-template>
1176
1178
  `, isInline: true, dependencies: [{ kind: "component", type: PanelBarComponent, selector: "kendo-panelbar", inputs: ["expandMode", "selectable", "animate", "height", "keepItemContent", "items"], outputs: ["stateChange", "select", "expand", "collapse", "itemClick"], exportAs: ["kendoPanelbar"] }] });
1177
1179
  }
1178
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CommandViewComponent, decorators: [{
1180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CommandViewComponent, decorators: [{
1179
1181
  type: Component,
1180
1182
  args: [{
1181
1183
  selector: 'kendo-aiprompt-command-view',
@@ -1196,7 +1198,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1196
1198
  standalone: true,
1197
1199
  imports: [PanelBarComponent]
1198
1200
  }]
1199
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: AIPromptService }]; } });
1201
+ }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }] });
1200
1202
 
1201
1203
  /**
1202
1204
  * Represents the custom messages component of the AIPrompt.
@@ -1221,15 +1223,15 @@ class AIPromptCustomMessagesComponent extends Messages$2 {
1221
1223
  get override() {
1222
1224
  return true;
1223
1225
  }
1224
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
1225
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AIPromptCustomMessagesComponent, isStandalone: true, selector: "kendo-aiprompt-messages", providers: [
1226
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
1227
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: AIPromptCustomMessagesComponent, isStandalone: true, selector: "kendo-aiprompt-messages", providers: [
1226
1228
  {
1227
1229
  provide: Messages$2,
1228
1230
  useExisting: forwardRef(() => AIPromptCustomMessagesComponent)
1229
1231
  }
1230
1232
  ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
1231
1233
  }
1232
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptCustomMessagesComponent, decorators: [{
1234
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptCustomMessagesComponent, decorators: [{
1233
1235
  type: Component,
1234
1236
  args: [{
1235
1237
  providers: [
@@ -1242,7 +1244,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1242
1244
  template: ``,
1243
1245
  standalone: true
1244
1246
  }]
1245
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
1247
+ }], ctorParameters: () => [{ type: i1.LocalizationService }] });
1246
1248
 
1247
1249
  /**
1248
1250
  * Represents the component that renders a **Custom** view in the AIPrompt.
@@ -1265,13 +1267,13 @@ class CustomViewComponent extends BaseView {
1265
1267
  * Sets the content of the Custom view as a template reference.
1266
1268
  */
1267
1269
  viewTemplate;
1268
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomViewComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
1269
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CustomViewComponent, isStandalone: true, selector: "kendo-aiprompt-custom-view", inputs: { viewTemplate: "viewTemplate" }, providers: [{
1270
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CustomViewComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
1271
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: CustomViewComponent, isStandalone: true, selector: "kendo-aiprompt-custom-view", inputs: { viewTemplate: "viewTemplate" }, providers: [{
1270
1272
  provide: BaseView,
1271
1273
  useExisting: forwardRef(() => CustomViewComponent)
1272
1274
  }], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
1273
1275
  }
1274
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomViewComponent, decorators: [{
1276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CustomViewComponent, decorators: [{
1275
1277
  type: Component,
1276
1278
  args: [{
1277
1279
  selector: 'kendo-aiprompt-custom-view',
@@ -1282,7 +1284,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1282
1284
  template: ``,
1283
1285
  standalone: true
1284
1286
  }]
1285
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { viewTemplate: [{
1287
+ }], ctorParameters: () => [{ type: i1.LocalizationService }], propDecorators: { viewTemplate: [{
1286
1288
  type: Input
1287
1289
  }] } });
1288
1290
 
@@ -1377,8 +1379,8 @@ class AIPromptOutputCardComponent {
1377
1379
  get customBodyTemplate() {
1378
1380
  return this.service.outputBodyTemplate?.templateRef;
1379
1381
  }
1380
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptOutputCardComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
1381
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AIPromptOutputCardComponent, isStandalone: true, selector: "[kendoAIPromptOutputCard]", inputs: { promptOutput: "promptOutput" }, host: { properties: { "class.k-card": "this.hostClass", "attr.role": "this.listItemRole", "attr.tabindex": "this.tabIndex", "attr.aria-describedby": "this.ariaDescribedBy", "attr.aria-keyshortcuts": "this.ariaKeyShortcuts" } }, ngImport: i0, template: `
1382
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptOutputCardComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
1383
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: AIPromptOutputCardComponent, isStandalone: true, selector: "[kendoAIPromptOutputCard]", inputs: { promptOutput: "promptOutput" }, host: { properties: { "class.k-card": "this.hostClass", "attr.role": "this.listItemRole", "attr.tabindex": "this.tabIndex", "attr.aria-describedby": "this.ariaDescribedBy", "attr.aria-keyshortcuts": "this.ariaKeyShortcuts" } }, ngImport: i0, template: `
1382
1384
  <div class="k-card-header">
1383
1385
  <div
1384
1386
  class="k-card-title"
@@ -1429,7 +1431,7 @@ class AIPromptOutputCardComponent {
1429
1431
  </div>
1430
1432
  `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1431
1433
  }
1432
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptOutputCardComponent, decorators: [{
1434
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptOutputCardComponent, decorators: [{
1433
1435
  type: Component,
1434
1436
  args: [{
1435
1437
  selector: '[kendoAIPromptOutputCard]',
@@ -1486,7 +1488,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1486
1488
  standalone: true,
1487
1489
  imports: [ButtonComponent, NgIf, NgTemplateOutlet]
1488
1490
  }]
1489
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: AIPromptService }]; }, propDecorators: { hostClass: [{
1491
+ }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }], propDecorators: { hostClass: [{
1490
1492
  type: HostBinding,
1491
1493
  args: ['class.k-card']
1492
1494
  }], listItemRole: [{
@@ -1533,8 +1535,8 @@ class OutputViewComponent extends BaseView {
1533
1535
  get customTemplate() {
1534
1536
  return this.service.outputTemplate?.templateRef;
1535
1537
  }
1536
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OutputViewComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
1537
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: OutputViewComponent, isStandalone: true, selector: "kendo-aiprompt-output-view", providers: [{
1538
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OutputViewComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
1539
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: OutputViewComponent, isStandalone: true, selector: "kendo-aiprompt-output-view", providers: [{
1538
1540
  provide: BaseView,
1539
1541
  useExisting: forwardRef(() => OutputViewComponent)
1540
1542
  }], usesInheritance: true, ngImport: i0, template: `
@@ -1555,7 +1557,7 @@ class OutputViewComponent extends BaseView {
1555
1557
  </ng-template>
1556
1558
  `, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: AIPromptOutputCardComponent, selector: "[kendoAIPromptOutputCard]", inputs: ["promptOutput"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1557
1559
  }
1558
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OutputViewComponent, decorators: [{
1560
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OutputViewComponent, decorators: [{
1559
1561
  type: Component,
1560
1562
  args: [{
1561
1563
  selector: 'kendo-aiprompt-output-view',
@@ -1583,7 +1585,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1583
1585
  standalone: true,
1584
1586
  imports: [NgFor, AIPromptOutputCardComponent, NgIf, NgTemplateOutlet]
1585
1587
  }]
1586
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: AIPromptService }]; } });
1588
+ }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }] });
1587
1589
 
1588
1590
  /**
1589
1591
  * Represents the component that renders the **Prompt** view of the AIPrompt.
@@ -1675,8 +1677,8 @@ class PromptViewComponent extends BaseView {
1675
1677
  console.error('Speech to Text error:', event.errorMessage);
1676
1678
  }
1677
1679
  }
1678
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PromptViewComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
1679
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PromptViewComponent, isStandalone: true, selector: "kendo-aiprompt-prompt-view", providers: [
1680
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PromptViewComponent, deps: [{ token: i1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
1681
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: PromptViewComponent, isStandalone: true, selector: "kendo-aiprompt-prompt-view", providers: [
1680
1682
  {
1681
1683
  provide: BaseView,
1682
1684
  useExisting: forwardRef(() => PromptViewComponent)
@@ -1755,7 +1757,7 @@ class PromptViewComponent extends BaseView {
1755
1757
  </ng-template>
1756
1758
  `, isInline: true, dependencies: [{ kind: "component", type: TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "maxResizableRows", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: TextAreaSuffixComponent, selector: "kendo-textarea-suffix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaSuffix"] }, { kind: "component", type: SpeechToTextButtonComponent, selector: "button[kendoSpeechToTextButton]", inputs: ["disabled", "size", "rounded", "fillMode", "themeColor", "integrationMode", "lang", "continuous", "interimResults", "maxAlternatives"], outputs: ["start", "end", "result", "error", "click"], exportAs: ["kendoSpeechToTextButton"] }] });
1757
1759
  }
1758
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PromptViewComponent, decorators: [{
1760
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PromptViewComponent, decorators: [{
1759
1761
  type: Component,
1760
1762
  args: [{
1761
1763
  selector: 'kendo-aiprompt-prompt-view',
@@ -1841,7 +1843,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1841
1843
  standalone: true,
1842
1844
  imports: [TextAreaComponent, NgIf, ButtonComponent, NgFor, TextAreaSuffixComponent, SpeechToTextButtonComponent]
1843
1845
  }]
1844
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: AIPromptService }]; } });
1846
+ }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: AIPromptService }] });
1845
1847
 
1846
1848
  /**
1847
1849
  * Defines a template for displaying message attachments.
@@ -1868,23 +1870,24 @@ class AttachmentTemplateDirective {
1868
1870
  constructor(templateRef) {
1869
1871
  this.templateRef = templateRef;
1870
1872
  }
1871
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AttachmentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1872
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AttachmentTemplateDirective, isStandalone: true, selector: "[kendoChatAttachmentTemplate]", ngImport: i0 });
1873
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AttachmentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1874
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: AttachmentTemplateDirective, isStandalone: true, selector: "[kendoChatAttachmentTemplate]", ngImport: i0 });
1873
1875
  }
1874
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AttachmentTemplateDirective, decorators: [{
1876
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AttachmentTemplateDirective, decorators: [{
1875
1877
  type: Directive,
1876
1878
  args: [{
1877
1879
  selector: '[kendoChatAttachmentTemplate]',
1878
1880
  standalone: true
1879
1881
  }]
1880
- }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
1882
+ }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
1881
1883
  type: Optional
1882
- }] }]; } });
1884
+ }] }] });
1883
1885
 
1884
1886
  const noop = () => { };
1885
1887
  const handlers = {
1886
1888
  'reply': (action, sender) => {
1887
1889
  sender.sendMessage.emit(new SendMessageEvent({
1890
+ id: guid(),
1888
1891
  author: { id: sender.authorId },
1889
1892
  text: action.value,
1890
1893
  timestamp: new Date()
@@ -1902,40 +1905,6 @@ const handlers = {
1902
1905
  */
1903
1906
  const makeHandler = (action) => handlers[action.type] || noop;
1904
1907
 
1905
- /**
1906
- * Defines a template for displaying Chat messages.
1907
- *
1908
- * To define a message template, nest an `<ng-template>` tag with the `kendoChatMessageTemplate` directive inside the `<kendo-chat>` component.
1909
- * The template context is set to the `message` instance.
1910
- * For more information, refer to the article on [message templates](slug:message_templates_chat).
1911
- *
1912
- * @example
1913
- * ```html
1914
- * <kendo-chat>
1915
- * <ng-template kendoChatMessageTemplate let-message>
1916
- * <div>Message: {{ message.text }}</div>
1917
- * </ng-template>
1918
- * </kendo-chat>
1919
- * ```
1920
- */
1921
- class MessageTemplateDirective {
1922
- templateRef;
1923
- constructor(templateRef) {
1924
- this.templateRef = templateRef;
1925
- }
1926
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
1927
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: MessageTemplateDirective, isStandalone: true, selector: "[kendoChatMessageTemplate]", ngImport: i0 });
1928
- }
1929
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageTemplateDirective, decorators: [{
1930
- type: Directive,
1931
- args: [{
1932
- selector: '[kendoChatMessageTemplate]',
1933
- standalone: true
1934
- }]
1935
- }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
1936
- type: Optional
1937
- }] }]; } });
1938
-
1939
1908
  /**
1940
1909
  * Creates a message box area that overrides the default message box of the Chat component.
1941
1910
  *
@@ -1956,16 +1925,16 @@ class ChatMessageBoxTemplateDirective {
1956
1925
  constructor(templateRef) {
1957
1926
  this.templateRef = templateRef;
1958
1927
  }
1959
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatMessageBoxTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
1960
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ChatMessageBoxTemplateDirective, isStandalone: true, selector: "[kendoChatMessageBoxTemplate]", ngImport: i0 });
1928
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatMessageBoxTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
1929
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ChatMessageBoxTemplateDirective, isStandalone: true, selector: "[kendoChatMessageBoxTemplate]", ngImport: i0 });
1961
1930
  }
1962
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatMessageBoxTemplateDirective, decorators: [{
1931
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatMessageBoxTemplateDirective, decorators: [{
1963
1932
  type: Directive,
1964
1933
  args: [{
1965
1934
  selector: '[kendoChatMessageBoxTemplate]',
1966
1935
  standalone: true
1967
1936
  }]
1968
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
1937
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
1969
1938
 
1970
1939
  /**
1971
1940
  * @hidden
@@ -1984,7 +1953,6 @@ const defaultModelFields = {
1984
1953
  attachmentLayoutField: 'attachmentLayout',
1985
1954
  suggestedActionsField: 'suggestedActions',
1986
1955
  isPinnedField: 'isPinned',
1987
- pinnedByField: 'pinnedBy',
1988
1956
  replyToIdField: 'replyToId',
1989
1957
  isDeletedField: 'isDeleted',
1990
1958
  typingField: 'typing'
@@ -2051,6 +2019,10 @@ const FILESELECT_DEFAULT_SETTINGS = {
2051
2019
  multiple: true,
2052
2020
  disabled: false
2053
2021
  };
2022
+ /**
2023
+ * @hidden
2024
+ */
2025
+ const SUGGESTIONS_LAYOUT_DEFAULT_SETTINGS = 'scroll';
2054
2026
  /**
2055
2027
  * @hidden
2056
2028
  */
@@ -2103,14 +2075,16 @@ const parseMessage = (message, fields) => {
2103
2075
  id: authorId,
2104
2076
  ...(authorName && { name: authorName }),
2105
2077
  ...(authorImageUrl && { avatarUrl: authorImageUrl }),
2106
- ...(authorImageAltText && { avatarAltText: authorImageAltText })
2078
+ ...(authorImageAltText && { avatarAltText: authorImageAltText }),
2107
2079
  };
2108
2080
  }
2081
+ const timestampValue = getter(modelFields.timestampField)(message);
2082
+ const timestamp = timestampValue instanceof Date ? timestampValue : new Date(timestampValue);
2109
2083
  return {
2110
2084
  id: getter(modelFields.idField)(message),
2111
2085
  text: getter(modelFields.textField)(message),
2112
2086
  author: author,
2113
- timestamp: new Date(getter(modelFields.timestampField)(message)),
2087
+ timestamp: timestamp,
2114
2088
  status: getter(modelFields.statusField)(message),
2115
2089
  files: getter(modelFields.filesField)(message),
2116
2090
  attachments: getter(modelFields.attachmentsField)(message),
@@ -2119,9 +2093,22 @@ const parseMessage = (message, fields) => {
2119
2093
  isPinned: getter(modelFields.isPinnedField)(message),
2120
2094
  replyToId: getter(modelFields.replyToIdField)(message),
2121
2095
  isDeleted: getter(modelFields.isDeletedField)(message),
2122
- typing: getter(modelFields.typingField)(message)
2096
+ typing: getter(modelFields.typingField)(message),
2097
+ dataItem: message
2123
2098
  };
2124
2099
  };
2100
+ /**
2101
+ * @hidden
2102
+ */
2103
+ const transformActions = (actions) => {
2104
+ return actions.map(action => ({
2105
+ text: action.label,
2106
+ icon: action.icon,
2107
+ svgIcon: action.svgIcon,
2108
+ disabled: action.disabled,
2109
+ originalAction: action
2110
+ }));
2111
+ };
2125
2112
 
2126
2113
  /**
2127
2114
  * @hidden
@@ -2129,26 +2116,42 @@ const parseMessage = (message, fields) => {
2129
2116
  class ChatService {
2130
2117
  authorId;
2131
2118
  messageWidthMode;
2132
- allowMessageCollapse;
2133
2119
  messageToolbarActions = [];
2134
2120
  messageContextMenuActions = [];
2121
+ calculatedContextMenuActions = [];
2135
2122
  fileActions = [];
2136
- messageToolbarVisibility = 'hidden';
2137
2123
  toggleMessageState = false;
2138
2124
  reply;
2139
2125
  messages = [];
2140
2126
  chatElement;
2141
2127
  messageElementsMap = new Map();
2128
+ messagesContextMenu;
2129
+ activeMessage;
2130
+ activeMessageElement;
2131
+ selectOnMenuClose = false;
2132
+ active = false;
2133
+ messageFilesLayout = 'vertical';
2142
2134
  _enableSpeechToText = STB_DEFAULT_SETTINGS;
2143
2135
  _enableFileSelect = FILESELECT_DEFAULT_SETTINGS;
2144
2136
  _sendButtonSettings = SEND_BTN_DEFAULT_SETTINGS;
2137
+ _suggestionsLayout = SUGGESTIONS_LAYOUT_DEFAULT_SETTINGS;
2138
+ _quickActionsLayout = SUGGESTIONS_LAYOUT_DEFAULT_SETTINGS;
2139
+ _authorMessageSettings;
2140
+ _receiverMessageSettings;
2141
+ _allowMessageCollapse;
2145
2142
  subjects = {
2146
2143
  toolbarAction: new Subject(),
2147
2144
  contextMenuAction: new Subject(),
2148
2145
  fileAction: new Subject(),
2149
2146
  fileDownload: new Subject(),
2150
2147
  replyReferenceClick: new Subject(),
2151
- inputValueChange: new Subject()
2148
+ inputValueChange: new Subject(),
2149
+ contextMenuVisibilityChange: new Subject(),
2150
+ suggestionsLayoutChange: new Subject(),
2151
+ quickActionsLayoutChange: new Subject(),
2152
+ authorMessageSettingsChange: new Subject(),
2153
+ receiverMessageSettingsChange: new Subject(),
2154
+ allowMessageCollapseChange: new Subject(),
2152
2155
  };
2153
2156
  toolbarAction$ = this.subjects.toolbarAction.asObservable();
2154
2157
  contextMenuAction$ = this.subjects.contextMenuAction.asObservable();
@@ -2156,6 +2159,32 @@ class ChatService {
2156
2159
  fileDownload$ = this.subjects.fileDownload.asObservable();
2157
2160
  replyReferenceClick$ = this.subjects.replyReferenceClick.asObservable();
2158
2161
  inputValueChange$ = this.subjects.inputValueChange.asObservable();
2162
+ contextMenuVisibilityChange$ = this.subjects.contextMenuVisibilityChange.asObservable();
2163
+ suggestionsLayoutChange$ = this.subjects.suggestionsLayoutChange.asObservable();
2164
+ quickActionsLayoutChange$ = this.subjects.quickActionsLayoutChange.asObservable();
2165
+ authorMessageSettingsChange$ = this.subjects.authorMessageSettingsChange.asObservable();
2166
+ receiverMessageSettingsChange$ = this.subjects.receiverMessageSettingsChange.asObservable();
2167
+ allowMessageCollapseChange$ = this.subjects.allowMessageCollapseChange.asObservable();
2168
+ set authorMessageSettings(settings) {
2169
+ const previousSettings = this._authorMessageSettings;
2170
+ if (JSON.stringify(previousSettings) !== JSON.stringify(settings)) {
2171
+ this.updateComponentSettings('_authorMessageSettings', settings, null);
2172
+ this.emit('authorMessageSettingsChange', this._authorMessageSettings);
2173
+ }
2174
+ }
2175
+ get authorMessageSettings() {
2176
+ return this._authorMessageSettings;
2177
+ }
2178
+ set receiverMessageSettings(settings) {
2179
+ const previousSettings = this._receiverMessageSettings;
2180
+ if (JSON.stringify(previousSettings) !== JSON.stringify(settings)) {
2181
+ this.updateComponentSettings('_receiverMessageSettings', settings, null);
2182
+ this.emit('receiverMessageSettingsChange', this._receiverMessageSettings);
2183
+ }
2184
+ }
2185
+ get receiverMessageSettings() {
2186
+ return this._receiverMessageSettings;
2187
+ }
2159
2188
  set enableSpeechToText(settings) {
2160
2189
  this.updateComponentSettings('_enableSpeechToText', settings, STB_DEFAULT_SETTINGS);
2161
2190
  }
@@ -2174,6 +2203,38 @@ class ChatService {
2174
2203
  get sendButtonSettings() {
2175
2204
  return this._sendButtonSettings;
2176
2205
  }
2206
+ set suggestionsLayout(layoutMode) {
2207
+ this._suggestionsLayout = layoutMode;
2208
+ this.emit('suggestionsLayoutChange', this._suggestionsLayout);
2209
+ }
2210
+ get suggestionsLayout() {
2211
+ return this._suggestionsLayout;
2212
+ }
2213
+ set quickActionsLayout(layoutMode) {
2214
+ this._quickActionsLayout = layoutMode;
2215
+ this.emit('quickActionsLayoutChange', this._quickActionsLayout);
2216
+ }
2217
+ get quickActionsLayout() {
2218
+ return this._quickActionsLayout;
2219
+ }
2220
+ set allowMessageCollapse(value) {
2221
+ const previousValue = this._allowMessageCollapse;
2222
+ if (previousValue !== value) {
2223
+ this._allowMessageCollapse = value;
2224
+ this.emit('allowMessageCollapseChange', this._allowMessageCollapse);
2225
+ }
2226
+ }
2227
+ get allowMessageCollapse() {
2228
+ return this._allowMessageCollapse;
2229
+ }
2230
+ calculateContextMenuActions(isOwn) {
2231
+ const settings = isOwn ? this.authorMessageSettings : this.receiverMessageSettings;
2232
+ if (settings?.messageContextMenuActions) {
2233
+ this.calculatedContextMenuActions = settings.messageContextMenuActions;
2234
+ return;
2235
+ }
2236
+ this.calculatedContextMenuActions = this.messageContextMenuActions || [];
2237
+ }
2177
2238
  emit(subjectKey, value) {
2178
2239
  (this.subjects[subjectKey]).next(value);
2179
2240
  }
@@ -2195,6 +2256,11 @@ class ChatService {
2195
2256
  elementRef.nativeElement.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
2196
2257
  }
2197
2258
  }
2259
+ focusActiveMessageElement() {
2260
+ if (this.activeMessageElement) {
2261
+ this.activeMessageElement.element?.nativeElement?.focus();
2262
+ }
2263
+ }
2198
2264
  updateComponentSettings(property, settings, defaultSettings) {
2199
2265
  if (settings === true) {
2200
2266
  this[property] = defaultSettings;
@@ -2206,10 +2272,10 @@ class ChatService {
2206
2272
  this[property] = { ...defaultSettings, ...settings };
2207
2273
  }
2208
2274
  }
2209
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2210
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatService });
2275
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2276
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatService });
2211
2277
  }
2212
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatService, decorators: [{
2278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatService, decorators: [{
2213
2279
  type: Injectable
2214
2280
  }] });
2215
2281
 
@@ -2240,16 +2306,188 @@ class ChatSuggestionTemplateDirective {
2240
2306
  constructor(templateRef) {
2241
2307
  this.templateRef = templateRef;
2242
2308
  }
2243
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatSuggestionTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
2244
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ChatSuggestionTemplateDirective, isStandalone: true, selector: "[kendoChatSuggestionTemplate]", ngImport: i0 });
2309
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatSuggestionTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
2310
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ChatSuggestionTemplateDirective, isStandalone: true, selector: "[kendoChatSuggestionTemplate]", ngImport: i0 });
2245
2311
  }
2246
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatSuggestionTemplateDirective, decorators: [{
2312
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatSuggestionTemplateDirective, decorators: [{
2247
2313
  type: Directive,
2248
2314
  args: [{
2249
2315
  selector: '[kendoChatSuggestionTemplate]',
2250
2316
  standalone: true
2251
2317
  }]
2252
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
2318
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
2319
+
2320
+ const DIRECTION_CLASSES = {
2321
+ left: 'chevron-left',
2322
+ right: 'chevron-right',
2323
+ };
2324
+ /**
2325
+ * @hidden
2326
+ */
2327
+ class ChatScrollableButtonComponent {
2328
+ host;
2329
+ renderer;
2330
+ ngZone;
2331
+ localization;
2332
+ role = 'button';
2333
+ prev = false;
2334
+ onClick = new EventEmitter();
2335
+ get scrollButtonIconClass() {
2336
+ const defaultPrevIcon = !this.localization.rtl ? DIRECTION_CLASSES.left : DIRECTION_CLASSES.right;
2337
+ const defaultNextIcon = !this.localization.rtl ? DIRECTION_CLASSES.right : DIRECTION_CLASSES.left;
2338
+ return this.prev ? defaultPrevIcon : defaultNextIcon;
2339
+ }
2340
+ get scrollButtonSVGIcon() {
2341
+ const defaultPrevSVGIcon = !this.localization.rtl ? this.chevronLeftIcon : this.chevronRightIcon;
2342
+ const defaultNextSVGIcon = !this.localization.rtl ? this.chevronRightIcon : this.chevronLeftIcon;
2343
+ return this.prev ? defaultPrevSVGIcon : defaultNextSVGIcon;
2344
+ }
2345
+ chevronLeftIcon = chevronLeftIcon;
2346
+ chevronRightIcon = chevronRightIcon;
2347
+ subs = new Subscription();
2348
+ constructor(host, renderer, ngZone, localization) {
2349
+ this.host = host;
2350
+ this.renderer = renderer;
2351
+ this.ngZone = ngZone;
2352
+ this.localization = localization;
2353
+ }
2354
+ ngAfterViewInit() {
2355
+ this.ngZone.runOutsideAngular(() => {
2356
+ this.subs.add(this.renderer.listen(this.host.nativeElement, 'click', () => this.clickHandler()));
2357
+ });
2358
+ }
2359
+ ngOnDestroy() {
2360
+ this.subs.unsubscribe();
2361
+ }
2362
+ clickHandler() {
2363
+ const buttonType = this.prev ? 'prev' : 'next';
2364
+ this.onClick.emit(buttonType);
2365
+ }
2366
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatScrollableButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
2367
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ChatScrollableButtonComponent, isStandalone: true, selector: "[kendoChatScrollableButton]", inputs: { prev: "prev" }, outputs: { onClick: "onClick" }, host: { properties: { "attr.role": "this.role" } }, ngImport: i0, template: `
2368
+ <kendo-icon-wrapper [name]="scrollButtonIconClass" [svgIcon]="scrollButtonSVGIcon" innerCssClass="k-button-icon"> </kendo-icon-wrapper>
2369
+ `, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
2370
+ }
2371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatScrollableButtonComponent, decorators: [{
2372
+ type: Component,
2373
+ args: [{
2374
+ template: `
2375
+ <kendo-icon-wrapper [name]="scrollButtonIconClass" [svgIcon]="scrollButtonSVGIcon" innerCssClass="k-button-icon"> </kendo-icon-wrapper>
2376
+ `,
2377
+ // eslint-disable-next-line @angular-eslint/component-selector
2378
+ selector: '[kendoChatScrollableButton]',
2379
+ standalone: true,
2380
+ imports: [IconWrapperComponent],
2381
+ }]
2382
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i1.LocalizationService }], propDecorators: { role: [{
2383
+ type: HostBinding,
2384
+ args: ['attr.role']
2385
+ }], prev: [{
2386
+ type: Input
2387
+ }], onClick: [{
2388
+ type: Output
2389
+ }] } });
2390
+
2391
+ const DEFAULT_SCROLL_BEHAVIOR = 'smooth';
2392
+ const DEFAULT_SCROLL_SPEED = 100;
2393
+ /**
2394
+ * @hidden
2395
+ */
2396
+ class SuggestionsScrollService {
2397
+ ngZone;
2398
+ localization;
2399
+ owner;
2400
+ position = 0;
2401
+ scrollButtonActiveStateChange = new Subject();
2402
+ get scrollElement() {
2403
+ return this.owner.suggestionsContainer?.nativeElement;
2404
+ }
2405
+ get scrollContainerOverflowSize() {
2406
+ if (!isDocumentAvailable()) {
2407
+ return 0;
2408
+ }
2409
+ if (!this.scrollElement) {
2410
+ return 0;
2411
+ }
2412
+ const overflowSize = Math.floor(this.scrollElement.scrollWidth - this.scrollElement.offsetWidth);
2413
+ return overflowSize < 0 ? 0 : overflowSize;
2414
+ }
2415
+ get suggestionsOverflow() {
2416
+ return this.scrollContainerOverflowSize > 0;
2417
+ }
2418
+ constructor(ngZone, localization) {
2419
+ this.ngZone = ngZone;
2420
+ this.localization = localization;
2421
+ }
2422
+ toggleScrollButtonsState() {
2423
+ const suggestedActions = this.owner;
2424
+ if (!suggestedActions?.hasScrollButtons) {
2425
+ return;
2426
+ }
2427
+ const currentPrevButtonActive = !this.isDisabled('prev');
2428
+ const currentNextButtonActive = !this.isDisabled('next');
2429
+ const defaultOffset = 1;
2430
+ const rtlDelta = this.localization.rtl ? -1 : 1;
2431
+ const calculatedPrevButtonActive = (this.position * rtlDelta) > 0 && this.scrollContainerOverflowSize > 0;
2432
+ const calculatedNextButtonActive = (this.position * rtlDelta) < this.scrollContainerOverflowSize - defaultOffset && this.scrollContainerOverflowSize > 0;
2433
+ if (calculatedPrevButtonActive !== currentPrevButtonActive) {
2434
+ this.ngZone.run(() => this.toggleButtonActiveState('prev', calculatedPrevButtonActive));
2435
+ }
2436
+ if (calculatedNextButtonActive !== currentNextButtonActive) {
2437
+ this.ngZone.run(() => this.toggleButtonActiveState('next', calculatedNextButtonActive));
2438
+ }
2439
+ }
2440
+ onScroll(e) {
2441
+ this.position = e.target.scrollLeft;
2442
+ this.toggleScrollButtonsState();
2443
+ }
2444
+ scrollSuggestions(direction) {
2445
+ this.calculateListPosition(direction, DEFAULT_SCROLL_SPEED);
2446
+ if (this.scrollElement) {
2447
+ this.scrollElement.scrollTo({ left: this.position, behavior: DEFAULT_SCROLL_BEHAVIOR });
2448
+ }
2449
+ this.toggleScrollButtonsState();
2450
+ }
2451
+ updateScrollPosition(element) {
2452
+ this.position = element.scrollLeft;
2453
+ }
2454
+ calculateListPosition(direction, scrollSpeed) {
2455
+ if (direction === 'prev') {
2456
+ if (!this.localization.rtl) {
2457
+ this.position = this.position - scrollSpeed <= 0 ? 0 : this.position - scrollSpeed;
2458
+ }
2459
+ else {
2460
+ this.position = this.position + scrollSpeed >= 0 ? 0 : this.position + scrollSpeed;
2461
+ }
2462
+ }
2463
+ else if (direction === 'next' && this.position < this.scrollContainerOverflowSize) {
2464
+ if (this.position + scrollSpeed > this.scrollContainerOverflowSize) {
2465
+ if (this.localization.rtl) {
2466
+ this.position = -this.scrollContainerOverflowSize;
2467
+ }
2468
+ else {
2469
+ this.position = this.scrollContainerOverflowSize;
2470
+ }
2471
+ return;
2472
+ }
2473
+ if (this.localization.rtl) {
2474
+ this.position -= scrollSpeed;
2475
+ }
2476
+ else {
2477
+ this.position += scrollSpeed;
2478
+ }
2479
+ }
2480
+ }
2481
+ toggleButtonActiveState(buttonType, active) {
2482
+ this.scrollButtonActiveStateChange.next({ buttonType, active });
2483
+ }
2484
+ isDisabled = (buttonType) => this.owner[`${buttonType}ScrollButton`]?.nativeElement.classList.contains('k-disabled');
2485
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuggestionsScrollService, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
2486
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuggestionsScrollService });
2487
+ }
2488
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuggestionsScrollService, decorators: [{
2489
+ type: Injectable
2490
+ }], ctorParameters: () => [{ type: i0.NgZone }, { type: i1.LocalizationService }] });
2253
2491
 
2254
2492
  /* eslint-disable @typescript-eslint/no-explicit-any */
2255
2493
  /* eslint-disable @typescript-eslint/no-empty-function */
@@ -2257,18 +2495,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2257
2495
  * @hidden
2258
2496
  */
2259
2497
  class SuggestedActionsComponent extends ChatItem {
2498
+ chatService;
2499
+ localization;
2500
+ scrollService;
2501
+ ngZone;
2502
+ renderer;
2503
+ get defaultClass() {
2504
+ if (this.type === 'suggestion') {
2505
+ return this.chatService.suggestionsLayout === 'wrap' || this.chatService.suggestionsLayout === 'scroll';
2506
+ }
2507
+ else if (this.type === 'action') {
2508
+ return this.chatService.quickActionsLayout === 'wrap' || this.chatService.quickActionsLayout === 'scroll';
2509
+ }
2510
+ }
2511
+ get scrollableClass() {
2512
+ if (this.type === 'suggestion') {
2513
+ return this.chatService.suggestionsLayout === 'scroll';
2514
+ }
2515
+ else if (this.type === 'action') {
2516
+ return this.chatService.quickActionsLayout === 'scroll';
2517
+ }
2518
+ }
2519
+ get scrollButtonsClass() {
2520
+ if (this.type === 'suggestion') {
2521
+ return this.chatService.suggestionsLayout === 'scrollbuttons';
2522
+ }
2523
+ else if (this.type === 'action') {
2524
+ return this.chatService.quickActionsLayout === 'scrollbuttons';
2525
+ }
2526
+ }
2527
+ get role() {
2528
+ if (!this.hasScrollButtons) {
2529
+ return 'group';
2530
+ }
2531
+ return null;
2532
+ }
2260
2533
  actions;
2261
2534
  suggestions;
2262
2535
  tabbable;
2536
+ type;
2263
2537
  suggestionTemplate;
2264
2538
  dispatchAction = new EventEmitter();
2265
2539
  dispatchSuggestion = new EventEmitter();
2266
- defaultClass = true;
2267
- role = 'group';
2268
2540
  items;
2541
+ suggestionsContainer;
2542
+ prevScrollButton;
2543
+ nextScrollButton;
2269
2544
  selectedIndex = 0;
2270
2545
  activeIndex = -1;
2271
2546
  active = false;
2547
+ get hasScrollButtons() {
2548
+ return this.type === 'suggestion' ? this.chatService.suggestionsLayout === 'scrollbuttons' : this.chatService.quickActionsLayout === 'scrollbuttons';
2549
+ }
2550
+ subscriptions = new Subscription();
2551
+ resizeObserver = null;
2272
2552
  actionKeyHandlers = {
2273
2553
  [Keys.Tab]: (e) => this.changeSelectedIndex(e),
2274
2554
  [Keys.Enter]: (_, action) => this.actionClick(action),
@@ -2279,6 +2559,58 @@ class SuggestedActionsComponent extends ChatItem {
2279
2559
  [Keys.Enter]: (_, suggestion) => this.suggestionClick(suggestion),
2280
2560
  [Keys.Space]: (_, suggestion) => this.suggestionClick(suggestion),
2281
2561
  };
2562
+ constructor(chatService, localization, scrollService, ngZone, renderer) {
2563
+ super();
2564
+ this.chatService = chatService;
2565
+ this.localization = localization;
2566
+ this.scrollService = scrollService;
2567
+ this.ngZone = ngZone;
2568
+ this.renderer = renderer;
2569
+ this.scrollService.owner = this;
2570
+ }
2571
+ ngAfterViewInit() {
2572
+ const layoutChangeObservable = this.type === 'suggestion'
2573
+ ? this.chatService.suggestionsLayoutChange$
2574
+ : this.chatService.quickActionsLayoutChange$;
2575
+ this.subscriptions.add(layoutChangeObservable.subscribe((layoutMode) => {
2576
+ if (layoutMode === 'scrollbuttons') {
2577
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
2578
+ if (this.suggestionsContainer) {
2579
+ this.scrollService.updateScrollPosition(this.suggestionsContainer.nativeElement);
2580
+ }
2581
+ this.scrollService.toggleScrollButtonsState();
2582
+ });
2583
+ }
2584
+ }));
2585
+ this.subscriptions.add(this.scrollService.scrollButtonActiveStateChange.subscribe((change) => {
2586
+ this.toggleScrollButtonState(change.buttonType, change.active);
2587
+ }));
2588
+ if (this.hasScrollButtons && this.suggestionsContainer) {
2589
+ this.ngZone.runOutsideAngular(() => {
2590
+ this.resizeObserver = new ResizeObserver(() => {
2591
+ this.ngZone.run(() => {
2592
+ this.scrollService.toggleScrollButtonsState();
2593
+ });
2594
+ });
2595
+ this.resizeObserver.observe(this.suggestionsContainer.nativeElement);
2596
+ });
2597
+ }
2598
+ if (this.hasScrollButtons) {
2599
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
2600
+ this.scrollService.toggleScrollButtonsState();
2601
+ });
2602
+ if (this.suggestionsContainer) {
2603
+ this.scrollService.updateScrollPosition(this.suggestionsContainer.nativeElement);
2604
+ }
2605
+ }
2606
+ }
2607
+ ngOnDestroy() {
2608
+ this.subscriptions.unsubscribe();
2609
+ if (this.resizeObserver) {
2610
+ this.resizeObserver.disconnect();
2611
+ this.resizeObserver = null;
2612
+ }
2613
+ }
2282
2614
  isSelected(index) {
2283
2615
  return this.selected && this.selectedIndex === index;
2284
2616
  }
@@ -2312,151 +2644,266 @@ class SuggestedActionsComponent extends ChatItem {
2312
2644
  handler(e, suggestion);
2313
2645
  }
2314
2646
  }
2647
+ getScrollButtonTitle(direction) {
2648
+ let currentButton;
2649
+ if (this.localization.rtl) {
2650
+ currentButton = direction === 'prev' ? 'nextSuggestionsButtonTitle' : 'previousSuggestionsButtonTitle';
2651
+ }
2652
+ else {
2653
+ currentButton = direction === 'prev' ? 'previousSuggestionsButtonTitle' : 'nextSuggestionsButtonTitle';
2654
+ }
2655
+ return this.localization.get(currentButton);
2656
+ }
2657
+ onScroll(event) {
2658
+ this.scrollService.onScroll(event);
2659
+ }
2660
+ scrollSuggestions(direction) {
2661
+ this.scrollService.scrollSuggestions(direction);
2662
+ }
2315
2663
  focus() { }
2664
+ toggleScrollButtonState(buttonType, active) {
2665
+ const button = this[`${buttonType}ScrollButton`];
2666
+ if (button?.nativeElement) {
2667
+ if (active) {
2668
+ this.renderer.removeClass(button.nativeElement, 'k-disabled');
2669
+ }
2670
+ else {
2671
+ this.renderer.addClass(button.nativeElement, 'k-disabled');
2672
+ }
2673
+ }
2674
+ }
2316
2675
  changeSelectedIndex(e) {
2317
2676
  const offset = e.shiftKey ? -1 : 1;
2318
2677
  const prevIndex = this.selectedIndex;
2319
2678
  this.selectedIndex = Math.max(0, Math.min(prevIndex + offset, this.items.length - 1));
2320
2679
  }
2321
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuggestedActionsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2322
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SuggestedActionsComponent, isStandalone: true, selector: "kendo-chat-suggested-actions", inputs: { actions: "actions", suggestions: "suggestions", tabbable: "tabbable", suggestionTemplate: "suggestionTemplate" }, outputs: { dispatchAction: "dispatchAction", dispatchSuggestion: "dispatchSuggestion" }, host: { properties: { "class.k-suggestion-group": "this.defaultClass", "attr.role": "this.role" } }, providers: [{
2680
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuggestedActionsComponent, deps: [{ token: ChatService }, { token: i1.LocalizationService }, { token: SuggestionsScrollService }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
2681
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SuggestedActionsComponent, isStandalone: true, selector: "kendo-chat-suggested-actions", inputs: { actions: "actions", suggestions: "suggestions", tabbable: "tabbable", type: "type", suggestionTemplate: "suggestionTemplate" }, outputs: { dispatchAction: "dispatchAction", dispatchSuggestion: "dispatchSuggestion" }, host: { properties: { "class.k-suggestion-group": "this.defaultClass", "class.k-suggestion-group-scrollable": "this.scrollableClass", "class.k-suggestion-scrollwrap": "this.scrollButtonsClass", "attr.role": "this.role" } }, providers: [{
2323
2682
  provide: ChatItem,
2324
2683
  useExisting: forwardRef(() => SuggestedActionsComponent)
2325
- }], viewQueries: [{ propertyName: "items", predicate: ["item"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
2326
- <ng-container *ngIf="actions">
2327
- <span
2328
- #item
2329
- *ngFor="let action of actions; index as index; first as first; last as last"
2330
- class="k-suggestion k-suggestion-primary"
2331
- role="button"
2332
- [class.k-selected]="isSelected(index)"
2333
- [class.k-focus]="isSelected(index)"
2334
- [class.k-active]="isActive(index)"
2335
- [attr.tabindex]="0"
2336
- (click)="actionClick(action, index)"
2337
- (keydown)="actionKeydown($event, action)"
2338
- (mousedown)="toggleActiveState(true, index)"
2339
- (mouseup)="toggleActiveState(false, index)"
2340
- >
2341
- {{ action.title || action.value }}
2342
- </span>
2343
- </ng-container>
2684
+ },
2685
+ SuggestionsScrollService
2686
+ ], viewQueries: [{ propertyName: "suggestionsContainer", first: true, predicate: ["suggestionsContainer"], descendants: true, read: ElementRef }, { propertyName: "prevScrollButton", first: true, predicate: ["prevScrollButton"], descendants: true, read: ElementRef }, { propertyName: "nextScrollButton", first: true, predicate: ["nextScrollButton"], descendants: true, read: ElementRef }, { propertyName: "items", predicate: ["item"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
2687
+ <span
2688
+ *ngIf="hasScrollButtons"
2689
+ #prevScrollButton
2690
+ kendoChatScrollableButton
2691
+ [prev]="true"
2692
+ [title]="getScrollButtonTitle('prev')"
2693
+ class="k-button k-button-md k-button-solid k-button-solid-base k-rounded-md k-icon-button"
2694
+ (onClick)="scrollSuggestions($event)"
2695
+ >
2696
+ </span>
2697
+ <div class="k-suggestion-group" *ngIf="hasScrollButtons; else noScrollButtons"
2698
+ #suggestionsContainer
2699
+ role="group"
2700
+ (scroll)="onScroll($event)">
2701
+ <ng-container *ngTemplateOutlet="suggestionsContent"></ng-container>
2702
+ </div>
2703
+
2704
+ <ng-template #noScrollButtons>
2705
+ <ng-container *ngTemplateOutlet="suggestionsContent"></ng-container>
2706
+ </ng-template>
2344
2707
 
2345
- <ng-container *ngIf="suggestions">
2346
- <ng-container *ngIf="!suggestionTemplate?.templateRef">
2708
+ <ng-template #suggestionsContent>
2709
+ <ng-container *ngIf="actions">
2347
2710
  <span
2348
2711
  #item
2349
- *ngFor="let suggestion of suggestions; index as index; first as first; last as last"
2350
- class="k-suggestion"
2712
+ *ngFor="let action of actions; index as index; first as first; last as last"
2713
+ class="k-suggestion k-suggestion-primary"
2351
2714
  role="button"
2352
2715
  [class.k-selected]="isSelected(index)"
2353
2716
  [class.k-focus]="isSelected(index)"
2354
2717
  [class.k-active]="isActive(index)"
2355
2718
  [attr.tabindex]="0"
2356
- (click)="suggestionClick(suggestion, index)"
2357
- (keydown)="suggestionKeydown($event, suggestion)"
2719
+ (click)="actionClick(action, index)"
2720
+ (keydown)="actionKeydown($event, action)"
2358
2721
  (mousedown)="toggleActiveState(true, index)"
2359
2722
  (mouseup)="toggleActiveState(false, index)"
2360
2723
  >
2361
- {{ suggestion.text }}
2724
+ {{ action.title || action.value }}
2362
2725
  </span>
2363
2726
  </ng-container>
2364
2727
 
2365
- <ng-container *ngIf="suggestionTemplate?.templateRef">
2366
- <ng-container *ngFor="let suggestion of suggestions">
2367
- <ng-template
2368
- [ngTemplateOutlet]="suggestionTemplate.templateRef"
2369
- [ngTemplateOutletContext]="{ $implicit: suggestion }"
2728
+ <ng-container *ngIf="suggestions">
2729
+ <ng-container *ngIf="!suggestionTemplate?.templateRef">
2730
+ <span
2731
+ #item
2732
+ *ngFor="let suggestion of suggestions; index as index; first as first; last as last"
2733
+ class="k-suggestion"
2734
+ role="button"
2735
+ [class.k-selected]="isSelected(index)"
2736
+ [class.k-focus]="isSelected(index)"
2737
+ [class.k-active]="isActive(index)"
2738
+ [attr.tabindex]="0"
2739
+ (click)="suggestionClick(suggestion, index)"
2740
+ (keydown)="suggestionKeydown($event, suggestion)"
2741
+ (mousedown)="toggleActiveState(true, index)"
2742
+ (mouseup)="toggleActiveState(false, index)"
2370
2743
  >
2371
- </ng-template>
2744
+ {{ suggestion.text }}
2745
+ </span>
2746
+ </ng-container>
2747
+
2748
+ <ng-container *ngIf="suggestionTemplate?.templateRef">
2749
+ <ng-container *ngFor="let suggestion of suggestions">
2750
+ <ng-template
2751
+ [ngTemplateOutlet]="suggestionTemplate.templateRef"
2752
+ [ngTemplateOutletContext]="{ $implicit: suggestion }"
2753
+ >
2754
+ </ng-template>
2755
+ </ng-container>
2372
2756
  </ng-container>
2373
2757
  </ng-container>
2374
- </ng-container>
2375
- `, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
2758
+ </ng-template>
2759
+
2760
+ <span
2761
+ *ngIf="hasScrollButtons"
2762
+ #nextScrollButton
2763
+ kendoChatScrollableButton
2764
+ [prev]="false"
2765
+ [title]="getScrollButtonTitle('next')"
2766
+ class="k-button k-button-md k-button-solid k-button-solid-base k-rounded-md k-icon-button"
2767
+ (onClick)="scrollSuggestions($event)"
2768
+ >
2769
+ </span>
2770
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ChatScrollableButtonComponent, selector: "[kendoChatScrollableButton]", inputs: ["prev"], outputs: ["onClick"] }] });
2376
2771
  }
2377
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuggestedActionsComponent, decorators: [{
2772
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuggestedActionsComponent, decorators: [{
2378
2773
  type: Component,
2379
2774
  args: [{
2380
2775
  selector: 'kendo-chat-suggested-actions',
2381
2776
  providers: [{
2382
2777
  provide: ChatItem,
2383
2778
  useExisting: forwardRef(() => SuggestedActionsComponent)
2384
- }],
2779
+ },
2780
+ SuggestionsScrollService],
2385
2781
  template: `
2386
- <ng-container *ngIf="actions">
2387
- <span
2388
- #item
2389
- *ngFor="let action of actions; index as index; first as first; last as last"
2390
- class="k-suggestion k-suggestion-primary"
2391
- role="button"
2392
- [class.k-selected]="isSelected(index)"
2393
- [class.k-focus]="isSelected(index)"
2394
- [class.k-active]="isActive(index)"
2395
- [attr.tabindex]="0"
2396
- (click)="actionClick(action, index)"
2397
- (keydown)="actionKeydown($event, action)"
2398
- (mousedown)="toggleActiveState(true, index)"
2399
- (mouseup)="toggleActiveState(false, index)"
2400
- >
2401
- {{ action.title || action.value }}
2402
- </span>
2403
- </ng-container>
2782
+ <span
2783
+ *ngIf="hasScrollButtons"
2784
+ #prevScrollButton
2785
+ kendoChatScrollableButton
2786
+ [prev]="true"
2787
+ [title]="getScrollButtonTitle('prev')"
2788
+ class="k-button k-button-md k-button-solid k-button-solid-base k-rounded-md k-icon-button"
2789
+ (onClick)="scrollSuggestions($event)"
2790
+ >
2791
+ </span>
2792
+ <div class="k-suggestion-group" *ngIf="hasScrollButtons; else noScrollButtons"
2793
+ #suggestionsContainer
2794
+ role="group"
2795
+ (scroll)="onScroll($event)">
2796
+ <ng-container *ngTemplateOutlet="suggestionsContent"></ng-container>
2797
+ </div>
2404
2798
 
2405
- <ng-container *ngIf="suggestions">
2406
- <ng-container *ngIf="!suggestionTemplate?.templateRef">
2799
+ <ng-template #noScrollButtons>
2800
+ <ng-container *ngTemplateOutlet="suggestionsContent"></ng-container>
2801
+ </ng-template>
2802
+
2803
+ <ng-template #suggestionsContent>
2804
+ <ng-container *ngIf="actions">
2407
2805
  <span
2408
2806
  #item
2409
- *ngFor="let suggestion of suggestions; index as index; first as first; last as last"
2410
- class="k-suggestion"
2807
+ *ngFor="let action of actions; index as index; first as first; last as last"
2808
+ class="k-suggestion k-suggestion-primary"
2411
2809
  role="button"
2412
2810
  [class.k-selected]="isSelected(index)"
2413
2811
  [class.k-focus]="isSelected(index)"
2414
2812
  [class.k-active]="isActive(index)"
2415
2813
  [attr.tabindex]="0"
2416
- (click)="suggestionClick(suggestion, index)"
2417
- (keydown)="suggestionKeydown($event, suggestion)"
2814
+ (click)="actionClick(action, index)"
2815
+ (keydown)="actionKeydown($event, action)"
2418
2816
  (mousedown)="toggleActiveState(true, index)"
2419
2817
  (mouseup)="toggleActiveState(false, index)"
2420
2818
  >
2421
- {{ suggestion.text }}
2819
+ {{ action.title || action.value }}
2422
2820
  </span>
2423
2821
  </ng-container>
2424
2822
 
2425
- <ng-container *ngIf="suggestionTemplate?.templateRef">
2426
- <ng-container *ngFor="let suggestion of suggestions">
2427
- <ng-template
2428
- [ngTemplateOutlet]="suggestionTemplate.templateRef"
2429
- [ngTemplateOutletContext]="{ $implicit: suggestion }"
2823
+ <ng-container *ngIf="suggestions">
2824
+ <ng-container *ngIf="!suggestionTemplate?.templateRef">
2825
+ <span
2826
+ #item
2827
+ *ngFor="let suggestion of suggestions; index as index; first as first; last as last"
2828
+ class="k-suggestion"
2829
+ role="button"
2830
+ [class.k-selected]="isSelected(index)"
2831
+ [class.k-focus]="isSelected(index)"
2832
+ [class.k-active]="isActive(index)"
2833
+ [attr.tabindex]="0"
2834
+ (click)="suggestionClick(suggestion, index)"
2835
+ (keydown)="suggestionKeydown($event, suggestion)"
2836
+ (mousedown)="toggleActiveState(true, index)"
2837
+ (mouseup)="toggleActiveState(false, index)"
2430
2838
  >
2431
- </ng-template>
2839
+ {{ suggestion.text }}
2840
+ </span>
2841
+ </ng-container>
2842
+
2843
+ <ng-container *ngIf="suggestionTemplate?.templateRef">
2844
+ <ng-container *ngFor="let suggestion of suggestions">
2845
+ <ng-template
2846
+ [ngTemplateOutlet]="suggestionTemplate.templateRef"
2847
+ [ngTemplateOutletContext]="{ $implicit: suggestion }"
2848
+ >
2849
+ </ng-template>
2850
+ </ng-container>
2432
2851
  </ng-container>
2433
2852
  </ng-container>
2434
- </ng-container>
2853
+ </ng-template>
2854
+
2855
+ <span
2856
+ *ngIf="hasScrollButtons"
2857
+ #nextScrollButton
2858
+ kendoChatScrollableButton
2859
+ [prev]="false"
2860
+ [title]="getScrollButtonTitle('next')"
2861
+ class="k-button k-button-md k-button-solid k-button-solid-base k-rounded-md k-icon-button"
2862
+ (onClick)="scrollSuggestions($event)"
2863
+ >
2864
+ </span>
2435
2865
  `,
2436
2866
  standalone: true,
2437
- imports: [NgFor, NgIf, NgTemplateOutlet]
2867
+ imports: [NgFor, NgIf, NgTemplateOutlet, ChatScrollableButtonComponent]
2438
2868
  }]
2439
- }], propDecorators: { actions: [{
2869
+ }], ctorParameters: () => [{ type: ChatService }, { type: i1.LocalizationService }, { type: SuggestionsScrollService }, { type: i0.NgZone }, { type: i0.Renderer2 }], propDecorators: { defaultClass: [{
2870
+ type: HostBinding,
2871
+ args: ['class.k-suggestion-group']
2872
+ }], scrollableClass: [{
2873
+ type: HostBinding,
2874
+ args: ['class.k-suggestion-group-scrollable']
2875
+ }], scrollButtonsClass: [{
2876
+ type: HostBinding,
2877
+ args: ['class.k-suggestion-scrollwrap']
2878
+ }], role: [{
2879
+ type: HostBinding,
2880
+ args: ['attr.role']
2881
+ }], actions: [{
2440
2882
  type: Input
2441
2883
  }], suggestions: [{
2442
2884
  type: Input
2443
2885
  }], tabbable: [{
2444
2886
  type: Input
2887
+ }], type: [{
2888
+ type: Input
2445
2889
  }], suggestionTemplate: [{
2446
2890
  type: Input
2447
2891
  }], dispatchAction: [{
2448
2892
  type: Output
2449
2893
  }], dispatchSuggestion: [{
2450
2894
  type: Output
2451
- }], defaultClass: [{
2452
- type: HostBinding,
2453
- args: ['class.k-suggestion-group']
2454
- }], role: [{
2455
- type: HostBinding,
2456
- args: ['attr.role']
2457
2895
  }], items: [{
2458
2896
  type: ViewChildren,
2459
2897
  args: ['item']
2898
+ }], suggestionsContainer: [{
2899
+ type: ViewChild,
2900
+ args: ['suggestionsContainer', { read: ElementRef, static: false }]
2901
+ }], prevScrollButton: [{
2902
+ type: ViewChild,
2903
+ args: ['prevScrollButton', { read: ElementRef }]
2904
+ }], nextScrollButton: [{
2905
+ type: ViewChild,
2906
+ args: ['nextScrollButton', { read: ElementRef }]
2460
2907
  }] } });
2461
2908
 
2462
2909
  /* eslint-disable @typescript-eslint/no-empty-function */
@@ -2491,13 +2938,13 @@ class ChatFileComponent extends ChatItem {
2491
2938
  return this.localization.get(key);
2492
2939
  }
2493
2940
  focus() { }
2494
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatFileComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
2495
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ChatFileComponent, isStandalone: true, selector: "li[chatFile]", inputs: { chatFile: "chatFile", removable: "removable", fileActions: "fileActions" }, outputs: { remove: "remove", actionClick: "actionClick", actionsToggle: "actionsToggle", actionButtonClick: "actionButtonClick" }, providers: [{
2941
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatFileComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
2942
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ChatFileComponent, isStandalone: true, selector: "li[chatFile]", inputs: { chatFile: "chatFile", removable: "removable", fileActions: "fileActions" }, outputs: { remove: "remove", actionClick: "actionClick", actionsToggle: "actionsToggle", actionButtonClick: "actionButtonClick" }, providers: [{
2496
2943
  provide: ChatItem,
2497
2944
  useExisting: forwardRef(() => ChatFileComponent)
2498
2945
  }], usesInheritance: true, ngImport: i0, template: `
2499
2946
  <kendo-icon-wrapper
2500
- size="xxlarge"
2947
+ size="xlarge"
2501
2948
  [name]="fileGroupClass(chatFile.extension)"
2502
2949
  [svgIcon]="fileThumbnail(chatFile.extension)"
2503
2950
  >
@@ -2528,7 +2975,7 @@ class ChatFileComponent extends ChatItem {
2528
2975
  ></kendo-dropdownbutton>
2529
2976
  `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: DropDownButtonComponent, selector: "kendo-dropdownbutton", inputs: ["arrowIcon", "icon", "svgIcon", "iconClass", "imageUrl", "textField", "data", "size", "rounded", "fillMode", "themeColor", "buttonAttributes"], outputs: ["itemClick", "focus", "blur"], exportAs: ["kendoDropDownButton"] }] });
2530
2977
  }
2531
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatFileComponent, decorators: [{
2978
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatFileComponent, decorators: [{
2532
2979
  type: Component,
2533
2980
  args: [{
2534
2981
  selector: 'li[chatFile]',
@@ -2538,7 +2985,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2538
2985
  }],
2539
2986
  template: `
2540
2987
  <kendo-icon-wrapper
2541
- size="xxlarge"
2988
+ size="xlarge"
2542
2989
  [name]="fileGroupClass(chatFile.extension)"
2543
2990
  [svgIcon]="fileThumbnail(chatFile.extension)"
2544
2991
  >
@@ -2571,7 +3018,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2571
3018
  standalone: true,
2572
3019
  imports: [NgIf, IconWrapperComponent, ButtonComponent, DropDownButtonComponent]
2573
3020
  }]
2574
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { chatFile: [{
3021
+ }], ctorParameters: () => [{ type: i1.LocalizationService }], propDecorators: { chatFile: [{
2575
3022
  type: Input
2576
3023
  }], removable: [{
2577
3024
  type: Input
@@ -2684,8 +3131,8 @@ class MessageReferenceComponent extends ChatItem {
2684
3131
  return this.localization.get(key);
2685
3132
  }
2686
3133
  focus() { }
2687
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageReferenceComponent, deps: [{ token: i1.LocalizationService }, { token: ChatService }], target: i0.ɵɵFactoryTarget.Component });
2688
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MessageReferenceComponent, isStandalone: true, selector: "chat-message-reference-content", inputs: { message: "message" }, host: { properties: { "class.k-message-reference-content": "this.hostClass" } }, providers: [{
3134
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageReferenceComponent, deps: [{ token: i1.LocalizationService }, { token: ChatService }], target: i0.ɵɵFactoryTarget.Component });
3135
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: MessageReferenceComponent, isStandalone: true, selector: "chat-message-reference-content", inputs: { message: "message" }, host: { properties: { "class.k-message-reference-content": "this.hostClass" } }, providers: [{
2689
3136
  provide: ChatItem,
2690
3137
  useExisting: forwardRef(() => MessageReferenceComponent)
2691
3138
  }], usesInheritance: true, ngImport: i0, template: `
@@ -2698,7 +3145,7 @@ class MessageReferenceComponent extends ChatItem {
2698
3145
  <ng-container *ngIf="message.isDeleted && !isOwnMessage(message)">{{ textFor('deletedMessageReceiverText') }}</ng-container>
2699
3146
  `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ChatFileComponent, selector: "li[chatFile]", inputs: ["chatFile", "removable", "fileActions"], outputs: ["remove", "actionClick", "actionsToggle", "actionButtonClick"] }] });
2700
3147
  }
2701
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageReferenceComponent, decorators: [{
3148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageReferenceComponent, decorators: [{
2702
3149
  type: Component,
2703
3150
  args: [{
2704
3151
  selector: 'chat-message-reference-content',
@@ -2718,7 +3165,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2718
3165
  standalone: true,
2719
3166
  imports: [NgIf, ChatFileComponent]
2720
3167
  }]
2721
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: ChatService }]; }, propDecorators: { hostClass: [{
3168
+ }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: ChatService }], propDecorators: { hostClass: [{
2722
3169
  type: HostBinding,
2723
3170
  args: ['class.k-message-reference-content']
2724
3171
  }], message: [{
@@ -2771,7 +3218,9 @@ class MessageBoxComponent {
2771
3218
  const elRef = this.element.nativeElement;
2772
3219
  this.subs.add(this.renderer.listen(elRef, 'focusout', event => this.onBlur(event)));
2773
3220
  this.subs.add(this.chatService.contextMenuAction$.subscribe((action) => {
2774
- action.action.id === 'reply' && this.messageBoxInput.focus();
3221
+ if (action.action.id === 'reply') {
3222
+ this.messageBoxInput.focus();
3223
+ }
2775
3224
  }));
2776
3225
  }
2777
3226
  ngOnDestroy() {
@@ -2786,6 +3235,7 @@ class MessageBoxComponent {
2786
3235
  return;
2787
3236
  }
2788
3237
  const message = {
3238
+ id: guid(),
2789
3239
  text: this.inputValue,
2790
3240
  timestamp: new Date(),
2791
3241
  author: { id: this.authorId },
@@ -2917,12 +3367,13 @@ class MessageBoxComponent {
2917
3367
  dispatchSuggestion(suggestion) {
2918
3368
  this.executeSuggestion.emit(suggestion);
2919
3369
  }
2920
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageBoxComponent, deps: [{ token: ChatService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
2921
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MessageBoxComponent, isStandalone: true, selector: "kendo-message-box", inputs: { authorId: "authorId", autoScroll: "autoScroll", suggestions: "suggestions", placeholder: "placeholder", inputValue: "inputValue", localization: "localization", messageBoxTemplate: "messageBoxTemplate", suggestionTemplate: "suggestionTemplate" }, outputs: { sendMessage: "sendMessage", executeSuggestion: "executeSuggestion", fileSelect: "fileSelect", fileRemove: "fileRemove" }, host: { properties: { "style.border-color": "this.borderColor", "class.k-message-box-wrapper": "this.messageBoxWrapperClass" } }, viewQueries: [{ propertyName: "messageBoxInput", first: true, predicate: ["messageBoxInput"], descendants: true }, { propertyName: "fileSelectComponent", first: true, predicate: ["fileSelect"], descendants: true }, { propertyName: "suggestedActionsComponent", first: true, predicate: SuggestedActionsComponent, descendants: true }], ngImport: i0, template: `
3370
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageBoxComponent, deps: [{ token: ChatService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
3371
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: MessageBoxComponent, isStandalone: true, selector: "kendo-message-box", inputs: { authorId: "authorId", autoScroll: "autoScroll", suggestions: "suggestions", placeholder: "placeholder", inputValue: "inputValue", localization: "localization", messageBoxTemplate: "messageBoxTemplate", suggestionTemplate: "suggestionTemplate" }, outputs: { sendMessage: "sendMessage", executeSuggestion: "executeSuggestion", fileSelect: "fileSelect", fileRemove: "fileRemove" }, host: { properties: { "style.border-color": "this.borderColor", "class.k-message-box-wrapper": "this.messageBoxWrapperClass" } }, viewQueries: [{ propertyName: "messageBoxInput", first: true, predicate: ["messageBoxInput"], descendants: true }, { propertyName: "fileSelectComponent", first: true, predicate: ["fileSelect"], descendants: true }, { propertyName: "suggestedActionsComponent", first: true, predicate: SuggestedActionsComponent, descendants: true }], ngImport: i0, template: `
2922
3372
  <kendo-chat-suggested-actions
2923
3373
  *ngIf="suggestions?.length > 0"
2924
3374
  #suggestedActions
2925
3375
  [suggestions]="suggestions"
3376
+ type="suggestion"
2926
3377
  [suggestionTemplate]="suggestionTemplate"
2927
3378
  [tabbable]="true"
2928
3379
  (dispatchSuggestion)="dispatchSuggestion($event)"
@@ -3023,9 +3474,9 @@ class MessageBoxComponent {
3023
3474
  [showFileList]="false"
3024
3475
  (select)="handleFileSelect($event)"
3025
3476
  ></kendo-fileselect>
3026
- `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "maxResizableRows", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }, { kind: "component", type: TextAreaSuffixComponent, selector: "kendo-textarea-suffix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaSuffix"] }, { kind: "component", type: TextAreaPrefixComponent, selector: "kendo-textarea-prefix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaPrefix"] }, { kind: "component", type: SpeechToTextButtonComponent, selector: "button[kendoSpeechToTextButton]", inputs: ["disabled", "size", "rounded", "fillMode", "themeColor", "integrationMode", "lang", "continuous", "interimResults", "maxAlternatives"], outputs: ["start", "end", "result", "error", "click"], exportAs: ["kendoSpeechToTextButton"] }, { kind: "component", type: InputSpacerComponent, selector: "kendo-input-spacer, kendo-textbox-spacer", inputs: ["width"] }, { kind: "component", type: FileSelectComponent, selector: "kendo-fileselect", inputs: ["name"], outputs: ["valueChange"], exportAs: ["kendoFileSelect"] }, { kind: "component", type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: ["actions", "suggestions", "tabbable", "suggestionTemplate"], outputs: ["dispatchAction", "dispatchSuggestion"] }, { kind: "component", type: ChatFileComponent, selector: "li[chatFile]", inputs: ["chatFile", "removable", "fileActions"], outputs: ["remove", "actionClick", "actionsToggle", "actionButtonClick"] }] });
3477
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "maxResizableRows", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }, { kind: "component", type: TextAreaSuffixComponent, selector: "kendo-textarea-suffix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaSuffix"] }, { kind: "component", type: TextAreaPrefixComponent, selector: "kendo-textarea-prefix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaPrefix"] }, { kind: "component", type: SpeechToTextButtonComponent, selector: "button[kendoSpeechToTextButton]", inputs: ["disabled", "size", "rounded", "fillMode", "themeColor", "integrationMode", "lang", "continuous", "interimResults", "maxAlternatives"], outputs: ["start", "end", "result", "error", "click"], exportAs: ["kendoSpeechToTextButton"] }, { kind: "component", type: InputSpacerComponent, selector: "kendo-input-spacer, kendo-textbox-spacer", inputs: ["width"] }, { kind: "component", type: FileSelectComponent, selector: "kendo-fileselect", inputs: ["name"], outputs: ["valueChange"], exportAs: ["kendoFileSelect"] }, { kind: "component", type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: ["actions", "suggestions", "tabbable", "type", "suggestionTemplate"], outputs: ["dispatchAction", "dispatchSuggestion"] }, { kind: "component", type: ChatFileComponent, selector: "li[chatFile]", inputs: ["chatFile", "removable", "fileActions"], outputs: ["remove", "actionClick", "actionsToggle", "actionButtonClick"] }] });
3027
3478
  }
3028
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageBoxComponent, decorators: [{
3479
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageBoxComponent, decorators: [{
3029
3480
  type: Component,
3030
3481
  args: [{
3031
3482
  selector: 'kendo-message-box',
@@ -3034,6 +3485,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3034
3485
  *ngIf="suggestions?.length > 0"
3035
3486
  #suggestedActions
3036
3487
  [suggestions]="suggestions"
3488
+ type="suggestion"
3037
3489
  [suggestionTemplate]="suggestionTemplate"
3038
3490
  [tabbable]="true"
3039
3491
  (dispatchSuggestion)="dispatchSuggestion($event)"
@@ -3138,7 +3590,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3138
3590
  standalone: true,
3139
3591
  imports: [NgIf, NgFor, ButtonComponent, FormsModule, NgTemplateOutlet, TextAreaComponent, MessageReferenceComponent, TextAreaSuffixComponent, TextAreaPrefixComponent, SpeechToTextButtonComponent, InputSpacerComponent, FileSelectComponent, SuggestedActionsComponent, ChatFileComponent]
3140
3592
  }]
3141
- }], ctorParameters: function () { return [{ type: ChatService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { borderColor: [{
3593
+ }], ctorParameters: () => [{ type: ChatService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { borderColor: [{
3142
3594
  type: HostBinding,
3143
3595
  args: ['style.border-color']
3144
3596
  }], messageBoxWrapperClass: [{
@@ -3180,10 +3632,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3180
3632
  }] } });
3181
3633
 
3182
3634
  /**
3183
- * Defines a template for displaying the chat timestamp.
3635
+ * Defines a template for displaying custom content inside the Chat messages.
3184
3636
  *
3185
- * To define a timestamp template, nest an `<ng-template>` tag with the `kendoChatTimestampTemplate` directive inside the `<kendo-chat>` component.
3186
- * The template context is set to the current timestamp.
3637
+ * To define a message template, nest an `<ng-template>` tag with the `kendoChatMessageContentTemplate` directive inside the `<kendo-chat>` component.
3638
+ * The template context is set to the `message` instance.
3639
+ * For more information, refer to the article on [message templates](slug:message_templates_chat).
3640
+ *
3641
+ * @example
3642
+ * ```html
3643
+ * <kendo-chat>
3644
+ * <ng-template kendoChatMessageContentTemplate let-message>
3645
+ * <div>Message: {{ message.text }}</div>
3646
+ * </ng-template>
3647
+ * </kendo-chat>
3648
+ * ```
3649
+ */
3650
+ class MessageContentTemplateDirective {
3651
+ templateRef;
3652
+ constructor(templateRef) {
3653
+ this.templateRef = templateRef;
3654
+ }
3655
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageContentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3656
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: MessageContentTemplateDirective, isStandalone: true, selector: "[kendoChatMessageContentTemplate]", ngImport: i0 });
3657
+ }
3658
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageContentTemplateDirective, decorators: [{
3659
+ type: Directive,
3660
+ args: [{
3661
+ selector: '[kendoChatMessageContentTemplate]',
3662
+ standalone: true
3663
+ }]
3664
+ }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
3665
+ type: Optional
3666
+ }] }] });
3667
+
3668
+ /**
3669
+ * Defines a template for displaying the chat timestamp.
3670
+ *
3671
+ * To define a timestamp template, nest an `<ng-template>` tag with the `kendoChatTimestampTemplate` directive inside the `<kendo-chat>` component.
3672
+ * The template context is set to the current timestamp.
3187
3673
  * For more information, refer to the article on [message templates](slug:message_templates_chat).
3188
3674
  *
3189
3675
  * You can use the following field:
@@ -3203,18 +3689,18 @@ class ChatTimestampTemplateDirective {
3203
3689
  constructor(templateRef) {
3204
3690
  this.templateRef = templateRef;
3205
3691
  }
3206
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatTimestampTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3207
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ChatTimestampTemplateDirective, isStandalone: true, selector: "[kendoChatTimestampTemplate]", ngImport: i0 });
3692
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatTimestampTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3693
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ChatTimestampTemplateDirective, isStandalone: true, selector: "[kendoChatTimestampTemplate]", ngImport: i0 });
3208
3694
  }
3209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatTimestampTemplateDirective, decorators: [{
3695
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatTimestampTemplateDirective, decorators: [{
3210
3696
  type: Directive,
3211
3697
  args: [{
3212
3698
  selector: '[kendoChatTimestampTemplate]',
3213
3699
  standalone: true
3214
3700
  }]
3215
- }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
3701
+ }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
3216
3702
  type: Optional
3217
- }] }]; } });
3703
+ }] }] });
3218
3704
 
3219
3705
  /**
3220
3706
  * Represents the template for the status of a message.
@@ -3233,16 +3719,186 @@ class ChatStatusTemplateDirective {
3233
3719
  constructor(templateRef) {
3234
3720
  this.templateRef = templateRef;
3235
3721
  }
3236
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatStatusTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3237
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ChatStatusTemplateDirective, isStandalone: true, selector: "[kendoChatStatusTemplate]", ngImport: i0 });
3722
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatStatusTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3723
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ChatStatusTemplateDirective, isStandalone: true, selector: "[kendoChatStatusTemplate]", ngImport: i0 });
3238
3724
  }
3239
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatStatusTemplateDirective, decorators: [{
3725
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatStatusTemplateDirective, decorators: [{
3240
3726
  type: Directive,
3241
3727
  args: [{
3242
3728
  selector: '[kendoChatStatusTemplate]',
3243
3729
  standalone: true
3244
3730
  }]
3245
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
3731
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
3732
+
3733
+ /**
3734
+ * Defines a template for displaying fully custom Chat message bubbles.
3735
+ *
3736
+ * To define a message template, nest an `<ng-template>` tag with the `kendoChatMessageTemplate` directive inside the `<kendo-chat>` component.
3737
+ * The template context is set to the `message` instance.
3738
+ * For more information, refer to the article on [message templates](slug:message_templates_chat).
3739
+ *
3740
+ * @example
3741
+ * ```html
3742
+ * <kendo-chat>
3743
+ * <ng-template kendoChatMessageTemplate let-message>
3744
+ * <div>Message: {{ message.text }}</div>
3745
+ * </ng-template>
3746
+ * </kendo-chat>
3747
+ * ```
3748
+ */
3749
+ class MessageTemplateDirective {
3750
+ templateRef;
3751
+ constructor(templateRef) {
3752
+ this.templateRef = templateRef;
3753
+ }
3754
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3755
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: MessageTemplateDirective, isStandalone: true, selector: "[kendoChatMessageTemplate]", ngImport: i0 });
3756
+ }
3757
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageTemplateDirective, decorators: [{
3758
+ type: Directive,
3759
+ args: [{
3760
+ selector: '[kendoChatMessageTemplate]',
3761
+ standalone: true
3762
+ }]
3763
+ }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
3764
+ type: Optional
3765
+ }] }] });
3766
+
3767
+ /**
3768
+ * Defines a template for displaying custom content inside the current user's messages in the Chat.
3769
+ *
3770
+ * To define a message template, nest an `<ng-template>` tag with the `kendoChatAuthorMessageContentTemplate` directive inside the `<kendo-chat>` component.
3771
+ * The template context is set to the `message` instance.
3772
+ * For more information, refer to the article on [message templates](slug:message_templates_chat).
3773
+ *
3774
+ * @example
3775
+ * ```html
3776
+ * <kendo-chat>
3777
+ * <ng-template kendoChatAuthorMessageContentTemplate let-message>
3778
+ * <div>Message: {{ message.text }}</div>
3779
+ * </ng-template>
3780
+ * </kendo-chat>
3781
+ * ```
3782
+ */
3783
+ class AuthorMessageContentTemplateDirective {
3784
+ templateRef;
3785
+ constructor(templateRef) {
3786
+ this.templateRef = templateRef;
3787
+ }
3788
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AuthorMessageContentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3789
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: AuthorMessageContentTemplateDirective, isStandalone: true, selector: "[kendoChatAuthorMessageContentTemplate]", ngImport: i0 });
3790
+ }
3791
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AuthorMessageContentTemplateDirective, decorators: [{
3792
+ type: Directive,
3793
+ args: [{
3794
+ selector: '[kendoChatAuthorMessageContentTemplate]',
3795
+ standalone: true
3796
+ }]
3797
+ }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
3798
+ type: Optional
3799
+ }] }] });
3800
+
3801
+ /**
3802
+ * Defines a template for displaying custom content inside the other users' messages in the Chat.
3803
+ *
3804
+ * To define a message template, nest an `<ng-template>` tag with the `kendoChatReceiverMessageContentTemplate` directive inside the `<kendo-chat>` component.
3805
+ * The template context is set to the `message` instance.
3806
+ * For more information, refer to the article on [message templates](slug:message_templates_chat).
3807
+ *
3808
+ * @example
3809
+ * ```html
3810
+ * <kendo-chat>
3811
+ * <ng-template kendoChatReceiverMessageContentTemplate let-message>
3812
+ * <div>Message: {{ message.text }}</div>
3813
+ * </ng-template>
3814
+ * </kendo-chat>
3815
+ * ```
3816
+ */
3817
+ class ReceiverMessageContentTemplateDirective {
3818
+ templateRef;
3819
+ constructor(templateRef) {
3820
+ this.templateRef = templateRef;
3821
+ }
3822
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ReceiverMessageContentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3823
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ReceiverMessageContentTemplateDirective, isStandalone: true, selector: "[kendoChatReceiverMessageContentTemplate]", ngImport: i0 });
3824
+ }
3825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ReceiverMessageContentTemplateDirective, decorators: [{
3826
+ type: Directive,
3827
+ args: [{
3828
+ selector: '[kendoChatReceiverMessageContentTemplate]',
3829
+ standalone: true
3830
+ }]
3831
+ }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
3832
+ type: Optional
3833
+ }] }] });
3834
+
3835
+ /**
3836
+ * Defines a template for displaying fully custom Chat message bubbles for the other users.
3837
+ *
3838
+ * To define a message template, nest an `<ng-template>` tag with the `kendoChatReceiverMessageTemplate` directive inside the `<kendo-chat>` component.
3839
+ * The template context is set to the `message` instance.
3840
+ * For more information, refer to the article on [message templates](slug:message_templates_chat).
3841
+ *
3842
+ * @example
3843
+ * ```html
3844
+ * <kendo-chat>
3845
+ * <ng-template kendoChatReceiverMessageTemplate let-message>
3846
+ * <div>Message: {{ message.text }}</div>
3847
+ * </ng-template>
3848
+ * </kendo-chat>
3849
+ * ```
3850
+ */
3851
+ class ReceiverMessageTemplateDirective {
3852
+ templateRef;
3853
+ constructor(templateRef) {
3854
+ this.templateRef = templateRef;
3855
+ }
3856
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ReceiverMessageTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3857
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ReceiverMessageTemplateDirective, isStandalone: true, selector: "[kendoChatReceiverMessageTemplate]", ngImport: i0 });
3858
+ }
3859
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ReceiverMessageTemplateDirective, decorators: [{
3860
+ type: Directive,
3861
+ args: [{
3862
+ selector: '[kendoChatReceiverMessageTemplate]',
3863
+ standalone: true
3864
+ }]
3865
+ }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
3866
+ type: Optional
3867
+ }] }] });
3868
+
3869
+ /**
3870
+ * Defines a template for displaying fully custom Chat message bubbles for the current user.
3871
+ *
3872
+ * To define a message template, nest an `<ng-template>` tag with the `kendoChatAuthorMessageTemplate` directive inside the `<kendo-chat>` component.
3873
+ * The template context is set to the `message` instance.
3874
+ * For more information, refer to the article on [message templates](slug:message_templates_chat).
3875
+ *
3876
+ * @example
3877
+ * ```html
3878
+ * <kendo-chat>
3879
+ * <ng-template kendoChatAuthorMessageTemplate let-message>
3880
+ * <div>Message: {{ message.text }}</div>
3881
+ * </ng-template>
3882
+ * </kendo-chat>
3883
+ * ```
3884
+ */
3885
+ class AuthorMessageTemplateDirective {
3886
+ templateRef;
3887
+ constructor(templateRef) {
3888
+ this.templateRef = templateRef;
3889
+ }
3890
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AuthorMessageTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3891
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: AuthorMessageTemplateDirective, isStandalone: true, selector: "[kendoChatAuthorMessageTemplate]", ngImport: i0 });
3892
+ }
3893
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AuthorMessageTemplateDirective, decorators: [{
3894
+ type: Directive,
3895
+ args: [{
3896
+ selector: '[kendoChatAuthorMessageTemplate]',
3897
+ standalone: true
3898
+ }]
3899
+ }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
3900
+ type: Optional
3901
+ }] }] });
3246
3902
 
3247
3903
  // eslint-disable no-forward-ref
3248
3904
  /**
@@ -3253,13 +3909,23 @@ class MessageComponent extends ChatItem {
3253
3909
  intl;
3254
3910
  chatService;
3255
3911
  localization;
3256
- message;
3912
+ cdr;
3913
+ set message(value) {
3914
+ this._message = value;
3915
+ }
3916
+ get message() {
3917
+ return this._message;
3918
+ }
3257
3919
  tabbable;
3258
- template;
3920
+ authorMessageContentTemplate;
3921
+ receiverMessageContentTemplate;
3922
+ messageContentTemplate;
3923
+ authorMessageTemplate;
3924
+ receiverMessageTemplate;
3925
+ messageTemplate;
3259
3926
  statusTemplate;
3260
3927
  showMessageTime = true;
3261
3928
  authorId;
3262
- contextMenuVisibilityChange = new EventEmitter();
3263
3929
  cssClass = true;
3264
3930
  get removedClass() {
3265
3931
  return this.message.isDeleted;
@@ -3274,44 +3940,142 @@ class MessageComponent extends ChatItem {
3274
3940
  this.onExpandableKeydown(event);
3275
3941
  }
3276
3942
  selected;
3277
- active = false;
3278
- selectOnMenuClose = false;
3279
3943
  get tabIndex() {
3280
3944
  return this.tabbable ? '0' : '-1';
3281
3945
  }
3282
- onContextMenu(event) {
3283
- if (this.message.isDeleted) {
3284
- return;
3285
- }
3286
- this.active = true;
3287
- event.stopPropagation();
3288
- }
3289
3946
  expandIcon = chevronDownIcon;
3290
3947
  collapseIcon = chevronUpIcon;
3291
3948
  downloadIcon = downloadIcon;
3292
3949
  isMessageExpanded = false;
3293
- contextMenuActions = [];
3950
+ showExpandCollapseIcon = false;
3294
3951
  fileActions = [];
3952
+ toolbarActions = [];
3295
3953
  parts = [];
3296
- constructor(element, intl, chatService, localization) {
3954
+ get useCustomBubbleTemplate() {
3955
+ return !!(this.getActiveBubbleTemplate());
3956
+ }
3957
+ get useCustomContentTemplate() {
3958
+ return !!(this.getActiveContentTemplate());
3959
+ }
3960
+ get hasMessageContent() {
3961
+ return !!(this.message?.text || this.message?.files?.length > 0);
3962
+ }
3963
+ get hasFiles() {
3964
+ return this.message?.files?.length > 0;
3965
+ }
3966
+ get hasMultipleFiles() {
3967
+ return this.message?.files?.length > 1;
3968
+ }
3969
+ get isActiveMessage() {
3970
+ return this.chatService.active && this.message?.id === this.chatService.activeMessage?.id;
3971
+ }
3972
+ get isMessageExpandable() {
3973
+ const isOwn = this.isOwnMessage(this.message);
3974
+ const messageSettings = isOwn
3975
+ ? this.chatService.authorMessageSettings
3976
+ : this.chatService.receiverMessageSettings;
3977
+ if (isPresent(messageSettings?.allowMessageCollapse)) {
3978
+ return messageSettings.allowMessageCollapse;
3979
+ }
3980
+ return this.chatService.allowMessageCollapse || false;
3981
+ }
3982
+ get showToolbar() {
3983
+ if (this.message?.isDeleted) {
3984
+ return false;
3985
+ }
3986
+ const hasComponentActions = this.chatService.messageToolbarActions?.length > 0;
3987
+ const hasMessageActions = this.toolbarActions?.length > 0;
3988
+ return hasComponentActions || hasMessageActions;
3989
+ }
3990
+ subs = new Subscription();
3991
+ _message;
3992
+ constructor(element, intl, chatService, localization, cdr) {
3297
3993
  super();
3298
3994
  this.element = element;
3299
3995
  this.intl = intl;
3300
3996
  this.chatService = chatService;
3301
3997
  this.localization = localization;
3998
+ this.cdr = cdr;
3302
3999
  }
3303
4000
  ngOnInit() {
3304
- this.contextMenuActions = this.transformActions(this.chatService.messageContextMenuActions);
3305
- this.fileActions = this.transformActions(this.chatService.fileActions);
4001
+ this.fileActions = this.getFileActions();
4002
+ this.toolbarActions = this.getToolbarActions();
4003
+ const settingsChange$ = this.isOwnMessage(this.message)
4004
+ ? this.chatService.authorMessageSettingsChange$
4005
+ : this.chatService.receiverMessageSettingsChange$;
4006
+ this.subs.add(settingsChange$.subscribe(() => {
4007
+ this.fileActions = this.getFileActions();
4008
+ this.toolbarActions = this.getToolbarActions();
4009
+ setTimeout(() => {
4010
+ this.showExpandCollapseIcon = this.calculateExpandCollapseIconVisibility();
4011
+ });
4012
+ }));
4013
+ this.subs.add(this.chatService.allowMessageCollapseChange$.subscribe(() => {
4014
+ setTimeout(() => {
4015
+ this.showExpandCollapseIcon = this.calculateExpandCollapseIconVisibility();
4016
+ });
4017
+ }));
3306
4018
  if (this.message.id) {
3307
4019
  this.chatService.registerMessageElement(this.message.id, this.element);
3308
4020
  }
3309
4021
  this.parts = this.getFormattedTextParts(this.message.text);
3310
4022
  }
4023
+ ngAfterViewInit() {
4024
+ this.showExpandCollapseIcon = this.calculateExpandCollapseIconVisibility();
4025
+ this.cdr.detectChanges();
4026
+ }
3311
4027
  ngOnDestroy() {
3312
4028
  if (this.message.id) {
3313
4029
  this.chatService.unregisterMessageElement(this.message.id);
3314
4030
  }
4031
+ this.subs.unsubscribe();
4032
+ }
4033
+ calculateExpandCollapseIconVisibility() {
4034
+ if (this.isMessageExpanded) {
4035
+ return true;
4036
+ }
4037
+ const bubbleContent = this.element.nativeElement.querySelector('.k-bubble-content');
4038
+ if (!bubbleContent) {
4039
+ return false;
4040
+ }
4041
+ const hasVerticalOverflow = bubbleContent.scrollHeight > bubbleContent.clientHeight;
4042
+ const hasHorizontalOverflow = bubbleContent.scrollWidth > bubbleContent.clientWidth;
4043
+ if (this.useCustomContentTemplate) {
4044
+ return hasVerticalOverflow || hasHorizontalOverflow;
4045
+ }
4046
+ const messageText = this.element.nativeElement.querySelector('.k-chat-bubble-text');
4047
+ const hasTextOverflow = messageText?.scrollWidth > messageText?.clientWidth;
4048
+ return hasTextOverflow || hasVerticalOverflow || hasHorizontalOverflow;
4049
+ }
4050
+ getActiveBubbleTemplate() {
4051
+ const isOwn = this.isOwnMessage(this.message);
4052
+ if (isOwn && this.authorMessageTemplate) {
4053
+ return this.authorMessageTemplate;
4054
+ }
4055
+ if (!isOwn && this.receiverMessageTemplate) {
4056
+ return this.receiverMessageTemplate;
4057
+ }
4058
+ if (this.messageTemplate) {
4059
+ return this.messageTemplate;
4060
+ }
4061
+ return null;
4062
+ }
4063
+ getActiveContentTemplate() {
4064
+ const isOwn = this.isOwnMessage(this.message);
4065
+ if (isOwn && this.authorMessageContentTemplate) {
4066
+ return this.authorMessageContentTemplate;
4067
+ }
4068
+ if (!isOwn && this.receiverMessageContentTemplate) {
4069
+ return this.receiverMessageContentTemplate;
4070
+ }
4071
+ if (this.messageContentTemplate) {
4072
+ return this.messageContentTemplate;
4073
+ }
4074
+ return null;
4075
+ }
4076
+ getDeletedMessageText() {
4077
+ const isOwn = this.isOwnMessage(this.message);
4078
+ return isOwn ? this.textFor('deletedMessageSenderText') : this.textFor('deletedMessageReceiverText');
3315
4079
  }
3316
4080
  textFor(key) {
3317
4081
  return this.localization.get(key);
@@ -3339,66 +4103,19 @@ class MessageComponent extends ChatItem {
3339
4103
  this.toggleMessageState(event);
3340
4104
  }
3341
4105
  }
3342
- isToolbarVisible() {
3343
- if (!this.chatService.messageToolbarActions || this.chatService.messageToolbarActions.length === 0 || this.message.isDeleted) {
3344
- return false;
3345
- }
3346
- return this.chatService.messageToolbarVisibility === 'always';
3347
- }
3348
4106
  onToolbarAction(event, action, message) {
3349
4107
  event.stopImmediatePropagation();
3350
4108
  this.chatService.emit('toolbarAction', { action, message });
3351
4109
  }
3352
- onContextMenuAction(action) {
3353
- if (action.id === 'reply') {
3354
- this.chatService.reply = this.message;
3355
- }
3356
- if (action.id === 'copy') {
3357
- navigator.clipboard.writeText(this.message.text);
3358
- }
3359
- this.chatService.emit('contextMenuAction', { action, message: this.message });
3360
- }
3361
4110
  onFileAction(action, file) {
3362
4111
  if (action.originalAction.id === 'download') {
3363
4112
  this.chatService.emit('fileDownload', { files: [file], message: this.message });
3364
4113
  }
3365
4114
  this.chatService.emit('fileAction', { action: action.originalAction, file });
3366
4115
  }
3367
- transformActions(actions) {
3368
- return actions.map(action => ({
3369
- text: action.label,
3370
- icon: action.icon,
3371
- svgIcon: action.svgIcon,
3372
- disabled: action.disabled,
3373
- originalAction: action
3374
- }));
3375
- }
3376
4116
  getMessageById(id) {
3377
4117
  return this.chatService.getMessageById(id);
3378
4118
  }
3379
- // processes the message text to extract parts that are either plain text or links
3380
- // this allows us not to render an additional wrapper element for the text
3381
- getFormattedTextParts(text) {
3382
- if (!text) {
3383
- return [];
3384
- }
3385
- const parts = [];
3386
- const urlMatches = Array.from(text.matchAll(URL_REGEX));
3387
- let lastIndex = 0;
3388
- for (const match of urlMatches) {
3389
- const url = match[1];
3390
- const matchStart = match.index;
3391
- if (matchStart > lastIndex) {
3392
- parts.push({ type: 'text', content: text.substring(lastIndex, matchStart) });
3393
- }
3394
- parts.push({ type: 'link', content: url, href: url });
3395
- lastIndex = matchStart + match[0].length;
3396
- }
3397
- if (lastIndex < text.length) {
3398
- parts.push({ type: 'text', content: text.substring(lastIndex) });
3399
- }
3400
- return parts;
3401
- }
3402
4119
  onReplyReferenceClick(event, replyToId) {
3403
4120
  event.stopPropagation();
3404
4121
  this.chatService.emit('replyReferenceClick', replyToId);
@@ -3406,11 +4123,13 @@ class MessageComponent extends ChatItem {
3406
4123
  handleMenuClose(event) {
3407
4124
  if (event) {
3408
4125
  const originalEvent = event.originalEvent;
3409
- originalEvent && this.onActionButtonClick(originalEvent);
4126
+ if (originalEvent) {
4127
+ this.onActionButtonClick(originalEvent);
4128
+ }
3410
4129
  }
3411
- this.active = false;
3412
- this.contextMenuVisibilityChange.emit(false);
3413
- if (this.selectOnMenuClose) {
4130
+ this.chatService.active = false;
4131
+ this.chatService.emit('contextMenuVisibilityChange', false);
4132
+ if (this.chatService.selectOnMenuClose) {
3414
4133
  this.selected = true;
3415
4134
  this.focus();
3416
4135
  }
@@ -3419,16 +4138,16 @@ class MessageComponent extends ChatItem {
3419
4138
  const clickOutsideMessage = event instanceof MouseEvent && !event.target?.closest('.k-chat-bubble');
3420
4139
  const menuItemClick = event instanceof MouseEvent && event.target?.closest(MENU_ITEM_SELECTOR);
3421
4140
  if (clickOutsideMessage && !menuItemClick) {
3422
- this.selectOnMenuClose = false;
4141
+ this.chatService.selectOnMenuClose = false;
3423
4142
  }
3424
4143
  }
3425
4144
  handleMenuOpen() {
3426
- this.selectOnMenuClose = this.selected;
3427
- this.contextMenuVisibilityChange.emit(true);
4145
+ this.chatService.selectOnMenuClose = this.selected;
4146
+ this.chatService.emit('contextMenuVisibilityChange', true);
3428
4147
  }
3429
4148
  onActionPopupChange(expanded) {
3430
4149
  if (expanded) {
3431
- this.active = true;
4150
+ this.chatService.active = true;
3432
4151
  this.handleMenuOpen();
3433
4152
  }
3434
4153
  else {
@@ -3438,124 +4157,211 @@ class MessageComponent extends ChatItem {
3438
4157
  isOwnMessage(msg) {
3439
4158
  return isAuthor(this.authorId, msg);
3440
4159
  }
3441
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.IntlService }, { token: ChatService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
3442
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MessageComponent, isStandalone: true, selector: "kendo-chat-message", inputs: { message: "message", tabbable: "tabbable", template: "template", statusTemplate: "statusTemplate", showMessageTime: "showMessageTime", authorId: "authorId" }, outputs: { contextMenuVisibilityChange: "contextMenuVisibilityChange" }, host: { listeners: { "keydown": "onKeyDown($event)", "contextmenu": "onContextMenu($event)" }, properties: { "class.k-message": "this.cssClass", "class.k-message-removed": "this.removedClass", "attr.tabIndex": "this.tabIndex" } }, providers: [
4160
+ getFormattedTextParts(text) {
4161
+ if (!text) {
4162
+ return [];
4163
+ }
4164
+ const parts = [];
4165
+ const urlMatches = Array.from(text.matchAll(URL_REGEX));
4166
+ let lastIndex = 0;
4167
+ for (const match of urlMatches) {
4168
+ const url = match[1];
4169
+ const matchStart = match.index;
4170
+ if (!isPresent(matchStart)) {
4171
+ continue;
4172
+ }
4173
+ if (matchStart > lastIndex) {
4174
+ parts.push({ type: 'text', content: text.substring(lastIndex, matchStart) });
4175
+ }
4176
+ parts.push({ type: 'link', content: url, href: url });
4177
+ lastIndex = matchStart + match[0].length;
4178
+ }
4179
+ if (lastIndex < text.length) {
4180
+ parts.push({ type: 'text', content: text.substring(lastIndex) });
4181
+ }
4182
+ return parts;
4183
+ }
4184
+ getMessageSettings() {
4185
+ return this.isOwnMessage(this.message)
4186
+ ? this.chatService.authorMessageSettings
4187
+ : this.chatService.receiverMessageSettings;
4188
+ }
4189
+ getToolbarActions() {
4190
+ const messageSettings = this.getMessageSettings();
4191
+ return messageSettings?.messageToolbarActions?.length
4192
+ ? messageSettings.messageToolbarActions
4193
+ : this.chatService.messageToolbarActions || [];
4194
+ }
4195
+ getFileActions() {
4196
+ const messageSettings = this.getMessageSettings();
4197
+ const actions = messageSettings?.fileActions?.length
4198
+ ? messageSettings.fileActions
4199
+ : this.chatService.fileActions || [];
4200
+ return transformActions(actions);
4201
+ }
4202
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.IntlService }, { token: ChatService }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
4203
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: MessageComponent, isStandalone: true, selector: "kendo-chat-message", inputs: { message: "message", tabbable: "tabbable", authorMessageContentTemplate: "authorMessageContentTemplate", receiverMessageContentTemplate: "receiverMessageContentTemplate", messageContentTemplate: "messageContentTemplate", authorMessageTemplate: "authorMessageTemplate", receiverMessageTemplate: "receiverMessageTemplate", messageTemplate: "messageTemplate", statusTemplate: "statusTemplate", showMessageTime: "showMessageTime", authorId: "authorId" }, host: { listeners: { "keydown": "onKeyDown($event)" }, properties: { "class.k-message": "this.cssClass", "class.k-message-removed": "this.removedClass", "attr.tabIndex": "this.tabIndex" } }, providers: [
3443
4204
  {
3444
4205
  provide: ChatItem,
3445
4206
  useExisting: forwardRef(() => MessageComponent)
3446
4207
  }
3447
4208
  ], usesInheritance: true, ngImport: i0, template: `
3448
- <time
3449
- [attr.aria-hidden]="!selected"
3450
- class="k-message-time"
3451
- *ngIf="message.timestamp"
3452
- >
3453
- {{ formatTimeStamp(message.timestamp) }}
3454
- </time>
3455
-
3456
- <ng-container *ngIf="!message.typing; else typing">
3457
- <div
3458
- class="k-chat-bubble k-bubble"
3459
- *ngIf="template"
3460
- [attr.tabindex]="0"
3461
- [ngClass]="{
3462
- 'k-selected': selected,
3463
- 'k-focus': selected,
3464
- 'k-active': active
3465
- }"
3466
- >
3467
- <div class="k-bubble-content">
3468
- <ng-container
3469
- *ngTemplateOutlet="template.templateRef; context: { $implicit: message };"
3470
- >
3471
- </ng-container>
3472
- </div>
3473
- </div>
4209
+ <ng-container *ngIf="useCustomBubbleTemplate">
4210
+ <ng-container *ngTemplateOutlet="getActiveBubbleTemplate()?.templateRef; context: { $implicit: message };"></ng-container>
4211
+ </ng-container>
3474
4212
 
3475
- <div
3476
- class="k-chat-bubble k-bubble"
3477
- *ngIf="!template && (message.text || message.files)"
3478
- [attr.tabindex]="0"
3479
- [ngClass]="{
3480
- 'k-bubble-expandable': chatService.allowMessageCollapse,
3481
- 'k-expanded': isMessageExpanded,
3482
- 'k-selected': selected,
3483
- 'k-focus': selected,
3484
- 'k-active': active
3485
- }"
4213
+ <ng-container *ngIf="!useCustomBubbleTemplate">
4214
+ <time
4215
+ [attr.aria-hidden]="!selected"
4216
+ class="k-message-time"
4217
+ *ngIf="message.timestamp"
3486
4218
  >
3487
- <div class="k-bubble-content">
3488
- <span class="k-chat-bubble-text" *ngIf="message.text || message.isDeleted">
3489
- <div class="k-message-reference k-message-reference-receiver" *ngIf="message.replyToId && !message.isDeleted" (click)="onReplyReferenceClick($event, message.replyToId)">
3490
- <chat-message-reference-content [message]="getMessageById(message.replyToId)"></chat-message-reference-content>
3491
- </div>
3492
- <ng-container *ngIf="message.isDeleted && isOwnMessage(message)">{{ textFor('deletedMessageSenderText') }}</ng-container>
3493
- <ng-container *ngIf="message.isDeleted && !isOwnMessage(message)">{{ textFor('deletedMessageReceiverText') }}</ng-container>
3494
- <ng-container *ngIf="!message.isDeleted && parts.length">
3495
- <ng-container *ngFor="let part of parts">
3496
- <ng-container *ngIf="part.type === 'text'">{{part.content}}</ng-container>
3497
- <a *ngIf="part.type === 'link'" [href]="part.href" target="_blank">{{part.content}}</a>
3498
- </ng-container>
3499
- </ng-container>
3500
- </span>
3501
- <ul class="k-chat-file-wrapper" *ngIf="message.files && message.files.length > 0">
3502
- <li
3503
- *ngFor="let file of message.files"
3504
- class="k-chat-file"
3505
- [chatFile]="file"
3506
- [fileActions]="fileActions"
3507
- (actionClick)="onFileAction($event, file)"
3508
- (actionsToggle)="onActionPopupChange($event)"
3509
- (actionButtonClick)="onActionButtonClick($event)"
3510
- ></li>
3511
- </ul>
3512
- <div class="k-chat-download-button-wrapper" *ngIf="message.files?.length > 1">
3513
- <button
3514
- kendoButton
3515
- class="k-chat-download-button"
3516
- fillMode="flat"
3517
- icon="download"
3518
- [svgIcon]="downloadIcon"
3519
- (click)="onDownloadAll()"
3520
- >{{ textFor('downloadAllFilesText') }}</button>
4219
+ {{ formatTimeStamp(message.timestamp) }}
4220
+ </time>
4221
+
4222
+ <ng-container *ngIf="message.typing">
4223
+ <div class="k-chat-bubble k-bubble">
4224
+ <div class="k-typing-indicator" [attr.tabindex]="'-1'">
4225
+ <span></span>
4226
+ <span></span>
4227
+ <span></span>
3521
4228
  </div>
3522
4229
  </div>
3523
- <span
3524
- class="k-bubble-expandable-indicator"
3525
- *ngIf="chatService.allowMessageCollapse"
3526
- [attr.role]="'button'"
3527
- [attr.title]="isMessageExpanded ? textFor('collapseTitle') : textFor('expandTitle')"
3528
- (mousedown)="chatService.toggleMessageState = true"
3529
- (click)="toggleMessageState($event)"
4230
+ </ng-container>
4231
+
4232
+ <ng-container *ngIf="!message.typing">
4233
+ <div
4234
+ class="k-chat-bubble k-bubble"
4235
+ *ngIf="useCustomContentTemplate"
4236
+ [attr.tabindex]="0"
4237
+ [ngClass]="{
4238
+ 'k-bubble-expandable': isMessageExpandable,
4239
+ 'k-expanded': isMessageExpanded,
4240
+ 'k-selected': selected,
4241
+ 'k-focus': selected,
4242
+ 'k-active': isActiveMessage
4243
+ }"
3530
4244
  >
3531
- <kendo-icon-wrapper
3532
- [name]="isMessageExpanded ? 'chevron-up' : 'chevron-down'"
3533
- [svgIcon]="isMessageExpanded ? collapseIcon : expandIcon"
4245
+ <div class="k-bubble-content">
4246
+ <ng-container *ngTemplateOutlet="getActiveContentTemplate()?.templateRef; context: { $implicit: message };"></ng-container>
4247
+ </div>
4248
+ <span
4249
+ class="k-bubble-expandable-indicator"
4250
+ *ngIf="isMessageExpandable && showExpandCollapseIcon"
4251
+ [attr.tabindex]="'0'"
4252
+ [attr.role]="'button'"
4253
+ [attr.title]="isMessageExpanded ? textFor('collapseTitle') : textFor('expandTitle')"
4254
+ (mousedown)="chatService.toggleMessageState = true"
4255
+ (click)="toggleMessageState($event)"
3534
4256
  >
3535
- </kendo-icon-wrapper>
3536
- </span>
3537
- </div>
3538
- </ng-container>
4257
+ <kendo-icon-wrapper
4258
+ [name]="isMessageExpanded ? 'chevron-up' : 'chevron-down'"
4259
+ [svgIcon]="isMessageExpanded ? collapseIcon : expandIcon"
4260
+ >
4261
+ </kendo-icon-wrapper>
4262
+ </span>
4263
+ </div>
3539
4264
 
3540
- <span
3541
- class="k-message-status"
3542
- *ngIf="message.status"
3543
- >
3544
- <ng-container *ngIf="statusTemplate?.templateRef">
3545
- <ng-template
3546
- [ngTemplateOutlet]="statusTemplate.templateRef"
3547
- [ngTemplateOutletContext]="{ $implicit: message.status, message }"
4265
+ <div
4266
+ class="k-chat-bubble k-bubble"
4267
+ *ngIf="!useCustomContentTemplate && hasMessageContent"
4268
+ [attr.tabindex]="0"
4269
+ [ngClass]="{
4270
+ 'k-bubble-expandable': isMessageExpandable,
4271
+ 'k-expanded': isMessageExpanded,
4272
+ 'k-selected': selected,
4273
+ 'k-focus': selected,
4274
+ 'k-active': isActiveMessage
4275
+ }"
3548
4276
  >
3549
- </ng-template>
3550
- </ng-container>
3551
- <ng-container *ngIf="!statusTemplate?.templateRef">
3552
- {{ message.status }}
4277
+ <div class="k-bubble-content">
4278
+ <ng-container *ngIf="message.text || message.isDeleted">
4279
+ <div
4280
+ class="k-message-reference k-message-reference-receiver"
4281
+ *ngIf="message.replyToId && !message.isDeleted"
4282
+ (click)="onReplyReferenceClick($event, message.replyToId)"
4283
+ >
4284
+ <chat-message-reference-content [message]="getMessageById(message.replyToId)"></chat-message-reference-content>
4285
+ </div>
4286
+
4287
+ <span class="k-chat-bubble-text" *ngIf="message.isDeleted">
4288
+ {{ getDeletedMessageText() }}
4289
+ </span>
4290
+
4291
+ <span class="k-chat-bubble-text" *ngIf="!message.isDeleted && parts.length > 0">
4292
+ <ng-container *ngFor="let part of parts">
4293
+ <ng-container *ngIf="part.type === 'text'">{{part.content}}</ng-container>
4294
+ <a *ngIf="part.type === 'link'" [href]="part.href" target="_blank">{{part.content}}</a>
4295
+ </ng-container>
4296
+ </span>
4297
+ </ng-container>
4298
+
4299
+ <ul
4300
+ class="k-chat-file-wrapper"
4301
+ *ngIf="hasFiles && !message.isDeleted"
4302
+ [ngClass]="{
4303
+ 'k-chat-files-wrap': chatService.messageFilesLayout === 'wrap',
4304
+ 'k-chat-files-horizontal': chatService.messageFilesLayout === 'horizontal'
4305
+ }"
4306
+ >
4307
+ <li
4308
+ *ngFor="let file of message.files"
4309
+ class="k-chat-file"
4310
+ [chatFile]="file"
4311
+ [fileActions]="fileActions"
4312
+ (actionClick)="onFileAction($event, file)"
4313
+ (actionsToggle)="onActionPopupChange($event)"
4314
+ (actionButtonClick)="onActionButtonClick($event)"
4315
+ ></li>
4316
+ </ul>
4317
+
4318
+ <div class="k-chat-download-button-wrapper" *ngIf="hasMultipleFiles && !message.isDeleted">
4319
+ <button
4320
+ kendoButton
4321
+ class="k-chat-download-button"
4322
+ fillMode="flat"
4323
+ icon="download"
4324
+ [svgIcon]="downloadIcon"
4325
+ [attr.title]="textFor('downloadAllFilesText')"
4326
+ (click)="onDownloadAll()"
4327
+ >{{ textFor('downloadAllFilesText') }}</button>
4328
+ </div>
4329
+ </div>
4330
+
4331
+ <span
4332
+ class="k-bubble-expandable-indicator"
4333
+ *ngIf="isMessageExpandable && showExpandCollapseIcon"
4334
+ [attr.tabindex]="'0'"
4335
+ [attr.role]="'button'"
4336
+ [attr.title]="isMessageExpanded ? textFor('collapseTitle') : textFor('expandTitle')"
4337
+ (mousedown)="chatService.toggleMessageState = true"
4338
+ (click)="toggleMessageState($event)"
4339
+ >
4340
+ <kendo-icon-wrapper
4341
+ [name]="isMessageExpanded ? 'chevron-up' : 'chevron-down'"
4342
+ [svgIcon]="isMessageExpanded ? collapseIcon : expandIcon"
4343
+ >
4344
+ </kendo-icon-wrapper>
4345
+ </span>
4346
+ </div>
3553
4347
  </ng-container>
3554
- </span>
3555
4348
 
3556
- <kendo-toolbar *ngIf="isToolbarVisible()" class="k-chat-message-toolbar" fillMode="flat">
4349
+ <span class="k-message-status" *ngIf="message.status">
4350
+ <ng-container *ngIf="statusTemplate?.templateRef">
4351
+ <ng-template
4352
+ [ngTemplateOutlet]="statusTemplate.templateRef"
4353
+ [ngTemplateOutletContext]="{ $implicit: message.status, message }"
4354
+ >
4355
+ </ng-template>
4356
+ </ng-container>
4357
+ <ng-container *ngIf="!statusTemplate?.templateRef">
4358
+ {{ message.status }}
4359
+ </ng-container>
4360
+ </span>
4361
+ </ng-container>
4362
+ <kendo-toolbar *ngIf="showToolbar" class="k-chat-message-toolbar" fillMode="flat">
3557
4363
  <kendo-toolbar-button
3558
- *ngFor="let action of chatService.messageToolbarActions"
4364
+ *ngFor="let action of toolbarActions"
3559
4365
  fillMode="flat"
3560
4366
  [icon]="action.icon"
3561
4367
  [svgIcon]="action.svgIcon"
@@ -3565,30 +4371,9 @@ class MessageComponent extends ChatItem {
3565
4371
  >
3566
4372
  </kendo-toolbar-button>
3567
4373
  </kendo-toolbar>
3568
-
3569
- <ng-template #typing>
3570
- <div class="k-chat-bubble k-bubble">
3571
- <div class="k-typing-indicator">
3572
- <span></span>
3573
- <span></span>
3574
- <span></span>
3575
- </div>
3576
- </div>
3577
- </ng-template>
3578
-
3579
- <kendo-contextmenu
3580
- *ngIf="!message.isDeleted"
3581
- [target]="element"
3582
- [items]="contextMenuActions"
3583
- (popupOpen)="handleMenuOpen()"
3584
- (popupClose)="handleMenuClose($event)"
3585
- (select)="onContextMenuAction($event.item.originalAction)"
3586
- [popupAlign]="{ horizontal: 'right', vertical: 'top' }"
3587
- [collision]="{ horizontal: 'flip', vertical: 'flip'}"
3588
- ></kendo-contextmenu>
3589
- `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: i2.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: ChatFileComponent, selector: "li[chatFile]", inputs: ["chatFile", "removable", "fileActions"], outputs: ["remove", "actionClick", "actionsToggle", "actionButtonClick"] }, { kind: "component", type: ContextMenuComponent, selector: "kendo-contextmenu", inputs: ["showOn", "target", "filter", "alignToAnchor", "vertical", "popupAnimate", "popupAlign", "anchorAlign", "collision", "appendTo", "ariaLabel"], outputs: ["popupOpen", "popupClose", "select", "open", "close"], exportAs: ["kendoContextMenu"] }, { kind: "component", type: ToolBarComponent, selector: "kendo-toolbar", inputs: ["overflow", "resizable", "popupSettings", "fillMode", "tabindex", "size", "tabIndex", "showIcon", "showText"], outputs: ["open", "close"], exportAs: ["kendoToolBar"] }, { kind: "component", type: ToolBarButtonComponent, selector: "kendo-toolbar-button", inputs: ["showText", "showIcon", "text", "style", "className", "title", "disabled", "toggleable", "look", "togglable", "selected", "fillMode", "rounded", "themeColor", "icon", "iconClass", "svgIcon", "imageUrl"], outputs: ["click", "pointerdown", "selectedChange"], exportAs: ["kendoToolBarButton"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }] });
4374
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: i2.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: ChatFileComponent, selector: "li[chatFile]", inputs: ["chatFile", "removable", "fileActions"], outputs: ["remove", "actionClick", "actionsToggle", "actionButtonClick"] }, { kind: "component", type: ToolBarComponent, selector: "kendo-toolbar", inputs: ["overflow", "resizable", "popupSettings", "fillMode", "tabindex", "size", "tabIndex", "showIcon", "showText"], outputs: ["open", "close"], exportAs: ["kendoToolBar"] }, { kind: "component", type: ToolBarButtonComponent, selector: "kendo-toolbar-button", inputs: ["showText", "showIcon", "text", "style", "className", "title", "disabled", "toggleable", "look", "togglable", "selected", "fillMode", "rounded", "themeColor", "icon", "iconClass", "svgIcon", "imageUrl"], outputs: ["click", "pointerdown", "selectedChange"], exportAs: ["kendoToolBarButton"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }] });
3590
4375
  }
3591
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageComponent, decorators: [{
4376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageComponent, decorators: [{
3592
4377
  type: Component,
3593
4378
  args: [{
3594
4379
  selector: 'kendo-chat-message',
@@ -3599,117 +4384,162 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3599
4384
  }
3600
4385
  ],
3601
4386
  template: `
3602
- <time
3603
- [attr.aria-hidden]="!selected"
3604
- class="k-message-time"
3605
- *ngIf="message.timestamp"
3606
- >
3607
- {{ formatTimeStamp(message.timestamp) }}
3608
- </time>
3609
-
3610
- <ng-container *ngIf="!message.typing; else typing">
3611
- <div
3612
- class="k-chat-bubble k-bubble"
3613
- *ngIf="template"
3614
- [attr.tabindex]="0"
3615
- [ngClass]="{
3616
- 'k-selected': selected,
3617
- 'k-focus': selected,
3618
- 'k-active': active
3619
- }"
3620
- >
3621
- <div class="k-bubble-content">
3622
- <ng-container
3623
- *ngTemplateOutlet="template.templateRef; context: { $implicit: message };"
3624
- >
3625
- </ng-container>
3626
- </div>
3627
- </div>
4387
+ <ng-container *ngIf="useCustomBubbleTemplate">
4388
+ <ng-container *ngTemplateOutlet="getActiveBubbleTemplate()?.templateRef; context: { $implicit: message };"></ng-container>
4389
+ </ng-container>
3628
4390
 
3629
- <div
3630
- class="k-chat-bubble k-bubble"
3631
- *ngIf="!template && (message.text || message.files)"
3632
- [attr.tabindex]="0"
3633
- [ngClass]="{
3634
- 'k-bubble-expandable': chatService.allowMessageCollapse,
3635
- 'k-expanded': isMessageExpanded,
3636
- 'k-selected': selected,
3637
- 'k-focus': selected,
3638
- 'k-active': active
3639
- }"
4391
+ <ng-container *ngIf="!useCustomBubbleTemplate">
4392
+ <time
4393
+ [attr.aria-hidden]="!selected"
4394
+ class="k-message-time"
4395
+ *ngIf="message.timestamp"
3640
4396
  >
3641
- <div class="k-bubble-content">
3642
- <span class="k-chat-bubble-text" *ngIf="message.text || message.isDeleted">
3643
- <div class="k-message-reference k-message-reference-receiver" *ngIf="message.replyToId && !message.isDeleted" (click)="onReplyReferenceClick($event, message.replyToId)">
3644
- <chat-message-reference-content [message]="getMessageById(message.replyToId)"></chat-message-reference-content>
3645
- </div>
3646
- <ng-container *ngIf="message.isDeleted && isOwnMessage(message)">{{ textFor('deletedMessageSenderText') }}</ng-container>
3647
- <ng-container *ngIf="message.isDeleted && !isOwnMessage(message)">{{ textFor('deletedMessageReceiverText') }}</ng-container>
3648
- <ng-container *ngIf="!message.isDeleted && parts.length">
3649
- <ng-container *ngFor="let part of parts">
3650
- <ng-container *ngIf="part.type === 'text'">{{part.content}}</ng-container>
3651
- <a *ngIf="part.type === 'link'" [href]="part.href" target="_blank">{{part.content}}</a>
3652
- </ng-container>
3653
- </ng-container>
3654
- </span>
3655
- <ul class="k-chat-file-wrapper" *ngIf="message.files && message.files.length > 0">
3656
- <li
3657
- *ngFor="let file of message.files"
3658
- class="k-chat-file"
3659
- [chatFile]="file"
3660
- [fileActions]="fileActions"
3661
- (actionClick)="onFileAction($event, file)"
3662
- (actionsToggle)="onActionPopupChange($event)"
3663
- (actionButtonClick)="onActionButtonClick($event)"
3664
- ></li>
3665
- </ul>
3666
- <div class="k-chat-download-button-wrapper" *ngIf="message.files?.length > 1">
3667
- <button
3668
- kendoButton
3669
- class="k-chat-download-button"
3670
- fillMode="flat"
3671
- icon="download"
3672
- [svgIcon]="downloadIcon"
3673
- (click)="onDownloadAll()"
3674
- >{{ textFor('downloadAllFilesText') }}</button>
4397
+ {{ formatTimeStamp(message.timestamp) }}
4398
+ </time>
4399
+
4400
+ <ng-container *ngIf="message.typing">
4401
+ <div class="k-chat-bubble k-bubble">
4402
+ <div class="k-typing-indicator" [attr.tabindex]="'-1'">
4403
+ <span></span>
4404
+ <span></span>
4405
+ <span></span>
3675
4406
  </div>
3676
4407
  </div>
3677
- <span
3678
- class="k-bubble-expandable-indicator"
3679
- *ngIf="chatService.allowMessageCollapse"
3680
- [attr.role]="'button'"
3681
- [attr.title]="isMessageExpanded ? textFor('collapseTitle') : textFor('expandTitle')"
3682
- (mousedown)="chatService.toggleMessageState = true"
3683
- (click)="toggleMessageState($event)"
4408
+ </ng-container>
4409
+
4410
+ <ng-container *ngIf="!message.typing">
4411
+ <div
4412
+ class="k-chat-bubble k-bubble"
4413
+ *ngIf="useCustomContentTemplate"
4414
+ [attr.tabindex]="0"
4415
+ [ngClass]="{
4416
+ 'k-bubble-expandable': isMessageExpandable,
4417
+ 'k-expanded': isMessageExpanded,
4418
+ 'k-selected': selected,
4419
+ 'k-focus': selected,
4420
+ 'k-active': isActiveMessage
4421
+ }"
3684
4422
  >
3685
- <kendo-icon-wrapper
3686
- [name]="isMessageExpanded ? 'chevron-up' : 'chevron-down'"
3687
- [svgIcon]="isMessageExpanded ? collapseIcon : expandIcon"
4423
+ <div class="k-bubble-content">
4424
+ <ng-container *ngTemplateOutlet="getActiveContentTemplate()?.templateRef; context: { $implicit: message };"></ng-container>
4425
+ </div>
4426
+ <span
4427
+ class="k-bubble-expandable-indicator"
4428
+ *ngIf="isMessageExpandable && showExpandCollapseIcon"
4429
+ [attr.tabindex]="'0'"
4430
+ [attr.role]="'button'"
4431
+ [attr.title]="isMessageExpanded ? textFor('collapseTitle') : textFor('expandTitle')"
4432
+ (mousedown)="chatService.toggleMessageState = true"
4433
+ (click)="toggleMessageState($event)"
3688
4434
  >
3689
- </kendo-icon-wrapper>
3690
- </span>
3691
- </div>
3692
- </ng-container>
4435
+ <kendo-icon-wrapper
4436
+ [name]="isMessageExpanded ? 'chevron-up' : 'chevron-down'"
4437
+ [svgIcon]="isMessageExpanded ? collapseIcon : expandIcon"
4438
+ >
4439
+ </kendo-icon-wrapper>
4440
+ </span>
4441
+ </div>
3693
4442
 
3694
- <span
3695
- class="k-message-status"
3696
- *ngIf="message.status"
3697
- >
3698
- <ng-container *ngIf="statusTemplate?.templateRef">
3699
- <ng-template
3700
- [ngTemplateOutlet]="statusTemplate.templateRef"
3701
- [ngTemplateOutletContext]="{ $implicit: message.status, message }"
4443
+ <div
4444
+ class="k-chat-bubble k-bubble"
4445
+ *ngIf="!useCustomContentTemplate && hasMessageContent"
4446
+ [attr.tabindex]="0"
4447
+ [ngClass]="{
4448
+ 'k-bubble-expandable': isMessageExpandable,
4449
+ 'k-expanded': isMessageExpanded,
4450
+ 'k-selected': selected,
4451
+ 'k-focus': selected,
4452
+ 'k-active': isActiveMessage
4453
+ }"
3702
4454
  >
3703
- </ng-template>
3704
- </ng-container>
3705
- <ng-container *ngIf="!statusTemplate?.templateRef">
3706
- {{ message.status }}
4455
+ <div class="k-bubble-content">
4456
+ <ng-container *ngIf="message.text || message.isDeleted">
4457
+ <div
4458
+ class="k-message-reference k-message-reference-receiver"
4459
+ *ngIf="message.replyToId && !message.isDeleted"
4460
+ (click)="onReplyReferenceClick($event, message.replyToId)"
4461
+ >
4462
+ <chat-message-reference-content [message]="getMessageById(message.replyToId)"></chat-message-reference-content>
4463
+ </div>
4464
+
4465
+ <span class="k-chat-bubble-text" *ngIf="message.isDeleted">
4466
+ {{ getDeletedMessageText() }}
4467
+ </span>
4468
+
4469
+ <span class="k-chat-bubble-text" *ngIf="!message.isDeleted && parts.length > 0">
4470
+ <ng-container *ngFor="let part of parts">
4471
+ <ng-container *ngIf="part.type === 'text'">{{part.content}}</ng-container>
4472
+ <a *ngIf="part.type === 'link'" [href]="part.href" target="_blank">{{part.content}}</a>
4473
+ </ng-container>
4474
+ </span>
4475
+ </ng-container>
4476
+
4477
+ <ul
4478
+ class="k-chat-file-wrapper"
4479
+ *ngIf="hasFiles && !message.isDeleted"
4480
+ [ngClass]="{
4481
+ 'k-chat-files-wrap': chatService.messageFilesLayout === 'wrap',
4482
+ 'k-chat-files-horizontal': chatService.messageFilesLayout === 'horizontal'
4483
+ }"
4484
+ >
4485
+ <li
4486
+ *ngFor="let file of message.files"
4487
+ class="k-chat-file"
4488
+ [chatFile]="file"
4489
+ [fileActions]="fileActions"
4490
+ (actionClick)="onFileAction($event, file)"
4491
+ (actionsToggle)="onActionPopupChange($event)"
4492
+ (actionButtonClick)="onActionButtonClick($event)"
4493
+ ></li>
4494
+ </ul>
4495
+
4496
+ <div class="k-chat-download-button-wrapper" *ngIf="hasMultipleFiles && !message.isDeleted">
4497
+ <button
4498
+ kendoButton
4499
+ class="k-chat-download-button"
4500
+ fillMode="flat"
4501
+ icon="download"
4502
+ [svgIcon]="downloadIcon"
4503
+ [attr.title]="textFor('downloadAllFilesText')"
4504
+ (click)="onDownloadAll()"
4505
+ >{{ textFor('downloadAllFilesText') }}</button>
4506
+ </div>
4507
+ </div>
4508
+
4509
+ <span
4510
+ class="k-bubble-expandable-indicator"
4511
+ *ngIf="isMessageExpandable && showExpandCollapseIcon"
4512
+ [attr.tabindex]="'0'"
4513
+ [attr.role]="'button'"
4514
+ [attr.title]="isMessageExpanded ? textFor('collapseTitle') : textFor('expandTitle')"
4515
+ (mousedown)="chatService.toggleMessageState = true"
4516
+ (click)="toggleMessageState($event)"
4517
+ >
4518
+ <kendo-icon-wrapper
4519
+ [name]="isMessageExpanded ? 'chevron-up' : 'chevron-down'"
4520
+ [svgIcon]="isMessageExpanded ? collapseIcon : expandIcon"
4521
+ >
4522
+ </kendo-icon-wrapper>
4523
+ </span>
4524
+ </div>
3707
4525
  </ng-container>
3708
- </span>
3709
4526
 
3710
- <kendo-toolbar *ngIf="isToolbarVisible()" class="k-chat-message-toolbar" fillMode="flat">
4527
+ <span class="k-message-status" *ngIf="message.status">
4528
+ <ng-container *ngIf="statusTemplate?.templateRef">
4529
+ <ng-template
4530
+ [ngTemplateOutlet]="statusTemplate.templateRef"
4531
+ [ngTemplateOutletContext]="{ $implicit: message.status, message }"
4532
+ >
4533
+ </ng-template>
4534
+ </ng-container>
4535
+ <ng-container *ngIf="!statusTemplate?.templateRef">
4536
+ {{ message.status }}
4537
+ </ng-container>
4538
+ </span>
4539
+ </ng-container>
4540
+ <kendo-toolbar *ngIf="showToolbar" class="k-chat-message-toolbar" fillMode="flat">
3711
4541
  <kendo-toolbar-button
3712
- *ngFor="let action of chatService.messageToolbarActions"
4542
+ *ngFor="let action of toolbarActions"
3713
4543
  fillMode="flat"
3714
4544
  [icon]="action.icon"
3715
4545
  [svgIcon]="action.svgIcon"
@@ -3719,36 +4549,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3719
4549
  >
3720
4550
  </kendo-toolbar-button>
3721
4551
  </kendo-toolbar>
3722
-
3723
- <ng-template #typing>
3724
- <div class="k-chat-bubble k-bubble">
3725
- <div class="k-typing-indicator">
3726
- <span></span>
3727
- <span></span>
3728
- <span></span>
3729
- </div>
3730
- </div>
3731
- </ng-template>
3732
-
3733
- <kendo-contextmenu
3734
- *ngIf="!message.isDeleted"
3735
- [target]="element"
3736
- [items]="contextMenuActions"
3737
- (popupOpen)="handleMenuOpen()"
3738
- (popupClose)="handleMenuClose($event)"
3739
- (select)="onContextMenuAction($event.item.originalAction)"
3740
- [popupAlign]="{ horizontal: 'right', vertical: 'top' }"
3741
- [collision]="{ horizontal: 'flip', vertical: 'flip'}"
3742
- ></kendo-contextmenu>
3743
4552
  `,
3744
4553
  standalone: true,
3745
- imports: [NgIf, NgClass, NgFor, NgTemplateOutlet, IconWrapperComponent, KENDO_BUTTONS, ChatFileComponent, ContextMenuComponent, ToolBarComponent, ToolBarButtonComponent, MessageReferenceComponent],
4554
+ imports: [NgIf, NgClass, NgFor, NgTemplateOutlet, IconWrapperComponent, KENDO_BUTTONS, ChatFileComponent, ToolBarComponent, ToolBarButtonComponent, MessageReferenceComponent],
3746
4555
  }]
3747
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.IntlService }, { type: ChatService }, { type: i1.LocalizationService }]; }, propDecorators: { message: [{
4556
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.IntlService }, { type: ChatService }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }], propDecorators: { message: [{
3748
4557
  type: Input
3749
4558
  }], tabbable: [{
3750
4559
  type: Input
3751
- }], template: [{
4560
+ }], authorMessageContentTemplate: [{
4561
+ type: Input
4562
+ }], receiverMessageContentTemplate: [{
4563
+ type: Input
4564
+ }], messageContentTemplate: [{
4565
+ type: Input
4566
+ }], authorMessageTemplate: [{
4567
+ type: Input
4568
+ }], receiverMessageTemplate: [{
4569
+ type: Input
4570
+ }], messageTemplate: [{
3752
4571
  type: Input
3753
4572
  }], statusTemplate: [{
3754
4573
  type: Input
@@ -3756,8 +4575,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3756
4575
  type: Input
3757
4576
  }], authorId: [{
3758
4577
  type: Input
3759
- }], contextMenuVisibilityChange: [{
3760
- type: Output
3761
4578
  }], cssClass: [{
3762
4579
  type: HostBinding,
3763
4580
  args: ['class.k-message']
@@ -3770,9 +4587,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
3770
4587
  }], tabIndex: [{
3771
4588
  type: HostBinding,
3772
4589
  args: ['attr.tabIndex']
3773
- }], onContextMenu: [{
3774
- type: HostListener,
3775
- args: ['contextmenu', ['$event']]
3776
4590
  }] } });
3777
4591
 
3778
4592
  /**
@@ -3800,8 +4614,8 @@ class AttachmentComponent {
3800
4614
  return this.attachment.contentType || '';
3801
4615
  }
3802
4616
  _attachment;
3803
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AttachmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3804
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AttachmentComponent, isStandalone: true, selector: "kendo-chat-attachment", inputs: { attachment: "attachment", template: "template" }, ngImport: i0, template: `
4617
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AttachmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4618
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: AttachmentComponent, isStandalone: true, selector: "kendo-chat-attachment", inputs: { attachment: "attachment", template: "template" }, ngImport: i0, template: `
3805
4619
  <ng-container *ngIf="template">
3806
4620
  <ng-container *ngTemplateOutlet="template.templateRef; context: context;">
3807
4621
  </ng-container>
@@ -3823,7 +4637,7 @@ class AttachmentComponent {
3823
4637
  </div>
3824
4638
  `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
3825
4639
  }
3826
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AttachmentComponent, decorators: [{
4640
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AttachmentComponent, decorators: [{
3827
4641
  type: Component,
3828
4642
  args: [{
3829
4643
  selector: 'kendo-chat-attachment',
@@ -3888,10 +4702,10 @@ class MessageAttachmentsComponent extends ChatItem {
3888
4702
  scrollSubscription;
3889
4703
  direction;
3890
4704
  get showLeftArrow() {
3891
- return this.carousel && this.direction === 'rtl' ? this.scrollPosition > -1 : this.scrollPosition > 0;
4705
+ return this.carousel && (this.direction === 'rtl' ? this.scrollPosition > -1 : this.scrollPosition > 0);
3892
4706
  }
3893
4707
  get showRightArrow() {
3894
- return this.carousel && this.direction === 'rtl' ? this.scrollPosition < 0 : this.scrollPosition < 1;
4708
+ return this.carousel && (this.direction === 'rtl' ? this.scrollPosition < 0 : this.scrollPosition < 1);
3895
4709
  }
3896
4710
  carouselKeyHandlers = {
3897
4711
  [Keys.ArrowLeft]: (e) => this.navigateTo(e, this.direction === 'rtl' ? 1 : -1),
@@ -3973,8 +4787,8 @@ class MessageAttachmentsComponent extends ChatItem {
3973
4787
  textFor(key) {
3974
4788
  return this.localization.get(key);
3975
4789
  }
3976
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageAttachmentsComponent, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
3977
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MessageAttachmentsComponent, isStandalone: true, selector: "kendo-chat-message-attachments", inputs: { attachments: "attachments", layout: "layout", tabbable: "tabbable", template: "template", localization: "localization" }, host: { properties: { "class.k-card-deck-scrollwrap": "this.carousel" } }, providers: [{
4790
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageAttachmentsComponent, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
4791
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: MessageAttachmentsComponent, isStandalone: true, selector: "kendo-chat-message-attachments", inputs: { attachments: "attachments", layout: "layout", tabbable: "tabbable", template: "template", localization: "localization" }, host: { properties: { "class.k-card-deck-scrollwrap": "this.carousel" } }, providers: [{
3978
4792
  provide: ChatItem,
3979
4793
  useExisting: forwardRef(() => MessageAttachmentsComponent)
3980
4794
  }], viewQueries: [{ propertyName: "deck", first: true, predicate: ["deck"], descendants: true, read: ElementRef, static: true }, { propertyName: "items", predicate: ["item"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: `
@@ -4020,7 +4834,7 @@ class MessageAttachmentsComponent extends ChatItem {
4020
4834
  </button>
4021
4835
  `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: ["attachment", "template"] }] });
4022
4836
  }
4023
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageAttachmentsComponent, decorators: [{
4837
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageAttachmentsComponent, decorators: [{
4024
4838
  type: Component,
4025
4839
  args: [{
4026
4840
  providers: [{
@@ -4073,7 +4887,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4073
4887
  standalone: true,
4074
4888
  imports: [NgIf, ButtonComponent, NgFor, AttachmentComponent]
4075
4889
  }]
4076
- }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.LocalizationService }]; }, propDecorators: { attachments: [{
4890
+ }], ctorParameters: () => [{ type: i0.NgZone }, { type: i1.LocalizationService }], propDecorators: { attachments: [{
4077
4891
  type: Input
4078
4892
  }], layout: [{
4079
4893
  type: Input
@@ -4094,6 +4908,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4094
4908
  args: ['item', { read: ElementRef }]
4095
4909
  }] } });
4096
4910
 
4911
+ /**
4912
+ * Defines a template for displaying user status in the Chat.
4913
+ *
4914
+ * To define a user status template, nest an `<ng-template>` tag with the `kendoChatUserStatusTemplate` directive inside the `<kendo-chat>` component.
4915
+ * For more information, refer to the article on [message templates](slug:message_templates_chat).
4916
+ *
4917
+ * @example
4918
+ * ```html
4919
+ * <kendo-chat>
4920
+ * <ng-template kendoChatUserStatusTemplate let-status>
4921
+ * <div>{{ status }}</div>
4922
+ * </ng-template>
4923
+ * </kendo-chat>
4924
+ * ```
4925
+ */
4926
+ class ChatUserStatusTemplateDirective {
4927
+ templateRef;
4928
+ constructor(templateRef) {
4929
+ this.templateRef = templateRef;
4930
+ }
4931
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatUserStatusTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
4932
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ChatUserStatusTemplateDirective, isStandalone: true, selector: "[kendoChatUserStatusTemplate]", ngImport: i0 });
4933
+ }
4934
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatUserStatusTemplateDirective, decorators: [{
4935
+ type: Directive,
4936
+ args: [{
4937
+ selector: '[kendoChatUserStatusTemplate]',
4938
+ standalone: true
4939
+ }]
4940
+ }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
4941
+ type: Optional
4942
+ }] }] });
4943
+
4097
4944
  /* eslint-disable @typescript-eslint/no-unused-vars */
4098
4945
  /* eslint-disable @typescript-eslint/no-explicit-any */
4099
4946
  /**
@@ -4114,9 +4961,15 @@ class MessageListComponent {
4114
4961
  return this._messages;
4115
4962
  }
4116
4963
  attachmentTemplate;
4964
+ authorMessageContentTemplate;
4965
+ receiverMessageContentTemplate;
4966
+ messageContentTemplate;
4967
+ authorMessageTemplate;
4968
+ receiverMessageTemplate;
4117
4969
  messageTemplate;
4118
4970
  timestampTemplate;
4119
4971
  statusTemplate;
4972
+ userStatusTemplate;
4120
4973
  localization;
4121
4974
  authorId;
4122
4975
  executeAction = new EventEmitter();
@@ -4134,6 +4987,7 @@ class MessageListComponent {
4134
4987
  [Keys.ArrowUp]: (e) => this.navigateTo(e, -1),
4135
4988
  [Keys.ArrowDown]: (e) => this.navigateTo(e, 1),
4136
4989
  [Keys.Tab]: (e) => this.onTabKeyDown(e),
4990
+ [Keys.F10]: (e) => e.shiftKey && this.openContextMenu(e),
4137
4991
  };
4138
4992
  constructor(element, intl, renderer, chatService, cdr) {
4139
4993
  this.element = element;
@@ -4146,9 +5000,25 @@ class MessageListComponent {
4146
5000
  const elRef = this.element.nativeElement;
4147
5001
  this.subs.add(this.renderer.listen(elRef, 'keydown', event => this.onKeydown(event)));
4148
5002
  this.subs.add(this.renderer.listen(elRef, 'focusout', event => this.onBlur(event)));
5003
+ this.subs.add(this.renderer.listen(elRef, 'click', event => {
5004
+ const messageComponent = this.findMessageComponentFromEvent(event);
5005
+ if (messageComponent) {
5006
+ this.select(messageComponent, event);
5007
+ }
5008
+ }));
5009
+ this.subs.add(this.renderer.listen(elRef, 'contextmenu', event => {
5010
+ event.preventDefault();
5011
+ const messageComponent = this.findMessageComponentFromEvent(event);
5012
+ if (messageComponent) {
5013
+ this.onContextMenuClick(messageComponent.message, event, messageComponent);
5014
+ }
5015
+ }));
4149
5016
  this.subs.add(this.chatService.replyReferenceClick$.subscribe((messageId) => {
4150
5017
  this.scrollToAndSelectMessage(messageId);
4151
5018
  }));
5019
+ this.subs.add(this.chatService.contextMenuVisibilityChange$.subscribe((isVisible) => {
5020
+ this.handleMenuClose(isVisible);
5021
+ }));
4152
5022
  }
4153
5023
  ngAfterViewInit() {
4154
5024
  this.selectedItem = this.items.last;
@@ -4162,9 +5032,31 @@ class MessageListComponent {
4162
5032
  onClick(message, event) {
4163
5033
  this.select(message, event);
4164
5034
  }
5035
+ onContextMenuClick(message, event, messageElement) {
5036
+ this.chatService.calculateContextMenuActions(this.isOwnMessage(message));
5037
+ if (this.chatService.calculatedContextMenuActions.length > 0) {
5038
+ this.chatService.messagesContextMenu.show({
5039
+ left: event.pageX,
5040
+ top: event.pageY,
5041
+ });
5042
+ this.chatService.activeMessageElement = messageElement;
5043
+ this.chatService.activeMessage = message;
5044
+ this.chatService.active = true;
5045
+ this.chatService.selectOnMenuClose = this.chatService.activeMessageElement?.selected;
5046
+ this.chatService.emit('contextMenuVisibilityChange', true);
5047
+ }
5048
+ }
4165
5049
  formatTimeStamp(date) {
4166
5050
  return this.intl.formatDate(date, { date: 'full' });
4167
5051
  }
5052
+ calculateMessageWidthMode(message) {
5053
+ const isOwn = this.isOwnMessage(message);
5054
+ const messageSettings = isOwn ? this.chatService.authorMessageSettings : this.chatService.receiverMessageSettings;
5055
+ if (messageSettings?.messageWidthMode) {
5056
+ return messageSettings.messageWidthMode === 'full';
5057
+ }
5058
+ return this.chatService.messageWidthMode === 'full';
5059
+ }
4168
5060
  onKeydown(e) {
4169
5061
  // On some keyboards Numpad keys are used for Home/End/PageUp/PageDown.
4170
5062
  const code = normalizeNumpadKeys(e);
@@ -4224,6 +5116,9 @@ class MessageListComponent {
4224
5116
  this.select(null);
4225
5117
  }
4226
5118
  }
5119
+ textFor(key) {
5120
+ return this.localization.get(key);
5121
+ }
4227
5122
  onHomeOrEndKeyDown(key) {
4228
5123
  const items = this.items.toArray();
4229
5124
  if (key === 'home') {
@@ -4270,11 +5165,49 @@ class MessageListComponent {
4270
5165
  this.select(chatItem);
4271
5166
  }
4272
5167
  }
4273
- textFor(key) {
4274
- return this.localization.get(key);
5168
+ openContextMenu(event) {
5169
+ event.preventDefault();
5170
+ const messageComponent = this.findMessageComponentFromActiveElement();
5171
+ if (messageComponent) {
5172
+ const messageContentElement = messageComponent.element.nativeElement.querySelector('.k-chat-bubble');
5173
+ if (messageContentElement) {
5174
+ const rect = messageContentElement?.getBoundingClientRect();
5175
+ this.onContextMenuClick(messageComponent.message, {
5176
+ pageX: rect.left + (rect.width / 2) + window.scrollX,
5177
+ pageY: rect.top + (rect.height / 2) + window.scrollY
5178
+ }, messageComponent);
5179
+ }
5180
+ else {
5181
+ const messageElement = messageComponent.element.nativeElement;
5182
+ const rect = messageElement?.getBoundingClientRect();
5183
+ this.onContextMenuClick(messageComponent.message, {
5184
+ pageX: rect.left + (rect.width / 2) + window.scrollX,
5185
+ pageY: rect.top + (rect.height / 2) + window.scrollY
5186
+ }, messageComponent);
5187
+ }
5188
+ }
5189
+ }
5190
+ findMessageComponentFromActiveElement() {
5191
+ const activeElement = document.activeElement;
5192
+ const messageComponents = this.items.filter(item => item instanceof MessageComponent);
5193
+ return messageComponents.find(component => {
5194
+ const componentElement = component.element?.nativeElement;
5195
+ return componentElement && (componentElement === activeElement || componentElement.contains(activeElement));
5196
+ });
5197
+ }
5198
+ findMessageComponentFromEvent(event) {
5199
+ const target = event.target;
5200
+ const clickedElement = target?.closest('.k-message');
5201
+ if (!clickedElement)
5202
+ return undefined;
5203
+ const messageComponents = this.items.filter(item => item instanceof MessageComponent);
5204
+ return messageComponents.find(component => {
5205
+ const componentElement = component.element?.nativeElement;
5206
+ return componentElement && (componentElement === clickedElement || componentElement.contains(clickedElement));
5207
+ });
4275
5208
  }
4276
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageListComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.IntlService }, { token: i0.Renderer2 }, { token: ChatService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
4277
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MessageListComponent, isStandalone: true, selector: "kendo-chat-message-list", inputs: { messages: "messages", attachmentTemplate: "attachmentTemplate", messageTemplate: "messageTemplate", timestampTemplate: "timestampTemplate", statusTemplate: "statusTemplate", localization: "localization", authorId: "authorId" }, outputs: { executeAction: "executeAction", navigate: "navigate", resize: "resize" }, host: { properties: { "class.k-message-list-content": "this.cssClass" } }, viewQueries: [{ propertyName: "items", predicate: ChatItem, descendants: true }], ngImport: i0, template: `
5209
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageListComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.IntlService }, { token: i0.Renderer2 }, { token: ChatService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
5210
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: MessageListComponent, isStandalone: true, selector: "kendo-chat-message-list", inputs: { messages: "messages", attachmentTemplate: "attachmentTemplate", authorMessageContentTemplate: "authorMessageContentTemplate", receiverMessageContentTemplate: "receiverMessageContentTemplate", messageContentTemplate: "messageContentTemplate", authorMessageTemplate: "authorMessageTemplate", receiverMessageTemplate: "receiverMessageTemplate", messageTemplate: "messageTemplate", timestampTemplate: "timestampTemplate", statusTemplate: "statusTemplate", userStatusTemplate: "userStatusTemplate", localization: "localization", authorId: "authorId" }, outputs: { executeAction: "executeAction", navigate: "navigate", resize: "resize" }, host: { properties: { "class.k-message-list-content": "this.cssClass" } }, viewQueries: [{ propertyName: "items", predicate: ChatItem, descendants: true }], ngImport: i0, template: `
4278
5211
  <ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">
4279
5212
  <ng-container [ngSwitch]="group.type">
4280
5213
  <div
@@ -4295,10 +5228,10 @@ class MessageListComponent {
4295
5228
  [class.k-message-group-sender]="isOwnMessage(group.messages[0])"
4296
5229
  [class.k-message-group-receiver]="!isOwnMessage(group.messages[0])"
4297
5230
  [class.k-no-avatar]="!group.author.avatarUrl"
4298
- [class.k-message-group-full-width]="chatService.messageWidthMode === 'full'"
5231
+ [class.k-message-group-full-width]="calculateMessageWidthMode(group.messages[0])"
4299
5232
  >
4300
5233
  <div
4301
- *ngIf="group.author.avatarUrl"
5234
+ *ngIf="!userStatusTemplate?.templateRef && group.author.avatarUrl"
4302
5235
  class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
4303
5236
  >
4304
5237
  <span class="k-avatar-image">
@@ -4308,6 +5241,25 @@ class MessageListComponent {
4308
5241
  />
4309
5242
  </span>
4310
5243
  </div>
5244
+ <div class="k-chat-user-status-wrapper" *ngIf="group.author.avatarUrl && userStatusTemplate?.templateRef">
5245
+ <div
5246
+ class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
5247
+ >
5248
+ <span class="k-avatar-image">
5249
+ <img
5250
+ [attr.src]="group.author.avatarUrl"
5251
+ [alt]="group.author.avatarAltText"
5252
+ />
5253
+ </span>
5254
+ </div>
5255
+ <div class="k-chat-user-status" *ngIf="userStatusTemplate?.templateRef">
5256
+ <ng-template
5257
+ [ngTemplateOutlet]="userStatusTemplate.templateRef"
5258
+ [ngTemplateOutletContext]="{ $implicit: group.messages.at(-1) }"
5259
+ >
5260
+ </ng-template>
5261
+ </div>
5262
+ </div>
4311
5263
  <div class="k-message-group-content">
4312
5264
  <p *ngIf="group.author.name" class="k-message-author">{{ group.author.name }}</p>
4313
5265
  <ng-container
@@ -4324,13 +5276,14 @@ class MessageListComponent {
4324
5276
  <kendo-chat-message #message
4325
5277
  [message]="msg"
4326
5278
  [tabbable]="lastGroup && lastMessage"
4327
- [template]="messageTemplate"
5279
+ [authorMessageContentTemplate]="authorMessageContentTemplate"
5280
+ [receiverMessageContentTemplate]="receiverMessageContentTemplate"
5281
+ [messageContentTemplate]="messageContentTemplate"
5282
+ [authorMessageTemplate]="authorMessageTemplate"
5283
+ [receiverMessageTemplate]="receiverMessageTemplate"
5284
+ [messageTemplate]="messageTemplate"
4328
5285
  [statusTemplate]="statusTemplate"
4329
5286
  [authorId]="authorId"
4330
- (click)="onClick(message, $event)"
4331
- (contextMenuVisibilityChange)="handleMenuClose($event)"
4332
- [class.k-first]="group.messages.length > 1 && firstMessage"
4333
- [class.k-last]="group.messages.length > 1 && lastMessage"
4334
5287
  >
4335
5288
  </kendo-chat-message>
4336
5289
 
@@ -4359,6 +5312,7 @@ class MessageListComponent {
4359
5312
  <kendo-chat-suggested-actions #actions
4360
5313
  *ngSwitchCase="'action-group'"
4361
5314
  [actions]="group.actions"
5315
+ type="action"
4362
5316
  [tabbable]="lastGroup"
4363
5317
  (dispatchAction)="dispatchAction($event, last(view))"
4364
5318
  (click)="select(actions, $event)"
@@ -4369,9 +5323,9 @@ class MessageListComponent {
4369
5323
  </ng-container>
4370
5324
  <kendo-resize-sensor (resize)="onResize()">
4371
5325
  </kendo-resize-sensor>
4372
- `, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MessageComponent, selector: "kendo-chat-message", inputs: ["message", "tabbable", "template", "statusTemplate", "showMessageTime", "authorId"], outputs: ["contextMenuVisibilityChange"] }, { kind: "component", type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: ["attachment", "template"] }, { kind: "component", type: MessageAttachmentsComponent, selector: "kendo-chat-message-attachments", inputs: ["attachments", "layout", "tabbable", "template", "localization"] }, { kind: "component", type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: ["actions", "suggestions", "tabbable", "suggestionTemplate"], outputs: ["dispatchAction", "dispatchSuggestion"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }] });
5326
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MessageComponent, selector: "kendo-chat-message", inputs: ["message", "tabbable", "authorMessageContentTemplate", "receiverMessageContentTemplate", "messageContentTemplate", "authorMessageTemplate", "receiverMessageTemplate", "messageTemplate", "statusTemplate", "showMessageTime", "authorId"] }, { kind: "component", type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: ["attachment", "template"] }, { kind: "component", type: MessageAttachmentsComponent, selector: "kendo-chat-message-attachments", inputs: ["attachments", "layout", "tabbable", "template", "localization"] }, { kind: "component", type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: ["actions", "suggestions", "tabbable", "type", "suggestionTemplate"], outputs: ["dispatchAction", "dispatchSuggestion"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }] });
4373
5327
  }
4374
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MessageListComponent, decorators: [{
5328
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MessageListComponent, decorators: [{
4375
5329
  type: Component,
4376
5330
  args: [{
4377
5331
  selector: 'kendo-chat-message-list',
@@ -4396,10 +5350,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4396
5350
  [class.k-message-group-sender]="isOwnMessage(group.messages[0])"
4397
5351
  [class.k-message-group-receiver]="!isOwnMessage(group.messages[0])"
4398
5352
  [class.k-no-avatar]="!group.author.avatarUrl"
4399
- [class.k-message-group-full-width]="chatService.messageWidthMode === 'full'"
5353
+ [class.k-message-group-full-width]="calculateMessageWidthMode(group.messages[0])"
4400
5354
  >
4401
5355
  <div
4402
- *ngIf="group.author.avatarUrl"
5356
+ *ngIf="!userStatusTemplate?.templateRef && group.author.avatarUrl"
4403
5357
  class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
4404
5358
  >
4405
5359
  <span class="k-avatar-image">
@@ -4409,6 +5363,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4409
5363
  />
4410
5364
  </span>
4411
5365
  </div>
5366
+ <div class="k-chat-user-status-wrapper" *ngIf="group.author.avatarUrl && userStatusTemplate?.templateRef">
5367
+ <div
5368
+ class="k-avatar k-avatar-md k-avatar-solid k-avatar-solid-primary k-rounded-full"
5369
+ >
5370
+ <span class="k-avatar-image">
5371
+ <img
5372
+ [attr.src]="group.author.avatarUrl"
5373
+ [alt]="group.author.avatarAltText"
5374
+ />
5375
+ </span>
5376
+ </div>
5377
+ <div class="k-chat-user-status" *ngIf="userStatusTemplate?.templateRef">
5378
+ <ng-template
5379
+ [ngTemplateOutlet]="userStatusTemplate.templateRef"
5380
+ [ngTemplateOutletContext]="{ $implicit: group.messages.at(-1) }"
5381
+ >
5382
+ </ng-template>
5383
+ </div>
5384
+ </div>
4412
5385
  <div class="k-message-group-content">
4413
5386
  <p *ngIf="group.author.name" class="k-message-author">{{ group.author.name }}</p>
4414
5387
  <ng-container
@@ -4425,13 +5398,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4425
5398
  <kendo-chat-message #message
4426
5399
  [message]="msg"
4427
5400
  [tabbable]="lastGroup && lastMessage"
4428
- [template]="messageTemplate"
5401
+ [authorMessageContentTemplate]="authorMessageContentTemplate"
5402
+ [receiverMessageContentTemplate]="receiverMessageContentTemplate"
5403
+ [messageContentTemplate]="messageContentTemplate"
5404
+ [authorMessageTemplate]="authorMessageTemplate"
5405
+ [receiverMessageTemplate]="receiverMessageTemplate"
5406
+ [messageTemplate]="messageTemplate"
4429
5407
  [statusTemplate]="statusTemplate"
4430
5408
  [authorId]="authorId"
4431
- (click)="onClick(message, $event)"
4432
- (contextMenuVisibilityChange)="handleMenuClose($event)"
4433
- [class.k-first]="group.messages.length > 1 && firstMessage"
4434
- [class.k-last]="group.messages.length > 1 && lastMessage"
4435
5409
  >
4436
5410
  </kendo-chat-message>
4437
5411
 
@@ -4460,6 +5434,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4460
5434
  <kendo-chat-suggested-actions #actions
4461
5435
  *ngSwitchCase="'action-group'"
4462
5436
  [actions]="group.actions"
5437
+ type="action"
4463
5438
  [tabbable]="lastGroup"
4464
5439
  (dispatchAction)="dispatchAction($event, last(view))"
4465
5440
  (click)="select(actions, $event)"
@@ -4474,16 +5449,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4474
5449
  standalone: true,
4475
5450
  imports: [NgFor, NgSwitch, NgSwitchCase, NgIf, NgTemplateOutlet, MessageComponent, AttachmentComponent, MessageAttachmentsComponent, SuggestedActionsComponent, ResizeSensorComponent]
4476
5451
  }]
4477
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.IntlService }, { type: i0.Renderer2 }, { type: ChatService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { messages: [{
5452
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.IntlService }, { type: i0.Renderer2 }, { type: ChatService }, { type: i0.ChangeDetectorRef }], propDecorators: { messages: [{
4478
5453
  type: Input
4479
5454
  }], attachmentTemplate: [{
4480
5455
  type: Input
5456
+ }], authorMessageContentTemplate: [{
5457
+ type: Input
5458
+ }], receiverMessageContentTemplate: [{
5459
+ type: Input
5460
+ }], messageContentTemplate: [{
5461
+ type: Input
5462
+ }], authorMessageTemplate: [{
5463
+ type: Input
5464
+ }], receiverMessageTemplate: [{
5465
+ type: Input
4481
5466
  }], messageTemplate: [{
4482
5467
  type: Input
4483
5468
  }], timestampTemplate: [{
4484
5469
  type: Input
4485
5470
  }], statusTemplate: [{
4486
5471
  type: Input
5472
+ }], userStatusTemplate: [{
5473
+ type: Input
4487
5474
  }], localization: [{
4488
5475
  type: Input
4489
5476
  }], authorId: [{
@@ -4558,17 +5545,17 @@ class ScrollAnchorDirective {
4558
5545
  this.scrolling = true;
4559
5546
  this.zone.runOutsideAngular(() => setTimeout(() => this.scrolling = false, 1000));
4560
5547
  }
4561
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScrollAnchorDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
4562
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ScrollAnchorDirective, isStandalone: true, selector: "[kendoChatScrollAnchor]", inputs: { autoScroll: "autoScroll" }, outputs: { autoScrollChange: "autoScrollChange" }, host: { properties: { "style.overflow-anchor": "this.overflowAnchor" } }, exportAs: ["scrollAnchor"], ngImport: i0 });
5548
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScrollAnchorDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
5549
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ScrollAnchorDirective, isStandalone: true, selector: "[kendoChatScrollAnchor]", inputs: { autoScroll: "autoScroll" }, outputs: { autoScrollChange: "autoScrollChange" }, host: { properties: { "style.overflow-anchor": "this.overflowAnchor" } }, exportAs: ["scrollAnchor"], ngImport: i0 });
4563
5550
  }
4564
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ScrollAnchorDirective, decorators: [{
5551
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ScrollAnchorDirective, decorators: [{
4565
5552
  type: Directive,
4566
5553
  args: [{
4567
5554
  selector: '[kendoChatScrollAnchor]',
4568
5555
  exportAs: 'scrollAnchor',
4569
5556
  standalone: true
4570
5557
  }]
4571
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { autoScroll: [{
5558
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }], propDecorators: { autoScroll: [{
4572
5559
  type: Input
4573
5560
  }], autoScrollChange: [{
4574
5561
  type: Output
@@ -4646,10 +5633,18 @@ let Messages$1 = class Messages extends ComponentMessages {
4646
5633
  * Sets the title of the DropDownButton that opens the File actions.
4647
5634
  */
4648
5635
  fileActionsTitle;
4649
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
4650
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: Messages, selector: "kendoConversationalUIMessages", inputs: { deletedMessageSenderText: "deletedMessageSenderText", deletedMessageReceiverText: "deletedMessageReceiverText", downloadAllFilesText: "downloadAllFilesText", messagePlaceholder: "messagePlaceholder", send: "send", messageListLabel: "messageListLabel", messageBoxInputLabel: "messageBoxInputLabel", messageAttachmentLeftArrow: "messageAttachmentLeftArrow", messageAttachmentRightArrow: "messageAttachmentRightArrow", speechToTextButtonTitle: "speechToTextButtonTitle", fileSelectButtonTitle: "fileSelectButtonTitle", removeReplyTitle: "removeReplyTitle", removeFileTitle: "removeFileTitle", expandTitle: "expandTitle", collapseTitle: "collapseTitle", fileActionsTitle: "fileActionsTitle" }, usesInheritance: true, ngImport: i0 });
5636
+ /**
5637
+ * Sets the title of the button that shows the **Scroll right** when the suggestions list is scrollable with buttons.
5638
+ */
5639
+ nextSuggestionsButtonTitle;
5640
+ /**
5641
+ * Sets the title of the button that shows the **Scroll left** when the suggestions list is scrollable with buttons.
5642
+ */
5643
+ previousSuggestionsButtonTitle;
5644
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
5645
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: Messages, selector: "kendoConversationalUIMessages", inputs: { deletedMessageSenderText: "deletedMessageSenderText", deletedMessageReceiverText: "deletedMessageReceiverText", downloadAllFilesText: "downloadAllFilesText", messagePlaceholder: "messagePlaceholder", send: "send", messageListLabel: "messageListLabel", messageBoxInputLabel: "messageBoxInputLabel", messageAttachmentLeftArrow: "messageAttachmentLeftArrow", messageAttachmentRightArrow: "messageAttachmentRightArrow", speechToTextButtonTitle: "speechToTextButtonTitle", fileSelectButtonTitle: "fileSelectButtonTitle", removeReplyTitle: "removeReplyTitle", removeFileTitle: "removeFileTitle", expandTitle: "expandTitle", collapseTitle: "collapseTitle", fileActionsTitle: "fileActionsTitle", nextSuggestionsButtonTitle: "nextSuggestionsButtonTitle", previousSuggestionsButtonTitle: "previousSuggestionsButtonTitle" }, usesInheritance: true, ngImport: i0 });
4651
5646
  };
4652
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages$1, decorators: [{
5647
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages$1, decorators: [{
4653
5648
  type: Directive,
4654
5649
  args: [{
4655
5650
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -4687,6 +5682,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4687
5682
  type: Input
4688
5683
  }], fileActionsTitle: [{
4689
5684
  type: Input
5685
+ }], nextSuggestionsButtonTitle: [{
5686
+ type: Input
5687
+ }], previousSuggestionsButtonTitle: [{
5688
+ type: Input
4690
5689
  }] } });
4691
5690
 
4692
5691
  // eslint-disable no-forward-ref
@@ -4699,15 +5698,15 @@ let LocalizedMessagesDirective$1 = class LocalizedMessagesDirective extends Mess
4699
5698
  super();
4700
5699
  this.service = service;
4701
5700
  }
4702
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
4703
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoChatLocalizedMessages]", providers: [
5701
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
5702
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoChatLocalizedMessages]", providers: [
4704
5703
  {
4705
5704
  provide: Messages$1,
4706
5705
  useExisting: forwardRef(() => LocalizedMessagesDirective)
4707
5706
  }
4708
5707
  ], usesInheritance: true, ngImport: i0 });
4709
5708
  };
4710
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective$1, decorators: [{
5709
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective$1, decorators: [{
4711
5710
  type: Directive,
4712
5711
  args: [{
4713
5712
  providers: [
@@ -4719,7 +5718,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4719
5718
  selector: '[kendoChatLocalizedMessages]',
4720
5719
  standalone: true
4721
5720
  }]
4722
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
5721
+ }], ctorParameters: () => [{ type: i1.LocalizationService }] });
4723
5722
 
4724
5723
  /**
4725
5724
  * Represents the template for the header of the Chat component.
@@ -4738,16 +5737,49 @@ class ChatHeaderTemplateDirective {
4738
5737
  constructor(templateRef) {
4739
5738
  this.templateRef = templateRef;
4740
5739
  }
4741
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatHeaderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
4742
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ChatHeaderTemplateDirective, isStandalone: true, selector: "[kendoChatHeaderTemplate]", ngImport: i0 });
5740
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatHeaderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
5741
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ChatHeaderTemplateDirective, isStandalone: true, selector: "[kendoChatHeaderTemplate]", ngImport: i0 });
4743
5742
  }
4744
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatHeaderTemplateDirective, decorators: [{
5743
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatHeaderTemplateDirective, decorators: [{
4745
5744
  type: Directive,
4746
5745
  args: [{
4747
5746
  selector: '[kendoChatHeaderTemplate]',
4748
5747
  standalone: true
4749
5748
  }]
4750
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
5749
+ }], ctorParameters: () => [{ type: i0.TemplateRef }] });
5750
+
5751
+ /**
5752
+ * Defines a template for displaying custom content when there are no messages in the Chat.
5753
+ *
5754
+ * To define an empty Chat template, nest an `<ng-template>` tag with the `kendoChatNoDataTemplate` directive inside the `<kendo-chat>` component.
5755
+ * For more information, refer to the article on [message templates](slug:message_templates_chat).
5756
+ *
5757
+ * @example
5758
+ * ```html
5759
+ * <kendo-chat>
5760
+ * <ng-template kendoChatNoDataTemplate>
5761
+ * <div>No messages.</div>
5762
+ * </ng-template>
5763
+ * </kendo-chat>
5764
+ * ```
5765
+ */
5766
+ class NoDataTemplateDirective {
5767
+ templateRef;
5768
+ constructor(templateRef) {
5769
+ this.templateRef = templateRef;
5770
+ }
5771
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NoDataTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
5772
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: NoDataTemplateDirective, isStandalone: true, selector: "[kendoChatNoDataTemplate]", ngImport: i0 });
5773
+ }
5774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NoDataTemplateDirective, decorators: [{
5775
+ type: Directive,
5776
+ args: [{
5777
+ selector: '[kendoChatNoDataTemplate]',
5778
+ standalone: true
5779
+ }]
5780
+ }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
5781
+ type: Optional
5782
+ }] }] });
4751
5783
 
4752
5784
  /**
4753
5785
  * Represents the [Kendo UI Chat component for Angular](slug:overview_convui).
@@ -4766,7 +5798,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
4766
5798
  * ```
4767
5799
  *
4768
5800
  * @remarks
4769
- * Supported children components are: {@link CustomMessagesComponent}, {@link HeroCardComponent}, {@link AttachmentTemplateDirective}, {@link ChatHeaderTemplateDirective}, {@link ChatMessageBoxTemplateDirective}, {@link MessageTemplateDirective}, {@link ChatStatusTemplateDirective}, {@link ChatSuggestionTemplateDirective}, {@link ChatTimestampTemplateDirective}.
5801
+ * Supported children components are: {@link CustomMessagesComponent}, {@link HeroCardComponent}, {@link AttachmentTemplateDirective}, {@link ChatHeaderTemplateDirective}, {@link ChatMessageBoxTemplateDirective}, {@link MessageContentTemplateDirective}, {@link MessageTemplateDirective},{@link ChatStatusTemplateDirective}, {@link ChatSuggestionTemplateDirective}, {@link ChatTimestampTemplateDirective}, {@link ChatNoDataTemplateDirective}, {@link ChatUserStatusTemplateDirective}, {@link AuthorMessageContentTemplateDirective}, {@link ReceiverMessageContentTemplateDirective}, {@link ReceiverMessageTemplateDirective}, {@link AuthorMessageTemplateDirective}.
4770
5802
  */
4771
5803
  class ChatComponent {
4772
5804
  localization;
@@ -4775,13 +5807,13 @@ class ChatComponent {
4775
5807
  element;
4776
5808
  chatService;
4777
5809
  /**
4778
- * Defines the array of messages displayed in the Chat.
4779
- * Each message can include a timestamp for unique identification.
4780
- * For more information, see [ngFor - Change Tracking](link:site.data.urls.angular['ngforof']#change-propagation).
5810
+ * Sets the Chat messages.
5811
+ * Accepts an array of `Message` objects, but can also accept custom data structures.
5812
+ * For more information, check [Data Binding](slug:databinding_chat) section in the documentation.
4781
5813
  */
4782
5814
  messages;
4783
5815
  /**
4784
- * Specifies the id representing the local user.
5816
+ * Sets the ID that represents the local user.
4785
5817
  */
4786
5818
  authorId;
4787
5819
  /**
@@ -4809,13 +5841,14 @@ class ChatComponent {
4809
5841
  */
4810
5842
  placeholder;
4811
5843
  /**
4812
- * Switches the width of the message between the predefined options.
5844
+ * Controls the width of the message between the predefined options.
4813
5845
  *
4814
5846
  * @default 'standard'
4815
5847
  */
4816
5848
  messageWidthMode = 'standard';
4817
5849
  /**
4818
5850
  * Enables the expand or collapse functionality for messages.
5851
+ *
4819
5852
  * @default false
4820
5853
  */
4821
5854
  allowMessageCollapse = false;
@@ -4832,24 +5865,34 @@ class ChatComponent {
4832
5865
  */
4833
5866
  enableFileSelect = true;
4834
5867
  /**
4835
- * Specifies the actions available in the message toolbar.
5868
+ * Sets the actions of the message toolbar.
4836
5869
  * These actions display in the message toolbar and let you perform specific operations on the message.
5870
+ *
4837
5871
  * @default []
4838
5872
  */
4839
5873
  messageToolbarActions = [];
4840
5874
  /**
4841
5875
  * Sets the value of the Message Box.
5876
+ *
4842
5877
  * @default ''
4843
5878
  */
4844
5879
  inputValue = '';
4845
5880
  /**
4846
- * Specifies the default actions available in the message context menu.
5881
+ * Sets the settings for the author's messages.
5882
+ */
5883
+ authorMessageSettings;
5884
+ /**
5885
+ * Sets the settings for the receivers' messages.
5886
+ */
5887
+ receiverMessageSettings;
5888
+ /**
5889
+ * Sets the default actions that display in the message context menu.
4847
5890
  *
4848
5891
  * @default [{ id: 'copy', label: 'Copy', icon: 'copy', svgIcon: copyIcon, disabled: false }, { id: 'reply', label: 'Reply', icon: 'undo', svgIcon: undoIcon, disabled: false }]
4849
5892
  */
4850
5893
  defaultContextMenuActions = CONTEXT_MENU_ACTIONS;
4851
5894
  /**
4852
- * Specifies the actions available in the message as a context menu.
5895
+ * Sets the actions that display in the message as a context menu.
4853
5896
  * These actions display as menu items and let you perform specific operations on the message.
4854
5897
  * The default actions are `copy` and `reply` and are defined by their `id`.
4855
5898
  */
@@ -4860,11 +5903,13 @@ class ChatComponent {
4860
5903
  return this._messageContextMenuActions;
4861
5904
  }
4862
5905
  /**
4863
- * Specifies the default actions available in the file actions DropDownButton.
5906
+ * Sets the default actions that display in the file actions DropDownButton.
5907
+ *
5908
+ * @default [{ id: 'download', label: 'Download', icon: 'download', svgIcon: downloadIcon, disabled: false }]
4864
5909
  */
4865
5910
  defaultFileActions = FILE_ACTIONS;
4866
5911
  /**
4867
- * Specifies the actions available in the file as items of a DropDownButton.
5912
+ * Sets the actions that display in the file as items of a DropDownButton.
4868
5913
  * These actions display when you click the file DropDownButton and let you perform specific operations on the file.
4869
5914
  * The default action is `download` and is defined by its `id`.
4870
5915
  *
@@ -4877,17 +5922,40 @@ class ChatComponent {
4877
5922
  return this._fileActions;
4878
5923
  }
4879
5924
  /**
4880
- * Sets the suggestions to display in the message input box.
4881
- * Suggestions display as a list of clickable items that let you quickly insert predefined text into the message input.
4882
- * @default []
5925
+ * Sets the layout of the files in the message bubble.
5926
+ *
5927
+ * @default 'vertical'
4883
5928
  */
4884
- suggestions = [];
5929
+ set messageFilesLayout(layout) {
5930
+ this.chatService.messageFilesLayout = layout;
5931
+ }
5932
+ /**
5933
+ * Sets the layout of the suggestions above the message input box.
5934
+ *
5935
+ * @default 'scroll'
5936
+ */
5937
+ set suggestionsLayout(layoutMode) {
5938
+ if (layoutMode) {
5939
+ this.chatService.suggestionsLayout = layoutMode;
5940
+ }
5941
+ }
5942
+ /**
5943
+ * Sets the layout of the quick actions suggested below the messages.
5944
+ *
5945
+ * @default 'scroll'
5946
+ */
5947
+ set quickActionsLayout(layoutMode) {
5948
+ if (layoutMode) {
5949
+ this.chatService.quickActionsLayout = layoutMode;
5950
+ }
5951
+ }
4885
5952
  /**
4886
- * Sets the visibility of the message toolbar.
5953
+ * Sets the suggestions that display in the message input box.
5954
+ * Suggestions display as a list of clickable items that let you quickly insert predefined text into the message input.
4887
5955
  *
4888
- * @default 'hidden'
5956
+ * @default []
4889
5957
  */
4890
- messageToolbarVisibility = 'hidden';
5958
+ suggestions = [];
4891
5959
  /**
4892
5960
  * Sets the send button settings for the Chat component.
4893
5961
  * Allows customization of the send button appearance, icons and disabled state.
@@ -4906,53 +5974,53 @@ class ChatComponent {
4906
5974
  return this._modelFields;
4907
5975
  }
4908
5976
  /**
4909
- * Emits when the user sends a message by clicking the **Send** button or pressing **Enter**.
5977
+ * Fires when the user sends a message by clicking the **Send** button or pressing **Enter**.
4910
5978
  *
4911
5979
  * The message is not automatically added to the `messages` array.
4912
5980
  */
4913
5981
  sendMessage = new EventEmitter();
4914
5982
  /**
4915
- * Emits when the user clicks a quick action button in the message toolbar.
5983
+ * Fires when the user clicks a quick action button in the message toolbar.
4916
5984
  */
4917
5985
  toolbarActionClick = new EventEmitter();
4918
5986
  /**
4919
- * Emits when the user clicks an action in the message context menu.
5987
+ * Fires when the user clicks an action in the message context menu.
4920
5988
  */
4921
5989
  contextMenuActionClick = new EventEmitter();
4922
5990
  /**
4923
- * Emits when the user clicks an action in the file context menu.
5991
+ * Fires when the user clicks an action in the file context menu.
4924
5992
  */
4925
5993
  fileActionClick = new EventEmitter();
4926
5994
  /**
4927
- * Emits when the user clicks an action in the file context menu.
5995
+ * Fires when the user clicks an action in the file context menu.
4928
5996
  */
4929
5997
  download = new EventEmitter();
4930
5998
  /**
4931
- * Emits when the user clicks a quick action button.
5999
+ * Fires when the user clicks a quick action button.
4932
6000
  * The Chat internally handles [known actions](slug:api_conversational-ui_actiontype) such as `reply`, `openUrl`, and `call`.
4933
6001
  *
4934
6002
  * The event is preventable. Calling [`preventDefault`](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault) suppresses the built-in action.
4935
6003
  */
4936
6004
  executeAction = new EventEmitter();
4937
6005
  /**
4938
- * Emits when the user clicks a suggestion in the message input box.
6006
+ * Fires when the user clicks a suggestion in the message input box.
4939
6007
  */
4940
6008
  suggestionExecute = new EventEmitter();
4941
6009
  /**
4942
- * Emits when the user selects a file in the message input box.
6010
+ * Fires when the user selects a file in the message input box.
4943
6011
  */
4944
6012
  fileSelect = new EventEmitter();
4945
6013
  /**
4946
- * Emits when the user removes a file from the message input box.
6014
+ * Fires when the user removes a file from the message input box.
4947
6015
  */
4948
6016
  fileRemove = new EventEmitter();
4949
6017
  /**
4950
- * Emits when the user unpins the pinned message.
6018
+ * Fires when the user unpins the pinned message.
4951
6019
  * This event triggers when the user clicks the delete button on the pinned message.
4952
6020
  */
4953
6021
  unpin = new EventEmitter();
4954
6022
  /**
4955
- * Emits when the user types in the message input box.
6023
+ * Fires when the user types in the message input box.
4956
6024
  */
4957
6025
  inputValueChange = new EventEmitter();
4958
6026
  get className() {
@@ -4961,13 +6029,23 @@ class ChatComponent {
4961
6029
  get dirAttr() {
4962
6030
  return this.direction;
4963
6031
  }
6032
+ set messagesContextMenu(contextMenu) {
6033
+ this.chatService.messagesContextMenu = contextMenu;
6034
+ }
4964
6035
  attachmentTemplate;
4965
6036
  chatHeaderTemplate;
6037
+ chatNoDataTemplate;
6038
+ authorMessageContentTemplate;
6039
+ receiverMessageContentTemplate;
6040
+ messageContentTemplate;
6041
+ authorMessageTemplate;
6042
+ receiverMessageTemplate;
4966
6043
  messageTemplate;
4967
6044
  timestampTemplate;
4968
6045
  suggestionTemplate;
4969
6046
  statusTemplate;
4970
6047
  messageBoxTemplate;
6048
+ userStatusTemplate;
4971
6049
  messageBox;
4972
6050
  /**
4973
6051
  * @hidden
@@ -4975,17 +6053,30 @@ class ChatComponent {
4975
6053
  messageList;
4976
6054
  /**
4977
6055
  * @hidden
4978
- * Returns processed messages when model fields are used, otherwise returns original messages
6056
+ * Returns processed messages when model fields are used, otherwise returns original messages.
4979
6057
  */
4980
6058
  get processedMessages() {
4981
6059
  if (!this.messages || this.messages.length === 0) {
4982
6060
  return [];
4983
6061
  }
4984
6062
  if (this._modelFields && Object.keys(this._modelFields).some(key => this._modelFields[key] !== defaultModelFields[key])) {
4985
- return processMessages(this.messages, this._modelFields);
6063
+ if (this.messages !== this._lastMessagesReference || this._modelFields !== this._lastModelFields) {
6064
+ this._cachedProcessedMessages = processMessages(this.messages, this._modelFields);
6065
+ this._lastMessagesReference = this.messages;
6066
+ this._lastModelFields = this._modelFields;
6067
+ }
6068
+ return this._cachedProcessedMessages;
4986
6069
  }
4987
6070
  return this.messages;
4988
6071
  }
6072
+ /**
6073
+ * Gets the actions available in the message context menu.
6074
+ *
6075
+ * @hidden
6076
+ */
6077
+ get contextMenuActions() {
6078
+ return transformActions(this.chatService.calculatedContextMenuActions);
6079
+ }
4989
6080
  /**
4990
6081
  * @hidden
4991
6082
  */
@@ -5013,6 +6104,9 @@ class ChatComponent {
5013
6104
  _modelFields = defaultModelFields;
5014
6105
  _messageContextMenuActions = CONTEXT_MENU_ACTIONS;
5015
6106
  _fileActions = FILE_ACTIONS;
6107
+ _cachedProcessedMessages = [];
6108
+ _lastMessagesReference = null;
6109
+ _lastModelFields = null;
5016
6110
  constructor(localization, zone, renderer, element, chatService) {
5017
6111
  this.localization = localization;
5018
6112
  this.zone = zone;
@@ -5037,7 +6131,8 @@ class ChatComponent {
5037
6131
  this.chatService.messageToolbarActions = this.messageToolbarActions;
5038
6132
  this.chatService.messageContextMenuActions = this.messageContextMenuActions;
5039
6133
  this.chatService.fileActions = this.fileActions;
5040
- this.chatService.messageToolbarVisibility = this.messageToolbarVisibility;
6134
+ this.chatService.authorMessageSettings = this.authorMessageSettings;
6135
+ this.chatService.receiverMessageSettings = this.receiverMessageSettings;
5041
6136
  this.chatService.messages = this.processedMessages || [];
5042
6137
  this.chatService.chatElement = this.messageList;
5043
6138
  this.subs.add(this.chatService.toolbarAction$.subscribe((actionEvent) => {
@@ -5085,7 +6180,8 @@ class ChatComponent {
5085
6180
  'messageToolbarActions',
5086
6181
  'messageContextMenuActions',
5087
6182
  'fileActions',
5088
- 'messageToolbarVisibility'
6183
+ 'authorMessageSettings',
6184
+ 'receiverMessageSettings'
5089
6185
  ], changes);
5090
6186
  }
5091
6187
  /**
@@ -5134,6 +6230,43 @@ class ChatComponent {
5134
6230
  this.chatService.scrollToMessage(this.pinnedMessage?.id);
5135
6231
  }
5136
6232
  }
6233
+ /**
6234
+ * @hidden
6235
+ */
6236
+ onContextMenuAction(action) {
6237
+ if (action.id === 'reply') {
6238
+ this.chatService.reply = this.chatService.activeMessage;
6239
+ }
6240
+ if (action.id === 'copy') {
6241
+ navigator.clipboard.writeText(this.chatService.activeMessage.text);
6242
+ }
6243
+ this.chatService.emit('contextMenuAction', { action, message: this.chatService.activeMessage });
6244
+ }
6245
+ /**
6246
+ * @hidden
6247
+ */
6248
+ handleMenuClose(event) {
6249
+ if (event) {
6250
+ const originalEvent = event.originalEvent;
6251
+ originalEvent && this.onActionButtonClick(originalEvent);
6252
+ }
6253
+ this.chatService.activeMessage = null;
6254
+ this.chatService.emit('contextMenuVisibilityChange', false);
6255
+ if (this.chatService.selectOnMenuClose) {
6256
+ this.chatService.activeMessageElement.selected = true;
6257
+ this.chatService.focusActiveMessageElement();
6258
+ }
6259
+ }
6260
+ /**
6261
+ * @hidden
6262
+ */
6263
+ onActionButtonClick(event) {
6264
+ const clickOutsideMessage = event instanceof MouseEvent && !event.target?.closest('.k-chat-bubble');
6265
+ const menuItemClick = event instanceof MouseEvent && event.target?.closest(MENU_ITEM_SELECTOR);
6266
+ if (clickOutsideMessage && !menuItemClick) {
6267
+ this.chatService.selectOnMenuClose = false;
6268
+ }
6269
+ }
5137
6270
  findLastPinnedMessage() {
5138
6271
  return [...this.processedMessages].reverse().find((message) => message.isPinned);
5139
6272
  }
@@ -5156,15 +6289,16 @@ class ChatComponent {
5156
6289
  return userAction;
5157
6290
  });
5158
6291
  }
5159
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatComponent, deps: [{ token: i1.LocalizationService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: ChatService }], target: i0.ɵɵFactoryTarget.Component });
5160
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ChatComponent, isStandalone: true, selector: "kendo-chat", inputs: { messages: "messages", authorId: "authorId", messageBoxType: "messageBoxType", height: "height", width: "width", placeholder: "placeholder", messageWidthMode: "messageWidthMode", allowMessageCollapse: "allowMessageCollapse", enableSpeechToText: "enableSpeechToText", enableFileSelect: "enableFileSelect", messageToolbarActions: "messageToolbarActions", inputValue: "inputValue", messageContextMenuActions: "messageContextMenuActions", fileActions: "fileActions", suggestions: "suggestions", messageToolbarVisibility: "messageToolbarVisibility", sendButtonSettings: "sendButtonSettings", modelFields: "modelFields" }, outputs: { sendMessage: "sendMessage", toolbarActionClick: "toolbarActionClick", contextMenuActionClick: "contextMenuActionClick", fileActionClick: "fileActionClick", download: "download", executeAction: "executeAction", suggestionExecute: "suggestionExecute", fileSelect: "fileSelect", fileRemove: "fileRemove", unpin: "unpin", inputValueChange: "inputValueChange" }, host: { properties: { "class": "this.className", "attr.dir": "this.dirAttr" } }, providers: [
6292
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatComponent, deps: [{ token: i1.LocalizationService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: ChatService }], target: i0.ɵɵFactoryTarget.Component });
6293
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ChatComponent, isStandalone: true, selector: "kendo-chat", inputs: { messages: "messages", authorId: "authorId", messageBoxType: "messageBoxType", height: "height", width: "width", placeholder: "placeholder", messageWidthMode: "messageWidthMode", allowMessageCollapse: "allowMessageCollapse", enableSpeechToText: "enableSpeechToText", enableFileSelect: "enableFileSelect", messageToolbarActions: "messageToolbarActions", inputValue: "inputValue", authorMessageSettings: "authorMessageSettings", receiverMessageSettings: "receiverMessageSettings", messageContextMenuActions: "messageContextMenuActions", fileActions: "fileActions", messageFilesLayout: "messageFilesLayout", suggestionsLayout: "suggestionsLayout", quickActionsLayout: "quickActionsLayout", suggestions: "suggestions", sendButtonSettings: "sendButtonSettings", modelFields: "modelFields" }, outputs: { sendMessage: "sendMessage", toolbarActionClick: "toolbarActionClick", contextMenuActionClick: "contextMenuActionClick", fileActionClick: "fileActionClick", download: "download", executeAction: "executeAction", suggestionExecute: "suggestionExecute", fileSelect: "fileSelect", fileRemove: "fileRemove", unpin: "unpin", inputValueChange: "inputValueChange" }, host: { properties: { "class": "this.className", "attr.dir": "this.dirAttr" } }, providers: [
5161
6294
  LocalizationService,
5162
6295
  ChatService,
6296
+ SuggestionsScrollService,
5163
6297
  {
5164
6298
  provide: L10N_PREFIX,
5165
6299
  useValue: 'kendo.chat'
5166
6300
  }
5167
- ], queries: [{ propertyName: "attachmentTemplate", first: true, predicate: AttachmentTemplateDirective, descendants: true }, { propertyName: "chatHeaderTemplate", first: true, predicate: ChatHeaderTemplateDirective, descendants: true }, { propertyName: "messageTemplate", first: true, predicate: MessageTemplateDirective, descendants: true }, { propertyName: "timestampTemplate", first: true, predicate: ChatTimestampTemplateDirective, descendants: true }, { propertyName: "suggestionTemplate", first: true, predicate: ChatSuggestionTemplateDirective, descendants: true }, { propertyName: "statusTemplate", first: true, predicate: ChatStatusTemplateDirective, descendants: true }, { propertyName: "messageBoxTemplate", first: true, predicate: ChatMessageBoxTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "messageBox", first: true, predicate: ["messageBox"], descendants: true }, { propertyName: "messageList", first: true, predicate: ["messageList"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
6301
+ ], queries: [{ propertyName: "attachmentTemplate", first: true, predicate: AttachmentTemplateDirective, descendants: true }, { propertyName: "chatHeaderTemplate", first: true, predicate: ChatHeaderTemplateDirective, descendants: true }, { propertyName: "chatNoDataTemplate", first: true, predicate: NoDataTemplateDirective, descendants: true }, { propertyName: "authorMessageContentTemplate", first: true, predicate: AuthorMessageContentTemplateDirective, descendants: true }, { propertyName: "receiverMessageContentTemplate", first: true, predicate: ReceiverMessageContentTemplateDirective, descendants: true }, { propertyName: "messageContentTemplate", first: true, predicate: MessageContentTemplateDirective, descendants: true }, { propertyName: "authorMessageTemplate", first: true, predicate: AuthorMessageTemplateDirective, descendants: true }, { propertyName: "receiverMessageTemplate", first: true, predicate: ReceiverMessageTemplateDirective, descendants: true }, { propertyName: "messageTemplate", first: true, predicate: MessageTemplateDirective, descendants: true }, { propertyName: "timestampTemplate", first: true, predicate: ChatTimestampTemplateDirective, descendants: true }, { propertyName: "suggestionTemplate", first: true, predicate: ChatSuggestionTemplateDirective, descendants: true }, { propertyName: "statusTemplate", first: true, predicate: ChatStatusTemplateDirective, descendants: true }, { propertyName: "messageBoxTemplate", first: true, predicate: ChatMessageBoxTemplateDirective, descendants: true }, { propertyName: "userStatusTemplate", first: true, predicate: ChatUserStatusTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "messagesContextMenu", first: true, predicate: ["messagesContextMenu"], descendants: true }, { propertyName: "messageBox", first: true, predicate: ["messageBox"], descendants: true }, { propertyName: "messageList", first: true, predicate: ["messageList"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
5168
6302
  <ng-container kendoChatLocalizedMessages
5169
6303
  i18n-deletedMessageSenderText="kendo.chat.deletedMessageSenderText|The text that is displayed when the sender deletes a message"
5170
6304
  deletedMessageSenderText="You removed this message."
@@ -5213,10 +6347,16 @@ class ChatComponent {
5213
6347
 
5214
6348
  i18n-downloadAllFilesText="kendo.chat.downloadAllFilesText|Sets the text that is displayed in the download section of the message."
5215
6349
  downloadAllFilesText="Download all"
6350
+
6351
+ i18n-previousSuggestionsButtonTitle="kendo.chat.previousSuggestionsButtonTitle|The title of the button that scrolls to the previous suggestions"
6352
+ previousSuggestionsButtonTitle="Scroll left"
6353
+
6354
+ i18n-nextSuggestionsButtonTitle="kendo.chat.nextSuggestionsButtonTitle|The title of the button that scrolls to the next suggestions"
6355
+ nextSuggestionsButtonTitle="Scroll right"
5216
6356
  >
5217
6357
  </ng-container>
5218
6358
 
5219
- <kendo-appbar *ngIf="chatHeaderTemplate" class="k-chat-header" positionMode="sticky">
6359
+ <kendo-appbar *ngIf="chatHeaderTemplate" class="k-chat-header" positionMode="sticky" themeColor="inherit">
5220
6360
  <ng-container *ngTemplateOutlet="chatHeaderTemplate.templateRef"></ng-container>
5221
6361
  </kendo-appbar>
5222
6362
  <div class="k-message-reference k-message-reference-receiver k-message-pinned" *ngIf="pinnedMessage" (click)="scrollToPinnedMessage()">
@@ -5232,7 +6372,7 @@ class ChatComponent {
5232
6372
  </div>
5233
6373
  <div
5234
6374
  #messageList
5235
- class="k-message-list k-avatars"
6375
+ class="k-message-list"
5236
6376
  aria-live="polite"
5237
6377
  role="log"
5238
6378
  kendoChatScrollAnchor
@@ -5240,19 +6380,32 @@ class ChatComponent {
5240
6380
  #anchor="scrollAnchor"
5241
6381
  [(autoScroll)]="autoScroll"
5242
6382
  >
5243
- <kendo-chat-message-list
5244
- [messages]="processedMessages"
5245
- [messageTemplate]="messageTemplate"
5246
- [timestampTemplate]="timestampTemplate"
5247
- [statusTemplate]="statusTemplate"
5248
- [localization]="localizationText"
5249
- [attachmentTemplate]="attachmentTemplate"
5250
- [authorId]="authorId"
5251
- (executeAction)="dispatchAction($event)"
5252
- (resize)="anchor.scrollToBottom()"
5253
- (navigate)="this.autoScroll = false"
5254
- >
5255
- </kendo-chat-message-list>
6383
+ <div *ngIf="processedMessages && processedMessages.length === 0; else chatMessageList" class="k-message-list-content k-message-list-content-empty">
6384
+ <ng-template
6385
+ [ngTemplateOutlet]="chatNoDataTemplate?.templateRef">
6386
+ </ng-template>
6387
+ </div>
6388
+ <ng-template #chatMessageList>
6389
+ <kendo-chat-message-list
6390
+ [messages]="processedMessages"
6391
+ [authorMessageContentTemplate]="authorMessageContentTemplate"
6392
+ [receiverMessageContentTemplate]="receiverMessageContentTemplate"
6393
+ [messageContentTemplate]="messageContentTemplate"
6394
+ [authorMessageTemplate]="authorMessageTemplate"
6395
+ [receiverMessageTemplate]="receiverMessageTemplate"
6396
+ [messageTemplate]="messageTemplate"
6397
+ [timestampTemplate]="timestampTemplate"
6398
+ [statusTemplate]="statusTemplate"
6399
+ [userStatusTemplate]="userStatusTemplate"
6400
+ [localization]="localizationText"
6401
+ [attachmentTemplate]="attachmentTemplate"
6402
+ [authorId]="authorId"
6403
+ (executeAction)="dispatchAction($event)"
6404
+ (resize)="anchor.scrollToBottom()"
6405
+ (navigate)="this.autoScroll = false"
6406
+ >
6407
+ </kendo-chat-message-list>
6408
+ </ng-template>
5256
6409
  </div>
5257
6410
  <kendo-message-box
5258
6411
  #messageBox
@@ -5270,14 +6423,24 @@ class ChatComponent {
5270
6423
  (fileRemove)="fileRemove.emit($event)"
5271
6424
  >
5272
6425
  </kendo-message-box>
5273
- `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective$1, selector: "[kendoChatLocalizedMessages]" }, { kind: "directive", type: ScrollAnchorDirective, selector: "[kendoChatScrollAnchor]", inputs: ["autoScroll"], outputs: ["autoScrollChange"], exportAs: ["scrollAnchor"] }, { kind: "component", type: MessageListComponent, selector: "kendo-chat-message-list", inputs: ["messages", "attachmentTemplate", "messageTemplate", "timestampTemplate", "statusTemplate", "localization", "authorId"], outputs: ["executeAction", "navigate", "resize"] }, { kind: "component", type: MessageBoxComponent, selector: "kendo-message-box", inputs: ["authorId", "autoScroll", "suggestions", "placeholder", "inputValue", "localization", "messageBoxTemplate", "suggestionTemplate"], outputs: ["sendMessage", "executeSuggestion", "fileSelect", "fileRemove"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }, { kind: "component", type: AppBarComponent, selector: "kendo-appbar", inputs: ["position", "positionMode", "themeColor"], exportAs: ["kendoAppBar"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: i2.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
6426
+
6427
+ <kendo-contextmenu
6428
+ #messagesContextMenu
6429
+ [items]="contextMenuActions"
6430
+ [popupAlign]="{ horizontal: 'right', vertical: 'top' }"
6431
+ [collision]="{ horizontal: 'flip', vertical: 'flip'}"
6432
+ (popupClose)="handleMenuClose($event)"
6433
+ (select)="onContextMenuAction($event.item.originalAction)"
6434
+ ></kendo-contextmenu>
6435
+ `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective$1, selector: "[kendoChatLocalizedMessages]" }, { kind: "directive", type: ScrollAnchorDirective, selector: "[kendoChatScrollAnchor]", inputs: ["autoScroll"], outputs: ["autoScrollChange"], exportAs: ["scrollAnchor"] }, { kind: "component", type: MessageListComponent, selector: "kendo-chat-message-list", inputs: ["messages", "attachmentTemplate", "authorMessageContentTemplate", "receiverMessageContentTemplate", "messageContentTemplate", "authorMessageTemplate", "receiverMessageTemplate", "messageTemplate", "timestampTemplate", "statusTemplate", "userStatusTemplate", "localization", "authorId"], outputs: ["executeAction", "navigate", "resize"] }, { kind: "component", type: MessageBoxComponent, selector: "kendo-message-box", inputs: ["authorId", "autoScroll", "suggestions", "placeholder", "inputValue", "localization", "messageBoxTemplate", "suggestionTemplate"], outputs: ["sendMessage", "executeSuggestion", "fileSelect", "fileRemove"] }, { kind: "component", type: MessageReferenceComponent, selector: "chat-message-reference-content", inputs: ["message"] }, { kind: "component", type: AppBarComponent, selector: "kendo-appbar", inputs: ["position", "positionMode", "themeColor"], exportAs: ["kendoAppBar"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: i2.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: ContextMenuComponent, selector: "kendo-contextmenu", inputs: ["showOn", "target", "filter", "alignToAnchor", "vertical", "popupAnimate", "popupAlign", "anchorAlign", "collision", "appendTo", "ariaLabel"], outputs: ["popupOpen", "popupClose", "select", "open", "close"], exportAs: ["kendoContextMenu"] }] });
5274
6436
  }
5275
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatComponent, decorators: [{
6437
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatComponent, decorators: [{
5276
6438
  type: Component,
5277
6439
  args: [{
5278
6440
  providers: [
5279
6441
  LocalizationService,
5280
6442
  ChatService,
6443
+ SuggestionsScrollService,
5281
6444
  {
5282
6445
  provide: L10N_PREFIX,
5283
6446
  useValue: 'kendo.chat'
@@ -5333,10 +6496,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
5333
6496
 
5334
6497
  i18n-downloadAllFilesText="kendo.chat.downloadAllFilesText|Sets the text that is displayed in the download section of the message."
5335
6498
  downloadAllFilesText="Download all"
6499
+
6500
+ i18n-previousSuggestionsButtonTitle="kendo.chat.previousSuggestionsButtonTitle|The title of the button that scrolls to the previous suggestions"
6501
+ previousSuggestionsButtonTitle="Scroll left"
6502
+
6503
+ i18n-nextSuggestionsButtonTitle="kendo.chat.nextSuggestionsButtonTitle|The title of the button that scrolls to the next suggestions"
6504
+ nextSuggestionsButtonTitle="Scroll right"
5336
6505
  >
5337
6506
  </ng-container>
5338
6507
 
5339
- <kendo-appbar *ngIf="chatHeaderTemplate" class="k-chat-header" positionMode="sticky">
6508
+ <kendo-appbar *ngIf="chatHeaderTemplate" class="k-chat-header" positionMode="sticky" themeColor="inherit">
5340
6509
  <ng-container *ngTemplateOutlet="chatHeaderTemplate.templateRef"></ng-container>
5341
6510
  </kendo-appbar>
5342
6511
  <div class="k-message-reference k-message-reference-receiver k-message-pinned" *ngIf="pinnedMessage" (click)="scrollToPinnedMessage()">
@@ -5352,7 +6521,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
5352
6521
  </div>
5353
6522
  <div
5354
6523
  #messageList
5355
- class="k-message-list k-avatars"
6524
+ class="k-message-list"
5356
6525
  aria-live="polite"
5357
6526
  role="log"
5358
6527
  kendoChatScrollAnchor
@@ -5360,19 +6529,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
5360
6529
  #anchor="scrollAnchor"
5361
6530
  [(autoScroll)]="autoScroll"
5362
6531
  >
5363
- <kendo-chat-message-list
5364
- [messages]="processedMessages"
5365
- [messageTemplate]="messageTemplate"
5366
- [timestampTemplate]="timestampTemplate"
5367
- [statusTemplate]="statusTemplate"
5368
- [localization]="localizationText"
5369
- [attachmentTemplate]="attachmentTemplate"
5370
- [authorId]="authorId"
5371
- (executeAction)="dispatchAction($event)"
5372
- (resize)="anchor.scrollToBottom()"
5373
- (navigate)="this.autoScroll = false"
5374
- >
5375
- </kendo-chat-message-list>
6532
+ <div *ngIf="processedMessages && processedMessages.length === 0; else chatMessageList" class="k-message-list-content k-message-list-content-empty">
6533
+ <ng-template
6534
+ [ngTemplateOutlet]="chatNoDataTemplate?.templateRef">
6535
+ </ng-template>
6536
+ </div>
6537
+ <ng-template #chatMessageList>
6538
+ <kendo-chat-message-list
6539
+ [messages]="processedMessages"
6540
+ [authorMessageContentTemplate]="authorMessageContentTemplate"
6541
+ [receiverMessageContentTemplate]="receiverMessageContentTemplate"
6542
+ [messageContentTemplate]="messageContentTemplate"
6543
+ [authorMessageTemplate]="authorMessageTemplate"
6544
+ [receiverMessageTemplate]="receiverMessageTemplate"
6545
+ [messageTemplate]="messageTemplate"
6546
+ [timestampTemplate]="timestampTemplate"
6547
+ [statusTemplate]="statusTemplate"
6548
+ [userStatusTemplate]="userStatusTemplate"
6549
+ [localization]="localizationText"
6550
+ [attachmentTemplate]="attachmentTemplate"
6551
+ [authorId]="authorId"
6552
+ (executeAction)="dispatchAction($event)"
6553
+ (resize)="anchor.scrollToBottom()"
6554
+ (navigate)="this.autoScroll = false"
6555
+ >
6556
+ </kendo-chat-message-list>
6557
+ </ng-template>
5376
6558
  </div>
5377
6559
  <kendo-message-box
5378
6560
  #messageBox
@@ -5390,11 +6572,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
5390
6572
  (fileRemove)="fileRemove.emit($event)"
5391
6573
  >
5392
6574
  </kendo-message-box>
6575
+
6576
+ <kendo-contextmenu
6577
+ #messagesContextMenu
6578
+ [items]="contextMenuActions"
6579
+ [popupAlign]="{ horizontal: 'right', vertical: 'top' }"
6580
+ [collision]="{ horizontal: 'flip', vertical: 'flip'}"
6581
+ (popupClose)="handleMenuClose($event)"
6582
+ (select)="onContextMenuAction($event.item.originalAction)"
6583
+ ></kendo-contextmenu>
5393
6584
  `,
5394
6585
  standalone: true,
5395
- imports: [LocalizedMessagesDirective$1, ScrollAnchorDirective, MessageListComponent, MessageBoxComponent, MessageReferenceComponent, AppBarComponent, NgTemplateOutlet, NgIf, IconWrapperComponent, KENDO_BUTTON]
6586
+ imports: [LocalizedMessagesDirective$1, ScrollAnchorDirective, MessageListComponent, MessageBoxComponent, MessageReferenceComponent, AppBarComponent, NgTemplateOutlet, NgIf, IconWrapperComponent, KENDO_BUTTON, ContextMenuComponent]
5396
6587
  }]
5397
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: ChatService }]; }, propDecorators: { messages: [{
6588
+ }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: ChatService }], propDecorators: { messages: [{
5398
6589
  type: Input
5399
6590
  }], authorId: [{
5400
6591
  type: Input
@@ -5418,13 +6609,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
5418
6609
  type: Input
5419
6610
  }], inputValue: [{
5420
6611
  type: Input
6612
+ }], authorMessageSettings: [{
6613
+ type: Input
6614
+ }], receiverMessageSettings: [{
6615
+ type: Input
5421
6616
  }], messageContextMenuActions: [{
5422
6617
  type: Input
5423
6618
  }], fileActions: [{
5424
6619
  type: Input
5425
- }], suggestions: [{
6620
+ }], messageFilesLayout: [{
6621
+ type: Input
6622
+ }], suggestionsLayout: [{
5426
6623
  type: Input
5427
- }], messageToolbarVisibility: [{
6624
+ }], quickActionsLayout: [{
6625
+ type: Input
6626
+ }], suggestions: [{
5428
6627
  type: Input
5429
6628
  }], sendButtonSettings: [{
5430
6629
  type: Input
@@ -5458,12 +6657,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
5458
6657
  }], dirAttr: [{
5459
6658
  type: HostBinding,
5460
6659
  args: ['attr.dir']
6660
+ }], messagesContextMenu: [{
6661
+ type: ViewChild,
6662
+ args: ['messagesContextMenu']
5461
6663
  }], attachmentTemplate: [{
5462
6664
  type: ContentChild,
5463
6665
  args: [AttachmentTemplateDirective]
5464
6666
  }], chatHeaderTemplate: [{
5465
6667
  type: ContentChild,
5466
6668
  args: [ChatHeaderTemplateDirective]
6669
+ }], chatNoDataTemplate: [{
6670
+ type: ContentChild,
6671
+ args: [NoDataTemplateDirective]
6672
+ }], authorMessageContentTemplate: [{
6673
+ type: ContentChild,
6674
+ args: [AuthorMessageContentTemplateDirective]
6675
+ }], receiverMessageContentTemplate: [{
6676
+ type: ContentChild,
6677
+ args: [ReceiverMessageContentTemplateDirective]
6678
+ }], messageContentTemplate: [{
6679
+ type: ContentChild,
6680
+ args: [MessageContentTemplateDirective]
6681
+ }], authorMessageTemplate: [{
6682
+ type: ContentChild,
6683
+ args: [AuthorMessageTemplateDirective]
6684
+ }], receiverMessageTemplate: [{
6685
+ type: ContentChild,
6686
+ args: [ReceiverMessageTemplateDirective]
5467
6687
  }], messageTemplate: [{
5468
6688
  type: ContentChild,
5469
6689
  args: [MessageTemplateDirective]
@@ -5479,6 +6699,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
5479
6699
  }], messageBoxTemplate: [{
5480
6700
  type: ContentChild,
5481
6701
  args: [ChatMessageBoxTemplateDirective]
6702
+ }], userStatusTemplate: [{
6703
+ type: ContentChild,
6704
+ args: [ChatUserStatusTemplateDirective]
5482
6705
  }], messageBox: [{
5483
6706
  type: ViewChild,
5484
6707
  args: ['messageBox']
@@ -5511,15 +6734,15 @@ class CustomMessagesComponent extends Messages$1 {
5511
6734
  get override() {
5512
6735
  return true;
5513
6736
  }
5514
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
5515
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-chat-messages", providers: [
6737
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
6738
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-chat-messages", providers: [
5516
6739
  {
5517
6740
  provide: Messages$1,
5518
6741
  useExisting: forwardRef(() => CustomMessagesComponent)
5519
6742
  }
5520
6743
  ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
5521
6744
  }
5522
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomMessagesComponent, decorators: [{
6745
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CustomMessagesComponent, decorators: [{
5523
6746
  type: Component,
5524
6747
  args: [{
5525
6748
  providers: [
@@ -5532,7 +6755,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
5532
6755
  template: ``,
5533
6756
  standalone: true
5534
6757
  }]
5535
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
6758
+ }], ctorParameters: () => [{ type: i1.LocalizationService }] });
5536
6759
 
5537
6760
  /**
5538
6761
  * Represents a Hero Card component.
@@ -5575,8 +6798,8 @@ class HeroCardComponent {
5575
6798
  onClick(action) {
5576
6799
  this.executeAction.next(action);
5577
6800
  }
5578
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HeroCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5579
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: HeroCardComponent, isStandalone: true, selector: "kendo-chat-hero-card", inputs: { imageUrl: "imageUrl", title: "title", subtitle: "subtitle", actions: "actions" }, outputs: { executeAction: "executeAction" }, host: { properties: { "class.k-card": "this.cssClass" } }, ngImport: i0, template: `
6801
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: HeroCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6802
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: HeroCardComponent, isStandalone: true, selector: "kendo-chat-hero-card", inputs: { imageUrl: "imageUrl", title: "title", subtitle: "subtitle", actions: "actions" }, outputs: { executeAction: "executeAction" }, host: { properties: { "class.k-card": "this.cssClass" } }, ngImport: i0, template: `
5580
6803
  <img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />
5581
6804
  <div class="k-card-body">
5582
6805
  <h5 class="k-card-title" *ngIf="title">
@@ -5600,7 +6823,7 @@ class HeroCardComponent {
5600
6823
  </div>
5601
6824
  `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
5602
6825
  }
5603
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HeroCardComponent, decorators: [{
6826
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: HeroCardComponent, decorators: [{
5604
6827
  type: Component,
5605
6828
  args: [{
5606
6829
  selector: 'kendo-chat-hero-card',
@@ -5661,10 +6884,10 @@ class Messages extends ComponentMessages {
5661
6884
  * The title for the Speech to Text button.
5662
6885
  */
5663
6886
  speechToTextButtonTitle;
5664
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
5665
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: Messages, inputs: { commandsButtonTitle: "commandsButtonTitle", generateButtonTitle: "generateButtonTitle", speechToTextButtonTitle: "speechToTextButtonTitle" }, usesInheritance: true, ngImport: i0 });
6887
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6888
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: Messages, inputs: { commandsButtonTitle: "commandsButtonTitle", generateButtonTitle: "generateButtonTitle", speechToTextButtonTitle: "speechToTextButtonTitle" }, usesInheritance: true, ngImport: i0 });
5666
6889
  }
5667
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, decorators: [{
6890
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages, decorators: [{
5668
6891
  type: Directive
5669
6892
  }], propDecorators: { commandsButtonTitle: [{
5670
6893
  type: Input
@@ -5683,15 +6906,15 @@ class LocalizedMessagesDirective extends Messages {
5683
6906
  super();
5684
6907
  this.service = service;
5685
6908
  }
5686
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
5687
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoInlineAIPromptLocalizedMessages]", providers: [
6909
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
6910
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoInlineAIPromptLocalizedMessages]", providers: [
5688
6911
  {
5689
6912
  provide: Messages,
5690
6913
  useExisting: forwardRef(() => LocalizedMessagesDirective)
5691
6914
  }
5692
6915
  ], usesInheritance: true, ngImport: i0 });
5693
6916
  }
5694
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
6917
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
5695
6918
  type: Directive,
5696
6919
  args: [{
5697
6920
  providers: [
@@ -5703,7 +6926,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
5703
6926
  selector: '[kendoInlineAIPromptLocalizedMessages]',
5704
6927
  standalone: true
5705
6928
  }]
5706
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
6929
+ }], ctorParameters: () => [{ type: i1.LocalizationService }] });
5707
6930
 
5708
6931
  /**
5709
6932
  * @hidden
@@ -5981,8 +7204,8 @@ class InlineAIPromptContentComponent {
5981
7204
  });
5982
7205
  }
5983
7206
  }
5984
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptContentComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1.LocalizationService, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
5985
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: InlineAIPromptContentComponent, isStandalone: true, selector: "kendo-inlineaiprompt-content", inputs: { popupElement: "popupElement", promptValue: "promptValue", placeholder: "placeholder", promptOutput: "promptOutput", enableSpeechToText: "enableSpeechToText", streaming: "streaming", width: "width", maxHeight: "maxHeight", appendTo: "appendTo", outputActions: "outputActions", promptCommands: "promptCommands", outputTemplate: "outputTemplate" }, outputs: { promptRequest: "promptRequest", commandExecute: "commandExecute", outputActionClick: "outputActionClick", promptRequestCancel: "promptRequestCancel", close: "close", promptValueChange: "promptValueChange" }, host: { listeners: { "keydown": "onEscapeKey($event)" }, properties: { "class.k-prompt": "this.className", "attr.dir": "this.dirAttr", "style.max-height": "this.maxHeightStyle", "style.width": "this.widthStyle" } }, providers: [
7207
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptContentComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1.LocalizationService, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
7208
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InlineAIPromptContentComponent, isStandalone: true, selector: "kendo-inlineaiprompt-content", inputs: { popupElement: "popupElement", promptValue: "promptValue", placeholder: "placeholder", promptOutput: "promptOutput", enableSpeechToText: "enableSpeechToText", streaming: "streaming", width: "width", maxHeight: "maxHeight", appendTo: "appendTo", outputActions: "outputActions", promptCommands: "promptCommands", outputTemplate: "outputTemplate" }, outputs: { promptRequest: "promptRequest", commandExecute: "commandExecute", outputActionClick: "outputActionClick", promptRequestCancel: "promptRequestCancel", close: "close", promptValueChange: "promptValueChange" }, host: { listeners: { "keydown": "onEscapeKey($event)" }, properties: { "class.k-prompt": "this.className", "attr.dir": "this.dirAttr", "style.max-height": "this.maxHeightStyle", "style.width": "this.widthStyle" } }, providers: [
5986
7209
  LocalizationService,
5987
7210
  {
5988
7211
  provide: L10N_PREFIX,
@@ -6084,7 +7307,7 @@ class InlineAIPromptContentComponent {
6084
7307
  </kendo-contextmenu>
6085
7308
  `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoInlineAIPromptLocalizedMessages]" }, { kind: "component", type: i2.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: i2.SpeechToTextButtonComponent, selector: "button[kendoSpeechToTextButton]", inputs: ["disabled", "size", "rounded", "fillMode", "themeColor", "integrationMode", "lang", "continuous", "interimResults", "maxAlternatives"], outputs: ["start", "end", "result", "error", "click"], exportAs: ["kendoSpeechToTextButton"] }, { kind: "component", type: i3.TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "maxResizableRows", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "component", type: i3.TextAreaPrefixComponent, selector: "kendo-textarea-prefix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaPrefix"] }, { kind: "component", type: i3.TextAreaSuffixComponent, selector: "kendo-textarea-suffix", inputs: ["flow", "orientation"], exportAs: ["kendoTextAreaSuffix"] }, { kind: "component", type: i4.ContextMenuComponent, selector: "kendo-contextmenu", inputs: ["showOn", "target", "filter", "alignToAnchor", "vertical", "popupAnimate", "popupAlign", "anchorAlign", "collision", "appendTo", "ariaLabel"], outputs: ["popupOpen", "popupClose", "select", "open", "close"], exportAs: ["kendoContextMenu"] }, { kind: "component", type: i5.CardComponent, selector: "kendo-card", inputs: ["orientation", "width"] }, { kind: "component", type: i5.CardActionsComponent, selector: "kendo-card-actions", inputs: ["orientation", "layout", "actions"], outputs: ["action"] }, { kind: "component", type: i5.CardBodyComponent, selector: "kendo-card-body" }] });
6086
7309
  }
6087
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptContentComponent, decorators: [{
7310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptContentComponent, decorators: [{
6088
7311
  type: Component,
6089
7312
  args: [{
6090
7313
  exportAs: 'kendoInlineAIPromptContent',
@@ -6194,11 +7417,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6194
7417
  standalone: true,
6195
7418
  imports: [NgClass, NgIf, NgFor, NgTemplateOutlet, LocalizedMessagesDirective, KENDO_BUTTONS, KENDO_TEXTAREA, KENDO_CONTEXTMENU, KENDO_CARD],
6196
7419
  }]
6197
- }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1.LocalizationService, decorators: [{
7420
+ }], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i1.LocalizationService, decorators: [{
6198
7421
  type: Optional
6199
7422
  }, {
6200
7423
  type: SkipSelf
6201
- }] }]; }, propDecorators: { className: [{
7424
+ }] }], propDecorators: { className: [{
6202
7425
  type: HostBinding,
6203
7426
  args: ['class.k-prompt']
6204
7427
  }], dirAttr: [{
@@ -6277,18 +7500,18 @@ class InlineAIPromptOutputTemplateDirective {
6277
7500
  constructor(templateRef) {
6278
7501
  this.templateRef = templateRef;
6279
7502
  }
6280
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptOutputTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
6281
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: InlineAIPromptOutputTemplateDirective, isStandalone: true, selector: "[kendoInlineAIPromptOutputTemplate]", ngImport: i0 });
7503
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptOutputTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
7504
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: InlineAIPromptOutputTemplateDirective, isStandalone: true, selector: "[kendoInlineAIPromptOutputTemplate]", ngImport: i0 });
6282
7505
  }
6283
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptOutputTemplateDirective, decorators: [{
7506
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptOutputTemplateDirective, decorators: [{
6284
7507
  type: Directive,
6285
7508
  args: [{
6286
7509
  selector: '[kendoInlineAIPromptOutputTemplate]',
6287
7510
  standalone: true
6288
7511
  }]
6289
- }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
7512
+ }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
6290
7513
  type: Optional
6291
- }] }]; } });
7514
+ }] }] });
6292
7515
 
6293
7516
  /**
6294
7517
  * Represents the Kendo UI InlineAIPrompt component for Angular.
@@ -6470,8 +7693,8 @@ class InlineAIPromptComponent {
6470
7693
  onPromptValueChange(value) {
6471
7694
  this.promptValueChange.emit(value);
6472
7695
  }
6473
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptComponent, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
6474
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: InlineAIPromptComponent, isStandalone: true, selector: "kendo-inlineaiprompt", inputs: { promptValue: "promptValue", placeholder: "placeholder", promptOutput: "promptOutput", enableSpeechToText: "enableSpeechToText", streaming: "streaming", width: "width", maxHeight: "maxHeight", outputActions: "outputActions", promptCommands: "promptCommands", popupSettings: "popupSettings" }, outputs: { promptRequest: "promptRequest", commandExecute: "commandExecute", outputActionClick: "outputActionClick", promptRequestCancel: "promptRequestCancel", close: "close", promptValueChange: "promptValueChange" }, providers: [
7696
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptComponent, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
7697
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InlineAIPromptComponent, isStandalone: true, selector: "kendo-inlineaiprompt", inputs: { promptValue: "promptValue", placeholder: "placeholder", promptOutput: "promptOutput", enableSpeechToText: "enableSpeechToText", streaming: "streaming", width: "width", maxHeight: "maxHeight", outputActions: "outputActions", promptCommands: "promptCommands", popupSettings: "popupSettings" }, outputs: { promptRequest: "promptRequest", commandExecute: "commandExecute", outputActionClick: "outputActionClick", promptRequestCancel: "promptRequestCancel", close: "close", promptValueChange: "promptValueChange" }, providers: [
6475
7698
  LocalizationService,
6476
7699
  {
6477
7700
  provide: L10N_PREFIX,
@@ -6521,7 +7744,7 @@ class InlineAIPromptComponent {
6521
7744
  </kendo-popup>
6522
7745
  `, isInline: true, dependencies: [{ kind: "component", type: i1$2.PopupComponent, selector: "kendo-popup", inputs: ["animate", "anchor", "anchorAlign", "collision", "popupAlign", "copyAnchorStyles", "popupClass", "positionMode", "offset", "margin"], outputs: ["anchorViewportLeave", "close", "open", "positionChange"], exportAs: ["kendo-popup"] }, { kind: "component", type: InlineAIPromptContentComponent, selector: "kendo-inlineaiprompt-content", inputs: ["popupElement", "promptValue", "placeholder", "promptOutput", "enableSpeechToText", "streaming", "width", "maxHeight", "appendTo", "outputActions", "promptCommands", "outputTemplate"], outputs: ["promptRequest", "commandExecute", "outputActionClick", "promptRequestCancel", "close", "promptValueChange"], exportAs: ["kendoInlineAIPromptContent"] }, { kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoInlineAIPromptLocalizedMessages]" }] });
6523
7746
  }
6524
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptComponent, decorators: [{
7747
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptComponent, decorators: [{
6525
7748
  type: Component,
6526
7749
  args: [{
6527
7750
  exportAs: 'kendoInlineAIPrompt',
@@ -6579,7 +7802,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6579
7802
  standalone: true,
6580
7803
  imports: [KENDO_POPUP, InlineAIPromptContentComponent, LocalizedMessagesDirective],
6581
7804
  }]
6582
- }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ElementRef }]; }, propDecorators: { promptValue: [{
7805
+ }], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ElementRef }], propDecorators: { promptValue: [{
6583
7806
  type: Input
6584
7807
  }], placeholder: [{
6585
7808
  type: Input
@@ -6645,15 +7868,15 @@ class InlineAIPromptCustomMessagesComponent extends Messages {
6645
7868
  get override() {
6646
7869
  return true;
6647
7870
  }
6648
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
6649
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: InlineAIPromptCustomMessagesComponent, isStandalone: true, selector: "kendo-inlineaiprompt-messages", providers: [
7871
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
7872
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: InlineAIPromptCustomMessagesComponent, isStandalone: true, selector: "kendo-inlineaiprompt-messages", providers: [
6650
7873
  {
6651
7874
  provide: Messages,
6652
7875
  useExisting: forwardRef(() => InlineAIPromptCustomMessagesComponent)
6653
7876
  }
6654
7877
  ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
6655
7878
  }
6656
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptCustomMessagesComponent, decorators: [{
7879
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptCustomMessagesComponent, decorators: [{
6657
7880
  type: Component,
6658
7881
  args: [{
6659
7882
  providers: [
@@ -6666,7 +7889,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6666
7889
  template: ``,
6667
7890
  standalone: true
6668
7891
  }]
6669
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
7892
+ }], ctorParameters: () => [{ type: i1.LocalizationService }] });
6670
7893
 
6671
7894
  /**
6672
7895
  * Utility array that contains all AIPrompt related components and directives.
@@ -6718,13 +7941,20 @@ const KENDO_CHAT = [
6718
7941
  ChatComponent,
6719
7942
  CustomMessagesComponent,
6720
7943
  AttachmentTemplateDirective,
7944
+ AuthorMessageContentTemplateDirective,
7945
+ ReceiverMessageContentTemplateDirective,
7946
+ MessageContentTemplateDirective,
7947
+ AuthorMessageTemplateDirective,
7948
+ ReceiverMessageTemplateDirective,
6721
7949
  MessageTemplateDirective,
6722
7950
  HeroCardComponent,
6723
7951
  ChatMessageBoxTemplateDirective,
6724
7952
  ChatHeaderTemplateDirective,
7953
+ NoDataTemplateDirective,
6725
7954
  ChatTimestampTemplateDirective,
6726
7955
  ChatStatusTemplateDirective,
6727
- ChatSuggestionTemplateDirective
7956
+ ChatSuggestionTemplateDirective,
7957
+ ChatUserStatusTemplateDirective
6728
7958
  ];
6729
7959
  /**
6730
7960
  * Utility array that contains all InlineAIPrompt related components and directives.
@@ -6794,11 +8024,11 @@ const KENDO_CONVERSATIONALUI = [
6794
8024
  * ```
6795
8025
  */
6796
8026
  class AIPromptModule {
6797
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6798
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: AIPromptModule, imports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, CustomViewComponent, AIPromptCustomMessagesComponent, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, AIPromptOutputTemplateDirective, AIPromptOutputBodyTemplateDirective], exports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, CustomViewComponent, AIPromptCustomMessagesComponent, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, AIPromptOutputTemplateDirective, AIPromptOutputBodyTemplateDirective] });
6799
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent] });
8027
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
8028
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: AIPromptModule, imports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, CustomViewComponent, AIPromptCustomMessagesComponent, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, AIPromptOutputTemplateDirective, AIPromptOutputBodyTemplateDirective], exports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, CustomViewComponent, AIPromptCustomMessagesComponent, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, AIPromptOutputTemplateDirective, AIPromptOutputBodyTemplateDirective] });
8029
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent] });
6800
8030
  }
6801
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AIPromptModule, decorators: [{
8031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptModule, decorators: [{
6802
8032
  type: NgModule,
6803
8033
  args: [{
6804
8034
  exports: [...KENDO_AIPROMPT],
@@ -6830,11 +8060,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6830
8060
  * ```
6831
8061
  */
6832
8062
  class ChatModule {
6833
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6834
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: ChatModule, imports: [ChatComponent, CustomMessagesComponent, AttachmentTemplateDirective, MessageTemplateDirective, HeroCardComponent, ChatMessageBoxTemplateDirective, ChatHeaderTemplateDirective, ChatTimestampTemplateDirective, ChatStatusTemplateDirective, ChatSuggestionTemplateDirective], exports: [ChatComponent, CustomMessagesComponent, AttachmentTemplateDirective, MessageTemplateDirective, HeroCardComponent, ChatMessageBoxTemplateDirective, ChatHeaderTemplateDirective, ChatTimestampTemplateDirective, ChatStatusTemplateDirective, ChatSuggestionTemplateDirective] });
6835
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatModule, providers: [IconsService, ResizeBatchService], imports: [ChatComponent, HeroCardComponent] });
8063
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
8064
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: ChatModule, imports: [ChatComponent, CustomMessagesComponent, AttachmentTemplateDirective, AuthorMessageContentTemplateDirective, ReceiverMessageContentTemplateDirective, MessageContentTemplateDirective, AuthorMessageTemplateDirective, ReceiverMessageTemplateDirective, MessageTemplateDirective, HeroCardComponent, ChatMessageBoxTemplateDirective, ChatHeaderTemplateDirective, NoDataTemplateDirective, ChatTimestampTemplateDirective, ChatStatusTemplateDirective, ChatSuggestionTemplateDirective, ChatUserStatusTemplateDirective], exports: [ChatComponent, CustomMessagesComponent, AttachmentTemplateDirective, AuthorMessageContentTemplateDirective, ReceiverMessageContentTemplateDirective, MessageContentTemplateDirective, AuthorMessageTemplateDirective, ReceiverMessageTemplateDirective, MessageTemplateDirective, HeroCardComponent, ChatMessageBoxTemplateDirective, ChatHeaderTemplateDirective, NoDataTemplateDirective, ChatTimestampTemplateDirective, ChatStatusTemplateDirective, ChatSuggestionTemplateDirective, ChatUserStatusTemplateDirective] });
8065
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatModule, providers: [IconsService, ResizeBatchService], imports: [ChatComponent, HeroCardComponent] });
6836
8066
  }
6837
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatModule, decorators: [{
8067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatModule, decorators: [{
6838
8068
  type: NgModule,
6839
8069
  args: [{
6840
8070
  exports: [...KENDO_CHAT],
@@ -6863,11 +8093,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6863
8093
  * ```
6864
8094
  */
6865
8095
  class ConversationalUIModule {
6866
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ConversationalUIModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6867
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: ConversationalUIModule, imports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, CustomViewComponent, AIPromptCustomMessagesComponent, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, AIPromptOutputTemplateDirective, AIPromptOutputBodyTemplateDirective, ChatComponent, CustomMessagesComponent, AttachmentTemplateDirective, MessageTemplateDirective, HeroCardComponent, ChatMessageBoxTemplateDirective, ChatHeaderTemplateDirective, ChatTimestampTemplateDirective, ChatStatusTemplateDirective, ChatSuggestionTemplateDirective, InlineAIPromptComponent, InlineAIPromptOutputTemplateDirective, InlineAIPromptCustomMessagesComponent], exports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, CustomViewComponent, AIPromptCustomMessagesComponent, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, AIPromptOutputTemplateDirective, AIPromptOutputBodyTemplateDirective, ChatComponent, CustomMessagesComponent, AttachmentTemplateDirective, MessageTemplateDirective, HeroCardComponent, ChatMessageBoxTemplateDirective, ChatHeaderTemplateDirective, ChatTimestampTemplateDirective, ChatStatusTemplateDirective, ChatSuggestionTemplateDirective, InlineAIPromptComponent, InlineAIPromptOutputTemplateDirective, InlineAIPromptCustomMessagesComponent] });
6868
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ConversationalUIModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, ChatComponent, HeroCardComponent, InlineAIPromptComponent] });
8096
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConversationalUIModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
8097
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: ConversationalUIModule, imports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, CustomViewComponent, AIPromptCustomMessagesComponent, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, AIPromptOutputTemplateDirective, AIPromptOutputBodyTemplateDirective, ChatComponent, CustomMessagesComponent, AttachmentTemplateDirective, AuthorMessageContentTemplateDirective, ReceiverMessageContentTemplateDirective, MessageContentTemplateDirective, AuthorMessageTemplateDirective, ReceiverMessageTemplateDirective, MessageTemplateDirective, HeroCardComponent, ChatMessageBoxTemplateDirective, ChatHeaderTemplateDirective, NoDataTemplateDirective, ChatTimestampTemplateDirective, ChatStatusTemplateDirective, ChatSuggestionTemplateDirective, ChatUserStatusTemplateDirective, InlineAIPromptComponent, InlineAIPromptOutputTemplateDirective, InlineAIPromptCustomMessagesComponent], exports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, CustomViewComponent, AIPromptCustomMessagesComponent, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, AIPromptOutputTemplateDirective, AIPromptOutputBodyTemplateDirective, ChatComponent, CustomMessagesComponent, AttachmentTemplateDirective, AuthorMessageContentTemplateDirective, ReceiverMessageContentTemplateDirective, MessageContentTemplateDirective, AuthorMessageTemplateDirective, ReceiverMessageTemplateDirective, MessageTemplateDirective, HeroCardComponent, ChatMessageBoxTemplateDirective, ChatHeaderTemplateDirective, NoDataTemplateDirective, ChatTimestampTemplateDirective, ChatStatusTemplateDirective, ChatSuggestionTemplateDirective, ChatUserStatusTemplateDirective, InlineAIPromptComponent, InlineAIPromptOutputTemplateDirective, InlineAIPromptCustomMessagesComponent] });
8098
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConversationalUIModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, ChatComponent, HeroCardComponent, InlineAIPromptComponent] });
6869
8099
  }
6870
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ConversationalUIModule, decorators: [{
8100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConversationalUIModule, decorators: [{
6871
8101
  type: NgModule,
6872
8102
  args: [{
6873
8103
  exports: [...KENDO_CONVERSATIONALUI],
@@ -6896,11 +8126,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
6896
8126
  * ```
6897
8127
  */
6898
8128
  class InlineAIPromptModule {
6899
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6900
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptModule, imports: [InlineAIPromptComponent, InlineAIPromptOutputTemplateDirective, InlineAIPromptCustomMessagesComponent], exports: [InlineAIPromptComponent, InlineAIPromptOutputTemplateDirective, InlineAIPromptCustomMessagesComponent] });
6901
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [InlineAIPromptComponent] });
8129
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
8130
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptModule, imports: [InlineAIPromptComponent, InlineAIPromptOutputTemplateDirective, InlineAIPromptCustomMessagesComponent], exports: [InlineAIPromptComponent, InlineAIPromptOutputTemplateDirective, InlineAIPromptCustomMessagesComponent] });
8131
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [InlineAIPromptComponent] });
6902
8132
  }
6903
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptModule, decorators: [{
8133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptModule, decorators: [{
6904
8134
  type: NgModule,
6905
8135
  args: [{
6906
8136
  exports: [...KENDO_INLINEAIPROMPT],
@@ -6982,15 +8212,15 @@ class InlineAIPromptService {
6982
8212
  });
6983
8213
  return component;
6984
8214
  }
6985
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptService, deps: [{ token: i1$2.PopupService }], target: i0.ɵɵFactoryTarget.Injectable });
6986
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptService, providedIn: 'root' });
8215
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptService, deps: [{ token: i1$2.PopupService }], target: i0.ɵɵFactoryTarget.Injectable });
8216
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptService, providedIn: 'root' });
6987
8217
  }
6988
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InlineAIPromptService, decorators: [{
8218
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InlineAIPromptService, decorators: [{
6989
8219
  type: Injectable,
6990
8220
  args: [{
6991
8221
  providedIn: 'root'
6992
8222
  }]
6993
- }], ctorParameters: function () { return [{ type: i1$2.PopupService }]; } });
8223
+ }], ctorParameters: () => [{ type: i1$2.PopupService }] });
6994
8224
 
6995
8225
  /**
6996
8226
  * Defines the settings for opening an Inline AI Prompt through the `InlineAIPromptService`.
@@ -7052,5 +8282,5 @@ class InlineAIPromptSettings {
7052
8282
  * Generated bundle index. Do not edit.
7053
8283
  */
7054
8284
 
7055
- export { AIPromptComponent, AIPromptCustomMessagesComponent, AIPromptModule, AIPromptOutputBodyTemplateDirective, AIPromptOutputTemplateDirective, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, AttachmentTemplateDirective, ChatComponent, ChatHeaderTemplateDirective, ChatMessageBoxTemplateDirective, ChatModule, ChatStatusTemplateDirective, ChatSuggestionTemplateDirective, ChatTimestampTemplateDirective, CommandViewComponent, ConversationalUIModule, CustomMessagesComponent, CustomViewComponent, ExecuteActionEvent, HeroCardComponent, InlineAIPromptComponent, InlineAIPromptCustomMessagesComponent, InlineAIPromptModule, InlineAIPromptOutputTemplateDirective, InlineAIPromptService, InlineAIPromptSettings, KENDO_AIPROMPT, KENDO_CHAT, KENDO_CONVERSATIONALUI, KENDO_INLINEAIPROMPT, MessageTemplateDirective, OutputViewComponent, PromptViewComponent, SendMessageEvent };
8285
+ export { AIPromptComponent, AIPromptCustomMessagesComponent, AIPromptModule, AIPromptOutputBodyTemplateDirective, AIPromptOutputTemplateDirective, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, AttachmentTemplateDirective, AuthorMessageContentTemplateDirective, AuthorMessageTemplateDirective, ChatComponent, ChatHeaderTemplateDirective, ChatMessageBoxTemplateDirective, ChatModule, ChatStatusTemplateDirective, ChatSuggestionTemplateDirective, ChatTimestampTemplateDirective, ChatUserStatusTemplateDirective, CommandViewComponent, ConversationalUIModule, CustomMessagesComponent, CustomViewComponent, ExecuteActionEvent, HeroCardComponent, InlineAIPromptComponent, InlineAIPromptCustomMessagesComponent, InlineAIPromptModule, InlineAIPromptOutputTemplateDirective, InlineAIPromptService, InlineAIPromptSettings, KENDO_AIPROMPT, KENDO_CHAT, KENDO_CONVERSATIONALUI, KENDO_INLINEAIPROMPT, MessageContentTemplateDirective, MessageTemplateDirective, NoDataTemplateDirective, OutputViewComponent, PromptViewComponent, ReceiverMessageContentTemplateDirective, ReceiverMessageTemplateDirective, SendMessageEvent };
7056
8286