@progress/kendo-angular-conversational-ui 16.5.0 → 16.6.0-develop.10
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/NOTICE.txt +12 -19
- package/ai-prompt/aiprompt.component.d.ts +1 -1
- package/ai-prompt/aiprompt.module.d.ts +1 -8
- package/ai-prompt/common/output-card.component.d.ts +1 -1
- package/ai-prompt/common/toolbar-focusable.directive.d.ts +1 -1
- package/ai-prompt/localization/custom-messages.component.d.ts +1 -1
- package/ai-prompt/localization/localized-messages.directive.d.ts +1 -1
- package/ai-prompt/templates/toolbar-actions.template.d.ts +1 -1
- package/ai-prompt/views/command-view.component.d.ts +2 -2
- package/ai-prompt/views/custom-view.component.d.ts +1 -1
- package/ai-prompt/views/output-view.component.d.ts +1 -1
- package/ai-prompt/views/prompt-view.component.d.ts +1 -1
- package/chat/api/message.interface.d.ts +1 -1
- package/chat/api/user.interface.d.ts +1 -1
- package/chat/attachment-template.directive.d.ts +1 -1
- package/chat/attachment.component.d.ts +1 -1
- package/chat/cards/hero-card.component.d.ts +1 -1
- package/chat/chat.component.d.ts +1 -1
- package/chat/chat.module.d.ts +1 -13
- package/chat/common/focused-state.directive.d.ts +1 -1
- package/chat/common/scroll-anchor.directive.d.ts +1 -1
- package/chat/l10n/custom-messages.component.d.ts +1 -1
- package/chat/l10n/localized-messages.directive.d.ts +1 -1
- package/chat/message-attachments.component.d.ts +3 -3
- package/chat/message-box.component.d.ts +3 -3
- package/chat/message-box.directive.d.ts +1 -1
- package/chat/message-list.component.d.ts +3 -3
- package/chat/message-template.directive.d.ts +1 -1
- package/chat/message.component.d.ts +1 -1
- package/chat/suggested-actions.component.d.ts +1 -1
- package/conversational-ui.module.d.ts +15 -3
- package/directives.d.ts +29 -0
- package/esm2020/ai-prompt/aiprompt.component.mjs +10 -8
- package/esm2020/ai-prompt/aiprompt.module.mjs +19 -63
- package/esm2020/ai-prompt/common/output-card.component.mjs +7 -5
- package/esm2020/ai-prompt/common/toolbar-focusable.directive.mjs +3 -2
- package/esm2020/ai-prompt/localization/custom-messages.component.mjs +3 -2
- package/esm2020/ai-prompt/localization/localized-messages.directive.mjs +3 -2
- package/esm2020/ai-prompt/templates/toolbar-actions.template.mjs +3 -2
- package/esm2020/ai-prompt/views/command-view.component.mjs +6 -4
- package/esm2020/ai-prompt/views/custom-view.component.mjs +3 -2
- package/esm2020/ai-prompt/views/output-view.component.mjs +7 -5
- package/esm2020/ai-prompt/views/prompt-view.component.mjs +8 -6
- package/esm2020/chat/attachment-template.directive.mjs +3 -2
- package/esm2020/chat/attachment.component.mjs +6 -4
- package/esm2020/chat/cards/hero-card.component.mjs +7 -5
- package/esm2020/chat/chat.component.mjs +8 -7
- package/esm2020/chat/chat.module.mjs +15 -71
- package/esm2020/chat/common/focused-state.directive.mjs +3 -2
- package/esm2020/chat/common/scroll-anchor.directive.mjs +3 -2
- package/esm2020/chat/l10n/custom-messages.component.mjs +3 -2
- package/esm2020/chat/l10n/localized-messages.directive.mjs +3 -2
- package/esm2020/chat/message-attachments.component.mjs +10 -8
- package/esm2020/chat/message-box.component.mjs +10 -8
- package/esm2020/chat/message-box.directive.mjs +3 -2
- package/esm2020/chat/message-list.component.mjs +11 -12
- package/esm2020/chat/message-template.directive.mjs +3 -2
- package/esm2020/chat/message.component.mjs +6 -4
- package/esm2020/chat/suggested-actions.component.mjs +6 -4
- package/esm2020/conversational-ui.module.mjs +25 -5
- package/esm2020/directives.mjs +48 -0
- package/esm2020/index.mjs +1 -0
- package/esm2020/package-metadata.mjs +2 -2
- package/fesm2015/progress-kendo-angular-conversational-ui.mjs +1285 -1306
- package/fesm2020/progress-kendo-angular-conversational-ui.mjs +649 -670
- package/index.d.ts +1 -0
- package/package.json +10 -10
@@ -3,25 +3,22 @@
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
5
|
import * as i0 from '@angular/core';
|
6
|
-
import { Directive, Optional,
|
7
|
-
import * as i1 from '@progress/kendo-angular-l10n';
|
6
|
+
import { Directive, Optional, HostBinding, HostListener, EventEmitter, Component, ViewChild, Input, Output, isDevMode, forwardRef, ViewChildren, ElementRef, ContentChild, InjectionToken, Inject, Injectable, ContentChildren, NgModule } from '@angular/core';
|
7
|
+
import * as i1$1 from '@progress/kendo-angular-l10n';
|
8
8
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
9
9
|
import { validatePackage } from '@progress/kendo-licensing';
|
10
|
-
import
|
11
|
-
import { Keys,
|
10
|
+
import { NgIf, NgTemplateOutlet, NgFor, NgSwitch, NgSwitchCase } from '@angular/common';
|
11
|
+
import { Keys, ResizeSensorComponent, isPresent, focusableSelector, guid, ResizeBatchService } from '@progress/kendo-angular-common';
|
12
|
+
import { paperPlaneIcon, chevronLeftIcon, chevronRightIcon, sparklesIcon, commentIcon, moreHorizontalIcon, copyIcon, arrowRotateCwIcon, thumbUpOutlineIcon, thumbDownOutlineIcon, thumbUpIcon, thumbDownIcon, chevronUpIcon, chevronDownIcon } from '@progress/kendo-svg-icons';
|
13
|
+
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
12
14
|
import { fromEvent, Subscription, Subject } from 'rxjs';
|
13
|
-
import * as
|
14
|
-
import { CommonModule } from '@angular/common';
|
15
|
-
import * as i1$1 from '@progress/kendo-angular-intl';
|
15
|
+
import * as i1 from '@progress/kendo-angular-intl';
|
16
16
|
import { debounceTime } from 'rxjs/operators';
|
17
|
-
import {
|
18
|
-
import
|
19
|
-
import {
|
20
|
-
import {
|
21
|
-
import
|
22
|
-
import { InputsModule } from '@progress/kendo-angular-inputs';
|
23
|
-
import * as i3$1 from '@progress/kendo-angular-layout';
|
24
|
-
import { LayoutModule } from '@progress/kendo-angular-layout';
|
17
|
+
import { IconsService } from '@progress/kendo-angular-icons';
|
18
|
+
import { PopupService } from '@progress/kendo-angular-popup';
|
19
|
+
import { DialogContainerService, DialogService, WindowService, WindowContainerService } from '@progress/kendo-angular-dialog';
|
20
|
+
import { PanelBarComponent } from '@progress/kendo-angular-layout';
|
21
|
+
import { TextAreaComponent } from '@progress/kendo-angular-inputs';
|
25
22
|
|
26
23
|
/**
|
27
24
|
* Defines a template that will be used for displaying message attachments. To define an attachment
|
@@ -41,11 +38,12 @@ class AttachmentTemplateDirective {
|
|
41
38
|
}
|
42
39
|
}
|
43
40
|
AttachmentTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AttachmentTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
44
|
-
AttachmentTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AttachmentTemplateDirective, selector: "[kendoChatAttachmentTemplate]", ngImport: i0 });
|
41
|
+
AttachmentTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AttachmentTemplateDirective, isStandalone: true, selector: "[kendoChatAttachmentTemplate]", ngImport: i0 });
|
45
42
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AttachmentTemplateDirective, decorators: [{
|
46
43
|
type: Directive,
|
47
44
|
args: [{
|
48
|
-
selector: '[kendoChatAttachmentTemplate]'
|
45
|
+
selector: '[kendoChatAttachmentTemplate]',
|
46
|
+
standalone: true
|
49
47
|
}]
|
50
48
|
}], ctorParameters: function () {
|
51
49
|
return [{ type: i0.TemplateRef, decorators: [{
|
@@ -105,11 +103,12 @@ class MessageTemplateDirective {
|
|
105
103
|
}
|
106
104
|
}
|
107
105
|
MessageTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
108
|
-
MessageTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: MessageTemplateDirective, selector: "[kendoChatMessageTemplate]", ngImport: i0 });
|
106
|
+
MessageTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: MessageTemplateDirective, isStandalone: true, selector: "[kendoChatMessageTemplate]", ngImport: i0 });
|
109
107
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageTemplateDirective, decorators: [{
|
110
108
|
type: Directive,
|
111
109
|
args: [{
|
112
|
-
selector: '[kendoChatMessageTemplate]'
|
110
|
+
selector: '[kendoChatMessageTemplate]',
|
111
|
+
standalone: true
|
113
112
|
}]
|
114
113
|
}], ctorParameters: function () {
|
115
114
|
return [{ type: i0.TemplateRef, decorators: [{
|
@@ -124,8 +123,8 @@ const packageMetadata = {
|
|
124
123
|
name: '@progress/kendo-angular-conversational-ui',
|
125
124
|
productName: 'Kendo UI for Angular',
|
126
125
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
127
|
-
publishDate:
|
128
|
-
version: '16.
|
126
|
+
publishDate: 1722607209,
|
127
|
+
version: '16.6.0-develop.10',
|
129
128
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
130
129
|
};
|
131
130
|
|
@@ -140,72 +139,227 @@ class ChatMessageBoxTemplateDirective {
|
|
140
139
|
}
|
141
140
|
}
|
142
141
|
ChatMessageBoxTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatMessageBoxTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
143
|
-
ChatMessageBoxTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ChatMessageBoxTemplateDirective, selector: "[kendoChatMessageBoxTemplate]", ngImport: i0 });
|
142
|
+
ChatMessageBoxTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ChatMessageBoxTemplateDirective, isStandalone: true, selector: "[kendoChatMessageBoxTemplate]", ngImport: i0 });
|
144
143
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatMessageBoxTemplateDirective, decorators: [{
|
145
144
|
type: Directive,
|
146
145
|
args: [{
|
147
|
-
selector: '[kendoChatMessageBoxTemplate]'
|
146
|
+
selector: '[kendoChatMessageBoxTemplate]',
|
147
|
+
standalone: true
|
148
148
|
}]
|
149
149
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
150
150
|
|
151
151
|
/**
|
152
152
|
* @hidden
|
153
153
|
*/
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
154
|
+
class FocusedStateDirective {
|
155
|
+
constructor() {
|
156
|
+
this.focused = false;
|
157
|
+
}
|
158
|
+
onFocus() {
|
159
|
+
this.focused = true;
|
160
|
+
}
|
161
|
+
onBlur() {
|
162
|
+
this.focused = false;
|
163
|
+
}
|
164
|
+
}
|
165
|
+
FocusedStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FocusedStateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
166
|
+
FocusedStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FocusedStateDirective, isStandalone: true, selector: "[kendoChatFocusedState]", host: { listeners: { "focusin": "onFocus()", "focusout": "onBlur()" }, properties: { "class.k-focus": "this.focused" } }, ngImport: i0 });
|
167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FocusedStateDirective, decorators: [{
|
159
168
|
type: Directive,
|
160
169
|
args: [{
|
161
|
-
|
162
|
-
|
170
|
+
selector: '[kendoChatFocusedState]',
|
171
|
+
standalone: true
|
163
172
|
}]
|
164
|
-
}], propDecorators: {
|
165
|
-
type:
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
}],
|
171
|
-
type:
|
172
|
-
|
173
|
-
type: Input
|
174
|
-
}], messageAttachmentRightArrow: [{
|
175
|
-
type: Input
|
176
|
-
}], messageAvatarAlt: [{
|
177
|
-
type: Input
|
173
|
+
}], propDecorators: { focused: [{
|
174
|
+
type: HostBinding,
|
175
|
+
args: ['class.k-focus']
|
176
|
+
}], onFocus: [{
|
177
|
+
type: HostListener,
|
178
|
+
args: ['focusin']
|
179
|
+
}], onBlur: [{
|
180
|
+
type: HostListener,
|
181
|
+
args: ['focusout']
|
178
182
|
}] } });
|
179
183
|
|
180
|
-
// eslint-disable no-forward-ref
|
181
184
|
/**
|
182
185
|
* @hidden
|
183
186
|
*/
|
184
|
-
|
185
|
-
constructor(
|
186
|
-
|
187
|
-
this.
|
187
|
+
class MessageBoxComponent {
|
188
|
+
constructor() {
|
189
|
+
this.hostClasses = 'k-message-box k-input k-input-md k-rounded-md k-input-solid';
|
190
|
+
this.sendMessage = new EventEmitter();
|
191
|
+
/**
|
192
|
+
* @hidden
|
193
|
+
*/
|
194
|
+
this.sendIcon = paperPlaneIcon;
|
188
195
|
}
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
196
|
+
get messageBoxValue() {
|
197
|
+
return this.type === 'textarea';
|
198
|
+
}
|
199
|
+
/**
|
200
|
+
* @hidden
|
201
|
+
*/
|
202
|
+
sendClick() {
|
203
|
+
const input = this.messageBoxInput.nativeElement;
|
204
|
+
const value = input.value;
|
205
|
+
if (!value) {
|
206
|
+
return;
|
195
207
|
}
|
196
|
-
|
197
|
-
|
198
|
-
|
208
|
+
const message = {
|
209
|
+
author: this.user,
|
210
|
+
text: value,
|
211
|
+
timestamp: new Date()
|
212
|
+
};
|
213
|
+
this.sendMessage.emit(new SendMessageEvent(message));
|
214
|
+
input.value = null;
|
215
|
+
input.focus();
|
216
|
+
this.autoScroll = true;
|
217
|
+
}
|
218
|
+
/**
|
219
|
+
* @hidden
|
220
|
+
*/
|
221
|
+
inputKeydown(e) {
|
222
|
+
if (e.keyCode === Keys.Enter) {
|
223
|
+
this.sendClick();
|
224
|
+
}
|
225
|
+
}
|
226
|
+
/**
|
227
|
+
* @hidden
|
228
|
+
*/
|
229
|
+
textAreaKeydown(e) {
|
230
|
+
const isEnter = e.keyCode === Keys.Enter;
|
231
|
+
if (!isEnter) {
|
232
|
+
return;
|
233
|
+
}
|
234
|
+
const newLine = (e.metaKey || e.ctrlKey);
|
235
|
+
const enterOnly = !(e.shiftKey || e.metaKey || e.ctrlKey);
|
236
|
+
if (enterOnly) {
|
237
|
+
e.preventDefault();
|
238
|
+
this.sendClick();
|
239
|
+
}
|
240
|
+
if (newLine) {
|
241
|
+
this.messageBoxInput.nativeElement.value += `\r\n`;
|
242
|
+
}
|
243
|
+
}
|
244
|
+
/**
|
245
|
+
* @hidden
|
246
|
+
*/
|
247
|
+
textFor(key) {
|
248
|
+
return this.localization.get(key);
|
249
|
+
}
|
250
|
+
}
|
251
|
+
MessageBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
252
|
+
MessageBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MessageBoxComponent, isStandalone: true, selector: "kendo-message-box", inputs: { user: "user", autoScroll: "autoScroll", type: "type", localization: "localization", messageBoxTemplate: "messageBoxTemplate" }, outputs: { sendMessage: "sendMessage" }, host: { properties: { "class": "this.hostClasses", "class.!k-align-items-end": "this.messageBoxValue" } }, viewQueries: [{ propertyName: "messageBoxInput", first: true, predicate: ["messageBoxInput"], descendants: true }], ngImport: i0, template: `
|
253
|
+
<ng-container *ngIf="!messageBoxTemplate">
|
254
|
+
<input
|
255
|
+
*ngIf="type === 'textbox'"
|
256
|
+
#messageBoxInput
|
257
|
+
[attr.role]="'textbox'"
|
258
|
+
kendoChatFocusedState
|
259
|
+
type="text"
|
260
|
+
class="k-textbox k-input k-input-md k-input-solid"
|
261
|
+
[attr.aria-label]="textFor('messageBoxInputLabel')"
|
262
|
+
[placeholder]="textFor('messagePlaceholder')"
|
263
|
+
(keydown)="inputKeydown($event)"
|
264
|
+
/>
|
265
|
+
|
266
|
+
<textarea
|
267
|
+
*ngIf="type === 'textarea'"
|
268
|
+
#messageBoxInput
|
269
|
+
[attr.role]="'textbox'"
|
270
|
+
kendoChatFocusedState
|
271
|
+
[rows]="3"
|
272
|
+
class="k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none"
|
273
|
+
[attr.aria-label]="textFor('messageBoxInputLabel')"
|
274
|
+
[placeholder]="textFor('messagePlaceholder')"
|
275
|
+
(keydown)="textAreaKeydown($event)"
|
276
|
+
></textarea>
|
277
|
+
|
278
|
+
<button
|
279
|
+
kendoButton
|
280
|
+
fillMode="flat"
|
281
|
+
class="k-chat-send"
|
282
|
+
icon="paper-plane"
|
283
|
+
[svgIcon]="sendIcon"
|
284
|
+
[tabindex]="0"
|
285
|
+
[attr.title]="textFor('send')"
|
286
|
+
(click)="sendClick()"
|
287
|
+
>
|
288
|
+
</button>
|
289
|
+
</ng-container>
|
290
|
+
|
291
|
+
<ng-template *ngIf="messageBoxTemplate" [ngTemplateOutlet]="messageBoxTemplate?.templateRef"></ng-template>
|
292
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: FocusedStateDirective, selector: "[kendoChatFocusedState]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageBoxComponent, decorators: [{
|
294
|
+
type: Component,
|
199
295
|
args: [{
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
296
|
+
selector: 'kendo-message-box',
|
297
|
+
template: `
|
298
|
+
<ng-container *ngIf="!messageBoxTemplate">
|
299
|
+
<input
|
300
|
+
*ngIf="type === 'textbox'"
|
301
|
+
#messageBoxInput
|
302
|
+
[attr.role]="'textbox'"
|
303
|
+
kendoChatFocusedState
|
304
|
+
type="text"
|
305
|
+
class="k-textbox k-input k-input-md k-input-solid"
|
306
|
+
[attr.aria-label]="textFor('messageBoxInputLabel')"
|
307
|
+
[placeholder]="textFor('messagePlaceholder')"
|
308
|
+
(keydown)="inputKeydown($event)"
|
309
|
+
/>
|
310
|
+
|
311
|
+
<textarea
|
312
|
+
*ngIf="type === 'textarea'"
|
313
|
+
#messageBoxInput
|
314
|
+
[attr.role]="'textbox'"
|
315
|
+
kendoChatFocusedState
|
316
|
+
[rows]="3"
|
317
|
+
class="k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none"
|
318
|
+
[attr.aria-label]="textFor('messageBoxInputLabel')"
|
319
|
+
[placeholder]="textFor('messagePlaceholder')"
|
320
|
+
(keydown)="textAreaKeydown($event)"
|
321
|
+
></textarea>
|
322
|
+
|
323
|
+
<button
|
324
|
+
kendoButton
|
325
|
+
fillMode="flat"
|
326
|
+
class="k-chat-send"
|
327
|
+
icon="paper-plane"
|
328
|
+
[svgIcon]="sendIcon"
|
329
|
+
[tabindex]="0"
|
330
|
+
[attr.title]="textFor('send')"
|
331
|
+
(click)="sendClick()"
|
332
|
+
>
|
333
|
+
</button>
|
334
|
+
</ng-container>
|
335
|
+
|
336
|
+
<ng-template *ngIf="messageBoxTemplate" [ngTemplateOutlet]="messageBoxTemplate?.templateRef"></ng-template>
|
337
|
+
`,
|
338
|
+
standalone: true,
|
339
|
+
imports: [NgIf, FocusedStateDirective, ButtonComponent, NgTemplateOutlet]
|
207
340
|
}]
|
208
|
-
}],
|
341
|
+
}], propDecorators: { hostClasses: [{
|
342
|
+
type: HostBinding,
|
343
|
+
args: ['class']
|
344
|
+
}], messageBoxValue: [{
|
345
|
+
type: HostBinding,
|
346
|
+
args: ['class.\!k-align-items-end']
|
347
|
+
}], messageBoxInput: [{
|
348
|
+
type: ViewChild,
|
349
|
+
args: ['messageBoxInput', { static: false }]
|
350
|
+
}], user: [{
|
351
|
+
type: Input
|
352
|
+
}], autoScroll: [{
|
353
|
+
type: Input
|
354
|
+
}], type: [{
|
355
|
+
type: Input
|
356
|
+
}], localization: [{
|
357
|
+
type: Input
|
358
|
+
}], messageBoxTemplate: [{
|
359
|
+
type: Input
|
360
|
+
}], sendMessage: [{
|
361
|
+
type: Output
|
362
|
+
}] } });
|
209
363
|
|
210
364
|
/**
|
211
365
|
* @hidden
|
@@ -378,7 +532,7 @@ class SuggestedActionsComponent extends ChatItem {
|
|
378
532
|
}
|
379
533
|
}
|
380
534
|
SuggestedActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SuggestedActionsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
381
|
-
SuggestedActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: { actions: "actions", tabbable: "tabbable" }, outputs: { dispatch: "dispatch" }, host: { properties: { "class.k-quick-replies": "this.defaultClass" } }, providers: [{
|
535
|
+
SuggestedActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SuggestedActionsComponent, isStandalone: true, selector: "kendo-chat-suggested-actions", inputs: { actions: "actions", tabbable: "tabbable" }, outputs: { dispatch: "dispatch" }, host: { properties: { "class.k-quick-replies": "this.defaultClass" } }, providers: [{
|
382
536
|
provide: ChatItem,
|
383
537
|
useExisting: forwardRef(() => SuggestedActionsComponent)
|
384
538
|
}], viewQueries: [{ propertyName: "items", predicate: ["item"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
@@ -397,7 +551,7 @@ SuggestedActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
|
|
397
551
|
>
|
398
552
|
{{ action.title || action.value }}
|
399
553
|
</span>
|
400
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
554
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
401
555
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SuggestedActionsComponent, decorators: [{
|
402
556
|
type: Component,
|
403
557
|
args: [{
|
@@ -422,7 +576,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
422
576
|
>
|
423
577
|
{{ action.title || action.value }}
|
424
578
|
</span>
|
425
|
-
|
579
|
+
`,
|
580
|
+
standalone: true,
|
581
|
+
imports: [NgFor]
|
426
582
|
}]
|
427
583
|
}], propDecorators: { actions: [{
|
428
584
|
type: Input
|
@@ -459,8 +615,8 @@ class MessageComponent extends ChatItem {
|
|
459
615
|
this.element.nativeElement.focus();
|
460
616
|
}
|
461
617
|
}
|
462
|
-
MessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageComponent, deps: [{ token: i0.ElementRef }, { token: i1
|
463
|
-
MessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MessageComponent, selector: "kendo-chat-message", inputs: { message: "message", tabbable: "tabbable", template: "template" }, host: { properties: { "class.k-message": "this.cssClass", "class.k-selected": "this.selected", "class.k-focus": "this.selected", "attr.tabIndex": "this.tabIndex" } }, providers: [{
|
618
|
+
MessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageComponent, deps: [{ token: i0.ElementRef }, { token: i1.IntlService }], target: i0.ɵɵFactoryTarget.Component });
|
619
|
+
MessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MessageComponent, isStandalone: true, selector: "kendo-chat-message", inputs: { message: "message", tabbable: "tabbable", template: "template" }, host: { properties: { "class.k-message": "this.cssClass", "class.k-selected": "this.selected", "class.k-focus": "this.selected", "attr.tabIndex": "this.tabIndex" } }, providers: [{
|
464
620
|
provide: ChatItem,
|
465
621
|
useExisting: forwardRef(() => MessageComponent)
|
466
622
|
}], usesInheritance: true, ngImport: i0, template: `
|
@@ -501,7 +657,7 @@ MessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
501
657
|
</div>
|
502
658
|
</div>
|
503
659
|
</ng-template>
|
504
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
660
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
505
661
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageComponent, decorators: [{
|
506
662
|
type: Component,
|
507
663
|
args: [{
|
@@ -548,9 +704,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
548
704
|
</div>
|
549
705
|
</div>
|
550
706
|
</ng-template>
|
551
|
-
|
707
|
+
`,
|
708
|
+
standalone: true,
|
709
|
+
imports: [NgIf, NgTemplateOutlet]
|
552
710
|
}]
|
553
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1
|
711
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.IntlService }]; }, propDecorators: { message: [{
|
554
712
|
type: Input
|
555
713
|
}], tabbable: [{
|
556
714
|
type: Input
|
@@ -594,7 +752,7 @@ class AttachmentComponent {
|
|
594
752
|
}
|
595
753
|
}
|
596
754
|
AttachmentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AttachmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
597
|
-
AttachmentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: { attachment: "attachment", template: "template" }, ngImport: i0, template: `
|
755
|
+
AttachmentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AttachmentComponent, isStandalone: true, selector: "kendo-chat-attachment", inputs: { attachment: "attachment", template: "template" }, ngImport: i0, template: `
|
598
756
|
<ng-container *ngIf="template">
|
599
757
|
<ng-container *ngTemplateOutlet="template.templateRef; context: context;">
|
600
758
|
</ng-container>
|
@@ -614,7 +772,7 @@ AttachmentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
614
772
|
</ng-container>
|
615
773
|
</div>
|
616
774
|
</div>
|
617
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
775
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
618
776
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AttachmentComponent, decorators: [{
|
619
777
|
type: Component,
|
620
778
|
args: [{
|
@@ -639,7 +797,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
639
797
|
</ng-container>
|
640
798
|
</div>
|
641
799
|
</div>
|
642
|
-
|
800
|
+
`,
|
801
|
+
standalone: true,
|
802
|
+
imports: [NgIf, NgTemplateOutlet]
|
643
803
|
}]
|
644
804
|
}], propDecorators: { attachment: [{
|
645
805
|
type: Input
|
@@ -755,8 +915,8 @@ class MessageAttachmentsComponent extends ChatItem {
|
|
755
915
|
return this.localization.get(key);
|
756
916
|
}
|
757
917
|
}
|
758
|
-
MessageAttachmentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageAttachmentsComponent, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
759
|
-
MessageAttachmentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MessageAttachmentsComponent, selector: "kendo-chat-message-attachments", inputs: { attachments: "attachments", layout: "layout", tabbable: "tabbable", template: "template", localization: "localization" }, host: { properties: { "class.k-card-deck-scrollwrap": "this.carousel" } }, providers: [{
|
918
|
+
MessageAttachmentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageAttachmentsComponent, deps: [{ token: i0.NgZone }, { token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
919
|
+
MessageAttachmentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MessageAttachmentsComponent, isStandalone: true, selector: "kendo-chat-message-attachments", inputs: { attachments: "attachments", layout: "layout", tabbable: "tabbable", template: "template", localization: "localization" }, host: { properties: { "class.k-card-deck-scrollwrap": "this.carousel" } }, providers: [{
|
760
920
|
provide: ChatItem,
|
761
921
|
useExisting: forwardRef(() => MessageAttachmentsComponent)
|
762
922
|
}], viewQueries: [{ propertyName: "deck", first: true, predicate: ["deck"], descendants: true, read: ElementRef, static: true }, { propertyName: "items", predicate: ["item"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: `
|
@@ -800,7 +960,7 @@ MessageAttachmentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.
|
|
800
960
|
icon="chevron-right"
|
801
961
|
>
|
802
962
|
</button>
|
803
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
963
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: ["attachment", "template"] }] });
|
804
964
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageAttachmentsComponent, decorators: [{
|
805
965
|
type: Component,
|
806
966
|
args: [{
|
@@ -850,9 +1010,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
850
1010
|
icon="chevron-right"
|
851
1011
|
>
|
852
1012
|
</button>
|
853
|
-
|
1013
|
+
`,
|
1014
|
+
standalone: true,
|
1015
|
+
imports: [NgIf, ButtonComponent, NgFor, AttachmentComponent]
|
854
1016
|
}]
|
855
|
-
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.LocalizationService }]; }, propDecorators: { attachments: [{
|
1017
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1$1.LocalizationService }]; }, propDecorators: { attachments: [{
|
856
1018
|
type: Input
|
857
1019
|
}], layout: [{
|
858
1020
|
type: Input
|
@@ -1006,8 +1168,8 @@ class MessageListComponent {
|
|
1006
1168
|
return this.localization.get(key);
|
1007
1169
|
}
|
1008
1170
|
}
|
1009
|
-
MessageListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageListComponent, deps: [{ token: i0.ElementRef }, { token: i1
|
1010
|
-
MessageListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MessageListComponent, selector: "kendo-chat-message-list", inputs: { messages: "messages", attachmentTemplate: "attachmentTemplate", messageTemplate: "messageTemplate", localization: "localization", user: "user" }, outputs: { executeAction: "executeAction", navigate: "navigate", resize: "resize" }, host: { properties: { "class.k-message-list-content": "this.cssClass" } }, viewQueries: [{ propertyName: "items", predicate: ChatItem, descendants: true }], ngImport: i0, template: `
|
1171
|
+
MessageListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageListComponent, deps: [{ token: i0.ElementRef }, { token: i1.IntlService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
1172
|
+
MessageListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MessageListComponent, isStandalone: true, selector: "kendo-chat-message-list", inputs: { messages: "messages", attachmentTemplate: "attachmentTemplate", messageTemplate: "messageTemplate", localization: "localization", user: "user" }, outputs: { executeAction: "executeAction", navigate: "navigate", resize: "resize" }, host: { properties: { "class.k-message-list-content": "this.cssClass" } }, viewQueries: [{ propertyName: "items", predicate: ChatItem, descendants: true }], ngImport: i0, template: `
|
1011
1173
|
<ng-container *ngFor="let group of view; last as lastGroup; trackBy: trackGroup">
|
1012
1174
|
<ng-container [ngSwitch]="group.type">
|
1013
1175
|
<div
|
@@ -1091,7 +1253,7 @@ MessageListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
1091
1253
|
</ng-container>
|
1092
1254
|
<kendo-resize-sensor (resize)="onResize()">
|
1093
1255
|
</kendo-resize-sensor>
|
1094
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
1256
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MessageComponent, selector: "kendo-chat-message", inputs: ["message", "tabbable", "template"] }, { kind: "component", type: AttachmentComponent, selector: "kendo-chat-attachment", inputs: ["attachment", "template"] }, { kind: "component", type: MessageAttachmentsComponent, selector: "kendo-chat-message-attachments", inputs: ["attachments", "layout", "tabbable", "template", "localization"] }, { kind: "component", type: SuggestedActionsComponent, selector: "kendo-chat-suggested-actions", inputs: ["actions", "tabbable"], outputs: ["dispatch"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }] });
|
1095
1257
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageListComponent, decorators: [{
|
1096
1258
|
type: Component,
|
1097
1259
|
args: [{
|
@@ -1180,9 +1342,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
1180
1342
|
</ng-container>
|
1181
1343
|
<kendo-resize-sensor (resize)="onResize()">
|
1182
1344
|
</kendo-resize-sensor>
|
1183
|
-
|
1345
|
+
`,
|
1346
|
+
standalone: true,
|
1347
|
+
imports: [NgFor, NgSwitch, NgSwitchCase, NgIf, MessageComponent, AttachmentComponent, MessageAttachmentsComponent, SuggestedActionsComponent, ResizeSensorComponent]
|
1184
1348
|
}]
|
1185
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1
|
1349
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.IntlService }, { type: i0.Renderer2 }]; }, propDecorators: { messages: [{
|
1186
1350
|
type: Input
|
1187
1351
|
}], attachmentTemplate: [{
|
1188
1352
|
type: Input
|
@@ -1260,12 +1424,13 @@ class ScrollAnchorDirective {
|
|
1260
1424
|
}
|
1261
1425
|
}
|
1262
1426
|
ScrollAnchorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ScrollAnchorDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
1263
|
-
ScrollAnchorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ScrollAnchorDirective, selector: "[kendoChatScrollAnchor]", inputs: { autoScroll: "autoScroll" }, outputs: { autoScrollChange: "autoScrollChange" }, host: { properties: { "style.overflow-anchor": "this.overflowAnchor" } }, exportAs: ["scrollAnchor"], ngImport: i0 });
|
1427
|
+
ScrollAnchorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ScrollAnchorDirective, isStandalone: true, selector: "[kendoChatScrollAnchor]", inputs: { autoScroll: "autoScroll" }, outputs: { autoScrollChange: "autoScrollChange" }, host: { properties: { "style.overflow-anchor": "this.overflowAnchor" } }, exportAs: ["scrollAnchor"], ngImport: i0 });
|
1264
1428
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ScrollAnchorDirective, decorators: [{
|
1265
1429
|
type: Directive,
|
1266
1430
|
args: [{
|
1267
1431
|
selector: '[kendoChatScrollAnchor]',
|
1268
|
-
exportAs: 'scrollAnchor'
|
1432
|
+
exportAs: 'scrollAnchor',
|
1433
|
+
standalone: true
|
1269
1434
|
}]
|
1270
1435
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { autoScroll: [{
|
1271
1436
|
type: Input
|
@@ -1279,212 +1444,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
1279
1444
|
/**
|
1280
1445
|
* @hidden
|
1281
1446
|
*/
|
1282
|
-
class
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
this.focused = true;
|
1288
|
-
}
|
1289
|
-
onBlur() {
|
1290
|
-
this.focused = false;
|
1291
|
-
}
|
1292
|
-
}
|
1293
|
-
FocusedStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FocusedStateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
1294
|
-
FocusedStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FocusedStateDirective, selector: "[kendoChatFocusedState]", host: { listeners: { "focusin": "onFocus()", "focusout": "onBlur()" }, properties: { "class.k-focus": "this.focused" } }, ngImport: i0 });
|
1295
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FocusedStateDirective, decorators: [{
|
1447
|
+
let Messages$1 = class Messages extends ComponentMessages {
|
1448
|
+
};
|
1449
|
+
Messages$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Messages$1, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
1450
|
+
Messages$1.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: Messages$1, selector: "kendoConversationalUIMessages", inputs: { messagePlaceholder: "messagePlaceholder", send: "send", messageListLabel: "messageListLabel", messageBoxInputLabel: "messageBoxInputLabel", messageAttachmentLeftArrow: "messageAttachmentLeftArrow", messageAttachmentRightArrow: "messageAttachmentRightArrow", messageAvatarAlt: "messageAvatarAlt" }, usesInheritance: true, ngImport: i0 });
|
1451
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Messages$1, decorators: [{
|
1296
1452
|
type: Directive,
|
1297
1453
|
args: [{
|
1298
|
-
selector
|
1454
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
1455
|
+
selector: 'kendoConversationalUIMessages'
|
1299
1456
|
}]
|
1300
|
-
}], propDecorators: {
|
1301
|
-
type:
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
}],
|
1307
|
-
type:
|
1308
|
-
|
1457
|
+
}], propDecorators: { messagePlaceholder: [{
|
1458
|
+
type: Input
|
1459
|
+
}], send: [{
|
1460
|
+
type: Input
|
1461
|
+
}], messageListLabel: [{
|
1462
|
+
type: Input
|
1463
|
+
}], messageBoxInputLabel: [{
|
1464
|
+
type: Input
|
1465
|
+
}], messageAttachmentLeftArrow: [{
|
1466
|
+
type: Input
|
1467
|
+
}], messageAttachmentRightArrow: [{
|
1468
|
+
type: Input
|
1469
|
+
}], messageAvatarAlt: [{
|
1470
|
+
type: Input
|
1309
1471
|
}] } });
|
1310
1472
|
|
1473
|
+
// eslint-disable no-forward-ref
|
1311
1474
|
/**
|
1312
1475
|
* @hidden
|
1313
1476
|
*/
|
1314
|
-
class
|
1315
|
-
constructor() {
|
1316
|
-
|
1317
|
-
this.
|
1318
|
-
/**
|
1319
|
-
* @hidden
|
1320
|
-
*/
|
1321
|
-
this.sendIcon = paperPlaneIcon;
|
1322
|
-
}
|
1323
|
-
get messageBoxValue() {
|
1324
|
-
return this.type === 'textarea';
|
1325
|
-
}
|
1326
|
-
/**
|
1327
|
-
* @hidden
|
1328
|
-
*/
|
1329
|
-
sendClick() {
|
1330
|
-
const input = this.messageBoxInput.nativeElement;
|
1331
|
-
const value = input.value;
|
1332
|
-
if (!value) {
|
1333
|
-
return;
|
1334
|
-
}
|
1335
|
-
const message = {
|
1336
|
-
author: this.user,
|
1337
|
-
text: value,
|
1338
|
-
timestamp: new Date()
|
1339
|
-
};
|
1340
|
-
this.sendMessage.emit(new SendMessageEvent(message));
|
1341
|
-
input.value = null;
|
1342
|
-
input.focus();
|
1343
|
-
this.autoScroll = true;
|
1344
|
-
}
|
1345
|
-
/**
|
1346
|
-
* @hidden
|
1347
|
-
*/
|
1348
|
-
inputKeydown(e) {
|
1349
|
-
if (e.keyCode === Keys.Enter) {
|
1350
|
-
this.sendClick();
|
1351
|
-
}
|
1477
|
+
let LocalizedMessagesDirective$1 = class LocalizedMessagesDirective extends Messages$1 {
|
1478
|
+
constructor(service) {
|
1479
|
+
super();
|
1480
|
+
this.service = service;
|
1352
1481
|
}
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
return;
|
1360
|
-
}
|
1361
|
-
const newLine = (e.metaKey || e.ctrlKey);
|
1362
|
-
const enterOnly = !(e.shiftKey || e.metaKey || e.ctrlKey);
|
1363
|
-
if (enterOnly) {
|
1364
|
-
e.preventDefault();
|
1365
|
-
this.sendClick();
|
1366
|
-
}
|
1367
|
-
if (newLine) {
|
1368
|
-
this.messageBoxInput.nativeElement.value += `\r\n`;
|
1482
|
+
};
|
1483
|
+
LocalizedMessagesDirective$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective$1, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
1484
|
+
LocalizedMessagesDirective$1.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LocalizedMessagesDirective$1, isStandalone: true, selector: "[kendoChatLocalizedMessages]", providers: [
|
1485
|
+
{
|
1486
|
+
provide: Messages$1,
|
1487
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective$1)
|
1369
1488
|
}
|
1370
|
-
}
|
1371
|
-
|
1372
|
-
|
1373
|
-
*/
|
1374
|
-
textFor(key) {
|
1375
|
-
return this.localization.get(key);
|
1376
|
-
}
|
1377
|
-
}
|
1378
|
-
MessageBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1379
|
-
MessageBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MessageBoxComponent, selector: "kendo-message-box", inputs: { user: "user", autoScroll: "autoScroll", type: "type", localization: "localization", messageBoxTemplate: "messageBoxTemplate" }, outputs: { sendMessage: "sendMessage" }, host: { properties: { "class": "this.hostClasses", "class.!k-align-items-end": "this.messageBoxValue" } }, viewQueries: [{ propertyName: "messageBoxInput", first: true, predicate: ["messageBoxInput"], descendants: true }], ngImport: i0, template: `
|
1380
|
-
<ng-container *ngIf="!messageBoxTemplate">
|
1381
|
-
<input
|
1382
|
-
*ngIf="type === 'textbox'"
|
1383
|
-
#messageBoxInput
|
1384
|
-
[attr.role]="'textbox'"
|
1385
|
-
kendoChatFocusedState
|
1386
|
-
type="text"
|
1387
|
-
class="k-textbox k-input k-input-md k-input-solid"
|
1388
|
-
[attr.aria-label]="textFor('messageBoxInputLabel')"
|
1389
|
-
[placeholder]="textFor('messagePlaceholder')"
|
1390
|
-
(keydown)="inputKeydown($event)"
|
1391
|
-
/>
|
1392
|
-
|
1393
|
-
<textarea
|
1394
|
-
*ngIf="type === 'textarea'"
|
1395
|
-
#messageBoxInput
|
1396
|
-
[attr.role]="'textbox'"
|
1397
|
-
kendoChatFocusedState
|
1398
|
-
[rows]="3"
|
1399
|
-
class="k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none"
|
1400
|
-
[attr.aria-label]="textFor('messageBoxInputLabel')"
|
1401
|
-
[placeholder]="textFor('messagePlaceholder')"
|
1402
|
-
(keydown)="textAreaKeydown($event)"
|
1403
|
-
></textarea>
|
1404
|
-
|
1405
|
-
<button
|
1406
|
-
kendoButton
|
1407
|
-
fillMode="flat"
|
1408
|
-
class="k-chat-send"
|
1409
|
-
icon="paper-plane"
|
1410
|
-
[svgIcon]="sendIcon"
|
1411
|
-
[tabindex]="0"
|
1412
|
-
[attr.title]="textFor('send')"
|
1413
|
-
(click)="sendClick()"
|
1414
|
-
>
|
1415
|
-
</button>
|
1416
|
-
</ng-container>
|
1417
|
-
|
1418
|
-
<ng-template *ngIf="messageBoxTemplate" [ngTemplateOutlet]="messageBoxTemplate?.templateRef"></ng-template>
|
1419
|
-
`, isInline: true, dependencies: [{ kind: "component", type: i4.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: FocusedStateDirective, selector: "[kendoChatFocusedState]" }] });
|
1420
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MessageBoxComponent, decorators: [{
|
1421
|
-
type: Component,
|
1489
|
+
], usesInheritance: true, ngImport: i0 });
|
1490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective$1, decorators: [{
|
1491
|
+
type: Directive,
|
1422
1492
|
args: [{
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
type="text"
|
1432
|
-
class="k-textbox k-input k-input-md k-input-solid"
|
1433
|
-
[attr.aria-label]="textFor('messageBoxInputLabel')"
|
1434
|
-
[placeholder]="textFor('messagePlaceholder')"
|
1435
|
-
(keydown)="inputKeydown($event)"
|
1436
|
-
/>
|
1437
|
-
|
1438
|
-
<textarea
|
1439
|
-
*ngIf="type === 'textarea'"
|
1440
|
-
#messageBoxInput
|
1441
|
-
[attr.role]="'textbox'"
|
1442
|
-
kendoChatFocusedState
|
1443
|
-
[rows]="3"
|
1444
|
-
class="k-textarea k-input k-input-md k-input-solid !k-overflow-y-auto k-resize-none"
|
1445
|
-
[attr.aria-label]="textFor('messageBoxInputLabel')"
|
1446
|
-
[placeholder]="textFor('messagePlaceholder')"
|
1447
|
-
(keydown)="textAreaKeydown($event)"
|
1448
|
-
></textarea>
|
1449
|
-
|
1450
|
-
<button
|
1451
|
-
kendoButton
|
1452
|
-
fillMode="flat"
|
1453
|
-
class="k-chat-send"
|
1454
|
-
icon="paper-plane"
|
1455
|
-
[svgIcon]="sendIcon"
|
1456
|
-
[tabindex]="0"
|
1457
|
-
[attr.title]="textFor('send')"
|
1458
|
-
(click)="sendClick()"
|
1459
|
-
>
|
1460
|
-
</button>
|
1461
|
-
</ng-container>
|
1462
|
-
|
1463
|
-
<ng-template *ngIf="messageBoxTemplate" [ngTemplateOutlet]="messageBoxTemplate?.templateRef"></ng-template>
|
1464
|
-
`
|
1493
|
+
providers: [
|
1494
|
+
{
|
1495
|
+
provide: Messages$1,
|
1496
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective$1)
|
1497
|
+
}
|
1498
|
+
],
|
1499
|
+
selector: '[kendoChatLocalizedMessages]',
|
1500
|
+
standalone: true
|
1465
1501
|
}]
|
1466
|
-
}],
|
1467
|
-
type: HostBinding,
|
1468
|
-
args: ['class']
|
1469
|
-
}], messageBoxValue: [{
|
1470
|
-
type: HostBinding,
|
1471
|
-
args: ['class.\!k-align-items-end']
|
1472
|
-
}], messageBoxInput: [{
|
1473
|
-
type: ViewChild,
|
1474
|
-
args: ['messageBoxInput', { static: false }]
|
1475
|
-
}], user: [{
|
1476
|
-
type: Input
|
1477
|
-
}], autoScroll: [{
|
1478
|
-
type: Input
|
1479
|
-
}], type: [{
|
1480
|
-
type: Input
|
1481
|
-
}], localization: [{
|
1482
|
-
type: Input
|
1483
|
-
}], messageBoxTemplate: [{
|
1484
|
-
type: Input
|
1485
|
-
}], sendMessage: [{
|
1486
|
-
type: Output
|
1487
|
-
}] } });
|
1502
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
|
1488
1503
|
|
1489
1504
|
/**
|
1490
1505
|
* Represents the Kendo UI Chat component for Angular.
|
@@ -1581,8 +1596,8 @@ class ChatComponent {
|
|
1581
1596
|
return this.localization.get(key);
|
1582
1597
|
}
|
1583
1598
|
}
|
1584
|
-
ChatComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatComponent, deps: [{ token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
1585
|
-
ChatComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChatComponent, selector: "kendo-chat", inputs: { messages: "messages", user: "user", messageBoxType: "messageBoxType" }, outputs: { sendMessage: "sendMessage", executeAction: "executeAction" }, host: { properties: { "class": "this.className", "attr.dir": "this.dirAttr" } }, providers: [
|
1599
|
+
ChatComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatComponent, deps: [{ token: i1$1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
1600
|
+
ChatComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ChatComponent, isStandalone: true, selector: "kendo-chat", inputs: { messages: "messages", user: "user", messageBoxType: "messageBoxType" }, outputs: { sendMessage: "sendMessage", executeAction: "executeAction" }, host: { properties: { "class": "this.className", "attr.dir": "this.dirAttr" } }, providers: [
|
1586
1601
|
LocalizationService,
|
1587
1602
|
{
|
1588
1603
|
provide: L10N_PREFIX,
|
@@ -1645,7 +1660,7 @@ ChatComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version:
|
|
1645
1660
|
(sendMessage)="sendMessage.emit($event)"
|
1646
1661
|
>
|
1647
1662
|
</kendo-message-box>
|
1648
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective$1, selector: "[kendoChatLocalizedMessages]" }, { kind: "
|
1663
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective$1, selector: "[kendoChatLocalizedMessages]" }, { kind: "directive", type: ScrollAnchorDirective, selector: "[kendoChatScrollAnchor]", inputs: ["autoScroll"], outputs: ["autoScrollChange"], exportAs: ["scrollAnchor"] }, { kind: "component", type: MessageListComponent, selector: "kendo-chat-message-list", inputs: ["messages", "attachmentTemplate", "messageTemplate", "localization", "user"], outputs: ["executeAction", "navigate", "resize"] }, { kind: "component", type: MessageBoxComponent, selector: "kendo-message-box", inputs: ["user", "autoScroll", "type", "localization", "messageBoxTemplate"], outputs: ["sendMessage"] }] });
|
1649
1664
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatComponent, decorators: [{
|
1650
1665
|
type: Component,
|
1651
1666
|
args: [{
|
@@ -1714,9 +1729,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
1714
1729
|
(sendMessage)="sendMessage.emit($event)"
|
1715
1730
|
>
|
1716
1731
|
</kendo-message-box>
|
1717
|
-
|
1732
|
+
`,
|
1733
|
+
standalone: true,
|
1734
|
+
imports: [LocalizedMessagesDirective$1, ScrollAnchorDirective, MessageListComponent, MessageBoxComponent]
|
1718
1735
|
}]
|
1719
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.NgZone }]; }, propDecorators: { messages: [{
|
1736
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: i0.NgZone }]; }, propDecorators: { messages: [{
|
1720
1737
|
type: Input
|
1721
1738
|
}], user: [{
|
1722
1739
|
type: Input
|
@@ -1829,7 +1846,7 @@ class BaseView {
|
|
1829
1846
|
return this.localization.get(text);
|
1830
1847
|
}
|
1831
1848
|
}
|
1832
|
-
BaseView.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BaseView, deps: [{ token: MY_TOKEN }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
1849
|
+
BaseView.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BaseView, deps: [{ token: MY_TOKEN }, { token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
1833
1850
|
BaseView.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: BaseView, inputs: { buttonText: "buttonText", icon: "icon", svgIcon: "svgIcon" }, host: { properties: { "class.k-prompt-view": "this.hostClasses" } }, viewQueries: [{ propertyName: "template", first: true, predicate: ["content"], descendants: true, static: true }], ngImport: i0 });
|
1834
1851
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BaseView, decorators: [{
|
1835
1852
|
type: Directive
|
@@ -1837,7 +1854,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
1837
1854
|
return [{ type: undefined, decorators: [{
|
1838
1855
|
type: Inject,
|
1839
1856
|
args: [MY_TOKEN]
|
1840
|
-
}] }, { type: i1.LocalizationService }];
|
1857
|
+
}] }, { type: i1$1.LocalizationService }];
|
1841
1858
|
}, propDecorators: { hostClasses: [{
|
1842
1859
|
type: HostBinding,
|
1843
1860
|
args: ['class.k-prompt-view']
|
@@ -1885,1132 +1902,1069 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
1885
1902
|
}] });
|
1886
1903
|
|
1887
1904
|
/**
|
1888
|
-
*
|
1905
|
+
* Represents a template that allows you to define additional ToolBar actions.
|
1906
|
+
* The actions will be rendered right after all views' ToolBar buttons.
|
1907
|
+
* To define the template, nest an `<ng-template>` tag
|
1908
|
+
* with the `kendoAIPromptToolbarActionsTemplate` directive inside the `<kendo-aiprompt>` tag.
|
1889
1909
|
*/
|
1890
|
-
class
|
1891
|
-
constructor(
|
1892
|
-
|
1893
|
-
this.service = service;
|
1894
|
-
/**
|
1895
|
-
* @hidden
|
1896
|
-
*/
|
1897
|
-
this.showSuggestions = true;
|
1898
|
-
/**
|
1899
|
-
* @hidden
|
1900
|
-
*/
|
1901
|
-
this.contentId = `k-prompt-suggestions-${guid()}`;
|
1910
|
+
class AIPromptToolbarActionsDirective {
|
1911
|
+
constructor(templateRef) {
|
1912
|
+
this.templateRef = templateRef;
|
1902
1913
|
}
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
1909
|
-
|
1914
|
+
}
|
1915
|
+
AIPromptToolbarActionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptToolbarActionsDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
1916
|
+
AIPromptToolbarActionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AIPromptToolbarActionsDirective, isStandalone: true, selector: "[kendoAIPromptToolbarActionsTemplate]", ngImport: i0 });
|
1917
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptToolbarActionsDirective, decorators: [{
|
1918
|
+
type: Directive,
|
1919
|
+
args: [{
|
1920
|
+
selector: '[kendoAIPromptToolbarActionsTemplate]',
|
1921
|
+
standalone: true
|
1922
|
+
}]
|
1923
|
+
}], ctorParameters: function () {
|
1924
|
+
return [{ type: i0.TemplateRef, decorators: [{
|
1925
|
+
type: Optional
|
1926
|
+
}] }];
|
1927
|
+
} });
|
1928
|
+
|
1929
|
+
/**
|
1930
|
+
* @hidden
|
1931
|
+
*/
|
1932
|
+
class ToolbarNavigationService {
|
1933
|
+
constructor(localizationService) {
|
1934
|
+
this.localizationService = localizationService;
|
1935
|
+
this.focusableElements = [];
|
1936
|
+
this.currentFocusedIndex = 0;
|
1910
1937
|
}
|
1911
|
-
|
1912
|
-
|
1913
|
-
|
1914
|
-
|
1915
|
-
return this.service.promptSuggestions;
|
1938
|
+
register(tool) {
|
1939
|
+
if (!this.focusableElements.some(el => el === tool)) {
|
1940
|
+
this.focusableElements.push(tool);
|
1941
|
+
}
|
1916
1942
|
}
|
1917
|
-
|
1918
|
-
|
1919
|
-
|
1920
|
-
*/
|
1921
|
-
set textAreaValue(value) {
|
1922
|
-
this.service.promptValue = value;
|
1943
|
+
unregister(tool) {
|
1944
|
+
this.currentFocusedIndex = 0;
|
1945
|
+
this.focusableElements = this.focusableElements.filter(el => el !== tool);
|
1923
1946
|
}
|
1924
|
-
|
1925
|
-
return this.
|
1947
|
+
isActive(focusable) {
|
1948
|
+
return this.focusableElements[this.currentFocusedIndex] === focusable;
|
1926
1949
|
}
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
1950
|
+
setActiveIndex(tool) {
|
1951
|
+
this.currentFocusedIndex = Math.max(this.focusableElements.indexOf(tool), 0);
|
1952
|
+
}
|
1953
|
+
move(direction) {
|
1954
|
+
let delta = direction === 'right' ? 1 : -1;
|
1955
|
+
if (this.localizationService.rtl) {
|
1956
|
+
delta = -delta;
|
1957
|
+
}
|
1958
|
+
this.currentFocusedIndex += delta;
|
1959
|
+
if (this.currentFocusedIndex < 0) {
|
1960
|
+
this.currentFocusedIndex = this.focusableElements.length - 1;
|
1961
|
+
}
|
1962
|
+
else if (this.currentFocusedIndex >= this.focusableElements.length) {
|
1963
|
+
this.currentFocusedIndex = 0;
|
1964
|
+
}
|
1965
|
+
this.focusableElements[this.currentFocusedIndex].activate();
|
1966
|
+
}
|
1967
|
+
focusFirst() {
|
1968
|
+
this.focusableElements[this.currentFocusedIndex].activate();
|
1932
1969
|
}
|
1933
1970
|
}
|
1934
|
-
|
1935
|
-
|
1971
|
+
ToolbarNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarNavigationService, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1972
|
+
ToolbarNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarNavigationService });
|
1973
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarNavigationService, decorators: [{
|
1974
|
+
type: Injectable
|
1975
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
|
1976
|
+
|
1977
|
+
/**
|
1978
|
+
* @hidden
|
1979
|
+
*/
|
1980
|
+
class AIPromptToolbarFocusableDirective {
|
1981
|
+
constructor(host, navigationService, renderer) {
|
1982
|
+
this.host = host;
|
1983
|
+
this.navigationService = navigationService;
|
1984
|
+
this.renderer = renderer;
|
1985
|
+
this.keyDownHandler = (e) => {
|
1986
|
+
const targetsSelf = e.target === this.element;
|
1987
|
+
const isLeftArrow = e.keyCode === Keys.ArrowLeft;
|
1988
|
+
const isRightArrow = e.keyCode === Keys.ArrowRight;
|
1989
|
+
const isArrow = isLeftArrow || isRightArrow;
|
1990
|
+
if (!targetsSelf || !isArrow) {
|
1991
|
+
return;
|
1992
|
+
}
|
1993
|
+
this.renderer.setAttribute(this.element, 'tabindex', '-1');
|
1994
|
+
this.element.querySelectorAll(focusableSelector).forEach(el => {
|
1995
|
+
this.renderer.setAttribute(el, 'tabindex', '-1');
|
1996
|
+
});
|
1997
|
+
if (isRightArrow) {
|
1998
|
+
this.navigationService.move('right');
|
1999
|
+
}
|
2000
|
+
else if (isLeftArrow) {
|
2001
|
+
this.navigationService.move('left');
|
2002
|
+
}
|
2003
|
+
};
|
2004
|
+
this.clickHandler = () => {
|
2005
|
+
this.navigationService.setActiveIndex(this);
|
2006
|
+
};
|
2007
|
+
navigationService.register(this);
|
2008
|
+
}
|
2009
|
+
get element() {
|
2010
|
+
return this.host.nativeElement;
|
2011
|
+
}
|
2012
|
+
ngAfterViewInit() {
|
2013
|
+
this.renderer.setAttribute(this.element, 'tabindex', this.navigationService.isActive(this) ? '0' : '-1');
|
2014
|
+
this.element.addEventListener('keydown', this.keyDownHandler, { capture: true });
|
2015
|
+
this.element.addEventListener('click', this.clickHandler, { capture: true });
|
2016
|
+
}
|
2017
|
+
ngOnDestroy() {
|
2018
|
+
this.navigationService.unregister(this);
|
2019
|
+
this.element.removeEventListener('keydown', this.keyDownHandler, { capture: true });
|
2020
|
+
this.element.removeEventListener('click', this.clickHandler, { capture: true });
|
2021
|
+
}
|
2022
|
+
activate() {
|
2023
|
+
this.renderer.setAttribute(this.element, 'tabindex', '0');
|
2024
|
+
this.element.focus();
|
2025
|
+
}
|
2026
|
+
}
|
2027
|
+
AIPromptToolbarFocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptToolbarFocusableDirective, deps: [{ token: i0.ElementRef }, { token: ToolbarNavigationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
2028
|
+
AIPromptToolbarFocusableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AIPromptToolbarFocusableDirective, isStandalone: true, selector: "[kendoAIPromptToolbarFocusable]", ngImport: i0 });
|
2029
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptToolbarFocusableDirective, decorators: [{
|
2030
|
+
type: Directive,
|
2031
|
+
args: [{
|
2032
|
+
selector: '[kendoAIPromptToolbarFocusable]',
|
2033
|
+
standalone: true
|
2034
|
+
}]
|
2035
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ToolbarNavigationService }, { type: i0.Renderer2 }]; } });
|
2036
|
+
|
2037
|
+
/**
|
2038
|
+
* @hidden
|
2039
|
+
*/
|
2040
|
+
class Messages extends ComponentMessages {
|
2041
|
+
}
|
2042
|
+
Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
2043
|
+
Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: Messages, inputs: { promptView: "promptView", outputView: "outputView", generateOutput: "generateOutput", promptPlaceholder: "promptPlaceholder", copyOutput: "copyOutput", retryGeneration: "retryGeneration", outputTitle: "outputTitle", outputRetryTitle: "outputRetryTitle", promptSuggestions: "promptSuggestions" }, usesInheritance: true, ngImport: i0 });
|
2044
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Messages, decorators: [{
|
2045
|
+
type: Directive
|
2046
|
+
}], propDecorators: { promptView: [{
|
2047
|
+
type: Input
|
2048
|
+
}], outputView: [{
|
2049
|
+
type: Input
|
2050
|
+
}], generateOutput: [{
|
2051
|
+
type: Input
|
2052
|
+
}], promptPlaceholder: [{
|
2053
|
+
type: Input
|
2054
|
+
}], copyOutput: [{
|
2055
|
+
type: Input
|
2056
|
+
}], retryGeneration: [{
|
2057
|
+
type: Input
|
2058
|
+
}], outputTitle: [{
|
2059
|
+
type: Input
|
2060
|
+
}], outputRetryTitle: [{
|
2061
|
+
type: Input
|
2062
|
+
}], promptSuggestions: [{
|
2063
|
+
type: Input
|
2064
|
+
}] } });
|
2065
|
+
|
2066
|
+
/**
|
2067
|
+
* @hidden
|
2068
|
+
*/
|
2069
|
+
class LocalizedMessagesDirective extends Messages {
|
2070
|
+
constructor(service) {
|
2071
|
+
super();
|
2072
|
+
this.service = service;
|
2073
|
+
}
|
2074
|
+
}
|
2075
|
+
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
2076
|
+
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoAIPromptLocalizedMessages]", providers: [
|
1936
2077
|
{
|
1937
|
-
provide:
|
1938
|
-
useExisting: forwardRef(() =>
|
2078
|
+
provide: Messages,
|
2079
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
1939
2080
|
}
|
1940
|
-
], usesInheritance: true, ngImport: i0
|
1941
|
-
|
1942
|
-
|
1943
|
-
[placeholder]="messageFor('promptPlaceholder')"
|
1944
|
-
[rows]="1"
|
1945
|
-
[(value)]="textAreaValue">
|
1946
|
-
</kendo-textarea>
|
1947
|
-
<div *ngIf="promptSuggestions"
|
1948
|
-
class="k-prompt-expander">
|
1949
|
-
<button kendoButton
|
1950
|
-
[attr.aria-controls]="contentId"
|
1951
|
-
[attr.aria-expanded]="showSuggestions"
|
1952
|
-
fillMode="flat"
|
1953
|
-
[icon]="suggestionsIcons.font"
|
1954
|
-
[svgIcon]="suggestionsIcons.svg"
|
1955
|
-
type="button"
|
1956
|
-
(click)="showSuggestions = !showSuggestions">
|
1957
|
-
{{messageFor('promptSuggestions')}}
|
1958
|
-
</button>
|
1959
|
-
<div *ngIf="showSuggestions"
|
1960
|
-
class="k-prompt-expander-content"
|
1961
|
-
role="list"
|
1962
|
-
[attr.id]="contentId">
|
1963
|
-
<div *ngFor="let suggestion of promptSuggestions"
|
1964
|
-
class="k-prompt-suggestion"
|
1965
|
-
role="listitem"
|
1966
|
-
(click)="suggestionClick(suggestion)">
|
1967
|
-
{{suggestion}}
|
1968
|
-
</div>
|
1969
|
-
</div>
|
1970
|
-
</div>
|
1971
|
-
</ng-template>
|
1972
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: i5.TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }] });
|
1973
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PromptViewComponent, decorators: [{
|
1974
|
-
type: Component,
|
2081
|
+
], usesInheritance: true, ngImport: i0 });
|
2082
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
2083
|
+
type: Directive,
|
1975
2084
|
args: [{
|
1976
|
-
selector: 'kendo-aiprompt-prompt-view',
|
1977
2085
|
providers: [
|
1978
2086
|
{
|
1979
|
-
provide:
|
1980
|
-
useExisting: forwardRef(() =>
|
2087
|
+
provide: Messages,
|
2088
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
1981
2089
|
}
|
1982
2090
|
],
|
1983
|
-
|
1984
|
-
|
1985
|
-
<kendo-textarea
|
1986
|
-
[placeholder]="messageFor('promptPlaceholder')"
|
1987
|
-
[rows]="1"
|
1988
|
-
[(value)]="textAreaValue">
|
1989
|
-
</kendo-textarea>
|
1990
|
-
<div *ngIf="promptSuggestions"
|
1991
|
-
class="k-prompt-expander">
|
1992
|
-
<button kendoButton
|
1993
|
-
[attr.aria-controls]="contentId"
|
1994
|
-
[attr.aria-expanded]="showSuggestions"
|
1995
|
-
fillMode="flat"
|
1996
|
-
[icon]="suggestionsIcons.font"
|
1997
|
-
[svgIcon]="suggestionsIcons.svg"
|
1998
|
-
type="button"
|
1999
|
-
(click)="showSuggestions = !showSuggestions">
|
2000
|
-
{{messageFor('promptSuggestions')}}
|
2001
|
-
</button>
|
2002
|
-
<div *ngIf="showSuggestions"
|
2003
|
-
class="k-prompt-expander-content"
|
2004
|
-
role="list"
|
2005
|
-
[attr.id]="contentId">
|
2006
|
-
<div *ngFor="let suggestion of promptSuggestions"
|
2007
|
-
class="k-prompt-suggestion"
|
2008
|
-
role="listitem"
|
2009
|
-
(click)="suggestionClick(suggestion)">
|
2010
|
-
{{suggestion}}
|
2011
|
-
</div>
|
2012
|
-
</div>
|
2013
|
-
</div>
|
2014
|
-
</ng-template>
|
2015
|
-
`
|
2091
|
+
selector: '[kendoAIPromptLocalizedMessages]',
|
2092
|
+
standalone: true
|
2016
2093
|
}]
|
2017
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }
|
2094
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
|
2018
2095
|
|
2019
2096
|
/**
|
2020
|
-
*
|
2097
|
+
* Represents the Kendo UI AIPrompt component for Angular.
|
2021
2098
|
*/
|
2022
|
-
class
|
2023
|
-
constructor(localization, service) {
|
2099
|
+
class AIPromptComponent {
|
2100
|
+
constructor(localization, service, navigationService, ngZone) {
|
2024
2101
|
this.localization = localization;
|
2025
2102
|
this.service = service;
|
2026
|
-
this.
|
2027
|
-
this.
|
2028
|
-
this.
|
2029
|
-
|
2030
|
-
|
2031
|
-
|
2032
|
-
|
2033
|
-
this.
|
2034
|
-
|
2103
|
+
this.navigationService = navigationService;
|
2104
|
+
this.ngZone = ngZone;
|
2105
|
+
this.hostClasses = true;
|
2106
|
+
/**
|
2107
|
+
* Fires when the `activeView` property of the component is updated.
|
2108
|
+
* Used to provide a two-way binding for the `activeView` property.
|
2109
|
+
*/
|
2110
|
+
this.activeViewChange = new EventEmitter();
|
2111
|
+
/**
|
2112
|
+
* Fires each time the user clicks the Prompt view Generate button or the Output view Retry button.
|
2113
|
+
* To distinguish the source element, use the event's `isRetry` field.
|
2114
|
+
*/
|
2115
|
+
this.promptRequest = new EventEmitter();
|
2116
|
+
/**
|
2117
|
+
* Fires each time the user clicks a Command view command. Exposes the selected command as event data.
|
2118
|
+
*/
|
2119
|
+
this.commandExecute = new EventEmitter();
|
2120
|
+
/**
|
2121
|
+
* Fires each time the user clicks any Output view Copy button.
|
2122
|
+
*/
|
2123
|
+
this.outputCopy = new EventEmitter();
|
2124
|
+
/**
|
2125
|
+
* Fires each time the user clicks a rating button in any Output view card.
|
2126
|
+
*/
|
2127
|
+
this.outputRatingChange = new EventEmitter();
|
2128
|
+
this.subs = new Subscription();
|
2129
|
+
/**
|
2130
|
+
* @hidden
|
2131
|
+
*/
|
2132
|
+
this.sparklesIcon = sparklesIcon;
|
2133
|
+
/**
|
2134
|
+
* @hidden
|
2135
|
+
*/
|
2136
|
+
this.outputIcon = commentIcon;
|
2137
|
+
this._activeView = 0;
|
2138
|
+
validatePackage(packageMetadata);
|
2139
|
+
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
2140
|
+
this.subs.add(localization.changes.subscribe(({ rtl }) => {
|
2141
|
+
this.direction = rtl ? 'rtl' : 'ltr';
|
2142
|
+
}));
|
2035
2143
|
}
|
2036
|
-
get
|
2037
|
-
return this.
|
2144
|
+
get dirAttr() {
|
2145
|
+
return this.direction;
|
2038
2146
|
}
|
2039
|
-
|
2040
|
-
|
2041
|
-
|
2042
|
-
|
2043
|
-
|
2044
|
-
|
2045
|
-
|
2046
|
-
this.negativeRatingIcon = thumbDownIcon;
|
2047
|
-
this.positiveRatingIcon = thumbUpOutlineIcon;
|
2147
|
+
/**
|
2148
|
+
* The active view index of the AIPrompt component.
|
2149
|
+
*/
|
2150
|
+
set activeView(idx) {
|
2151
|
+
if (this._activeView !== idx) {
|
2152
|
+
this._activeView = idx;
|
2153
|
+
this.service.promptValue && (this.service.promptValue = '');
|
2048
2154
|
}
|
2049
2155
|
}
|
2050
|
-
|
2051
|
-
return this.
|
2156
|
+
get activeView() {
|
2157
|
+
return this._activeView;
|
2052
2158
|
}
|
2053
|
-
|
2054
|
-
|
2159
|
+
/**
|
2160
|
+
* The collection of commands that will be rendered in the Command view.
|
2161
|
+
*/
|
2162
|
+
set promptCommands(value) {
|
2163
|
+
this.service.promptCommands = value;
|
2055
2164
|
}
|
2056
|
-
|
2057
|
-
|
2058
|
-
|
2059
|
-
|
2060
|
-
|
2061
|
-
const titleMessage = this.promptOutput.isRetry ? 'outputRetryTitle' : 'outputTitle';
|
2062
|
-
return this.messageFor(titleMessage);
|
2063
|
-
}
|
2165
|
+
/**
|
2166
|
+
* The collection of suggestions that will be rendered in the Prompt view.
|
2167
|
+
*/
|
2168
|
+
set promptSuggestions(value) {
|
2169
|
+
this.service.promptSuggestions = value;
|
2064
2170
|
}
|
2065
|
-
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
2070
|
-
|
2071
|
-
|
2072
|
-
|
2073
|
-
|
2074
|
-
|
2075
|
-
|
2076
|
-
|
2077
|
-
|
2078
|
-
|
2079
|
-
|
2080
|
-
|
2171
|
+
/**
|
2172
|
+
* The collection of generated prompt outputs that will be rendered in the Output view.
|
2173
|
+
*/
|
2174
|
+
set promptOutputs(value) {
|
2175
|
+
this.service.promptOutputs = value;
|
2176
|
+
}
|
2177
|
+
/**
|
2178
|
+
* Specifies if the rating buttons in each Output view card will be rendered.
|
2179
|
+
* By default, rating buttons are not rendered.
|
2180
|
+
*
|
2181
|
+
* @default false
|
2182
|
+
*/
|
2183
|
+
set showOutputRating(value) {
|
2184
|
+
this.service.showOutputRating = value;
|
2185
|
+
}
|
2186
|
+
ngAfterViewInit() {
|
2187
|
+
this.ngZone.runOutsideAngular(() => {
|
2188
|
+
this.service.aiPrompt = this;
|
2189
|
+
this.subs.add(this.service.requestEvent.subscribe(ev => this.promptRequest.emit(ev)));
|
2190
|
+
this.subs.add(this.service.executeEvent.subscribe(ev => this.commandExecute.emit(ev)));
|
2191
|
+
this.subs.add(this.service.outputCopyEvent.subscribe(ev => this.outputCopy.emit(ev)));
|
2192
|
+
this.subs.add(this.service.outputRatingChangeEvent.subscribe(ev => this.outputRatingChange.emit(ev)));
|
2193
|
+
});
|
2194
|
+
}
|
2195
|
+
ngOnDestroy() {
|
2196
|
+
this.subs.unsubscribe();
|
2197
|
+
}
|
2198
|
+
/**
|
2199
|
+
* Focuses the first focusable element in the AIPrompt.
|
2200
|
+
*/
|
2201
|
+
focus() {
|
2202
|
+
this.navigationService.focusFirst();
|
2203
|
+
}
|
2204
|
+
/**
|
2205
|
+
* @hidden
|
2206
|
+
*/
|
2207
|
+
get selectedView() {
|
2208
|
+
return this.viewsArray[this.activeView];
|
2209
|
+
}
|
2210
|
+
/**
|
2211
|
+
* @hidden
|
2212
|
+
*/
|
2213
|
+
get viewsArray() {
|
2214
|
+
var _a;
|
2215
|
+
return (_a = this.views) === null || _a === void 0 ? void 0 : _a.toArray();
|
2216
|
+
}
|
2217
|
+
/**
|
2218
|
+
* @hidden
|
2219
|
+
*/
|
2220
|
+
viewChange(idx) {
|
2221
|
+
if (idx !== this.activeView) {
|
2222
|
+
this.activeView = idx;
|
2223
|
+
this.activeViewChange.emit(idx);
|
2081
2224
|
}
|
2082
2225
|
}
|
2083
|
-
|
2084
|
-
|
2085
|
-
|
2226
|
+
/**
|
2227
|
+
* @hidden
|
2228
|
+
*/
|
2229
|
+
messageFor(text) {
|
2230
|
+
return this.localization.get(text);
|
2086
2231
|
}
|
2087
|
-
|
2232
|
+
/**
|
2233
|
+
* @hidden
|
2234
|
+
*/
|
2235
|
+
get viewTemplate() {
|
2236
|
+
var _a, _b, _c;
|
2237
|
+
return ((_a = this.selectedView) === null || _a === void 0 ? void 0 : _a.viewType) === 'custom' ? (_b = this.selectedView) === null || _b === void 0 ? void 0 : _b.viewTemplate : (_c = this.selectedView) === null || _c === void 0 ? void 0 : _c.template;
|
2238
|
+
}
|
2239
|
+
/**
|
2240
|
+
* @hidden
|
2241
|
+
*/
|
2242
|
+
handleGenerateOutput() {
|
2243
|
+
const value = this.service.promptValue;
|
2088
2244
|
const eventArgs = {
|
2089
|
-
|
2090
|
-
|
2245
|
+
prompt: value,
|
2246
|
+
sender: this,
|
2247
|
+
isRetry: false
|
2091
2248
|
};
|
2092
|
-
this.
|
2093
|
-
if (ratingType === 'positive') {
|
2094
|
-
this.positiveRatingIcon = thumbUpIcon;
|
2095
|
-
this.negativeRatingIcon = thumbDownOutlineIcon;
|
2096
|
-
}
|
2097
|
-
else {
|
2098
|
-
this.negativeRatingIcon = thumbDownIcon;
|
2099
|
-
this.positiveRatingIcon = thumbUpOutlineIcon;
|
2100
|
-
}
|
2249
|
+
this.promptRequest.emit(eventArgs);
|
2101
2250
|
}
|
2102
2251
|
}
|
2103
|
-
|
2104
|
-
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2108
|
-
|
2252
|
+
AIPromptComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptComponent, deps: [{ token: i1$1.LocalizationService }, { token: AIPromptService }, { token: ToolbarNavigationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
2253
|
+
AIPromptComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AIPromptComponent, isStandalone: true, selector: "kendo-aiprompt", inputs: { activeView: "activeView", promptCommands: "promptCommands", promptSuggestions: "promptSuggestions", promptOutputs: "promptOutputs", showOutputRating: "showOutputRating" }, outputs: { activeViewChange: "activeViewChange", promptRequest: "promptRequest", commandExecute: "commandExecute", outputCopy: "outputCopy", outputRatingChange: "outputRatingChange" }, host: { properties: { "class.k-prompt": "this.hostClasses", "attr.dir": "this.dirAttr" } }, providers: [
|
2254
|
+
LocalizationService,
|
2255
|
+
AIPromptService,
|
2256
|
+
ToolbarNavigationService,
|
2257
|
+
{
|
2258
|
+
provide: L10N_PREFIX,
|
2259
|
+
useValue: 'kendo.aiprompt'
|
2260
|
+
}
|
2261
|
+
], queries: [{ propertyName: "toolbarActionsTemplate", first: true, predicate: AIPromptToolbarActionsDirective, descendants: true }, { propertyName: "views", predicate: BaseView }], exportAs: ["kendoAIPrompt"], ngImport: i0, template: `
|
2262
|
+
<ng-container kendoAIPromptLocalizedMessages
|
2263
|
+
i18n-promptView="kendo.aiprompt.promptView|The Toolbar button text for the Prompt view."
|
2264
|
+
promptView="Ask AI"
|
2265
|
+
i18n-outputView="kendo.aiprompt.outputView|The Toolbar button text for the Output view."
|
2266
|
+
outputView="Output"
|
2267
|
+
i18n-generateOutput="kendo.aiprompt.generateOutput|The text for the Generate button in the Prompt view."
|
2268
|
+
generateOutput="Generate"
|
2269
|
+
i18n-promptPlaceholder="kendo.aiprompt.promptPlaceholder|The placeholder text for the Prompt View text area."
|
2270
|
+
promptPlaceholder="Ask or generate content with AI"
|
2271
|
+
i18n-copyOutput="kendo.aiprompt.copyOutput|The Copy button text in each Output view card."
|
2272
|
+
copyOutput="Copy"
|
2273
|
+
i18n-retryGeneration="kendo.aiprompt.retryGeneration|The Retry button text in each Output view card."
|
2274
|
+
retryGeneration="Retry"
|
2275
|
+
i18n-outputTitle="kendo.aiprompt.outputTitle|The title of each Output view card."
|
2276
|
+
outputTitle="Generated with AI"
|
2277
|
+
i18n-outputRetryTitle="kendo.aiprompt.outputRetryTitle|The title of each Output view retry card."
|
2278
|
+
outputRetryTitle="Generated with AI"
|
2279
|
+
i18n-promptSuggestions="kendo.aiprompt.promptSuggestions|The title of the Prompt suggestions button."
|
2280
|
+
promptSuggestions="Prompt suggestions">
|
2281
|
+
</ng-container>
|
2282
|
+
<div class="k-prompt-header">
|
2283
|
+
<div class="k-toolbar-flat k-toolbar k-toolbar-md"
|
2284
|
+
role="toolbar">
|
2285
|
+
<button *ngFor="let view of viewsArray; let idx = index"
|
2286
|
+
kendoButton
|
2287
|
+
kendoAIPromptToolbarFocusable
|
2288
|
+
type="button"
|
2289
|
+
fillMode="flat"
|
2290
|
+
rounded="full"
|
2291
|
+
themeColor="primary"
|
2292
|
+
[svgIcon]="view.svgIcon"
|
2293
|
+
[icon]="view.icon"
|
2294
|
+
[selected]="idx === activeView"
|
2295
|
+
(click)="viewChange(idx)">
|
2296
|
+
{{view.buttonText}}
|
2297
|
+
</button>
|
2298
|
+
|
2299
|
+
<ng-template *ngIf="toolbarActionsTemplate"
|
2300
|
+
[ngTemplateOutlet]="toolbarActionsTemplate?.templateRef">
|
2301
|
+
</ng-template>
|
2109
2302
|
</div>
|
2110
|
-
<div class="k-card-subtitle">{{promptOutput.prompt}}</div>
|
2111
2303
|
</div>
|
2112
|
-
<div class="k-
|
2113
|
-
<
|
2304
|
+
<div class="k-prompt-content">
|
2305
|
+
<div class="k-prompt-view">
|
2306
|
+
<ng-container *ngTemplateOutlet="viewTemplate">
|
2307
|
+
</ng-container>
|
2308
|
+
</div>
|
2114
2309
|
</div>
|
2115
|
-
<div class="k-
|
2116
|
-
<
|
2117
|
-
|
2118
|
-
|
2119
|
-
|
2120
|
-
|
2121
|
-
|
2122
|
-
|
2123
|
-
|
2124
|
-
|
2125
|
-
|
2126
|
-
rounded="full"
|
2127
|
-
icon="arrow-rotate-cw"
|
2128
|
-
[svgIcon]="retryIcon"
|
2129
|
-
(click)="handleRetry()"
|
2130
|
-
>{{messageFor('retryGeneration')}}</button>
|
2131
|
-
<ng-container *ngIf="showRating">
|
2132
|
-
<span class="k-spacer"></span>
|
2133
|
-
<button kendoButton
|
2134
|
-
fillMode="flat"
|
2135
|
-
icon="thumb-up-outline"
|
2136
|
-
[svgIcon]="positiveRatingIcon"
|
2137
|
-
(click)="handleRating('positive')">
|
2138
|
-
</button>
|
2139
|
-
<button kendoButton
|
2140
|
-
fillMode="flat"
|
2141
|
-
icon="thumb-down-outline"
|
2142
|
-
[svgIcon]="negativeRatingIcon"
|
2143
|
-
(click)="handleRating('negative')">
|
2144
|
-
</button>
|
2145
|
-
</ng-container>
|
2310
|
+
<div class="k-prompt-footer" *ngIf="selectedView?.viewType === 'prompt'">
|
2311
|
+
<div class="k-actions k-actions-start k-actions-horizontal k-prompt-actions">
|
2312
|
+
<button
|
2313
|
+
kendoButton
|
2314
|
+
type="button"
|
2315
|
+
themeColor="primary"
|
2316
|
+
rounded="full"
|
2317
|
+
[svgIcon]="sparklesIcon"
|
2318
|
+
icon="sparkles"
|
2319
|
+
(click)="handleGenerateOutput()">{{messageFor('generateOutput')}}</button>
|
2320
|
+
</div>
|
2146
2321
|
</div>
|
2147
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
2148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type:
|
2322
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoAIPromptLocalizedMessages]" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: AIPromptToolbarFocusableDirective, selector: "[kendoAIPromptToolbarFocusable]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
2323
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptComponent, decorators: [{
|
2149
2324
|
type: Component,
|
2150
2325
|
args: [{
|
2151
|
-
|
2326
|
+
exportAs: 'kendoAIPrompt',
|
2327
|
+
selector: 'kendo-aiprompt',
|
2328
|
+
providers: [
|
2329
|
+
LocalizationService,
|
2330
|
+
AIPromptService,
|
2331
|
+
ToolbarNavigationService,
|
2332
|
+
{
|
2333
|
+
provide: L10N_PREFIX,
|
2334
|
+
useValue: 'kendo.aiprompt'
|
2335
|
+
}
|
2336
|
+
],
|
2152
2337
|
template: `
|
2153
|
-
<
|
2154
|
-
|
2155
|
-
|
2156
|
-
|
2338
|
+
<ng-container kendoAIPromptLocalizedMessages
|
2339
|
+
i18n-promptView="kendo.aiprompt.promptView|The Toolbar button text for the Prompt view."
|
2340
|
+
promptView="Ask AI"
|
2341
|
+
i18n-outputView="kendo.aiprompt.outputView|The Toolbar button text for the Output view."
|
2342
|
+
outputView="Output"
|
2343
|
+
i18n-generateOutput="kendo.aiprompt.generateOutput|The text for the Generate button in the Prompt view."
|
2344
|
+
generateOutput="Generate"
|
2345
|
+
i18n-promptPlaceholder="kendo.aiprompt.promptPlaceholder|The placeholder text for the Prompt View text area."
|
2346
|
+
promptPlaceholder="Ask or generate content with AI"
|
2347
|
+
i18n-copyOutput="kendo.aiprompt.copyOutput|The Copy button text in each Output view card."
|
2348
|
+
copyOutput="Copy"
|
2349
|
+
i18n-retryGeneration="kendo.aiprompt.retryGeneration|The Retry button text in each Output view card."
|
2350
|
+
retryGeneration="Retry"
|
2351
|
+
i18n-outputTitle="kendo.aiprompt.outputTitle|The title of each Output view card."
|
2352
|
+
outputTitle="Generated with AI"
|
2353
|
+
i18n-outputRetryTitle="kendo.aiprompt.outputRetryTitle|The title of each Output view retry card."
|
2354
|
+
outputRetryTitle="Generated with AI"
|
2355
|
+
i18n-promptSuggestions="kendo.aiprompt.promptSuggestions|The title of the Prompt suggestions button."
|
2356
|
+
promptSuggestions="Prompt suggestions">
|
2357
|
+
</ng-container>
|
2358
|
+
<div class="k-prompt-header">
|
2359
|
+
<div class="k-toolbar-flat k-toolbar k-toolbar-md"
|
2360
|
+
role="toolbar">
|
2361
|
+
<button *ngFor="let view of viewsArray; let idx = index"
|
2362
|
+
kendoButton
|
2363
|
+
kendoAIPromptToolbarFocusable
|
2364
|
+
type="button"
|
2365
|
+
fillMode="flat"
|
2366
|
+
rounded="full"
|
2367
|
+
themeColor="primary"
|
2368
|
+
[svgIcon]="view.svgIcon"
|
2369
|
+
[icon]="view.icon"
|
2370
|
+
[selected]="idx === activeView"
|
2371
|
+
(click)="viewChange(idx)">
|
2372
|
+
{{view.buttonText}}
|
2373
|
+
</button>
|
2374
|
+
|
2375
|
+
<ng-template *ngIf="toolbarActionsTemplate"
|
2376
|
+
[ngTemplateOutlet]="toolbarActionsTemplate?.templateRef">
|
2377
|
+
</ng-template>
|
2157
2378
|
</div>
|
2158
|
-
<div class="k-card-subtitle">{{promptOutput.prompt}}</div>
|
2159
2379
|
</div>
|
2160
|
-
<div class="k-
|
2161
|
-
<
|
2380
|
+
<div class="k-prompt-content">
|
2381
|
+
<div class="k-prompt-view">
|
2382
|
+
<ng-container *ngTemplateOutlet="viewTemplate">
|
2383
|
+
</ng-container>
|
2384
|
+
</div>
|
2162
2385
|
</div>
|
2163
|
-
<div class="k-
|
2164
|
-
<
|
2165
|
-
|
2166
|
-
|
2167
|
-
|
2168
|
-
|
2169
|
-
|
2170
|
-
|
2171
|
-
|
2172
|
-
|
2173
|
-
|
2174
|
-
rounded="full"
|
2175
|
-
icon="arrow-rotate-cw"
|
2176
|
-
[svgIcon]="retryIcon"
|
2177
|
-
(click)="handleRetry()"
|
2178
|
-
>{{messageFor('retryGeneration')}}</button>
|
2179
|
-
<ng-container *ngIf="showRating">
|
2180
|
-
<span class="k-spacer"></span>
|
2181
|
-
<button kendoButton
|
2182
|
-
fillMode="flat"
|
2183
|
-
icon="thumb-up-outline"
|
2184
|
-
[svgIcon]="positiveRatingIcon"
|
2185
|
-
(click)="handleRating('positive')">
|
2186
|
-
</button>
|
2187
|
-
<button kendoButton
|
2188
|
-
fillMode="flat"
|
2189
|
-
icon="thumb-down-outline"
|
2190
|
-
[svgIcon]="negativeRatingIcon"
|
2191
|
-
(click)="handleRating('negative')">
|
2192
|
-
</button>
|
2193
|
-
</ng-container>
|
2386
|
+
<div class="k-prompt-footer" *ngIf="selectedView?.viewType === 'prompt'">
|
2387
|
+
<div class="k-actions k-actions-start k-actions-horizontal k-prompt-actions">
|
2388
|
+
<button
|
2389
|
+
kendoButton
|
2390
|
+
type="button"
|
2391
|
+
themeColor="primary"
|
2392
|
+
rounded="full"
|
2393
|
+
[svgIcon]="sparklesIcon"
|
2394
|
+
icon="sparkles"
|
2395
|
+
(click)="handleGenerateOutput()">{{messageFor('generateOutput')}}</button>
|
2396
|
+
</div>
|
2194
2397
|
</div>
|
2195
|
-
|
2398
|
+
`,
|
2399
|
+
standalone: true,
|
2400
|
+
imports: [LocalizedMessagesDirective, NgFor, ButtonComponent, AIPromptToolbarFocusableDirective, NgIf, NgTemplateOutlet]
|
2196
2401
|
}]
|
2197
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: AIPromptService }]; }, propDecorators: {
|
2198
|
-
type: HostBinding,
|
2199
|
-
args: ['class.k-card']
|
2200
|
-
}], listItemRole: [{
|
2201
|
-
type: HostBinding,
|
2202
|
-
args: ['attr.role']
|
2203
|
-
}], tabIndex: [{
|
2402
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: AIPromptService }, { type: ToolbarNavigationService }, { type: i0.NgZone }]; }, propDecorators: { hostClasses: [{
|
2204
2403
|
type: HostBinding,
|
2205
|
-
args: ['
|
2206
|
-
}],
|
2207
|
-
type: HostBinding,
|
2208
|
-
args: ['attr.aria-describedby']
|
2209
|
-
}], ariaKeyShortcuts: [{
|
2404
|
+
args: ['class.k-prompt']
|
2405
|
+
}], dirAttr: [{
|
2210
2406
|
type: HostBinding,
|
2211
|
-
args: ['attr.
|
2212
|
-
}],
|
2407
|
+
args: ['attr.dir']
|
2408
|
+
}], views: [{
|
2409
|
+
type: ContentChildren,
|
2410
|
+
args: [BaseView]
|
2411
|
+
}], toolbarActionsTemplate: [{
|
2412
|
+
type: ContentChild,
|
2413
|
+
args: [AIPromptToolbarActionsDirective]
|
2414
|
+
}], activeView: [{
|
2415
|
+
type: Input
|
2416
|
+
}], promptCommands: [{
|
2417
|
+
type: Input
|
2418
|
+
}], promptSuggestions: [{
|
2419
|
+
type: Input
|
2420
|
+
}], promptOutputs: [{
|
2421
|
+
type: Input
|
2422
|
+
}], showOutputRating: [{
|
2213
2423
|
type: Input
|
2424
|
+
}], activeViewChange: [{
|
2425
|
+
type: Output
|
2426
|
+
}], promptRequest: [{
|
2427
|
+
type: Output
|
2428
|
+
}], commandExecute: [{
|
2429
|
+
type: Output
|
2430
|
+
}], outputCopy: [{
|
2431
|
+
type: Output
|
2432
|
+
}], outputRatingChange: [{
|
2433
|
+
type: Output
|
2214
2434
|
}] } });
|
2215
2435
|
|
2216
2436
|
/**
|
2217
|
-
* The component for rendering the AIPrompt
|
2437
|
+
* The component for rendering the AIPrompt Command View.
|
2218
2438
|
*/
|
2219
|
-
class
|
2439
|
+
class CommandViewComponent extends BaseView {
|
2220
2440
|
constructor(localization, service) {
|
2221
|
-
super('
|
2441
|
+
super('command', localization);
|
2222
2442
|
this.service = service;
|
2443
|
+
/**
|
2444
|
+
* @hidden
|
2445
|
+
*/
|
2446
|
+
this.panelBarItems = [];
|
2447
|
+
}
|
2448
|
+
ngOnInit() {
|
2449
|
+
if (this.service.promptCommands) {
|
2450
|
+
this.panelBarItems = this.getPanelBarItems(this.service.promptCommands);
|
2451
|
+
}
|
2223
2452
|
}
|
2224
2453
|
/**
|
2225
2454
|
* @hidden
|
2226
2455
|
*/
|
2227
|
-
|
2228
|
-
|
2456
|
+
itemClickHandler(ev) {
|
2457
|
+
if (ev.item.children) {
|
2458
|
+
return;
|
2459
|
+
}
|
2460
|
+
const selectedCommand = this.service.getFlattenPromptCommands().find(c => c.id == ev.item.id);
|
2461
|
+
if (selectedCommand) {
|
2462
|
+
const eventArgs = {
|
2463
|
+
command: selectedCommand,
|
2464
|
+
sender: this.service.aiPrompt,
|
2465
|
+
isRetry: false
|
2466
|
+
};
|
2467
|
+
this.service.executeEvent.next(eventArgs);
|
2468
|
+
}
|
2469
|
+
}
|
2470
|
+
getPanelBarItems(commands) {
|
2471
|
+
return commands.map(c => ({
|
2472
|
+
title: c.text,
|
2473
|
+
id: c.id,
|
2474
|
+
icon: c.icon,
|
2475
|
+
svgIcon: c.svgIcon,
|
2476
|
+
children: c.children ? this.getPanelBarItems(c.children) : null
|
2477
|
+
}));
|
2229
2478
|
}
|
2230
2479
|
}
|
2231
|
-
|
2232
|
-
|
2480
|
+
CommandViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CommandViewComponent, deps: [{ token: i1$1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
|
2481
|
+
CommandViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CommandViewComponent, isStandalone: true, selector: "kendo-aiprompt-command-view", providers: [{
|
2233
2482
|
provide: BaseView,
|
2234
|
-
useExisting: forwardRef(() =>
|
2483
|
+
useExisting: forwardRef(() => CommandViewComponent)
|
2235
2484
|
}], usesInheritance: true, ngImport: i0, template: `
|
2236
2485
|
<ng-template #content>
|
2237
|
-
<
|
2238
|
-
|
2239
|
-
|
2240
|
-
|
2241
|
-
|
2242
|
-
|
2243
|
-
</div>
|
2244
|
-
</div>
|
2486
|
+
<kendo-panelbar
|
2487
|
+
[items]="panelBarItems"
|
2488
|
+
[animate]="false"
|
2489
|
+
[selectable]="false"
|
2490
|
+
(itemClick)="itemClickHandler($event)"
|
2491
|
+
></kendo-panelbar>
|
2245
2492
|
</ng-template>
|
2246
|
-
`, isInline: true, dependencies: [{ kind: "
|
2247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type:
|
2493
|
+
`, isInline: true, dependencies: [{ kind: "component", type: PanelBarComponent, selector: "kendo-panelbar", inputs: ["expandMode", "selectable", "animate", "height", "keepItemContent", "items"], outputs: ["stateChange", "select", "expand", "collapse", "itemClick"], exportAs: ["kendoPanelbar"] }] });
|
2494
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CommandViewComponent, decorators: [{
|
2248
2495
|
type: Component,
|
2249
2496
|
args: [{
|
2250
|
-
selector: 'kendo-aiprompt-
|
2497
|
+
selector: 'kendo-aiprompt-command-view',
|
2251
2498
|
providers: [{
|
2252
2499
|
provide: BaseView,
|
2253
|
-
useExisting: forwardRef(() =>
|
2500
|
+
useExisting: forwardRef(() => CommandViewComponent)
|
2254
2501
|
}],
|
2255
2502
|
template: `
|
2256
2503
|
<ng-template #content>
|
2257
|
-
<
|
2258
|
-
|
2259
|
-
|
2260
|
-
|
2261
|
-
|
2262
|
-
|
2263
|
-
</div>
|
2264
|
-
</div>
|
2504
|
+
<kendo-panelbar
|
2505
|
+
[items]="panelBarItems"
|
2506
|
+
[animate]="false"
|
2507
|
+
[selectable]="false"
|
2508
|
+
(itemClick)="itemClickHandler($event)"
|
2509
|
+
></kendo-panelbar>
|
2265
2510
|
</ng-template>
|
2266
|
-
|
2267
|
-
|
2268
|
-
|
2269
|
-
|
2270
|
-
/**
|
2271
|
-
* Represents a template that allows you to define additional ToolBar actions.
|
2272
|
-
* The actions will be rendered right after all views' ToolBar buttons.
|
2273
|
-
* To define the template, nest an `<ng-template>` tag
|
2274
|
-
* with the `kendoAIPromptToolbarActionsTemplate` directive inside the `<kendo-aiprompt>` tag.
|
2275
|
-
*/
|
2276
|
-
class AIPromptToolbarActionsDirective {
|
2277
|
-
constructor(templateRef) {
|
2278
|
-
this.templateRef = templateRef;
|
2279
|
-
}
|
2280
|
-
}
|
2281
|
-
AIPromptToolbarActionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptToolbarActionsDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
2282
|
-
AIPromptToolbarActionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AIPromptToolbarActionsDirective, selector: "[kendoAIPromptToolbarActionsTemplate]", ngImport: i0 });
|
2283
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptToolbarActionsDirective, decorators: [{
|
2284
|
-
type: Directive,
|
2285
|
-
args: [{
|
2286
|
-
selector: '[kendoAIPromptToolbarActionsTemplate]'
|
2287
|
-
}]
|
2288
|
-
}], ctorParameters: function () {
|
2289
|
-
return [{ type: i0.TemplateRef, decorators: [{
|
2290
|
-
type: Optional
|
2291
|
-
}] }];
|
2292
|
-
} });
|
2293
|
-
|
2294
|
-
/**
|
2295
|
-
* @hidden
|
2296
|
-
*/
|
2297
|
-
class ToolbarNavigationService {
|
2298
|
-
constructor(localizationService) {
|
2299
|
-
this.localizationService = localizationService;
|
2300
|
-
this.focusableElements = [];
|
2301
|
-
this.currentFocusedIndex = 0;
|
2302
|
-
}
|
2303
|
-
register(tool) {
|
2304
|
-
if (!this.focusableElements.some(el => el === tool)) {
|
2305
|
-
this.focusableElements.push(tool);
|
2306
|
-
}
|
2307
|
-
}
|
2308
|
-
unregister(tool) {
|
2309
|
-
this.currentFocusedIndex = 0;
|
2310
|
-
this.focusableElements = this.focusableElements.filter(el => el !== tool);
|
2311
|
-
}
|
2312
|
-
isActive(focusable) {
|
2313
|
-
return this.focusableElements[this.currentFocusedIndex] === focusable;
|
2314
|
-
}
|
2315
|
-
setActiveIndex(tool) {
|
2316
|
-
this.currentFocusedIndex = Math.max(this.focusableElements.indexOf(tool), 0);
|
2317
|
-
}
|
2318
|
-
move(direction) {
|
2319
|
-
let delta = direction === 'right' ? 1 : -1;
|
2320
|
-
if (this.localizationService.rtl) {
|
2321
|
-
delta = -delta;
|
2322
|
-
}
|
2323
|
-
this.currentFocusedIndex += delta;
|
2324
|
-
if (this.currentFocusedIndex < 0) {
|
2325
|
-
this.currentFocusedIndex = this.focusableElements.length - 1;
|
2326
|
-
}
|
2327
|
-
else if (this.currentFocusedIndex >= this.focusableElements.length) {
|
2328
|
-
this.currentFocusedIndex = 0;
|
2329
|
-
}
|
2330
|
-
this.focusableElements[this.currentFocusedIndex].activate();
|
2331
|
-
}
|
2332
|
-
focusFirst() {
|
2333
|
-
this.focusableElements[this.currentFocusedIndex].activate();
|
2334
|
-
}
|
2335
|
-
}
|
2336
|
-
ToolbarNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarNavigationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2337
|
-
ToolbarNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarNavigationService });
|
2338
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ToolbarNavigationService, decorators: [{
|
2339
|
-
type: Injectable
|
2340
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
2341
|
-
|
2342
|
-
/**
|
2343
|
-
* @hidden
|
2344
|
-
*/
|
2345
|
-
class AIPromptToolbarFocusableDirective {
|
2346
|
-
constructor(host, navigationService, renderer) {
|
2347
|
-
this.host = host;
|
2348
|
-
this.navigationService = navigationService;
|
2349
|
-
this.renderer = renderer;
|
2350
|
-
this.keyDownHandler = (e) => {
|
2351
|
-
const targetsSelf = e.target === this.element;
|
2352
|
-
const isLeftArrow = e.keyCode === Keys.ArrowLeft;
|
2353
|
-
const isRightArrow = e.keyCode === Keys.ArrowRight;
|
2354
|
-
const isArrow = isLeftArrow || isRightArrow;
|
2355
|
-
if (!targetsSelf || !isArrow) {
|
2356
|
-
return;
|
2357
|
-
}
|
2358
|
-
this.renderer.setAttribute(this.element, 'tabindex', '-1');
|
2359
|
-
this.element.querySelectorAll(focusableSelector).forEach(el => {
|
2360
|
-
this.renderer.setAttribute(el, 'tabindex', '-1');
|
2361
|
-
});
|
2362
|
-
if (isRightArrow) {
|
2363
|
-
this.navigationService.move('right');
|
2364
|
-
}
|
2365
|
-
else if (isLeftArrow) {
|
2366
|
-
this.navigationService.move('left');
|
2367
|
-
}
|
2368
|
-
};
|
2369
|
-
this.clickHandler = () => {
|
2370
|
-
this.navigationService.setActiveIndex(this);
|
2371
|
-
};
|
2372
|
-
navigationService.register(this);
|
2373
|
-
}
|
2374
|
-
get element() {
|
2375
|
-
return this.host.nativeElement;
|
2376
|
-
}
|
2377
|
-
ngAfterViewInit() {
|
2378
|
-
this.renderer.setAttribute(this.element, 'tabindex', this.navigationService.isActive(this) ? '0' : '-1');
|
2379
|
-
this.element.addEventListener('keydown', this.keyDownHandler, { capture: true });
|
2380
|
-
this.element.addEventListener('click', this.clickHandler, { capture: true });
|
2381
|
-
}
|
2382
|
-
ngOnDestroy() {
|
2383
|
-
this.navigationService.unregister(this);
|
2384
|
-
this.element.removeEventListener('keydown', this.keyDownHandler, { capture: true });
|
2385
|
-
this.element.removeEventListener('click', this.clickHandler, { capture: true });
|
2386
|
-
}
|
2387
|
-
activate() {
|
2388
|
-
this.renderer.setAttribute(this.element, 'tabindex', '0');
|
2389
|
-
this.element.focus();
|
2390
|
-
}
|
2391
|
-
}
|
2392
|
-
AIPromptToolbarFocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptToolbarFocusableDirective, deps: [{ token: i0.ElementRef }, { token: ToolbarNavigationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
2393
|
-
AIPromptToolbarFocusableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: AIPromptToolbarFocusableDirective, selector: "[kendoAIPromptToolbarFocusable]", ngImport: i0 });
|
2394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptToolbarFocusableDirective, decorators: [{
|
2395
|
-
type: Directive,
|
2396
|
-
args: [{
|
2397
|
-
selector: '[kendoAIPromptToolbarFocusable]'
|
2511
|
+
`,
|
2512
|
+
standalone: true,
|
2513
|
+
imports: [PanelBarComponent]
|
2398
2514
|
}]
|
2399
|
-
}], ctorParameters: function () { return [{ type:
|
2400
|
-
|
2401
|
-
/**
|
2402
|
-
* @hidden
|
2403
|
-
*/
|
2404
|
-
class Messages extends ComponentMessages {
|
2405
|
-
}
|
2406
|
-
Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
2407
|
-
Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: Messages, inputs: { promptView: "promptView", outputView: "outputView", generateOutput: "generateOutput", promptPlaceholder: "promptPlaceholder", copyOutput: "copyOutput", retryGeneration: "retryGeneration", outputTitle: "outputTitle", outputRetryTitle: "outputRetryTitle", promptSuggestions: "promptSuggestions" }, usesInheritance: true, ngImport: i0 });
|
2408
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Messages, decorators: [{
|
2409
|
-
type: Directive
|
2410
|
-
}], propDecorators: { promptView: [{
|
2411
|
-
type: Input
|
2412
|
-
}], outputView: [{
|
2413
|
-
type: Input
|
2414
|
-
}], generateOutput: [{
|
2415
|
-
type: Input
|
2416
|
-
}], promptPlaceholder: [{
|
2417
|
-
type: Input
|
2418
|
-
}], copyOutput: [{
|
2419
|
-
type: Input
|
2420
|
-
}], retryGeneration: [{
|
2421
|
-
type: Input
|
2422
|
-
}], outputTitle: [{
|
2423
|
-
type: Input
|
2424
|
-
}], outputRetryTitle: [{
|
2425
|
-
type: Input
|
2426
|
-
}], promptSuggestions: [{
|
2427
|
-
type: Input
|
2428
|
-
}] } });
|
2515
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: AIPromptService }]; } });
|
2429
2516
|
|
2430
2517
|
/**
|
2431
|
-
*
|
2518
|
+
* Custom component messages override the default component messages.
|
2519
|
+
* ([see example]({% slug globalization_chat %}#toc-custom-messages)).
|
2432
2520
|
*/
|
2433
|
-
class
|
2521
|
+
class AIPromptCustomMessagesComponent extends Messages {
|
2434
2522
|
constructor(service) {
|
2435
2523
|
super();
|
2436
2524
|
this.service = service;
|
2437
2525
|
}
|
2526
|
+
get override() {
|
2527
|
+
return true;
|
2528
|
+
}
|
2438
2529
|
}
|
2439
|
-
|
2440
|
-
|
2530
|
+
AIPromptCustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptCustomMessagesComponent, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
2531
|
+
AIPromptCustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AIPromptCustomMessagesComponent, isStandalone: true, selector: "kendo-aiprompt-messages", providers: [
|
2441
2532
|
{
|
2442
2533
|
provide: Messages,
|
2443
|
-
useExisting: forwardRef(() =>
|
2534
|
+
useExisting: forwardRef(() => AIPromptCustomMessagesComponent)
|
2444
2535
|
}
|
2445
|
-
], usesInheritance: true, ngImport: i0 });
|
2446
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type:
|
2447
|
-
type:
|
2536
|
+
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
2537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptCustomMessagesComponent, decorators: [{
|
2538
|
+
type: Component,
|
2448
2539
|
args: [{
|
2449
2540
|
providers: [
|
2450
2541
|
{
|
2451
2542
|
provide: Messages,
|
2452
|
-
useExisting: forwardRef(() =>
|
2543
|
+
useExisting: forwardRef(() => AIPromptCustomMessagesComponent)
|
2453
2544
|
}
|
2454
2545
|
],
|
2455
|
-
selector: '
|
2546
|
+
selector: 'kendo-aiprompt-messages',
|
2547
|
+
template: ``,
|
2548
|
+
standalone: true
|
2549
|
+
}]
|
2550
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
|
2551
|
+
|
2552
|
+
/**
|
2553
|
+
* The component for rendering an AIPrompt Custom View.
|
2554
|
+
*/
|
2555
|
+
class CustomViewComponent extends BaseView {
|
2556
|
+
constructor(localization) {
|
2557
|
+
super('custom', localization);
|
2558
|
+
}
|
2559
|
+
}
|
2560
|
+
CustomViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomViewComponent, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
2561
|
+
CustomViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CustomViewComponent, isStandalone: true, selector: "kendo-aiprompt-custom-view", inputs: { viewTemplate: "viewTemplate" }, providers: [{
|
2562
|
+
provide: BaseView,
|
2563
|
+
useExisting: forwardRef(() => CustomViewComponent)
|
2564
|
+
}], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
2565
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomViewComponent, decorators: [{
|
2566
|
+
type: Component,
|
2567
|
+
args: [{
|
2568
|
+
selector: 'kendo-aiprompt-custom-view',
|
2569
|
+
providers: [{
|
2570
|
+
provide: BaseView,
|
2571
|
+
useExisting: forwardRef(() => CustomViewComponent)
|
2572
|
+
}],
|
2573
|
+
template: ``,
|
2574
|
+
standalone: true
|
2456
2575
|
}]
|
2457
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }
|
2576
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; }, propDecorators: { viewTemplate: [{
|
2577
|
+
type: Input
|
2578
|
+
}] } });
|
2458
2579
|
|
2459
2580
|
/**
|
2460
|
-
*
|
2581
|
+
* @hidden
|
2461
2582
|
*/
|
2462
|
-
class
|
2463
|
-
constructor(localization, service
|
2583
|
+
class AIPromptOutputCardComponent {
|
2584
|
+
constructor(localization, service) {
|
2464
2585
|
this.localization = localization;
|
2465
2586
|
this.service = service;
|
2466
|
-
this.
|
2467
|
-
this.
|
2468
|
-
this.
|
2469
|
-
|
2470
|
-
|
2471
|
-
|
2472
|
-
|
2473
|
-
this.
|
2474
|
-
|
2475
|
-
* Fires each time the user clicks the Prompt view Generate button or the Output view Retry button.
|
2476
|
-
* To distinguish the source element, use the event's `isRetry` field.
|
2477
|
-
*/
|
2478
|
-
this.promptRequest = new EventEmitter();
|
2479
|
-
/**
|
2480
|
-
* Fires each time the user clicks a Command view command. Exposes the selected command as event data.
|
2481
|
-
*/
|
2482
|
-
this.commandExecute = new EventEmitter();
|
2483
|
-
/**
|
2484
|
-
* Fires each time the user clicks any Output view Copy button.
|
2485
|
-
*/
|
2486
|
-
this.outputCopy = new EventEmitter();
|
2487
|
-
/**
|
2488
|
-
* Fires each time the user clicks a rating button in any Output view card.
|
2489
|
-
*/
|
2490
|
-
this.outputRatingChange = new EventEmitter();
|
2491
|
-
this.subs = new Subscription();
|
2492
|
-
/**
|
2493
|
-
* @hidden
|
2494
|
-
*/
|
2495
|
-
this.sparklesIcon = sparklesIcon;
|
2496
|
-
/**
|
2497
|
-
* @hidden
|
2498
|
-
*/
|
2499
|
-
this.outputIcon = commentIcon;
|
2500
|
-
this._activeView = 0;
|
2501
|
-
validatePackage(packageMetadata);
|
2502
|
-
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
2503
|
-
this.subs.add(localization.changes.subscribe(({ rtl }) => {
|
2504
|
-
this.direction = rtl ? 'rtl' : 'ltr';
|
2505
|
-
}));
|
2587
|
+
this.hostClass = true;
|
2588
|
+
this.listItemRole = 'listitem';
|
2589
|
+
this.tabIndex = 0;
|
2590
|
+
this.ariaKeyShortcuts = 'Enter';
|
2591
|
+
this.copyIcon = copyIcon;
|
2592
|
+
this.retryIcon = arrowRotateCwIcon;
|
2593
|
+
this.positiveRatingIcon = thumbUpOutlineIcon;
|
2594
|
+
this.negativeRatingIcon = thumbDownOutlineIcon;
|
2595
|
+
this.titleId = `k-output-card-${guid()}`;
|
2506
2596
|
}
|
2507
|
-
get
|
2508
|
-
return this.
|
2597
|
+
get ariaDescribedBy() {
|
2598
|
+
return this.titleId;
|
2509
2599
|
}
|
2510
|
-
|
2511
|
-
|
2512
|
-
|
2513
|
-
|
2514
|
-
|
2515
|
-
|
2516
|
-
|
2600
|
+
ngOnInit() {
|
2601
|
+
var _a, _b;
|
2602
|
+
if (((_a = this.promptOutput) === null || _a === void 0 ? void 0 : _a.rating) === 'positive') {
|
2603
|
+
this.positiveRatingIcon = thumbUpIcon;
|
2604
|
+
this.negativeRatingIcon = thumbDownOutlineIcon;
|
2605
|
+
}
|
2606
|
+
else if (((_b = this.promptOutput) === null || _b === void 0 ? void 0 : _b.rating) === 'negative') {
|
2607
|
+
this.negativeRatingIcon = thumbDownIcon;
|
2608
|
+
this.positiveRatingIcon = thumbUpOutlineIcon;
|
2517
2609
|
}
|
2518
2610
|
}
|
2519
|
-
|
2520
|
-
return this.
|
2521
|
-
}
|
2522
|
-
/**
|
2523
|
-
* The collection of commands that will be rendered in the Command view.
|
2524
|
-
*/
|
2525
|
-
set promptCommands(value) {
|
2526
|
-
this.service.promptCommands = value;
|
2527
|
-
}
|
2528
|
-
/**
|
2529
|
-
* The collection of suggestions that will be rendered in the Prompt view.
|
2530
|
-
*/
|
2531
|
-
set promptSuggestions(value) {
|
2532
|
-
this.service.promptSuggestions = value;
|
2533
|
-
}
|
2534
|
-
/**
|
2535
|
-
* The collection of generated prompt outputs that will be rendered in the Output view.
|
2536
|
-
*/
|
2537
|
-
set promptOutputs(value) {
|
2538
|
-
this.service.promptOutputs = value;
|
2539
|
-
}
|
2540
|
-
/**
|
2541
|
-
* Specifies if the rating buttons in each Output view card will be rendered.
|
2542
|
-
* By default, rating buttons are not rendered.
|
2543
|
-
*
|
2544
|
-
* @default false
|
2545
|
-
*/
|
2546
|
-
set showOutputRating(value) {
|
2547
|
-
this.service.showOutputRating = value;
|
2548
|
-
}
|
2549
|
-
ngAfterViewInit() {
|
2550
|
-
this.ngZone.runOutsideAngular(() => {
|
2551
|
-
this.service.aiPrompt = this;
|
2552
|
-
this.subs.add(this.service.requestEvent.subscribe(ev => this.promptRequest.emit(ev)));
|
2553
|
-
this.subs.add(this.service.executeEvent.subscribe(ev => this.commandExecute.emit(ev)));
|
2554
|
-
this.subs.add(this.service.outputCopyEvent.subscribe(ev => this.outputCopy.emit(ev)));
|
2555
|
-
this.subs.add(this.service.outputRatingChangeEvent.subscribe(ev => this.outputRatingChange.emit(ev)));
|
2556
|
-
});
|
2557
|
-
}
|
2558
|
-
ngOnDestroy() {
|
2559
|
-
this.subs.unsubscribe();
|
2560
|
-
}
|
2561
|
-
/**
|
2562
|
-
* Focuses the first focusable element in the AIPrompt.
|
2563
|
-
*/
|
2564
|
-
focus() {
|
2565
|
-
this.navigationService.focusFirst();
|
2566
|
-
}
|
2567
|
-
/**
|
2568
|
-
* @hidden
|
2569
|
-
*/
|
2570
|
-
get selectedView() {
|
2571
|
-
return this.viewsArray[this.activeView];
|
2611
|
+
messageFor(text) {
|
2612
|
+
return this.localization.get(text);
|
2572
2613
|
}
|
2573
|
-
|
2574
|
-
|
2575
|
-
*/
|
2576
|
-
get viewsArray() {
|
2577
|
-
var _a;
|
2578
|
-
return (_a = this.views) === null || _a === void 0 ? void 0 : _a.toArray();
|
2614
|
+
get showRating() {
|
2615
|
+
return this.service.showOutputRating;
|
2579
2616
|
}
|
2580
|
-
|
2581
|
-
|
2582
|
-
|
2583
|
-
|
2584
|
-
|
2585
|
-
this.
|
2586
|
-
this.
|
2617
|
+
get outputTitle() {
|
2618
|
+
if (isPresent(this.promptOutput.title)) {
|
2619
|
+
return this.promptOutput.title;
|
2620
|
+
}
|
2621
|
+
else {
|
2622
|
+
const titleMessage = this.promptOutput.isRetry ? 'outputRetryTitle' : 'outputTitle';
|
2623
|
+
return this.messageFor(titleMessage);
|
2587
2624
|
}
|
2588
2625
|
}
|
2589
|
-
|
2590
|
-
|
2591
|
-
|
2592
|
-
|
2593
|
-
|
2626
|
+
handleRetry() {
|
2627
|
+
if (this.promptOutput.commandId) {
|
2628
|
+
const eventArgs = {
|
2629
|
+
command: this.service.getFlattenPromptCommands().find(c => c.id === this.promptOutput.commandId),
|
2630
|
+
sender: this.service.aiPrompt,
|
2631
|
+
isRetry: true
|
2632
|
+
};
|
2633
|
+
this.service.executeEvent.next(eventArgs);
|
2634
|
+
}
|
2635
|
+
else {
|
2636
|
+
const eventArgs = {
|
2637
|
+
prompt: this.promptOutput.prompt,
|
2638
|
+
sender: this.service.aiPrompt,
|
2639
|
+
isRetry: true
|
2640
|
+
};
|
2641
|
+
this.service.requestEvent.next(eventArgs);
|
2642
|
+
}
|
2594
2643
|
}
|
2595
|
-
|
2596
|
-
|
2597
|
-
|
2598
|
-
get viewTemplate() {
|
2599
|
-
var _a, _b, _c;
|
2600
|
-
return ((_a = this.selectedView) === null || _a === void 0 ? void 0 : _a.viewType) === 'custom' ? (_b = this.selectedView) === null || _b === void 0 ? void 0 : _b.viewTemplate : (_c = this.selectedView) === null || _c === void 0 ? void 0 : _c.template;
|
2644
|
+
handleCopy() {
|
2645
|
+
navigator.clipboard.writeText(this.promptOutput.output);
|
2646
|
+
this.service.outputCopyEvent.next(this.promptOutput);
|
2601
2647
|
}
|
2602
|
-
|
2603
|
-
* @hidden
|
2604
|
-
*/
|
2605
|
-
handleGenerateOutput() {
|
2606
|
-
const value = this.service.promptValue;
|
2648
|
+
handleRating(ratingType) {
|
2607
2649
|
const eventArgs = {
|
2608
|
-
|
2609
|
-
|
2610
|
-
isRetry: false
|
2650
|
+
promptOutput: this.promptOutput,
|
2651
|
+
rating: ratingType
|
2611
2652
|
};
|
2612
|
-
this.
|
2653
|
+
this.service.outputRatingChangeEvent.next(eventArgs);
|
2654
|
+
if (ratingType === 'positive') {
|
2655
|
+
this.positiveRatingIcon = thumbUpIcon;
|
2656
|
+
this.negativeRatingIcon = thumbDownOutlineIcon;
|
2657
|
+
}
|
2658
|
+
else {
|
2659
|
+
this.negativeRatingIcon = thumbDownIcon;
|
2660
|
+
this.positiveRatingIcon = thumbUpOutlineIcon;
|
2661
|
+
}
|
2613
2662
|
}
|
2614
2663
|
}
|
2615
|
-
|
2616
|
-
|
2617
|
-
|
2618
|
-
|
2619
|
-
|
2620
|
-
|
2621
|
-
provide: L10N_PREFIX,
|
2622
|
-
useValue: 'kendo.aiprompt'
|
2623
|
-
}
|
2624
|
-
], queries: [{ propertyName: "toolbarActionsTemplate", first: true, predicate: AIPromptToolbarActionsDirective, descendants: true }, { propertyName: "views", predicate: BaseView }], exportAs: ["kendoAIPrompt"], ngImport: i0, template: `
|
2625
|
-
<ng-container kendoAIPromptLocalizedMessages
|
2626
|
-
i18n-promptView="kendo.aiprompt.promptView|The Toolbar button text for the Prompt view."
|
2627
|
-
promptView="Ask AI"
|
2628
|
-
i18n-outputView="kendo.aiprompt.outputView|The Toolbar button text for the Output view."
|
2629
|
-
outputView="Output"
|
2630
|
-
i18n-generateOutput="kendo.aiprompt.generateOutput|The text for the Generate button in the Prompt view."
|
2631
|
-
generateOutput="Generate"
|
2632
|
-
i18n-promptPlaceholder="kendo.aiprompt.promptPlaceholder|The placeholder text for the Prompt View text area."
|
2633
|
-
promptPlaceholder="Ask or generate content with AI"
|
2634
|
-
i18n-copyOutput="kendo.aiprompt.copyOutput|The Copy button text in each Output view card."
|
2635
|
-
copyOutput="Copy"
|
2636
|
-
i18n-retryGeneration="kendo.aiprompt.retryGeneration|The Retry button text in each Output view card."
|
2637
|
-
retryGeneration="Retry"
|
2638
|
-
i18n-outputTitle="kendo.aiprompt.outputTitle|The title of each Output view card."
|
2639
|
-
outputTitle="Generated with AI"
|
2640
|
-
i18n-outputRetryTitle="kendo.aiprompt.outputRetryTitle|The title of each Output view retry card."
|
2641
|
-
outputRetryTitle="Generated with AI"
|
2642
|
-
i18n-promptSuggestions="kendo.aiprompt.promptSuggestions|The title of the Prompt suggestions button."
|
2643
|
-
promptSuggestions="Prompt suggestions">
|
2644
|
-
</ng-container>
|
2645
|
-
<div class="k-prompt-header">
|
2646
|
-
<div class="k-toolbar-flat k-toolbar k-toolbar-md"
|
2647
|
-
role="toolbar">
|
2648
|
-
<button *ngFor="let view of viewsArray; let idx = index"
|
2649
|
-
kendoButton
|
2650
|
-
kendoAIPromptToolbarFocusable
|
2651
|
-
type="button"
|
2652
|
-
fillMode="flat"
|
2653
|
-
rounded="full"
|
2654
|
-
themeColor="primary"
|
2655
|
-
[svgIcon]="view.svgIcon"
|
2656
|
-
[icon]="view.icon"
|
2657
|
-
[selected]="idx === activeView"
|
2658
|
-
(click)="viewChange(idx)">
|
2659
|
-
{{view.buttonText}}
|
2660
|
-
</button>
|
2661
|
-
|
2662
|
-
<ng-template *ngIf="toolbarActionsTemplate"
|
2663
|
-
[ngTemplateOutlet]="toolbarActionsTemplate?.templateRef">
|
2664
|
-
</ng-template>
|
2664
|
+
AIPromptOutputCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptOutputCardComponent, deps: [{ token: i1$1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
|
2665
|
+
AIPromptOutputCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: AIPromptOutputCardComponent, isStandalone: true, selector: "[kendoAIPromptOutputCard]", inputs: { promptOutput: "promptOutput" }, host: { properties: { "class.k-card": "this.hostClass", "attr.role": "this.listItemRole", "attr.tabindex": "this.tabIndex", "attr.aria-describedby": "this.ariaDescribedBy", "attr.aria-keyshortcuts": "this.ariaKeyShortcuts" } }, ngImport: i0, template: `
|
2666
|
+
<div class="k-card-header">
|
2667
|
+
<div
|
2668
|
+
class="k-card-title"
|
2669
|
+
[attr.id]="titleId">{{outputTitle}}
|
2665
2670
|
</div>
|
2671
|
+
<div class="k-card-subtitle">{{promptOutput.prompt}}</div>
|
2666
2672
|
</div>
|
2667
|
-
<div class="k-
|
2668
|
-
<
|
2669
|
-
<ng-container *ngTemplateOutlet="viewTemplate">
|
2670
|
-
</ng-container>
|
2671
|
-
</div>
|
2673
|
+
<div class="k-card-body">
|
2674
|
+
<p>{{promptOutput.output}}</p>
|
2672
2675
|
</div>
|
2673
|
-
<div class="k-
|
2674
|
-
<
|
2675
|
-
|
2676
|
-
|
2677
|
-
|
2678
|
-
|
2679
|
-
|
2680
|
-
|
2681
|
-
|
2682
|
-
|
2683
|
-
|
2676
|
+
<div class="k-actions k-actions-start k-actions-horizontal k-card-actions">
|
2677
|
+
<button kendoButton
|
2678
|
+
fillMode="flat"
|
2679
|
+
themeColor="primary"
|
2680
|
+
rounded="full"
|
2681
|
+
icon="copy"
|
2682
|
+
[svgIcon]="copyIcon"
|
2683
|
+
(click)="handleCopy()"
|
2684
|
+
>{{messageFor('copyOutput')}}</button>
|
2685
|
+
<button kendoButton
|
2686
|
+
fillMode="flat"
|
2687
|
+
rounded="full"
|
2688
|
+
icon="arrow-rotate-cw"
|
2689
|
+
[svgIcon]="retryIcon"
|
2690
|
+
(click)="handleRetry()"
|
2691
|
+
>{{messageFor('retryGeneration')}}</button>
|
2692
|
+
<ng-container *ngIf="showRating">
|
2693
|
+
<span class="k-spacer"></span>
|
2694
|
+
<button kendoButton
|
2695
|
+
fillMode="flat"
|
2696
|
+
icon="thumb-up-outline"
|
2697
|
+
[svgIcon]="positiveRatingIcon"
|
2698
|
+
(click)="handleRating('positive')">
|
2699
|
+
</button>
|
2700
|
+
<button kendoButton
|
2701
|
+
fillMode="flat"
|
2702
|
+
icon="thumb-down-outline"
|
2703
|
+
[svgIcon]="negativeRatingIcon"
|
2704
|
+
(click)="handleRating('negative')">
|
2705
|
+
</button>
|
2706
|
+
</ng-container>
|
2684
2707
|
</div>
|
2685
|
-
`, isInline: true, dependencies: [{ kind: "
|
2686
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type:
|
2708
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
2709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptOutputCardComponent, decorators: [{
|
2687
2710
|
type: Component,
|
2688
2711
|
args: [{
|
2689
|
-
|
2690
|
-
selector: 'kendo-aiprompt',
|
2691
|
-
providers: [
|
2692
|
-
LocalizationService,
|
2693
|
-
AIPromptService,
|
2694
|
-
ToolbarNavigationService,
|
2695
|
-
{
|
2696
|
-
provide: L10N_PREFIX,
|
2697
|
-
useValue: 'kendo.aiprompt'
|
2698
|
-
}
|
2699
|
-
],
|
2712
|
+
selector: '[kendoAIPromptOutputCard]',
|
2700
2713
|
template: `
|
2701
|
-
<
|
2702
|
-
|
2703
|
-
|
2704
|
-
|
2705
|
-
outputView="Output"
|
2706
|
-
i18n-generateOutput="kendo.aiprompt.generateOutput|The text for the Generate button in the Prompt view."
|
2707
|
-
generateOutput="Generate"
|
2708
|
-
i18n-promptPlaceholder="kendo.aiprompt.promptPlaceholder|The placeholder text for the Prompt View text area."
|
2709
|
-
promptPlaceholder="Ask or generate content with AI"
|
2710
|
-
i18n-copyOutput="kendo.aiprompt.copyOutput|The Copy button text in each Output view card."
|
2711
|
-
copyOutput="Copy"
|
2712
|
-
i18n-retryGeneration="kendo.aiprompt.retryGeneration|The Retry button text in each Output view card."
|
2713
|
-
retryGeneration="Retry"
|
2714
|
-
i18n-outputTitle="kendo.aiprompt.outputTitle|The title of each Output view card."
|
2715
|
-
outputTitle="Generated with AI"
|
2716
|
-
i18n-outputRetryTitle="kendo.aiprompt.outputRetryTitle|The title of each Output view retry card."
|
2717
|
-
outputRetryTitle="Generated with AI"
|
2718
|
-
i18n-promptSuggestions="kendo.aiprompt.promptSuggestions|The title of the Prompt suggestions button."
|
2719
|
-
promptSuggestions="Prompt suggestions">
|
2720
|
-
</ng-container>
|
2721
|
-
<div class="k-prompt-header">
|
2722
|
-
<div class="k-toolbar-flat k-toolbar k-toolbar-md"
|
2723
|
-
role="toolbar">
|
2724
|
-
<button *ngFor="let view of viewsArray; let idx = index"
|
2725
|
-
kendoButton
|
2726
|
-
kendoAIPromptToolbarFocusable
|
2727
|
-
type="button"
|
2728
|
-
fillMode="flat"
|
2729
|
-
rounded="full"
|
2730
|
-
themeColor="primary"
|
2731
|
-
[svgIcon]="view.svgIcon"
|
2732
|
-
[icon]="view.icon"
|
2733
|
-
[selected]="idx === activeView"
|
2734
|
-
(click)="viewChange(idx)">
|
2735
|
-
{{view.buttonText}}
|
2736
|
-
</button>
|
2737
|
-
|
2738
|
-
<ng-template *ngIf="toolbarActionsTemplate"
|
2739
|
-
[ngTemplateOutlet]="toolbarActionsTemplate?.templateRef">
|
2740
|
-
</ng-template>
|
2714
|
+
<div class="k-card-header">
|
2715
|
+
<div
|
2716
|
+
class="k-card-title"
|
2717
|
+
[attr.id]="titleId">{{outputTitle}}
|
2741
2718
|
</div>
|
2719
|
+
<div class="k-card-subtitle">{{promptOutput.prompt}}</div>
|
2742
2720
|
</div>
|
2743
|
-
<div class="k-
|
2744
|
-
<
|
2745
|
-
<ng-container *ngTemplateOutlet="viewTemplate">
|
2746
|
-
</ng-container>
|
2747
|
-
</div>
|
2721
|
+
<div class="k-card-body">
|
2722
|
+
<p>{{promptOutput.output}}</p>
|
2748
2723
|
</div>
|
2749
|
-
<div class="k-
|
2750
|
-
<
|
2751
|
-
|
2752
|
-
|
2753
|
-
|
2754
|
-
|
2755
|
-
|
2756
|
-
|
2757
|
-
|
2758
|
-
|
2759
|
-
|
2724
|
+
<div class="k-actions k-actions-start k-actions-horizontal k-card-actions">
|
2725
|
+
<button kendoButton
|
2726
|
+
fillMode="flat"
|
2727
|
+
themeColor="primary"
|
2728
|
+
rounded="full"
|
2729
|
+
icon="copy"
|
2730
|
+
[svgIcon]="copyIcon"
|
2731
|
+
(click)="handleCopy()"
|
2732
|
+
>{{messageFor('copyOutput')}}</button>
|
2733
|
+
<button kendoButton
|
2734
|
+
fillMode="flat"
|
2735
|
+
rounded="full"
|
2736
|
+
icon="arrow-rotate-cw"
|
2737
|
+
[svgIcon]="retryIcon"
|
2738
|
+
(click)="handleRetry()"
|
2739
|
+
>{{messageFor('retryGeneration')}}</button>
|
2740
|
+
<ng-container *ngIf="showRating">
|
2741
|
+
<span class="k-spacer"></span>
|
2742
|
+
<button kendoButton
|
2743
|
+
fillMode="flat"
|
2744
|
+
icon="thumb-up-outline"
|
2745
|
+
[svgIcon]="positiveRatingIcon"
|
2746
|
+
(click)="handleRating('positive')">
|
2747
|
+
</button>
|
2748
|
+
<button kendoButton
|
2749
|
+
fillMode="flat"
|
2750
|
+
icon="thumb-down-outline"
|
2751
|
+
[svgIcon]="negativeRatingIcon"
|
2752
|
+
(click)="handleRating('negative')">
|
2753
|
+
</button>
|
2754
|
+
</ng-container>
|
2760
2755
|
</div>
|
2761
|
-
|
2756
|
+
`,
|
2757
|
+
standalone: true,
|
2758
|
+
imports: [ButtonComponent, NgIf]
|
2762
2759
|
}]
|
2763
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: AIPromptService }
|
2760
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: AIPromptService }]; }, propDecorators: { hostClass: [{
|
2764
2761
|
type: HostBinding,
|
2765
|
-
args: ['class.k-
|
2766
|
-
}],
|
2762
|
+
args: ['class.k-card']
|
2763
|
+
}], listItemRole: [{
|
2767
2764
|
type: HostBinding,
|
2768
|
-
args: ['attr.
|
2769
|
-
}],
|
2770
|
-
type:
|
2771
|
-
args: [
|
2772
|
-
}],
|
2773
|
-
type:
|
2774
|
-
args: [
|
2775
|
-
}],
|
2776
|
-
type:
|
2777
|
-
|
2778
|
-
|
2779
|
-
}], promptSuggestions: [{
|
2780
|
-
type: Input
|
2781
|
-
}], promptOutputs: [{
|
2782
|
-
type: Input
|
2783
|
-
}], showOutputRating: [{
|
2765
|
+
args: ['attr.role']
|
2766
|
+
}], tabIndex: [{
|
2767
|
+
type: HostBinding,
|
2768
|
+
args: ['attr.tabindex']
|
2769
|
+
}], ariaDescribedBy: [{
|
2770
|
+
type: HostBinding,
|
2771
|
+
args: ['attr.aria-describedby']
|
2772
|
+
}], ariaKeyShortcuts: [{
|
2773
|
+
type: HostBinding,
|
2774
|
+
args: ['attr.aria-keyshortcuts']
|
2775
|
+
}], promptOutput: [{
|
2784
2776
|
type: Input
|
2785
|
-
}], activeViewChange: [{
|
2786
|
-
type: Output
|
2787
|
-
}], promptRequest: [{
|
2788
|
-
type: Output
|
2789
|
-
}], commandExecute: [{
|
2790
|
-
type: Output
|
2791
|
-
}], outputCopy: [{
|
2792
|
-
type: Output
|
2793
|
-
}], outputRatingChange: [{
|
2794
|
-
type: Output
|
2795
2777
|
}] } });
|
2796
2778
|
|
2797
2779
|
/**
|
2798
|
-
* The component for rendering the AIPrompt
|
2780
|
+
* The component for rendering the AIPrompt Output View.
|
2799
2781
|
*/
|
2800
|
-
class
|
2782
|
+
class OutputViewComponent extends BaseView {
|
2801
2783
|
constructor(localization, service) {
|
2802
|
-
super('
|
2784
|
+
super('output', localization);
|
2803
2785
|
this.service = service;
|
2804
|
-
/**
|
2805
|
-
* @hidden
|
2806
|
-
*/
|
2807
|
-
this.panelBarItems = [];
|
2808
|
-
}
|
2809
|
-
ngOnInit() {
|
2810
|
-
if (this.service.promptCommands) {
|
2811
|
-
this.panelBarItems = this.getPanelBarItems(this.service.promptCommands);
|
2812
|
-
}
|
2813
2786
|
}
|
2814
2787
|
/**
|
2815
2788
|
* @hidden
|
2816
2789
|
*/
|
2817
|
-
|
2818
|
-
|
2819
|
-
return;
|
2820
|
-
}
|
2821
|
-
const selectedCommand = this.service.getFlattenPromptCommands().find(c => c.id == ev.item.id);
|
2822
|
-
if (selectedCommand) {
|
2823
|
-
const eventArgs = {
|
2824
|
-
command: selectedCommand,
|
2825
|
-
sender: this.service.aiPrompt,
|
2826
|
-
isRetry: false
|
2827
|
-
};
|
2828
|
-
this.service.executeEvent.next(eventArgs);
|
2829
|
-
}
|
2830
|
-
}
|
2831
|
-
getPanelBarItems(commands) {
|
2832
|
-
return commands.map(c => ({
|
2833
|
-
title: c.text,
|
2834
|
-
id: c.id,
|
2835
|
-
icon: c.icon,
|
2836
|
-
svgIcon: c.svgIcon,
|
2837
|
-
children: c.children ? this.getPanelBarItems(c.children) : null
|
2838
|
-
}));
|
2790
|
+
get promptOutputs() {
|
2791
|
+
return this.service.promptOutputs;
|
2839
2792
|
}
|
2840
2793
|
}
|
2841
|
-
|
2842
|
-
|
2794
|
+
OutputViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OutputViewComponent, deps: [{ token: i1$1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
|
2795
|
+
OutputViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OutputViewComponent, isStandalone: true, selector: "kendo-aiprompt-output-view", providers: [{
|
2843
2796
|
provide: BaseView,
|
2844
|
-
useExisting: forwardRef(() =>
|
2797
|
+
useExisting: forwardRef(() => OutputViewComponent)
|
2845
2798
|
}], usesInheritance: true, ngImport: i0, template: `
|
2846
2799
|
<ng-template #content>
|
2847
|
-
<
|
2848
|
-
|
2849
|
-
|
2850
|
-
|
2851
|
-
|
2852
|
-
|
2800
|
+
<div
|
2801
|
+
class="k-card-list"
|
2802
|
+
role="list">
|
2803
|
+
<div *ngFor="let output of promptOutputs"
|
2804
|
+
kendoAIPromptOutputCard
|
2805
|
+
[promptOutput]="output">
|
2806
|
+
</div>
|
2807
|
+
</div>
|
2853
2808
|
</ng-template>
|
2854
|
-
`, isInline: true, dependencies: [{ kind: "
|
2855
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type:
|
2809
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: AIPromptOutputCardComponent, selector: "[kendoAIPromptOutputCard]", inputs: ["promptOutput"] }] });
|
2810
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OutputViewComponent, decorators: [{
|
2856
2811
|
type: Component,
|
2857
2812
|
args: [{
|
2858
|
-
selector: 'kendo-aiprompt-
|
2813
|
+
selector: 'kendo-aiprompt-output-view',
|
2859
2814
|
providers: [{
|
2860
2815
|
provide: BaseView,
|
2861
|
-
useExisting: forwardRef(() =>
|
2816
|
+
useExisting: forwardRef(() => OutputViewComponent)
|
2862
2817
|
}],
|
2863
2818
|
template: `
|
2864
2819
|
<ng-template #content>
|
2865
|
-
<
|
2866
|
-
|
2867
|
-
|
2868
|
-
|
2869
|
-
|
2870
|
-
|
2820
|
+
<div
|
2821
|
+
class="k-card-list"
|
2822
|
+
role="list">
|
2823
|
+
<div *ngFor="let output of promptOutputs"
|
2824
|
+
kendoAIPromptOutputCard
|
2825
|
+
[promptOutput]="output">
|
2826
|
+
</div>
|
2827
|
+
</div>
|
2871
2828
|
</ng-template>
|
2872
|
-
|
2829
|
+
`,
|
2830
|
+
standalone: true,
|
2831
|
+
imports: [NgFor, AIPromptOutputCardComponent]
|
2873
2832
|
}]
|
2874
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: AIPromptService }]; } });
|
2833
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: AIPromptService }]; } });
|
2875
2834
|
|
2876
2835
|
/**
|
2877
|
-
*
|
2878
|
-
* ([see example]({% slug globalization_chat %}#toc-custom-messages)).
|
2836
|
+
* The component for rendering the AIPrompt Prompt View.
|
2879
2837
|
*/
|
2880
|
-
class
|
2881
|
-
constructor(service) {
|
2882
|
-
super();
|
2838
|
+
class PromptViewComponent extends BaseView {
|
2839
|
+
constructor(localization, service) {
|
2840
|
+
super('prompt', localization);
|
2883
2841
|
this.service = service;
|
2842
|
+
/**
|
2843
|
+
* @hidden
|
2844
|
+
*/
|
2845
|
+
this.showSuggestions = true;
|
2846
|
+
/**
|
2847
|
+
* @hidden
|
2848
|
+
*/
|
2849
|
+
this.contentId = `k-prompt-suggestions-${guid()}`;
|
2884
2850
|
}
|
2885
|
-
|
2886
|
-
|
2851
|
+
/**
|
2852
|
+
* @hidden
|
2853
|
+
*/
|
2854
|
+
get suggestionsIcons() {
|
2855
|
+
return this.showSuggestions ?
|
2856
|
+
{ font: 'chevron-up', svg: chevronUpIcon } :
|
2857
|
+
{ font: 'chevron-down', svg: chevronDownIcon };
|
2858
|
+
}
|
2859
|
+
/**
|
2860
|
+
* @hidden
|
2861
|
+
*/
|
2862
|
+
get promptSuggestions() {
|
2863
|
+
return this.service.promptSuggestions;
|
2864
|
+
}
|
2865
|
+
/**
|
2866
|
+
*
|
2867
|
+
* @hidden
|
2868
|
+
*/
|
2869
|
+
set textAreaValue(value) {
|
2870
|
+
this.service.promptValue = value;
|
2871
|
+
}
|
2872
|
+
get textAreaValue() {
|
2873
|
+
return this.service.promptValue;
|
2874
|
+
}
|
2875
|
+
/**
|
2876
|
+
* @hidden
|
2877
|
+
*/
|
2878
|
+
suggestionClick(suggestion) {
|
2879
|
+
this.textAreaValue = this.service.promptValue = suggestion;
|
2887
2880
|
}
|
2888
2881
|
}
|
2889
|
-
|
2890
|
-
|
2882
|
+
PromptViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PromptViewComponent, deps: [{ token: i1$1.LocalizationService }, { token: AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
|
2883
|
+
PromptViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PromptViewComponent, isStandalone: true, selector: "kendo-aiprompt-prompt-view", providers: [
|
2891
2884
|
{
|
2892
|
-
provide:
|
2893
|
-
useExisting: forwardRef(() =>
|
2885
|
+
provide: BaseView,
|
2886
|
+
useExisting: forwardRef(() => PromptViewComponent)
|
2894
2887
|
}
|
2895
|
-
], usesInheritance: true, ngImport: i0, template:
|
2896
|
-
|
2888
|
+
], usesInheritance: true, ngImport: i0, template: `
|
2889
|
+
<ng-template #content>
|
2890
|
+
<kendo-textarea
|
2891
|
+
[placeholder]="messageFor('promptPlaceholder')"
|
2892
|
+
[rows]="1"
|
2893
|
+
[(value)]="textAreaValue">
|
2894
|
+
</kendo-textarea>
|
2895
|
+
<div *ngIf="promptSuggestions"
|
2896
|
+
class="k-prompt-expander">
|
2897
|
+
<button kendoButton
|
2898
|
+
[attr.aria-controls]="contentId"
|
2899
|
+
[attr.aria-expanded]="showSuggestions"
|
2900
|
+
fillMode="flat"
|
2901
|
+
[icon]="suggestionsIcons.font"
|
2902
|
+
[svgIcon]="suggestionsIcons.svg"
|
2903
|
+
type="button"
|
2904
|
+
(click)="showSuggestions = !showSuggestions">
|
2905
|
+
{{messageFor('promptSuggestions')}}
|
2906
|
+
</button>
|
2907
|
+
<div *ngIf="showSuggestions"
|
2908
|
+
class="k-prompt-expander-content"
|
2909
|
+
role="list"
|
2910
|
+
[attr.id]="contentId">
|
2911
|
+
<div *ngFor="let suggestion of promptSuggestions"
|
2912
|
+
class="k-prompt-suggestion"
|
2913
|
+
role="listitem"
|
2914
|
+
(click)="suggestionClick(suggestion)">
|
2915
|
+
{{suggestion}}
|
2916
|
+
</div>
|
2917
|
+
</div>
|
2918
|
+
</div>
|
2919
|
+
</ng-template>
|
2920
|
+
`, isInline: true, dependencies: [{ kind: "component", type: TextAreaComponent, selector: "kendo-textarea", inputs: ["focusableId", "flow", "inputAttributes", "adornmentsOrientation", "rows", "cols", "maxlength", "tabindex", "tabIndex", "resizable", "size", "rounded", "fillMode", "showPrefixSeparator", "showSuffixSeparator"], outputs: ["focus", "blur", "valueChange"], exportAs: ["kendoTextArea"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
2921
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PromptViewComponent, decorators: [{
|
2897
2922
|
type: Component,
|
2898
2923
|
args: [{
|
2924
|
+
selector: 'kendo-aiprompt-prompt-view',
|
2899
2925
|
providers: [
|
2900
2926
|
{
|
2901
|
-
provide:
|
2902
|
-
useExisting: forwardRef(() =>
|
2927
|
+
provide: BaseView,
|
2928
|
+
useExisting: forwardRef(() => PromptViewComponent)
|
2903
2929
|
}
|
2904
2930
|
],
|
2905
|
-
|
2906
|
-
|
2907
|
-
|
2908
|
-
|
2909
|
-
|
2910
|
-
|
2911
|
-
|
2912
|
-
|
2913
|
-
class
|
2914
|
-
|
2915
|
-
|
2916
|
-
|
2917
|
-
|
2918
|
-
|
2919
|
-
|
2920
|
-
|
2921
|
-
|
2922
|
-
|
2923
|
-
|
2924
|
-
|
2925
|
-
|
2926
|
-
|
2927
|
-
|
2928
|
-
|
2929
|
-
|
2930
|
-
|
2931
|
-
|
2932
|
-
|
2933
|
-
|
2934
|
-
|
2935
|
-
|
2936
|
-
|
2937
|
-
|
2938
|
-
|
2939
|
-
|
2940
|
-
OutputViewComponent,
|
2941
|
-
CommandViewComponent,
|
2942
|
-
CustomViewComponent,
|
2943
|
-
AIPromptCustomMessagesComponent,
|
2944
|
-
AIPromptToolbarActionsDirective,
|
2945
|
-
AIPromptToolbarFocusableDirective
|
2946
|
-
];
|
2947
|
-
const PRIVATE_DIRECTIVES$1 = [
|
2948
|
-
LocalizedMessagesDirective,
|
2949
|
-
AIPromptOutputCardComponent
|
2950
|
-
];
|
2951
|
-
/**
|
2952
|
-
* The [NgModule](link:site.data.urls.angular['ngmodules']) for the AIPrompt component.
|
2953
|
-
*
|
2954
|
-
* @example
|
2955
|
-
* ```ts-no-run
|
2956
|
-
* import { NgModule } from '@angular/core';
|
2957
|
-
* import { Component } from '@angular/core';
|
2958
|
-
* import { BrowserModule } from '@angular/platform-browser';
|
2959
|
-
*
|
2960
|
-
* import { AIPromptModule } from '@progress/kendo-angular-conversational-ui';
|
2961
|
-
* import { AppComponent } from './app.component';
|
2962
|
-
*
|
2963
|
-
* _@NgModule({
|
2964
|
-
* imports: [ BrowserModule, AIPromptModule ],
|
2965
|
-
* declarations: [ AppComponent ],
|
2966
|
-
* bootstrap: [ AppComponent ]
|
2967
|
-
* })
|
2968
|
-
*
|
2969
|
-
* export class AppModule { }
|
2970
|
-
* ```
|
2971
|
-
*/
|
2972
|
-
class AIPromptModule {
|
2973
|
-
}
|
2974
|
-
AIPromptModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2975
|
-
AIPromptModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AIPromptModule, declarations: [AIPromptComponent,
|
2976
|
-
PromptViewComponent,
|
2977
|
-
OutputViewComponent,
|
2978
|
-
CommandViewComponent,
|
2979
|
-
CustomViewComponent,
|
2980
|
-
AIPromptCustomMessagesComponent,
|
2981
|
-
AIPromptToolbarActionsDirective,
|
2982
|
-
AIPromptToolbarFocusableDirective, LocalizedMessagesDirective,
|
2983
|
-
AIPromptOutputCardComponent], imports: [CommonModule,
|
2984
|
-
ButtonsModule,
|
2985
|
-
IconsModule,
|
2986
|
-
InputsModule,
|
2987
|
-
LayoutModule], exports: [AIPromptComponent,
|
2988
|
-
PromptViewComponent,
|
2989
|
-
OutputViewComponent,
|
2990
|
-
CommandViewComponent,
|
2991
|
-
CustomViewComponent,
|
2992
|
-
AIPromptCustomMessagesComponent,
|
2993
|
-
AIPromptToolbarActionsDirective,
|
2994
|
-
AIPromptToolbarFocusableDirective] });
|
2995
|
-
AIPromptModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptModule, imports: [CommonModule,
|
2996
|
-
ButtonsModule,
|
2997
|
-
IconsModule,
|
2998
|
-
InputsModule,
|
2999
|
-
LayoutModule] });
|
3000
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptModule, decorators: [{
|
3001
|
-
type: NgModule,
|
3002
|
-
args: [{
|
3003
|
-
declarations: [...PUBLIC_DIRECTIVES$1, ...PRIVATE_DIRECTIVES$1],
|
3004
|
-
exports: [...PUBLIC_DIRECTIVES$1],
|
3005
|
-
imports: [
|
3006
|
-
CommonModule,
|
3007
|
-
ButtonsModule,
|
3008
|
-
IconsModule,
|
3009
|
-
InputsModule,
|
3010
|
-
LayoutModule
|
3011
|
-
]
|
2931
|
+
template: `
|
2932
|
+
<ng-template #content>
|
2933
|
+
<kendo-textarea
|
2934
|
+
[placeholder]="messageFor('promptPlaceholder')"
|
2935
|
+
[rows]="1"
|
2936
|
+
[(value)]="textAreaValue">
|
2937
|
+
</kendo-textarea>
|
2938
|
+
<div *ngIf="promptSuggestions"
|
2939
|
+
class="k-prompt-expander">
|
2940
|
+
<button kendoButton
|
2941
|
+
[attr.aria-controls]="contentId"
|
2942
|
+
[attr.aria-expanded]="showSuggestions"
|
2943
|
+
fillMode="flat"
|
2944
|
+
[icon]="suggestionsIcons.font"
|
2945
|
+
[svgIcon]="suggestionsIcons.svg"
|
2946
|
+
type="button"
|
2947
|
+
(click)="showSuggestions = !showSuggestions">
|
2948
|
+
{{messageFor('promptSuggestions')}}
|
2949
|
+
</button>
|
2950
|
+
<div *ngIf="showSuggestions"
|
2951
|
+
class="k-prompt-expander-content"
|
2952
|
+
role="list"
|
2953
|
+
[attr.id]="contentId">
|
2954
|
+
<div *ngFor="let suggestion of promptSuggestions"
|
2955
|
+
class="k-prompt-suggestion"
|
2956
|
+
role="listitem"
|
2957
|
+
(click)="suggestionClick(suggestion)">
|
2958
|
+
{{suggestion}}
|
2959
|
+
</div>
|
2960
|
+
</div>
|
2961
|
+
</div>
|
2962
|
+
</ng-template>
|
2963
|
+
`,
|
2964
|
+
standalone: true,
|
2965
|
+
imports: [TextAreaComponent, NgIf, ButtonComponent, NgFor]
|
3012
2966
|
}]
|
3013
|
-
}] });
|
2967
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }, { type: AIPromptService }]; } });
|
3014
2968
|
|
3015
2969
|
// eslint-disable no-forward-ref
|
3016
2970
|
/**
|
@@ -3026,8 +2980,8 @@ class CustomMessagesComponent extends Messages$1 {
|
|
3026
2980
|
return true;
|
3027
2981
|
}
|
3028
2982
|
}
|
3029
|
-
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
3030
|
-
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CustomMessagesComponent, selector: "kendo-chat-messages", providers: [
|
2983
|
+
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
2984
|
+
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-chat-messages", providers: [
|
3031
2985
|
{
|
3032
2986
|
provide: Messages$1,
|
3033
2987
|
useExisting: forwardRef(() => CustomMessagesComponent)
|
@@ -3043,9 +2997,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
3043
2997
|
}
|
3044
2998
|
],
|
3045
2999
|
selector: 'kendo-chat-messages',
|
3046
|
-
template:
|
3000
|
+
template: ``,
|
3001
|
+
standalone: true
|
3047
3002
|
}]
|
3048
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
3003
|
+
}], ctorParameters: function () { return [{ type: i1$1.LocalizationService }]; } });
|
3049
3004
|
|
3050
3005
|
/**
|
3051
3006
|
* Represents a Hero Card component ([see example]({% slug dialogflow_chat %})).
|
@@ -3064,7 +3019,7 @@ class HeroCardComponent {
|
|
3064
3019
|
}
|
3065
3020
|
}
|
3066
3021
|
HeroCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HeroCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
3067
|
-
HeroCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: HeroCardComponent, selector: "kendo-chat-hero-card", inputs: { imageUrl: "imageUrl", title: "title", subtitle: "subtitle", actions: "actions" }, outputs: { executeAction: "executeAction" }, host: { properties: { "class.k-card": "this.cssClass" } }, ngImport: i0, template: `
|
3022
|
+
HeroCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: HeroCardComponent, isStandalone: true, selector: "kendo-chat-hero-card", inputs: { imageUrl: "imageUrl", title: "title", subtitle: "subtitle", actions: "actions" }, outputs: { executeAction: "executeAction" }, host: { properties: { "class.k-card": "this.cssClass" } }, ngImport: i0, template: `
|
3068
3023
|
<img class="k-card-image" [src]="imageUrl" *ngIf="imageUrl" />
|
3069
3024
|
<div class="k-card-body">
|
3070
3025
|
<h5 class="k-card-title" *ngIf="title">
|
@@ -3086,7 +3041,7 @@ HeroCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
3086
3041
|
</button>
|
3087
3042
|
</span>
|
3088
3043
|
</div>
|
3089
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
3044
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
3090
3045
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HeroCardComponent, decorators: [{
|
3091
3046
|
type: Component,
|
3092
3047
|
args: [{
|
@@ -3113,7 +3068,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
3113
3068
|
</button>
|
3114
3069
|
</span>
|
3115
3070
|
</div>
|
3116
|
-
|
3071
|
+
`,
|
3072
|
+
standalone: true,
|
3073
|
+
imports: [NgIf, NgFor, ButtonComponent]
|
3117
3074
|
}]
|
3118
3075
|
}], propDecorators: { imageUrl: [{
|
3119
3076
|
type: Input
|
@@ -3130,7 +3087,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
3130
3087
|
type: Output
|
3131
3088
|
}] } });
|
3132
3089
|
|
3133
|
-
|
3090
|
+
/**
|
3091
|
+
* Utility array that contains all `AIPrompt` related components and directives
|
3092
|
+
*/
|
3093
|
+
const KENDO_AIPROMPT = [
|
3094
|
+
AIPromptComponent,
|
3095
|
+
PromptViewComponent,
|
3096
|
+
OutputViewComponent,
|
3097
|
+
CommandViewComponent,
|
3098
|
+
CustomViewComponent,
|
3099
|
+
AIPromptCustomMessagesComponent,
|
3100
|
+
AIPromptToolbarActionsDirective,
|
3101
|
+
AIPromptToolbarFocusableDirective
|
3102
|
+
];
|
3103
|
+
/**
|
3104
|
+
* Utility array that contains all `Chat` related components and directives
|
3105
|
+
*/
|
3106
|
+
const KENDO_CHAT = [
|
3134
3107
|
ChatComponent,
|
3135
3108
|
CustomMessagesComponent,
|
3136
3109
|
AttachmentTemplateDirective,
|
@@ -3138,18 +3111,51 @@ const PUBLIC_DIRECTIVES = [
|
|
3138
3111
|
HeroCardComponent,
|
3139
3112
|
ChatMessageBoxTemplateDirective
|
3140
3113
|
];
|
3141
|
-
|
3142
|
-
|
3143
|
-
|
3144
|
-
|
3145
|
-
|
3146
|
-
|
3147
|
-
MessageListComponent,
|
3148
|
-
MessageTemplateDirective,
|
3149
|
-
ScrollAnchorDirective,
|
3150
|
-
SuggestedActionsComponent,
|
3151
|
-
MessageBoxComponent
|
3114
|
+
/**
|
3115
|
+
* Utility array that contains all `@progress/kendo-angular-conversational-ui` related components and directives
|
3116
|
+
*/
|
3117
|
+
const KENDO_CONVERSATIONALUI = [
|
3118
|
+
...KENDO_AIPROMPT,
|
3119
|
+
...KENDO_CHAT
|
3152
3120
|
];
|
3121
|
+
|
3122
|
+
// IMPORTANT: NgModule export kept for backwards compatibility
|
3123
|
+
/**
|
3124
|
+
* The [NgModule](link:site.data.urls.angular['ngmodules']) for the AIPrompt component.
|
3125
|
+
*
|
3126
|
+
* @example
|
3127
|
+
* ```ts-no-run
|
3128
|
+
* import { NgModule } from '@angular/core';
|
3129
|
+
* import { Component } from '@angular/core';
|
3130
|
+
* import { BrowserModule } from '@angular/platform-browser';
|
3131
|
+
*
|
3132
|
+
* import { AIPromptModule } from '@progress/kendo-angular-conversational-ui';
|
3133
|
+
* import { AppComponent } from './app.component';
|
3134
|
+
*
|
3135
|
+
* _@NgModule({
|
3136
|
+
* imports: [ BrowserModule, AIPromptModule ],
|
3137
|
+
* declarations: [ AppComponent ],
|
3138
|
+
* bootstrap: [ AppComponent ]
|
3139
|
+
* })
|
3140
|
+
*
|
3141
|
+
* export class AppModule { }
|
3142
|
+
* ```
|
3143
|
+
*/
|
3144
|
+
class AIPromptModule {
|
3145
|
+
}
|
3146
|
+
AIPromptModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
3147
|
+
AIPromptModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AIPromptModule, imports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, CustomViewComponent, AIPromptCustomMessagesComponent, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective], exports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, CustomViewComponent, AIPromptCustomMessagesComponent, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective] });
|
3148
|
+
AIPromptModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, CustomViewComponent, AIPromptCustomMessagesComponent] });
|
3149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AIPromptModule, decorators: [{
|
3150
|
+
type: NgModule,
|
3151
|
+
args: [{
|
3152
|
+
exports: [...KENDO_AIPROMPT],
|
3153
|
+
imports: [...KENDO_AIPROMPT],
|
3154
|
+
providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService]
|
3155
|
+
}]
|
3156
|
+
}] });
|
3157
|
+
|
3158
|
+
// IMPORTANT: NgModule export kept for backwards compatibility
|
3153
3159
|
/**
|
3154
3160
|
* The [NgModule](link:site.data.urls.angular['ngmodules']) for the Chat component.
|
3155
3161
|
*
|
@@ -3174,47 +3180,18 @@ const PRIVATE_DIRECTIVES = [
|
|
3174
3180
|
class ChatModule {
|
3175
3181
|
}
|
3176
3182
|
ChatModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
3177
|
-
ChatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ChatModule,
|
3178
|
-
|
3179
|
-
AttachmentTemplateDirective,
|
3180
|
-
MessageTemplateDirective,
|
3181
|
-
HeroCardComponent,
|
3182
|
-
ChatMessageBoxTemplateDirective, AttachmentComponent,
|
3183
|
-
FocusedStateDirective,
|
3184
|
-
LocalizedMessagesDirective$1,
|
3185
|
-
MessageAttachmentsComponent,
|
3186
|
-
MessageComponent,
|
3187
|
-
MessageListComponent,
|
3188
|
-
MessageTemplateDirective,
|
3189
|
-
ScrollAnchorDirective,
|
3190
|
-
SuggestedActionsComponent,
|
3191
|
-
MessageBoxComponent], imports: [ButtonModule,
|
3192
|
-
CommonModule,
|
3193
|
-
ResizeSensorModule], exports: [ChatComponent,
|
3194
|
-
CustomMessagesComponent,
|
3195
|
-
AttachmentTemplateDirective,
|
3196
|
-
MessageTemplateDirective,
|
3197
|
-
HeroCardComponent,
|
3198
|
-
ChatMessageBoxTemplateDirective] });
|
3199
|
-
ChatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatModule, imports: [ButtonModule,
|
3200
|
-
CommonModule,
|
3201
|
-
ResizeSensorModule] });
|
3183
|
+
ChatModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ChatModule, imports: [ChatComponent, CustomMessagesComponent, AttachmentTemplateDirective, MessageTemplateDirective, HeroCardComponent, ChatMessageBoxTemplateDirective], exports: [ChatComponent, CustomMessagesComponent, AttachmentTemplateDirective, MessageTemplateDirective, HeroCardComponent, ChatMessageBoxTemplateDirective] });
|
3184
|
+
ChatModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatModule, providers: [IconsService, ResizeBatchService], imports: [ChatComponent, CustomMessagesComponent, HeroCardComponent] });
|
3202
3185
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ChatModule, decorators: [{
|
3203
3186
|
type: NgModule,
|
3204
3187
|
args: [{
|
3205
|
-
|
3206
|
-
|
3207
|
-
|
3208
|
-
],
|
3209
|
-
exports: [PUBLIC_DIRECTIVES],
|
3210
|
-
imports: [
|
3211
|
-
ButtonModule,
|
3212
|
-
CommonModule,
|
3213
|
-
ResizeSensorModule
|
3214
|
-
]
|
3188
|
+
exports: [...KENDO_CHAT],
|
3189
|
+
imports: [...KENDO_CHAT],
|
3190
|
+
providers: [IconsService, ResizeBatchService]
|
3215
3191
|
}]
|
3216
3192
|
}] });
|
3217
3193
|
|
3194
|
+
// IMPORTANT: NgModule export kept for backwards compatibility
|
3218
3195
|
/**
|
3219
3196
|
* Represents the [NgModule](link:site.data.urls.angular['ngmodules'])
|
3220
3197
|
* definition for the Conversational UI components.
|
@@ -3249,12 +3226,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
3249
3226
|
class ConversationalUIModule {
|
3250
3227
|
}
|
3251
3228
|
ConversationalUIModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConversationalUIModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
3252
|
-
ConversationalUIModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ConversationalUIModule, exports: [
|
3253
|
-
ConversationalUIModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConversationalUIModule, imports: [
|
3229
|
+
ConversationalUIModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ConversationalUIModule, imports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, CustomViewComponent, AIPromptCustomMessagesComponent, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, ChatComponent, CustomMessagesComponent, AttachmentTemplateDirective, MessageTemplateDirective, HeroCardComponent, ChatMessageBoxTemplateDirective], exports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, CustomViewComponent, AIPromptCustomMessagesComponent, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, ChatComponent, CustomMessagesComponent, AttachmentTemplateDirective, MessageTemplateDirective, HeroCardComponent, ChatMessageBoxTemplateDirective] });
|
3230
|
+
ConversationalUIModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConversationalUIModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService], imports: [AIPromptComponent, PromptViewComponent, OutputViewComponent, CommandViewComponent, CustomViewComponent, AIPromptCustomMessagesComponent, ChatComponent, CustomMessagesComponent, HeroCardComponent] });
|
3254
3231
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConversationalUIModule, decorators: [{
|
3255
3232
|
type: NgModule,
|
3256
3233
|
args: [{
|
3257
|
-
exports: [
|
3234
|
+
exports: [...KENDO_CONVERSATIONALUI],
|
3235
|
+
imports: [...KENDO_CONVERSATIONALUI],
|
3236
|
+
providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService]
|
3258
3237
|
}]
|
3259
3238
|
}] });
|
3260
3239
|
|
@@ -3262,5 +3241,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
3262
3241
|
* Generated bundle index. Do not edit.
|
3263
3242
|
*/
|
3264
3243
|
|
3265
|
-
export { AIPromptComponent, AIPromptCustomMessagesComponent, AIPromptModule, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, AttachmentTemplateDirective, ChatComponent, ChatMessageBoxTemplateDirective, ChatModule, CommandViewComponent, ConversationalUIModule, CustomMessagesComponent, CustomViewComponent, ExecuteActionEvent, HeroCardComponent, MessageTemplateDirective, OutputViewComponent, PromptViewComponent, SendMessageEvent };
|
3244
|
+
export { AIPromptComponent, AIPromptCustomMessagesComponent, AIPromptModule, AIPromptToolbarActionsDirective, AIPromptToolbarFocusableDirective, AttachmentTemplateDirective, ChatComponent, ChatMessageBoxTemplateDirective, ChatModule, CommandViewComponent, ConversationalUIModule, CustomMessagesComponent, CustomViewComponent, ExecuteActionEvent, HeroCardComponent, KENDO_AIPROMPT, KENDO_CHAT, KENDO_CONVERSATIONALUI, MessageTemplateDirective, OutputViewComponent, PromptViewComponent, SendMessageEvent };
|
3266
3245
|
|