@progress/kendo-angular-conversational-ui 21.4.1-develop.1 → 22.0.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.
Files changed (116) hide show
  1. package/ai-prompt/localization/messages.d.ts +1 -1
  2. package/ai-prompt/views/base-view.d.ts +1 -1
  3. package/chat/l10n/messages.d.ts +1 -1
  4. package/fesm2022/progress-kendo-angular-conversational-ui.mjs +182 -182
  5. package/inline-ai-prompt/localization/messages.d.ts +1 -1
  6. package/package.json +17 -25
  7. package/esm2022/ai-prompt/aiprompt.component.mjs +0 -556
  8. package/esm2022/ai-prompt/aiprompt.module.mjs +0 -53
  9. package/esm2022/ai-prompt/common/aiprompt.service.mjs +0 -75
  10. package/esm2022/ai-prompt/common/output-card.component.mjs +0 -230
  11. package/esm2022/ai-prompt/common/toolbar-focusable.directive.mjs +0 -72
  12. package/esm2022/ai-prompt/common/toolbar-navigation.service.mjs +0 -56
  13. package/esm2022/ai-prompt/localization/custom-messages.component.mjs +0 -54
  14. package/esm2022/ai-prompt/localization/localized-messages.directive.mjs +0 -39
  15. package/esm2022/ai-prompt/localization/messages.mjs +0 -77
  16. package/esm2022/ai-prompt/models/ai-prompt-settings.mjs +0 -5
  17. package/esm2022/ai-prompt/models/command-execute-event.mjs +0 -5
  18. package/esm2022/ai-prompt/models/command.interface.mjs +0 -5
  19. package/esm2022/ai-prompt/models/index.mjs +0 -5
  20. package/esm2022/ai-prompt/models/output-rating-change-event.mjs +0 -5
  21. package/esm2022/ai-prompt/models/prompt-output.interface.mjs +0 -5
  22. package/esm2022/ai-prompt/models/prompt-request-event.mjs +0 -5
  23. package/esm2022/ai-prompt/models/view-type.mjs +0 -5
  24. package/esm2022/ai-prompt/templates/aiprompt-output-body-template.directive.mjs +0 -33
  25. package/esm2022/ai-prompt/templates/aiprompt-output-template.directive.mjs +0 -33
  26. package/esm2022/ai-prompt/templates/toolbar-actions.template.mjs +0 -39
  27. package/esm2022/ai-prompt/utils.mjs +0 -26
  28. package/esm2022/ai-prompt/views/base-view.mjs +0 -98
  29. package/esm2022/ai-prompt/views/command-view.component.mjs +0 -100
  30. package/esm2022/ai-prompt/views/custom-view.component.mjs +0 -50
  31. package/esm2022/ai-prompt/views/index.mjs +0 -8
  32. package/esm2022/ai-prompt/views/output-view.component.mjs +0 -90
  33. package/esm2022/ai-prompt/views/prompt-view.component.mjs +0 -288
  34. package/esm2022/chat/api/action.interface.mjs +0 -5
  35. package/esm2022/chat/api/attachment.interface.mjs +0 -5
  36. package/esm2022/chat/api/chat-file-interface.mjs +0 -5
  37. package/esm2022/chat/api/chat-suggestion.interface.mjs +0 -5
  38. package/esm2022/chat/api/execute-action-event.mjs +0 -29
  39. package/esm2022/chat/api/file-action.mjs +0 -5
  40. package/esm2022/chat/api/file-download-event.interface.mjs +0 -5
  41. package/esm2022/chat/api/files-layout.mjs +0 -5
  42. package/esm2022/chat/api/index.mjs +0 -21
  43. package/esm2022/chat/api/message-action.mjs +0 -5
  44. package/esm2022/chat/api/message-settings.interface.mjs +0 -5
  45. package/esm2022/chat/api/message-width-mode.mjs +0 -5
  46. package/esm2022/chat/api/message.interface.mjs +0 -5
  47. package/esm2022/chat/api/post-message-event.mjs +0 -21
  48. package/esm2022/chat/api/preventable-event.mjs +0 -28
  49. package/esm2022/chat/api/send-button-settings.mjs +0 -5
  50. package/esm2022/chat/api/suggestions-layout.mjs +0 -5
  51. package/esm2022/chat/api/timestamp-visibility.mjs +0 -5
  52. package/esm2022/chat/api/user.interface.mjs +0 -5
  53. package/esm2022/chat/attachment.component.mjs +0 -105
  54. package/esm2022/chat/builtin-actions.mjs +0 -27
  55. package/esm2022/chat/cards/hero-card.component.mjs +0 -131
  56. package/esm2022/chat/chat-file.component.mjs +0 -144
  57. package/esm2022/chat/chat-item.mjs +0 -10
  58. package/esm2022/chat/chat-view.mjs +0 -80
  59. package/esm2022/chat/chat.component.mjs +0 -1015
  60. package/esm2022/chat/chat.directives.mjs +0 -18
  61. package/esm2022/chat/chat.module.mjs +0 -61
  62. package/esm2022/chat/common/chat.service.mjs +0 -179
  63. package/esm2022/chat/common/models/default-model-fields.mjs +0 -25
  64. package/esm2022/chat/common/models/formatted-text-parts.mjs +0 -5
  65. package/esm2022/chat/common/models/message-box-options.mjs +0 -5
  66. package/esm2022/chat/common/models/model-fields.mjs +0 -5
  67. package/esm2022/chat/common/scroll-anchor.directive.mjs +0 -80
  68. package/esm2022/chat/common/scroll-button.component.mjs +0 -81
  69. package/esm2022/chat/common/scroll.service.mjs +0 -110
  70. package/esm2022/chat/common/utils.mjs +0 -159
  71. package/esm2022/chat/l10n/custom-messages.component.mjs +0 -55
  72. package/esm2022/chat/l10n/localized-messages.directive.mjs +0 -40
  73. package/esm2022/chat/l10n/messages.mjs +0 -130
  74. package/esm2022/chat/message-attachments.component.mjs +0 -258
  75. package/esm2022/chat/message-box.component.mjs +0 -501
  76. package/esm2022/chat/message-list.component.mjs +0 -617
  77. package/esm2022/chat/message-reference-content.component.mjs +0 -86
  78. package/esm2022/chat/message.component.mjs +0 -740
  79. package/esm2022/chat/suggested-actions.component.mjs +0 -443
  80. package/esm2022/chat/templates/attachment-template.directive.mjs +0 -43
  81. package/esm2022/chat/templates/author-message-content-template.directive.mjs +0 -39
  82. package/esm2022/chat/templates/author-message-template.directive.mjs +0 -39
  83. package/esm2022/chat/templates/header-template.directive.mjs +0 -33
  84. package/esm2022/chat/templates/message-box.directive.mjs +0 -36
  85. package/esm2022/chat/templates/message-content-template.directive.mjs +0 -39
  86. package/esm2022/chat/templates/message-template.directive.mjs +0 -39
  87. package/esm2022/chat/templates/no-data-template.directive.mjs +0 -38
  88. package/esm2022/chat/templates/receiver-message-content-template.directive.mjs +0 -39
  89. package/esm2022/chat/templates/receiver-message-template.directive.mjs +0 -39
  90. package/esm2022/chat/templates/status-template.directive.mjs +0 -33
  91. package/esm2022/chat/templates/suggestion-template.directive.mjs +0 -36
  92. package/esm2022/chat/templates/timestamp-template.directive.mjs +0 -42
  93. package/esm2022/chat/templates/user-status-template.directive.mjs +0 -38
  94. package/esm2022/conversational-ui.module.mjs +0 -73
  95. package/esm2022/directives.mjs +0 -145
  96. package/esm2022/index.mjs +0 -40
  97. package/esm2022/inline-ai-prompt/inlineaiprompt-content.component.mjs +0 -548
  98. package/esm2022/inline-ai-prompt/inlineaiprompt.component.mjs +0 -351
  99. package/esm2022/inline-ai-prompt/inlineaiprompt.module.mjs +0 -46
  100. package/esm2022/inline-ai-prompt/inlineaiprompt.service.mjs +0 -92
  101. package/esm2022/inline-ai-prompt/localization/custom-messages.component.mjs +0 -51
  102. package/esm2022/inline-ai-prompt/localization/localized-messages.directive.mjs +0 -39
  103. package/esm2022/inline-ai-prompt/localization/messages.mjs +0 -35
  104. package/esm2022/inline-ai-prompt/models/command.interface.mjs +0 -5
  105. package/esm2022/inline-ai-prompt/models/index.mjs +0 -5
  106. package/esm2022/inline-ai-prompt/models/inlineaiprompt-popupsettings.mjs +0 -5
  107. package/esm2022/inline-ai-prompt/models/inlineaiprompt-settings.mjs +0 -59
  108. package/esm2022/inline-ai-prompt/models/messages.mjs +0 -8
  109. package/esm2022/inline-ai-prompt/models/output-action-click-event.mjs +0 -5
  110. package/esm2022/inline-ai-prompt/models/output-action.interface.mjs +0 -5
  111. package/esm2022/inline-ai-prompt/models/prompt-output.interface.mjs +0 -5
  112. package/esm2022/inline-ai-prompt/models/prompt-request-event.mjs +0 -5
  113. package/esm2022/inline-ai-prompt/output-template.directive.mjs +0 -38
  114. package/esm2022/inline-ai-prompt/utils.mjs +0 -57
  115. package/esm2022/package-metadata.mjs +0 -16
  116. package/esm2022/progress-kendo-angular-conversational-ui.mjs +0 -8
