@progress/kendo-angular-conversational-ui 20.0.0-develop.4 → 20.0.0-develop.6

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 (86) hide show
  1. package/chat/api/action.interface.d.ts +1 -1
  2. package/chat/api/attachment.interface.d.ts +1 -1
  3. package/chat/api/chat-file-interface.d.ts +41 -0
  4. package/chat/api/chat-suggestion.interface.d.ts +25 -0
  5. package/chat/api/file-action.d.ts +42 -0
  6. package/chat/api/file-download-event.interface.d.ts +21 -0
  7. package/chat/api/index.d.ts +8 -0
  8. package/chat/api/message-action.d.ts +42 -0
  9. package/{esm2022/chat/chat.directives.mjs → chat/api/message-toolbar-visibility.d.ts} +4 -4
  10. package/chat/api/message-width-mode.d.ts +10 -0
  11. package/chat/api/message.interface.d.ts +30 -12
  12. package/chat/api/send-button-settings.d.ts +15 -0
  13. package/chat/api/user.interface.d.ts +4 -0
  14. package/chat/attachment.component.d.ts +1 -1
  15. package/chat/cards/hero-card.component.d.ts +1 -1
  16. package/chat/chat-file.component.d.ts +34 -0
  17. package/chat/chat-item.d.ts +1 -0
  18. package/chat/chat-view.d.ts +1 -1
  19. package/chat/chat.component.d.ts +218 -19
  20. package/chat/chat.module.d.ts +8 -4
  21. package/chat/common/chat.service.d.ts +51 -0
  22. package/chat/{chat.directives.d.ts → common/models/default-model-fields.d.ts} +5 -4
  23. package/chat/common/models/message-box-options.d.ts +1 -1
  24. package/chat/common/models/model-fields.d.ts +111 -0
  25. package/chat/common/utils.d.ts +50 -0
  26. package/chat/l10n/messages.d.ts +40 -3
  27. package/chat/message-attachments.component.d.ts +1 -4
  28. package/chat/message-box.component.d.ts +54 -25
  29. package/chat/message-list.component.d.ts +18 -11
  30. package/chat/message-reference-content.component.d.ts +24 -0
  31. package/chat/message.component.d.ts +54 -6
  32. package/chat/suggested-actions.component.d.ts +17 -4
  33. package/chat/templates/header-template.directive.d.ts +24 -0
  34. package/chat/{message-box.directive.d.ts → templates/message-box.directive.d.ts} +1 -1
  35. package/chat/templates/status-template.directive.d.ts +24 -0
  36. package/chat/templates/suggestion-template.directive.d.ts +24 -0
  37. package/chat/templates/timestamp-template.directive.d.ts +28 -0
  38. package/codemods/template-transformer/index.js +94 -0
  39. package/codemods/utils.js +609 -0
  40. package/codemods/v20/chat-user.js +50 -0
  41. package/conversational-ui.module.d.ts +11 -7
  42. package/directives.d.ts +9 -5
  43. package/esm2022/chat/api/chat-file-interface.mjs +5 -0
  44. package/esm2022/chat/api/chat-suggestion.interface.mjs +5 -0
  45. package/esm2022/chat/api/file-action.mjs +5 -0
  46. package/esm2022/chat/api/file-download-event.interface.mjs +5 -0
  47. package/esm2022/chat/api/index.mjs +8 -0
  48. package/esm2022/chat/api/message-action.mjs +5 -0
  49. package/esm2022/chat/api/message-toolbar-visibility.mjs +5 -0
  50. package/esm2022/chat/api/message-width-mode.mjs +5 -0
  51. package/esm2022/chat/api/send-button-settings.mjs +5 -0
  52. package/esm2022/chat/attachment.component.mjs +1 -1
  53. package/esm2022/chat/builtin-actions.mjs +1 -1
  54. package/esm2022/chat/cards/hero-card.component.mjs +1 -1
  55. package/esm2022/chat/chat-file.component.mjs +141 -0
  56. package/esm2022/chat/chat-item.mjs +1 -0
  57. package/esm2022/chat/chat-view.mjs +2 -2
  58. package/esm2022/chat/chat.component.mjs +518 -57
  59. package/esm2022/chat/chat.module.mjs +8 -4
  60. package/esm2022/chat/common/chat.service.mjs +97 -0
  61. package/esm2022/chat/common/models/default-model-fields.mjs +26 -0
  62. package/esm2022/chat/common/models/model-fields.mjs +5 -0
  63. package/esm2022/chat/common/utils.mjs +127 -0
  64. package/esm2022/chat/l10n/messages.mjs +60 -5
  65. package/esm2022/chat/message-attachments.component.mjs +1 -4
  66. package/esm2022/chat/message-box.component.mjs +360 -111
  67. package/esm2022/chat/message-list.component.mjs +166 -96
  68. package/esm2022/chat/message-reference-content.component.mjs +75 -0
  69. package/esm2022/chat/message.component.mjs +448 -35
  70. package/esm2022/chat/suggested-actions.component.mjs +151 -41
  71. package/esm2022/chat/templates/header-template.directive.mjs +33 -0
  72. package/esm2022/chat/{message-box.directive.mjs → templates/message-box.directive.mjs} +1 -1
  73. package/esm2022/chat/templates/status-template.directive.mjs +33 -0
  74. package/esm2022/chat/templates/suggestion-template.directive.mjs +33 -0
  75. package/esm2022/chat/templates/timestamp-template.directive.mjs +39 -0
  76. package/esm2022/conversational-ui.module.mjs +12 -8
  77. package/esm2022/directives.mjs +12 -4
  78. package/esm2022/index.mjs +9 -3
  79. package/esm2022/package-metadata.mjs +2 -2
  80. package/fesm2022/progress-kendo-angular-conversational-ui.mjs +4986 -3125
  81. package/index.d.ts +10 -3
  82. package/package.json +29 -12
  83. /package/chat/{attachment-template.directive.d.ts → templates/attachment-template.directive.d.ts} +0 -0
  84. /package/chat/{message-template.directive.d.ts → templates/message-template.directive.d.ts} +0 -0
  85. /package/esm2022/chat/{attachment-template.directive.mjs → templates/attachment-template.directive.mjs} +0 -0
  86. /package/esm2022/chat/{message-template.directive.mjs → templates/message-template.directive.mjs} +0 -0
@@ -5,37 +5,70 @@
5
5
  /* eslint-disable @typescript-eslint/no-explicit-any */
6
6
  /* eslint-disable @typescript-eslint/no-empty-function */
7
7
  import { Component, EventEmitter, forwardRef, HostBinding, Input, Output, QueryList, ViewChildren } from '@angular/core';
8
- import { NgFor } from '@angular/common';
8
+ import { NgFor, NgIf, NgTemplateOutlet } from '@angular/common';
9
9
  import { Keys, normalizeNumpadKeys } from '@progress/kendo-angular-common';
10
10
  import { ChatItem } from './chat-item';
11
+ import { ChatSuggestionTemplateDirective } from './templates/suggestion-template.directive';
11
12
  import * as i0 from "@angular/core";
12
13
  /**
13
14
  * @hidden
14
15
  */
15
16
  export class SuggestedActionsComponent extends ChatItem {
16
17
  actions;
18
+ suggestions;
17
19
  tabbable;
18
- dispatch = new EventEmitter();
20
+ suggestionTemplate;
21
+ dispatchAction = new EventEmitter();
22
+ dispatchSuggestion = new EventEmitter();
19
23
  defaultClass = true;
24
+ role = 'group';
20
25
  items;
21
26
  selectedIndex = 0;
22
- keyHandlers = {
27
+ activeIndex = -1;
28
+ active = false;
29
+ actionKeyHandlers = {
23
30
  [Keys.Tab]: (e) => this.changeSelectedIndex(e),
24
31
  [Keys.Enter]: (_, action) => this.actionClick(action),
25
32
  [Keys.Space]: (_, action) => this.actionClick(action),
26
33
  };
34
+ suggestionKeyHandlers = {
35
+ [Keys.Tab]: (e) => this.changeSelectedIndex(e),
36
+ [Keys.Enter]: (_, suggestion) => this.suggestionClick(suggestion),
37
+ [Keys.Space]: (_, suggestion) => this.suggestionClick(suggestion),
38
+ };
27
39
  isSelected(index) {
28
40
  return this.selected && this.selectedIndex === index;
29
41
  }
30
- actionClick(action) {
31
- this.dispatch.next(action);
42
+ isActive(index) {
43
+ return this.activeIndex === index;
44
+ }
45
+ actionClick(action, index) {
46
+ if (index >= 0) {
47
+ this.selectedIndex = index;
48
+ }
49
+ this.dispatchAction.next(action);
50
+ }
51
+ suggestionClick(suggestion, index) {
52
+ if (index >= 0) {
53
+ this.selectedIndex = index;
54
+ }
55
+ this.dispatchSuggestion.next(suggestion);
56
+ }
57
+ toggleActiveState(apply, index) {
58
+ this.activeIndex = apply ? index : -1;
32
59
  }
33
60
  actionKeydown(e, action) {
34
- const handler = this.keyHandlers[normalizeNumpadKeys(e)];
61
+ const handler = this.actionKeyHandlers[normalizeNumpadKeys(e)];
35
62
  if (handler) {
36
63
  handler(e, action);
37
64
  }
38
65
  }
66
+ suggestionKeydown(e, suggestion) {
67
+ const handler = this.suggestionKeyHandlers[normalizeNumpadKeys(e)];
68
+ if (handler) {
69
+ handler(e, suggestion);
70
+ }
71
+ }
39
72
  focus() { }
40
73
  changeSelectedIndex(e) {
41
74
  const offset = e.shiftKey ? -1 : 1;
@@ -43,26 +76,60 @@ export class SuggestedActionsComponent extends ChatItem {
43
76
  this.selectedIndex = Math.max(0, Math.min(prevIndex + offset, this.items.length - 1));
44
77
  }
45
78
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuggestedActionsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
46
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SuggestedActionsComponent, isStandalone: true, selector: "kendo-chat-suggested-actions", inputs: { actions: "actions", tabbable: "tabbable" }, outputs: { dispatch: "dispatch" }, host: { properties: { "class.k-quick-replies": "this.defaultClass" } }, providers: [{
79
+ 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: [{
47
80
  provide: ChatItem,
48
81
  useExisting: forwardRef(() => SuggestedActionsComponent)
49
82
  }], viewQueries: [{ propertyName: "items", predicate: ["item"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
50
- <span
51
- #item
52
- *ngFor="let action of actions; index as index; first as first; last as last"
53
- class="k-quick-reply"
54
- role="button"
55
- [class.k-selected]="isSelected(index)"
56
- [class.k-focus]="isSelected(index)"
57
- [class.k-first]="first"
58
- [class.k-last]="last"
59
- [attr.tabindex]="0"
60
- (click)="actionClick(action)"
61
- (keydown)="actionKeydown($event, action)"
62
- >
63
- {{ action.title || action.value }}
64
- </span>
65
- `, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
83
+ <ng-container *ngIf="actions">
84
+ <span
85
+ #item
86
+ *ngFor="let action of actions; index as index; first as first; last as last"
87
+ class="k-suggestion k-suggestion-primary"
88
+ role="button"
89
+ [class.k-selected]="isSelected(index)"
90
+ [class.k-focus]="isSelected(index)"
91
+ [class.k-active]="isActive(index)"
92
+ [attr.tabindex]="0"
93
+ (click)="actionClick(action, index)"
94
+ (keydown)="actionKeydown($event, action)"
95
+ (mousedown)="toggleActiveState(true, index)"
96
+ (mouseup)="toggleActiveState(false, index)"
97
+ >
98
+ {{ action.title || action.value }}
99
+ </span>
100
+ </ng-container>
101
+
102
+ <ng-container *ngIf="suggestions">
103
+ <ng-container *ngIf="!suggestionTemplate?.templateRef">
104
+ <span
105
+ #item
106
+ *ngFor="let suggestion of suggestions; index as index; first as first; last as last"
107
+ class="k-suggestion"
108
+ role="button"
109
+ [class.k-selected]="isSelected(index)"
110
+ [class.k-focus]="isSelected(index)"
111
+ [class.k-active]="isActive(index)"
112
+ [attr.tabindex]="0"
113
+ (click)="suggestionClick(suggestion, index)"
114
+ (keydown)="suggestionKeydown($event, suggestion)"
115
+ (mousedown)="toggleActiveState(true, index)"
116
+ (mouseup)="toggleActiveState(false, index)"
117
+ >
118
+ {{ suggestion.text }}
119
+ </span>
120
+ </ng-container>
121
+
122
+ <ng-container *ngIf="suggestionTemplate?.templateRef">
123
+ <ng-container *ngFor="let suggestion of suggestions">
124
+ <ng-template
125
+ [ngTemplateOutlet]="suggestionTemplate.templateRef"
126
+ [ngTemplateOutletContext]="{ $implicit: suggestion }"
127
+ >
128
+ </ng-template>
129
+ </ng-container>
130
+ </ng-container>
131
+ </ng-container>
132
+ `, 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"] }] });
66
133
  }
67
134
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SuggestedActionsComponent, decorators: [{
68
135
  type: Component,
@@ -73,34 +140,77 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
73
140
  useExisting: forwardRef(() => SuggestedActionsComponent)
74
141
  }],
75
142
  template: `
76
- <span
77
- #item
78
- *ngFor="let action of actions; index as index; first as first; last as last"
79
- class="k-quick-reply"
80
- role="button"
81
- [class.k-selected]="isSelected(index)"
82
- [class.k-focus]="isSelected(index)"
83
- [class.k-first]="first"
84
- [class.k-last]="last"
85
- [attr.tabindex]="0"
86
- (click)="actionClick(action)"
87
- (keydown)="actionKeydown($event, action)"
88
- >
89
- {{ action.title || action.value }}
90
- </span>
143
+ <ng-container *ngIf="actions">
144
+ <span
145
+ #item
146
+ *ngFor="let action of actions; index as index; first as first; last as last"
147
+ class="k-suggestion k-suggestion-primary"
148
+ role="button"
149
+ [class.k-selected]="isSelected(index)"
150
+ [class.k-focus]="isSelected(index)"
151
+ [class.k-active]="isActive(index)"
152
+ [attr.tabindex]="0"
153
+ (click)="actionClick(action, index)"
154
+ (keydown)="actionKeydown($event, action)"
155
+ (mousedown)="toggleActiveState(true, index)"
156
+ (mouseup)="toggleActiveState(false, index)"
157
+ >
158
+ {{ action.title || action.value }}
159
+ </span>
160
+ </ng-container>
161
+
162
+ <ng-container *ngIf="suggestions">
163
+ <ng-container *ngIf="!suggestionTemplate?.templateRef">
164
+ <span
165
+ #item
166
+ *ngFor="let suggestion of suggestions; index as index; first as first; last as last"
167
+ class="k-suggestion"
168
+ role="button"
169
+ [class.k-selected]="isSelected(index)"
170
+ [class.k-focus]="isSelected(index)"
171
+ [class.k-active]="isActive(index)"
172
+ [attr.tabindex]="0"
173
+ (click)="suggestionClick(suggestion, index)"
174
+ (keydown)="suggestionKeydown($event, suggestion)"
175
+ (mousedown)="toggleActiveState(true, index)"
176
+ (mouseup)="toggleActiveState(false, index)"
177
+ >
178
+ {{ suggestion.text }}
179
+ </span>
180
+ </ng-container>
181
+
182
+ <ng-container *ngIf="suggestionTemplate?.templateRef">
183
+ <ng-container *ngFor="let suggestion of suggestions">
184
+ <ng-template
185
+ [ngTemplateOutlet]="suggestionTemplate.templateRef"
186
+ [ngTemplateOutletContext]="{ $implicit: suggestion }"
187
+ >
188
+ </ng-template>
189
+ </ng-container>
190
+ </ng-container>
191
+ </ng-container>
91
192
  `,
92
193
  standalone: true,
93
- imports: [NgFor]
194
+ imports: [NgFor, NgIf, NgTemplateOutlet]
94
195
  }]
95
196
  }], propDecorators: { actions: [{
96
197
  type: Input
198
+ }], suggestions: [{
199
+ type: Input
97
200
  }], tabbable: [{
98
201
  type: Input
99
- }], dispatch: [{
202
+ }], suggestionTemplate: [{
203
+ type: Input
204
+ }], dispatchAction: [{
205
+ type: Output
206
+ }], dispatchSuggestion: [{
100
207
  type: Output
101
208
  }], defaultClass: [{
102
209
  type: HostBinding,
103
- args: ['class.k-quick-replies']
210
+ args: ['class.k-suggestion-group']
211
+ }], role: [{
212
+ type: HostBinding,
213
+ args: ['attr.role']
104
214
  }], items: [{
105
215
  type: ViewChildren,
106
216
  args: ['item']
@@ -0,0 +1,33 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive, TemplateRef } from '@angular/core';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Represents the template for the header of the Chat component.
9
+ *
10
+ * @example
11
+ * ```html
12
+ * <kendo-chat>
13
+ * <ng-template kendoChatHeaderTemplate>
14
+ * Chat Title
15
+ * </ng-template>
16
+ * </kendo-chat>
17
+ * ```
18
+ */
19
+ export class ChatHeaderTemplateDirective {
20
+ templateRef;
21
+ constructor(templateRef) {
22
+ this.templateRef = templateRef;
23
+ }
24
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatHeaderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
25
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ChatHeaderTemplateDirective, isStandalone: true, selector: "[kendoChatHeaderTemplate]", ngImport: i0 });
26
+ }
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatHeaderTemplateDirective, decorators: [{
28
+ type: Directive,
29
+ args: [{
30
+ selector: '[kendoChatHeaderTemplate]',
31
+ standalone: true
32
+ }]
33
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
@@ -8,7 +8,7 @@ import * as i0 from "@angular/core";
8
8
  * Creates a message box area that overrides the default message box of the Chat component.
9
9
  *
10
10
  * To define a message box template, nest an `<ng-template>` tag with the `kendoChatMessageBoxTemplate` directive inside the `<kendo-chat>` tag.
11
- * For more information, see [Message Box Template](slug:message_box#toc-message-box-template).
11
+ * For more information, see [Message Box Template](slug:message_templates_chat#toc-message-box-template).
12
12
  *
13
13
  * @example
14
14
  * ```html
@@ -0,0 +1,33 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive, TemplateRef } from '@angular/core';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Represents the template for the status of a message.
9
+ *
10
+ * @example
11
+ * ```html
12
+ * <kendo-chat>
13
+ * <ng-template kendoChatStatusTemplate let-status>
14
+ * Current status: {{ status }}
15
+ * </ng-template>
16
+ * </kendo-chat>
17
+ * ```
18
+ */
19
+ export class ChatStatusTemplateDirective {
20
+ templateRef;
21
+ constructor(templateRef) {
22
+ this.templateRef = templateRef;
23
+ }
24
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatStatusTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
25
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ChatStatusTemplateDirective, isStandalone: true, selector: "[kendoChatStatusTemplate]", ngImport: i0 });
26
+ }
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatStatusTemplateDirective, decorators: [{
28
+ type: Directive,
29
+ args: [{
30
+ selector: '[kendoChatStatusTemplate]',
31
+ standalone: true
32
+ }]
33
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
@@ -0,0 +1,33 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive, TemplateRef } from '@angular/core';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Represents the template for a suggestion in the Chat component.
9
+ *
10
+ * @example
11
+ * ```html
12
+ * <kendo-chat>
13
+ * <ng-template kendoChatSuggestionTemplate>
14
+ * Suggestion Text
15
+ * </ng-template>
16
+ * </kendo-chat>
17
+ * ```
18
+ */
19
+ export class ChatSuggestionTemplateDirective {
20
+ templateRef;
21
+ constructor(templateRef) {
22
+ this.templateRef = templateRef;
23
+ }
24
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatSuggestionTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
25
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ChatSuggestionTemplateDirective, isStandalone: true, selector: "[kendoChatSuggestionTemplate]", ngImport: i0 });
26
+ }
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatSuggestionTemplateDirective, decorators: [{
28
+ type: Directive,
29
+ args: [{
30
+ selector: '[kendoChatSuggestionTemplate]',
31
+ standalone: true
32
+ }]
33
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
@@ -0,0 +1,39 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Directive, Optional, TemplateRef } from "@angular/core";
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Defines a template for displaying the timestamp of the messages.
9
+ *
10
+ * To define a timestamp template, nest an `<ng-template>` tag with the `kendoChatTimestampTemplate` directive inside the `<kendo-chat>` component.
11
+ * The template context is set to the current timestamp.
12
+ * For more information, refer to the article on [message templates](slug:message_templates_chat).
13
+ *
14
+ * @example
15
+ * ```html
16
+ * <kendo-chat>
17
+ * <ng-template kendoChatTimestampTemplate let-timestamp>
18
+ * <div>Message time: {{ timestamp }}</div>
19
+ * </ng-template>
20
+ * </kendo-chat>
21
+ * ```
22
+ */
23
+ export class ChatTimestampTemplateDirective {
24
+ templateRef;
25
+ constructor(templateRef) {
26
+ this.templateRef = templateRef;
27
+ }
28
+ 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 });
29
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ChatTimestampTemplateDirective, isStandalone: true, selector: "[kendoChatTimestampTemplate]", ngImport: i0 });
30
+ }
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ChatTimestampTemplateDirective, decorators: [{
32
+ type: Directive,
33
+ args: [{
34
+ selector: '[kendoChatTimestampTemplate]',
35
+ standalone: true
36
+ }]
37
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
38
+ type: Optional
39
+ }] }]; } });
@@ -21,13 +21,17 @@ import * as i9 from "./ai-prompt/templates/aiprompt-output-template.directive";
21
21
  import * as i10 from "./ai-prompt/templates/aiprompt-output-body-template.directive";
22
22
  import * as i11 from "./chat/chat.component";
23
23
  import * as i12 from "./chat/l10n/custom-messages.component";
24
- import * as i13 from "./chat/attachment-template.directive";
25
- import * as i14 from "./chat/message-template.directive";
24
+ import * as i13 from "./chat/templates/attachment-template.directive";
25
+ import * as i14 from "./chat/templates/message-template.directive";
26
26
  import * as i15 from "./chat/cards/hero-card.component";
27
- import * as i16 from "./chat/message-box.directive";
28
- import * as i17 from "./inline-ai-prompt/inlineaiprompt.component";
29
- import * as i18 from "./inline-ai-prompt/output-template.directive";
30
- import * as i19 from "./inline-ai-prompt/localization/custom-messages.component";
27
+ import * as i16 from "./chat/templates/message-box.directive";
28
+ import * as i17 from "./chat/templates/header-template.directive";
29
+ import * as i18 from "./chat/templates/timestamp-template.directive";
30
+ import * as i19 from "./chat/templates/status-template.directive";
31
+ import * as i20 from "./chat/templates/suggestion-template.directive";
32
+ import * as i21 from "./inline-ai-prompt/inlineaiprompt.component";
33
+ import * as i22 from "./inline-ai-prompt/output-template.directive";
34
+ import * as i23 from "./inline-ai-prompt/localization/custom-messages.component";
31
35
  // IMPORTANT: NgModule export kept for backwards compatibility
32
36
  /**
33
37
  * Represents the [`NgModule`](link:site.data.urls.angular['ngmodules']) for the Conversational UI components.
@@ -49,8 +53,8 @@ import * as i19 from "./inline-ai-prompt/localization/custom-messages.component"
49
53
  */
50
54
  export class ConversationalUIModule {
51
55
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ConversationalUIModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
52
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: ConversationalUIModule, imports: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent, i5.CustomViewComponent, i6.AIPromptCustomMessagesComponent, i7.AIPromptToolbarActionsDirective, i8.AIPromptToolbarFocusableDirective, i9.AIPromptOutputTemplateDirective, i10.AIPromptOutputBodyTemplateDirective, i11.ChatComponent, i12.CustomMessagesComponent, i13.AttachmentTemplateDirective, i14.MessageTemplateDirective, i15.HeroCardComponent, i16.ChatMessageBoxTemplateDirective, i17.InlineAIPromptComponent, i18.InlineAIPromptOutputTemplateDirective, i19.InlineAIPromptCustomMessagesComponent], exports: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent, i5.CustomViewComponent, i6.AIPromptCustomMessagesComponent, i7.AIPromptToolbarActionsDirective, i8.AIPromptToolbarFocusableDirective, i9.AIPromptOutputTemplateDirective, i10.AIPromptOutputBodyTemplateDirective, i11.ChatComponent, i12.CustomMessagesComponent, i13.AttachmentTemplateDirective, i14.MessageTemplateDirective, i15.HeroCardComponent, i16.ChatMessageBoxTemplateDirective, i17.InlineAIPromptComponent, i18.InlineAIPromptOutputTemplateDirective, i19.InlineAIPromptCustomMessagesComponent] });
53
- 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: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent, i11.ChatComponent, i15.HeroCardComponent, i17.InlineAIPromptComponent] });
56
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: ConversationalUIModule, imports: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent, i5.CustomViewComponent, i6.AIPromptCustomMessagesComponent, i7.AIPromptToolbarActionsDirective, i8.AIPromptToolbarFocusableDirective, i9.AIPromptOutputTemplateDirective, i10.AIPromptOutputBodyTemplateDirective, i11.ChatComponent, i12.CustomMessagesComponent, i13.AttachmentTemplateDirective, i14.MessageTemplateDirective, i15.HeroCardComponent, i16.ChatMessageBoxTemplateDirective, i17.ChatHeaderTemplateDirective, i18.ChatTimestampTemplateDirective, i19.ChatStatusTemplateDirective, i20.ChatSuggestionTemplateDirective, i21.InlineAIPromptComponent, i22.InlineAIPromptOutputTemplateDirective, i23.InlineAIPromptCustomMessagesComponent], exports: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent, i5.CustomViewComponent, i6.AIPromptCustomMessagesComponent, i7.AIPromptToolbarActionsDirective, i8.AIPromptToolbarFocusableDirective, i9.AIPromptOutputTemplateDirective, i10.AIPromptOutputBodyTemplateDirective, i11.ChatComponent, i12.CustomMessagesComponent, i13.AttachmentTemplateDirective, i14.MessageTemplateDirective, i15.HeroCardComponent, i16.ChatMessageBoxTemplateDirective, i17.ChatHeaderTemplateDirective, i18.ChatTimestampTemplateDirective, i19.ChatStatusTemplateDirective, i20.ChatSuggestionTemplateDirective, i21.InlineAIPromptComponent, i22.InlineAIPromptOutputTemplateDirective, i23.InlineAIPromptCustomMessagesComponent] });
57
+ 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: [i1.AIPromptComponent, i2.PromptViewComponent, i3.OutputViewComponent, i4.CommandViewComponent, i11.ChatComponent, i15.HeroCardComponent, i21.InlineAIPromptComponent] });
54
58
  }
55
59
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ConversationalUIModule, decorators: [{
56
60
  type: NgModule,
@@ -11,15 +11,19 @@ import { AIPromptToolbarFocusableDirective } from './ai-prompt/common/toolbar-fo
11
11
  import { OutputViewComponent, PromptViewComponent } from "./ai-prompt/views";
12
12
  import { ChatComponent } from "./chat/chat.component";
13
13
  import { CustomMessagesComponent } from "./chat/l10n/custom-messages.component";
14
- import { AttachmentTemplateDirective } from "./chat/attachment-template.directive";
15
- import { MessageTemplateDirective } from "./chat/message-template.directive";
14
+ import { AttachmentTemplateDirective } from "./chat/templates/attachment-template.directive";
15
+ import { MessageTemplateDirective } from "./chat/templates/message-template.directive";
16
+ import { ChatTimestampTemplateDirective } from "./chat/templates/timestamp-template.directive";
16
17
  import { HeroCardComponent } from "./chat/cards/hero-card.component";
17
- import { ChatMessageBoxTemplateDirective } from "./chat/message-box.directive";
18
+ import { ChatMessageBoxTemplateDirective } from "./chat/templates/message-box.directive";
19
+ import { ChatHeaderTemplateDirective } from "./chat/templates/header-template.directive";
18
20
  import { AIPromptOutputBodyTemplateDirective } from "./ai-prompt/templates/aiprompt-output-body-template.directive";
19
21
  import { AIPromptOutputTemplateDirective } from "./ai-prompt/templates/aiprompt-output-template.directive";
20
22
  import { InlineAIPromptComponent } from "./inline-ai-prompt/inlineaiprompt.component";
21
23
  import { InlineAIPromptOutputTemplateDirective } from "./inline-ai-prompt/output-template.directive";
22
24
  import { InlineAIPromptCustomMessagesComponent } from "./inline-ai-prompt/localization/custom-messages.component";
25
+ import { ChatStatusTemplateDirective } from "./chat/templates/status-template.directive";
26
+ import { ChatSuggestionTemplateDirective } from "./chat/templates/suggestion-template.directive";
23
27
  /**
24
28
  * Utility array that contains all AIPrompt related components and directives.
25
29
  *
@@ -72,7 +76,11 @@ export const KENDO_CHAT = [
72
76
  AttachmentTemplateDirective,
73
77
  MessageTemplateDirective,
74
78
  HeroCardComponent,
75
- ChatMessageBoxTemplateDirective
79
+ ChatMessageBoxTemplateDirective,
80
+ ChatHeaderTemplateDirective,
81
+ ChatTimestampTemplateDirective,
82
+ ChatStatusTemplateDirective,
83
+ ChatSuggestionTemplateDirective
76
84
  ];
77
85
  /**
78
86
  * Utility array that contains all InlineAIPrompt related components and directives.
package/esm2022/index.mjs CHANGED
@@ -2,15 +2,21 @@
2
2
  * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- export { ChatComponent, AttachmentTemplateDirective, MessageTemplateDirective } from './chat/chat.directives';
6
- export { ExecuteActionEvent, SendMessageEvent } from './chat/api';
5
+ export * from './chat/api';
7
6
  export { AIPromptModule } from './ai-prompt/aiprompt.module';
8
7
  export { ChatModule } from './chat/chat.module';
9
8
  export { ConversationalUIModule } from './conversational-ui.module';
10
9
  export { InlineAIPromptModule } from './inline-ai-prompt/inlineaiprompt.module';
10
+ export { ChatComponent } from './chat/chat.component';
11
11
  export { HeroCardComponent } from './chat/cards/hero-card.component';
12
12
  export { CustomMessagesComponent } from './chat/l10n/custom-messages.component';
13
- export { ChatMessageBoxTemplateDirective } from './chat/message-box.directive';
13
+ export { ChatMessageBoxTemplateDirective } from './chat/templates/message-box.directive';
14
+ export { ChatHeaderTemplateDirective } from './chat/templates/header-template.directive';
15
+ export { ChatTimestampTemplateDirective } from './chat/templates/timestamp-template.directive';
16
+ export { AttachmentTemplateDirective } from './chat/templates/attachment-template.directive';
17
+ export { MessageTemplateDirective } from './chat/templates/message-template.directive';
18
+ export { ChatSuggestionTemplateDirective } from './chat/templates/suggestion-template.directive';
19
+ export { ChatStatusTemplateDirective } from './chat/templates/status-template.directive';
14
20
  export { AIPromptComponent } from './ai-prompt/aiprompt.component';
15
21
  export { AIPromptCustomMessagesComponent } from './ai-prompt/localization/custom-messages.component';
16
22
  export { AIPromptToolbarActionsDirective } from './ai-prompt/templates/toolbar-actions.template';
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1755865420,
14
- version: '20.0.0-develop.4',
13
+ publishDate: 1755877913,
14
+ version: '20.0.0-develop.6',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };