@progress/kendo-angular-conversational-ui 24.2.2 → 25.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.
- package/fesm2022/progress-kendo-angular-conversational-ui.mjs +228 -228
- package/index.d.ts +4350 -51
- package/package-metadata.mjs +2 -2
- package/package.json +18 -18
- package/ai-prompt/aiprompt.component.d.ts +0 -203
- package/ai-prompt/aiprompt.module.d.ts +0 -38
- package/ai-prompt/common/aiprompt.service.d.ts +0 -36
- package/ai-prompt/common/output-card.component.d.ts +0 -42
- package/ai-prompt/common/toolbar-focusable.directive.d.ts +0 -24
- package/ai-prompt/common/toolbar-navigation.service.d.ts +0 -24
- package/ai-prompt/localization/custom-messages.component.d.ts +0 -28
- package/ai-prompt/localization/localized-messages.directive.d.ts +0 -16
- package/ai-prompt/localization/messages.d.ts +0 -53
- package/ai-prompt/models/ai-prompt-settings.d.ts +0 -60
- package/ai-prompt/models/command-execute-event.d.ts +0 -24
- package/ai-prompt/models/command.interface.d.ts +0 -30
- package/ai-prompt/models/index.d.ts +0 -11
- package/ai-prompt/models/output-rating-change-event.d.ts +0 -19
- package/ai-prompt/models/prompt-output.interface.d.ts +0 -41
- package/ai-prompt/models/prompt-request-event.d.ts +0 -23
- package/ai-prompt/models/view-type.d.ts +0 -8
- package/ai-prompt/templates/aiprompt-output-body-template.directive.d.ts +0 -24
- package/ai-prompt/templates/aiprompt-output-template.directive.d.ts +0 -24
- package/ai-prompt/templates/toolbar-actions.template.d.ts +0 -28
- package/ai-prompt/utils.d.ts +0 -19
- package/ai-prompt/views/base-view.d.ts +0 -46
- package/ai-prompt/views/command-view.component.d.ts +0 -36
- package/ai-prompt/views/custom-view.component.d.ts +0 -30
- package/ai-prompt/views/index.d.ts +0 -8
- package/ai-prompt/views/output-view.component.d.ts +0 -33
- package/ai-prompt/views/prompt-view.component.d.ts +0 -76
- package/chat/api/action.interface.d.ts +0 -30
- package/chat/api/attachment.interface.d.ts +0 -33
- package/chat/api/chat-file-interface.d.ts +0 -41
- package/chat/api/chat-load-more-event.d.ts +0 -18
- package/chat/api/chat-referenced-message-click-event.d.ts +0 -18
- package/chat/api/chat-suggestion.interface.d.ts +0 -25
- package/chat/api/execute-action-event.d.ts +0 -27
- package/chat/api/file-action.d.ts +0 -45
- package/chat/api/file-download-event.interface.d.ts +0 -21
- package/chat/api/files-layout.d.ts +0 -12
- package/chat/api/index.d.ts +0 -25
- package/chat/api/message-action.d.ts +0 -45
- package/chat/api/message-box.d.ts +0 -28
- package/chat/api/message-settings.interface.d.ts +0 -41
- package/chat/api/message-status.interface.d.ts +0 -22
- package/chat/api/message-width-mode.d.ts +0 -10
- package/chat/api/message.interface.d.ts +0 -77
- package/chat/api/post-message-event.d.ts +0 -29
- package/chat/api/preventable-event.d.ts +0 -24
- package/chat/api/scroll-mode.d.ts +0 -12
- package/chat/api/send-button-settings.d.ts +0 -24
- package/chat/api/suggestions-layout.d.ts +0 -20
- package/chat/api/timestamp-visibility.d.ts +0 -10
- package/chat/api/user.interface.d.ts +0 -30
- package/chat/attachment.component.d.ts +0 -22
- package/chat/builtin-actions.d.ts +0 -14
- package/chat/cards/hero-card.component.d.ts +0 -49
- package/chat/chat-file.component.d.ts +0 -34
- package/chat/chat-item.d.ts +0 -11
- package/chat/chat-view.d.ts +0 -54
- package/chat/chat.component.d.ts +0 -561
- package/chat/chat.directives.d.ts +0 -18
- package/chat/chat.module.d.ts +0 -51
- package/chat/common/chat.service.d.ts +0 -99
- package/chat/common/endless-scroll-state.d.ts +0 -36
- package/chat/common/models/default-model-fields.d.ts +0 -9
- package/chat/common/models/formatted-text-parts.d.ts +0 -12
- package/chat/common/models/model-fields.d.ts +0 -111
- package/chat/common/models/pending-scroll-action.d.ts +0 -11
- package/chat/common/scroll-anchor.directive.d.ts +0 -72
- package/chat/common/scroll-button.component.d.ts +0 -32
- package/chat/common/scroll.service.d.ts +0 -39
- package/chat/common/utils.d.ts +0 -87
- package/chat/l10n/custom-messages.component.d.ts +0 -28
- package/chat/l10n/localized-messages.directive.d.ts +0 -16
- package/chat/l10n/messages.d.ts +0 -98
- package/chat/message-attachments.component.d.ts +0 -56
- package/chat/message-box.component.d.ts +0 -82
- package/chat/message-list.component.d.ts +0 -85
- package/chat/message-reference-content.component.d.ts +0 -24
- package/chat/message.component.d.ts +0 -106
- package/chat/suggested-actions.component.d.ts +0 -72
- package/chat/templates/attachment-template.directive.d.ts +0 -32
- package/chat/templates/author-message-content-template.directive.d.ts +0 -28
- package/chat/templates/author-message-template.directive.d.ts +0 -28
- package/chat/templates/header-template.directive.d.ts +0 -24
- package/chat/templates/message-box-end-affix-template.directive.d.ts +0 -26
- package/chat/templates/message-box-start-affix-template.directive.d.ts +0 -26
- package/chat/templates/message-box-top-affix-template.directive.d.ts +0 -26
- package/chat/templates/message-box.directive.d.ts +0 -27
- package/chat/templates/message-content-template.directive.d.ts +0 -28
- package/chat/templates/message-template.directive.d.ts +0 -28
- package/chat/templates/no-data-template.directive.d.ts +0 -27
- package/chat/templates/receiver-message-content-template.directive.d.ts +0 -28
- package/chat/templates/receiver-message-template.directive.d.ts +0 -28
- package/chat/templates/status-template.directive.d.ts +0 -24
- package/chat/templates/suggestion-template.directive.d.ts +0 -27
- package/chat/templates/timestamp-template.directive.d.ts +0 -31
- package/chat/templates/user-status-template.directive.d.ts +0 -27
- package/conversational-ui.module.d.ts +0 -70
- package/directives.d.ts +0 -138
- package/inline-ai-prompt/inlineaiprompt-content.component.d.ts +0 -82
- package/inline-ai-prompt/inlineaiprompt.component.d.ts +0 -159
- package/inline-ai-prompt/inlineaiprompt.module.d.ts +0 -31
- package/inline-ai-prompt/inlineaiprompt.service.d.ts +0 -48
- package/inline-ai-prompt/localization/custom-messages.component.d.ts +0 -25
- package/inline-ai-prompt/localization/localized-messages.directive.d.ts +0 -16
- package/inline-ai-prompt/localization/messages.d.ts +0 -25
- package/inline-ai-prompt/models/command.interface.d.ts +0 -38
- package/inline-ai-prompt/models/index.d.ts +0 -12
- package/inline-ai-prompt/models/inlineaiprompt-popupsettings.d.ts +0 -10
- package/inline-ai-prompt/models/inlineaiprompt-settings.d.ts +0 -66
- package/inline-ai-prompt/models/messages.d.ts +0 -21
- package/inline-ai-prompt/models/output-action-click-event.d.ts +0 -19
- package/inline-ai-prompt/models/output-action.interface.d.ts +0 -54
- package/inline-ai-prompt/models/prompt-output.interface.d.ts +0 -25
- package/inline-ai-prompt/models/prompt-request-event.d.ts +0 -17
- package/inline-ai-prompt/output-template.directive.d.ts +0 -27
- package/inline-ai-prompt/utils.d.ts +0 -17
- package/package-metadata.d.ts +0 -9
- package/promptbox/affixes/promptbox-end-affix.component.d.ts +0 -26
- package/promptbox/affixes/promptbox-start-affix.component.d.ts +0 -26
- package/promptbox/affixes/promptbox-top-affix.component.d.ts +0 -26
- package/promptbox/common/header-template.directive.d.ts +0 -17
- package/promptbox/common/models/action-button.d.ts +0 -66
- package/promptbox/common/models/fileselect-button.d.ts +0 -62
- package/promptbox/common/models/index.d.ts +0 -7
- package/promptbox/common/models/promptbox-mode.d.ts +0 -12
- package/promptbox/common/utils.d.ts +0 -18
- package/promptbox/localization/custom-messages.component.d.ts +0 -26
- package/promptbox/localization/localized-messages.directive.d.ts +0 -16
- package/promptbox/localization/messages.d.ts +0 -37
- package/promptbox/promptbox.component.d.ts +0 -385
- package/promptbox/tools/action-button.component.d.ts +0 -63
- package/promptbox/tools/base-tool.d.ts +0 -65
- package/promptbox/tools/fileselect-button.component.d.ts +0 -63
- package/promptbox/tools/promptbox-file.component.d.ts +0 -30
- package/promptbox/tools/speech-to-text-button.component.d.ts +0 -87
package/index.d.ts
CHANGED
|
@@ -2,54 +2,4353 @@
|
|
|
2
2
|
* Copyright © 2026 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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
5
|
+
import { SVGIcon } from '@progress/kendo-svg-icons';
|
|
6
|
+
import { SafeUrl } from '@angular/platform-browser';
|
|
7
|
+
import { ButtonSettings, SpeechToTextButtonSettings, FloatingActionButtonComponent, FabPositionMode, FabAlign, ButtonFillMode, ButtonRounded, ButtonSize, ButtonThemeColor, SpeechToTextErrorEvent, SpeechToTextResultEvent, IntegrationMode } from '@progress/kendo-angular-buttons';
|
|
8
|
+
import { SVGIcon as SVGIcon$1 } from '@progress/kendo-angular-icons';
|
|
9
|
+
import * as i0 from '@angular/core';
|
|
10
|
+
import { TemplateRef, AfterViewInit, OnDestroy, ElementRef, Renderer2, OnInit, OnChanges, AfterContentChecked, NgZone, QueryList, EventEmitter, SimpleChanges, ViewContainerRef, ChangeDetectorRef } from '@angular/core';
|
|
11
|
+
import { LocalizationService, ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
12
|
+
import * as rxjs from 'rxjs';
|
|
13
|
+
import { Subject } from 'rxjs';
|
|
14
|
+
import { TextAreaSettings, TextAreaComponent } from '@progress/kendo-angular-inputs';
|
|
15
|
+
import { PanelBarItemModel, PanelBarItemClickEvent } from '@progress/kendo-angular-layout';
|
|
16
|
+
import { ContextMenuComponent, ContextMenuPopupEvent, MenuItem } from '@progress/kendo-angular-menu';
|
|
17
|
+
import { FileRestrictions, SelectEvent, FileInfo, FileSelectComponent } from '@progress/kendo-angular-upload';
|
|
18
|
+
import { LicenseMessage } from '@progress/kendo-licensing';
|
|
19
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
20
|
+
import { PopupSettings, PopupService, PopupRef } from '@progress/kendo-angular-popup';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Specifies the button type of a quick action ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/message)).
|
|
24
|
+
* * `openUrl`—Opens a new browser window with the specified URL.
|
|
25
|
+
* * `reply`—Sends the action value as a reply in the Chat.
|
|
26
|
+
* * `call`—Treats the value as a phone number. Similar to clicking a [telephone link](https://css-tricks.com/the-current-state-of-telephone-links/).
|
|
27
|
+
* * other—Handled by user code in the [`executeAction`](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/api/chatcomponent#executeaction) event.
|
|
28
|
+
*/
|
|
29
|
+
type ActionType = 'openUrl' | 'reply' | 'call' | string;
|
|
30
|
+
/**
|
|
31
|
+
* Defines a quick action for a message.
|
|
32
|
+
* The value is interpreted according to the specified [`ActionType`](slug:api_conversational-ui_actiontype).
|
|
33
|
+
*/
|
|
34
|
+
interface Action {
|
|
35
|
+
/**
|
|
36
|
+
* Sets a predefined or custom type for the action.
|
|
37
|
+
*/
|
|
38
|
+
type: ActionType;
|
|
39
|
+
/**
|
|
40
|
+
* Sets the value associated with the action.
|
|
41
|
+
*/
|
|
42
|
+
value: any;
|
|
43
|
+
/**
|
|
44
|
+
* Sets the title for the quick action. If not set, the Chat displays the value.
|
|
45
|
+
*/
|
|
46
|
+
title?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Represents a message attachment ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/attachments)).
|
|
51
|
+
*/
|
|
52
|
+
interface Attachment {
|
|
53
|
+
/**
|
|
54
|
+
* Sets the content type identifier for the attachment. Typically a MIME type or any string.
|
|
55
|
+
*/
|
|
56
|
+
contentType: string;
|
|
57
|
+
/**
|
|
58
|
+
* Sets the content of the attachment.
|
|
59
|
+
*/
|
|
60
|
+
content: any;
|
|
61
|
+
/**
|
|
62
|
+
* Sets the title of the attachment.
|
|
63
|
+
*/
|
|
64
|
+
title?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Sets the subtitle of the attachment.
|
|
67
|
+
*/
|
|
68
|
+
subtitle?: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Specifies the layout for the message attachments.
|
|
72
|
+
*
|
|
73
|
+
* The supported values are:
|
|
74
|
+
* * `list`—A vertical list.
|
|
75
|
+
* * `carousel`—A horizontal, scrollable list. Also called a card deck.
|
|
76
|
+
*/
|
|
77
|
+
type AttachmentLayout = 'list' | 'carousel';
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Represents the files attached to a message.
|
|
81
|
+
*/
|
|
82
|
+
interface ChatFile {
|
|
83
|
+
/**
|
|
84
|
+
* Sets the unique identifier for the file.
|
|
85
|
+
*/
|
|
86
|
+
id: string | number;
|
|
87
|
+
/**
|
|
88
|
+
* Sets the file name.
|
|
89
|
+
*/
|
|
90
|
+
name: string;
|
|
91
|
+
/**
|
|
92
|
+
* Sets the file size in bytes.
|
|
93
|
+
*/
|
|
94
|
+
size: number;
|
|
95
|
+
/**
|
|
96
|
+
* Sets the MIME type, for example, `'application/pdf'`.
|
|
97
|
+
*/
|
|
98
|
+
type: string;
|
|
99
|
+
/**
|
|
100
|
+
* Sets the file extension, for example, `'.pdf'` or `'.jpg'`.
|
|
101
|
+
*/
|
|
102
|
+
extension: string;
|
|
103
|
+
/**
|
|
104
|
+
* Provides an in-memory representation of the file.
|
|
105
|
+
*/
|
|
106
|
+
rawFile?: File;
|
|
107
|
+
/**
|
|
108
|
+
* Sets the optional URL to download or view the file.
|
|
109
|
+
*/
|
|
110
|
+
url?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Sets the optional preview image URL.
|
|
113
|
+
*/
|
|
114
|
+
thumbnailUrl?: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Arguments for the `loadMore` event of the Chat.
|
|
119
|
+
* Fires when the user scrolls near the edge of the rendered message window in endless scroll mode.
|
|
120
|
+
*/
|
|
121
|
+
interface ChatLoadMoreEvent {
|
|
122
|
+
/**
|
|
123
|
+
* The inclusive start index into the full messages array.
|
|
124
|
+
*/
|
|
125
|
+
startIndex: number;
|
|
126
|
+
/**
|
|
127
|
+
* The exclusive end index into the full messages array.
|
|
128
|
+
*/
|
|
129
|
+
endIndex: number;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Arguments for the `referencedMessageClick` event of the Chat.
|
|
134
|
+
* Fires when the user clicks a pinned message indicator or a reply preview.
|
|
135
|
+
*/
|
|
136
|
+
interface ChatReferencedMessageClickEvent {
|
|
137
|
+
/**
|
|
138
|
+
* The ID of the referenced message that was clicked.
|
|
139
|
+
*/
|
|
140
|
+
id: string | number;
|
|
141
|
+
/**
|
|
142
|
+
* Specifies whether the click originated from a pinned message indicator or a reply preview.
|
|
143
|
+
*/
|
|
144
|
+
type: 'pinned' | 'reply';
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Represents the Chat suggestions displayed above the message box.
|
|
149
|
+
*/
|
|
150
|
+
interface ChatSuggestion {
|
|
151
|
+
/**
|
|
152
|
+
* Sets the unique identifier for the suggestion.
|
|
153
|
+
*/
|
|
154
|
+
id: string | number;
|
|
155
|
+
/**
|
|
156
|
+
* Sets the display text for the suggestion.
|
|
157
|
+
*/
|
|
158
|
+
text: string;
|
|
159
|
+
/**
|
|
160
|
+
* Sets the optional description for the suggestion.
|
|
161
|
+
*/
|
|
162
|
+
description?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Determines whether the suggestion is disabled.
|
|
165
|
+
*/
|
|
166
|
+
disabled?: boolean;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* @hidden
|
|
171
|
+
*/
|
|
172
|
+
declare abstract class PreventableEvent {
|
|
173
|
+
private prevented;
|
|
174
|
+
/**
|
|
175
|
+
* Prevents the default action for a specified event.
|
|
176
|
+
* In this way, the source component suppresses
|
|
177
|
+
* the built-in behavior that follows the event.
|
|
178
|
+
*/
|
|
179
|
+
preventDefault(): void;
|
|
180
|
+
/**
|
|
181
|
+
* Returns `true` if the event was prevented
|
|
182
|
+
* by any of its subscribers.
|
|
183
|
+
*
|
|
184
|
+
* @returns `true` if the default action was prevented.
|
|
185
|
+
* Otherwise, returns `false`.
|
|
186
|
+
*/
|
|
187
|
+
isDefaultPrevented(): boolean;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Defines the status of a Chat message.
|
|
192
|
+
*/
|
|
193
|
+
interface MessageStatus {
|
|
194
|
+
/**
|
|
195
|
+
* Sets the text for the message status.
|
|
196
|
+
*/
|
|
197
|
+
text?: string;
|
|
198
|
+
/**
|
|
199
|
+
* Sets the icon for the message status.
|
|
200
|
+
*/
|
|
201
|
+
icon?: string;
|
|
202
|
+
/**
|
|
203
|
+
* Sets the SVG icon for the message status.
|
|
204
|
+
*/
|
|
205
|
+
svgIcon?: SVGIcon;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Represents a participant in a Chat conversation ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat)).
|
|
210
|
+
*/
|
|
211
|
+
interface User {
|
|
212
|
+
/**
|
|
213
|
+
* Sets a unique ID for the user. Usually a number, but can be a string or object.
|
|
214
|
+
*/
|
|
215
|
+
id: any;
|
|
216
|
+
/**
|
|
217
|
+
* Sets the display name for the user.
|
|
218
|
+
*/
|
|
219
|
+
name?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Sets an avatar image for the user. By default, the URLs are sanitized.
|
|
222
|
+
* To allow unsafe values, such as a blob URI, [mark the value as a `SafeUrl`](https://angular.io/guide/security#bypass-security-apis).
|
|
223
|
+
*/
|
|
224
|
+
avatarUrl?: string | SafeUrl;
|
|
225
|
+
/**
|
|
226
|
+
* Sets the alt text for the user's avatar image.
|
|
227
|
+
*
|
|
228
|
+
* @remarks
|
|
229
|
+
* This option is related to accessibility.
|
|
230
|
+
*/
|
|
231
|
+
avatarAltText?: string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Represents a Chat message ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/data-binding)).
|
|
236
|
+
*
|
|
237
|
+
*/
|
|
238
|
+
interface Message {
|
|
239
|
+
/**
|
|
240
|
+
* Sets a unique ID for the message.
|
|
241
|
+
*/
|
|
242
|
+
id: string | number;
|
|
243
|
+
/**
|
|
244
|
+
* Sets the text content for the message. Some messages may contain only attachments or quick actions.
|
|
245
|
+
*/
|
|
246
|
+
text?: string;
|
|
247
|
+
/**
|
|
248
|
+
* Sets the author of the message.
|
|
249
|
+
*/
|
|
250
|
+
author: User;
|
|
251
|
+
/**
|
|
252
|
+
* Sets the time when the message was composed.
|
|
253
|
+
*/
|
|
254
|
+
timestamp?: Date;
|
|
255
|
+
/**
|
|
256
|
+
* Sets the current status of the message. The status appears when the message is selected by clicking or through keyboard navigation.
|
|
257
|
+
*/
|
|
258
|
+
status?: string | MessageStatus;
|
|
259
|
+
/**
|
|
260
|
+
* Sets the array of files attached to the message.
|
|
261
|
+
*/
|
|
262
|
+
files?: ChatFile[];
|
|
263
|
+
/**
|
|
264
|
+
* Sets the message attachments.
|
|
265
|
+
*/
|
|
266
|
+
attachments?: Attachment[];
|
|
267
|
+
/**
|
|
268
|
+
* Sets the layout for displaying message attachments.
|
|
269
|
+
*/
|
|
270
|
+
attachmentLayout?: AttachmentLayout;
|
|
271
|
+
/**
|
|
272
|
+
* Sets the suggested quick actions to display below this message.
|
|
273
|
+
*
|
|
274
|
+
* > Suggested actions appear only for the last message in the conversation.
|
|
275
|
+
*/
|
|
276
|
+
suggestedActions?: Action[];
|
|
277
|
+
/**
|
|
278
|
+
* Indicates if the message is pinned. Pinned messages are displayed at the top of the conversation.
|
|
279
|
+
*/
|
|
280
|
+
isPinned?: boolean;
|
|
281
|
+
/**
|
|
282
|
+
* Sets the ID of the message to which this message is a reply.
|
|
283
|
+
*/
|
|
284
|
+
replyToId?: string | number;
|
|
285
|
+
/**
|
|
286
|
+
* Indicates if the message has been deleted.
|
|
287
|
+
*/
|
|
288
|
+
isDeleted?: boolean;
|
|
289
|
+
/**
|
|
290
|
+
* Indicates if the message is still being typed by the user. If `true`, the Chat shows a typing indicator.
|
|
291
|
+
*/
|
|
292
|
+
typing?: boolean;
|
|
293
|
+
/**
|
|
294
|
+
* Indicates if sending the message has failed.
|
|
295
|
+
*/
|
|
296
|
+
failed?: boolean;
|
|
297
|
+
/**
|
|
298
|
+
* Provides a reference to the original data item, if any.
|
|
299
|
+
*/
|
|
300
|
+
dataItem?: any;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Represents the arguments for the `executeAction` event.
|
|
305
|
+
*
|
|
306
|
+
* The `executeAction` event fires when the user clicks a quick action button.
|
|
307
|
+
* Call `preventDefault()` to suppress the built-in action handler.
|
|
308
|
+
*/
|
|
309
|
+
declare class ExecuteActionEvent extends PreventableEvent {
|
|
310
|
+
/**
|
|
311
|
+
* Represents the action to execute.
|
|
312
|
+
*/
|
|
313
|
+
action: Action;
|
|
314
|
+
/**
|
|
315
|
+
* Represents the message that contains the action.
|
|
316
|
+
*/
|
|
317
|
+
message: Message;
|
|
318
|
+
/**
|
|
319
|
+
* @hidden
|
|
320
|
+
*/
|
|
321
|
+
constructor(action: Action, message: Message);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Defines the structure of a message action in the Chat interface.
|
|
326
|
+
* Use these actions to perform specific operations on messages.
|
|
327
|
+
*/
|
|
328
|
+
interface MessageAction {
|
|
329
|
+
/**
|
|
330
|
+
* Sets the unique identifier for the action.
|
|
331
|
+
*/
|
|
332
|
+
id: string | number;
|
|
333
|
+
/**
|
|
334
|
+
* Sets the display text for the action.
|
|
335
|
+
*/
|
|
336
|
+
label: string;
|
|
337
|
+
/**
|
|
338
|
+
* Sets the icon name for the action.
|
|
339
|
+
*/
|
|
340
|
+
icon?: string;
|
|
341
|
+
/**
|
|
342
|
+
* Sets the SVG icon object for the action.
|
|
343
|
+
*/
|
|
344
|
+
svgIcon?: SVGIcon;
|
|
345
|
+
/**
|
|
346
|
+
* Determines whether the action is disabled.
|
|
347
|
+
*/
|
|
348
|
+
disabled?: boolean;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Represents the event arguments for a message action in the Chat component.
|
|
352
|
+
*/
|
|
353
|
+
interface MessageActionEvent {
|
|
354
|
+
/**
|
|
355
|
+
* Specifies the action that was triggered.
|
|
356
|
+
*/
|
|
357
|
+
action: MessageAction;
|
|
358
|
+
/**
|
|
359
|
+
* Specifies the message associated with the action.
|
|
360
|
+
*/
|
|
361
|
+
message: Message;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Defines the possible modes for message width in the Chat component.
|
|
366
|
+
* - `full`: The message takes the full width of the chat container.
|
|
367
|
+
* - `standard`: (Default) The message width is standard, allowing for a more compact layout.
|
|
368
|
+
*/
|
|
369
|
+
type MessageWidthMode = 'full' | 'standard';
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Defines the structure of a file action in the Chat message.
|
|
373
|
+
* Use these actions to perform specific operations on files.
|
|
374
|
+
*/
|
|
375
|
+
interface FileAction {
|
|
376
|
+
/**
|
|
377
|
+
* Sets the unique identifier for the action.
|
|
378
|
+
*/
|
|
379
|
+
id: string | number;
|
|
380
|
+
/**
|
|
381
|
+
* Sets the display text for the action.
|
|
382
|
+
*/
|
|
383
|
+
label: string;
|
|
384
|
+
/**
|
|
385
|
+
* Sets the icon name for the action.
|
|
386
|
+
*/
|
|
387
|
+
icon?: string;
|
|
388
|
+
/**
|
|
389
|
+
* Sets the SVG icon object for the action.
|
|
390
|
+
*/
|
|
391
|
+
svgIcon?: SVGIcon;
|
|
392
|
+
/**
|
|
393
|
+
* Determines whether the action is disabled.
|
|
394
|
+
*/
|
|
395
|
+
disabled?: boolean;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Represents the event arguments for a file action in the Chat component.
|
|
399
|
+
*/
|
|
400
|
+
interface FileActionEvent {
|
|
401
|
+
/**
|
|
402
|
+
* Specifies the file action that was triggered.
|
|
403
|
+
*/
|
|
404
|
+
action: FileAction;
|
|
405
|
+
/**
|
|
406
|
+
* Specifies the file associated with the action.
|
|
407
|
+
*/
|
|
408
|
+
file: ChatFile;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Represents the settings for the Chat message ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/data-binding)).
|
|
413
|
+
*
|
|
414
|
+
*/
|
|
415
|
+
interface MessageSettings {
|
|
416
|
+
/**
|
|
417
|
+
* If set to `true`, enables the expanding/collapsing of long messages.
|
|
418
|
+
*/
|
|
419
|
+
allowMessageCollapse?: boolean;
|
|
420
|
+
/**
|
|
421
|
+
* Sets the array of actions displayed in the message toolbar.
|
|
422
|
+
*/
|
|
423
|
+
messageToolbarActions?: MessageAction[];
|
|
424
|
+
/**
|
|
425
|
+
* Sets the array of actions displayed in the message context menu.
|
|
426
|
+
*/
|
|
427
|
+
messageContextMenuActions?: MessageAction[];
|
|
428
|
+
/**
|
|
429
|
+
* Sets the array of actions displayed for message files.
|
|
430
|
+
*/
|
|
431
|
+
fileActions?: FileAction[];
|
|
432
|
+
/**
|
|
433
|
+
* Sets the mode used to determine message width.
|
|
434
|
+
*/
|
|
435
|
+
messageWidthMode?: MessageWidthMode;
|
|
436
|
+
/**
|
|
437
|
+
* Controls the visibility of the author's avatar in the message group.
|
|
438
|
+
*/
|
|
439
|
+
showAvatar?: boolean;
|
|
440
|
+
/**
|
|
441
|
+
* Controls the visibility of the author's username in the message group.
|
|
442
|
+
*/
|
|
443
|
+
showUsername?: boolean;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Describes the arguments for the `sendMessage` event.
|
|
448
|
+
*/
|
|
449
|
+
declare class SendMessageEvent {
|
|
450
|
+
/**
|
|
451
|
+
* Represents the message that contains the metadata and user input.
|
|
452
|
+
*
|
|
453
|
+
* The Chat does not automatically add the message to its data. For more information, see [Data Binding](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/data-binding).
|
|
454
|
+
*/
|
|
455
|
+
message: Message;
|
|
456
|
+
/**
|
|
457
|
+
* @hidden
|
|
458
|
+
*/
|
|
459
|
+
constructor(message: Message);
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Describes the arguments for the `resendMessage` event.
|
|
463
|
+
*/
|
|
464
|
+
interface ResendMessageEvent {
|
|
465
|
+
/**
|
|
466
|
+
* Represents the message that failed to send.
|
|
467
|
+
*/
|
|
468
|
+
message: Message;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Defines the scroll behavior of the Chat message list.
|
|
473
|
+
*
|
|
474
|
+
* - `scrollable`—All messages are rendered with standard scroll behavior.
|
|
475
|
+
* - `endless`—The Chat starts by rendering the last `pageSize` messages
|
|
476
|
+
* and prepends older ones as the user scrolls up.
|
|
477
|
+
*/
|
|
478
|
+
type ScrollMode = 'scrollable' | 'endless';
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Represents the arguments for the `download` event.
|
|
482
|
+
*/
|
|
483
|
+
interface FileDownloadEvent {
|
|
484
|
+
/**
|
|
485
|
+
* The file associated with the action.
|
|
486
|
+
* One file for download from the context menu.
|
|
487
|
+
* Multiple when the event is triggered by a click on the 'Download all' button.
|
|
488
|
+
*/
|
|
489
|
+
files: ChatFile[];
|
|
490
|
+
/**
|
|
491
|
+
* The message associated with the download action.
|
|
492
|
+
*/
|
|
493
|
+
message: Message;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Defines the settings for the Send button in the Chat component.
|
|
498
|
+
* Customize these settings to change the button appearance and behavior.
|
|
499
|
+
*/
|
|
500
|
+
interface SendButtonSettings extends ButtonSettings {
|
|
501
|
+
/**
|
|
502
|
+
* Sets the CSS class applied to the Button.
|
|
503
|
+
*/
|
|
504
|
+
buttonClass?: string;
|
|
505
|
+
/**
|
|
506
|
+
* Sets the icon displayed while the Chat is in loading state.
|
|
507
|
+
*/
|
|
508
|
+
loadingIcon?: string;
|
|
509
|
+
/**
|
|
510
|
+
* Sets the SVG icon displayed while the Chat is in loading state.
|
|
511
|
+
*/
|
|
512
|
+
loadingSVGIcon?: SVGIcon$1;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* The layout of the files in the message bubble.
|
|
517
|
+
*
|
|
518
|
+
* 'horizontal' - Files are laid out in a row and are horizontally scrollable.
|
|
519
|
+
* 'vertical' - Files are displayed in a vertical stack.
|
|
520
|
+
* 'wrap' - Files wrap to new lines when space is limited.
|
|
521
|
+
*/
|
|
522
|
+
type FilesLayoutMode = 'horizontal' | 'vertical' | 'wrap';
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Defines the layout for the suggestions list.
|
|
526
|
+
*
|
|
527
|
+
* 'scroll' - The list is scrollable when the content overflows.
|
|
528
|
+
* 'wrap' - The list wraps to new lines when space is limited.
|
|
529
|
+
* 'scrollbuttons' - The list is scrollable with navigation buttons when the content overflows.
|
|
530
|
+
*/
|
|
531
|
+
type SuggestionsLayoutMode = 'scroll' | 'wrap' | 'scrollbuttons';
|
|
532
|
+
/**
|
|
533
|
+
* Defines the layout for the quick actions list.
|
|
534
|
+
*
|
|
535
|
+
* 'scroll' - The list is scrollable when the content overflows.
|
|
536
|
+
* 'wrap' - The list wraps to new lines when space is limited.
|
|
537
|
+
* 'scrollbuttons' - The list is scrollable with navigation buttons when the content overflows.
|
|
538
|
+
*/
|
|
539
|
+
type QuickActionsLayoutMode = 'scroll' | 'wrap' | 'scrollbuttons';
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Defines the possible modes for timestamp visibility in the Chat component.
|
|
543
|
+
* - `focus`: Timestamps are only visible for selected/focused messages (default Chat behavior).
|
|
544
|
+
* - `hidden`: Timestamps are hidden for all messages.
|
|
545
|
+
*/
|
|
546
|
+
type TimestampVisibilityMode = 'focus' | 'hidden';
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* @hidden
|
|
550
|
+
*/
|
|
551
|
+
type ViewType = 'prompt' | 'output' | 'command' | 'custom';
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* @hidden
|
|
555
|
+
*/
|
|
556
|
+
declare abstract class BaseView {
|
|
557
|
+
viewType: ViewType;
|
|
558
|
+
private localization;
|
|
559
|
+
hostClasses: boolean;
|
|
560
|
+
/**
|
|
561
|
+
* @hidden
|
|
562
|
+
*/
|
|
563
|
+
template: TemplateRef<any>;
|
|
564
|
+
constructor(viewType: ViewType, localization: LocalizationService);
|
|
565
|
+
/**
|
|
566
|
+
* Sets the text for the Toolbar button of the current view.
|
|
567
|
+
*/
|
|
568
|
+
set buttonText(value: string);
|
|
569
|
+
get buttonText(): string;
|
|
570
|
+
/**
|
|
571
|
+
* Sets the font icon for the Toolbar button of the current view.
|
|
572
|
+
*/
|
|
573
|
+
set icon(value: string);
|
|
574
|
+
get icon(): string;
|
|
575
|
+
/**
|
|
576
|
+
* Sets the SVG icon for the Toolbar button of the current view.
|
|
577
|
+
*/
|
|
578
|
+
set svgIcon(value: SVGIcon);
|
|
579
|
+
get svgIcon(): SVGIcon;
|
|
580
|
+
/**
|
|
581
|
+
* @hidden
|
|
582
|
+
*/
|
|
583
|
+
messageFor(text: string): string;
|
|
584
|
+
private _buttonText;
|
|
585
|
+
private _icon;
|
|
586
|
+
private _svgIcon;
|
|
587
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseView, never>;
|
|
588
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseView, never, never, { "buttonText": { "alias": "buttonText"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "svgIcon": { "alias": "svgIcon"; "required": false; }; }, {}, never, never, true, never>;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Defines the interface for the AIPrompt commands rendered in the Command view.
|
|
593
|
+
*/
|
|
594
|
+
interface PromptCommand {
|
|
595
|
+
/**
|
|
596
|
+
* Represents the unique identifier of the command.
|
|
597
|
+
*/
|
|
598
|
+
id: string | number;
|
|
599
|
+
/**
|
|
600
|
+
* Specifies the command text.
|
|
601
|
+
*/
|
|
602
|
+
text?: string;
|
|
603
|
+
/**
|
|
604
|
+
* Specifies the name of the [font icon](https://www.telerik.com/kendo-angular-ui/components/styling/icons#icons-list) to render for the command.
|
|
605
|
+
*/
|
|
606
|
+
icon?: string;
|
|
607
|
+
/**
|
|
608
|
+
* Specifies the name of the [SVG icon](https://www.telerik.com/kendo-angular-ui/components/icons/svgicon/svgicon-list) to render for the command.
|
|
609
|
+
*/
|
|
610
|
+
svgIcon?: SVGIcon;
|
|
611
|
+
/**
|
|
612
|
+
* Defines the child commands as an array.
|
|
613
|
+
*/
|
|
614
|
+
children?: Array<PromptCommand>;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* Represents the arguments for the `commandExecute` event of the AIPrompt
|
|
619
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/aiprompt/events)).
|
|
620
|
+
*/
|
|
621
|
+
interface CommandExecuteEvent {
|
|
622
|
+
/**
|
|
623
|
+
* Contains information about the selected command.
|
|
624
|
+
*/
|
|
625
|
+
command: PromptCommand;
|
|
626
|
+
/**
|
|
627
|
+
* Represents the instance of the AIPrompt component.
|
|
628
|
+
*/
|
|
629
|
+
sender: AIPromptComponent;
|
|
630
|
+
/**
|
|
631
|
+
* Specifies if the event is triggered by the Retry button.
|
|
632
|
+
*/
|
|
633
|
+
isRetry: boolean;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Defines the interface for the AIPrompt outputs rendered in the **Output** view.
|
|
638
|
+
*/
|
|
639
|
+
interface PromptOutput {
|
|
640
|
+
/**
|
|
641
|
+
* Represents the unique identifier of the prompt output.
|
|
642
|
+
*/
|
|
643
|
+
id: number | string;
|
|
644
|
+
/**
|
|
645
|
+
* Represents the text content of the prompt output.
|
|
646
|
+
*/
|
|
647
|
+
output: string;
|
|
648
|
+
/**
|
|
649
|
+
* Represents the prompt that initiates the output generation.
|
|
650
|
+
*/
|
|
651
|
+
prompt: string;
|
|
652
|
+
/**
|
|
653
|
+
* Specifies an optional custom title for the prompt section.
|
|
654
|
+
*/
|
|
655
|
+
title?: string;
|
|
656
|
+
/**
|
|
657
|
+
* Specifies if the prompt generation is initiated with the **Retry** button.
|
|
658
|
+
*/
|
|
659
|
+
isRetry?: boolean;
|
|
660
|
+
/**
|
|
661
|
+
* (Optional) Specifies a command id, if the prompt generation is triggered via a command.
|
|
662
|
+
*/
|
|
663
|
+
commandId?: string | number;
|
|
664
|
+
/**
|
|
665
|
+
* (Optional) Specifies the rating for the prompt output.
|
|
666
|
+
*/
|
|
667
|
+
rating?: PromptOutputRating;
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Represents the rating of the prompt output.
|
|
671
|
+
*/
|
|
672
|
+
type PromptOutputRating = "positive" | "negative";
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Represents the arguments for the `promptRequest` event of the AIPrompt
|
|
676
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/aiprompt/events)).
|
|
677
|
+
*/
|
|
678
|
+
interface PromptRequestEvent {
|
|
679
|
+
/**
|
|
680
|
+
* Represents the user prompt input.
|
|
681
|
+
*/
|
|
682
|
+
prompt: string;
|
|
683
|
+
/**
|
|
684
|
+
* Represents the instance of the AIPrompt component.
|
|
685
|
+
*/
|
|
686
|
+
sender: AIPromptComponent;
|
|
687
|
+
/**
|
|
688
|
+
* Specifies if the event is triggered by the **Retry** button.
|
|
689
|
+
*/
|
|
690
|
+
isRetry: boolean;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Represents the arguments for the `outputRatingChange` event of the AIPrompt
|
|
695
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/aiprompt/events)).
|
|
696
|
+
*/
|
|
697
|
+
interface OutputRatingChangeEvent {
|
|
698
|
+
/**
|
|
699
|
+
* Specifies the prompt output for which the rating changes.
|
|
700
|
+
*/
|
|
701
|
+
promptOutput: PromptOutput;
|
|
702
|
+
/**
|
|
703
|
+
* Specifies the prompt output rating.
|
|
704
|
+
*/
|
|
705
|
+
rating: PromptOutputRating;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Interface representing all configuration options of the Ai Prompt.
|
|
710
|
+
*/
|
|
711
|
+
interface AIPromptSettings {
|
|
712
|
+
/**
|
|
713
|
+
* The active view index of the AIPrompt component.
|
|
714
|
+
*/
|
|
715
|
+
activeView?: number;
|
|
716
|
+
/**
|
|
717
|
+
* Sets the collection of commands to render in the Command view.
|
|
718
|
+
*/
|
|
719
|
+
promptCommands?: Array<PromptCommand>;
|
|
720
|
+
/**
|
|
721
|
+
* Sets the collection of suggestions to render in the **Prompt** view.
|
|
722
|
+
*/
|
|
723
|
+
promptSuggestions?: Array<string>;
|
|
724
|
+
/**
|
|
725
|
+
* Sets the collection of generated prompt outputs to render in the Output view.
|
|
726
|
+
*/
|
|
727
|
+
promptOutputs?: Array<PromptOutput>;
|
|
728
|
+
/**
|
|
729
|
+
* Specifies whether the Stop generation button appears in the Output view.
|
|
730
|
+
*/
|
|
731
|
+
streaming?: boolean;
|
|
732
|
+
/**
|
|
733
|
+
* Specifies if the rating buttons appear in each **Output** view card.
|
|
734
|
+
* By default, the rating buttons do not appear.
|
|
735
|
+
*/
|
|
736
|
+
showOutputRating?: boolean;
|
|
737
|
+
/**
|
|
738
|
+
* Sets the settings for the Speech to Text button in the Prompt view.
|
|
739
|
+
*/
|
|
740
|
+
speechToTextButton?: boolean | SpeechToTextButtonSettings;
|
|
741
|
+
/**
|
|
742
|
+
* Sets the settings for the TextArea in the Prompt view.
|
|
743
|
+
* Use this property to customize the TextArea appearance.
|
|
744
|
+
*/
|
|
745
|
+
textAreaSettings?: TextAreaSettings;
|
|
746
|
+
/**
|
|
747
|
+
* Sets the SVG icon for the Generate button in the Prompt view.
|
|
748
|
+
*/
|
|
749
|
+
generateButtonSVGIcon?: SVGIcon;
|
|
750
|
+
/**
|
|
751
|
+
* Sets the icon for the Generate button in the Prompt view.
|
|
752
|
+
*/
|
|
753
|
+
generateButtonIcon?: string;
|
|
754
|
+
/**
|
|
755
|
+
* Sets the disabled state for the Generate button in the Prompt view.
|
|
756
|
+
*/
|
|
757
|
+
disabledGenerateButton?: boolean;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Represents the template for the response in the AIPrompt component. The template context is set to the current output object.
|
|
762
|
+
*
|
|
763
|
+
* @example
|
|
764
|
+
* ```html
|
|
765
|
+
* <kendo-aiprompt>
|
|
766
|
+
* <ng-template kendoAIPromptOutputTemplate let-output>
|
|
767
|
+
* <div>{{output.prompt}}</div>
|
|
768
|
+
* </ng-template>
|
|
769
|
+
* </kendo-aiprompt>
|
|
770
|
+
* ```
|
|
771
|
+
*/
|
|
772
|
+
declare class AIPromptOutputTemplateDirective {
|
|
773
|
+
templateRef: TemplateRef<any>;
|
|
774
|
+
constructor(templateRef: TemplateRef<any>);
|
|
775
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AIPromptOutputTemplateDirective, never>;
|
|
776
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AIPromptOutputTemplateDirective, "[kendoAIPromptOutputTemplate]", never, {}, {}, never, never, true, never>;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* Represents the template for the body of the response in the AIPrompt component. The template context is set to the current output object.
|
|
781
|
+
*
|
|
782
|
+
* @example
|
|
783
|
+
* ```html
|
|
784
|
+
* <kendo-aiprompt>
|
|
785
|
+
* <ng-template kendoAIPromptOutputBodyTemplate let-output>
|
|
786
|
+
* <div>{{output.prompt}}</div>
|
|
787
|
+
* </ng-template>
|
|
788
|
+
* </kendo-aiprompt>
|
|
789
|
+
* ```
|
|
790
|
+
*/
|
|
791
|
+
declare class AIPromptOutputBodyTemplateDirective {
|
|
792
|
+
templateRef: TemplateRef<any>;
|
|
793
|
+
constructor(templateRef: TemplateRef<any>);
|
|
794
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AIPromptOutputBodyTemplateDirective, never>;
|
|
795
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AIPromptOutputBodyTemplateDirective, "[kendoAIPromptOutputBodyTemplate]", never, {}, {}, never, never, true, never>;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* @hidden
|
|
800
|
+
*/
|
|
801
|
+
declare class AIPromptService {
|
|
802
|
+
aiPrompt: AIPromptComponent;
|
|
803
|
+
promptValue: string;
|
|
804
|
+
showOutputRating: boolean;
|
|
805
|
+
requestEvent: Subject<PromptRequestEvent>;
|
|
806
|
+
executeEvent: Subject<CommandExecuteEvent>;
|
|
807
|
+
outputCopyEvent: Subject<PromptOutput>;
|
|
808
|
+
outputRatingChangeEvent: Subject<OutputRatingChangeEvent>;
|
|
809
|
+
promptCommands: Array<PromptCommand>;
|
|
810
|
+
promptOutputs: Array<PromptOutput>;
|
|
811
|
+
promptSuggestions: Array<string>;
|
|
812
|
+
textAreaSettings: TextAreaSettings;
|
|
813
|
+
outputTemplate: AIPromptOutputTemplateDirective;
|
|
814
|
+
outputBodyTemplate: AIPromptOutputBodyTemplateDirective;
|
|
815
|
+
private _speechToTextButton;
|
|
816
|
+
get speechToTextButton(): SpeechToTextButtonSettings;
|
|
817
|
+
set speechToTextButton(settings: boolean | SpeechToTextButtonSettings);
|
|
818
|
+
getFlattenPromptCommands(commands?: Array<PromptCommand>): Array<PromptCommand>;
|
|
819
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AIPromptService, never>;
|
|
820
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AIPromptService>;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* Represents a template for additional Toolbar actions.
|
|
825
|
+
* The actions appear after the Toolbar buttons for all views.
|
|
826
|
+
*
|
|
827
|
+
* To define the template, nest an `<ng-template>` tag
|
|
828
|
+
* with the `kendoAIPromptToolbarActionsTemplate` directive inside the `<kendo-aiprompt>` tag.
|
|
829
|
+
*
|
|
830
|
+
* @example
|
|
831
|
+
* ```html
|
|
832
|
+
* <kendo-aiprompt>
|
|
833
|
+
* <ng-template kendoAIPromptToolbarActionsTemplate>
|
|
834
|
+
* <button kendoButton>Custom Action</button>
|
|
835
|
+
* </ng-template>
|
|
836
|
+
* </kendo-aiprompt>
|
|
837
|
+
* ```
|
|
838
|
+
*/
|
|
839
|
+
declare class AIPromptToolbarActionsDirective {
|
|
840
|
+
templateRef: TemplateRef<any>;
|
|
841
|
+
constructor(templateRef: TemplateRef<any>);
|
|
842
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AIPromptToolbarActionsDirective, [{ optional: true; }]>;
|
|
843
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AIPromptToolbarActionsDirective, "[kendoAIPromptToolbarActionsTemplate]", never, {}, {}, never, never, true, never>;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* @hidden
|
|
848
|
+
*/
|
|
849
|
+
declare class AIPromptToolbarFocusableDirective implements AfterViewInit, OnDestroy {
|
|
850
|
+
private host;
|
|
851
|
+
private navigationService;
|
|
852
|
+
private renderer;
|
|
853
|
+
constructor(host: ElementRef, navigationService: ToolbarNavigationService, renderer: Renderer2);
|
|
854
|
+
private get element();
|
|
855
|
+
ngAfterViewInit(): void;
|
|
856
|
+
ngOnDestroy(): void;
|
|
857
|
+
activate(): void;
|
|
858
|
+
private keyDownHandler;
|
|
859
|
+
private clickHandler;
|
|
860
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AIPromptToolbarFocusableDirective, never>;
|
|
861
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AIPromptToolbarFocusableDirective, "[kendoAIPromptToolbarFocusable]", never, {}, {}, never, never, true, never>;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
/**
|
|
865
|
+
* @hidden
|
|
866
|
+
*/
|
|
867
|
+
declare class ToolbarNavigationService {
|
|
868
|
+
private localizationService;
|
|
869
|
+
focusableElements: AIPromptToolbarFocusableDirective[];
|
|
870
|
+
currentFocusedIndex: number;
|
|
871
|
+
constructor(localizationService: LocalizationService);
|
|
872
|
+
register(tool: AIPromptToolbarFocusableDirective): void;
|
|
873
|
+
unregister(tool: AIPromptToolbarFocusableDirective): void;
|
|
874
|
+
isActive(focusable: AIPromptToolbarFocusableDirective): boolean;
|
|
875
|
+
setActiveIndex(tool: AIPromptToolbarFocusableDirective): void;
|
|
876
|
+
move(direction: 'left' | 'right'): void;
|
|
877
|
+
focusFirst(): void;
|
|
878
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarNavigationService, never>;
|
|
879
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ToolbarNavigationService>;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* Represents the [Kendo UI AIPrompt component for Angular](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/aiprompt).
|
|
884
|
+
*
|
|
885
|
+
* @example
|
|
886
|
+
* ```html
|
|
887
|
+
* <kendo-aiprompt
|
|
888
|
+
* [promptCommands]="commands"
|
|
889
|
+
* [promptSuggestions]="suggestions"
|
|
890
|
+
* [promptOutputs]="outputs"
|
|
891
|
+
* [showOutputRating]="true"
|
|
892
|
+
* (promptRequest)="onPromptRequest($event)">
|
|
893
|
+
* </kendo-aiprompt>
|
|
894
|
+
* ```
|
|
895
|
+
*
|
|
896
|
+
* @remarks
|
|
897
|
+
* Supported children components are: {@link AIPromptCustomMessagesComponent}, {@link CustomViewComponent}, {@link CommandViewComponent}, {@link PromptViewComponent}, {@link OutputViewComponent}.
|
|
898
|
+
*/
|
|
899
|
+
declare class AIPromptComponent implements OnInit, OnChanges, AfterContentChecked, AfterViewInit, OnDestroy {
|
|
900
|
+
private localization;
|
|
901
|
+
private service;
|
|
902
|
+
private navigationService;
|
|
903
|
+
private ngZone;
|
|
904
|
+
private element;
|
|
905
|
+
private renderer;
|
|
906
|
+
hostClasses: boolean;
|
|
907
|
+
get dirAttr(): string;
|
|
908
|
+
constructor(localization: LocalizationService, service: AIPromptService, navigationService: ToolbarNavigationService, ngZone: NgZone, element: ElementRef, renderer: Renderer2);
|
|
909
|
+
/**
|
|
910
|
+
* @hidden
|
|
911
|
+
*/
|
|
912
|
+
fabButton: FloatingActionButtonComponent;
|
|
913
|
+
/**
|
|
914
|
+
* @hidden
|
|
915
|
+
*/
|
|
916
|
+
views: QueryList<BaseView>;
|
|
917
|
+
/**
|
|
918
|
+
* @hidden
|
|
919
|
+
*/
|
|
920
|
+
toolbarActionsTemplate: AIPromptToolbarActionsDirective;
|
|
921
|
+
/**
|
|
922
|
+
* @hidden
|
|
923
|
+
*/
|
|
924
|
+
outputTemplate: AIPromptOutputTemplateDirective;
|
|
925
|
+
/**
|
|
926
|
+
* @hidden
|
|
927
|
+
*/
|
|
928
|
+
outputBodyTemplate: AIPromptOutputBodyTemplateDirective;
|
|
929
|
+
/**
|
|
930
|
+
* The active view index of the AIPrompt component.
|
|
931
|
+
*/
|
|
932
|
+
set activeView(idx: number);
|
|
933
|
+
get activeView(): number;
|
|
934
|
+
/**
|
|
935
|
+
* Sets the collection of commands to render in the Command view.
|
|
936
|
+
*/
|
|
937
|
+
set promptCommands(value: Array<PromptCommand>);
|
|
938
|
+
/**
|
|
939
|
+
* Sets the collection of suggestions to render in the Prompt view.
|
|
940
|
+
*/
|
|
941
|
+
set promptSuggestions(value: Array<string>);
|
|
942
|
+
/**
|
|
943
|
+
* Sets the collection of generated prompt outputs to render in the Output view.
|
|
944
|
+
*/
|
|
945
|
+
set promptOutputs(value: Array<PromptOutput>);
|
|
946
|
+
/**
|
|
947
|
+
* Specifies whether the rating buttons appear in each Output view card.
|
|
948
|
+
* The rating buttons do not appear by default.
|
|
949
|
+
* @default false
|
|
950
|
+
*/
|
|
951
|
+
set showOutputRating(value: boolean);
|
|
952
|
+
/**
|
|
953
|
+
* Specifies whether the Stop generation button appears in the Output view.
|
|
954
|
+
* The Stop generation button does not appear by default.
|
|
955
|
+
* @default false
|
|
956
|
+
*/
|
|
957
|
+
streaming: boolean;
|
|
958
|
+
/**
|
|
959
|
+
* Sets the settings for the Speech to Text button in the Prompt view
|
|
960
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/aiprompt/configuration#enabling-speech-to-text)).
|
|
961
|
+
*/
|
|
962
|
+
set speechToTextButton(settings: boolean | SpeechToTextButtonSettings);
|
|
963
|
+
/**
|
|
964
|
+
* Sets the settings for the TextArea in the Prompt view
|
|
965
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/aiprompt/configuration#configuring-the-prompt-text-area)).
|
|
966
|
+
*/
|
|
967
|
+
set textAreaSettings(settings: TextAreaSettings);
|
|
968
|
+
/**
|
|
969
|
+
* Sets the SVG icon for the Generate button in the Prompt view.
|
|
970
|
+
*/
|
|
971
|
+
generateButtonSVGIcon: SVGIcon;
|
|
972
|
+
/**
|
|
973
|
+
* Sets the icon for the Generate button in the Prompt view.
|
|
974
|
+
* @default 'sparkles'
|
|
975
|
+
*/
|
|
976
|
+
generateButtonIcon: string;
|
|
977
|
+
/**
|
|
978
|
+
* Sets the disabled state for the Generate button in the Prompt view.
|
|
979
|
+
* @default false
|
|
980
|
+
*/
|
|
981
|
+
disabledGenerateButton: boolean;
|
|
982
|
+
/**
|
|
983
|
+
* Fires when the `activeView` property is updated.
|
|
984
|
+
* Use this event for two-way binding of the `activeView` property.
|
|
985
|
+
*/
|
|
986
|
+
activeViewChange: EventEmitter<number>;
|
|
987
|
+
/**
|
|
988
|
+
* Fires when you click the Generate button in the Prompt view or the Retry button in the Output view.
|
|
989
|
+
* Use the event's `isRetry` field to determine the source element.
|
|
990
|
+
*/
|
|
991
|
+
promptRequest: EventEmitter<PromptRequestEvent>;
|
|
992
|
+
/**
|
|
993
|
+
* Fires when you click a Command view command.
|
|
994
|
+
* The event data contains the selected command.
|
|
995
|
+
*/
|
|
996
|
+
commandExecute: EventEmitter<CommandExecuteEvent>;
|
|
997
|
+
/**
|
|
998
|
+
* Fires when you click a Copy button in any Output view card.
|
|
999
|
+
*/
|
|
1000
|
+
outputCopy: EventEmitter<PromptOutput>;
|
|
1001
|
+
/**
|
|
1002
|
+
* Fires when you click a rating button in any Output view card.
|
|
1003
|
+
*/
|
|
1004
|
+
outputRatingChange: EventEmitter<OutputRatingChangeEvent>;
|
|
1005
|
+
/**
|
|
1006
|
+
* Fires when you click the Stop Generation button in the Output view.
|
|
1007
|
+
*/
|
|
1008
|
+
promptRequestCancel: EventEmitter<void>;
|
|
1009
|
+
ngOnInit(): void;
|
|
1010
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1011
|
+
ngAfterContentChecked(): void;
|
|
1012
|
+
ngAfterViewInit(): void;
|
|
1013
|
+
ngOnDestroy(): void;
|
|
1014
|
+
/**
|
|
1015
|
+
* Focuses the first focusable element in the AIPrompt component.
|
|
1016
|
+
*/
|
|
1017
|
+
focus(): void;
|
|
1018
|
+
private subs;
|
|
1019
|
+
/**
|
|
1020
|
+
* @hidden
|
|
1021
|
+
*/
|
|
1022
|
+
get selectedView(): BaseView;
|
|
1023
|
+
/**
|
|
1024
|
+
* @hidden
|
|
1025
|
+
*/
|
|
1026
|
+
sparklesIcon: SVGIcon;
|
|
1027
|
+
/**
|
|
1028
|
+
* @hidden
|
|
1029
|
+
*/
|
|
1030
|
+
outputIcon: SVGIcon;
|
|
1031
|
+
/**
|
|
1032
|
+
* @hidden
|
|
1033
|
+
*/
|
|
1034
|
+
fabStopGenerationSVGIcon: SVGIcon;
|
|
1035
|
+
/**
|
|
1036
|
+
* @hidden
|
|
1037
|
+
*/
|
|
1038
|
+
get viewsArray(): Array<BaseView>;
|
|
1039
|
+
/**
|
|
1040
|
+
* @hidden
|
|
1041
|
+
*/
|
|
1042
|
+
fabPositionMode: FabPositionMode;
|
|
1043
|
+
/**
|
|
1044
|
+
* @hidden
|
|
1045
|
+
*/
|
|
1046
|
+
fabAlignment: FabAlign;
|
|
1047
|
+
private direction;
|
|
1048
|
+
private _activeView;
|
|
1049
|
+
/**
|
|
1050
|
+
* @hidden
|
|
1051
|
+
*/
|
|
1052
|
+
viewChange(idx: number): void;
|
|
1053
|
+
/**
|
|
1054
|
+
* @hidden
|
|
1055
|
+
*/
|
|
1056
|
+
messageFor(text: string): string;
|
|
1057
|
+
/**
|
|
1058
|
+
* @hidden
|
|
1059
|
+
*/
|
|
1060
|
+
get viewTemplate(): TemplateRef<any>;
|
|
1061
|
+
/**
|
|
1062
|
+
* @hidden
|
|
1063
|
+
*/
|
|
1064
|
+
handleGenerateOutput(): void;
|
|
1065
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AIPromptComponent, never>;
|
|
1066
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AIPromptComponent, "kendo-aiprompt", ["kendoAIPrompt"], { "activeView": { "alias": "activeView"; "required": false; }; "promptCommands": { "alias": "promptCommands"; "required": false; }; "promptSuggestions": { "alias": "promptSuggestions"; "required": false; }; "promptOutputs": { "alias": "promptOutputs"; "required": false; }; "showOutputRating": { "alias": "showOutputRating"; "required": false; }; "streaming": { "alias": "streaming"; "required": false; }; "speechToTextButton": { "alias": "speechToTextButton"; "required": false; }; "textAreaSettings": { "alias": "textAreaSettings"; "required": false; }; "generateButtonSVGIcon": { "alias": "generateButtonSVGIcon"; "required": false; }; "generateButtonIcon": { "alias": "generateButtonIcon"; "required": false; }; "disabledGenerateButton": { "alias": "disabledGenerateButton"; "required": false; }; }, { "activeViewChange": "activeViewChange"; "promptRequest": "promptRequest"; "commandExecute": "commandExecute"; "outputCopy": "outputCopy"; "outputRatingChange": "outputRatingChange"; "promptRequestCancel": "promptRequestCancel"; }, ["toolbarActionsTemplate", "outputTemplate", "outputBodyTemplate", "views"], never, true, never>;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
/**
|
|
1070
|
+
* Represents the component that renders the **Prompt** view of the AIPrompt.
|
|
1071
|
+
*
|
|
1072
|
+
* @example
|
|
1073
|
+
* ```html
|
|
1074
|
+
* <kendo-aiprompt-prompt-view
|
|
1075
|
+
* buttonText="My prompt view">
|
|
1076
|
+
* </kendo-aiprompt-prompt-view>
|
|
1077
|
+
* ```
|
|
1078
|
+
*/
|
|
1079
|
+
declare class PromptViewComponent extends BaseView {
|
|
1080
|
+
service: AIPromptService;
|
|
1081
|
+
constructor(localization: LocalizationService, service: AIPromptService);
|
|
1082
|
+
/**
|
|
1083
|
+
* @hidden
|
|
1084
|
+
*/
|
|
1085
|
+
get suggestionsIcons(): {
|
|
1086
|
+
font: string;
|
|
1087
|
+
svg: SVGIcon;
|
|
1088
|
+
};
|
|
1089
|
+
/**
|
|
1090
|
+
* @hidden
|
|
1091
|
+
*/
|
|
1092
|
+
showSuggestions: boolean;
|
|
1093
|
+
/**
|
|
1094
|
+
* @hidden
|
|
1095
|
+
*/
|
|
1096
|
+
contentId: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* @hidden
|
|
1099
|
+
*/
|
|
1100
|
+
get promptSuggestions(): string[];
|
|
1101
|
+
/**
|
|
1102
|
+
*
|
|
1103
|
+
* @hidden
|
|
1104
|
+
*/
|
|
1105
|
+
set textAreaValue(value: string);
|
|
1106
|
+
get textAreaValue(): string;
|
|
1107
|
+
/**
|
|
1108
|
+
* @hidden
|
|
1109
|
+
*/
|
|
1110
|
+
suggestionClick(suggestion: string): void;
|
|
1111
|
+
/**
|
|
1112
|
+
* @hidden
|
|
1113
|
+
*/
|
|
1114
|
+
suggestionKeydown(event: KeyboardEvent, suggestion: string): void;
|
|
1115
|
+
/**
|
|
1116
|
+
* @hidden
|
|
1117
|
+
*/
|
|
1118
|
+
get speechToTextButtonSettings(): SpeechToTextButtonSettings;
|
|
1119
|
+
/**
|
|
1120
|
+
* @hidden
|
|
1121
|
+
*/
|
|
1122
|
+
get textareaSettings(): TextAreaSettings;
|
|
1123
|
+
/**
|
|
1124
|
+
* @hidden
|
|
1125
|
+
*/
|
|
1126
|
+
onSpeechToTextResult(event: any): void;
|
|
1127
|
+
/**
|
|
1128
|
+
* @hidden
|
|
1129
|
+
*/
|
|
1130
|
+
onSpeechToTextError(event: any): void;
|
|
1131
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptViewComponent, never>;
|
|
1132
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptViewComponent, "kendo-aiprompt-prompt-view", never, {}, {}, never, never, true, never>;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* Represents the component that renders the **Output** view of the AIPrompt.
|
|
1137
|
+
*
|
|
1138
|
+
* @example
|
|
1139
|
+
* ```html
|
|
1140
|
+
* <kendo-aiprompt-output-view
|
|
1141
|
+
* buttonText="My output view">
|
|
1142
|
+
* </kendo-aiprompt-output-view>
|
|
1143
|
+
* ```
|
|
1144
|
+
*/
|
|
1145
|
+
declare class OutputViewComponent extends BaseView {
|
|
1146
|
+
private service;
|
|
1147
|
+
constructor(localization: LocalizationService, service: AIPromptService);
|
|
1148
|
+
/**
|
|
1149
|
+
* @hidden
|
|
1150
|
+
*/
|
|
1151
|
+
get promptOutputs(): Array<PromptOutput>;
|
|
1152
|
+
/**
|
|
1153
|
+
* @hidden
|
|
1154
|
+
*/
|
|
1155
|
+
get customTemplate(): i0.TemplateRef<any>;
|
|
1156
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OutputViewComponent, never>;
|
|
1157
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OutputViewComponent, "kendo-aiprompt-output-view", never, {}, {}, never, never, true, never>;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
* Represents the component that renders the **Command** view of the AIPrompt.
|
|
1162
|
+
*
|
|
1163
|
+
* @example
|
|
1164
|
+
* ```html
|
|
1165
|
+
* <kendo-aiprompt-command-view
|
|
1166
|
+
* buttonText="My command view">
|
|
1167
|
+
* </kendo-aiprompt-command-view>
|
|
1168
|
+
* ```
|
|
1169
|
+
*/
|
|
1170
|
+
declare class CommandViewComponent extends BaseView implements OnInit {
|
|
1171
|
+
private service;
|
|
1172
|
+
constructor(localization: LocalizationService, service: AIPromptService);
|
|
1173
|
+
/**
|
|
1174
|
+
* @hidden
|
|
1175
|
+
*/
|
|
1176
|
+
panelBarItems: Array<PanelBarItemModel>;
|
|
1177
|
+
ngOnInit(): void;
|
|
1178
|
+
/**
|
|
1179
|
+
* @hidden
|
|
1180
|
+
*/
|
|
1181
|
+
itemClickHandler(ev: PanelBarItemClickEvent): void;
|
|
1182
|
+
private getPanelBarItems;
|
|
1183
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CommandViewComponent, never>;
|
|
1184
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CommandViewComponent, "kendo-aiprompt-command-view", never, {}, {}, never, never, true, never>;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* Represents the component that renders a **Custom** view in the AIPrompt.
|
|
1189
|
+
*
|
|
1190
|
+
* @example
|
|
1191
|
+
* ```html
|
|
1192
|
+
* <kendo-aiprompt-custom-view [viewTemplate]="customTemplate">
|
|
1193
|
+
* </kendo-aiprompt-custom-view>
|
|
1194
|
+
*
|
|
1195
|
+
* <ng-template #customTemplate>
|
|
1196
|
+
* <div>Custom content here</div>
|
|
1197
|
+
* </ng-template>
|
|
1198
|
+
* ```
|
|
1199
|
+
*/
|
|
1200
|
+
declare class CustomViewComponent extends BaseView {
|
|
1201
|
+
constructor(localization: LocalizationService);
|
|
1202
|
+
/**
|
|
1203
|
+
* Sets the content of the Custom view as a template reference.
|
|
1204
|
+
*/
|
|
1205
|
+
viewTemplate: TemplateRef<any>;
|
|
1206
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomViewComponent, never>;
|
|
1207
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomViewComponent, "kendo-aiprompt-custom-view", never, { "viewTemplate": { "alias": "viewTemplate"; "required": false; }; }, {}, never, never, true, never>;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
/**
|
|
1211
|
+
* @hidden
|
|
1212
|
+
*/
|
|
1213
|
+
declare class Messages$3 extends ComponentMessages {
|
|
1214
|
+
/**
|
|
1215
|
+
* Sets the Toolbar button text for the **Prompt** view.
|
|
1216
|
+
*/
|
|
1217
|
+
promptView: string;
|
|
1218
|
+
/**
|
|
1219
|
+
* Sets the Toolbar button text for the **Output** view.
|
|
1220
|
+
*/
|
|
1221
|
+
outputView: string;
|
|
1222
|
+
/**
|
|
1223
|
+
* Sets the text for the **Generate** button in the **Prompt** view.
|
|
1224
|
+
*/
|
|
1225
|
+
generateOutput: string;
|
|
1226
|
+
/**
|
|
1227
|
+
* Sets the placeholder text for the **Prompt** view text area.
|
|
1228
|
+
*/
|
|
1229
|
+
promptPlaceholder: string;
|
|
1230
|
+
/**
|
|
1231
|
+
* Sets the text for the **Copy** button text in each **Output** view card.
|
|
1232
|
+
*/
|
|
1233
|
+
copyOutput: string;
|
|
1234
|
+
/**
|
|
1235
|
+
* Sets the **Retry** button text in each **Output** view card.
|
|
1236
|
+
*/
|
|
1237
|
+
retryGeneration: string;
|
|
1238
|
+
/**
|
|
1239
|
+
* Sets the title of each card in the **Output** view.
|
|
1240
|
+
*/
|
|
1241
|
+
outputTitle: string;
|
|
1242
|
+
/**
|
|
1243
|
+
* Sets the title of each retry card in the **Output** view.
|
|
1244
|
+
*/
|
|
1245
|
+
outputRetryTitle: string;
|
|
1246
|
+
/**
|
|
1247
|
+
* Sets the title of the **Prompt suggestions** button.
|
|
1248
|
+
*/
|
|
1249
|
+
promptSuggestions: string;
|
|
1250
|
+
/**
|
|
1251
|
+
* Sets the aria-label for the **Speech to Text** button.
|
|
1252
|
+
*/
|
|
1253
|
+
speechToTextButton: string;
|
|
1254
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Messages$3, never>;
|
|
1255
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages$3, never, never, { "promptView": { "alias": "promptView"; "required": false; }; "outputView": { "alias": "outputView"; "required": false; }; "generateOutput": { "alias": "generateOutput"; "required": false; }; "promptPlaceholder": { "alias": "promptPlaceholder"; "required": false; }; "copyOutput": { "alias": "copyOutput"; "required": false; }; "retryGeneration": { "alias": "retryGeneration"; "required": false; }; "outputTitle": { "alias": "outputTitle"; "required": false; }; "outputRetryTitle": { "alias": "outputRetryTitle"; "required": false; }; "promptSuggestions": { "alias": "promptSuggestions"; "required": false; }; "speechToTextButton": { "alias": "speechToTextButton"; "required": false; }; }, {}, never, never, true, never>;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
/**
|
|
1259
|
+
* Represents the custom messages component of the AIPrompt.
|
|
1260
|
+
*
|
|
1261
|
+
* Use this component to override default messages for the AIPrompt
|
|
1262
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/globalization#custom-messages)).
|
|
1263
|
+
*
|
|
1264
|
+
* @example
|
|
1265
|
+
* ```html
|
|
1266
|
+
* <kendo-aiprompt-messages
|
|
1267
|
+
* promptView="My prompt view"
|
|
1268
|
+
* outputView="My output view">
|
|
1269
|
+
* </kendo-aiprompt-messages>
|
|
1270
|
+
* ```
|
|
1271
|
+
*/
|
|
1272
|
+
declare class AIPromptCustomMessagesComponent extends Messages$3 {
|
|
1273
|
+
protected service: LocalizationService;
|
|
1274
|
+
constructor(service: LocalizationService);
|
|
1275
|
+
protected get override(): boolean;
|
|
1276
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AIPromptCustomMessagesComponent, never>;
|
|
1277
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AIPromptCustomMessagesComponent, "kendo-aiprompt-messages", never, {}, {}, never, never, true, never>;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* Represents the [`NgModule`](link:site.data.urls.angular['ngmodules']) for the AIPrompt component.
|
|
1282
|
+
*
|
|
1283
|
+
* @example
|
|
1284
|
+
* ```ts
|
|
1285
|
+
* import { NgModule } from '@angular/core';
|
|
1286
|
+
* import { BrowserModule } from '@angular/platform-browser';
|
|
1287
|
+
* import { AIPromptModule } from '@progress/kendo-angular-conversational-ui';
|
|
1288
|
+
* import { AppComponent } from './app.component';
|
|
1289
|
+
*
|
|
1290
|
+
* @NgModule({
|
|
1291
|
+
* imports: [BrowserModule, AIPromptModule],
|
|
1292
|
+
* declarations: [AppComponent],
|
|
1293
|
+
* bootstrap: [AppComponent]
|
|
1294
|
+
* })
|
|
1295
|
+
* export class AppModule {}
|
|
1296
|
+
* ```
|
|
1297
|
+
*/
|
|
1298
|
+
declare class AIPromptModule {
|
|
1299
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AIPromptModule, never>;
|
|
1300
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AIPromptModule, never, [typeof AIPromptComponent, typeof PromptViewComponent, typeof OutputViewComponent, typeof CommandViewComponent, typeof CustomViewComponent, typeof AIPromptCustomMessagesComponent, typeof AIPromptToolbarActionsDirective, typeof AIPromptToolbarFocusableDirective, typeof AIPromptOutputTemplateDirective, typeof AIPromptOutputBodyTemplateDirective], [typeof AIPromptComponent, typeof PromptViewComponent, typeof OutputViewComponent, typeof CommandViewComponent, typeof CustomViewComponent, typeof AIPromptCustomMessagesComponent, typeof AIPromptToolbarActionsDirective, typeof AIPromptToolbarFocusableDirective, typeof AIPromptOutputTemplateDirective, typeof AIPromptOutputBodyTemplateDirective]>;
|
|
1301
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AIPromptModule>;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
/**
|
|
1305
|
+
* Specifies the PromptBox modes.
|
|
1306
|
+
*
|
|
1307
|
+
* - 'single'—Renders a single-line input element.
|
|
1308
|
+
* - 'multi'—Renders a multi-line textarea element.
|
|
1309
|
+
* - 'auto'—Automatically switches between single-line and multi-line modes based on the content.
|
|
1310
|
+
*/
|
|
1311
|
+
type PromptBoxMode = 'single' | 'multi' | 'auto';
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* Defines the configuration settings for the PromptBox Action button.
|
|
1315
|
+
*/
|
|
1316
|
+
interface ActionButtonSettings {
|
|
1317
|
+
/**
|
|
1318
|
+
* Sets the disabled state of the **Action** button.
|
|
1319
|
+
*/
|
|
1320
|
+
disabled?: boolean;
|
|
1321
|
+
/**
|
|
1322
|
+
* Sets the background and border styles of the **Action** button.
|
|
1323
|
+
*/
|
|
1324
|
+
fillMode?: ButtonFillMode;
|
|
1325
|
+
/**
|
|
1326
|
+
* Sets the border radius of the **Action** button.
|
|
1327
|
+
*/
|
|
1328
|
+
rounded?: ButtonRounded;
|
|
1329
|
+
/**
|
|
1330
|
+
* Sets the padding of the **Action** button.
|
|
1331
|
+
*/
|
|
1332
|
+
size?: ButtonSize;
|
|
1333
|
+
/**
|
|
1334
|
+
* Sets the theme color of the **Action** button.
|
|
1335
|
+
*/
|
|
1336
|
+
themeColor?: ButtonThemeColor;
|
|
1337
|
+
/**
|
|
1338
|
+
* Sets the icon of the **Action** button.
|
|
1339
|
+
*/
|
|
1340
|
+
icon?: string;
|
|
1341
|
+
/**
|
|
1342
|
+
* Sets the SVG icon of the **Action** button.
|
|
1343
|
+
*/
|
|
1344
|
+
svgIcon?: SVGIcon;
|
|
1345
|
+
/**
|
|
1346
|
+
* Sets a CSS class or multiple classes separated by spaces.
|
|
1347
|
+
* Applied to a `span` element inside the **Action** button.
|
|
1348
|
+
*/
|
|
1349
|
+
iconClass?: string;
|
|
1350
|
+
/**
|
|
1351
|
+
* Sets a URL for an `img` element displayed inside the **Action** button.
|
|
1352
|
+
*/
|
|
1353
|
+
imageUrl?: string;
|
|
1354
|
+
/**
|
|
1355
|
+
* Sets a CSS class or multiple classes separated by spaces on the **Action** button.
|
|
1356
|
+
*/
|
|
1357
|
+
buttonClass?: string;
|
|
1358
|
+
/**
|
|
1359
|
+
* Sets the icon displayed when the **Action** button is in loading state.
|
|
1360
|
+
*/
|
|
1361
|
+
loadingIcon?: string;
|
|
1362
|
+
/**
|
|
1363
|
+
* Sets the SVG icon to be displayed when the **Action** button is in loading state.
|
|
1364
|
+
*/
|
|
1365
|
+
loadingSVGIcon?: SVGIcon;
|
|
1366
|
+
}
|
|
1367
|
+
/**
|
|
1368
|
+
* Defines the event data emitted when the PromptBox **Action** button is clicked.
|
|
1369
|
+
*/
|
|
1370
|
+
interface ActionButtonEvent {
|
|
1371
|
+
actionType: 'send' | 'stop';
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* Defines the configuration settings for the PromptBox **File Select** button.
|
|
1376
|
+
*/
|
|
1377
|
+
interface FileSelectButtonSettings {
|
|
1378
|
+
/**
|
|
1379
|
+
* Sets the disabled state of the **File Select** button.
|
|
1380
|
+
* When set to `true`, prevents user interaction.
|
|
1381
|
+
*/
|
|
1382
|
+
disabled?: boolean;
|
|
1383
|
+
/**
|
|
1384
|
+
* Sets the background and border styles of the **File Select** button.
|
|
1385
|
+
*/
|
|
1386
|
+
fillMode?: ButtonFillMode;
|
|
1387
|
+
/**
|
|
1388
|
+
* Sets the name of a font icon from the Kendo UI theme.
|
|
1389
|
+
*/
|
|
1390
|
+
icon?: string;
|
|
1391
|
+
/**
|
|
1392
|
+
* Sets a URL for an `img` element displayed inside the **File Select** button.
|
|
1393
|
+
*/
|
|
1394
|
+
imageUrl?: string;
|
|
1395
|
+
/**
|
|
1396
|
+
* Sets the border radius of the **File Select** button.
|
|
1397
|
+
*/
|
|
1398
|
+
rounded?: ButtonRounded;
|
|
1399
|
+
/**
|
|
1400
|
+
* Sets the padding of the **File Select** button.
|
|
1401
|
+
*/
|
|
1402
|
+
size?: ButtonSize;
|
|
1403
|
+
/**
|
|
1404
|
+
* Sets an SVG icon to display inside the **File Select** button.
|
|
1405
|
+
*/
|
|
1406
|
+
svgIcon?: SVGIcon;
|
|
1407
|
+
/**
|
|
1408
|
+
* Sets a CSS class or multiple classes separated by spaces.
|
|
1409
|
+
* Applied to a `span` element inside the **File Select** button.
|
|
1410
|
+
*/
|
|
1411
|
+
iconClass?: string;
|
|
1412
|
+
/**
|
|
1413
|
+
* Sets the theme color of the **File Select** button.
|
|
1414
|
+
*/
|
|
1415
|
+
themeColor?: ButtonThemeColor;
|
|
1416
|
+
/**
|
|
1417
|
+
* Sets the restrictions for selected files.
|
|
1418
|
+
*/
|
|
1419
|
+
restrictions?: FileRestrictions;
|
|
1420
|
+
/**
|
|
1421
|
+
* Enables selection of multiple files.
|
|
1422
|
+
*/
|
|
1423
|
+
multiple?: boolean;
|
|
1424
|
+
/**
|
|
1425
|
+
* Sets the `accept` attribute of the internal file input element.
|
|
1426
|
+
*/
|
|
1427
|
+
accept?: string;
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* Represents the possible message box options for the Chat component.
|
|
1432
|
+
* @hidden
|
|
1433
|
+
*/
|
|
1434
|
+
type MessageBoxType = 'textarea';
|
|
1435
|
+
/**
|
|
1436
|
+
* Settings for the message box in the Chat component.
|
|
1437
|
+
*/
|
|
1438
|
+
interface MessageBoxSettings {
|
|
1439
|
+
/**
|
|
1440
|
+
* Sets the line mode of the message box.
|
|
1441
|
+
*/
|
|
1442
|
+
mode?: PromptBoxMode;
|
|
1443
|
+
/**
|
|
1444
|
+
* Sets the number of visible text lines for the message box.
|
|
1445
|
+
* Applies when `mode` is set to `multi`.
|
|
1446
|
+
*/
|
|
1447
|
+
rows?: number;
|
|
1448
|
+
/**
|
|
1449
|
+
* Sets the maximum height of the message box in pixels.
|
|
1450
|
+
*/
|
|
1451
|
+
maxHeight?: number;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
/**
|
|
1455
|
+
* Defines a template for displaying message attachments.
|
|
1456
|
+
*
|
|
1457
|
+
* To define an attachment template, nest an `<ng-template>` tag with the `kendoChatAttachmentTemplate` attribute inside the `<kendo-chat>` component.
|
|
1458
|
+
* The template context is set to the attachment instance.
|
|
1459
|
+
* For more information, refer to the article on [message attachments](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/attachments).
|
|
1460
|
+
*
|
|
1461
|
+
* You can use the following field:
|
|
1462
|
+
* - `attachment`—The attachment instance.
|
|
1463
|
+
* - `message`—The message instance.
|
|
1464
|
+
*
|
|
1465
|
+
* @example
|
|
1466
|
+
* ```html
|
|
1467
|
+
* <kendo-chat>
|
|
1468
|
+
* <ng-template kendoChatAttachmentTemplate let-attachment let-message>
|
|
1469
|
+
* <div>Attachment: {{ attachment.content }}</div>
|
|
1470
|
+
* </ng-template>
|
|
1471
|
+
* </kendo-chat>
|
|
1472
|
+
* ```
|
|
1473
|
+
*/
|
|
1474
|
+
declare class AttachmentTemplateDirective {
|
|
1475
|
+
templateRef: TemplateRef<any>;
|
|
1476
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1477
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentTemplateDirective, [{ optional: true; }]>;
|
|
1478
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AttachmentTemplateDirective, "[kendoChatAttachmentTemplate]", never, {}, {}, never, never, true, never>;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
/**
|
|
1482
|
+
* Defines a template for displaying custom content inside the Chat messages.
|
|
1483
|
+
*
|
|
1484
|
+
* To define a message template, nest an `<ng-template>` tag with the `kendoChatMessageContentTemplate` directive inside the `<kendo-chat>` component.
|
|
1485
|
+
* The template context is set to the `message` instance.
|
|
1486
|
+
* For more information, refer to the article on [message templates](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/message-templates).
|
|
1487
|
+
*
|
|
1488
|
+
* @example
|
|
1489
|
+
* ```html
|
|
1490
|
+
* <kendo-chat>
|
|
1491
|
+
* <ng-template kendoChatMessageContentTemplate let-message>
|
|
1492
|
+
* <div>Message: {{ message.text }}</div>
|
|
1493
|
+
* </ng-template>
|
|
1494
|
+
* </kendo-chat>
|
|
1495
|
+
* ```
|
|
1496
|
+
*/
|
|
1497
|
+
declare class MessageContentTemplateDirective {
|
|
1498
|
+
templateRef: TemplateRef<any>;
|
|
1499
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1500
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageContentTemplateDirective, [{ optional: true; }]>;
|
|
1501
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MessageContentTemplateDirective, "[kendoChatMessageContentTemplate]", never, {}, {}, never, never, true, never>;
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
/**
|
|
1505
|
+
* Defines a template for displaying fully custom Chat message bubbles.
|
|
1506
|
+
*
|
|
1507
|
+
* To define a message template, nest an `<ng-template>` tag with the `kendoChatMessageTemplate` directive inside the `<kendo-chat>` component.
|
|
1508
|
+
* The template context is set to the `message` instance.
|
|
1509
|
+
* For more information, refer to the article on [message templates](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/message-templates).
|
|
1510
|
+
*
|
|
1511
|
+
* @example
|
|
1512
|
+
* ```html
|
|
1513
|
+
* <kendo-chat>
|
|
1514
|
+
* <ng-template kendoChatMessageTemplate let-message>
|
|
1515
|
+
* <div>Message: {{ message.text }}</div>
|
|
1516
|
+
* </ng-template>
|
|
1517
|
+
* </kendo-chat>
|
|
1518
|
+
* ```
|
|
1519
|
+
*/
|
|
1520
|
+
declare class MessageTemplateDirective {
|
|
1521
|
+
templateRef: TemplateRef<any>;
|
|
1522
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1523
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageTemplateDirective, [{ optional: true; }]>;
|
|
1524
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MessageTemplateDirective, "[kendoChatMessageTemplate]", never, {}, {}, never, never, true, never>;
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
/**
|
|
1528
|
+
* Defines a template for displaying user status in the Chat.
|
|
1529
|
+
*
|
|
1530
|
+
* To define a user status template, nest an `<ng-template>` tag with the `kendoChatUserStatusTemplate` directive inside the `<kendo-chat>` component.
|
|
1531
|
+
* For more information, refer to the article on [message templates](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/message-templates).
|
|
1532
|
+
*
|
|
1533
|
+
* @example
|
|
1534
|
+
* ```html
|
|
1535
|
+
* <kendo-chat>
|
|
1536
|
+
* <ng-template kendoChatUserStatusTemplate let-status>
|
|
1537
|
+
* <div>{{ status }}</div>
|
|
1538
|
+
* </ng-template>
|
|
1539
|
+
* </kendo-chat>
|
|
1540
|
+
* ```
|
|
1541
|
+
*/
|
|
1542
|
+
declare class ChatUserStatusTemplateDirective {
|
|
1543
|
+
templateRef: TemplateRef<any>;
|
|
1544
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1545
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatUserStatusTemplateDirective, [{ optional: true; }]>;
|
|
1546
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChatUserStatusTemplateDirective, "[kendoChatUserStatusTemplate]", never, {}, {}, never, never, true, never>;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
/**
|
|
1550
|
+
* Creates a message box area that overrides the default message box of the Chat component.
|
|
1551
|
+
*
|
|
1552
|
+
* To define a message box template, nest an `<ng-template>` tag with the `kendoChatMessageBoxTemplate` directive inside the `<kendo-chat>` tag.
|
|
1553
|
+
* For more information, see [Message Box Template](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/message-templates#message-box-template).
|
|
1554
|
+
*
|
|
1555
|
+
* @example
|
|
1556
|
+
* ```html
|
|
1557
|
+
* <kendo-chat>
|
|
1558
|
+
* <ng-template kendoChatMessageBoxTemplate>
|
|
1559
|
+
* <input type="text" placeholder="Custom message box..." />
|
|
1560
|
+
* </ng-template>
|
|
1561
|
+
* </kendo-chat>
|
|
1562
|
+
* ```
|
|
1563
|
+
*/
|
|
1564
|
+
declare class ChatMessageBoxTemplateDirective {
|
|
1565
|
+
templateRef: TemplateRef<any>;
|
|
1566
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1567
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessageBoxTemplateDirective, never>;
|
|
1568
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChatMessageBoxTemplateDirective, "[kendoChatMessageBoxTemplate]", never, {}, {}, never, never, true, never>;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
/**
|
|
1572
|
+
* Represents the template for the header of the Chat component.
|
|
1573
|
+
*
|
|
1574
|
+
* @example
|
|
1575
|
+
* ```html
|
|
1576
|
+
* <kendo-chat>
|
|
1577
|
+
* <ng-template kendoChatHeaderTemplate>
|
|
1578
|
+
* Chat Title
|
|
1579
|
+
* </ng-template>
|
|
1580
|
+
* </kendo-chat>
|
|
1581
|
+
* ```
|
|
1582
|
+
*/
|
|
1583
|
+
declare class ChatHeaderTemplateDirective {
|
|
1584
|
+
templateRef: TemplateRef<any>;
|
|
1585
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1586
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatHeaderTemplateDirective, never>;
|
|
1587
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChatHeaderTemplateDirective, "[kendoChatHeaderTemplate]", never, {}, {}, never, never, true, never>;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
* Defines a template for displaying custom content when there are no messages in the Chat.
|
|
1592
|
+
*
|
|
1593
|
+
* To define an empty Chat template, nest an `<ng-template>` tag with the `kendoChatNoDataTemplate` directive inside the `<kendo-chat>` component.
|
|
1594
|
+
* For more information, refer to the article on [message templates](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/message-templates).
|
|
1595
|
+
*
|
|
1596
|
+
* @example
|
|
1597
|
+
* ```html
|
|
1598
|
+
* <kendo-chat>
|
|
1599
|
+
* <ng-template kendoChatNoDataTemplate>
|
|
1600
|
+
* <div>No messages.</div>
|
|
1601
|
+
* </ng-template>
|
|
1602
|
+
* </kendo-chat>
|
|
1603
|
+
* ```
|
|
1604
|
+
*/
|
|
1605
|
+
declare class NoDataTemplateDirective {
|
|
1606
|
+
templateRef: TemplateRef<any>;
|
|
1607
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1608
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NoDataTemplateDirective, [{ optional: true; }]>;
|
|
1609
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NoDataTemplateDirective, "[kendoChatNoDataTemplate]", never, {}, {}, never, never, true, never>;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
/**
|
|
1613
|
+
* Defines a template for displaying the chat timestamp.
|
|
1614
|
+
*
|
|
1615
|
+
* To define a timestamp template, nest an `<ng-template>` tag with the `kendoChatTimestampTemplate` directive inside the `<kendo-chat>` component.
|
|
1616
|
+
* The template context is set to the current timestamp.
|
|
1617
|
+
* For more information, refer to the article on [message templates](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/message-templates).
|
|
1618
|
+
*
|
|
1619
|
+
* You can use the following field:
|
|
1620
|
+
* - `timestamp`—The current timestamp.
|
|
1621
|
+
*
|
|
1622
|
+
* @example
|
|
1623
|
+
* ```html
|
|
1624
|
+
* <kendo-chat>
|
|
1625
|
+
* <ng-template kendoChatTimestampTemplate let-timestamp>
|
|
1626
|
+
* <div>Message time: {{ timestamp }}</div>
|
|
1627
|
+
* </ng-template>
|
|
1628
|
+
* </kendo-chat>
|
|
1629
|
+
* ```
|
|
1630
|
+
*/
|
|
1631
|
+
declare class ChatTimestampTemplateDirective {
|
|
1632
|
+
templateRef: TemplateRef<any>;
|
|
1633
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1634
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatTimestampTemplateDirective, [{ optional: true; }]>;
|
|
1635
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChatTimestampTemplateDirective, "[kendoChatTimestampTemplate]", never, {}, {}, never, never, true, never>;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
/**
|
|
1639
|
+
* Represents the template for the status of a message.
|
|
1640
|
+
*
|
|
1641
|
+
* @example
|
|
1642
|
+
* ```html
|
|
1643
|
+
* <kendo-chat>
|
|
1644
|
+
* <ng-template kendoChatStatusTemplate let-status>
|
|
1645
|
+
* Current status: {{ status }}
|
|
1646
|
+
* </ng-template>
|
|
1647
|
+
* </kendo-chat>
|
|
1648
|
+
* ```
|
|
1649
|
+
*/
|
|
1650
|
+
declare class ChatStatusTemplateDirective {
|
|
1651
|
+
templateRef: TemplateRef<any>;
|
|
1652
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1653
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatStatusTemplateDirective, never>;
|
|
1654
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChatStatusTemplateDirective, "[kendoChatStatusTemplate]", never, {}, {}, never, never, true, never>;
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
/**
|
|
1658
|
+
* Defines a template for displaying custom content inside the current user's messages in the Chat.
|
|
1659
|
+
*
|
|
1660
|
+
* To define a message template, nest an `<ng-template>` tag with the `kendoChatAuthorMessageContentTemplate` directive inside the `<kendo-chat>` component.
|
|
1661
|
+
* The template context is set to the `message` instance.
|
|
1662
|
+
* For more information, refer to the article on [message templates](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/message-templates).
|
|
1663
|
+
*
|
|
1664
|
+
* @example
|
|
1665
|
+
* ```html
|
|
1666
|
+
* <kendo-chat>
|
|
1667
|
+
* <ng-template kendoChatAuthorMessageContentTemplate let-message>
|
|
1668
|
+
* <div>Message: {{ message.text }}</div>
|
|
1669
|
+
* </ng-template>
|
|
1670
|
+
* </kendo-chat>
|
|
1671
|
+
* ```
|
|
1672
|
+
*/
|
|
1673
|
+
declare class AuthorMessageContentTemplateDirective {
|
|
1674
|
+
templateRef: TemplateRef<any>;
|
|
1675
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1676
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthorMessageContentTemplateDirective, [{ optional: true; }]>;
|
|
1677
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AuthorMessageContentTemplateDirective, "[kendoChatAuthorMessageContentTemplate]", never, {}, {}, never, never, true, never>;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
/**
|
|
1681
|
+
* Defines a template for displaying custom content inside the other users' messages in the Chat.
|
|
1682
|
+
*
|
|
1683
|
+
* To define a message template, nest an `<ng-template>` tag with the `kendoChatReceiverMessageContentTemplate` directive inside the `<kendo-chat>` component.
|
|
1684
|
+
* The template context is set to the `message` instance.
|
|
1685
|
+
* For more information, refer to the article on [message templates](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/message-templates).
|
|
1686
|
+
*
|
|
1687
|
+
* @example
|
|
1688
|
+
* ```html
|
|
1689
|
+
* <kendo-chat>
|
|
1690
|
+
* <ng-template kendoChatReceiverMessageContentTemplate let-message>
|
|
1691
|
+
* <div>Message: {{ message.text }}</div>
|
|
1692
|
+
* </ng-template>
|
|
1693
|
+
* </kendo-chat>
|
|
1694
|
+
* ```
|
|
1695
|
+
*/
|
|
1696
|
+
declare class ReceiverMessageContentTemplateDirective {
|
|
1697
|
+
templateRef: TemplateRef<any>;
|
|
1698
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1699
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReceiverMessageContentTemplateDirective, [{ optional: true; }]>;
|
|
1700
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ReceiverMessageContentTemplateDirective, "[kendoChatReceiverMessageContentTemplate]", never, {}, {}, never, never, true, never>;
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
/**
|
|
1704
|
+
* Defines a template for displaying fully custom Chat message bubbles for the other users.
|
|
1705
|
+
*
|
|
1706
|
+
* To define a message template, nest an `<ng-template>` tag with the `kendoChatReceiverMessageTemplate` directive inside the `<kendo-chat>` component.
|
|
1707
|
+
* The template context is set to the `message` instance.
|
|
1708
|
+
* For more information, refer to the article on [message templates](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/message-templates).
|
|
1709
|
+
*
|
|
1710
|
+
* @example
|
|
1711
|
+
* ```html
|
|
1712
|
+
* <kendo-chat>
|
|
1713
|
+
* <ng-template kendoChatReceiverMessageTemplate let-message>
|
|
1714
|
+
* <div>Message: {{ message.text }}</div>
|
|
1715
|
+
* </ng-template>
|
|
1716
|
+
* </kendo-chat>
|
|
1717
|
+
* ```
|
|
1718
|
+
*/
|
|
1719
|
+
declare class ReceiverMessageTemplateDirective {
|
|
1720
|
+
templateRef: TemplateRef<any>;
|
|
1721
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1722
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReceiverMessageTemplateDirective, [{ optional: true; }]>;
|
|
1723
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ReceiverMessageTemplateDirective, "[kendoChatReceiverMessageTemplate]", never, {}, {}, never, never, true, never>;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
/**
|
|
1727
|
+
* Defines a template for displaying fully custom Chat message bubbles for the current user.
|
|
1728
|
+
*
|
|
1729
|
+
* To define a message template, nest an `<ng-template>` tag with the `kendoChatAuthorMessageTemplate` directive inside the `<kendo-chat>` component.
|
|
1730
|
+
* The template context is set to the `message` instance.
|
|
1731
|
+
* For more information, refer to the article on [message templates](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/message-templates).
|
|
1732
|
+
*
|
|
1733
|
+
* @example
|
|
1734
|
+
* ```html
|
|
1735
|
+
* <kendo-chat>
|
|
1736
|
+
* <ng-template kendoChatAuthorMessageTemplate let-message>
|
|
1737
|
+
* <div>Message: {{ message.text }}</div>
|
|
1738
|
+
* </ng-template>
|
|
1739
|
+
* </kendo-chat>
|
|
1740
|
+
* ```
|
|
1741
|
+
*/
|
|
1742
|
+
declare class AuthorMessageTemplateDirective {
|
|
1743
|
+
templateRef: TemplateRef<any>;
|
|
1744
|
+
constructor(templateRef: TemplateRef<any>);
|
|
1745
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthorMessageTemplateDirective, [{ optional: true; }]>;
|
|
1746
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AuthorMessageTemplateDirective, "[kendoChatAuthorMessageTemplate]", never, {}, {}, never, never, true, never>;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
/**
|
|
1750
|
+
* @hidden
|
|
1751
|
+
*/
|
|
1752
|
+
declare class ChatService {
|
|
1753
|
+
private zone;
|
|
1754
|
+
authorId: string | number;
|
|
1755
|
+
messageWidthMode: MessageWidthMode;
|
|
1756
|
+
messageContextMenuActions: MessageAction[];
|
|
1757
|
+
calculatedContextMenuActions: MessageAction[];
|
|
1758
|
+
fileActions: FileAction[];
|
|
1759
|
+
toggleMessageState: boolean;
|
|
1760
|
+
layoutChangeInProgress: boolean;
|
|
1761
|
+
reply: Message;
|
|
1762
|
+
messages: Message[];
|
|
1763
|
+
repliedToMessages: Message[];
|
|
1764
|
+
chatElement: ViewContainerRef;
|
|
1765
|
+
messageElementsMap: Map<string | number, ElementRef>;
|
|
1766
|
+
messagesContextMenu: ContextMenuComponent;
|
|
1767
|
+
activeMessage: Message;
|
|
1768
|
+
activeMessageElement: any;
|
|
1769
|
+
selectOnMenuClose: boolean;
|
|
1770
|
+
active: boolean;
|
|
1771
|
+
messageFilesLayout: FilesLayoutMode;
|
|
1772
|
+
timestampVisibility: TimestampVisibilityMode;
|
|
1773
|
+
showUsername: boolean;
|
|
1774
|
+
showAvatar: boolean;
|
|
1775
|
+
private _speechToTextButton;
|
|
1776
|
+
private _fileSelectButton;
|
|
1777
|
+
private _sendButtonSettings;
|
|
1778
|
+
private _messageBoxSettings;
|
|
1779
|
+
private _suggestionsLayout;
|
|
1780
|
+
private _quickActionsLayout;
|
|
1781
|
+
private _messageToolbarActions;
|
|
1782
|
+
_authorMessageSettings: MessageSettings;
|
|
1783
|
+
_receiverMessageSettings: MessageSettings;
|
|
1784
|
+
private _allowMessageCollapse;
|
|
1785
|
+
private subjects;
|
|
1786
|
+
toolbarAction$: rxjs.Observable<MessageActionEvent>;
|
|
1787
|
+
contextMenuAction$: rxjs.Observable<MessageActionEvent>;
|
|
1788
|
+
fileAction$: rxjs.Observable<FileActionEvent>;
|
|
1789
|
+
fileDownload$: rxjs.Observable<FileDownloadEvent>;
|
|
1790
|
+
resendMessage$: rxjs.Observable<ResendMessageEvent>;
|
|
1791
|
+
replyReferenceClick$: rxjs.Observable<string | number>;
|
|
1792
|
+
inputValueChange$: rxjs.Observable<string>;
|
|
1793
|
+
contextMenuVisibilityChange$: rxjs.Observable<boolean>;
|
|
1794
|
+
suggestionsLayoutChange$: rxjs.Observable<SuggestionsLayoutMode>;
|
|
1795
|
+
quickActionsLayoutChange$: rxjs.Observable<SuggestionsLayoutMode>;
|
|
1796
|
+
authorMessageSettingsChange$: rxjs.Observable<MessageSettings>;
|
|
1797
|
+
receiverMessageSettingsChange$: rxjs.Observable<MessageSettings>;
|
|
1798
|
+
allowMessageCollapseChange$: rxjs.Observable<boolean>;
|
|
1799
|
+
messageToolbarActionsChange$: rxjs.Observable<MessageAction[]>;
|
|
1800
|
+
constructor(zone: NgZone);
|
|
1801
|
+
set authorMessageSettings(settings: MessageSettings);
|
|
1802
|
+
get authorMessageSettings(): MessageSettings;
|
|
1803
|
+
set receiverMessageSettings(settings: MessageSettings);
|
|
1804
|
+
get receiverMessageSettings(): MessageSettings;
|
|
1805
|
+
set speechToTextButton(settings: boolean | SpeechToTextButtonSettings);
|
|
1806
|
+
get speechToTextButton(): SpeechToTextButtonSettings | null;
|
|
1807
|
+
set fileSelectButton(settings: boolean | FileSelectButtonSettings);
|
|
1808
|
+
get fileSelectButton(): FileSelectButtonSettings | null;
|
|
1809
|
+
set sendButton(settings: boolean | SendButtonSettings);
|
|
1810
|
+
get sendButton(): SendButtonSettings | null;
|
|
1811
|
+
set messageBoxSettings(settings: MessageBoxSettings);
|
|
1812
|
+
get messageBoxSettings(): MessageBoxSettings;
|
|
1813
|
+
set suggestionsLayout(layoutMode: SuggestionsLayoutMode);
|
|
1814
|
+
get suggestionsLayout(): SuggestionsLayoutMode;
|
|
1815
|
+
set quickActionsLayout(layoutMode: QuickActionsLayoutMode);
|
|
1816
|
+
get quickActionsLayout(): QuickActionsLayoutMode;
|
|
1817
|
+
set messageToolbarActions(value: MessageAction[]);
|
|
1818
|
+
get messageToolbarActions(): MessageAction[];
|
|
1819
|
+
set allowMessageCollapse(value: boolean);
|
|
1820
|
+
get allowMessageCollapse(): boolean;
|
|
1821
|
+
calculateContextMenuActions(isOwn: boolean): void;
|
|
1822
|
+
emit(subjectKey: string, value?: any): void;
|
|
1823
|
+
getMessageById(id: string | number): Message | undefined;
|
|
1824
|
+
registerMessageElement(messageId: string | number, elementRef: ElementRef): void;
|
|
1825
|
+
unregisterMessageElement(messageId: string | number): void;
|
|
1826
|
+
scrollToMessage(messageId: string | number, behavior?: ScrollBehavior): void;
|
|
1827
|
+
focusActiveMessageElement(): void;
|
|
1828
|
+
isOwnMessage(message: Message): boolean;
|
|
1829
|
+
private getScrollContainer;
|
|
1830
|
+
private computeScrollTarget;
|
|
1831
|
+
private updateComponentSettings;
|
|
1832
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatService, never>;
|
|
1833
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ChatService>;
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
/**
|
|
1837
|
+
* Defines the model fields that will be used for creating `Message` instances.
|
|
1838
|
+
*/
|
|
1839
|
+
interface ConversationalUIModelFields {
|
|
1840
|
+
/**
|
|
1841
|
+
* Field name for message ID.
|
|
1842
|
+
*
|
|
1843
|
+
* @default "id"
|
|
1844
|
+
*/
|
|
1845
|
+
idField?: string;
|
|
1846
|
+
/**
|
|
1847
|
+
* Field name for message text content.
|
|
1848
|
+
*
|
|
1849
|
+
* @default "text"
|
|
1850
|
+
*/
|
|
1851
|
+
textField?: string;
|
|
1852
|
+
/**
|
|
1853
|
+
* Field name for message author ID.
|
|
1854
|
+
*
|
|
1855
|
+
* @default "authorId"
|
|
1856
|
+
*/
|
|
1857
|
+
authorIdField?: string;
|
|
1858
|
+
/**
|
|
1859
|
+
* Field name for message author name (when flattened in data source).
|
|
1860
|
+
*
|
|
1861
|
+
* @default "authorName"
|
|
1862
|
+
*/
|
|
1863
|
+
authorNameField?: string;
|
|
1864
|
+
/**
|
|
1865
|
+
* Field name for message author avatar URL (when flattened in data source).
|
|
1866
|
+
*
|
|
1867
|
+
* @default "authorImageUrl"
|
|
1868
|
+
*/
|
|
1869
|
+
authorImageUrlField?: string;
|
|
1870
|
+
/**
|
|
1871
|
+
* Field name for alt text of the author's avatar (when flattened in data source).
|
|
1872
|
+
*
|
|
1873
|
+
* @default "authorImageAltText"
|
|
1874
|
+
*/
|
|
1875
|
+
authorImageAltTextField?: string;
|
|
1876
|
+
/**
|
|
1877
|
+
* Field name for message timestamp.
|
|
1878
|
+
*
|
|
1879
|
+
* @default "timestamp"
|
|
1880
|
+
*/
|
|
1881
|
+
timestampField?: string;
|
|
1882
|
+
/**
|
|
1883
|
+
* Field name for message status. Use this when status is a string or an object.
|
|
1884
|
+
*
|
|
1885
|
+
* @default "status"
|
|
1886
|
+
*/
|
|
1887
|
+
statusField?: string;
|
|
1888
|
+
/**
|
|
1889
|
+
* Field name for file attachments.
|
|
1890
|
+
*
|
|
1891
|
+
* @default "files"
|
|
1892
|
+
*/
|
|
1893
|
+
filesField?: string;
|
|
1894
|
+
/**
|
|
1895
|
+
* Field name for message attachments.
|
|
1896
|
+
*
|
|
1897
|
+
* @default "attachments"
|
|
1898
|
+
*/
|
|
1899
|
+
attachmentsField?: string;
|
|
1900
|
+
/**
|
|
1901
|
+
* Field name for message attachment layout.
|
|
1902
|
+
*
|
|
1903
|
+
* @default "attachmentLayout"
|
|
1904
|
+
*/
|
|
1905
|
+
attachmentLayoutField?: string;
|
|
1906
|
+
/**
|
|
1907
|
+
* Field name for suggested actions.
|
|
1908
|
+
*
|
|
1909
|
+
* @default "suggestedActions"
|
|
1910
|
+
*/
|
|
1911
|
+
suggestedActionsField?: string;
|
|
1912
|
+
/**
|
|
1913
|
+
* Field name for message pinned status.
|
|
1914
|
+
*
|
|
1915
|
+
* @default "isPinned"
|
|
1916
|
+
*/
|
|
1917
|
+
isPinnedField?: string;
|
|
1918
|
+
/**
|
|
1919
|
+
* Field name for reply-to message ID.
|
|
1920
|
+
*
|
|
1921
|
+
* @default "replyToId"
|
|
1922
|
+
*/
|
|
1923
|
+
replyToIdField?: string;
|
|
1924
|
+
/**
|
|
1925
|
+
* Field name for message deletion status.
|
|
1926
|
+
*
|
|
1927
|
+
* @default "isDeleted"
|
|
1928
|
+
*/
|
|
1929
|
+
isDeletedField?: string;
|
|
1930
|
+
/**
|
|
1931
|
+
* Field name for the typing indicator.
|
|
1932
|
+
*
|
|
1933
|
+
* @default "typing"
|
|
1934
|
+
*/
|
|
1935
|
+
typingField?: string;
|
|
1936
|
+
/**
|
|
1937
|
+
* Field name for the failed status.
|
|
1938
|
+
*
|
|
1939
|
+
* @default "failed"
|
|
1940
|
+
*/
|
|
1941
|
+
failedField?: string;
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
/**
|
|
1945
|
+
* @hidden
|
|
1946
|
+
*
|
|
1947
|
+
* Tracks the rendered range for endless scroll mode.
|
|
1948
|
+
* Pure logic — no Angular dependency.
|
|
1949
|
+
*/
|
|
1950
|
+
interface EndlessScrollRange {
|
|
1951
|
+
start: number;
|
|
1952
|
+
end: number;
|
|
1953
|
+
}
|
|
1954
|
+
/**
|
|
1955
|
+
* @hidden
|
|
1956
|
+
*/
|
|
1957
|
+
declare class EndlessScrollState {
|
|
1958
|
+
startIndex: number;
|
|
1959
|
+
endIndex: number;
|
|
1960
|
+
isLoading: boolean;
|
|
1961
|
+
get isAtStart(): boolean;
|
|
1962
|
+
get isAtEnd(): boolean;
|
|
1963
|
+
private _total;
|
|
1964
|
+
private _pageSize;
|
|
1965
|
+
get pageSize(): number;
|
|
1966
|
+
init(total: number, pageSize: number): EndlessScrollRange;
|
|
1967
|
+
extendUp(): EndlessScrollRange | null;
|
|
1968
|
+
extendDown(): EndlessScrollRange | null;
|
|
1969
|
+
jumpTo(targetIndex: number): EndlessScrollRange;
|
|
1970
|
+
jumpToEnd(): EndlessScrollRange;
|
|
1971
|
+
updateTotal(total: number): void;
|
|
1972
|
+
reset(): void;
|
|
1973
|
+
contains(index: number): boolean;
|
|
1974
|
+
syncFromInputs(start: number, end: number, total: number): void;
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
/**
|
|
1978
|
+
* Defines a container for custom content displayed at the end of the PromptBox.
|
|
1979
|
+
*
|
|
1980
|
+
* @example
|
|
1981
|
+
* ```html
|
|
1982
|
+
* <kendo-promptbox>
|
|
1983
|
+
* <kendo-promptbox-end-affix>
|
|
1984
|
+
* <button kendoButton fillMode="clear" [svgIcon]="imageIcon"></button>
|
|
1985
|
+
* </kendo-promptbox-end-affix>
|
|
1986
|
+
* </kendo-promptbox>
|
|
1987
|
+
* ```
|
|
1988
|
+
*/
|
|
1989
|
+
declare class PromptBoxEndAffixComponent {
|
|
1990
|
+
/**
|
|
1991
|
+
* @hidden
|
|
1992
|
+
*/
|
|
1993
|
+
templateRef: TemplateRef<any>;
|
|
1994
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptBoxEndAffixComponent, never>;
|
|
1995
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptBoxEndAffixComponent, "kendo-promptbox-end-affix", ["kendoPromptBoxEndAffix"], {}, {}, never, ["*"], true, never>;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
/**
|
|
1999
|
+
* Defines a container for custom content displayed at the start of the PromptBox.
|
|
2000
|
+
*
|
|
2001
|
+
* @example
|
|
2002
|
+
* ```html
|
|
2003
|
+
* <kendo-promptbox>
|
|
2004
|
+
* <kendo-promptbox-start-affix>
|
|
2005
|
+
* <button kendoButton fillMode="clear" [svgIcon]="imageIcon"></button>
|
|
2006
|
+
* </kendo-promptbox-start-affix>
|
|
2007
|
+
* </kendo-promptbox>
|
|
2008
|
+
* ```
|
|
2009
|
+
*/
|
|
2010
|
+
declare class PromptBoxStartAffixComponent {
|
|
2011
|
+
/**
|
|
2012
|
+
* @hidden
|
|
2013
|
+
*/
|
|
2014
|
+
templateRef: TemplateRef<any>;
|
|
2015
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptBoxStartAffixComponent, never>;
|
|
2016
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptBoxStartAffixComponent, "kendo-promptbox-start-affix", ["kendoPromptBoxStartAffix"], {}, {}, never, ["*"], true, never>;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
/**
|
|
2020
|
+
* Defines a container for custom content displayed at the top of the PromptBox when in `'multi'` mode.
|
|
2021
|
+
*
|
|
2022
|
+
* @example
|
|
2023
|
+
* ```html
|
|
2024
|
+
* <kendo-promptbox>
|
|
2025
|
+
* <kendo-promptbox-top-affix>
|
|
2026
|
+
* <button kendoButton fillMode="clear" [svgIcon]="imageIcon"></button>
|
|
2027
|
+
* </kendo-promptbox-top-affix>
|
|
2028
|
+
* </kendo-promptbox>
|
|
2029
|
+
* ```
|
|
2030
|
+
*/
|
|
2031
|
+
declare class PromptBoxTopAffixComponent {
|
|
2032
|
+
/**
|
|
2033
|
+
* @hidden
|
|
2034
|
+
*/
|
|
2035
|
+
templateRef: TemplateRef<any>;
|
|
2036
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptBoxTopAffixComponent, never>;
|
|
2037
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptBoxTopAffixComponent, "kendo-promptbox-top-affix", ["kendoPromptBoxTopAffix"], {}, {}, never, ["*"], true, never>;
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
/**
|
|
2041
|
+
* Defines a template for customizing the content above the PromptBox attachments.
|
|
2042
|
+
*
|
|
2043
|
+
* @hidden
|
|
2044
|
+
*/
|
|
2045
|
+
declare class PromptBoxHeaderTemplateDirective {
|
|
2046
|
+
templateRef: TemplateRef<any>;
|
|
2047
|
+
constructor(templateRef: TemplateRef<any>);
|
|
2048
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptBoxHeaderTemplateDirective, [{ optional: true; }]>;
|
|
2049
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PromptBoxHeaderTemplateDirective, "[kendoPromptBoxHeaderTemplate]", never, {}, {}, never, never, true, never>;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
/**
|
|
2053
|
+
* Represents the Kendo UI PromptBox component for Angular.
|
|
2054
|
+
*
|
|
2055
|
+
* @example
|
|
2056
|
+
* ```html
|
|
2057
|
+
* <kendo-promptbox placeholder="Ask a question..."></kendo-promptbox>
|
|
2058
|
+
* ```
|
|
2059
|
+
*
|
|
2060
|
+
* @remarks
|
|
2061
|
+
* Supported children components are: {@link PromptBoxCustomMessagesComponent}, {@link PromptBoxStartAffixComponent}, {@link PromptBoxEndAffixComponent}, {@link PromptBoxTopAffixComponent}, {@link PromptBoxSpeechToTextButtonComponent}, {@link PromptBoxActionButtonComponent}, {@link PromptBoxFileSelectButtonComponent}.
|
|
2062
|
+
*
|
|
2063
|
+
*/
|
|
2064
|
+
declare class PromptBoxComponent implements ControlValueAccessor, AfterViewInit {
|
|
2065
|
+
private changeDetector;
|
|
2066
|
+
private renderer;
|
|
2067
|
+
private ngZone;
|
|
2068
|
+
private localization;
|
|
2069
|
+
hostElement: ElementRef;
|
|
2070
|
+
get hostSinglelineClass(): boolean;
|
|
2071
|
+
get hostMultilineClass(): boolean;
|
|
2072
|
+
get hostDisabledClass(): boolean;
|
|
2073
|
+
/**
|
|
2074
|
+
* Enables or disables the PromptBox.
|
|
2075
|
+
*
|
|
2076
|
+
* @default false
|
|
2077
|
+
*/
|
|
2078
|
+
disabled: boolean;
|
|
2079
|
+
/**
|
|
2080
|
+
* @hidden
|
|
2081
|
+
*/
|
|
2082
|
+
focusableId: string;
|
|
2083
|
+
/**
|
|
2084
|
+
* Sets the loading state of the **Action** button.
|
|
2085
|
+
*
|
|
2086
|
+
* @default false
|
|
2087
|
+
*/
|
|
2088
|
+
loading: boolean;
|
|
2089
|
+
/**
|
|
2090
|
+
* Sets the placeholder text displayed in the PromptBox when it is empty.
|
|
2091
|
+
*
|
|
2092
|
+
* @default ''
|
|
2093
|
+
*/
|
|
2094
|
+
placeholder: string;
|
|
2095
|
+
/**
|
|
2096
|
+
* Sets the read-only state of the PromptBox. When set to `true`, the PromptBox content cannot be modified but remains accessible.
|
|
2097
|
+
*
|
|
2098
|
+
* @default false
|
|
2099
|
+
*/
|
|
2100
|
+
readonly: boolean;
|
|
2101
|
+
/**
|
|
2102
|
+
* Sets the title attribute of the input or textarea element.
|
|
2103
|
+
*
|
|
2104
|
+
* @default ''
|
|
2105
|
+
*
|
|
2106
|
+
* @remarks
|
|
2107
|
+
* This property is related to accessibility.
|
|
2108
|
+
*/
|
|
2109
|
+
title: string;
|
|
2110
|
+
/**
|
|
2111
|
+
* Sets the mode of the PromptBox. [See example](slug:modes_promptbox).
|
|
2112
|
+
* @default 'auto'
|
|
2113
|
+
*/
|
|
2114
|
+
set mode(promptBoxMode: PromptBoxMode);
|
|
2115
|
+
get mode(): PromptBoxMode;
|
|
2116
|
+
/**
|
|
2117
|
+
* Sets the number of visible text lines in the textarea. Applies only when the `mode` is set to `multi`.
|
|
2118
|
+
*/
|
|
2119
|
+
set rows(value: number);
|
|
2120
|
+
get rows(): number;
|
|
2121
|
+
/**
|
|
2122
|
+
* Sets the maximum height of the textarea in pixels.
|
|
2123
|
+
* The textarea resizes automatically until it reaches this height. When the content exceeds this height, a scrollbar appears.
|
|
2124
|
+
*/
|
|
2125
|
+
set maxTextAreaHeight(value: number);
|
|
2126
|
+
get maxTextAreaHeight(): number;
|
|
2127
|
+
/**
|
|
2128
|
+
* Sets the value of the PromptBox.
|
|
2129
|
+
*/
|
|
2130
|
+
set value(value: string);
|
|
2131
|
+
get value(): string;
|
|
2132
|
+
/**
|
|
2133
|
+
* Controls the visibility and configuration of the **Action** button in the end affix.
|
|
2134
|
+
*
|
|
2135
|
+
* @default true
|
|
2136
|
+
*/
|
|
2137
|
+
set actionButton(settings: boolean | ActionButtonSettings);
|
|
2138
|
+
get actionButton(): boolean | ActionButtonSettings;
|
|
2139
|
+
/**
|
|
2140
|
+
* Controls the visibility and configuration of the **File Select** button in the end affix.
|
|
2141
|
+
*
|
|
2142
|
+
* @default false
|
|
2143
|
+
*/
|
|
2144
|
+
set fileSelectButton(settings: boolean | FileSelectButtonSettings);
|
|
2145
|
+
get fileSelectButton(): boolean | FileSelectButtonSettings;
|
|
2146
|
+
/**
|
|
2147
|
+
* Controls the visibility and configuration of the **Speech to Text** button in the end affix.
|
|
2148
|
+
*
|
|
2149
|
+
* @default true
|
|
2150
|
+
*/
|
|
2151
|
+
set speechToTextButton(settings: boolean | SpeechToTextButtonSettings);
|
|
2152
|
+
get speechToTextButton(): boolean | SpeechToTextButtonSettings;
|
|
2153
|
+
/**
|
|
2154
|
+
* Fires each time the value of the PromptBox changes.
|
|
2155
|
+
*/
|
|
2156
|
+
valueChange: EventEmitter<string>;
|
|
2157
|
+
/**
|
|
2158
|
+
* Fires each time the PromptBox is focused.
|
|
2159
|
+
*/
|
|
2160
|
+
onFocus: EventEmitter<void>;
|
|
2161
|
+
/**
|
|
2162
|
+
* Fires each time the PromptBox gets blurred.
|
|
2163
|
+
*/
|
|
2164
|
+
onBlur: EventEmitter<void>;
|
|
2165
|
+
/**
|
|
2166
|
+
* Fires each time the internal input element is focused.
|
|
2167
|
+
*/
|
|
2168
|
+
inputFocus: EventEmitter<void>;
|
|
2169
|
+
/**
|
|
2170
|
+
* Fires each time the internal input element is blurred.
|
|
2171
|
+
*/
|
|
2172
|
+
inputBlur: EventEmitter<void>;
|
|
2173
|
+
/**
|
|
2174
|
+
* Fires each time you click the **Action** button.
|
|
2175
|
+
*/
|
|
2176
|
+
promptAction: EventEmitter<ActionButtonEvent>;
|
|
2177
|
+
/**
|
|
2178
|
+
* Fires each time you select files using the **File Select** button.
|
|
2179
|
+
*/
|
|
2180
|
+
selectAttachments: EventEmitter<SelectEvent>;
|
|
2181
|
+
/**
|
|
2182
|
+
* Fires each time you remove a file from the PromptBox.
|
|
2183
|
+
*/
|
|
2184
|
+
fileRemove: EventEmitter<FileInfo>;
|
|
2185
|
+
/**
|
|
2186
|
+
* Fires each time you click the **Speech to Text** button.
|
|
2187
|
+
*/
|
|
2188
|
+
speechToTextClick: EventEmitter<any>;
|
|
2189
|
+
/**
|
|
2190
|
+
* Fires each time the speech recognition service begins listening to incoming audio.
|
|
2191
|
+
*/
|
|
2192
|
+
speechToTextStart: EventEmitter<any>;
|
|
2193
|
+
/**
|
|
2194
|
+
* Fires each time the speech recognition service disconnects.
|
|
2195
|
+
*/
|
|
2196
|
+
speechToTextEnd: EventEmitter<any>;
|
|
2197
|
+
/**
|
|
2198
|
+
* Fires when a speech recognition error occurs.
|
|
2199
|
+
*/
|
|
2200
|
+
speechToTextError: EventEmitter<SpeechToTextErrorEvent>;
|
|
2201
|
+
/**
|
|
2202
|
+
* Fires when the speech recognition service returns a result.
|
|
2203
|
+
*/
|
|
2204
|
+
speechToTextResult: EventEmitter<SpeechToTextResultEvent>;
|
|
2205
|
+
/**
|
|
2206
|
+
* @hidden
|
|
2207
|
+
*/
|
|
2208
|
+
inputElement: ElementRef<HTMLInputElement>;
|
|
2209
|
+
/**
|
|
2210
|
+
* @hidden
|
|
2211
|
+
*/
|
|
2212
|
+
textareaElement: ElementRef<HTMLTextAreaElement>;
|
|
2213
|
+
/**
|
|
2214
|
+
* @hidden
|
|
2215
|
+
*/
|
|
2216
|
+
filesList: ElementRef<HTMLUListElement>;
|
|
2217
|
+
/**
|
|
2218
|
+
* @hidden
|
|
2219
|
+
*/
|
|
2220
|
+
headerTemplate: PromptBoxHeaderTemplateDirective;
|
|
2221
|
+
/**
|
|
2222
|
+
* @hidden
|
|
2223
|
+
*/
|
|
2224
|
+
startAffix: PromptBoxStartAffixComponent;
|
|
2225
|
+
/**
|
|
2226
|
+
* @hidden
|
|
2227
|
+
*/
|
|
2228
|
+
endAffix: PromptBoxEndAffixComponent;
|
|
2229
|
+
/**
|
|
2230
|
+
* @hidden
|
|
2231
|
+
*/
|
|
2232
|
+
topAffix: PromptBoxTopAffixComponent;
|
|
2233
|
+
/**
|
|
2234
|
+
* @hidden
|
|
2235
|
+
*/
|
|
2236
|
+
private speechToTextButtonComponent;
|
|
2237
|
+
/**
|
|
2238
|
+
* @hidden
|
|
2239
|
+
*/
|
|
2240
|
+
private actionButtonComponent;
|
|
2241
|
+
/**
|
|
2242
|
+
* @hidden
|
|
2243
|
+
*/
|
|
2244
|
+
private fileSelectButtonComponent;
|
|
2245
|
+
/**
|
|
2246
|
+
* @hidden
|
|
2247
|
+
*/
|
|
2248
|
+
get hasEndAffixContent(): boolean;
|
|
2249
|
+
/**
|
|
2250
|
+
* @hidden
|
|
2251
|
+
*/
|
|
2252
|
+
get isActionButtonDisabled(): boolean;
|
|
2253
|
+
/**
|
|
2254
|
+
* @hidden
|
|
2255
|
+
*/
|
|
2256
|
+
get actionButtonSettings(): ActionButtonSettings;
|
|
2257
|
+
/**
|
|
2258
|
+
* @hidden
|
|
2259
|
+
*/
|
|
2260
|
+
get fileSelectButtonSettings(): FileSelectButtonSettings;
|
|
2261
|
+
/**
|
|
2262
|
+
* @hidden
|
|
2263
|
+
*/
|
|
2264
|
+
get speechToTextButtonSettings(): SpeechToTextButtonSettings;
|
|
2265
|
+
/**
|
|
2266
|
+
* @hidden
|
|
2267
|
+
*/
|
|
2268
|
+
get effectiveRows(): number;
|
|
2269
|
+
/**
|
|
2270
|
+
* @hidden
|
|
2271
|
+
*/
|
|
2272
|
+
hasExpanded: boolean;
|
|
2273
|
+
/**
|
|
2274
|
+
* @hidden
|
|
2275
|
+
*/
|
|
2276
|
+
isListening: boolean;
|
|
2277
|
+
/**
|
|
2278
|
+
* Provides the currently attached files in the PromptBox component.
|
|
2279
|
+
*/
|
|
2280
|
+
attachments: FileInfo[];
|
|
2281
|
+
/**
|
|
2282
|
+
* @hidden
|
|
2283
|
+
*/
|
|
2284
|
+
filesListScrollAtStart: boolean;
|
|
2285
|
+
/**
|
|
2286
|
+
* @hidden
|
|
2287
|
+
*/
|
|
2288
|
+
filesListScrollAtEnd: boolean;
|
|
2289
|
+
/**
|
|
2290
|
+
* @hidden
|
|
2291
|
+
*/
|
|
2292
|
+
hasFilesOverflow: boolean;
|
|
2293
|
+
private _value;
|
|
2294
|
+
private _mode;
|
|
2295
|
+
private _rows;
|
|
2296
|
+
private initialHeight;
|
|
2297
|
+
private singleRowHeight;
|
|
2298
|
+
private singleLineWidth;
|
|
2299
|
+
private _maxTextAreaHeight;
|
|
2300
|
+
private _actionButtonSettings;
|
|
2301
|
+
private _fileSelectButtonSettings;
|
|
2302
|
+
private _speechToTextButtonSettings;
|
|
2303
|
+
private hostWidthAtCapture;
|
|
2304
|
+
private minMultiRowHeight;
|
|
2305
|
+
private resizeSubscription;
|
|
2306
|
+
private speechToTextSubscription;
|
|
2307
|
+
private actionButtonSubscription;
|
|
2308
|
+
private fileSelectSubscription;
|
|
2309
|
+
private focusChangedProgrammatically;
|
|
2310
|
+
private ngTouched;
|
|
2311
|
+
private ngChange;
|
|
2312
|
+
constructor(changeDetector: ChangeDetectorRef, renderer: Renderer2, ngZone: NgZone, localization: LocalizationService, hostElement: ElementRef);
|
|
2313
|
+
ngAfterViewInit(): void;
|
|
2314
|
+
ngOnDestroy(): void;
|
|
2315
|
+
/**
|
|
2316
|
+
* Focuses the PromptBox.
|
|
2317
|
+
*/
|
|
2318
|
+
focus(): void;
|
|
2319
|
+
/**
|
|
2320
|
+
* Blurs the PromptBox.
|
|
2321
|
+
*/
|
|
2322
|
+
blur(): void;
|
|
2323
|
+
/**
|
|
2324
|
+
* Clears all attached files from the PromptBox.
|
|
2325
|
+
*/
|
|
2326
|
+
clearAttachments(): void;
|
|
2327
|
+
/**
|
|
2328
|
+
* @hidden
|
|
2329
|
+
*/
|
|
2330
|
+
writeValue(value: string): void;
|
|
2331
|
+
/**
|
|
2332
|
+
* @hidden
|
|
2333
|
+
*/
|
|
2334
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
2335
|
+
/**
|
|
2336
|
+
* @hidden
|
|
2337
|
+
*/
|
|
2338
|
+
registerOnTouched(fn: () => void): void;
|
|
2339
|
+
/**
|
|
2340
|
+
* @hidden
|
|
2341
|
+
*/
|
|
2342
|
+
handleInput: (event: Event) => void;
|
|
2343
|
+
/**
|
|
2344
|
+
* @hidden
|
|
2345
|
+
*/
|
|
2346
|
+
handleInputFocus: () => void;
|
|
2347
|
+
/**
|
|
2348
|
+
* @hidden
|
|
2349
|
+
*/
|
|
2350
|
+
handleInputBlur: () => void;
|
|
2351
|
+
/**
|
|
2352
|
+
* @hidden
|
|
2353
|
+
*/
|
|
2354
|
+
handleKeydown: (event: KeyboardEvent) => void;
|
|
2355
|
+
/**
|
|
2356
|
+
* @hidden
|
|
2357
|
+
*/
|
|
2358
|
+
handlePromptAction(event: ActionButtonEvent): void;
|
|
2359
|
+
/**
|
|
2360
|
+
* @hidden
|
|
2361
|
+
*/
|
|
2362
|
+
handleFileSelectAttachments(event: SelectEvent): void;
|
|
2363
|
+
/**
|
|
2364
|
+
* @hidden
|
|
2365
|
+
*/
|
|
2366
|
+
removeFile(index: number): void;
|
|
2367
|
+
/**
|
|
2368
|
+
* @hidden
|
|
2369
|
+
*/
|
|
2370
|
+
onFilesListScroll(filesList: HTMLDivElement): void;
|
|
2371
|
+
/**
|
|
2372
|
+
* @hidden
|
|
2373
|
+
*/
|
|
2374
|
+
handleSpeechToTextClick(event: any): void;
|
|
2375
|
+
/**
|
|
2376
|
+
* @hidden
|
|
2377
|
+
*/
|
|
2378
|
+
handleSpeechToTextStart(event: any): void;
|
|
2379
|
+
/**
|
|
2380
|
+
* @hidden
|
|
2381
|
+
*/
|
|
2382
|
+
handleSpeechToTextEnd(event: any): void;
|
|
2383
|
+
/**
|
|
2384
|
+
* @hidden
|
|
2385
|
+
*/
|
|
2386
|
+
handleSpeechToTextError(event: SpeechToTextErrorEvent): void;
|
|
2387
|
+
/**
|
|
2388
|
+
* @hidden
|
|
2389
|
+
*/
|
|
2390
|
+
handleSpeechToTextResult(event: SpeechToTextResultEvent): void;
|
|
2391
|
+
/**
|
|
2392
|
+
* @hidden
|
|
2393
|
+
*/
|
|
2394
|
+
textFor(key: string): string;
|
|
2395
|
+
/**
|
|
2396
|
+
* @hidden
|
|
2397
|
+
*/
|
|
2398
|
+
private handleFocus;
|
|
2399
|
+
/**
|
|
2400
|
+
* @hidden
|
|
2401
|
+
*/
|
|
2402
|
+
private handleBlur;
|
|
2403
|
+
private attachResizeHandler;
|
|
2404
|
+
private captureInitialDimensions;
|
|
2405
|
+
private resize;
|
|
2406
|
+
private resizeMultiMode;
|
|
2407
|
+
private resizeAutoMode;
|
|
2408
|
+
private updateHeight;
|
|
2409
|
+
private shouldCollapse;
|
|
2410
|
+
private calculateHeight;
|
|
2411
|
+
private resetTextArea;
|
|
2412
|
+
private checkFilesListScroll;
|
|
2413
|
+
private update;
|
|
2414
|
+
private updateComponentSettings;
|
|
2415
|
+
private subscribeToSpeechToTextButton;
|
|
2416
|
+
private subscribeToActionButton;
|
|
2417
|
+
private subscribeToFileSelectButton;
|
|
2418
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptBoxComponent, never>;
|
|
2419
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptBoxComponent, "kendo-promptbox", ["kendoPromptBox"], { "disabled": { "alias": "disabled"; "required": false; }; "focusableId": { "alias": "focusableId"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "title": { "alias": "title"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "maxTextAreaHeight": { "alias": "maxTextAreaHeight"; "required": false; }; "value": { "alias": "value"; "required": false; }; "actionButton": { "alias": "actionButton"; "required": false; }; "fileSelectButton": { "alias": "fileSelectButton"; "required": false; }; "speechToTextButton": { "alias": "speechToTextButton"; "required": false; }; }, { "valueChange": "valueChange"; "onFocus": "focus"; "onBlur": "blur"; "inputFocus": "inputFocus"; "inputBlur": "inputBlur"; "promptAction": "promptAction"; "selectAttachments": "selectAttachments"; "fileRemove": "fileRemove"; "speechToTextClick": "speechToTextClick"; "speechToTextStart": "speechToTextStart"; "speechToTextEnd": "speechToTextEnd"; "speechToTextError": "speechToTextError"; "speechToTextResult": "speechToTextResult"; }, ["headerTemplate", "startAffix", "endAffix", "topAffix", "speechToTextButtonComponent", "actionButtonComponent", "fileSelectButtonComponent"], never, true, never>;
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2422
|
+
/**
|
|
2423
|
+
* @hidden
|
|
2424
|
+
*/
|
|
2425
|
+
declare abstract class ChatItem {
|
|
2426
|
+
selected: boolean;
|
|
2427
|
+
abstract focus(): void;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
/**
|
|
2431
|
+
* Represents the template for a suggestion in the Chat component.
|
|
2432
|
+
*
|
|
2433
|
+
* You can use the following field:
|
|
2434
|
+
* - `suggestion`—The suggestion instance.
|
|
2435
|
+
*
|
|
2436
|
+
* @example
|
|
2437
|
+
* ```html
|
|
2438
|
+
* <kendo-chat>
|
|
2439
|
+
* <ng-template kendoChatSuggestionTemplate let-suggestion>
|
|
2440
|
+
* {{ suggestion.text }}
|
|
2441
|
+
* </ng-template>
|
|
2442
|
+
* </kendo-chat>
|
|
2443
|
+
* ```
|
|
2444
|
+
*/
|
|
2445
|
+
declare class ChatSuggestionTemplateDirective {
|
|
2446
|
+
templateRef: TemplateRef<any>;
|
|
2447
|
+
constructor(templateRef: TemplateRef<any>);
|
|
2448
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatSuggestionTemplateDirective, never>;
|
|
2449
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChatSuggestionTemplateDirective, "[kendoChatSuggestionTemplate]", never, {}, {}, never, never, true, never>;
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2452
|
+
/**
|
|
2453
|
+
* @hidden
|
|
2454
|
+
*/
|
|
2455
|
+
type ScrollButtonActiveStateChange = {
|
|
2456
|
+
buttonType: string;
|
|
2457
|
+
active: boolean;
|
|
2458
|
+
};
|
|
2459
|
+
/**
|
|
2460
|
+
* @hidden
|
|
2461
|
+
*/
|
|
2462
|
+
declare class SuggestionsScrollService {
|
|
2463
|
+
private ngZone;
|
|
2464
|
+
private localization;
|
|
2465
|
+
owner: SuggestedActionsComponent;
|
|
2466
|
+
position: number;
|
|
2467
|
+
scrollButtonActiveStateChange: Subject<ScrollButtonActiveStateChange>;
|
|
2468
|
+
get scrollElement(): HTMLElement;
|
|
2469
|
+
get scrollContainerOverflowSize(): number;
|
|
2470
|
+
get suggestionsOverflow(): boolean;
|
|
2471
|
+
constructor(ngZone: NgZone, localization: LocalizationService);
|
|
2472
|
+
toggleScrollButtonsState(): void;
|
|
2473
|
+
onScroll(e: Event): void;
|
|
2474
|
+
scrollSuggestions(direction: string): void;
|
|
2475
|
+
updateScrollPosition(element: HTMLElement): void;
|
|
2476
|
+
calculateListPosition(direction: string, scrollSpeed: number): void;
|
|
2477
|
+
private toggleButtonActiveState;
|
|
2478
|
+
private isDisabled;
|
|
2479
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SuggestionsScrollService, never>;
|
|
2480
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SuggestionsScrollService>;
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
/**
|
|
2484
|
+
* @hidden
|
|
2485
|
+
*/
|
|
2486
|
+
type ScrollButtonType = 'prev' | 'next';
|
|
2487
|
+
|
|
2488
|
+
/**
|
|
2489
|
+
* @hidden
|
|
2490
|
+
*/
|
|
2491
|
+
declare class SuggestedActionsComponent extends ChatItem implements AfterViewInit, OnDestroy {
|
|
2492
|
+
private chatService;
|
|
2493
|
+
private localization;
|
|
2494
|
+
private scrollService;
|
|
2495
|
+
private ngZone;
|
|
2496
|
+
private renderer;
|
|
2497
|
+
get defaultClass(): boolean;
|
|
2498
|
+
get scrollableClass(): boolean;
|
|
2499
|
+
get scrollButtonsClass(): boolean;
|
|
2500
|
+
get scrollStartClass(): boolean;
|
|
2501
|
+
get scrollEndClass(): boolean;
|
|
2502
|
+
get role(): string;
|
|
2503
|
+
actions: Action[];
|
|
2504
|
+
suggestions: ChatSuggestion[];
|
|
2505
|
+
tabbable: boolean;
|
|
2506
|
+
type: 'action' | 'suggestion';
|
|
2507
|
+
suggestionTemplate: ChatSuggestionTemplateDirective;
|
|
2508
|
+
dispatchAction: EventEmitter<Action>;
|
|
2509
|
+
dispatchSuggestion: EventEmitter<ChatSuggestion>;
|
|
2510
|
+
items: QueryList<ElementRef>;
|
|
2511
|
+
suggestionsContainer: ElementRef;
|
|
2512
|
+
scrollableContainer: ElementRef;
|
|
2513
|
+
prevScrollButton: ElementRef;
|
|
2514
|
+
nextScrollButton: ElementRef;
|
|
2515
|
+
selectedIndex: number;
|
|
2516
|
+
activeIndex: number;
|
|
2517
|
+
active: boolean;
|
|
2518
|
+
isAtScrollStart: boolean;
|
|
2519
|
+
isAtScrollEnd: boolean;
|
|
2520
|
+
get isScrollable(): boolean;
|
|
2521
|
+
get hasScrollButtons(): boolean;
|
|
2522
|
+
private subscriptions;
|
|
2523
|
+
private actionKeyHandlers;
|
|
2524
|
+
private suggestionKeyHandlers;
|
|
2525
|
+
constructor(chatService: ChatService, localization: LocalizationService, scrollService: SuggestionsScrollService, ngZone: NgZone, renderer: Renderer2);
|
|
2526
|
+
ngAfterViewInit(): void;
|
|
2527
|
+
ngOnDestroy(): void;
|
|
2528
|
+
isSelected(index: number): boolean;
|
|
2529
|
+
isActive(index: number): boolean;
|
|
2530
|
+
actionClick(action: Action, index?: number): void;
|
|
2531
|
+
suggestionClick(suggestion: ChatSuggestion, index?: number): void;
|
|
2532
|
+
toggleActiveState(apply: boolean, index: number): void;
|
|
2533
|
+
actionKeydown(e: any, action: Action): void;
|
|
2534
|
+
suggestionKeydown(e: any, suggestion: ChatSuggestion): void;
|
|
2535
|
+
getScrollButtonTitle(direction: string): string;
|
|
2536
|
+
onScroll(event: Event): void;
|
|
2537
|
+
onScrollableContainerScroll(_event: Event): void;
|
|
2538
|
+
scrollSuggestions(direction: ScrollButtonType): void;
|
|
2539
|
+
focus(): void;
|
|
2540
|
+
private updateScrollableState;
|
|
2541
|
+
private toggleScrollButtonState;
|
|
2542
|
+
private changeSelectedIndex;
|
|
2543
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SuggestedActionsComponent, never>;
|
|
2544
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SuggestedActionsComponent, "kendo-chat-suggested-actions", never, { "actions": { "alias": "actions"; "required": false; }; "suggestions": { "alias": "suggestions"; "required": false; }; "tabbable": { "alias": "tabbable"; "required": false; }; "type": { "alias": "type"; "required": false; }; "suggestionTemplate": { "alias": "suggestionTemplate"; "required": false; }; }, { "dispatchAction": "dispatchAction"; "dispatchSuggestion": "dispatchSuggestion"; }, never, never, true, never>;
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
/**
|
|
2548
|
+
* Creates a container for custom content displayed at the end of the message box.
|
|
2549
|
+
*
|
|
2550
|
+
* To define a message box end affix template, nest an `<ng-template>` tag with the `kendoChatMessageBoxEndAffixTemplate` directive inside the `<kendo-chat>` tag.
|
|
2551
|
+
*
|
|
2552
|
+
* @example
|
|
2553
|
+
* ```html
|
|
2554
|
+
* <kendo-chat>
|
|
2555
|
+
* <ng-template kendoChatMessageBoxEndAffixTemplate>
|
|
2556
|
+
* <button kendoButton fillMode="flat" [svgIcon]="plusIcon"></button>
|
|
2557
|
+
* </ng-template>
|
|
2558
|
+
* </kendo-chat>
|
|
2559
|
+
* ```
|
|
2560
|
+
*/
|
|
2561
|
+
declare class ChatMessageBoxEndAffixTemplateDirective {
|
|
2562
|
+
templateRef: TemplateRef<any>;
|
|
2563
|
+
constructor(templateRef: TemplateRef<any>);
|
|
2564
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessageBoxEndAffixTemplateDirective, never>;
|
|
2565
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChatMessageBoxEndAffixTemplateDirective, "[kendoChatMessageBoxEndAffixTemplate]", never, {}, {}, never, never, true, never>;
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2568
|
+
/**
|
|
2569
|
+
* Creates a container for custom content displayed at the start of the message box.
|
|
2570
|
+
*
|
|
2571
|
+
* To define a message box start affix template, nest an `<ng-template>` tag with the `kendoChatMessageBoxStartAffixTemplate` directive inside the `<kendo-chat>` tag.
|
|
2572
|
+
*
|
|
2573
|
+
* @example
|
|
2574
|
+
* ```html
|
|
2575
|
+
* <kendo-chat>
|
|
2576
|
+
* <ng-template kendoChatMessageBoxStartAffixTemplate>
|
|
2577
|
+
* <button kendoButton fillMode="flat" [svgIcon]="plusIcon"></button>
|
|
2578
|
+
* </ng-template>
|
|
2579
|
+
* </kendo-chat>
|
|
2580
|
+
* ```
|
|
2581
|
+
*/
|
|
2582
|
+
declare class ChatMessageBoxStartAffixTemplateDirective {
|
|
2583
|
+
templateRef: TemplateRef<any>;
|
|
2584
|
+
constructor(templateRef: TemplateRef<any>);
|
|
2585
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessageBoxStartAffixTemplateDirective, never>;
|
|
2586
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChatMessageBoxStartAffixTemplateDirective, "[kendoChatMessageBoxStartAffixTemplate]", never, {}, {}, never, never, true, never>;
|
|
2587
|
+
}
|
|
2588
|
+
|
|
2589
|
+
/**
|
|
2590
|
+
* Creates a container for custom content displayed at the top of the message box when in `multi` mode.
|
|
2591
|
+
*
|
|
2592
|
+
* To define a message box top affix template, nest an `<ng-template>` tag with the `kendoChatMessageBoxTopAffixTemplate` directive inside the `<kendo-chat>` tag.
|
|
2593
|
+
*
|
|
2594
|
+
* @example
|
|
2595
|
+
* ```html
|
|
2596
|
+
* <kendo-chat>
|
|
2597
|
+
* <ng-template kendoChatMessageBoxTopAffixTemplate>
|
|
2598
|
+
* <button kendoButton fillMode="flat" [svgIcon]="plusIcon"></button>
|
|
2599
|
+
* </ng-template>
|
|
2600
|
+
* </kendo-chat>
|
|
2601
|
+
* ```
|
|
2602
|
+
*/
|
|
2603
|
+
declare class ChatMessageBoxTopAffixTemplateDirective {
|
|
2604
|
+
templateRef: TemplateRef<any>;
|
|
2605
|
+
constructor(templateRef: TemplateRef<any>);
|
|
2606
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessageBoxTopAffixTemplateDirective, never>;
|
|
2607
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ChatMessageBoxTopAffixTemplateDirective, "[kendoChatMessageBoxTopAffixTemplate]", never, {}, {}, never, never, true, never>;
|
|
2608
|
+
}
|
|
2609
|
+
|
|
2610
|
+
/**
|
|
2611
|
+
* @hidden
|
|
2612
|
+
*/
|
|
2613
|
+
declare class MessageBoxComponent implements OnInit, OnDestroy {
|
|
2614
|
+
private chatService;
|
|
2615
|
+
private cdr;
|
|
2616
|
+
private element;
|
|
2617
|
+
private renderer;
|
|
2618
|
+
borderColor: string;
|
|
2619
|
+
messageBoxWrapperClass: boolean;
|
|
2620
|
+
messageBoxInput: PromptBoxComponent;
|
|
2621
|
+
suggestedActionsComponent: SuggestedActionsComponent;
|
|
2622
|
+
authorId: string | number;
|
|
2623
|
+
autoScroll: boolean;
|
|
2624
|
+
suggestions: ChatSuggestion[];
|
|
2625
|
+
placeholder: any;
|
|
2626
|
+
inputValue: string;
|
|
2627
|
+
localization: LocalizationService;
|
|
2628
|
+
messageBoxTemplate: ChatMessageBoxTemplateDirective;
|
|
2629
|
+
messageBoxStartAffixTemplate: ChatMessageBoxStartAffixTemplateDirective;
|
|
2630
|
+
messageBoxEndAffixTemplate: ChatMessageBoxEndAffixTemplateDirective;
|
|
2631
|
+
messageBoxTopAffixTemplate: ChatMessageBoxTopAffixTemplateDirective;
|
|
2632
|
+
suggestionTemplate: ChatSuggestionTemplateDirective;
|
|
2633
|
+
loading: boolean;
|
|
2634
|
+
sendMessage: EventEmitter<any>;
|
|
2635
|
+
executeSuggestion: EventEmitter<ChatSuggestion>;
|
|
2636
|
+
fileSelect: EventEmitter<SelectEvent>;
|
|
2637
|
+
fileRemove: EventEmitter<ChatFile>;
|
|
2638
|
+
deleteIcon: SVGIcon;
|
|
2639
|
+
isListening: boolean;
|
|
2640
|
+
get reply(): Message;
|
|
2641
|
+
private selectedItem;
|
|
2642
|
+
private subs;
|
|
2643
|
+
constructor(chatService: ChatService, cdr: ChangeDetectorRef, element: ElementRef, renderer: Renderer2);
|
|
2644
|
+
ngOnInit(): void;
|
|
2645
|
+
ngOnDestroy(): void;
|
|
2646
|
+
sendClick(): void;
|
|
2647
|
+
handleSpeechResult(event: any): void;
|
|
2648
|
+
textFor(key: string): string;
|
|
2649
|
+
removeReply(): void;
|
|
2650
|
+
onReplyReferenceClick(event: Event): void;
|
|
2651
|
+
handleFileSelect(event: SelectEvent): void;
|
|
2652
|
+
handleFileRemove(file: any): void;
|
|
2653
|
+
handlePromptAction(): void;
|
|
2654
|
+
onSpeechToTextStart(): void;
|
|
2655
|
+
onSpeechToTextEnd(): void;
|
|
2656
|
+
get speechToTextButtonSettings(): SpeechToTextButtonSettings | boolean;
|
|
2657
|
+
get actionButtonSettings(): ActionButtonSettings | boolean;
|
|
2658
|
+
get fileSelectButton(): boolean | FileSelectButtonSettings;
|
|
2659
|
+
get messageBoxSettings(): MessageBoxSettings;
|
|
2660
|
+
get fileSelectButtonSettings(): FileSelectButtonSettings;
|
|
2661
|
+
get isActionButtonDisabled(): boolean;
|
|
2662
|
+
select(item: ChatItem, event?: Event): void;
|
|
2663
|
+
onBlur(args: any): void;
|
|
2664
|
+
onInputValueChange(value: string): void;
|
|
2665
|
+
dispatchSuggestion(suggestion: ChatSuggestion): void;
|
|
2666
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxComponent, never>;
|
|
2667
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageBoxComponent, "kendo-message-box", never, { "authorId": { "alias": "authorId"; "required": false; }; "autoScroll": { "alias": "autoScroll"; "required": false; }; "suggestions": { "alias": "suggestions"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "inputValue": { "alias": "inputValue"; "required": false; }; "localization": { "alias": "localization"; "required": false; }; "messageBoxTemplate": { "alias": "messageBoxTemplate"; "required": false; }; "messageBoxStartAffixTemplate": { "alias": "messageBoxStartAffixTemplate"; "required": false; }; "messageBoxEndAffixTemplate": { "alias": "messageBoxEndAffixTemplate"; "required": false; }; "messageBoxTopAffixTemplate": { "alias": "messageBoxTopAffixTemplate"; "required": false; }; "suggestionTemplate": { "alias": "suggestionTemplate"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, { "sendMessage": "sendMessage"; "executeSuggestion": "executeSuggestion"; "fileSelect": "fileSelect"; "fileRemove": "fileRemove"; }, never, never, true, never>;
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
/**
|
|
2671
|
+
* Represents the [Kendo UI Chat component for Angular](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat).
|
|
2672
|
+
*
|
|
2673
|
+
* Provides a conversational UI for chat-based applications.
|
|
2674
|
+
* Supports message templates, attachments, localization, and user actions.
|
|
2675
|
+
*
|
|
2676
|
+
* @example
|
|
2677
|
+
* ```html
|
|
2678
|
+
* <kendo-chat
|
|
2679
|
+
* [messages]="messages"
|
|
2680
|
+
* [authorId]="authorId"
|
|
2681
|
+
* (sendMessage)="onSendMessage($event)"
|
|
2682
|
+
* (executeAction)="onExecuteAction($event)">
|
|
2683
|
+
* </kendo-chat>
|
|
2684
|
+
* ```
|
|
2685
|
+
*
|
|
2686
|
+
* @remarks
|
|
2687
|
+
* Supported children components are: {@link CustomMessagesComponent}, {@link HeroCardComponent}.
|
|
2688
|
+
*/
|
|
2689
|
+
declare class ChatComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
2690
|
+
private localization;
|
|
2691
|
+
private zone;
|
|
2692
|
+
private renderer;
|
|
2693
|
+
private element;
|
|
2694
|
+
private chatService;
|
|
2695
|
+
/**
|
|
2696
|
+
* Sets the Chat messages.
|
|
2697
|
+
* Accepts an array of `Message` objects, but can also accept custom data types.
|
|
2698
|
+
* For more information, check [Data Binding](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/data-binding) section in the documentation.
|
|
2699
|
+
*/
|
|
2700
|
+
messages: any[];
|
|
2701
|
+
/**
|
|
2702
|
+
* Sets the ID that represents the local user.
|
|
2703
|
+
*/
|
|
2704
|
+
authorId: string | number;
|
|
2705
|
+
/**
|
|
2706
|
+
* Determines the type of input used in the message box.
|
|
2707
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/chat/message)).
|
|
2708
|
+
* @default 'textarea'
|
|
2709
|
+
*
|
|
2710
|
+
* @hidden
|
|
2711
|
+
*/
|
|
2712
|
+
messageBoxType: MessageBoxType;
|
|
2713
|
+
/**
|
|
2714
|
+
* Sets the height of the Chat component.
|
|
2715
|
+
* Accepts a string with CSS units (for example, `'400px'`, `'50%'`) or a number (interpreted as pixels).
|
|
2716
|
+
* The minimum height is `600px`.
|
|
2717
|
+
*/
|
|
2718
|
+
height: string | number;
|
|
2719
|
+
/**
|
|
2720
|
+
* Sets the width of the Chat component.
|
|
2721
|
+
* Accepts a string with CSS units (for example, `'400px'`, `'50%'`) or a number (interpreted as pixels).
|
|
2722
|
+
* The minimum width is `320px`.
|
|
2723
|
+
*/
|
|
2724
|
+
width: string | number;
|
|
2725
|
+
/**
|
|
2726
|
+
* Sets the placeholder text for the message input box.
|
|
2727
|
+
*/
|
|
2728
|
+
placeholder: string;
|
|
2729
|
+
/**
|
|
2730
|
+
* Controls the width of the message between the predefined options.
|
|
2731
|
+
*
|
|
2732
|
+
* @default 'standard'
|
|
2733
|
+
*/
|
|
2734
|
+
messageWidthMode: MessageWidthMode;
|
|
2735
|
+
/**
|
|
2736
|
+
* Controls the visibility of timestamps in messages.
|
|
2737
|
+
*
|
|
2738
|
+
* @default 'focus'
|
|
2739
|
+
*/
|
|
2740
|
+
timestampVisibility: TimestampVisibilityMode;
|
|
2741
|
+
/**
|
|
2742
|
+
* Controls the visibility of usernames in messages.
|
|
2743
|
+
* When set to `true`, the username displays above each message bubble.
|
|
2744
|
+
*
|
|
2745
|
+
* @default true
|
|
2746
|
+
*/
|
|
2747
|
+
showUsername: boolean;
|
|
2748
|
+
/**
|
|
2749
|
+
* Controls the avatar visibility for the messages.
|
|
2750
|
+
* When set to `true`, the user avatar displays next to each message bubble.
|
|
2751
|
+
*
|
|
2752
|
+
* @default true
|
|
2753
|
+
*/
|
|
2754
|
+
showAvatar: boolean;
|
|
2755
|
+
/**
|
|
2756
|
+
* Enables the expand or collapse functionality for messages.
|
|
2757
|
+
*
|
|
2758
|
+
* @default false
|
|
2759
|
+
*/
|
|
2760
|
+
allowMessageCollapse: boolean;
|
|
2761
|
+
/**
|
|
2762
|
+
* Sets the Speech to Text button settings.
|
|
2763
|
+
*
|
|
2764
|
+
* @default true
|
|
2765
|
+
*/
|
|
2766
|
+
speechToTextButton: boolean | SpeechToTextButtonSettings;
|
|
2767
|
+
/**
|
|
2768
|
+
* Sets the File Select Button settings.
|
|
2769
|
+
*
|
|
2770
|
+
* @default true
|
|
2771
|
+
*/
|
|
2772
|
+
fileSelectButton: boolean | FileSelectButtonSettings;
|
|
2773
|
+
/**
|
|
2774
|
+
* Sets the message box settings.
|
|
2775
|
+
*/
|
|
2776
|
+
messageBoxSettings: MessageBoxSettings;
|
|
2777
|
+
/**
|
|
2778
|
+
* Sets the actions of the message toolbar.
|
|
2779
|
+
* These actions display in the message toolbar and let you perform specific operations on the message.
|
|
2780
|
+
*
|
|
2781
|
+
* @default []
|
|
2782
|
+
*/
|
|
2783
|
+
messageToolbarActions: MessageAction[];
|
|
2784
|
+
/**
|
|
2785
|
+
* Sets the value of the Message Box.
|
|
2786
|
+
*
|
|
2787
|
+
* @default ''
|
|
2788
|
+
*/
|
|
2789
|
+
inputValue: string;
|
|
2790
|
+
/**
|
|
2791
|
+
* Sets the settings for the author's messages.
|
|
2792
|
+
*/
|
|
2793
|
+
authorMessageSettings: MessageSettings;
|
|
2794
|
+
/**
|
|
2795
|
+
* Sets the settings for the receivers' messages.
|
|
2796
|
+
*/
|
|
2797
|
+
receiverMessageSettings: MessageSettings;
|
|
2798
|
+
/**
|
|
2799
|
+
* Sets the default actions that display in the message context menu.
|
|
2800
|
+
*
|
|
2801
|
+
* @default [{ id: 'copy', label: 'Copy', icon: 'copy', svgIcon: copyIcon, disabled: false }, { id: 'reply', label: 'Reply', icon: 'undo', svgIcon: undoIcon, disabled: false }]
|
|
2802
|
+
*/
|
|
2803
|
+
defaultContextMenuActions: MessageAction[];
|
|
2804
|
+
/**
|
|
2805
|
+
* Sets the actions that display in the message as a context menu.
|
|
2806
|
+
* These actions display as menu items and let you perform specific operations on the message.
|
|
2807
|
+
* The default actions are `copy` and `reply` and are defined by their `id`.
|
|
2808
|
+
*/
|
|
2809
|
+
set messageContextMenuActions(actions: MessageAction[] | null);
|
|
2810
|
+
get messageContextMenuActions(): MessageAction[];
|
|
2811
|
+
/**
|
|
2812
|
+
* Sets the default actions that display in the file actions DropDownButton.
|
|
2813
|
+
*
|
|
2814
|
+
* @default [{ id: 'download', label: 'Download', icon: 'download', svgIcon: downloadIcon, disabled: false }]
|
|
2815
|
+
*/
|
|
2816
|
+
defaultFileActions: FileAction[];
|
|
2817
|
+
/**
|
|
2818
|
+
* Sets the actions that display in the file as items of a DropDownButton.
|
|
2819
|
+
* These actions display when you click the file DropDownButton and let you perform specific operations on the file.
|
|
2820
|
+
* The default action is `download` and is defined by its `id`.
|
|
2821
|
+
*
|
|
2822
|
+
* @default [{ id: 'download', label: 'Download', icon: 'download', svgIcon: downloadIcon, disabled: false }]
|
|
2823
|
+
*/
|
|
2824
|
+
set fileActions(actions: FileAction[] | null);
|
|
2825
|
+
get fileActions(): FileAction[];
|
|
2826
|
+
/**
|
|
2827
|
+
* Sets the layout of the files in the message bubble.
|
|
2828
|
+
*
|
|
2829
|
+
* @default 'vertical'
|
|
2830
|
+
*/
|
|
2831
|
+
set messageFilesLayout(layout: FilesLayoutMode);
|
|
2832
|
+
/**
|
|
2833
|
+
* Sets the layout of the suggestions above the message input box.
|
|
2834
|
+
*
|
|
2835
|
+
* @default 'scroll'
|
|
2836
|
+
*/
|
|
2837
|
+
set suggestionsLayout(layoutMode: SuggestionsLayoutMode);
|
|
2838
|
+
/**
|
|
2839
|
+
* Sets the layout of the quick actions suggested below the messages.
|
|
2840
|
+
*
|
|
2841
|
+
* @default 'scroll'
|
|
2842
|
+
*/
|
|
2843
|
+
set quickActionsLayout(layoutMode: QuickActionsLayoutMode);
|
|
2844
|
+
/**
|
|
2845
|
+
* Sets the suggestions that display in the message input box.
|
|
2846
|
+
* Suggestions display as a list of clickable items that let you quickly insert predefined text into the message input.
|
|
2847
|
+
*
|
|
2848
|
+
* @default []
|
|
2849
|
+
*/
|
|
2850
|
+
suggestions: ChatSuggestion[];
|
|
2851
|
+
/**
|
|
2852
|
+
* Sets the send button settings for the Chat component.
|
|
2853
|
+
* Allows customization of the send button appearance, icons and disabled state.
|
|
2854
|
+
*
|
|
2855
|
+
* @default true
|
|
2856
|
+
*/
|
|
2857
|
+
sendButton: boolean | SendButtonSettings;
|
|
2858
|
+
/**
|
|
2859
|
+
* @hidden
|
|
2860
|
+
*/
|
|
2861
|
+
set sendButtonSettings(value: boolean | SendButtonSettings);
|
|
2862
|
+
get sendButtonSettings(): boolean | SendButtonSettings;
|
|
2863
|
+
/**
|
|
2864
|
+
* Controls the scrolling behavior of the message list.
|
|
2865
|
+
*
|
|
2866
|
+
* @default 'scrollable'
|
|
2867
|
+
*/
|
|
2868
|
+
scrollMode: ScrollMode;
|
|
2869
|
+
/**
|
|
2870
|
+
* Sets the number of messages loaded per page in endless scroll mode.
|
|
2871
|
+
* Ignored in `scrollable` mode.
|
|
2872
|
+
*
|
|
2873
|
+
* @default 50
|
|
2874
|
+
*/
|
|
2875
|
+
pageSize: number;
|
|
2876
|
+
/**
|
|
2877
|
+
* Sets the minimum distance from the top of the visible message area that prevents auto-scrolling when a new receiver message arrives.
|
|
2878
|
+
* Accepts a percentage string (for example, `'30%'`) or a pixel value as a number. Set to `0` to always auto-scroll to new messages.
|
|
2879
|
+
*
|
|
2880
|
+
* Has no effect on author messages, which always scroll to the bottom.
|
|
2881
|
+
*
|
|
2882
|
+
* For more details, refer to the [Auto-Scroll Threshold](slug:scroll_modes_chat#auto-scroll-threshold) article.
|
|
2883
|
+
*
|
|
2884
|
+
* @default '20%'
|
|
2885
|
+
*/
|
|
2886
|
+
autoScrollThreshold: number | string;
|
|
2887
|
+
/**
|
|
2888
|
+
* Sets the total number of messages in the conversation when using endless scrolling with remote data source. For more details, refer to the [Endless Scrolling with Remote Data](slug:scroll_modes_chat#remote-data) section in the documentation.
|
|
2889
|
+
*/
|
|
2890
|
+
total: number;
|
|
2891
|
+
/**
|
|
2892
|
+
* Sets the index of the first message in the currently loaded batch within the full conversation.
|
|
2893
|
+
* Used with remote data sources in endless scroll mode to compute the range for the next [`loadMore`](slug:api_conversational-ui_chatcomponent#loadMore) call.
|
|
2894
|
+
* For more details, refer to the [Endless Scrolling with Remote Data](slug:scroll_modes_chat#remote-data) section in the documentation.
|
|
2895
|
+
*/
|
|
2896
|
+
startIndex: number;
|
|
2897
|
+
/**
|
|
2898
|
+
* Sets the exclusive end index of the currently loaded batch within the full conversation.
|
|
2899
|
+
* Used with remote data sources in endless scroll mode to determine whether more messages exist beyond the current batch.
|
|
2900
|
+
* For more details, refer to the [Endless Scrolling with Remote Data](slug:scroll_modes_chat#remote-data) section in the documentation.
|
|
2901
|
+
*/
|
|
2902
|
+
endIndex: number;
|
|
2903
|
+
/**
|
|
2904
|
+
* Sets the full set of pinned messages in the conversation.
|
|
2905
|
+
* Used with remote data sources in endless scroll mode to render the pinned message indicator when the pinned message is outside the currently loaded batch.
|
|
2906
|
+
* For more details, refer to the [Endless Scrolling with Remote Data](slug:scroll_modes_chat#remote-data) section in the documentation.
|
|
2907
|
+
*
|
|
2908
|
+
* @default []
|
|
2909
|
+
*/
|
|
2910
|
+
pinnedMessages: Message[];
|
|
2911
|
+
/**
|
|
2912
|
+
* Sets the messages that serve as reply targets for messages in the currently loaded batch but exist outside it.
|
|
2913
|
+
* Used with remote data sources in endless scroll mode to render reply previews when the replied-to message is not in the current batch.
|
|
2914
|
+
* For more details, refer to the [Endless Scrolling with Remote Data](slug:scroll_modes_chat#remote-data) section in the documentation.
|
|
2915
|
+
*
|
|
2916
|
+
* @default []
|
|
2917
|
+
*/
|
|
2918
|
+
repliedToMessages: Message[];
|
|
2919
|
+
/**
|
|
2920
|
+
* Sets the names of the model fields from which the Chat reads its data.
|
|
2921
|
+
* Lets you map custom data types to the expected `Message` format.
|
|
2922
|
+
*/
|
|
2923
|
+
set modelFields(value: ConversationalUIModelFields);
|
|
2924
|
+
get modelFields(): ConversationalUIModelFields;
|
|
2925
|
+
/**
|
|
2926
|
+
* Controls whether a scroll to bottom button is rendered at the bottom of the Chat. Displayed only when the user has scrolled the component upward.
|
|
2927
|
+
*
|
|
2928
|
+
* @default true
|
|
2929
|
+
*/
|
|
2930
|
+
scrollToBottomButton: boolean;
|
|
2931
|
+
/**
|
|
2932
|
+
* Sets the loading state of the Chat component.
|
|
2933
|
+
* When set to `true`, a loading button is displayed instead of the send button.
|
|
2934
|
+
*
|
|
2935
|
+
* @default false
|
|
2936
|
+
*/
|
|
2937
|
+
loading: boolean;
|
|
2938
|
+
/**
|
|
2939
|
+
* Fires when the user sends a message by clicking the **Send** button or pressing **Enter**.
|
|
2940
|
+
*
|
|
2941
|
+
* The message is not automatically added to the `messages` array.
|
|
2942
|
+
*/
|
|
2943
|
+
sendMessage: EventEmitter<SendMessageEvent>;
|
|
2944
|
+
/**
|
|
2945
|
+
* Fires when the user clicks the resend button on a failed message.
|
|
2946
|
+
*/
|
|
2947
|
+
resendMessage: EventEmitter<ResendMessageEvent>;
|
|
2948
|
+
/**
|
|
2949
|
+
* Fires when the user clicks a quick action button in the message toolbar.
|
|
2950
|
+
*/
|
|
2951
|
+
toolbarActionClick: EventEmitter<MessageActionEvent>;
|
|
2952
|
+
/**
|
|
2953
|
+
* Fires when the user clicks an action in the message context menu.
|
|
2954
|
+
*/
|
|
2955
|
+
contextMenuActionClick: EventEmitter<MessageActionEvent>;
|
|
2956
|
+
/**
|
|
2957
|
+
* Fires when the user clicks an action in the file context menu.
|
|
2958
|
+
*/
|
|
2959
|
+
fileActionClick: EventEmitter<FileActionEvent>;
|
|
2960
|
+
/**
|
|
2961
|
+
* Fires when the user clicks an action in the file context menu.
|
|
2962
|
+
*/
|
|
2963
|
+
download: EventEmitter<FileDownloadEvent>;
|
|
2964
|
+
/**
|
|
2965
|
+
* Fires when the user clicks a quick action button.
|
|
2966
|
+
* The Chat internally handles [known actions](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/api/actiontype) such as `reply`, `openUrl`, and `call`.
|
|
2967
|
+
*
|
|
2968
|
+
* The event is preventable. Calling [`preventDefault`](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault) suppresses the built-in action.
|
|
2969
|
+
*/
|
|
2970
|
+
executeAction: EventEmitter<ExecuteActionEvent>;
|
|
2971
|
+
/**
|
|
2972
|
+
* Fires when the user clicks a suggestion in the message input box.
|
|
2973
|
+
*/
|
|
2974
|
+
suggestionExecute: EventEmitter<ChatSuggestion>;
|
|
2975
|
+
/**
|
|
2976
|
+
* Fires when the user selects a file in the message input box.
|
|
2977
|
+
*/
|
|
2978
|
+
fileSelect: EventEmitter<SelectEvent>;
|
|
2979
|
+
/**
|
|
2980
|
+
* Fires when the user removes a file from the message input box.
|
|
2981
|
+
*/
|
|
2982
|
+
fileRemove: EventEmitter<ChatFile>;
|
|
2983
|
+
/**
|
|
2984
|
+
* Fires when the user unpins the pinned message.
|
|
2985
|
+
* This event triggers when the user clicks the delete button on the pinned message.
|
|
2986
|
+
*/
|
|
2987
|
+
unpin: EventEmitter<Message>;
|
|
2988
|
+
/**
|
|
2989
|
+
* Fires when the user types in the message input box.
|
|
2990
|
+
*/
|
|
2991
|
+
inputValueChange: EventEmitter<string>;
|
|
2992
|
+
/**
|
|
2993
|
+
* Fires when the user scrolls near the edge of the rendered message window in endless scroll mode.
|
|
2994
|
+
*/
|
|
2995
|
+
loadMore: EventEmitter<ChatLoadMoreEvent>;
|
|
2996
|
+
/**
|
|
2997
|
+
* Fires when the user clicks a referenced message (pinned indicator or reply preview).
|
|
2998
|
+
*/
|
|
2999
|
+
referencedMessageClick: EventEmitter<ChatReferencedMessageClickEvent>;
|
|
3000
|
+
get className(): string;
|
|
3001
|
+
get dirAttr(): string;
|
|
3002
|
+
set messagesContextMenu(contextMenu: ContextMenuComponent);
|
|
3003
|
+
attachmentTemplate: AttachmentTemplateDirective;
|
|
3004
|
+
chatHeaderTemplate: ChatHeaderTemplateDirective;
|
|
3005
|
+
chatNoDataTemplate: NoDataTemplateDirective;
|
|
3006
|
+
authorMessageContentTemplate: AuthorMessageContentTemplateDirective;
|
|
3007
|
+
receiverMessageContentTemplate: ReceiverMessageContentTemplateDirective;
|
|
3008
|
+
messageContentTemplate: MessageContentTemplateDirective;
|
|
3009
|
+
authorMessageTemplate: AuthorMessageTemplateDirective;
|
|
3010
|
+
receiverMessageTemplate: ReceiverMessageTemplateDirective;
|
|
3011
|
+
messageTemplate: MessageTemplateDirective;
|
|
3012
|
+
timestampTemplate: ChatTimestampTemplateDirective;
|
|
3013
|
+
suggestionTemplate: ChatSuggestionTemplateDirective;
|
|
3014
|
+
statusTemplate: ChatStatusTemplateDirective;
|
|
3015
|
+
messageBoxTemplate: ChatMessageBoxTemplateDirective;
|
|
3016
|
+
messageBoxStartAffixTemplate: ChatMessageBoxStartAffixTemplateDirective;
|
|
3017
|
+
messageBoxEndAffixTemplate: ChatMessageBoxEndAffixTemplateDirective;
|
|
3018
|
+
messageBoxTopAffixTemplate: ChatMessageBoxTopAffixTemplateDirective;
|
|
3019
|
+
userStatusTemplate: ChatUserStatusTemplateDirective;
|
|
3020
|
+
messageBox: MessageBoxComponent;
|
|
3021
|
+
/**
|
|
3022
|
+
* @hidden
|
|
3023
|
+
*/
|
|
3024
|
+
messageList: ViewContainerRef;
|
|
3025
|
+
/**
|
|
3026
|
+
* @hidden
|
|
3027
|
+
* Returns processed messages when model fields are used, otherwise returns original messages.
|
|
3028
|
+
*/
|
|
3029
|
+
get processedMessages(): Message[];
|
|
3030
|
+
/**
|
|
3031
|
+
* @hidden
|
|
3032
|
+
* Returns `true` when the Chat is in remote endless scroll mode.
|
|
3033
|
+
* Remote mode is active whenever the consumer provides a `total`.
|
|
3034
|
+
*/
|
|
3035
|
+
get isRemoteMode(): boolean;
|
|
3036
|
+
/**
|
|
3037
|
+
* @hidden
|
|
3038
|
+
* Returns the messages to render — sliced in endless mode, full in scrollable mode.
|
|
3039
|
+
* In remote mode, returns processedMessages as-is (consumer already provides only the current batch).
|
|
3040
|
+
*/
|
|
3041
|
+
get renderedMessages(): Message[];
|
|
3042
|
+
/**
|
|
3043
|
+
* @hidden
|
|
3044
|
+
*/
|
|
3045
|
+
isOwnMessage(message: Message): boolean;
|
|
3046
|
+
/**
|
|
3047
|
+
* Gets the actions available in the message context menu.
|
|
3048
|
+
*
|
|
3049
|
+
* @hidden
|
|
3050
|
+
*/
|
|
3051
|
+
get contextMenuActions(): any[];
|
|
3052
|
+
/**
|
|
3053
|
+
* @hidden
|
|
3054
|
+
*/
|
|
3055
|
+
get localizationText(): LocalizationService;
|
|
3056
|
+
/**
|
|
3057
|
+
* @hidden
|
|
3058
|
+
*/
|
|
3059
|
+
autoScroll: boolean;
|
|
3060
|
+
/**
|
|
3061
|
+
* @hidden
|
|
3062
|
+
*/
|
|
3063
|
+
pinIcon: SVGIcon;
|
|
3064
|
+
/**
|
|
3065
|
+
* @hidden
|
|
3066
|
+
*/
|
|
3067
|
+
deleteIcon: SVGIcon;
|
|
3068
|
+
/**
|
|
3069
|
+
* @hidden
|
|
3070
|
+
*/
|
|
3071
|
+
pinnedMessage: Message;
|
|
3072
|
+
/**
|
|
3073
|
+
* @hidden
|
|
3074
|
+
*/
|
|
3075
|
+
scrollToBottomIcon: SVGIcon;
|
|
3076
|
+
/**
|
|
3077
|
+
* @hidden
|
|
3078
|
+
*/
|
|
3079
|
+
endlessState: EndlessScrollState;
|
|
3080
|
+
/**
|
|
3081
|
+
* @hidden
|
|
3082
|
+
*/
|
|
3083
|
+
showLicenseWatermark: boolean;
|
|
3084
|
+
/**
|
|
3085
|
+
* @hidden
|
|
3086
|
+
*/
|
|
3087
|
+
licenseMessage?: LicenseMessage;
|
|
3088
|
+
private anchor;
|
|
3089
|
+
private direction;
|
|
3090
|
+
private subs;
|
|
3091
|
+
private _modelFields;
|
|
3092
|
+
private _messageContextMenuActions;
|
|
3093
|
+
private _fileActions;
|
|
3094
|
+
private _cachedProcessedMessages;
|
|
3095
|
+
private _lastMessagesReference;
|
|
3096
|
+
private _lastModelFields;
|
|
3097
|
+
private _cachedContextMenuActions;
|
|
3098
|
+
private _lastContextMenuActionsReference;
|
|
3099
|
+
private _previousMessagesLength;
|
|
3100
|
+
private _previousLastMessageId;
|
|
3101
|
+
private _hasProcessedMessages;
|
|
3102
|
+
private _pendingScrollAction;
|
|
3103
|
+
private _scrollHandledBeforePaint;
|
|
3104
|
+
private _lastNewMessageId;
|
|
3105
|
+
private _cachedRenderedMessages;
|
|
3106
|
+
private _renderedMessagesSource;
|
|
3107
|
+
private _renderedMessagesStart;
|
|
3108
|
+
private _renderedMessagesEnd;
|
|
3109
|
+
private _pendingRemoteScrollToMessageId;
|
|
3110
|
+
private _remoteScrollToBottom;
|
|
3111
|
+
constructor(localization: LocalizationService, zone: NgZone, renderer: Renderer2, element: ElementRef, chatService: ChatService);
|
|
3112
|
+
/**
|
|
3113
|
+
* @hidden
|
|
3114
|
+
*/
|
|
3115
|
+
ngOnInit(): void;
|
|
3116
|
+
/**
|
|
3117
|
+
* @hidden
|
|
3118
|
+
*/
|
|
3119
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
3120
|
+
/**
|
|
3121
|
+
* @hidden
|
|
3122
|
+
*/
|
|
3123
|
+
ngAfterViewInit(): void;
|
|
3124
|
+
/**
|
|
3125
|
+
* @hidden
|
|
3126
|
+
*/
|
|
3127
|
+
ngOnDestroy(): void;
|
|
3128
|
+
/**
|
|
3129
|
+
* @hidden
|
|
3130
|
+
*/
|
|
3131
|
+
dispatchAction(e: ExecuteActionEvent): void;
|
|
3132
|
+
/**
|
|
3133
|
+
* @hidden
|
|
3134
|
+
*/
|
|
3135
|
+
textFor(key: string): string;
|
|
3136
|
+
/**
|
|
3137
|
+
* @hidden
|
|
3138
|
+
*/
|
|
3139
|
+
scrollToPinnedMessage(event?: MouseEvent): void;
|
|
3140
|
+
/**
|
|
3141
|
+
* @hidden
|
|
3142
|
+
*/
|
|
3143
|
+
onNearTop(): void;
|
|
3144
|
+
/**
|
|
3145
|
+
* @hidden
|
|
3146
|
+
*/
|
|
3147
|
+
onNearBottom(): void;
|
|
3148
|
+
/**
|
|
3149
|
+
* @hidden
|
|
3150
|
+
*/
|
|
3151
|
+
onScrollToBottomClick(): void;
|
|
3152
|
+
/**
|
|
3153
|
+
* @hidden
|
|
3154
|
+
*/
|
|
3155
|
+
handleReferencedMessageClick(messageId: string | number, type: 'pinned' | 'reply'): void;
|
|
3156
|
+
/**
|
|
3157
|
+
* @hidden
|
|
3158
|
+
*/
|
|
3159
|
+
onContextMenuAction(action: MessageAction): void;
|
|
3160
|
+
/**
|
|
3161
|
+
* @hidden
|
|
3162
|
+
*/
|
|
3163
|
+
handleMenuClose(event: ContextMenuPopupEvent): void;
|
|
3164
|
+
/**
|
|
3165
|
+
* @hidden
|
|
3166
|
+
*/
|
|
3167
|
+
onActionButtonClick(event: MouseEvent): void;
|
|
3168
|
+
/**
|
|
3169
|
+
* @hidden
|
|
3170
|
+
*/
|
|
3171
|
+
onMessageListResize(): void;
|
|
3172
|
+
/**
|
|
3173
|
+
* Schedules the new-message scroll adjustment on zone.onStable so it runs
|
|
3174
|
+
* after Angular renders the new DOM but before the browser paints,
|
|
3175
|
+
* preventing a visible intermediate frame.
|
|
3176
|
+
*/
|
|
3177
|
+
private scheduleNewMessageScroll;
|
|
3178
|
+
private detectNewMessageScrollAction;
|
|
3179
|
+
private getLastNewMessageElement;
|
|
3180
|
+
private findLastPinnedMessage;
|
|
3181
|
+
private initEndlessScroll;
|
|
3182
|
+
private handleMessagesChange;
|
|
3183
|
+
private handleRemoteMessagesChange;
|
|
3184
|
+
private handleRemoteReferencedMessageClick;
|
|
3185
|
+
private handlePendingRemoteScroll;
|
|
3186
|
+
private updateChatServiceProperties;
|
|
3187
|
+
private validateRemoteInputs;
|
|
3188
|
+
private mergeWithDefaultActions;
|
|
3189
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatComponent, never>;
|
|
3190
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatComponent, "kendo-chat", never, { "messages": { "alias": "messages"; "required": false; }; "authorId": { "alias": "authorId"; "required": false; }; "messageBoxType": { "alias": "messageBoxType"; "required": false; }; "height": { "alias": "height"; "required": false; }; "width": { "alias": "width"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "messageWidthMode": { "alias": "messageWidthMode"; "required": false; }; "timestampVisibility": { "alias": "timestampVisibility"; "required": false; }; "showUsername": { "alias": "showUsername"; "required": false; }; "showAvatar": { "alias": "showAvatar"; "required": false; }; "allowMessageCollapse": { "alias": "allowMessageCollapse"; "required": false; }; "speechToTextButton": { "alias": "speechToTextButton"; "required": false; }; "fileSelectButton": { "alias": "fileSelectButton"; "required": false; }; "messageBoxSettings": { "alias": "messageBoxSettings"; "required": false; }; "messageToolbarActions": { "alias": "messageToolbarActions"; "required": false; }; "inputValue": { "alias": "inputValue"; "required": false; }; "authorMessageSettings": { "alias": "authorMessageSettings"; "required": false; }; "receiverMessageSettings": { "alias": "receiverMessageSettings"; "required": false; }; "messageContextMenuActions": { "alias": "messageContextMenuActions"; "required": false; }; "fileActions": { "alias": "fileActions"; "required": false; }; "messageFilesLayout": { "alias": "messageFilesLayout"; "required": false; }; "suggestionsLayout": { "alias": "suggestionsLayout"; "required": false; }; "quickActionsLayout": { "alias": "quickActionsLayout"; "required": false; }; "suggestions": { "alias": "suggestions"; "required": false; }; "sendButton": { "alias": "sendButton"; "required": false; }; "sendButtonSettings": { "alias": "sendButtonSettings"; "required": false; }; "scrollMode": { "alias": "scrollMode"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "autoScrollThreshold": { "alias": "autoScrollThreshold"; "required": false; }; "total": { "alias": "total"; "required": false; }; "startIndex": { "alias": "startIndex"; "required": false; }; "endIndex": { "alias": "endIndex"; "required": false; }; "pinnedMessages": { "alias": "pinnedMessages"; "required": false; }; "repliedToMessages": { "alias": "repliedToMessages"; "required": false; }; "modelFields": { "alias": "modelFields"; "required": false; }; "scrollToBottomButton": { "alias": "scrollToBottomButton"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, { "sendMessage": "sendMessage"; "resendMessage": "resendMessage"; "toolbarActionClick": "toolbarActionClick"; "contextMenuActionClick": "contextMenuActionClick"; "fileActionClick": "fileActionClick"; "download": "download"; "executeAction": "executeAction"; "suggestionExecute": "suggestionExecute"; "fileSelect": "fileSelect"; "fileRemove": "fileRemove"; "unpin": "unpin"; "inputValueChange": "inputValueChange"; "loadMore": "loadMore"; "referencedMessageClick": "referencedMessageClick"; }, ["attachmentTemplate", "chatHeaderTemplate", "chatNoDataTemplate", "authorMessageContentTemplate", "receiverMessageContentTemplate", "messageContentTemplate", "authorMessageTemplate", "receiverMessageTemplate", "messageTemplate", "timestampTemplate", "suggestionTemplate", "statusTemplate", "messageBoxTemplate", "messageBoxStartAffixTemplate", "messageBoxEndAffixTemplate", "messageBoxTopAffixTemplate", "userStatusTemplate"], never, true, never>;
|
|
3191
|
+
}
|
|
3192
|
+
|
|
3193
|
+
/**
|
|
3194
|
+
* @hidden
|
|
3195
|
+
*/
|
|
3196
|
+
declare class Messages$2 extends ComponentMessages {
|
|
3197
|
+
/**
|
|
3198
|
+
* Sets the text that displays when the sender deletes a message.
|
|
3199
|
+
*/
|
|
3200
|
+
deletedMessageSenderText: string;
|
|
3201
|
+
/**
|
|
3202
|
+
* Sets the text that displays when the receiver deletes a message.
|
|
3203
|
+
*/
|
|
3204
|
+
deletedMessageReceiverText: string;
|
|
3205
|
+
/**
|
|
3206
|
+
* Sets the text that displays when a message fails to send.
|
|
3207
|
+
*/
|
|
3208
|
+
messageFailedText: string;
|
|
3209
|
+
/**
|
|
3210
|
+
* Sets the text that displays in the download section of the message.
|
|
3211
|
+
* This message displays below all files in the message.
|
|
3212
|
+
*/
|
|
3213
|
+
downloadAllFilesText: string;
|
|
3214
|
+
/**
|
|
3215
|
+
* Sets the placeholder text for the message text input.
|
|
3216
|
+
*/
|
|
3217
|
+
messagePlaceholder: string;
|
|
3218
|
+
/**
|
|
3219
|
+
* Sets the aria-label for the internal input/textarea element.
|
|
3220
|
+
*/
|
|
3221
|
+
messageBoxTitle: string;
|
|
3222
|
+
/**
|
|
3223
|
+
* Sets the text for the **Action** button.
|
|
3224
|
+
*/
|
|
3225
|
+
actionButtonTitle: string;
|
|
3226
|
+
/**
|
|
3227
|
+
* Sets the label for the message list.
|
|
3228
|
+
*/
|
|
3229
|
+
messageListLabel: string;
|
|
3230
|
+
/**
|
|
3231
|
+
* Sets the label for the message input box.
|
|
3232
|
+
*/
|
|
3233
|
+
messageBoxInputLabel: string;
|
|
3234
|
+
/**
|
|
3235
|
+
* Sets the text for the left arrow of the message attachments.
|
|
3236
|
+
*/
|
|
3237
|
+
messageAttachmentLeftArrow: string;
|
|
3238
|
+
/**
|
|
3239
|
+
* Sets the text for the right arrow of the message attachments.
|
|
3240
|
+
*/
|
|
3241
|
+
messageAttachmentRightArrow: string;
|
|
3242
|
+
/**
|
|
3243
|
+
* Sets the Speech to Text button title.
|
|
3244
|
+
*/
|
|
3245
|
+
speechToTextButtonTitle: string;
|
|
3246
|
+
/**
|
|
3247
|
+
* Sets the File Select button title.
|
|
3248
|
+
*/
|
|
3249
|
+
fileSelectButtonTitle: string;
|
|
3250
|
+
/**
|
|
3251
|
+
* Sets the title of the icon that removes the reply reference in the Message Box.
|
|
3252
|
+
*/
|
|
3253
|
+
removeReplyTitle: string;
|
|
3254
|
+
/**
|
|
3255
|
+
* Sets the title of the icon that removes a selected file in the Message Box.
|
|
3256
|
+
*/
|
|
3257
|
+
removeFileTitle: string;
|
|
3258
|
+
/**
|
|
3259
|
+
* Sets the title of the icon that shows the message can expand.
|
|
3260
|
+
*/
|
|
3261
|
+
expandTitle: string;
|
|
3262
|
+
/**
|
|
3263
|
+
* Sets the title of the icon that shows the message can collapse.
|
|
3264
|
+
*/
|
|
3265
|
+
collapseTitle: string;
|
|
3266
|
+
/**
|
|
3267
|
+
* Sets the title of the DropDownButton that opens the File actions.
|
|
3268
|
+
*/
|
|
3269
|
+
fileActionsTitle: string;
|
|
3270
|
+
/**
|
|
3271
|
+
* Sets the title of the button that shows the **Scroll right** when the suggestions list is scrollable with buttons.
|
|
3272
|
+
*/
|
|
3273
|
+
nextSuggestionsButtonTitle: string;
|
|
3274
|
+
/**
|
|
3275
|
+
* Sets the title of the button that shows the **Scroll left** when the suggestions list is scrollable with buttons.
|
|
3276
|
+
*/
|
|
3277
|
+
previousSuggestionsButtonTitle: string;
|
|
3278
|
+
/**
|
|
3279
|
+
* Sets the title of the button that unpins a pinned message.
|
|
3280
|
+
*/
|
|
3281
|
+
unpinMessageTitle: string;
|
|
3282
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Messages$2, never>;
|
|
3283
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages$2, "kendoConversationalUIMessages", never, { "deletedMessageSenderText": { "alias": "deletedMessageSenderText"; "required": false; }; "deletedMessageReceiverText": { "alias": "deletedMessageReceiverText"; "required": false; }; "messageFailedText": { "alias": "messageFailedText"; "required": false; }; "downloadAllFilesText": { "alias": "downloadAllFilesText"; "required": false; }; "messagePlaceholder": { "alias": "messagePlaceholder"; "required": false; }; "messageBoxTitle": { "alias": "messageBoxTitle"; "required": false; }; "actionButtonTitle": { "alias": "actionButtonTitle"; "required": false; }; "messageListLabel": { "alias": "messageListLabel"; "required": false; }; "messageBoxInputLabel": { "alias": "messageBoxInputLabel"; "required": false; }; "messageAttachmentLeftArrow": { "alias": "messageAttachmentLeftArrow"; "required": false; }; "messageAttachmentRightArrow": { "alias": "messageAttachmentRightArrow"; "required": false; }; "speechToTextButtonTitle": { "alias": "speechToTextButtonTitle"; "required": false; }; "fileSelectButtonTitle": { "alias": "fileSelectButtonTitle"; "required": false; }; "removeReplyTitle": { "alias": "removeReplyTitle"; "required": false; }; "removeFileTitle": { "alias": "removeFileTitle"; "required": false; }; "expandTitle": { "alias": "expandTitle"; "required": false; }; "collapseTitle": { "alias": "collapseTitle"; "required": false; }; "fileActionsTitle": { "alias": "fileActionsTitle"; "required": false; }; "nextSuggestionsButtonTitle": { "alias": "nextSuggestionsButtonTitle"; "required": false; }; "previousSuggestionsButtonTitle": { "alias": "previousSuggestionsButtonTitle"; "required": false; }; "unpinMessageTitle": { "alias": "unpinMessageTitle"; "required": false; }; }, {}, never, never, true, never>;
|
|
3284
|
+
}
|
|
3285
|
+
|
|
3286
|
+
/**
|
|
3287
|
+
* Represents the custom messages component of the Chat.
|
|
3288
|
+
*
|
|
3289
|
+
* Use this component to override default messages for the Chat
|
|
3290
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/globalization#custom-messages)).
|
|
3291
|
+
*
|
|
3292
|
+
* @example
|
|
3293
|
+
* ```html
|
|
3294
|
+
* <kendo-chat-messages
|
|
3295
|
+
* send="Send Message"
|
|
3296
|
+
* messagePlaceholder="Type here...">
|
|
3297
|
+
* </kendo-chat-messages>
|
|
3298
|
+
* ```
|
|
3299
|
+
*/
|
|
3300
|
+
declare class CustomMessagesComponent extends Messages$2 {
|
|
3301
|
+
protected service: LocalizationService;
|
|
3302
|
+
constructor(service: LocalizationService);
|
|
3303
|
+
protected get override(): boolean;
|
|
3304
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomMessagesComponent, never>;
|
|
3305
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomMessagesComponent, "kendo-chat-messages", never, {}, {}, never, never, true, never>;
|
|
3306
|
+
}
|
|
3307
|
+
|
|
3308
|
+
/**
|
|
3309
|
+
* Represents a Hero Card component.
|
|
3310
|
+
* Hero cards display a single large image and action buttons with text content.
|
|
3311
|
+
*
|
|
3312
|
+
* @example
|
|
3313
|
+
* ```html
|
|
3314
|
+
* <kendo-chat-hero-card
|
|
3315
|
+
* title="Card Title"
|
|
3316
|
+
* subtitle="Card Subtitle"
|
|
3317
|
+
* [actions]="actions">
|
|
3318
|
+
* </kendo-chat-hero-card>
|
|
3319
|
+
* ```
|
|
3320
|
+
*/
|
|
3321
|
+
declare class HeroCardComponent {
|
|
3322
|
+
/**
|
|
3323
|
+
* Sets the URL of the hero card image.
|
|
3324
|
+
*/
|
|
3325
|
+
imageUrl: string;
|
|
3326
|
+
/**
|
|
3327
|
+
* Sets the title text displayed in the hero card.
|
|
3328
|
+
*/
|
|
3329
|
+
title: string;
|
|
3330
|
+
/**
|
|
3331
|
+
* Sets the subtitle text displayed below the title.
|
|
3332
|
+
*/
|
|
3333
|
+
subtitle: string;
|
|
3334
|
+
/**
|
|
3335
|
+
* Sets the array of quick actions displayed as buttons.
|
|
3336
|
+
*/
|
|
3337
|
+
actions: Action[];
|
|
3338
|
+
cssClass: boolean;
|
|
3339
|
+
/**
|
|
3340
|
+
* Fires when the user clicks an action button.
|
|
3341
|
+
*/
|
|
3342
|
+
executeAction: EventEmitter<Action>;
|
|
3343
|
+
/**
|
|
3344
|
+
* Emits the `executeAction` event when you click an action button.
|
|
3345
|
+
*/
|
|
3346
|
+
onClick(action: any): void;
|
|
3347
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeroCardComponent, never>;
|
|
3348
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HeroCardComponent, "kendo-chat-hero-card", never, { "imageUrl": { "alias": "imageUrl"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; }, { "executeAction": "executeAction"; }, never, never, true, never>;
|
|
3349
|
+
}
|
|
3350
|
+
|
|
3351
|
+
/**
|
|
3352
|
+
* Represents the [`NgModule`](link:site.data.urls.angular['ngmodules']) for the Chat component.
|
|
3353
|
+
*
|
|
3354
|
+
* @example
|
|
3355
|
+
* ```ts-no-run
|
|
3356
|
+
* import { NgModule } from '@angular/core';
|
|
3357
|
+
* import { Component } from '@angular/core';
|
|
3358
|
+
* import { BrowserModule } from '@angular/platform-browser';
|
|
3359
|
+
*
|
|
3360
|
+
* import { ChatModule } from '@progress/kendo-angular-conversational-ui';
|
|
3361
|
+
* import { AppComponent } from './app.component';
|
|
3362
|
+
*
|
|
3363
|
+
* _@NgModule({
|
|
3364
|
+
* imports: [BrowserModule, ChatModule],
|
|
3365
|
+
* declarations: [AppComponent],
|
|
3366
|
+
* bootstrap: [AppComponent]
|
|
3367
|
+
* })
|
|
3368
|
+
*
|
|
3369
|
+
* export class AppModule { }
|
|
3370
|
+
* ```
|
|
3371
|
+
*/
|
|
3372
|
+
declare class ChatModule {
|
|
3373
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatModule, never>;
|
|
3374
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ChatModule, never, [typeof ChatComponent, typeof CustomMessagesComponent, typeof AttachmentTemplateDirective, typeof AuthorMessageContentTemplateDirective, typeof ReceiverMessageContentTemplateDirective, typeof MessageContentTemplateDirective, typeof AuthorMessageTemplateDirective, typeof ReceiverMessageTemplateDirective, typeof MessageTemplateDirective, typeof HeroCardComponent, typeof ChatMessageBoxTemplateDirective, typeof ChatMessageBoxStartAffixTemplateDirective, typeof ChatMessageBoxEndAffixTemplateDirective, typeof ChatMessageBoxTopAffixTemplateDirective, typeof ChatHeaderTemplateDirective, typeof NoDataTemplateDirective, typeof ChatTimestampTemplateDirective, typeof ChatStatusTemplateDirective, typeof ChatSuggestionTemplateDirective, typeof ChatUserStatusTemplateDirective], [typeof ChatComponent, typeof CustomMessagesComponent, typeof AttachmentTemplateDirective, typeof AuthorMessageContentTemplateDirective, typeof ReceiverMessageContentTemplateDirective, typeof MessageContentTemplateDirective, typeof AuthorMessageTemplateDirective, typeof ReceiverMessageTemplateDirective, typeof MessageTemplateDirective, typeof HeroCardComponent, typeof ChatMessageBoxTemplateDirective, typeof ChatMessageBoxStartAffixTemplateDirective, typeof ChatMessageBoxEndAffixTemplateDirective, typeof ChatMessageBoxTopAffixTemplateDirective, typeof ChatHeaderTemplateDirective, typeof NoDataTemplateDirective, typeof ChatTimestampTemplateDirective, typeof ChatStatusTemplateDirective, typeof ChatSuggestionTemplateDirective, typeof ChatUserStatusTemplateDirective]>;
|
|
3375
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ChatModule>;
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3378
|
+
/**
|
|
3379
|
+
* Describes a command shown in the Inline AI Prompt input.
|
|
3380
|
+
*/
|
|
3381
|
+
interface InlineAIPromptCommand {
|
|
3382
|
+
/**
|
|
3383
|
+
* The unique identifier for the command.
|
|
3384
|
+
*/
|
|
3385
|
+
id: string | number;
|
|
3386
|
+
/**
|
|
3387
|
+
* The text for the command.
|
|
3388
|
+
*/
|
|
3389
|
+
text?: string;
|
|
3390
|
+
/**
|
|
3391
|
+
* The prompt used when the command runs.
|
|
3392
|
+
*/
|
|
3393
|
+
prompt?: string;
|
|
3394
|
+
/**
|
|
3395
|
+
* The font icon name. See [icons list](https://www.telerik.com/kendo-angular-ui/components/styling/icons#icons-list).
|
|
3396
|
+
*/
|
|
3397
|
+
icon?: string;
|
|
3398
|
+
/**
|
|
3399
|
+
* The SVG icon. See [SVG icons list](https://www.telerik.com/kendo-angular-ui/components/icons/svgicon/svgicon-list).
|
|
3400
|
+
*/
|
|
3401
|
+
svgIcon?: SVGIcon;
|
|
3402
|
+
/**
|
|
3403
|
+
* The disabled state of the command.
|
|
3404
|
+
*/
|
|
3405
|
+
disabled?: boolean;
|
|
3406
|
+
/**
|
|
3407
|
+
* The nested child commands.
|
|
3408
|
+
*/
|
|
3409
|
+
children?: InlineAIPromptCommand[];
|
|
3410
|
+
}
|
|
3411
|
+
|
|
3412
|
+
/**
|
|
3413
|
+
* Describes the output returned for a prompt.
|
|
3414
|
+
*/
|
|
3415
|
+
interface InlineAIPromptOutput {
|
|
3416
|
+
/**
|
|
3417
|
+
* The unique identifier for the output.
|
|
3418
|
+
*/
|
|
3419
|
+
id: number | string;
|
|
3420
|
+
/**
|
|
3421
|
+
* The generated text content.
|
|
3422
|
+
*/
|
|
3423
|
+
output: string;
|
|
3424
|
+
/**
|
|
3425
|
+
* The prompt that starts the output generation.
|
|
3426
|
+
*/
|
|
3427
|
+
prompt: string;
|
|
3428
|
+
/**
|
|
3429
|
+
* The command ID if the prompt generation is triggered by a command.
|
|
3430
|
+
*/
|
|
3431
|
+
commandId?: string | number;
|
|
3432
|
+
}
|
|
3433
|
+
|
|
3434
|
+
/**
|
|
3435
|
+
* Arguments for the `promptRequest` event.
|
|
3436
|
+
*/
|
|
3437
|
+
interface InlineAIPromptRequestEvent {
|
|
3438
|
+
/**
|
|
3439
|
+
* The user prompt input.
|
|
3440
|
+
*/
|
|
3441
|
+
prompt: string;
|
|
3442
|
+
/**
|
|
3443
|
+
* If `true`, the event is triggered by the built-in **Retry** action button.
|
|
3444
|
+
*/
|
|
3445
|
+
isRetry?: boolean;
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3448
|
+
/**
|
|
3449
|
+
* Defines the interface for the Inline AI Prompt output actions.
|
|
3450
|
+
*/
|
|
3451
|
+
interface InlineAIPromptOutputAction {
|
|
3452
|
+
/**
|
|
3453
|
+
* The name of the action. Predefined names are `copy`, `retry`, and `discard`.
|
|
3454
|
+
*/
|
|
3455
|
+
name?: string;
|
|
3456
|
+
/**
|
|
3457
|
+
* The type of the action.
|
|
3458
|
+
*/
|
|
3459
|
+
type?: "button" | "spacer";
|
|
3460
|
+
/**
|
|
3461
|
+
* The font icon for the action.
|
|
3462
|
+
*/
|
|
3463
|
+
icon?: string;
|
|
3464
|
+
/**
|
|
3465
|
+
* The SVG icon for the action.
|
|
3466
|
+
*/
|
|
3467
|
+
svgIcon?: SVGIcon;
|
|
3468
|
+
/**
|
|
3469
|
+
* The text for the action.
|
|
3470
|
+
*/
|
|
3471
|
+
text?: string;
|
|
3472
|
+
/**
|
|
3473
|
+
* The title attribute for the action.
|
|
3474
|
+
*
|
|
3475
|
+
* @remarks
|
|
3476
|
+
* This option is related to accessibility.
|
|
3477
|
+
*/
|
|
3478
|
+
title?: string;
|
|
3479
|
+
/**
|
|
3480
|
+
* The fill mode for the button.
|
|
3481
|
+
*/
|
|
3482
|
+
fillMode?: ButtonFillMode;
|
|
3483
|
+
/**
|
|
3484
|
+
* The theme color for the button.
|
|
3485
|
+
*/
|
|
3486
|
+
themeColor?: ButtonThemeColor;
|
|
3487
|
+
/**
|
|
3488
|
+
* The rounded styling for the button.
|
|
3489
|
+
*/
|
|
3490
|
+
rounded?: ButtonRounded;
|
|
3491
|
+
/**
|
|
3492
|
+
* The disabled state of the button.
|
|
3493
|
+
*/
|
|
3494
|
+
disabled?: boolean;
|
|
3495
|
+
}
|
|
3496
|
+
|
|
3497
|
+
/**
|
|
3498
|
+
* Defines the titles that appear in the Inline AI Prompt. Use for localization.
|
|
3499
|
+
*/
|
|
3500
|
+
interface InlineAIPromptMessages {
|
|
3501
|
+
/**
|
|
3502
|
+
* The title for the Commands button.
|
|
3503
|
+
*/
|
|
3504
|
+
commandsButtonTitle?: string;
|
|
3505
|
+
/**
|
|
3506
|
+
* The title for the Generate button.
|
|
3507
|
+
*/
|
|
3508
|
+
generateButtonTitle?: string;
|
|
3509
|
+
/**
|
|
3510
|
+
* The title for the Speech to Text button.
|
|
3511
|
+
*/
|
|
3512
|
+
speechToTextButtonTitle?: string;
|
|
3513
|
+
}
|
|
3514
|
+
|
|
3515
|
+
/**
|
|
3516
|
+
* Lists all configuration options for the Popup that displays the Inline AI Prompt.
|
|
3517
|
+
*/
|
|
3518
|
+
interface InlineAIPromptPopupSettings extends Omit<PopupSettings, 'content'> {
|
|
3519
|
+
}
|
|
3520
|
+
|
|
3521
|
+
/**
|
|
3522
|
+
* Defines the settings for opening an Inline AI Prompt through the `InlineAIPromptService`.
|
|
3523
|
+
*/
|
|
3524
|
+
declare class InlineAIPromptSettings {
|
|
3525
|
+
/**
|
|
3526
|
+
* The settings for the Inline AI Prompt Popup.
|
|
3527
|
+
*/
|
|
3528
|
+
popupSettings?: InlineAIPromptPopupSettings;
|
|
3529
|
+
/**
|
|
3530
|
+
* Sets the width of the component.
|
|
3531
|
+
* Accepts a number for pixels or a string for other units, for example, `50%`.
|
|
3532
|
+
*/
|
|
3533
|
+
width?: number | string;
|
|
3534
|
+
/**
|
|
3535
|
+
* Sets the maximum height of the component.
|
|
3536
|
+
* Accepts a number for pixels or a string for other units, for example, `50%`.
|
|
3537
|
+
*/
|
|
3538
|
+
maxHeight?: number | string;
|
|
3539
|
+
/**
|
|
3540
|
+
* Sets the value of the Inline AI Prompt TextArea.
|
|
3541
|
+
*/
|
|
3542
|
+
promptValue?: string;
|
|
3543
|
+
/**
|
|
3544
|
+
* Sets the placeholder text for the Inline AI Prompt TextArea.
|
|
3545
|
+
*/
|
|
3546
|
+
placeholder?: string;
|
|
3547
|
+
/**
|
|
3548
|
+
* Sets the action buttons for the output card.
|
|
3549
|
+
*/
|
|
3550
|
+
outputActions?: InlineAIPromptOutputAction[];
|
|
3551
|
+
/**
|
|
3552
|
+
* Sets the commands for the Inline AI Prompt TextArea prefix.
|
|
3553
|
+
*/
|
|
3554
|
+
promptCommands?: InlineAIPromptCommand[];
|
|
3555
|
+
/**
|
|
3556
|
+
* Sets the prompt output to display.
|
|
3557
|
+
*/
|
|
3558
|
+
promptOutput?: InlineAIPromptOutput;
|
|
3559
|
+
/**
|
|
3560
|
+
* Controls the visibility and configuration of the Speech to Text button.
|
|
3561
|
+
*/
|
|
3562
|
+
enableSpeechToTextButton?: boolean | SpeechToTextButtonSettings;
|
|
3563
|
+
/**
|
|
3564
|
+
* Sets the template for the output content. If not provided, uses the default output template.
|
|
3565
|
+
*/
|
|
3566
|
+
outputTemplate?: TemplateRef<any>;
|
|
3567
|
+
/**
|
|
3568
|
+
* If `true`, the send button turns into a stop button.
|
|
3569
|
+
*/
|
|
3570
|
+
streaming?: boolean;
|
|
3571
|
+
/**
|
|
3572
|
+
* Sets the titles of the buttons shown in the Inline AI Prompt. Use for localization.
|
|
3573
|
+
*/
|
|
3574
|
+
messages?: InlineAIPromptMessages;
|
|
3575
|
+
}
|
|
3576
|
+
|
|
3577
|
+
/**
|
|
3578
|
+
* Represents the arguments for the `outputActionClick` event of the Inline AI Prompt.
|
|
3579
|
+
*/
|
|
3580
|
+
interface InlineAIPromptOutputActionClickEvent {
|
|
3581
|
+
/**
|
|
3582
|
+
* The clicked action.
|
|
3583
|
+
*/
|
|
3584
|
+
action: InlineAIPromptOutputAction;
|
|
3585
|
+
/**
|
|
3586
|
+
* The output associated with the action click event.
|
|
3587
|
+
*/
|
|
3588
|
+
output: InlineAIPromptOutput;
|
|
3589
|
+
}
|
|
3590
|
+
|
|
3591
|
+
/**
|
|
3592
|
+
* @hidden
|
|
3593
|
+
*/
|
|
3594
|
+
declare class InlineAIPromptContentComponent implements OnDestroy, AfterViewInit {
|
|
3595
|
+
private ngZone;
|
|
3596
|
+
private renderer;
|
|
3597
|
+
private element;
|
|
3598
|
+
localization: LocalizationService;
|
|
3599
|
+
className: boolean;
|
|
3600
|
+
get dirAttr(): string;
|
|
3601
|
+
get maxHeightStyle(): string;
|
|
3602
|
+
get widthStyle(): string;
|
|
3603
|
+
popupElement: ElementRef;
|
|
3604
|
+
promptValue: string;
|
|
3605
|
+
placeholder: string;
|
|
3606
|
+
promptOutput: InlineAIPromptOutput;
|
|
3607
|
+
enableSpeechToText: boolean | SpeechToTextButtonSettings;
|
|
3608
|
+
streaming: boolean;
|
|
3609
|
+
width: number | string;
|
|
3610
|
+
maxHeight: number | string;
|
|
3611
|
+
appendTo: ViewContainerRef;
|
|
3612
|
+
defaultOutputActions: InlineAIPromptOutputAction[];
|
|
3613
|
+
set outputActions(actions: InlineAIPromptOutputAction[]);
|
|
3614
|
+
get outputActions(): InlineAIPromptOutputAction[];
|
|
3615
|
+
set promptCommands(commands: InlineAIPromptCommand[]);
|
|
3616
|
+
get promptCommands(): InlineAIPromptCommand[];
|
|
3617
|
+
outputTemplate: TemplateRef<any>;
|
|
3618
|
+
promptRequest: EventEmitter<InlineAIPromptRequestEvent>;
|
|
3619
|
+
commandExecute: EventEmitter<InlineAIPromptCommand>;
|
|
3620
|
+
outputActionClick: EventEmitter<InlineAIPromptOutputActionClickEvent>;
|
|
3621
|
+
promptRequestCancel: EventEmitter<void>;
|
|
3622
|
+
close: EventEmitter<void>;
|
|
3623
|
+
promptValueChange: EventEmitter<string>;
|
|
3624
|
+
onEscapeKey(event: KeyboardEvent): void;
|
|
3625
|
+
textArea: TextAreaComponent;
|
|
3626
|
+
contextMenu: ContextMenuComponent;
|
|
3627
|
+
calculateMeasurement: (value: string | number) => string;
|
|
3628
|
+
commandMenuIcon: SVGIcon;
|
|
3629
|
+
sendIcon: SVGIcon;
|
|
3630
|
+
stopGenerationIcon: SVGIcon;
|
|
3631
|
+
isListening: boolean;
|
|
3632
|
+
commandMenuItems: MenuItem[];
|
|
3633
|
+
messages: InlineAIPromptMessages;
|
|
3634
|
+
maxRows: number;
|
|
3635
|
+
initialRows: number;
|
|
3636
|
+
private _outputActions;
|
|
3637
|
+
private _promptCommands;
|
|
3638
|
+
private direction;
|
|
3639
|
+
private localizationSubs;
|
|
3640
|
+
private subs;
|
|
3641
|
+
constructor(ngZone: NgZone, renderer: Renderer2, element: ElementRef, localization: LocalizationService);
|
|
3642
|
+
ngAfterViewInit(): void;
|
|
3643
|
+
ngOnDestroy(): void;
|
|
3644
|
+
focus(): void;
|
|
3645
|
+
onActionClick(event: any): void;
|
|
3646
|
+
handleDefaultActions(event: InlineAIPromptOutputAction): void;
|
|
3647
|
+
handleSpeechResult(event: any): void;
|
|
3648
|
+
onClick(action: any): void;
|
|
3649
|
+
handlePromptValueChange(value: string): void;
|
|
3650
|
+
handleTextAreaKeydown(event: any): void;
|
|
3651
|
+
onCommandButtonClick(event: any): void;
|
|
3652
|
+
onCommandClick(event: any): void;
|
|
3653
|
+
messageFor(text: string): string;
|
|
3654
|
+
handlePromptRequest(): void;
|
|
3655
|
+
private mergeWithDefaultActions;
|
|
3656
|
+
private transformCommands;
|
|
3657
|
+
private outsideClickClose;
|
|
3658
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InlineAIPromptContentComponent, [null, null, null, { optional: true; skipSelf: true; }]>;
|
|
3659
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InlineAIPromptContentComponent, "kendo-inlineaiprompt-content", ["kendoInlineAIPromptContent"], { "popupElement": { "alias": "popupElement"; "required": false; }; "promptValue": { "alias": "promptValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "promptOutput": { "alias": "promptOutput"; "required": false; }; "enableSpeechToText": { "alias": "enableSpeechToText"; "required": false; }; "streaming": { "alias": "streaming"; "required": false; }; "width": { "alias": "width"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "outputActions": { "alias": "outputActions"; "required": false; }; "promptCommands": { "alias": "promptCommands"; "required": false; }; "outputTemplate": { "alias": "outputTemplate"; "required": false; }; }, { "promptRequest": "promptRequest"; "commandExecute": "commandExecute"; "outputActionClick": "outputActionClick"; "promptRequestCancel": "promptRequestCancel"; "close": "close"; "promptValueChange": "promptValueChange"; }, never, never, true, never>;
|
|
3660
|
+
}
|
|
3661
|
+
|
|
3662
|
+
/**
|
|
3663
|
+
* Defines a template for displaying the output of the Inline AI Prompt.
|
|
3664
|
+
*
|
|
3665
|
+
* @example
|
|
3666
|
+
* ```html
|
|
3667
|
+
* <kendo-inlineaiprompt>
|
|
3668
|
+
* <ng-template kendoInlineAIPromptOutputTemplate let-output>
|
|
3669
|
+
* <div class="custom-output">
|
|
3670
|
+
* <h4>AI Response:</h4>
|
|
3671
|
+
* <p>{{ output.output }}</p>
|
|
3672
|
+
* </div>
|
|
3673
|
+
* </ng-template>
|
|
3674
|
+
* </kendo-inlineaiprompt>
|
|
3675
|
+
* ```
|
|
3676
|
+
*/
|
|
3677
|
+
declare class InlineAIPromptOutputTemplateDirective {
|
|
3678
|
+
templateRef: TemplateRef<any>;
|
|
3679
|
+
constructor(templateRef: TemplateRef<any>);
|
|
3680
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InlineAIPromptOutputTemplateDirective, [{ optional: true; }]>;
|
|
3681
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<InlineAIPromptOutputTemplateDirective, "[kendoInlineAIPromptOutputTemplate]", never, {}, {}, never, never, true, never>;
|
|
3682
|
+
}
|
|
3683
|
+
|
|
3684
|
+
/**
|
|
3685
|
+
* Represents the Kendo UI InlineAIPrompt component for Angular.
|
|
3686
|
+
*
|
|
3687
|
+
* @remarks
|
|
3688
|
+
* Supported children components are: {@link InlineAIPromptCustomMessagesComponent}
|
|
3689
|
+
*
|
|
3690
|
+
* @example
|
|
3691
|
+
* ```html
|
|
3692
|
+
* <kendo-inlineaiprompt
|
|
3693
|
+
* placeholder="Enter your prompt..."
|
|
3694
|
+
* [promptOutput]="promptOutput"
|
|
3695
|
+
* (promptRequest)="onPromptRequest($event)">
|
|
3696
|
+
* </kendo-inlineaiprompt>
|
|
3697
|
+
* ```
|
|
3698
|
+
*/
|
|
3699
|
+
declare class InlineAIPromptComponent implements AfterViewInit, OnDestroy {
|
|
3700
|
+
private ngZone;
|
|
3701
|
+
element: ElementRef;
|
|
3702
|
+
/**
|
|
3703
|
+
* Sets the TextArea value.
|
|
3704
|
+
*
|
|
3705
|
+
* @default ""
|
|
3706
|
+
*/
|
|
3707
|
+
promptValue: string;
|
|
3708
|
+
/**
|
|
3709
|
+
* Sets the placeholder text that appears in the text area when it is empty.
|
|
3710
|
+
*/
|
|
3711
|
+
placeholder: string;
|
|
3712
|
+
/**
|
|
3713
|
+
* Sets the output data for the prompt.
|
|
3714
|
+
* The output displays as a card above the text area.
|
|
3715
|
+
*/
|
|
3716
|
+
promptOutput: InlineAIPromptOutput;
|
|
3717
|
+
/**
|
|
3718
|
+
* Controls the visibility and settings of the Speech to Text button.
|
|
3719
|
+
*
|
|
3720
|
+
* @default true
|
|
3721
|
+
*/
|
|
3722
|
+
enableSpeechToText: boolean | SpeechToTextButtonSettings;
|
|
3723
|
+
/**
|
|
3724
|
+
* When set to `true`, the **Send** button displays a generating state and the component emits a `promptRequestCancel` event when you click it.
|
|
3725
|
+
*
|
|
3726
|
+
* @default false
|
|
3727
|
+
*/
|
|
3728
|
+
streaming: boolean;
|
|
3729
|
+
/**
|
|
3730
|
+
* Sets the width of the component.
|
|
3731
|
+
* Accepts a number for pixels or a string for other units.
|
|
3732
|
+
*
|
|
3733
|
+
* @default 550
|
|
3734
|
+
*/
|
|
3735
|
+
width: number | string;
|
|
3736
|
+
/**
|
|
3737
|
+
* Sets the maximum height of the component.
|
|
3738
|
+
* Accepts a number for pixels or a string for other units.
|
|
3739
|
+
*/
|
|
3740
|
+
maxHeight: number | string;
|
|
3741
|
+
/**
|
|
3742
|
+
* Represents the configuration of the default output actions.
|
|
3743
|
+
* The default actions are `copy`, `retry`, and `discard`.
|
|
3744
|
+
*/
|
|
3745
|
+
defaultOutputActions: InlineAIPromptOutputAction[];
|
|
3746
|
+
/**
|
|
3747
|
+
* Sets the output actions that display in the output card.
|
|
3748
|
+
* The default actions are `copy`, `retry`, and `discard`.
|
|
3749
|
+
* To customize the appearance and order of the default actions, define them with the same `name`.
|
|
3750
|
+
*
|
|
3751
|
+
* @default [{ name: 'copy', type: 'button', icon: 'copy', svgIcon: copyIcon, text: 'Copy', fillMode: 'flat', themeColor: 'primary', rounded: 'medium'}, { name: 'retry', type: 'button', icon: 'arrow-rotate-cw', svgIcon: arrowRotateCwIcon, text: 'Retry', fillMode: 'flat', themeColor: 'primary', rounded: 'medium'}, { name: 'discard', type: 'button', icon: 'cancel', svgIcon: cancelIcon, text: 'Discard', fillMode: 'flat', themeColor: 'base', rounded: 'medium'}]
|
|
3752
|
+
*/
|
|
3753
|
+
outputActions: InlineAIPromptOutputAction[];
|
|
3754
|
+
/**
|
|
3755
|
+
* Sets the available prompt commands.
|
|
3756
|
+
*/
|
|
3757
|
+
promptCommands: InlineAIPromptCommand[];
|
|
3758
|
+
/**
|
|
3759
|
+
* Sets the Popup settings.
|
|
3760
|
+
*
|
|
3761
|
+
*/
|
|
3762
|
+
set popupSettings(settings: InlineAIPromptPopupSettings);
|
|
3763
|
+
get popupSettings(): InlineAIPromptPopupSettings;
|
|
3764
|
+
/**
|
|
3765
|
+
* Fires when the send button is clicked.
|
|
3766
|
+
*/
|
|
3767
|
+
promptRequest: EventEmitter<InlineAIPromptRequestEvent>;
|
|
3768
|
+
/**
|
|
3769
|
+
* Fires when a command is executed.
|
|
3770
|
+
*/
|
|
3771
|
+
commandExecute: EventEmitter<InlineAIPromptCommand>;
|
|
3772
|
+
/**
|
|
3773
|
+
* Fires when an output action button is clicked.
|
|
3774
|
+
*/
|
|
3775
|
+
outputActionClick: EventEmitter<InlineAIPromptOutputActionClickEvent>;
|
|
3776
|
+
/**
|
|
3777
|
+
* Fires when the stop button is clicked during streaming.
|
|
3778
|
+
*/
|
|
3779
|
+
promptRequestCancel: EventEmitter<void>;
|
|
3780
|
+
/**
|
|
3781
|
+
* Fires when the component closes (Escape key, Discard action or outside click).
|
|
3782
|
+
*/
|
|
3783
|
+
close: EventEmitter<void>;
|
|
3784
|
+
/**
|
|
3785
|
+
* Fires when the TextArea value changes.
|
|
3786
|
+
*/
|
|
3787
|
+
promptValueChange: EventEmitter<string>;
|
|
3788
|
+
popupElement: ElementRef;
|
|
3789
|
+
popupViewContainer: ViewContainerRef;
|
|
3790
|
+
contentComponent: InlineAIPromptContentComponent;
|
|
3791
|
+
outputTemplate: InlineAIPromptOutputTemplateDirective;
|
|
3792
|
+
/**
|
|
3793
|
+
* @hidden
|
|
3794
|
+
*/
|
|
3795
|
+
calculateMeasurement: (value: string | number) => string;
|
|
3796
|
+
private _popupSettings;
|
|
3797
|
+
private subs;
|
|
3798
|
+
constructor(ngZone: NgZone, element: ElementRef);
|
|
3799
|
+
ngAfterViewInit(): void;
|
|
3800
|
+
ngOnDestroy(): void;
|
|
3801
|
+
/**
|
|
3802
|
+
* Focus the TextArea.
|
|
3803
|
+
*/
|
|
3804
|
+
focus(): void;
|
|
3805
|
+
/**
|
|
3806
|
+
* @hidden
|
|
3807
|
+
*/
|
|
3808
|
+
onPromptRequest(event: InlineAIPromptRequestEvent): void;
|
|
3809
|
+
/**
|
|
3810
|
+
* @hidden
|
|
3811
|
+
*/
|
|
3812
|
+
onCommandExecute(event: InlineAIPromptCommand): void;
|
|
3813
|
+
/**
|
|
3814
|
+
* @hidden
|
|
3815
|
+
*/
|
|
3816
|
+
onOutputActionClick(event: InlineAIPromptOutputActionClickEvent): void;
|
|
3817
|
+
/**
|
|
3818
|
+
* @hidden
|
|
3819
|
+
*/
|
|
3820
|
+
onPromptRequestCancel(): void;
|
|
3821
|
+
/**
|
|
3822
|
+
* @hidden
|
|
3823
|
+
*/
|
|
3824
|
+
onClose(): void;
|
|
3825
|
+
/**
|
|
3826
|
+
* @hidden
|
|
3827
|
+
*/
|
|
3828
|
+
onPromptValueChange(value: string): void;
|
|
3829
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InlineAIPromptComponent, never>;
|
|
3830
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InlineAIPromptComponent, "kendo-inlineaiprompt", ["kendoInlineAIPrompt"], { "promptValue": { "alias": "promptValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "promptOutput": { "alias": "promptOutput"; "required": false; }; "enableSpeechToText": { "alias": "enableSpeechToText"; "required": false; }; "streaming": { "alias": "streaming"; "required": false; }; "width": { "alias": "width"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "outputActions": { "alias": "outputActions"; "required": false; }; "promptCommands": { "alias": "promptCommands"; "required": false; }; "popupSettings": { "alias": "popupSettings"; "required": false; }; }, { "promptRequest": "promptRequest"; "commandExecute": "commandExecute"; "outputActionClick": "outputActionClick"; "promptRequestCancel": "promptRequestCancel"; "close": "close"; "promptValueChange": "promptValueChange"; }, ["outputTemplate"], never, true, never>;
|
|
3831
|
+
}
|
|
3832
|
+
|
|
3833
|
+
/**
|
|
3834
|
+
* @hidden
|
|
3835
|
+
*/
|
|
3836
|
+
declare class Messages$1 extends ComponentMessages {
|
|
3837
|
+
/**
|
|
3838
|
+
* The title for the Commands button.
|
|
3839
|
+
*/
|
|
3840
|
+
commandsButtonTitle: string;
|
|
3841
|
+
/**
|
|
3842
|
+
* The title for the Generate button.
|
|
3843
|
+
*/
|
|
3844
|
+
generateButtonTitle: string;
|
|
3845
|
+
/**
|
|
3846
|
+
* The title for the Speech to Text button.
|
|
3847
|
+
*/
|
|
3848
|
+
speechToTextButtonTitle: string;
|
|
3849
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Messages$1, never>;
|
|
3850
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages$1, never, never, { "commandsButtonTitle": { "alias": "commandsButtonTitle"; "required": false; }; "generateButtonTitle": { "alias": "generateButtonTitle"; "required": false; }; "speechToTextButtonTitle": { "alias": "speechToTextButtonTitle"; "required": false; }; }, {}, never, never, true, never>;
|
|
3851
|
+
}
|
|
3852
|
+
|
|
3853
|
+
/**
|
|
3854
|
+
* Provides a component for customizing messages in the Inline AI Prompt. [See example](https://www.telerik.com/kendo-angular-ui/components/conversational-ui/globalization#custom-messages).
|
|
3855
|
+
*
|
|
3856
|
+
* @example
|
|
3857
|
+
* ```html
|
|
3858
|
+
* <kendo-inlineaiprompt-messages
|
|
3859
|
+
* commandsButtonTitle="Commands Menu"
|
|
3860
|
+
* generateButtonTitle="Generate">
|
|
3861
|
+
* </kendo-inlineaiprompt-messages>
|
|
3862
|
+
* ```
|
|
3863
|
+
*/
|
|
3864
|
+
declare class InlineAIPromptCustomMessagesComponent extends Messages$1 {
|
|
3865
|
+
protected service: LocalizationService;
|
|
3866
|
+
constructor(service: LocalizationService);
|
|
3867
|
+
protected get override(): boolean;
|
|
3868
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InlineAIPromptCustomMessagesComponent, never>;
|
|
3869
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InlineAIPromptCustomMessagesComponent, "kendo-inlineaiprompt-messages", never, {}, {}, never, never, true, never>;
|
|
3870
|
+
}
|
|
3871
|
+
|
|
3872
|
+
/**
|
|
3873
|
+
* @hidden
|
|
3874
|
+
*/
|
|
3875
|
+
declare class Messages extends ComponentMessages {
|
|
3876
|
+
/**
|
|
3877
|
+
* The title for the **File Select** button.
|
|
3878
|
+
*/
|
|
3879
|
+
fileSelectButtonTitle: string;
|
|
3880
|
+
/**
|
|
3881
|
+
* The title for the **Action** button.
|
|
3882
|
+
*/
|
|
3883
|
+
actionButtonTitle: string;
|
|
3884
|
+
/**
|
|
3885
|
+
* The title for the **Stop Generating** action.
|
|
3886
|
+
*/
|
|
3887
|
+
stopGeneratingTitle: string;
|
|
3888
|
+
/**
|
|
3889
|
+
* The title for the **Speech to Text** button.
|
|
3890
|
+
*/
|
|
3891
|
+
speechToTextButtonTitle: string;
|
|
3892
|
+
/**
|
|
3893
|
+
* The title for the **Remove File** button.
|
|
3894
|
+
*/
|
|
3895
|
+
removeFileTitle: string;
|
|
3896
|
+
/**
|
|
3897
|
+
* The aria-label for the internal input/textarea element.
|
|
3898
|
+
*/
|
|
3899
|
+
messageBoxTitle: string;
|
|
3900
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Messages, never>;
|
|
3901
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, never, never, { "fileSelectButtonTitle": { "alias": "fileSelectButtonTitle"; "required": false; }; "actionButtonTitle": { "alias": "actionButtonTitle"; "required": false; }; "stopGeneratingTitle": { "alias": "stopGeneratingTitle"; "required": false; }; "speechToTextButtonTitle": { "alias": "speechToTextButtonTitle"; "required": false; }; "removeFileTitle": { "alias": "removeFileTitle"; "required": false; }; "messageBoxTitle": { "alias": "messageBoxTitle"; "required": false; }; }, {}, never, never, true, never>;
|
|
3902
|
+
}
|
|
3903
|
+
|
|
3904
|
+
/**
|
|
3905
|
+
* Provides a component for customizing localization messages in the PromptBox.
|
|
3906
|
+
* [See example](slug:globalization_chat#custom-messages).
|
|
3907
|
+
*
|
|
3908
|
+
* @example
|
|
3909
|
+
* ```html
|
|
3910
|
+
* <kendo-promptbox>
|
|
3911
|
+
* <kendo-promptbox-messages>
|
|
3912
|
+
* </kendo-promptbox-messages>
|
|
3913
|
+
* </kendo-promptbox>
|
|
3914
|
+
* ```
|
|
3915
|
+
*/
|
|
3916
|
+
declare class PromptBoxCustomMessagesComponent extends Messages {
|
|
3917
|
+
protected service: LocalizationService;
|
|
3918
|
+
constructor(service: LocalizationService);
|
|
3919
|
+
protected get override(): boolean;
|
|
3920
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptBoxCustomMessagesComponent, never>;
|
|
3921
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptBoxCustomMessagesComponent, "kendo-promptbox-messages", never, {}, {}, never, never, true, never>;
|
|
3922
|
+
}
|
|
3923
|
+
|
|
3924
|
+
/**
|
|
3925
|
+
* @hidden
|
|
3926
|
+
* Base class for PromptBox tools.
|
|
3927
|
+
*/
|
|
3928
|
+
declare abstract class PromptBoxBaseTool {
|
|
3929
|
+
/**
|
|
3930
|
+
* Sets the disabled state of the button.
|
|
3931
|
+
*/
|
|
3932
|
+
disabled: boolean;
|
|
3933
|
+
/**
|
|
3934
|
+
* Sets the background and border styles of the button.
|
|
3935
|
+
*/
|
|
3936
|
+
fillMode: ButtonFillMode;
|
|
3937
|
+
/**
|
|
3938
|
+
* Sets the name of an existing font icon in the Kendo UI theme for the button.
|
|
3939
|
+
*/
|
|
3940
|
+
icon: string;
|
|
3941
|
+
/**
|
|
3942
|
+
* Defines a CSS class, or multiple classes separated by spaces, applied to a span element inside the button.
|
|
3943
|
+
*/
|
|
3944
|
+
iconClass: string;
|
|
3945
|
+
/**
|
|
3946
|
+
* Specifies a URL for an img element inside the button.
|
|
3947
|
+
*/
|
|
3948
|
+
imageUrl: string;
|
|
3949
|
+
/**
|
|
3950
|
+
* Sets the SVG icon for the tool button.
|
|
3951
|
+
*/
|
|
3952
|
+
svgIcon: SVGIcon;
|
|
3953
|
+
/**
|
|
3954
|
+
* Sets the border radius of the button.
|
|
3955
|
+
*/
|
|
3956
|
+
rounded: ButtonRounded;
|
|
3957
|
+
/**
|
|
3958
|
+
* Sets the padding of the button.
|
|
3959
|
+
*/
|
|
3960
|
+
set size(value: ButtonSize);
|
|
3961
|
+
get size(): ButtonSize;
|
|
3962
|
+
/**
|
|
3963
|
+
* Sets a predefined theme color for the button.
|
|
3964
|
+
*/
|
|
3965
|
+
themeColor: ButtonThemeColor;
|
|
3966
|
+
/**
|
|
3967
|
+
* Sets the title attribute of the button.
|
|
3968
|
+
*
|
|
3969
|
+
* @remarks
|
|
3970
|
+
* This property is related to accessibility.
|
|
3971
|
+
*/
|
|
3972
|
+
title: string;
|
|
3973
|
+
/**
|
|
3974
|
+
* @hidden
|
|
3975
|
+
*/
|
|
3976
|
+
sizeChange: EventEmitter<ButtonSize>;
|
|
3977
|
+
private _size;
|
|
3978
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptBoxBaseTool, never>;
|
|
3979
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PromptBoxBaseTool, never, never, { "disabled": { "alias": "disabled"; "required": false; }; "fillMode": { "alias": "fillMode"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconClass": { "alias": "iconClass"; "required": false; }; "imageUrl": { "alias": "imageUrl"; "required": false; }; "svgIcon": { "alias": "svgIcon"; "required": false; }; "rounded": { "alias": "rounded"; "required": false; }; "size": { "alias": "size"; "required": false; }; "themeColor": { "alias": "themeColor"; "required": false; }; "title": { "alias": "title"; "required": false; }; }, { "sizeChange": "sizeChange"; }, never, never, true, never>;
|
|
3980
|
+
}
|
|
3981
|
+
|
|
3982
|
+
/**
|
|
3983
|
+
* Defines the **Speech to Text** button component for the PromptBox. Enables voice input through speech recognition.
|
|
3984
|
+
*
|
|
3985
|
+
* @example
|
|
3986
|
+
* ```html
|
|
3987
|
+
* <kendo-promptbox>
|
|
3988
|
+
* <kendo-promptbox-end-affix>
|
|
3989
|
+
* <kendo-promptbox-speech-to-text-button></kendo-promptbox-speech-to-text-button>
|
|
3990
|
+
* </kendo-promptbox-end-affix>
|
|
3991
|
+
* </kendo-promptbox>
|
|
3992
|
+
* ```
|
|
3993
|
+
*/
|
|
3994
|
+
declare class PromptBoxSpeechToTextButtonComponent extends PromptBoxBaseTool {
|
|
3995
|
+
private localization;
|
|
3996
|
+
/**
|
|
3997
|
+
* Specifies whether continuous results are returned for each recognition, or only a single result once recognition stops.
|
|
3998
|
+
*
|
|
3999
|
+
* @default false
|
|
4000
|
+
*/
|
|
4001
|
+
continuous: boolean;
|
|
4002
|
+
/**
|
|
4003
|
+
* Specifies which speech recognition engine or integration the component should use. Allows the component to operate in different environments or use alternative implementations.
|
|
4004
|
+
*
|
|
4005
|
+
* @default 'webSpeech'
|
|
4006
|
+
*/
|
|
4007
|
+
integrationMode: IntegrationMode;
|
|
4008
|
+
/**
|
|
4009
|
+
* Sets whether interim results should be returned.
|
|
4010
|
+
*
|
|
4011
|
+
* @default false
|
|
4012
|
+
*/
|
|
4013
|
+
interimResults: boolean;
|
|
4014
|
+
/**
|
|
4015
|
+
* Sets a `BCP 47` language for speech recognition.
|
|
4016
|
+
*
|
|
4017
|
+
* @default 'en-US'
|
|
4018
|
+
*/
|
|
4019
|
+
lang: string;
|
|
4020
|
+
/**
|
|
4021
|
+
* Represents the maximum number of alternative transcriptions to return for each result.
|
|
4022
|
+
*
|
|
4023
|
+
* @default 1
|
|
4024
|
+
*/
|
|
4025
|
+
maxAlternatives: number;
|
|
4026
|
+
/**
|
|
4027
|
+
* Fires when the user clicks the **Speech to Text** button.
|
|
4028
|
+
* @hidden
|
|
4029
|
+
*/
|
|
4030
|
+
stbClick: EventEmitter<any>;
|
|
4031
|
+
/**
|
|
4032
|
+
* Fires when the speech recognition service has begun listening to incoming audio.
|
|
4033
|
+
* @hidden
|
|
4034
|
+
*/
|
|
4035
|
+
stbStart: EventEmitter<any>;
|
|
4036
|
+
/**
|
|
4037
|
+
* Fires when the speech recognition service has disconnected.
|
|
4038
|
+
* @hidden
|
|
4039
|
+
*/
|
|
4040
|
+
stbEnd: EventEmitter<any>;
|
|
4041
|
+
/**
|
|
4042
|
+
* Fires when a speech recognition error occurs.
|
|
4043
|
+
* @hidden
|
|
4044
|
+
*/
|
|
4045
|
+
stbError: EventEmitter<SpeechToTextErrorEvent>;
|
|
4046
|
+
/**
|
|
4047
|
+
* Fires when the speech recognition service returns a result.
|
|
4048
|
+
* @hidden
|
|
4049
|
+
*/
|
|
4050
|
+
stbResult: EventEmitter<SpeechToTextResultEvent>;
|
|
4051
|
+
constructor(localization: LocalizationService);
|
|
4052
|
+
/**
|
|
4053
|
+
* @hidden
|
|
4054
|
+
*/
|
|
4055
|
+
textFor(key: string): string;
|
|
4056
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptBoxSpeechToTextButtonComponent, never>;
|
|
4057
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptBoxSpeechToTextButtonComponent, "kendo-promptbox-speech-to-text-button", ["kendoPromptBoxSpeechToTextButton"], { "continuous": { "alias": "continuous"; "required": false; }; "integrationMode": { "alias": "integrationMode"; "required": false; }; "interimResults": { "alias": "interimResults"; "required": false; }; "lang": { "alias": "lang"; "required": false; }; "maxAlternatives": { "alias": "maxAlternatives"; "required": false; }; }, { "stbClick": "stbClick"; "stbStart": "stbStart"; "stbEnd": "stbEnd"; "stbError": "stbError"; "stbResult": "stbResult"; }, never, never, true, never>;
|
|
4058
|
+
}
|
|
4059
|
+
|
|
4060
|
+
/**
|
|
4061
|
+
* Defines the **Action** button component for the PromptBox. Used to send messages or stop ongoing operations.
|
|
4062
|
+
*
|
|
4063
|
+
* @example
|
|
4064
|
+
* ```html
|
|
4065
|
+
* <kendo-promptbox>
|
|
4066
|
+
* <kendo-promptbox-end-affix>
|
|
4067
|
+
* <kendo-promptbox-action-button></kendo-promptbox-action-button>
|
|
4068
|
+
* </kendo-promptbox-end-affix>
|
|
4069
|
+
* </kendo-promptbox>
|
|
4070
|
+
* ```
|
|
4071
|
+
*/
|
|
4072
|
+
declare class PromptBoxActionButtonComponent extends PromptBoxBaseTool {
|
|
4073
|
+
private localization;
|
|
4074
|
+
/**
|
|
4075
|
+
* @hidden
|
|
4076
|
+
*/
|
|
4077
|
+
buttonClass: string;
|
|
4078
|
+
/**
|
|
4079
|
+
* Sets the loading state of the **Action** button.
|
|
4080
|
+
*
|
|
4081
|
+
* @default false
|
|
4082
|
+
*/
|
|
4083
|
+
loading: boolean;
|
|
4084
|
+
/**
|
|
4085
|
+
* Sets the icon to be displayed when the **Action** button is in loading state.
|
|
4086
|
+
*
|
|
4087
|
+
* @default 'stop'
|
|
4088
|
+
*/
|
|
4089
|
+
loadingIcon: string;
|
|
4090
|
+
/**
|
|
4091
|
+
* Sets the SVG icon to be displayed when the **Action** button is in loading state.
|
|
4092
|
+
*
|
|
4093
|
+
* @default stopIcon
|
|
4094
|
+
*/
|
|
4095
|
+
loadingSVGIcon: SVGIcon;
|
|
4096
|
+
/**
|
|
4097
|
+
* Fires when the user clicks the Action button.
|
|
4098
|
+
* @hidden
|
|
4099
|
+
*/
|
|
4100
|
+
promptAction: EventEmitter<ActionButtonEvent>;
|
|
4101
|
+
constructor(localization: LocalizationService);
|
|
4102
|
+
/**
|
|
4103
|
+
* @hidden
|
|
4104
|
+
*/
|
|
4105
|
+
handleClick(): void;
|
|
4106
|
+
/**
|
|
4107
|
+
* @hidden
|
|
4108
|
+
*/
|
|
4109
|
+
textFor(key: string): string;
|
|
4110
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptBoxActionButtonComponent, never>;
|
|
4111
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptBoxActionButtonComponent, "kendo-promptbox-action-button", ["kendoPromptBoxActionButton"], { "buttonClass": { "alias": "buttonClass"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "loadingIcon": { "alias": "loadingIcon"; "required": false; }; "loadingSVGIcon": { "alias": "loadingSVGIcon"; "required": false; }; }, { "promptAction": "promptAction"; }, never, never, true, never>;
|
|
4112
|
+
}
|
|
4113
|
+
|
|
4114
|
+
/**
|
|
4115
|
+
* Defines the **File Select** button component for the PromptBox. Allows users to attach files to their messages.
|
|
4116
|
+
*
|
|
4117
|
+
* @example
|
|
4118
|
+
* ```html
|
|
4119
|
+
* <kendo-promptbox>
|
|
4120
|
+
* <kendo-promptbox-end-affix>
|
|
4121
|
+
* <kendo-promptbox-fileselect-button></kendo-promptbox-fileselect-button>
|
|
4122
|
+
* </kendo-promptbox-end-affix>
|
|
4123
|
+
* </kendo-promptbox>
|
|
4124
|
+
* ```
|
|
4125
|
+
*/
|
|
4126
|
+
declare class PromptBoxFileSelectButtonComponent extends PromptBoxBaseTool {
|
|
4127
|
+
private localization;
|
|
4128
|
+
/**
|
|
4129
|
+
* @hidden
|
|
4130
|
+
*/
|
|
4131
|
+
fileSelectComponent: FileSelectComponent;
|
|
4132
|
+
/**
|
|
4133
|
+
* Sets the restrictions for selected files.
|
|
4134
|
+
*/
|
|
4135
|
+
restrictions: FileRestrictions;
|
|
4136
|
+
/**
|
|
4137
|
+
* Allows you to select multiple files.
|
|
4138
|
+
*
|
|
4139
|
+
* @default true
|
|
4140
|
+
*/
|
|
4141
|
+
multiple: boolean;
|
|
4142
|
+
/**
|
|
4143
|
+
* Sets the `accept` attribute of the internal FileSelect component.
|
|
4144
|
+
* Specifies the file types that the user can select.
|
|
4145
|
+
*/
|
|
4146
|
+
accept: string;
|
|
4147
|
+
/**
|
|
4148
|
+
* Fires when the user selects files.
|
|
4149
|
+
* @hidden
|
|
4150
|
+
*/
|
|
4151
|
+
selectAttachments: EventEmitter<SelectEvent>;
|
|
4152
|
+
constructor(localization: LocalizationService);
|
|
4153
|
+
/**
|
|
4154
|
+
* @hidden
|
|
4155
|
+
*/
|
|
4156
|
+
textFor(key: string): string;
|
|
4157
|
+
/**
|
|
4158
|
+
* @hidden
|
|
4159
|
+
*/
|
|
4160
|
+
selectFiles(): void;
|
|
4161
|
+
/**
|
|
4162
|
+
* @hidden
|
|
4163
|
+
*/
|
|
4164
|
+
handleSelect(event: SelectEvent): void;
|
|
4165
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptBoxFileSelectButtonComponent, never>;
|
|
4166
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptBoxFileSelectButtonComponent, "kendo-promptbox-fileselect-button", ["kendoPromptBoxFileSelectButton"], { "restrictions": { "alias": "restrictions"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; }, { "selectAttachments": "selectAttachments"; }, never, never, true, never>;
|
|
4167
|
+
}
|
|
4168
|
+
|
|
4169
|
+
/**
|
|
4170
|
+
* Represents the [`NgModule`](link:site.data.urls.angular['ngmodules']) for the Conversational UI components.
|
|
4171
|
+
*
|
|
4172
|
+
* @example
|
|
4173
|
+
* ```ts
|
|
4174
|
+
* import { NgModule } from '@angular/core';
|
|
4175
|
+
* import { BrowserModule } from '@angular/platform-browser';
|
|
4176
|
+
* import { ConversationalUIModule } from '@progress/kendo-angular-conversational-ui';
|
|
4177
|
+
* import { AppComponent } from './app.component';
|
|
4178
|
+
*
|
|
4179
|
+
* @NgModule({
|
|
4180
|
+
* declarations: [AppComponent],
|
|
4181
|
+
* imports: [BrowserModule, ConversationalUIModule],
|
|
4182
|
+
* bootstrap: [AppComponent]
|
|
4183
|
+
* })
|
|
4184
|
+
* export class AppModule {}
|
|
4185
|
+
* ```
|
|
4186
|
+
*/
|
|
4187
|
+
declare class ConversationalUIModule {
|
|
4188
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConversationalUIModule, never>;
|
|
4189
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ConversationalUIModule, never, [typeof AIPromptComponent, typeof PromptViewComponent, typeof OutputViewComponent, typeof CommandViewComponent, typeof CustomViewComponent, typeof AIPromptCustomMessagesComponent, typeof AIPromptToolbarActionsDirective, typeof AIPromptToolbarFocusableDirective, typeof AIPromptOutputTemplateDirective, typeof AIPromptOutputBodyTemplateDirective, typeof ChatComponent, typeof CustomMessagesComponent, typeof AttachmentTemplateDirective, typeof AuthorMessageContentTemplateDirective, typeof ReceiverMessageContentTemplateDirective, typeof MessageContentTemplateDirective, typeof AuthorMessageTemplateDirective, typeof ReceiverMessageTemplateDirective, typeof MessageTemplateDirective, typeof HeroCardComponent, typeof ChatMessageBoxTemplateDirective, typeof ChatMessageBoxStartAffixTemplateDirective, typeof ChatMessageBoxEndAffixTemplateDirective, typeof ChatMessageBoxTopAffixTemplateDirective, typeof ChatHeaderTemplateDirective, typeof NoDataTemplateDirective, typeof ChatTimestampTemplateDirective, typeof ChatStatusTemplateDirective, typeof ChatSuggestionTemplateDirective, typeof ChatUserStatusTemplateDirective, typeof InlineAIPromptComponent, typeof InlineAIPromptOutputTemplateDirective, typeof InlineAIPromptCustomMessagesComponent, typeof PromptBoxComponent, typeof PromptBoxCustomMessagesComponent, typeof PromptBoxStartAffixComponent, typeof PromptBoxEndAffixComponent, typeof PromptBoxTopAffixComponent, typeof PromptBoxSpeechToTextButtonComponent, typeof PromptBoxActionButtonComponent, typeof PromptBoxFileSelectButtonComponent, typeof PromptBoxHeaderTemplateDirective], [typeof AIPromptComponent, typeof PromptViewComponent, typeof OutputViewComponent, typeof CommandViewComponent, typeof CustomViewComponent, typeof AIPromptCustomMessagesComponent, typeof AIPromptToolbarActionsDirective, typeof AIPromptToolbarFocusableDirective, typeof AIPromptOutputTemplateDirective, typeof AIPromptOutputBodyTemplateDirective, typeof ChatComponent, typeof CustomMessagesComponent, typeof AttachmentTemplateDirective, typeof AuthorMessageContentTemplateDirective, typeof ReceiverMessageContentTemplateDirective, typeof MessageContentTemplateDirective, typeof AuthorMessageTemplateDirective, typeof ReceiverMessageTemplateDirective, typeof MessageTemplateDirective, typeof HeroCardComponent, typeof ChatMessageBoxTemplateDirective, typeof ChatMessageBoxStartAffixTemplateDirective, typeof ChatMessageBoxEndAffixTemplateDirective, typeof ChatMessageBoxTopAffixTemplateDirective, typeof ChatHeaderTemplateDirective, typeof NoDataTemplateDirective, typeof ChatTimestampTemplateDirective, typeof ChatStatusTemplateDirective, typeof ChatSuggestionTemplateDirective, typeof ChatUserStatusTemplateDirective, typeof InlineAIPromptComponent, typeof InlineAIPromptOutputTemplateDirective, typeof InlineAIPromptCustomMessagesComponent, typeof PromptBoxComponent, typeof PromptBoxCustomMessagesComponent, typeof PromptBoxStartAffixComponent, typeof PromptBoxEndAffixComponent, typeof PromptBoxTopAffixComponent, typeof PromptBoxSpeechToTextButtonComponent, typeof PromptBoxActionButtonComponent, typeof PromptBoxFileSelectButtonComponent, typeof PromptBoxHeaderTemplateDirective]>;
|
|
4190
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ConversationalUIModule>;
|
|
4191
|
+
}
|
|
4192
|
+
|
|
4193
|
+
/**
|
|
4194
|
+
* Represents the [`NgModule`](link:site.data.urls.angular['ngmodules']) for the InlineAIPrompt component.
|
|
4195
|
+
*
|
|
4196
|
+
* @example
|
|
4197
|
+
* ```ts
|
|
4198
|
+
* import { NgModule } from '@angular/core';
|
|
4199
|
+
* import { BrowserModule } from '@angular/platform-browser';
|
|
4200
|
+
* import { InlineAIPromptModule } from '@progress/kendo-angular-conversational-ui';
|
|
4201
|
+
* import { AppComponent } from './app.component';
|
|
4202
|
+
*
|
|
4203
|
+
* @NgModule({
|
|
4204
|
+
* imports: [BrowserModule, InlineAIPromptModule],
|
|
4205
|
+
* declarations: [AppComponent],
|
|
4206
|
+
* bootstrap: [AppComponent]
|
|
4207
|
+
* })
|
|
4208
|
+
* export class AppModule {}
|
|
4209
|
+
* ```
|
|
4210
|
+
*/
|
|
4211
|
+
declare class InlineAIPromptModule {
|
|
4212
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InlineAIPromptModule, never>;
|
|
4213
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<InlineAIPromptModule, never, [typeof InlineAIPromptComponent, typeof InlineAIPromptOutputTemplateDirective, typeof InlineAIPromptCustomMessagesComponent], [typeof InlineAIPromptComponent, typeof InlineAIPromptOutputTemplateDirective, typeof InlineAIPromptCustomMessagesComponent]>;
|
|
4214
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<InlineAIPromptModule>;
|
|
4215
|
+
}
|
|
4216
|
+
|
|
4217
|
+
/**
|
|
4218
|
+
* Provides a service for opening and configuring the Inline AI Prompt component dynamically.
|
|
4219
|
+
*
|
|
4220
|
+
* @example
|
|
4221
|
+
* ```ts
|
|
4222
|
+
* export class DemoComponent {
|
|
4223
|
+
* @ViewChild('anchor', { read: ElementRef }) anchor: ElementRef;
|
|
4224
|
+
* constructor(private promptService: InlineAIPromptService) {}
|
|
4225
|
+
*
|
|
4226
|
+
* open(): void {
|
|
4227
|
+
* this.promptService.open({
|
|
4228
|
+
* popupSettings: { anchor: this.anchor },
|
|
4229
|
+
* placeholder: 'Enter your prompt...'
|
|
4230
|
+
* });
|
|
4231
|
+
* }
|
|
4232
|
+
* }
|
|
4233
|
+
* ```
|
|
4234
|
+
* ```html
|
|
4235
|
+
* <button #anchor (click)="open()">Ask AI</button>
|
|
4236
|
+
* ```
|
|
4237
|
+
*/
|
|
4238
|
+
declare class InlineAIPromptService {
|
|
4239
|
+
private popupService;
|
|
4240
|
+
/**
|
|
4241
|
+
* @hidden
|
|
4242
|
+
*/
|
|
4243
|
+
constructor(popupService: PopupService);
|
|
4244
|
+
/**
|
|
4245
|
+
* Opens an Inline AI Prompt component in a popup. The popup appears near the specified anchor element or at the provided offset coordinates.
|
|
4246
|
+
*
|
|
4247
|
+
* @param {InlineAIPromptSettings} options The options for the InlineAIPromptComponent.
|
|
4248
|
+
* @returns {PopupRef} A reference to the popup.
|
|
4249
|
+
*/
|
|
4250
|
+
open(options: InlineAIPromptSettings): PopupRef;
|
|
4251
|
+
/**
|
|
4252
|
+
* Projects the input options onto the component instance.
|
|
4253
|
+
*/
|
|
4254
|
+
private projectComponentInputs;
|
|
4255
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InlineAIPromptService, never>;
|
|
4256
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InlineAIPromptService>;
|
|
4257
|
+
}
|
|
4258
|
+
|
|
4259
|
+
/**
|
|
4260
|
+
* Utility array that contains all AIPrompt related components and directives.
|
|
4261
|
+
*
|
|
4262
|
+
* @example
|
|
4263
|
+
* ```ts
|
|
4264
|
+
* import { Component } from '@angular/core';
|
|
4265
|
+
* import { KENDO_AIPROMPT } from '@progress/kendo-angular-conversational-ui';
|
|
4266
|
+
*
|
|
4267
|
+
* @Component({
|
|
4268
|
+
* standalone: true,
|
|
4269
|
+
* imports: [KENDO_AIPROMPT],
|
|
4270
|
+
* selector: 'my-app',
|
|
4271
|
+
* template: `<kendo-aiprompt></kendo-aiprompt>`
|
|
4272
|
+
* })
|
|
4273
|
+
* export class AppComponent {}
|
|
4274
|
+
* ```
|
|
4275
|
+
*/
|
|
4276
|
+
declare const KENDO_AIPROMPT: readonly [typeof AIPromptComponent, typeof PromptViewComponent, typeof OutputViewComponent, typeof CommandViewComponent, typeof CustomViewComponent, typeof AIPromptCustomMessagesComponent, typeof AIPromptToolbarActionsDirective, typeof AIPromptToolbarFocusableDirective, typeof AIPromptOutputTemplateDirective, typeof AIPromptOutputBodyTemplateDirective];
|
|
4277
|
+
/**
|
|
4278
|
+
* Utility array that contains all Chat related components and directives.
|
|
4279
|
+
*
|
|
4280
|
+
* @example
|
|
4281
|
+
* ```ts
|
|
4282
|
+
* import { Component } from '@angular/core';
|
|
4283
|
+
* import { KENDO_CHAT } from '@progress/kendo-angular-conversational-ui';
|
|
4284
|
+
*
|
|
4285
|
+
* @Component({
|
|
4286
|
+
* standalone: true,
|
|
4287
|
+
* imports: [KENDO_CHAT],
|
|
4288
|
+
* selector: 'my-app',
|
|
4289
|
+
* template: `<kendo-chat></kendo-chat>`
|
|
4290
|
+
* })
|
|
4291
|
+
* export class AppComponent {}
|
|
4292
|
+
* ```
|
|
4293
|
+
*/
|
|
4294
|
+
declare const KENDO_CHAT: readonly [typeof ChatComponent, typeof CustomMessagesComponent, typeof AttachmentTemplateDirective, typeof AuthorMessageContentTemplateDirective, typeof ReceiverMessageContentTemplateDirective, typeof MessageContentTemplateDirective, typeof AuthorMessageTemplateDirective, typeof ReceiverMessageTemplateDirective, typeof MessageTemplateDirective, typeof HeroCardComponent, typeof ChatMessageBoxTemplateDirective, typeof ChatMessageBoxStartAffixTemplateDirective, typeof ChatMessageBoxEndAffixTemplateDirective, typeof ChatMessageBoxTopAffixTemplateDirective, typeof ChatHeaderTemplateDirective, typeof NoDataTemplateDirective, typeof ChatTimestampTemplateDirective, typeof ChatStatusTemplateDirective, typeof ChatSuggestionTemplateDirective, typeof ChatUserStatusTemplateDirective];
|
|
4295
|
+
/**
|
|
4296
|
+
* Utility array that contains all InlineAIPrompt related components and directives.
|
|
4297
|
+
*
|
|
4298
|
+
* @example
|
|
4299
|
+
* ```ts
|
|
4300
|
+
* import { Component } from '@angular/core';
|
|
4301
|
+
* import { KENDO_INLINEAIPROMPT } from '@progress/kendo-angular-conversational-ui';
|
|
4302
|
+
*
|
|
4303
|
+
* @Component({
|
|
4304
|
+
* standalone: true,
|
|
4305
|
+
* imports: [KENDO_INLINEAIPROMPT],
|
|
4306
|
+
* selector: 'my-app',
|
|
4307
|
+
* template: `<kendo-inlineaiprompt></kendo-inlineaiprompt>`
|
|
4308
|
+
* })
|
|
4309
|
+
* export class AppComponent {}
|
|
4310
|
+
* ```
|
|
4311
|
+
*/
|
|
4312
|
+
declare const KENDO_INLINEAIPROMPT: readonly [typeof InlineAIPromptComponent, typeof InlineAIPromptOutputTemplateDirective, typeof InlineAIPromptCustomMessagesComponent];
|
|
4313
|
+
/**
|
|
4314
|
+
* Utility array that contains all PromptBox related components and directives.
|
|
4315
|
+
*
|
|
4316
|
+
* @example
|
|
4317
|
+
* ```ts
|
|
4318
|
+
* import { Component } from '@angular/core';
|
|
4319
|
+
* import { KENDO_PROMPTBOX } from '@progress/kendo-angular-conversational-ui';
|
|
4320
|
+
*
|
|
4321
|
+
* @Component({
|
|
4322
|
+
* standalone: true,
|
|
4323
|
+
* imports: [KENDO_PROMPTBOX],
|
|
4324
|
+
* selector: 'my-app',
|
|
4325
|
+
* template: `<kendo-promptbox></kendo-promptbox>`
|
|
4326
|
+
* })
|
|
4327
|
+
* export class AppComponent {}
|
|
4328
|
+
* ```
|
|
4329
|
+
*/
|
|
4330
|
+
declare const KENDO_PROMPTBOX: readonly [typeof PromptBoxComponent, typeof PromptBoxCustomMessagesComponent, typeof PromptBoxStartAffixComponent, typeof PromptBoxEndAffixComponent, typeof PromptBoxTopAffixComponent, typeof PromptBoxSpeechToTextButtonComponent, typeof PromptBoxActionButtonComponent, typeof PromptBoxFileSelectButtonComponent, typeof PromptBoxHeaderTemplateDirective];
|
|
4331
|
+
/**
|
|
4332
|
+
* Utility array that contains all `@progress/kendo-angular-conversational-ui` related components and directives.
|
|
4333
|
+
*
|
|
4334
|
+
* @example
|
|
4335
|
+
* ```ts
|
|
4336
|
+
* import { Component } from '@angular/core';
|
|
4337
|
+
* import { KENDO_CONVERSATIONALUI } from '@progress/kendo-angular-conversational-ui';
|
|
4338
|
+
*
|
|
4339
|
+
* @Component({
|
|
4340
|
+
* standalone: true,
|
|
4341
|
+
* imports: [KENDO_CONVERSATIONALUI],
|
|
4342
|
+
* selector: 'my-app',
|
|
4343
|
+
* template: `
|
|
4344
|
+
* <kendo-aiprompt></kendo-aiprompt>
|
|
4345
|
+
* <kendo-chat></kendo-chat>
|
|
4346
|
+
* `
|
|
4347
|
+
* })
|
|
4348
|
+
* export class AppComponent {}
|
|
4349
|
+
* ```
|
|
4350
|
+
*/
|
|
4351
|
+
declare const KENDO_CONVERSATIONALUI: readonly [typeof AIPromptComponent, typeof PromptViewComponent, typeof OutputViewComponent, typeof CommandViewComponent, typeof CustomViewComponent, typeof AIPromptCustomMessagesComponent, typeof AIPromptToolbarActionsDirective, typeof AIPromptToolbarFocusableDirective, typeof AIPromptOutputTemplateDirective, typeof AIPromptOutputBodyTemplateDirective, typeof ChatComponent, typeof CustomMessagesComponent, typeof AttachmentTemplateDirective, typeof AuthorMessageContentTemplateDirective, typeof ReceiverMessageContentTemplateDirective, typeof MessageContentTemplateDirective, typeof AuthorMessageTemplateDirective, typeof ReceiverMessageTemplateDirective, typeof MessageTemplateDirective, typeof HeroCardComponent, typeof ChatMessageBoxTemplateDirective, typeof ChatMessageBoxStartAffixTemplateDirective, typeof ChatMessageBoxEndAffixTemplateDirective, typeof ChatMessageBoxTopAffixTemplateDirective, typeof ChatHeaderTemplateDirective, typeof NoDataTemplateDirective, typeof ChatTimestampTemplateDirective, typeof ChatStatusTemplateDirective, typeof ChatSuggestionTemplateDirective, typeof ChatUserStatusTemplateDirective, typeof InlineAIPromptComponent, typeof InlineAIPromptOutputTemplateDirective, typeof InlineAIPromptCustomMessagesComponent, typeof PromptBoxComponent, typeof PromptBoxCustomMessagesComponent, typeof PromptBoxStartAffixComponent, typeof PromptBoxEndAffixComponent, typeof PromptBoxTopAffixComponent, typeof PromptBoxSpeechToTextButtonComponent, typeof PromptBoxActionButtonComponent, typeof PromptBoxFileSelectButtonComponent, typeof PromptBoxHeaderTemplateDirective];
|
|
4352
|
+
|
|
4353
|
+
export { AIPromptComponent, AIPromptCustomMessagesComponent, AIPromptModule, AIPromptOutputBodyTemplateDirective, AIPromptOutputTemplateDirective, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, AttachmentTemplateDirective, AuthorMessageContentTemplateDirective, AuthorMessageTemplateDirective, ChatComponent, ChatHeaderTemplateDirective, ChatMessageBoxEndAffixTemplateDirective, ChatMessageBoxStartAffixTemplateDirective, ChatMessageBoxTemplateDirective, ChatMessageBoxTopAffixTemplateDirective, ChatModule, ChatStatusTemplateDirective, ChatSuggestionTemplateDirective, ChatTimestampTemplateDirective, ChatUserStatusTemplateDirective, CommandViewComponent, ConversationalUIModule, CustomMessagesComponent, CustomViewComponent, ExecuteActionEvent, HeroCardComponent, InlineAIPromptComponent, InlineAIPromptCustomMessagesComponent, InlineAIPromptModule, InlineAIPromptOutputTemplateDirective, InlineAIPromptService, InlineAIPromptSettings, KENDO_AIPROMPT, KENDO_CHAT, KENDO_CONVERSATIONALUI, KENDO_INLINEAIPROMPT, KENDO_PROMPTBOX, MessageContentTemplateDirective, MessageTemplateDirective, NoDataTemplateDirective, OutputViewComponent, PromptBoxActionButtonComponent, PromptBoxComponent, PromptBoxCustomMessagesComponent, PromptBoxEndAffixComponent, PromptBoxFileSelectButtonComponent, PromptBoxHeaderTemplateDirective, PromptBoxSpeechToTextButtonComponent, PromptBoxStartAffixComponent, PromptBoxTopAffixComponent, PromptViewComponent, ReceiverMessageContentTemplateDirective, ReceiverMessageTemplateDirective, SendMessageEvent };
|
|
4354
|
+
export type { AIPromptSettings, Action, ActionButtonEvent, ActionButtonSettings, ActionType, Attachment, AttachmentLayout, ChatFile, ChatLoadMoreEvent, ChatReferencedMessageClickEvent, ChatSuggestion, CommandExecuteEvent, ConversationalUIModelFields, FileAction, FileActionEvent, FileDownloadEvent, FileSelectButtonSettings, FilesLayoutMode, InlineAIPromptCommand, InlineAIPromptMessages, InlineAIPromptOutput, InlineAIPromptOutputAction, InlineAIPromptOutputActionClickEvent, InlineAIPromptPopupSettings, InlineAIPromptRequestEvent, Message, MessageAction, MessageActionEvent, MessageBoxSettings, MessageBoxType, MessageSettings, MessageStatus, MessageWidthMode, OutputRatingChangeEvent, PromptBoxMode, PromptCommand, PromptOutput, PromptOutputRating, PromptRequestEvent, QuickActionsLayoutMode, ResendMessageEvent, ScrollMode, SendButtonSettings, SuggestionsLayoutMode, TimestampVisibilityMode, User };
|