@progress/kendo-angular-conversational-ui 11.2.0-develop.9 → 11.3.0-develop.1

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.
@@ -3,20 +3,20 @@
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 { Directive, Optional, isDevMode, forwardRef, Component, Input, HostBinding, ElementRef, ViewChild, ViewChildren, EventEmitter, Output, HostListener, ContentChild, NgModule } from '@angular/core';
6
+ import { Directive, Optional, isDevMode, EventEmitter, forwardRef, Component, Input, Output, HostBinding, ViewChildren, ElementRef, ViewChild, HostListener, ContentChild, NgModule } from '@angular/core';
7
7
  import * as i1$2 from '@progress/kendo-angular-l10n';
8
8
  import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
- import * as i1 from '@progress/kendo-angular-intl';
10
+ import * as i6 from '@progress/kendo-angular-common';
11
+ import { Keys, ResizeSensorModule } from '@progress/kendo-angular-common';
12
+ import { fromEvent, Subscription } from 'rxjs';
11
13
  import * as i2 from '@angular/common';
12
14
  import { CommonModule } from '@angular/common';
13
- import { fromEvent } from 'rxjs';
15
+ import * as i1 from '@progress/kendo-angular-intl';
14
16
  import { debounceTime } from 'rxjs/operators';
15
17
  import { chevronLeftIcon, chevronRightIcon } from '@progress/kendo-svg-icons';
16
18
  import * as i1$1 from '@progress/kendo-angular-buttons';
17
19
  import { ButtonModule } from '@progress/kendo-angular-buttons';
18
- import * as i6 from '@progress/kendo-angular-common';
19
- import { Keys, ResizeSensorModule } from '@progress/kendo-angular-common';
20
20
 
21
21
  /**
22
22
  * Defines a template that will be used for displaying message attachments. To define an attachment
@@ -35,9 +35,9 @@ class AttachmentTemplateDirective {
35
35
  this.templateRef = templateRef;
36
36
  }
37
37
  }
38
- AttachmentTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AttachmentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
39
- AttachmentTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: AttachmentTemplateDirective, selector: "[kendoChatAttachmentTemplate]", ngImport: i0 });
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AttachmentTemplateDirective, decorators: [{
38
+ AttachmentTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: AttachmentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
39
+ AttachmentTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: AttachmentTemplateDirective, selector: "[kendoChatAttachmentTemplate]", ngImport: i0 });
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: AttachmentTemplateDirective, decorators: [{
41
41
  type: Directive,
42
42
  args: [{
43
43
  selector: '[kendoChatAttachmentTemplate]'
@@ -99,9 +99,9 @@ class MessageTemplateDirective {
99
99
  this.templateRef = templateRef;
100
100
  }
101
101
  }
102
- MessageTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
103
- MessageTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: MessageTemplateDirective, selector: "[kendoChatMessageTemplate]", ngImport: i0 });
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageTemplateDirective, decorators: [{
102
+ MessageTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessageTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
103
+ MessageTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: MessageTemplateDirective, selector: "[kendoChatMessageTemplate]", ngImport: i0 });
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessageTemplateDirective, decorators: [{
105
105
  type: Directive,
106
106
  args: [{
107
107
  selector: '[kendoChatMessageTemplate]'
@@ -119,8 +119,8 @@ const packageMetadata = {
119
119
  name: '@progress/kendo-angular-conversational-ui',
120
120
  productName: 'Kendo UI for Angular',
121
121
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
122
- publishDate: 1675778188,
123
- version: '11.2.0-develop.9',
122
+ publishDate: 1676463622,
123
+ version: '11.3.0-develop.1',
124
124
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
125
125
  };
126
126
 
@@ -134,9 +134,9 @@ class ChatMessageBoxTemplateDirective {
134
134
  this.templateRef = templateRef;
135
135
  }
136
136
  }
137
- ChatMessageBoxTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChatMessageBoxTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
138
- ChatMessageBoxTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ChatMessageBoxTemplateDirective, selector: "[kendoChatMessageBoxTemplate]", ngImport: i0 });
139
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChatMessageBoxTemplateDirective, decorators: [{
137
+ ChatMessageBoxTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChatMessageBoxTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
138
+ ChatMessageBoxTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: ChatMessageBoxTemplateDirective, selector: "[kendoChatMessageBoxTemplate]", ngImport: i0 });
139
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChatMessageBoxTemplateDirective, decorators: [{
140
140
  type: Directive,
141
141
  args: [{
142
142
  selector: '[kendoChatMessageBoxTemplate]'
@@ -277,6 +277,102 @@ const groupItems = (total) => (acc, msg, index) => {
277
277
  */
278
278
  const chatView = (messages) => messages.reduce(groupItems(messages.length), []);
279
279
 
280
+ /* eslint-disable @typescript-eslint/no-explicit-any */
281
+ /**
282
+ * @hidden
283
+ */
284
+ class SuggestedActionsComponent extends ChatItem {
285
+ constructor() {
286
+ super(...arguments);
287
+ this.dispatch = new EventEmitter();
288
+ this.defaultClass = true;
289
+ this.selectedIndex = 0;
290
+ this.keyHandlers = {
291
+ [Keys.Tab]: (e) => this.changeSelectedIndex(e),
292
+ [Keys.Enter]: (_, action) => this.actionClick(action),
293
+ [Keys.Space]: (_, action) => this.actionClick(action),
294
+ };
295
+ }
296
+ isSelected(index) {
297
+ return this.selected && this.selectedIndex === index;
298
+ }
299
+ actionClick(action) {
300
+ this.dispatch.next(action);
301
+ }
302
+ actionKeydown(e, action) {
303
+ const handler = this.keyHandlers[e.keyCode];
304
+ if (handler) {
305
+ handler(e, action);
306
+ }
307
+ }
308
+ focus() { }
309
+ changeSelectedIndex(e) {
310
+ const offset = e.shiftKey ? -1 : 1;
311
+ const prevIndex = this.selectedIndex;
312
+ this.selectedIndex = Math.max(0, Math.min(prevIndex + offset, this.items.length - 1));
313
+ }
314
+ }
315
+ SuggestedActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SuggestedActionsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
316
+ SuggestedActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: { actions: "actions", tabbable: "tabbable" }, outputs: { dispatch: "dispatch" }, host: { properties: { "class.k-quick-replies": "this.defaultClass" } }, providers: [{
317
+ provide: ChatItem,
318
+ useExisting: forwardRef(() => SuggestedActionsComponent)
319
+ }], viewQueries: [{ propertyName: "items", predicate: ["item"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
320
+ <span
321
+ #item
322
+ *ngFor="let action of actions; index as index; first as first; last as last"
323
+ class="k-quick-reply"
324
+ role="button"
325
+ [class.k-selected]="isSelected(index)"
326
+ [class.k-focus]="isSelected(index)"
327
+ [class.k-first]="first"
328
+ [class.k-last]="last"
329
+ [attr.tabindex]="0"
330
+ (click)="actionClick(action)"
331
+ (keydown)="actionKeydown($event, action)"
332
+ >
333
+ {{ action.title || action.value }}
334
+ </span>
335
+ `, isInline: true, directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SuggestedActionsComponent, decorators: [{
337
+ type: Component,
338
+ args: [{
339
+ selector: 'kendo-chat-suggested-actions',
340
+ providers: [{
341
+ provide: ChatItem,
342
+ useExisting: forwardRef(() => SuggestedActionsComponent)
343
+ }],
344
+ template: `
345
+ <span
346
+ #item
347
+ *ngFor="let action of actions; index as index; first as first; last as last"
348
+ class="k-quick-reply"
349
+ role="button"
350
+ [class.k-selected]="isSelected(index)"
351
+ [class.k-focus]="isSelected(index)"
352
+ [class.k-first]="first"
353
+ [class.k-last]="last"
354
+ [attr.tabindex]="0"
355
+ (click)="actionClick(action)"
356
+ (keydown)="actionKeydown($event, action)"
357
+ >
358
+ {{ action.title || action.value }}
359
+ </span>
360
+ `
361
+ }]
362
+ }], propDecorators: { actions: [{
363
+ type: Input
364
+ }], tabbable: [{
365
+ type: Input
366
+ }], dispatch: [{
367
+ type: Output
368
+ }], defaultClass: [{
369
+ type: HostBinding,
370
+ args: ['class.k-quick-replies']
371
+ }], items: [{
372
+ type: ViewChildren,
373
+ args: ['item']
374
+ }] } });
375
+
280
376
  // eslint-disable no-forward-ref
281
377
  /**
282
378
  * @hidden
@@ -298,8 +394,8 @@ class MessageComponent extends ChatItem {
298
394
  this.element.nativeElement.focus();
299
395
  }
300
396
  }
301
- MessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageComponent, deps: [{ token: i0.ElementRef }, { token: i1.IntlService }], target: i0.ɵɵFactoryTarget.Component });
302
- MessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: MessageComponent, selector: "kendo-chat-message", inputs: { message: "message", tabbable: "tabbable", template: "template" }, host: { properties: { "class.k-message": "this.cssClass", "class.k-selected": "this.selected", "class.k-focus": "this.selected", "attr.tabIndex": "this.tabIndex" } }, providers: [{
397
+ MessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessageComponent, deps: [{ token: i0.ElementRef }, { token: i1.IntlService }], target: i0.ɵɵFactoryTarget.Component });
398
+ MessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: MessageComponent, selector: "kendo-chat-message", inputs: { message: "message", tabbable: "tabbable", template: "template" }, host: { properties: { "class.k-message": "this.cssClass", "class.k-selected": "this.selected", "class.k-focus": "this.selected", "attr.tabIndex": "this.tabIndex" } }, providers: [{
303
399
  provide: ChatItem,
304
400
  useExisting: forwardRef(() => MessageComponent)
305
401
  }], usesInheritance: true, ngImport: i0, template: `
@@ -341,7 +437,7 @@ MessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
341
437
  </div>
342
438
  </ng-template>
343
439
  `, isInline: true, directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
344
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageComponent, decorators: [{
440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessageComponent, decorators: [{
345
441
  type: Component,
346
442
  args: [{
347
443
  selector: 'kendo-chat-message',
@@ -432,8 +528,8 @@ class AttachmentComponent {
432
528
  return this.attachment.contentType || '';
433
529
  }
434
530
  }
435
- AttachmentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AttachmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
436
- AttachmentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: { attachment: "attachment", template: "template" }, ngImport: i0, template: `
531
+ AttachmentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: AttachmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
532
+ AttachmentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: { attachment: "attachment", template: "template" }, ngImport: i0, template: `
437
533
  <ng-container *ngIf="template">
438
534
  <ng-container *ngTemplateOutlet="template.templateRef; context: context;">
439
535
  </ng-container>
@@ -454,7 +550,7 @@ AttachmentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
454
550
  </div>
455
551
  </div>
456
552
  `, isInline: true, directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
457
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AttachmentComponent, decorators: [{
553
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: AttachmentComponent, decorators: [{
458
554
  type: Component,
459
555
  args: [{
460
556
  selector: 'kendo-chat-attachment',
@@ -505,12 +601,12 @@ class MessageAttachmentsComponent extends ChatItem {
505
601
  this.scrollPosition = 0;
506
602
  this.selectedIndex = 0;
507
603
  this.carouselKeyHandlers = {
508
- [37 /* left */]: (e) => this.navigateTo(e, -1),
509
- [39 /* right */]: (e) => this.navigateTo(e, 1)
604
+ [Keys.ArrowLeft]: (e) => this.navigateTo(e, -1),
605
+ [Keys.ArrowRight]: (e) => this.navigateTo(e, 1)
510
606
  };
511
607
  this.listKeyHandlers = {
512
- [38 /* up */]: (e) => this.navigateTo(e, -1),
513
- [40 /* down */]: (e) => this.navigateTo(e, 1)
608
+ [Keys.ArrowUp]: (e) => this.navigateTo(e, -1),
609
+ [Keys.ArrowDown]: (e) => this.navigateTo(e, 1)
514
610
  };
515
611
  }
516
612
  get carousel() {
@@ -579,8 +675,8 @@ class MessageAttachmentsComponent extends ChatItem {
579
675
  }
580
676
  }
581
677
  }
582
- MessageAttachmentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageAttachmentsComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
583
- MessageAttachmentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: MessageAttachmentsComponent, selector: "kendo-chat-message-attachments", inputs: { attachments: "attachments", layout: "layout", tabbable: "tabbable", template: "template" }, host: { properties: { "class.k-card-deck-scrollwrap": "this.carousel" } }, providers: [{
678
+ MessageAttachmentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessageAttachmentsComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
679
+ MessageAttachmentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: MessageAttachmentsComponent, selector: "kendo-chat-message-attachments", inputs: { attachments: "attachments", layout: "layout", tabbable: "tabbable", template: "template" }, host: { properties: { "class.k-card-deck-scrollwrap": "this.carousel" } }, providers: [{
584
680
  provide: ChatItem,
585
681
  useExisting: forwardRef(() => MessageAttachmentsComponent)
586
682
  }], 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: `
@@ -619,7 +715,7 @@ MessageAttachmentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.
619
715
  >
620
716
  </button>
621
717
  `, isInline: true, components: [{ type: i1$1.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: ["attachment", "template"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
622
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageAttachmentsComponent, decorators: [{
718
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessageAttachmentsComponent, decorators: [{
623
719
  type: Component,
624
720
  args: [{
625
721
  providers: [{
@@ -683,127 +779,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
683
779
  args: ['item', { read: ElementRef }]
684
780
  }] } });
685
781
 
686
- // eslint-disable no-forward-ref
687
- /**
688
- * @hidden
689
- */
690
- class SuggestedActionsComponent extends ChatItem {
691
- constructor() {
692
- super(...arguments);
693
- this.dispatch = new EventEmitter();
694
- this.defaultClass = true;
695
- this.selectedIndex = 0;
696
- this.keyHandlers = {
697
- [37 /* left */]: (e) => this.navigateTo(e, -1),
698
- [39 /* right */]: (e) => this.navigateTo(e, 1),
699
- [13 /* enter */]: (_, action) => this.actionClick(action)
700
- };
701
- }
702
- isSelected(index) {
703
- return this.selected && this.selectedIndex === index;
704
- }
705
- actionClick(action) {
706
- this.dispatch.next(action);
707
- }
708
- actionKeydown(e, action) {
709
- const handler = this.keyHandlers[e.keyCode];
710
- if (handler) {
711
- handler(e, action);
712
- }
713
- }
714
- focus() {
715
- this.select(this.selectedIndex);
716
- }
717
- select(index) {
718
- this.selectedIndex = index;
719
- const item = this.items.toArray()[index];
720
- if (item) {
721
- item.nativeElement.focus();
722
- }
723
- }
724
- navigateTo(e, offset) {
725
- const prevIndex = this.selectedIndex;
726
- const nextIndex = Math.max(0, Math.min(prevIndex + offset, this.items.length - 1));
727
- if (nextIndex !== prevIndex) {
728
- this.select(nextIndex);
729
- e.preventDefault();
730
- }
731
- }
732
- }
733
- SuggestedActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SuggestedActionsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
734
- SuggestedActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: { actions: "actions", tabbable: "tabbable" }, outputs: { dispatch: "dispatch" }, host: { properties: { "class.k-quick-replies": "this.defaultClass" } }, providers: [{
735
- provide: ChatItem,
736
- useExisting: forwardRef(() => SuggestedActionsComponent)
737
- }], viewQueries: [{ propertyName: "items", predicate: ["item"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
738
- <span
739
- #item
740
- *ngFor="let action of actions; index as index; first as first; last as last"
741
- class="k-quick-reply"
742
- [class.k-selected]="isSelected(index)"
743
- [class.k-focus]="isSelected(index)"
744
- [class.k-first]="first"
745
- [class.k-last]="last"
746
- [attr.tabindex]="tabbable && selectedIndex === index ? '0' : '-1'"
747
- (click)="actionClick(action)"
748
- (keydown)="actionKeydown($event, action)"
749
- >
750
- {{ action.title || action.value }}
751
- </span>
752
- `, isInline: true, directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
753
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SuggestedActionsComponent, decorators: [{
754
- type: Component,
755
- args: [{
756
- selector: 'kendo-chat-suggested-actions',
757
- providers: [{
758
- provide: ChatItem,
759
- useExisting: forwardRef(() => SuggestedActionsComponent)
760
- }],
761
- template: `
762
- <span
763
- #item
764
- *ngFor="let action of actions; index as index; first as first; last as last"
765
- class="k-quick-reply"
766
- [class.k-selected]="isSelected(index)"
767
- [class.k-focus]="isSelected(index)"
768
- [class.k-first]="first"
769
- [class.k-last]="last"
770
- [attr.tabindex]="tabbable && selectedIndex === index ? '0' : '-1'"
771
- (click)="actionClick(action)"
772
- (keydown)="actionKeydown($event, action)"
773
- >
774
- {{ action.title || action.value }}
775
- </span>
776
- `
777
- }]
778
- }], propDecorators: { actions: [{
779
- type: Input
780
- }], tabbable: [{
781
- type: Input
782
- }], dispatch: [{
783
- type: Output
784
- }], defaultClass: [{
785
- type: HostBinding,
786
- args: ['class.k-quick-replies']
787
- }], items: [{
788
- type: ViewChildren,
789
- args: ['item']
790
- }] } });
791
-
782
+ /* eslint-disable @typescript-eslint/no-unused-vars */
792
783
  /**
793
784
  * @hidden
794
785
  */
795
786
  class MessageListComponent {
796
- constructor(element, intl) {
787
+ constructor(element, intl, renderer) {
797
788
  this.element = element;
798
789
  this.intl = intl;
790
+ this.renderer = renderer;
799
791
  this.executeAction = new EventEmitter();
800
792
  this.navigate = new EventEmitter();
801
793
  this.resize = new EventEmitter();
802
794
  this.cssClass = true;
803
795
  this.view = [];
796
+ this.subs = new Subscription();
804
797
  this.keyActions = {
805
- [38 /* up */]: (e) => this.navigateTo(e, -1),
806
- [40 /* down */]: (e) => this.navigateTo(e, 1)
798
+ [Keys.Home]: (_) => this.onHomeOrEndKeyDown('home'),
799
+ [Keys.End]: (_) => this.onHomeOrEndKeyDown('end'),
800
+ [Keys.ArrowUp]: (e) => this.navigateTo(e, -1),
801
+ [Keys.ArrowDown]: (e) => this.navigateTo(e, 1),
802
+ [Keys.Tab]: (e) => this.onTabKeyDown(e),
807
803
  };
808
804
  }
809
805
  set messages(value) {
@@ -814,9 +810,17 @@ class MessageListComponent {
814
810
  get messages() {
815
811
  return this._messages;
816
812
  }
813
+ ngOnInit() {
814
+ const elRef = this.element.nativeElement;
815
+ this.subs.add(this.renderer.listen(elRef, 'keydown', event => this.onKeydown(event)));
816
+ this.subs.add(this.renderer.listen(elRef, 'focusout', event => this.onBlur(event)));
817
+ }
817
818
  ngAfterViewInit() {
818
819
  this.selectedItem = this.items.last;
819
820
  }
821
+ ngOnDestroy() {
822
+ this.subs.unsubscribe();
823
+ }
820
824
  onResize() {
821
825
  this.resize.emit();
822
826
  }
@@ -862,13 +866,37 @@ class MessageListComponent {
862
866
  }
863
867
  return items[items.length - 1];
864
868
  }
869
+ onHomeOrEndKeyDown(key) {
870
+ const items = this.items.toArray();
871
+ if (key === 'home') {
872
+ items[0].focus();
873
+ }
874
+ else {
875
+ items[items.length - 1].focus();
876
+ }
877
+ }
878
+ onTabKeyDown(event) {
879
+ const item = this.items.toArray()[this.items.length - 1];
880
+ const isLastItemQuickReply = item instanceof SuggestedActionsComponent;
881
+ const isLastItemMessage = item instanceof MessageComponent;
882
+ event.target.blur();
883
+ if (isLastItemQuickReply || isLastItemMessage) {
884
+ this.select(item);
885
+ item.focus();
886
+ this.navigate.emit();
887
+ }
888
+ }
865
889
  navigateTo(e, offset) {
866
890
  const items = this.items.toArray();
867
891
  const prevItem = this.selectedItem;
868
892
  const prevIndex = items.indexOf(prevItem);
869
893
  const nextIndex = Math.max(0, Math.min(prevIndex + offset, this.items.length - 1));
870
894
  const nextItem = items[nextIndex];
895
+ const isNextItemQuickReply = nextItem instanceof SuggestedActionsComponent;
871
896
  if (nextItem !== prevItem) {
897
+ if (isNextItemQuickReply) {
898
+ nextItem.items.toArray()[0].nativeElement.focus();
899
+ }
872
900
  this.select(nextItem);
873
901
  nextItem.focus();
874
902
  this.navigate.emit();
@@ -876,8 +904,8 @@ class MessageListComponent {
876
904
  }
877
905
  }
878
906
  }
879
- MessageListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageListComponent, deps: [{ token: i0.ElementRef }, { token: i1.IntlService }], target: i0.ɵɵFactoryTarget.Component });
880
- MessageListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: MessageListComponent, selector: "kendo-chat-message-list", inputs: { messages: "messages", attachmentTemplate: "attachmentTemplate", messageTemplate: "messageTemplate", user: "user" }, outputs: { executeAction: "executeAction", navigate: "navigate", resize: "resize" }, host: { listeners: { "keydown": "onKeydown($event)", "focusout": "onBlur($event)" }, properties: { "class.k-message-list-content": "this.cssClass" } }, viewQueries: [{ propertyName: "items", predicate: ChatItem, descendants: true }], ngImport: i0, template: `
907
+ MessageListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessageListComponent, deps: [{ token: i0.ElementRef }, { token: i1.IntlService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
908
+ MessageListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: MessageListComponent, selector: "kendo-chat-message-list", inputs: { messages: "messages", attachmentTemplate: "attachmentTemplate", messageTemplate: "messageTemplate", user: "user" }, 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: `
881
909
  <ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">
882
910
  <ng-container [ngSwitch]="group.type">
883
911
  <div
@@ -948,7 +976,7 @@ MessageListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
948
976
  <kendo-resize-sensor (resize)="onResize()">
949
977
  </kendo-resize-sensor>
950
978
  `, isInline: true, components: [{ type: MessageComponent, selector: "kendo-chat-message", inputs: ["message", "tabbable", "template"] }, { type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: ["attachment", "template"] }, { type: MessageAttachmentsComponent, selector: "kendo-chat-message-attachments", inputs: ["attachments", "layout", "tabbable", "template"] }, { type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: ["actions", "tabbable"], outputs: ["dispatch"] }, { type: i6.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
951
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageListComponent, decorators: [{
979
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessageListComponent, decorators: [{
952
980
  type: Component,
953
981
  args: [{
954
982
  selector: 'kendo-chat-message-list',
@@ -1024,7 +1052,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1024
1052
  </kendo-resize-sensor>
1025
1053
  `
1026
1054
  }]
1027
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.IntlService }]; }, propDecorators: { messages: [{
1055
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.IntlService }, { type: i0.Renderer2 }]; }, propDecorators: { messages: [{
1028
1056
  type: Input
1029
1057
  }], attachmentTemplate: [{
1030
1058
  type: Input
@@ -1044,12 +1072,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1044
1072
  }], cssClass: [{
1045
1073
  type: HostBinding,
1046
1074
  args: ['class.k-message-list-content']
1047
- }], onKeydown: [{
1048
- type: HostListener,
1049
- args: ['keydown', ['$event']]
1050
- }], onBlur: [{
1051
- type: HostListener,
1052
- args: ['focusout', ['$event']]
1053
1075
  }] } });
1054
1076
 
1055
1077
  /**
@@ -1066,9 +1088,9 @@ class FocusedStateDirective {
1066
1088
  this.focused = false;
1067
1089
  }
1068
1090
  }
1069
- FocusedStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FocusedStateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1070
- FocusedStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: FocusedStateDirective, selector: "[kendoChatFocusedState]", host: { listeners: { "focusin": "onFocus()", "focusout": "onBlur()" }, properties: { "class.k-focus": "this.focused" } }, ngImport: i0 });
1071
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FocusedStateDirective, decorators: [{
1091
+ FocusedStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FocusedStateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1092
+ FocusedStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FocusedStateDirective, selector: "[kendoChatFocusedState]", host: { listeners: { "focusin": "onFocus()", "focusout": "onBlur()" }, properties: { "class.k-focus": "this.focused" } }, ngImport: i0 });
1093
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FocusedStateDirective, decorators: [{
1072
1094
  type: Directive,
1073
1095
  args: [{
1074
1096
  selector: '[kendoChatFocusedState]'
@@ -1149,9 +1171,9 @@ class MessageBoxComponent {
1149
1171
  return this.localization.get(key);
1150
1172
  }
1151
1173
  }
1152
- MessageBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1153
- MessageBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: MessageBoxComponent, selector: "kendo-message-box", inputs: { user: "user", autoScroll: "autoScroll", type: "type", localization: "localization", messageBoxTemplate: "messageBoxTemplate" }, outputs: { sendMessage: "sendMessage" }, host: { properties: { "class": "this.hostClasses", "class.!k-align-items-end": "this.messageBoxValue" } }, viewQueries: [{ propertyName: "messageBoxInput", first: true, predicate: ["messageBoxInput"], descendants: true }], ngImport: i0, template: "\n <ng-container *ngIf=\"!messageBoxTemplate\">\n <input\n *ngIf=\"type === 'textbox'\"\n #messageBoxInput\n kendoChatFocusedState\n type=\"text\"\n class=\"k-textbox k-input k-input-md k-input-solid\"\n [placeholder]=\"textFor('messagePlaceholder')\"\n (keydown)=\"inputKeydown($event)\"\n />\n\n <textarea\n *ngIf=\"type === 'textarea'\"\n #messageBoxInput\n kendoChatFocusedState\n [rows]=\"3\"\n class=\"k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none\"\n [placeholder]=\"textFor('messagePlaceholder')\"\n (keydown)=\"textAreaKeydown($event)\"\n ></textarea>\n\n <button\n kendoButton\n fillMode=\"flat\"\n class=\"k-button-send\"\n [tabindex]=\"0\"\n [attr.title]=\"textFor('send')\"\n (click)=\"sendClick()\"\n >\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 16 16\"><path d=\"M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z\"/></svg>\n </button>\n </ng-container>\n\n <ng-template *ngIf=\"messageBoxTemplate\" [ngTemplateOutlet]=\"messageBoxTemplate?.templateRef\"></ng-template>\n", isInline: true, components: [{ type: i1$1.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: FocusedStateDirective, selector: "[kendoChatFocusedState]" }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
1154
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: MessageBoxComponent, decorators: [{
1174
+ MessageBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessageBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1175
+ MessageBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: MessageBoxComponent, selector: "kendo-message-box", inputs: { user: "user", autoScroll: "autoScroll", type: "type", localization: "localization", messageBoxTemplate: "messageBoxTemplate" }, outputs: { sendMessage: "sendMessage" }, host: { properties: { "class": "this.hostClasses", "class.!k-align-items-end": "this.messageBoxValue" } }, viewQueries: [{ propertyName: "messageBoxInput", first: true, predicate: ["messageBoxInput"], descendants: true }], ngImport: i0, template: "\n <ng-container *ngIf=\"!messageBoxTemplate\">\n <input\n *ngIf=\"type === 'textbox'\"\n #messageBoxInput\n [attr.role]=\"'textbox'\"\n kendoChatFocusedState\n type=\"text\"\n class=\"k-textbox k-input k-input-md k-input-solid\"\n [attr.aria-label]=\"textFor('messageBoxInputLabel')\"\n [placeholder]=\"textFor('messagePlaceholder')\"\n (keydown)=\"inputKeydown($event)\"\n />\n\n <textarea\n *ngIf=\"type === 'textarea'\"\n #messageBoxInput\n [attr.role]=\"'textbox'\"\n kendoChatFocusedState\n [rows]=\"3\"\n class=\"k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none\"\n [attr.aria-label]=\"textFor('messageBoxInputLabel')\"\n [placeholder]=\"textFor('messagePlaceholder')\"\n (keydown)=\"textAreaKeydown($event)\"\n ></textarea>\n\n <button\n kendoButton\n fillMode=\"flat\"\n class=\"k-button-send\"\n [tabindex]=\"0\"\n [attr.title]=\"textFor('send')\"\n (click)=\"sendClick()\"\n >\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"0 0 16 16\"><path d=\"M0,14.3c-0.1,0.6,0.3,0.8,0.8,0.6l14.8-6.5c0.5-0.2,0.5-0.6,0-0.8L0.8,1.1C0.3,0.9-0.1,1.1,0,1.7l0.7,4.2C0.8,6.5,1.4,7,1.9,7.1l8.8,0.8c0.6,0.1,0.6,0.1,0,0.2L1.9,8.9C1.4,9,0.8,9.5,0.7,10.1L0,14.3z\"/></svg>\n </button>\n </ng-container>\n\n <ng-template *ngIf=\"messageBoxTemplate\" [ngTemplateOutlet]=\"messageBoxTemplate?.templateRef\"></ng-template>\n", isInline: true, components: [{ type: i1$1.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: FocusedStateDirective, selector: "[kendoChatFocusedState]" }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
1176
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MessageBoxComponent, decorators: [{
1155
1177
  type: Component,
1156
1178
  args: [{
1157
1179
  selector: 'kendo-message-box',
@@ -1160,21 +1182,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1160
1182
  <input
1161
1183
  *ngIf="type === 'textbox'"
1162
1184
  #messageBoxInput
1185
+ [attr.role]="'textbox'"
1163
1186
  kendoChatFocusedState
1164
1187
  type="text"
1165
1188
  class="k-textbox k-input k-input-md k-input-solid"
1189
+ [attr.aria-label]="textFor('messageBoxInputLabel')"
1166
1190
  [placeholder]="textFor('messagePlaceholder')"
1167
1191
  (keydown)="inputKeydown($event)"
1168
1192
  />
1169
1193
 
1170
1194
  <textarea
1171
- *ngIf="type === 'textarea'"
1172
- #messageBoxInput
1173
- kendoChatFocusedState
1174
- [rows]="3"
1175
- class="k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none"
1176
- [placeholder]="textFor('messagePlaceholder')"
1177
- (keydown)="textAreaKeydown($event)"
1195
+ *ngIf="type === 'textarea'"
1196
+ #messageBoxInput
1197
+ [attr.role]="'textbox'"
1198
+ kendoChatFocusedState
1199
+ [rows]="3"
1200
+ class="k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none"
1201
+ [attr.aria-label]="textFor('messageBoxInputLabel')"
1202
+ [placeholder]="textFor('messagePlaceholder')"
1203
+ (keydown)="textAreaKeydown($event)"
1178
1204
  ></textarea>
1179
1205
 
1180
1206
  <button
@@ -1220,9 +1246,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1220
1246
  */
1221
1247
  class Messages extends ComponentMessages {
1222
1248
  }
1223
- Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1224
- Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: Messages, selector: "kendoConversationalUIMessages", inputs: { messagePlaceholder: "messagePlaceholder", send: "send" }, usesInheritance: true, ngImport: i0 });
1225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: Messages, decorators: [{
1249
+ Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1250
+ Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: Messages, selector: "kendoConversationalUIMessages", inputs: { messagePlaceholder: "messagePlaceholder", send: "send", messageListLabel: "messageListLabel", messageBoxInputLabel: "messageBoxInputLabel" }, usesInheritance: true, ngImport: i0 });
1251
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: Messages, decorators: [{
1226
1252
  type: Directive,
1227
1253
  args: [{
1228
1254
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -1232,6 +1258,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1232
1258
  type: Input
1233
1259
  }], send: [{
1234
1260
  type: Input
1261
+ }], messageListLabel: [{
1262
+ type: Input
1263
+ }], messageBoxInputLabel: [{
1264
+ type: Input
1235
1265
  }] } });
1236
1266
 
1237
1267
  // eslint-disable no-forward-ref
@@ -1244,14 +1274,14 @@ class LocalizedMessagesDirective extends Messages {
1244
1274
  this.service = service;
1245
1275
  }
1246
1276
  }
1247
- LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1$2.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
1248
- LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: LocalizedMessagesDirective, selector: "[kendoChatLocalizedMessages]", providers: [
1277
+ LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1$2.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
1278
+ LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: LocalizedMessagesDirective, selector: "[kendoChatLocalizedMessages]", providers: [
1249
1279
  {
1250
1280
  provide: Messages,
1251
1281
  useExisting: forwardRef(() => LocalizedMessagesDirective)
1252
1282
  }
1253
1283
  ], usesInheritance: true, ngImport: i0 });
1254
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
1284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
1255
1285
  type: Directive,
1256
1286
  args: [{
1257
1287
  providers: [
@@ -1317,9 +1347,9 @@ class ScrollAnchorDirective {
1317
1347
  this.zone.runOutsideAngular(() => setTimeout(() => this.scrolling = false, 1000));
1318
1348
  }
1319
1349
  }
1320
- ScrollAnchorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ScrollAnchorDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
1321
- ScrollAnchorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ScrollAnchorDirective, selector: "[kendoChatScrollAnchor]", inputs: { autoScroll: "autoScroll" }, outputs: { autoScrollChange: "autoScrollChange" }, host: { properties: { "style.overflow-anchor": "this.overflowAnchor" } }, exportAs: ["scrollAnchor"], ngImport: i0 });
1322
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ScrollAnchorDirective, decorators: [{
1350
+ ScrollAnchorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ScrollAnchorDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
1351
+ ScrollAnchorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: ScrollAnchorDirective, selector: "[kendoChatScrollAnchor]", inputs: { autoScroll: "autoScroll" }, outputs: { autoScrollChange: "autoScrollChange" }, host: { properties: { "style.overflow-anchor": "this.overflowAnchor" } }, exportAs: ["scrollAnchor"], ngImport: i0 });
1352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ScrollAnchorDirective, decorators: [{
1323
1353
  type: Directive,
1324
1354
  args: [{
1325
1355
  selector: '[kendoChatScrollAnchor]',
@@ -1429,8 +1459,8 @@ class ChatComponent {
1429
1459
  return this.localization.get(key);
1430
1460
  }
1431
1461
  }
1432
- ChatComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChatComponent, deps: [{ token: i1$2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
1433
- ChatComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ChatComponent, selector: "kendo-chat", inputs: { messages: "messages", user: "user", messageBoxType: "messageBoxType" }, outputs: { sendMessage: "sendMessage", executeAction: "executeAction" }, host: { properties: { "class": "this.className", "attr.dir": "this.dirAttr" } }, providers: [
1462
+ ChatComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChatComponent, deps: [{ token: i1$2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
1463
+ ChatComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ChatComponent, selector: "kendo-chat", inputs: { messages: "messages", user: "user", messageBoxType: "messageBoxType" }, outputs: { sendMessage: "sendMessage", executeAction: "executeAction" }, host: { properties: { "class": "this.className", "attr.dir": "this.dirAttr" } }, providers: [
1434
1464
  LocalizationService,
1435
1465
  {
1436
1466
  provide: L10N_PREFIX,
@@ -1444,27 +1474,35 @@ ChatComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
1444
1474
 
1445
1475
  i18n-send="kendo.chat.send|The text for the Send button"
1446
1476
  send="Send..."
1477
+
1478
+ i18n-messageListLabel="kendo.chat.messageListLabel|The label text for the Message list"
1479
+ messageListLabel="Message list"
1480
+
1481
+ i18n-messageBoxInputLabel="kendo.chat.messageBoxInputLabel|The label text for the Message input box"
1482
+ messageBoxInputLabel="Message"
1447
1483
  >
1448
1484
  </ng-container>
1449
1485
 
1450
1486
  <div
1451
- #messageList
1452
- class="k-message-list k-avatars"
1453
- aria-live="polite" role="log"
1454
- kendoChatScrollAnchor
1487
+ #messageList
1488
+ class="k-message-list k-avatars"
1489
+ aria-live="polite"
1490
+ role="log"
1491
+ kendoChatScrollAnchor
1492
+ [attr.aria-label]="textFor('messageListLabel')"
1455
1493
  #anchor="scrollAnchor"
1456
1494
  [(autoScroll)]="autoScroll"
1457
1495
  >
1458
- <kendo-chat-message-list
1459
- [messages]="messages"
1460
- [messageTemplate]="messageTemplate"
1461
- [attachmentTemplate]="attachmentTemplate"
1462
- [user]="user"
1463
- (executeAction)="dispatchAction($event)"
1464
- (resize)="anchor.scrollToBottom()"
1465
- (navigate)="this.autoScroll = false"
1466
- >
1467
- </kendo-chat-message-list>
1496
+ <kendo-chat-message-list
1497
+ [messages]="messages"
1498
+ [messageTemplate]="messageTemplate"
1499
+ [attachmentTemplate]="attachmentTemplate"
1500
+ [user]="user"
1501
+ (executeAction)="dispatchAction($event)"
1502
+ (resize)="anchor.scrollToBottom()"
1503
+ (navigate)="this.autoScroll = false"
1504
+ >
1505
+ </kendo-chat-message-list>
1468
1506
  </div>
1469
1507
  <kendo-message-box
1470
1508
  #messageBox
@@ -1477,7 +1515,7 @@ ChatComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
1477
1515
  >
1478
1516
  </kendo-message-box>
1479
1517
  `, isInline: true, components: [{ type: MessageListComponent, selector: "kendo-chat-message-list", inputs: ["messages", "attachmentTemplate", "messageTemplate", "user"], outputs: ["executeAction", "navigate", "resize"] }, { type: MessageBoxComponent, selector: "kendo-message-box", inputs: ["user", "autoScroll", "type", "localization", "messageBoxTemplate"], outputs: ["sendMessage"] }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoChatLocalizedMessages]" }, { type: ScrollAnchorDirective, selector: "[kendoChatScrollAnchor]", inputs: ["autoScroll"], outputs: ["autoScrollChange"], exportAs: ["scrollAnchor"] }] });
1480
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChatComponent, decorators: [{
1518
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChatComponent, decorators: [{
1481
1519
  type: Component,
1482
1520
  args: [{
1483
1521
  providers: [
@@ -1496,27 +1534,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1496
1534
 
1497
1535
  i18n-send="kendo.chat.send|The text for the Send button"
1498
1536
  send="Send..."
1537
+
1538
+ i18n-messageListLabel="kendo.chat.messageListLabel|The label text for the Message list"
1539
+ messageListLabel="Message list"
1540
+
1541
+ i18n-messageBoxInputLabel="kendo.chat.messageBoxInputLabel|The label text for the Message input box"
1542
+ messageBoxInputLabel="Message"
1499
1543
  >
1500
1544
  </ng-container>
1501
1545
 
1502
1546
  <div
1503
- #messageList
1504
- class="k-message-list k-avatars"
1505
- aria-live="polite" role="log"
1506
- kendoChatScrollAnchor
1547
+ #messageList
1548
+ class="k-message-list k-avatars"
1549
+ aria-live="polite"
1550
+ role="log"
1551
+ kendoChatScrollAnchor
1552
+ [attr.aria-label]="textFor('messageListLabel')"
1507
1553
  #anchor="scrollAnchor"
1508
1554
  [(autoScroll)]="autoScroll"
1509
1555
  >
1510
- <kendo-chat-message-list
1511
- [messages]="messages"
1512
- [messageTemplate]="messageTemplate"
1513
- [attachmentTemplate]="attachmentTemplate"
1514
- [user]="user"
1515
- (executeAction)="dispatchAction($event)"
1516
- (resize)="anchor.scrollToBottom()"
1517
- (navigate)="this.autoScroll = false"
1518
- >
1519
- </kendo-chat-message-list>
1556
+ <kendo-chat-message-list
1557
+ [messages]="messages"
1558
+ [messageTemplate]="messageTemplate"
1559
+ [attachmentTemplate]="attachmentTemplate"
1560
+ [user]="user"
1561
+ (executeAction)="dispatchAction($event)"
1562
+ (resize)="anchor.scrollToBottom()"
1563
+ (navigate)="this.autoScroll = false"
1564
+ >
1565
+ </kendo-chat-message-list>
1520
1566
  </div>
1521
1567
  <kendo-message-box
1522
1568
  #messageBox
@@ -1577,14 +1623,14 @@ class CustomMessagesComponent extends Messages {
1577
1623
  return true;
1578
1624
  }
1579
1625
  }
1580
- CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1$2.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
1581
- CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CustomMessagesComponent, selector: "kendo-chat-messages", providers: [
1626
+ CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1$2.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
1627
+ CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CustomMessagesComponent, selector: "kendo-chat-messages", providers: [
1582
1628
  {
1583
1629
  provide: Messages,
1584
1630
  useExisting: forwardRef(() => CustomMessagesComponent)
1585
1631
  }
1586
1632
  ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
1587
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CustomMessagesComponent, decorators: [{
1633
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CustomMessagesComponent, decorators: [{
1588
1634
  type: Component,
1589
1635
  args: [{
1590
1636
  providers: [
@@ -1614,8 +1660,8 @@ class HeroCardComponent {
1614
1660
  this.executeAction.next(action);
1615
1661
  }
1616
1662
  }
1617
- HeroCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: HeroCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1618
- HeroCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: HeroCardComponent, 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: `
1663
+ HeroCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: HeroCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1664
+ HeroCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: HeroCardComponent, 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: `
1619
1665
  <img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />
1620
1666
  <div class="k-card-body">
1621
1667
  <h5 class="k-card-title" *ngIf="title">
@@ -1638,7 +1684,7 @@ HeroCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
1638
1684
  </span>
1639
1685
  </div>
1640
1686
  `, isInline: true, components: [{ type: i1$1.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1641
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: HeroCardComponent, decorators: [{
1687
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: HeroCardComponent, decorators: [{
1642
1688
  type: Component,
1643
1689
  args: [{
1644
1690
  selector: 'kendo-chat-hero-card',
@@ -1724,8 +1770,8 @@ const PRIVATE_DIRECTIVES = [
1724
1770
  */
1725
1771
  class ChatModule {
1726
1772
  }
1727
- ChatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1728
- ChatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChatModule, declarations: [ChatComponent,
1773
+ ChatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1774
+ ChatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChatModule, declarations: [ChatComponent,
1729
1775
  CustomMessagesComponent,
1730
1776
  AttachmentTemplateDirective,
1731
1777
  MessageTemplateDirective,
@@ -1747,12 +1793,12 @@ ChatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13
1747
1793
  MessageTemplateDirective,
1748
1794
  HeroCardComponent,
1749
1795
  ChatMessageBoxTemplateDirective] });
1750
- ChatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChatModule, imports: [[
1796
+ ChatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChatModule, imports: [[
1751
1797
  ButtonModule,
1752
1798
  CommonModule,
1753
1799
  ResizeSensorModule
1754
1800
  ]] });
1755
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChatModule, decorators: [{
1801
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ChatModule, decorators: [{
1756
1802
  type: NgModule,
1757
1803
  args: [{
1758
1804
  declarations: [