@@ -1,443 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /* eslint-disable @typescript-eslint/no-explicit-any */
6
- /* eslint-disable @typescript-eslint/no-empty-function */
7
- import { Component, ElementRef, EventEmitter, forwardRef, HostBinding, Input, Output, QueryList, ViewChildren, ViewChild, NgZone, Renderer2 } from '@angular/core';
8
- import { NgTemplateOutlet } from '@angular/common';
9
- import { Subscription } from 'rxjs';
10
- import { take } from 'rxjs/operators';
11
- import { Keys, normalizeKeys } from '@progress/kendo-angular-common';
12
- import { ChatItem } from './chat-item';
13
- import { ChatSuggestionTemplateDirective } from './templates/suggestion-template.directive';
14
- import { ChatService } from './common/chat.service';
15
- import { ChatScrollableButtonComponent } from './common/scroll-button.component';
16
- import { LocalizationService } from '@progress/kendo-angular-l10n';
17
- import { SuggestionsScrollService } from './common/scroll.service';
18
- import * as i0 from "@angular/core";
19
- import * as i1 from "./common/chat.service";
20
- import * as i2 from "@progress/kendo-angular-l10n";
21
- import * as i3 from "./common/scroll.service";
22
- /**
23
- * @hidden
24
- */
25
- export class SuggestedActionsComponent extends ChatItem {
26
- chatService;
27
- localization;
28
- scrollService;
29
- ngZone;
30
- renderer;
31
- get defaultClass() {
32
- if (this.type === 'suggestion') {
33
- return this.chatService.suggestionsLayout === 'wrap' || this.chatService.suggestionsLayout === 'scroll';
34
- }
35
- else if (this.type === 'action') {
36
- return this.chatService.quickActionsLayout === 'wrap' || this.chatService.quickActionsLayout === 'scroll';
37
- }
38
- }
39
- get scrollableClass() {
40
- if (this.type === 'suggestion') {
41
- return this.chatService.suggestionsLayout === 'scroll';
42
- }
43
- else if (this.type === 'action') {
44
- return this.chatService.quickActionsLayout === 'scroll';
45
- }
46
- }
47
- get scrollButtonsClass() {
48
- if (this.type === 'suggestion') {
49
- return this.chatService.suggestionsLayout === 'scrollbuttons';
50
- }
51
- else if (this.type === 'action') {
52
- return this.chatService.quickActionsLayout === 'scrollbuttons';
53
- }
54
- }
55
- get role() {
56
- if (!this.hasScrollButtons) {
57
- return 'group';
58
- }
59
- return null;
60
- }
61
- actions;
62
- suggestions;
63
- tabbable;
64
- type;
65
- suggestionTemplate;
66
- dispatchAction = new EventEmitter();
67
- dispatchSuggestion = new EventEmitter();
68
- items;
69
- suggestionsContainer;
70
- prevScrollButton;
71
- nextScrollButton;
72
- selectedIndex = 0;
73
- activeIndex = -1;
74
- active = false;
75
- get hasScrollButtons() {
76
- return this.type === 'suggestion' ? this.chatService.suggestionsLayout === 'scrollbuttons' : this.chatService.quickActionsLayout === 'scrollbuttons';
77
- }
78
- subscriptions = new Subscription();
79
- resizeObserver = null;
80
- actionKeyHandlers = {
81
- [Keys.Tab]: (e) => this.changeSelectedIndex(e),
82
- [Keys.Enter]: (_, action) => this.actionClick(action),
83
- [Keys.Space]: (_, action) => this.actionClick(action),
84
- };
85
- suggestionKeyHandlers = {
86
- [Keys.Tab]: (e) => this.changeSelectedIndex(e),
87
- [Keys.Enter]: (_, suggestion) => this.suggestionClick(suggestion),
88
- [Keys.Space]: (_, suggestion) => this.suggestionClick(suggestion),
89
- };
90
- constructor(chatService, localization, scrollService, ngZone, renderer) {
91
- super();
92
- this.chatService = chatService;
93
- this.localization = localization;
94
- this.scrollService = scrollService;
95
- this.ngZone = ngZone;
96
- this.renderer = renderer;
97
- this.scrollService.owner = this;
98
- }
99
- ngAfterViewInit() {
100
- const layoutChangeObservable = this.type === 'suggestion'
101
- ? this.chatService.suggestionsLayoutChange$
102
- : this.chatService.quickActionsLayoutChange$;
103
- this.subscriptions.add(layoutChangeObservable.subscribe((layoutMode) => {
104
- if (layoutMode === 'scrollbuttons') {
105
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
106
- if (this.suggestionsContainer) {
107
- this.scrollService.updateScrollPosition(this.suggestionsContainer.nativeElement);
108
- }
109
- this.scrollService.toggleScrollButtonsState();
110
- });
111
- }
112
- }));
113
- this.subscriptions.add(this.scrollService.scrollButtonActiveStateChange.subscribe((change) => {
114
- this.toggleScrollButtonState(change.buttonType, change.active);
115
- }));
116
- if (this.hasScrollButtons && this.suggestionsContainer) {
117
- this.ngZone.runOutsideAngular(() => {
118
- this.resizeObserver = new ResizeObserver(() => {
119
- this.ngZone.run(() => {
120
- this.scrollService.toggleScrollButtonsState();
121
- });
122
- });
123
- this.resizeObserver.observe(this.suggestionsContainer.nativeElement);
124
- });
125
- }
126
- if (this.hasScrollButtons) {
127
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
128
- this.scrollService.toggleScrollButtonsState();
129
- });
130
- if (this.suggestionsContainer) {
131
- this.scrollService.updateScrollPosition(this.suggestionsContainer.nativeElement);
132
- }
133
- }
134
- }
135
- ngOnDestroy() {
136
- this.subscriptions.unsubscribe();
137
- if (this.resizeObserver) {
138
- this.resizeObserver.disconnect();
139
- this.resizeObserver = null;
140
- }
141
- }
142
- isSelected(index) {
143
- return this.selected && this.selectedIndex === index;
144
- }
145
- isActive(index) {
146
- return this.activeIndex === index;
147
- }
148
- actionClick(action, index) {
149
- if (index >= 0) {
150
- this.selectedIndex = index;
151
- }
152
- this.dispatchAction.next(action);
153
- }
154
- suggestionClick(suggestion, index) {
155
- if (index >= 0) {
156
- this.selectedIndex = index;
157
- }
158
- this.dispatchSuggestion.next(suggestion);
159
- }
160
- toggleActiveState(apply, index) {
161
- this.activeIndex = apply ? index : -1;
162
- }
163
- actionKeydown(e, action) {
164
- const handler = this.actionKeyHandlers[normalizeKeys(e)];
165
- if (handler) {
166
- handler(e, action);
167
- }
168
- }
169
- suggestionKeydown(e, suggestion) {
170
- const handler = this.suggestionKeyHandlers[normalizeKeys(e)];
171
- if (handler) {
172
- handler(e, suggestion);
173
- }
174
- }
175
- getScrollButtonTitle(direction) {
176
- let currentButton;
177
- if (this.localization.rtl) {
178
- currentButton = direction === 'prev' ? 'nextSuggestionsButtonTitle' : 'previousSuggestionsButtonTitle';
179
- }
180
- else {
181
- currentButton = direction === 'prev' ? 'previousSuggestionsButtonTitle' : 'nextSuggestionsButtonTitle';
182
- }
183
- return this.localization.get(currentButton);
184
- }
185
- onScroll(event) {
186
- this.scrollService.onScroll(event);
187
- }
188
- scrollSuggestions(direction) {
189
- this.scrollService.scrollSuggestions(direction);
190
- }
191
- focus() { }
192
- toggleScrollButtonState(buttonType, active) {
193
- const button = this[`${buttonType}ScrollButton`];
194
- if (button?.nativeElement) {
195
- if (active) {
196
- this.renderer.removeClass(button.nativeElement, 'k-disabled');
197
- }
198
- else {
199
- this.renderer.addClass(button.nativeElement, 'k-disabled');
200
- }
201
- }
202
- }
203
- changeSelectedIndex(e) {
204
- const offset = e.shiftKey ? -1 : 1;
205
- const prevIndex = this.selectedIndex;
206
- this.selectedIndex = Math.max(0, Math.min(prevIndex + offset, this.items.length - 1));
207
- }
208
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuggestedActionsComponent, deps: [{ token: i1.ChatService }, { token: i2.LocalizationService }, { token: i3.SuggestionsScrollService }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
209
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.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: [{
210
- provide: ChatItem,
211
- useExisting: forwardRef(() => SuggestedActionsComponent)
212
- },
213
- SuggestionsScrollService
214
- ], 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: `
215
- @if (hasScrollButtons) {
216
- <span
217
- #prevScrollButton
218
- kendoChatScrollableButton
219
- [prev]="true"
220
- [title]="getScrollButtonTitle('prev')"
221
- class="k-button k-button-md k-button-solid k-button-solid-base k-rounded-md k-icon-button"
222
- (onClick)="scrollSuggestions($event)"
223
- >
224
- </span>
225
- }
226
- @if (hasScrollButtons) {
227
- <div class="k-suggestion-group"
228
- #suggestionsContainer
229
- role="group"
230
- (scroll)="onScroll($event)">
231
- <ng-container *ngTemplateOutlet="suggestionsContent"></ng-container>
232
- </div>
233
- } @else {
234
- <ng-container *ngTemplateOutlet="suggestionsContent"></ng-container>
235
- }
236
-
237
-
238
- <ng-template #suggestionsContent>
239
- @if (actions) {
240
- @for (action of actions; track action; let index = $index; let first = $first; let last = $last) {
241
- <span
242
- #item
243
- class="k-suggestion k-suggestion-primary"
244
- role="button"
245
- [class.k-selected]="isSelected(index)"
246
- [class.k-focus]="isSelected(index)"
247
- [class.k-active]="isActive(index)"
248
- [attr.tabindex]="0"
249
- (click)="actionClick(action, index)"
250
- (keydown)="actionKeydown($event, action)"
251
- (mousedown)="toggleActiveState(true, index)"
252
- (mouseup)="toggleActiveState(false, index)"
253
- >
254
- {{ action.title || action.value }}
255
- </span>
256
- }
257
- }
258
-
259
- @if (suggestions) {
260
- @if (!suggestionTemplate?.templateRef) {
261
- @for (suggestion of suggestions; track suggestion; let index = $index; let first = $first; let last = $last) {
262
- <span
263
- #item
264
- class="k-suggestion"
265
- role="button"
266
- [class.k-selected]="isSelected(index)"
267
- [class.k-focus]="isSelected(index)"
268
- [class.k-active]="isActive(index)"
269
- [attr.tabindex]="0"
270
- (click)="suggestionClick(suggestion, index)"
271
- (keydown)="suggestionKeydown($event, suggestion)"
272
- (mousedown)="toggleActiveState(true, index)"
273
- (mouseup)="toggleActiveState(false, index)"
274
- >
275
- {{ suggestion.text }}
276
- </span>
277
- }
278
- }
279
- @if (suggestionTemplate?.templateRef) {
280
- @for (suggestion of suggestions; track suggestion) {
281
- <ng-template
282
- [ngTemplateOutlet]="suggestionTemplate.templateRef"
283
- [ngTemplateOutletContext]="{ $implicit: suggestion }"
284
- >
285
- </ng-template>
286
- }
287
- }
288
- }
289
- </ng-template>
290
-
291
- @if (hasScrollButtons) {
292
- <span
293
- #nextScrollButton
294
- kendoChatScrollableButton
295
- [prev]="false"
296
- [title]="getScrollButtonTitle('next')"
297
- class="k-button k-button-md k-button-solid k-button-solid-base k-rounded-md k-icon-button"
298
- (onClick)="scrollSuggestions($event)"
299
- >
300
- </span>
301
- }
302
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ChatScrollableButtonComponent, selector: "[kendoChatScrollableButton]", inputs: ["prev"], outputs: ["onClick"] }] });
303
- }
304
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuggestedActionsComponent, decorators: [{
305
- type: Component,
306
- args: [{
307
- selector: 'kendo-chat-suggested-actions',
308
- providers: [{
309
- provide: ChatItem,
310
- useExisting: forwardRef(() => SuggestedActionsComponent)
311
- },
312
- SuggestionsScrollService],
313
- template: `
314
- @if (hasScrollButtons) {
315
- <span
316
- #prevScrollButton
317
- kendoChatScrollableButton
318
- [prev]="true"
319
- [title]="getScrollButtonTitle('prev')"
320
- class="k-button k-button-md k-button-solid k-button-solid-base k-rounded-md k-icon-button"
321
- (onClick)="scrollSuggestions($event)"
322
- >
323
- </span>
324
- }
325
- @if (hasScrollButtons) {
326
- <div class="k-suggestion-group"
327
- #suggestionsContainer
328
- role="group"
329
- (scroll)="onScroll($event)">
330
- <ng-container *ngTemplateOutlet="suggestionsContent"></ng-container>
331
- </div>
332
- } @else {
333
- <ng-container *ngTemplateOutlet="suggestionsContent"></ng-container>
334
- }
335
-
336
-
337
- <ng-template #suggestionsContent>
338
- @if (actions) {
339
- @for (action of actions; track action; let index = $index; let first = $first; let last = $last) {
340
- <span
341
- #item
342
- class="k-suggestion k-suggestion-primary"
343
- role="button"
344
- [class.k-selected]="isSelected(index)"
345
- [class.k-focus]="isSelected(index)"
346
- [class.k-active]="isActive(index)"
347
- [attr.tabindex]="0"
348
- (click)="actionClick(action, index)"
349
- (keydown)="actionKeydown($event, action)"
350
- (mousedown)="toggleActiveState(true, index)"
351
- (mouseup)="toggleActiveState(false, index)"
352
- >
353
- {{ action.title || action.value }}
354
- </span>
355
- }
356
- }
357
-
358
- @if (suggestions) {
359
- @if (!suggestionTemplate?.templateRef) {
360
- @for (suggestion of suggestions; track suggestion; let index = $index; let first = $first; let last = $last) {
361
- <span
362
- #item
363
- class="k-suggestion"
364
- role="button"
365
- [class.k-selected]="isSelected(index)"
366
- [class.k-focus]="isSelected(index)"
367
- [class.k-active]="isActive(index)"
368
- [attr.tabindex]="0"
369
- (click)="suggestionClick(suggestion, index)"
370
- (keydown)="suggestionKeydown($event, suggestion)"
371
- (mousedown)="toggleActiveState(true, index)"
372
- (mouseup)="toggleActiveState(false, index)"
373
- >
374
- {{ suggestion.text }}
375
- </span>
376
- }
377
- }
378
- @if (suggestionTemplate?.templateRef) {
379
- @for (suggestion of suggestions; track suggestion) {
380
- <ng-template
381
- [ngTemplateOutlet]="suggestionTemplate.templateRef"
382
- [ngTemplateOutletContext]="{ $implicit: suggestion }"
383
- >
384
- </ng-template>
385
- }
386
- }
387
- }
388
- </ng-template>
389
-
390
- @if (hasScrollButtons) {
391
- <span
392
- #nextScrollButton
393
- kendoChatScrollableButton
394
- [prev]="false"
395
- [title]="getScrollButtonTitle('next')"
396
- class="k-button k-button-md k-button-solid k-button-solid-base k-rounded-md k-icon-button"
397
- (onClick)="scrollSuggestions($event)"
398
- >
399
- </span>
400
- }
401
- `,
402
- standalone: true,
403
- imports: [NgTemplateOutlet, ChatScrollableButtonComponent]
404
- }]
405
- }], ctorParameters: () => [{ type: i1.ChatService }, { type: i2.LocalizationService }, { type: i3.SuggestionsScrollService }, { type: i0.NgZone }, { type: i0.Renderer2 }], propDecorators: { defaultClass: [{
406
- type: HostBinding,
407
- args: ['class.k-suggestion-group']
408
- }], scrollableClass: [{
409
- type: HostBinding,
410
- args: ['class.k-suggestion-group-scrollable']
411
- }], scrollButtonsClass: [{
412
- type: HostBinding,
413
- args: ['class.k-suggestion-scrollwrap']
414
- }], role: [{
415
- type: HostBinding,
416
- args: ['attr.role']
417
- }], actions: [{
418
- type: Input
419
- }], suggestions: [{
420
- type: Input
421
- }], tabbable: [{
422
- type: Input
423
- }], type: [{
424
- type: Input
425
- }], suggestionTemplate: [{
426
- type: Input
427
- }], dispatchAction: [{
428
- type: Output
429
- }], dispatchSuggestion: [{
430
- type: Output
431
- }], items: [{
432
- type: ViewChildren,
433
- args: ['item']
434
- }], suggestionsContainer: [{
435
- type: ViewChild,
436
- args: ['suggestionsContainer', { read: ElementRef, static: false }]
437
- }], prevScrollButton: [{
438
- type: ViewChild,
439
- args: ['prevScrollButton', { read: ElementRef }]
440
- }], nextScrollButton: [{
441
- type: ViewChild,
442
- args: ['nextScrollButton', { read: ElementRef }]
443
- }] } });
@@ -1,43 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 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 message attachments.
9
- *
10
- * To define an attachment template, nest an `<ng-template>` tag with the `kendoChatAttachmentTemplate` attribute inside the `<kendo-chat>` component.
11
- * The template context is set to the attachment instance.
12
- * For more information, refer to the article on [message attachments](slug:attachments_chat).
13
- *
14
- * You can use the following field:
15
- * - `attachment`&mdash;The attachment instance.
16
- * - `message`&mdash;The message instance.
17
- *
18
- * @example
19
- * ```html
20
- * <kendo-chat>
21
- * <ng-template kendoChatAttachmentTemplate let-attachment let-message>
22
- * <div>Attachment: {{ attachment.content }}</div>
23
- * </ng-template>
24
- * </kendo-chat>
25
- * ```
26
- */
27
- export class AttachmentTemplateDirective {
28
- templateRef;
29
- constructor(templateRef) {
30
- this.templateRef = templateRef;
31
- }
32
- 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 });
33
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: AttachmentTemplateDirective, isStandalone: true, selector: "[kendoChatAttachmentTemplate]", ngImport: i0 });
34
- }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AttachmentTemplateDirective, decorators: [{
36
- type: Directive,
37
- args: [{
38
- selector: '[kendoChatAttachmentTemplate]',
39
- standalone: true
40
- }]
41
- }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
42
- type: Optional
43
- }] }] });
@@ -1,39 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 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 custom content inside the current user's messages in the Chat.
9
- *
10
- * To define a message template, nest an `<ng-template>` tag with the `kendoChatAuthorMessageContentTemplate` directive inside the `<kendo-chat>` component.
11
- * The template context is set to the `message` instance.
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 kendoChatAuthorMessageContentTemplate let-message>
18
- * <div>Message: {{ message.text }}</div>
19
- * </ng-template>
20
- * </kendo-chat>
21
- * ```
22
- */
23
- export class AuthorMessageContentTemplateDirective {
24
- templateRef;
25
- constructor(templateRef) {
26
- this.templateRef = templateRef;
27
- }
28
- 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 });
29
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: AuthorMessageContentTemplateDirective, isStandalone: true, selector: "[kendoChatAuthorMessageContentTemplate]", ngImport: i0 });
30
- }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AuthorMessageContentTemplateDirective, decorators: [{
32
- type: Directive,
33
- args: [{
34
- selector: '[kendoChatAuthorMessageContentTemplate]',
35
- standalone: true
36
- }]
37
- }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
38
- type: Optional
39
- }] }] });
@@ -1,39 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 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 fully custom Chat message bubbles for the current user.
9
- *
10
- * To define a message template, nest an `<ng-template>` tag with the `kendoChatAuthorMessageTemplate` directive inside the `<kendo-chat>` component.
11
- * The template context is set to the `message` instance.
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 kendoChatAuthorMessageTemplate let-message>
18
- * <div>Message: {{ message.text }}</div>
19
- * </ng-template>
20
- * </kendo-chat>
21
- * ```
22
- */
23
- export class AuthorMessageTemplateDirective {
24
- templateRef;
25
- constructor(templateRef) {
26
- this.templateRef = templateRef;
27
- }
28
- 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 });
29
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: AuthorMessageTemplateDirective, isStandalone: true, selector: "[kendoChatAuthorMessageTemplate]", ngImport: i0 });
30
- }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AuthorMessageTemplateDirective, decorators: [{
32
- type: Directive,
33
- args: [{
34
- selector: '[kendoChatAuthorMessageTemplate]',
35
- standalone: true
36
- }]
37
- }], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
38
- type: Optional
39
- }] }] });
@@ -1,33 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 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: "18.2.14", ngImport: i0, type: ChatHeaderTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
25
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ChatHeaderTemplateDirective, isStandalone: true, selector: "[kendoChatHeaderTemplate]", ngImport: i0 });
26
- }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatHeaderTemplateDirective, decorators: [{
28
- type: Directive,
29
- args: [{
30
- selector: '[kendoChatHeaderTemplate]',
31
- standalone: true
32
- }]
33
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
@@ -1,36 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 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
- * Creates a message box area that overrides the default message box of the Chat component.
9
- *
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_templates_chat#toc-message-box-template).
12
- *
13
- * @example
14
- * ```html
15
- * <kendo-chat>
16
- * <ng-template kendoChatMessageBoxTemplate>
17
- * <input type="text" placeholder="Custom message box..." />
18
- * </ng-template>
19
- * </kendo-chat>
20
- * ```
21
- */
22
- export class ChatMessageBoxTemplateDirective {
23
- templateRef;
24
- constructor(templateRef) {
25
- this.templateRef = templateRef;
26
- }
27
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatMessageBoxTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
28
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ChatMessageBoxTemplateDirective, isStandalone: true, selector: "[kendoChatMessageBoxTemplate]", ngImport: i0 });
29
- }
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChatMessageBoxTemplateDirective, decorators: [{
31
- type: Directive,
32
- args: [{
33
- selector: '[kendoChatMessageBoxTemplate]',
34
- standalone: true
35
- }]
36
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });