@progress/kendo-angular-conversational-ui 21.1.1-develop.2 → 21.2.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/chat/chat.component.d.ts +2 -0
- package/chat/message-list.component.d.ts +2 -2
- package/codemods/utils.js +805 -394
- package/codemods/v20/chat-user.js +9 -12
- package/codemods/v21/chat-messagetoolbarvisibility.js +9 -13
- package/codemods/v21/chat-pinnedbyfield.js +1 -2
- package/esm2022/ai-prompt/aiprompt.component.mjs +155 -139
- package/esm2022/ai-prompt/common/output-card.component.mjs +81 -83
- package/esm2022/ai-prompt/common/toolbar-focusable.directive.mjs +2 -2
- package/esm2022/ai-prompt/views/output-view.component.mjs +27 -29
- package/esm2022/ai-prompt/views/prompt-view.component.mjs +150 -135
- package/esm2022/chat/attachment.component.mjs +53 -37
- package/esm2022/chat/cards/hero-card.component.mjs +48 -35
- package/esm2022/chat/chat-file.component.mjs +32 -29
- package/esm2022/chat/chat-view.mjs +2 -2
- package/esm2022/chat/chat.component.mjs +259 -242
- package/esm2022/chat/message-attachments.component.mjs +60 -55
- package/esm2022/chat/message-box.component.mjs +203 -183
- package/esm2022/chat/message-list.component.mjs +249 -209
- package/esm2022/chat/message-reference-content.component.mjs +30 -19
- package/esm2022/chat/message.component.mjs +301 -281
- package/esm2022/chat/suggested-actions.component.mjs +142 -134
- package/esm2022/inline-ai-prompt/inlineaiprompt-content.component.mjs +205 -179
- package/esm2022/package-metadata.mjs +2 -2
- package/fesm2022/progress-kendo-angular-conversational-ui.mjs +1988 -1777
- package/package.json +14 -14
- package/codemods/template-transformer/index.js +0 -93
|
@@ -29,24 +29,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
exports.default = default_1;
|
|
31
31
|
const fs = __importStar(require("fs"));
|
|
32
|
-
const index_1 = require("../template-transformer/index");
|
|
33
32
|
const utils_1 = require("../utils");
|
|
34
33
|
function default_1(fileInfo, api) {
|
|
35
34
|
const filePath = fileInfo.path;
|
|
35
|
+
// Handle HTML files and inline templates
|
|
36
|
+
const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeNameValueUpdate)(templateContent, 'kendo-chat', 'user', 'authorId', 'id'));
|
|
36
37
|
if (filePath.endsWith('.html')) {
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
// Only write to file once after all transformations
|
|
41
|
-
fs.writeFileSync(filePath, updatedContent, 'utf-8');
|
|
38
|
+
if (htmlResult && htmlResult !== fileInfo.source) {
|
|
39
|
+
fs.writeFileSync(filePath, htmlResult, 'utf-8');
|
|
40
|
+
return htmlResult;
|
|
42
41
|
}
|
|
43
|
-
return;
|
|
42
|
+
return fileInfo.source; // Return original source if no changes
|
|
44
43
|
}
|
|
44
|
+
// Handle TypeScript property transformations
|
|
45
45
|
const j = api.jscodeshift;
|
|
46
|
-
const rootSource = j(fileInfo.source);
|
|
47
|
-
(0,
|
|
48
|
-
(0, utils_1.templateBoundAttributeTransformer)(root, 'kendo-chat', 'user', 'authorId', 'id');
|
|
49
|
-
});
|
|
50
|
-
(0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, 'ChatComponent', 'user', 'authorId', 'id');
|
|
46
|
+
const rootSource = j(htmlResult || fileInfo.source);
|
|
47
|
+
(0, utils_1.tsPropertyTransformer)(fileInfo.source, rootSource, j, '@progress/kendo-angular-conversational-ui', 'ChatComponent', 'user', 'authorId', 'id');
|
|
51
48
|
return rootSource.toSource();
|
|
52
49
|
}
|
|
@@ -29,25 +29,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
exports.default = default_1;
|
|
31
31
|
const fs = __importStar(require("fs"));
|
|
32
|
-
const index_1 = require("../template-transformer/index");
|
|
33
32
|
const utils_1 = require("../utils");
|
|
34
33
|
function default_1(fileInfo, api) {
|
|
35
34
|
const filePath = fileInfo.path;
|
|
35
|
+
// Handle HTML files and inline templates
|
|
36
|
+
const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeRemoval)(templateContent, 'kendo-chat', 'messageToolbarVisibility'));
|
|
36
37
|
if (filePath.endsWith('.html')) {
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
// Only write to file once after all transformations
|
|
41
|
-
fs.writeFileSync(filePath, updatedContent, 'utf-8');
|
|
38
|
+
if (htmlResult && htmlResult !== fileInfo.source) {
|
|
39
|
+
fs.writeFileSync(filePath, htmlResult, 'utf-8');
|
|
40
|
+
return htmlResult;
|
|
42
41
|
}
|
|
43
|
-
return;
|
|
42
|
+
return fileInfo.source; // Return original source if no changes
|
|
44
43
|
}
|
|
44
|
+
// Handle TypeScript property transformations
|
|
45
45
|
const j = api.jscodeshift;
|
|
46
|
-
const rootSource = j(fileInfo.source);
|
|
47
|
-
(0,
|
|
48
|
-
(0, utils_1.templateAttributeRemoval)(root, 'kendo-chat', 'messageToolbarVisibility');
|
|
49
|
-
});
|
|
50
|
-
(0, utils_1.tsPropertyRemoval)(fileInfo.source, rootSource, j, 'ChatComponent', 'messageToolbarVisibility');
|
|
51
|
-
(0, utils_1.tsComponentPropertyRemoval)(fileInfo.source, rootSource, j, 'ChatComponent', 'messageToolbarVisibility');
|
|
46
|
+
const rootSource = j(htmlResult || fileInfo.source);
|
|
47
|
+
(0, utils_1.tsComponentPropertyRemoval)(fileInfo.source, rootSource, j, '@progress/kendo-angular-conversational-ui', 'ChatComponent', 'messageToolbarVisibility');
|
|
52
48
|
return rootSource.toSource();
|
|
53
49
|
}
|
|
@@ -13,7 +13,6 @@ function default_1(fileInfo, api) {
|
|
|
13
13
|
}
|
|
14
14
|
const j = api.jscodeshift;
|
|
15
15
|
const rootSource = j(fileInfo.source);
|
|
16
|
-
(0, utils_1.tsPropertyRemoval)(fileInfo.source, rootSource, j, 'ConversationalUIModelFields', 'pinnedByField');
|
|
17
|
-
(0, utils_1.tsComponentPropertyRemoval)(fileInfo.source, rootSource, j, 'ConversationalUIModelFields', 'pinnedByField');
|
|
16
|
+
(0, utils_1.tsPropertyRemoval)(fileInfo.source, rootSource, j, '@progress/kendo-angular-conversational-ui', 'ConversationalUIModelFields', 'pinnedByField');
|
|
18
17
|
return rootSource.toSource();
|
|
19
18
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Component, ContentChild, ContentChildren, ElementRef, EventEmitter, HostBinding, Input, NgZone, Output, QueryList, Renderer2, ViewChild } from "@angular/core";
|
|
6
|
-
import {
|
|
6
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
7
7
|
import { Subscription } from "rxjs";
|
|
8
8
|
import { sparklesIcon, commentIcon, stopSmIcon } from "@progress/kendo-svg-icons";
|
|
9
9
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
@@ -300,7 +300,7 @@ export class AIPromptComponent {
|
|
|
300
300
|
this.promptRequest.emit(eventArgs);
|
|
301
301
|
}
|
|
302
302
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptComponent, deps: [{ token: i1.LocalizationService }, { token: i2.AIPromptService }, { token: i3.ToolbarNavigationService }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
303
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
303
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: AIPromptComponent, isStandalone: true, selector: "kendo-aiprompt", inputs: { activeView: "activeView", promptCommands: "promptCommands", promptSuggestions: "promptSuggestions", promptOutputs: "promptOutputs", showOutputRating: "showOutputRating", streaming: "streaming", speechToTextButton: "speechToTextButton", textAreaSettings: "textAreaSettings", generateButtonSVGIcon: "generateButtonSVGIcon", generateButtonIcon: "generateButtonIcon", disabledGenerateButton: "disabledGenerateButton" }, outputs: { activeViewChange: "activeViewChange", promptRequest: "promptRequest", commandExecute: "commandExecute", outputCopy: "outputCopy", outputRatingChange: "outputRatingChange", promptRequestCancel: "promptRequestCancel" }, host: { properties: { "class.k-prompt": "this.hostClasses", "attr.dir": "this.dirAttr" } }, providers: [
|
|
304
304
|
LocalizationService,
|
|
305
305
|
AIPromptService,
|
|
306
306
|
ToolbarNavigationService,
|
|
@@ -310,82 +310,90 @@ export class AIPromptComponent {
|
|
|
310
310
|
}
|
|
311
311
|
], queries: [{ propertyName: "toolbarActionsTemplate", first: true, predicate: AIPromptToolbarActionsDirective, descendants: true }, { propertyName: "outputTemplate", first: true, predicate: AIPromptOutputTemplateDirective, descendants: true }, { propertyName: "outputBodyTemplate", first: true, predicate: AIPromptOutputBodyTemplateDirective, descendants: true }, { propertyName: "views", predicate: BaseView }], viewQueries: [{ propertyName: "fabButton", first: true, predicate: ["fabButton"], descendants: true }], exportAs: ["kendoAIPrompt"], usesOnChanges: true, ngImport: i0, template: `
|
|
312
312
|
<ng-container kendoAIPromptLocalizedMessages
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
313
|
+
i18n-promptView="kendo.aiprompt.promptView|The Toolbar button text for the Prompt view."
|
|
314
|
+
promptView="Ask AI"
|
|
315
|
+
i18n-outputView="kendo.aiprompt.outputView|The Toolbar button text for the Output view."
|
|
316
|
+
outputView="Output"
|
|
317
|
+
i18n-generateOutput="kendo.aiprompt.generateOutput|The text for the Generate button in the Prompt view."
|
|
318
|
+
generateOutput="Generate"
|
|
319
|
+
i18n-promptPlaceholder="kendo.aiprompt.promptPlaceholder|The placeholder text for the Prompt View text area."
|
|
320
|
+
promptPlaceholder="Ask or generate content with AI"
|
|
321
|
+
i18n-copyOutput="kendo.aiprompt.copyOutput|The Copy button text in each Output view card."
|
|
322
|
+
copyOutput="Copy"
|
|
323
|
+
i18n-retryGeneration="kendo.aiprompt.retryGeneration|The Retry button text in each Output view card."
|
|
324
|
+
retryGeneration="Retry"
|
|
325
|
+
i18n-outputTitle="kendo.aiprompt.outputTitle|The title of each Output view card."
|
|
326
|
+
outputTitle="Generated with AI"
|
|
327
|
+
i18n-outputRetryTitle="kendo.aiprompt.outputRetryTitle|The title of each Output view retry card."
|
|
328
|
+
outputRetryTitle="Generated with AI"
|
|
329
|
+
i18n-promptSuggestions="kendo.aiprompt.promptSuggestions|The title of the Prompt suggestions button."
|
|
330
|
+
promptSuggestions="Prompt suggestions"
|
|
331
|
+
i18n-speechToTextButton="kendo.aiprompt.speechToTextButton|The aria-label for the Speech to Text button."
|
|
332
|
+
speechToTextButton="Voice input">
|
|
333
333
|
</ng-container>
|
|
334
334
|
<div class="k-prompt-header">
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
335
|
+
<div class="k-toolbar-flat k-toolbar k-toolbar-md"
|
|
336
|
+
role="toolbar">
|
|
337
|
+
@for (view of viewsArray; track view; let idx = $index) {
|
|
338
|
+
<button
|
|
339
|
+
kendoButton
|
|
340
|
+
kendoAIPromptToolbarFocusable
|
|
341
|
+
type="button"
|
|
342
|
+
fillMode="flat"
|
|
343
|
+
rounded="full"
|
|
344
|
+
themeColor="primary"
|
|
345
|
+
[svgIcon]="view.svgIcon"
|
|
346
|
+
[icon]="view.icon"
|
|
347
|
+
[selected]="idx === activeView"
|
|
348
|
+
(click)="viewChange(idx)">
|
|
349
|
+
{{view.buttonText}}
|
|
350
|
+
</button>
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
@if (toolbarActionsTemplate) {
|
|
354
|
+
<ng-template
|
|
355
|
+
[ngTemplateOutlet]="toolbarActionsTemplate?.templateRef">
|
|
356
|
+
</ng-template>
|
|
357
|
+
}
|
|
358
|
+
</div>
|
|
355
359
|
</div>
|
|
356
360
|
<div class="k-prompt-content">
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
361
|
+
@if (streaming && selectedView?.viewType === 'output') {
|
|
362
|
+
<kendo-floatingactionbutton #fabButton
|
|
363
|
+
class="k-prompt-stop-fab"
|
|
364
|
+
buttonClass="k-generating k-active"
|
|
365
|
+
[positionMode]="fabPositionMode"
|
|
366
|
+
[align]="fabAlignment"
|
|
367
|
+
[svgIcon]="fabStopGenerationSVGIcon"
|
|
368
|
+
icon="stop"
|
|
369
|
+
(click)="promptRequestCancel.emit()"
|
|
370
|
+
>
|
|
366
371
|
</kendo-floatingactionbutton>
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
</
|
|
372
|
+
}
|
|
373
|
+
<div class="k-prompt-view">
|
|
374
|
+
<ng-container *ngTemplateOutlet="viewTemplate">
|
|
375
|
+
</ng-container>
|
|
376
|
+
</div>
|
|
371
377
|
</div>
|
|
372
|
-
|
|
378
|
+
@if (selectedView?.viewType === 'prompt') {
|
|
379
|
+
<div class="k-prompt-footer">
|
|
373
380
|
<div class="k-actions k-actions-start k-actions-horizontal k-prompt-actions">
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
381
|
+
<button
|
|
382
|
+
kendoButton
|
|
383
|
+
type="button"
|
|
384
|
+
themeColor="primary"
|
|
385
|
+
rounded="full"
|
|
386
|
+
[attr.title]="messageFor('generateOutput')"
|
|
387
|
+
[attr.aria-label]="messageFor('generateOutput')"
|
|
388
|
+
[attr.aria-disabled]="disabledGenerateButton"
|
|
389
|
+
[svgIcon]="generateButtonSVGIcon"
|
|
390
|
+
[icon]="generateButtonIcon"
|
|
391
|
+
[disabled]="disabledGenerateButton"
|
|
392
|
+
(click)="handleGenerateOutput()">{{messageFor('generateOutput')}}</button>
|
|
386
393
|
</div>
|
|
387
|
-
|
|
388
|
-
|
|
394
|
+
</div>
|
|
395
|
+
}
|
|
396
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoAIPromptLocalizedMessages]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: AIPromptToolbarFocusableDirective, selector: "[kendoAIPromptToolbarFocusable]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FloatingActionButtonComponent, selector: "kendo-floatingactionbutton", inputs: ["themeColor", "size", "rounded", "disabled", "align", "offset", "positionMode", "icon", "svgIcon", "iconClass", "buttonClass", "dialClass", "text", "dialItemAnimation", "tabIndex", "dialItems"], outputs: ["blur", "focus", "dialItemClick", "open", "close"] }] });
|
|
389
397
|
}
|
|
390
398
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptComponent, decorators: [{
|
|
391
399
|
type: Component,
|
|
@@ -403,84 +411,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
403
411
|
],
|
|
404
412
|
template: `
|
|
405
413
|
<ng-container kendoAIPromptLocalizedMessages
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
414
|
+
i18n-promptView="kendo.aiprompt.promptView|The Toolbar button text for the Prompt view."
|
|
415
|
+
promptView="Ask AI"
|
|
416
|
+
i18n-outputView="kendo.aiprompt.outputView|The Toolbar button text for the Output view."
|
|
417
|
+
outputView="Output"
|
|
418
|
+
i18n-generateOutput="kendo.aiprompt.generateOutput|The text for the Generate button in the Prompt view."
|
|
419
|
+
generateOutput="Generate"
|
|
420
|
+
i18n-promptPlaceholder="kendo.aiprompt.promptPlaceholder|The placeholder text for the Prompt View text area."
|
|
421
|
+
promptPlaceholder="Ask or generate content with AI"
|
|
422
|
+
i18n-copyOutput="kendo.aiprompt.copyOutput|The Copy button text in each Output view card."
|
|
423
|
+
copyOutput="Copy"
|
|
424
|
+
i18n-retryGeneration="kendo.aiprompt.retryGeneration|The Retry button text in each Output view card."
|
|
425
|
+
retryGeneration="Retry"
|
|
426
|
+
i18n-outputTitle="kendo.aiprompt.outputTitle|The title of each Output view card."
|
|
427
|
+
outputTitle="Generated with AI"
|
|
428
|
+
i18n-outputRetryTitle="kendo.aiprompt.outputRetryTitle|The title of each Output view retry card."
|
|
429
|
+
outputRetryTitle="Generated with AI"
|
|
430
|
+
i18n-promptSuggestions="kendo.aiprompt.promptSuggestions|The title of the Prompt suggestions button."
|
|
431
|
+
promptSuggestions="Prompt suggestions"
|
|
432
|
+
i18n-speechToTextButton="kendo.aiprompt.speechToTextButton|The aria-label for the Speech to Text button."
|
|
433
|
+
speechToTextButton="Voice input">
|
|
426
434
|
</ng-container>
|
|
427
435
|
<div class="k-prompt-header">
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
436
|
+
<div class="k-toolbar-flat k-toolbar k-toolbar-md"
|
|
437
|
+
role="toolbar">
|
|
438
|
+
@for (view of viewsArray; track view; let idx = $index) {
|
|
439
|
+
<button
|
|
440
|
+
kendoButton
|
|
441
|
+
kendoAIPromptToolbarFocusable
|
|
442
|
+
type="button"
|
|
443
|
+
fillMode="flat"
|
|
444
|
+
rounded="full"
|
|
445
|
+
themeColor="primary"
|
|
446
|
+
[svgIcon]="view.svgIcon"
|
|
447
|
+
[icon]="view.icon"
|
|
448
|
+
[selected]="idx === activeView"
|
|
449
|
+
(click)="viewChange(idx)">
|
|
450
|
+
{{view.buttonText}}
|
|
451
|
+
</button>
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
@if (toolbarActionsTemplate) {
|
|
455
|
+
<ng-template
|
|
456
|
+
[ngTemplateOutlet]="toolbarActionsTemplate?.templateRef">
|
|
457
|
+
</ng-template>
|
|
458
|
+
}
|
|
459
|
+
</div>
|
|
448
460
|
</div>
|
|
449
461
|
<div class="k-prompt-content">
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
462
|
+
@if (streaming && selectedView?.viewType === 'output') {
|
|
463
|
+
<kendo-floatingactionbutton #fabButton
|
|
464
|
+
class="k-prompt-stop-fab"
|
|
465
|
+
buttonClass="k-generating k-active"
|
|
466
|
+
[positionMode]="fabPositionMode"
|
|
467
|
+
[align]="fabAlignment"
|
|
468
|
+
[svgIcon]="fabStopGenerationSVGIcon"
|
|
469
|
+
icon="stop"
|
|
470
|
+
(click)="promptRequestCancel.emit()"
|
|
471
|
+
>
|
|
459
472
|
</kendo-floatingactionbutton>
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
</
|
|
473
|
+
}
|
|
474
|
+
<div class="k-prompt-view">
|
|
475
|
+
<ng-container *ngTemplateOutlet="viewTemplate">
|
|
476
|
+
</ng-container>
|
|
477
|
+
</div>
|
|
464
478
|
</div>
|
|
465
|
-
|
|
479
|
+
@if (selectedView?.viewType === 'prompt') {
|
|
480
|
+
<div class="k-prompt-footer">
|
|
466
481
|
<div class="k-actions k-actions-start k-actions-horizontal k-prompt-actions">
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
482
|
+
<button
|
|
483
|
+
kendoButton
|
|
484
|
+
type="button"
|
|
485
|
+
themeColor="primary"
|
|
486
|
+
rounded="full"
|
|
487
|
+
[attr.title]="messageFor('generateOutput')"
|
|
488
|
+
[attr.aria-label]="messageFor('generateOutput')"
|
|
489
|
+
[attr.aria-disabled]="disabledGenerateButton"
|
|
490
|
+
[svgIcon]="generateButtonSVGIcon"
|
|
491
|
+
[icon]="generateButtonIcon"
|
|
492
|
+
[disabled]="disabledGenerateButton"
|
|
493
|
+
(click)="handleGenerateOutput()">{{messageFor('generateOutput')}}</button>
|
|
479
494
|
</div>
|
|
480
|
-
|
|
481
|
-
|
|
495
|
+
</div>
|
|
496
|
+
}
|
|
497
|
+
`,
|
|
482
498
|
standalone: true,
|
|
483
|
-
imports: [LocalizedMessagesDirective,
|
|
499
|
+
imports: [LocalizedMessagesDirective, ButtonComponent, AIPromptToolbarFocusableDirective, NgTemplateOutlet, FloatingActionButtonComponent]
|
|
484
500
|
}]
|
|
485
501
|
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.AIPromptService }, { type: i3.ToolbarNavigationService }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { hostClasses: [{
|
|
486
502
|
type: HostBinding,
|