@progress/kendo-angular-conversational-ui 21.1.1-develop.1 → 21.2.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -59,14 +59,14 @@ export declare class MessageListComponent implements OnInit, AfterViewInit, OnDe
59
59
  ngOnDestroy(): void;
60
60
  onResize(): void;
61
61
  onClick(message: any, event: any): void;
62
- showGroupAuthor(group: any): boolean;
63
- showGroupAvatar(group: any): boolean;
64
62
  onContextMenuClick(message: Message, event: MouseEvent, messageElement?: any): void;
65
63
  formatTimeStamp(date: any): string;
66
64
  calculateMessageWidthMode(message: any): boolean;
67
65
  onKeydown(e: any): void;
68
66
  onBlur(args: any): void;
69
67
  isOwnMessage(msg: Message): boolean;
68
+ showGroupAuthor(group: any): boolean;
69
+ showGroupAvatar(group: any): boolean;
70
70
  dispatchAction(action: Action, message: Message): void;
71
71
  trackGroup(_index: number, item: ViewItem): any;
72
72
  select(item: ChatItem, event?: Event): void;
@@ -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 { NgFor, NgIf, NgTemplateOutlet } from "@angular/common";
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: "14.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: [
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
- 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">
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
- <div class="k-toolbar-flat k-toolbar k-toolbar-md"
336
- role="toolbar">
337
- <button *ngFor="let view of viewsArray; let idx = index"
338
- kendoButton
339
- kendoAIPromptToolbarFocusable
340
- type="button"
341
- fillMode="flat"
342
- rounded="full"
343
- themeColor="primary"
344
- [svgIcon]="view.svgIcon"
345
- [icon]="view.icon"
346
- [selected]="idx === activeView"
347
- (click)="viewChange(idx)">
348
- {{view.buttonText}}
349
- </button>
350
-
351
- <ng-template *ngIf="toolbarActionsTemplate"
352
- [ngTemplateOutlet]="toolbarActionsTemplate?.templateRef">
353
- </ng-template>
354
- </div>
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
- <kendo-floatingactionbutton #fabButton *ngIf="streaming && selectedView?.viewType === 'output'"
358
- class="k-prompt-stop-fab"
359
- buttonClass="k-generating k-active"
360
- [positionMode]="fabPositionMode"
361
- [align]="fabAlignment"
362
- [svgIcon]="fabStopGenerationSVGIcon"
363
- icon="stop"
364
- (click)="promptRequestCancel.emit()"
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
- <div class="k-prompt-view">
368
- <ng-container *ngTemplateOutlet="viewTemplate">
369
- </ng-container>
370
- </div>
372
+ }
373
+ <div class="k-prompt-view">
374
+ <ng-container *ngTemplateOutlet="viewTemplate">
375
+ </ng-container>
376
+ </div>
371
377
  </div>
372
- <div class="k-prompt-footer" *ngIf="selectedView?.viewType === 'prompt'">
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
- <button
375
- kendoButton
376
- type="button"
377
- themeColor="primary"
378
- rounded="full"
379
- [attr.title]="messageFor('generateOutput')"
380
- [attr.aria-label]="messageFor('generateOutput')"
381
- [attr.aria-disabled]="disabledGenerateButton"
382
- [svgIcon]="generateButtonSVGIcon"
383
- [icon]="generateButtonIcon"
384
- [disabled]="disabledGenerateButton"
385
- (click)="handleGenerateOutput()">{{messageFor('generateOutput')}}</button>
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
- </div>
388
- `, 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]", 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: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"] }] });
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
- i18n-promptView="kendo.aiprompt.promptView|The Toolbar button text for the Prompt view."
407
- promptView="Ask AI"
408
- i18n-outputView="kendo.aiprompt.outputView|The Toolbar button text for the Output view."
409
- outputView="Output"
410
- i18n-generateOutput="kendo.aiprompt.generateOutput|The text for the Generate button in the Prompt view."
411
- generateOutput="Generate"
412
- i18n-promptPlaceholder="kendo.aiprompt.promptPlaceholder|The placeholder text for the Prompt View text area."
413
- promptPlaceholder="Ask or generate content with AI"
414
- i18n-copyOutput="kendo.aiprompt.copyOutput|The Copy button text in each Output view card."
415
- copyOutput="Copy"
416
- i18n-retryGeneration="kendo.aiprompt.retryGeneration|The Retry button text in each Output view card."
417
- retryGeneration="Retry"
418
- i18n-outputTitle="kendo.aiprompt.outputTitle|The title of each Output view card."
419
- outputTitle="Generated with AI"
420
- i18n-outputRetryTitle="kendo.aiprompt.outputRetryTitle|The title of each Output view retry card."
421
- outputRetryTitle="Generated with AI"
422
- i18n-promptSuggestions="kendo.aiprompt.promptSuggestions|The title of the Prompt suggestions button."
423
- promptSuggestions="Prompt suggestions"
424
- i18n-speechToTextButton="kendo.aiprompt.speechToTextButton|The aria-label for the Speech to Text button."
425
- speechToTextButton="Voice input">
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
- <div class="k-toolbar-flat k-toolbar k-toolbar-md"
429
- role="toolbar">
430
- <button *ngFor="let view of viewsArray; let idx = index"
431
- kendoButton
432
- kendoAIPromptToolbarFocusable
433
- type="button"
434
- fillMode="flat"
435
- rounded="full"
436
- themeColor="primary"
437
- [svgIcon]="view.svgIcon"
438
- [icon]="view.icon"
439
- [selected]="idx === activeView"
440
- (click)="viewChange(idx)">
441
- {{view.buttonText}}
442
- </button>
443
-
444
- <ng-template *ngIf="toolbarActionsTemplate"
445
- [ngTemplateOutlet]="toolbarActionsTemplate?.templateRef">
446
- </ng-template>
447
- </div>
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
- <kendo-floatingactionbutton #fabButton *ngIf="streaming && selectedView?.viewType === 'output'"
451
- class="k-prompt-stop-fab"
452
- buttonClass="k-generating k-active"
453
- [positionMode]="fabPositionMode"
454
- [align]="fabAlignment"
455
- [svgIcon]="fabStopGenerationSVGIcon"
456
- icon="stop"
457
- (click)="promptRequestCancel.emit()"
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
- <div class="k-prompt-view">
461
- <ng-container *ngTemplateOutlet="viewTemplate">
462
- </ng-container>
463
- </div>
473
+ }
474
+ <div class="k-prompt-view">
475
+ <ng-container *ngTemplateOutlet="viewTemplate">
476
+ </ng-container>
477
+ </div>
464
478
  </div>
465
- <div class="k-prompt-footer" *ngIf="selectedView?.viewType === 'prompt'">
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
- <button
468
- kendoButton
469
- type="button"
470
- themeColor="primary"
471
- rounded="full"
472
- [attr.title]="messageFor('generateOutput')"
473
- [attr.aria-label]="messageFor('generateOutput')"
474
- [attr.aria-disabled]="disabledGenerateButton"
475
- [svgIcon]="generateButtonSVGIcon"
476
- [icon]="generateButtonIcon"
477
- [disabled]="disabledGenerateButton"
478
- (click)="handleGenerateOutput()">{{messageFor('generateOutput')}}</button>
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
- </div>
481
- `,
495
+ </div>
496
+ }
497
+ `,
482
498
  standalone: true,
483
- imports: [LocalizedMessagesDirective, NgFor, ButtonComponent, AIPromptToolbarFocusableDirective, NgIf, NgTemplateOutlet, FloatingActionButtonComponent]
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,
@@ -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, HostBinding, Input } from '@angular/core';
6
- import { NgIf, NgTemplateOutlet } from '@angular/common';
6
+ import { NgTemplateOutlet } from '@angular/common';
7
7
  import { LocalizationService } from '@progress/kendo-angular-l10n';
8
8
  import { guid, isPresent } from '@progress/kendo-angular-common';
9
9
  import { ButtonComponent } from "@progress/kendo-angular-buttons";
@@ -104,56 +104,55 @@ export class AIPromptOutputCardComponent {
104
104
  return this.service.outputBodyTemplate?.templateRef;
105
105
  }
106
106
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptOutputCardComponent, deps: [{ token: i1.LocalizationService }, { token: i2.AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
107
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", 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: `
107
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", 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: `
108
108
  <div class="k-card-header">
109
- <div
110
- class="k-card-title"
111
- [attr.id]="titleId">{{outputTitle}}
112
- </div>
113
- <div class="k-card-subtitle">{{promptOutput.prompt}}</div>
109
+ <div
110
+ class="k-card-title"
111
+ [attr.id]="titleId">{{outputTitle}}
112
+ </div>
113
+ <div class="k-card-subtitle">{{promptOutput.prompt}}</div>
114
114
  </div>
115
115
  <div class="k-card-body">
116
- <ng-container *ngIf="customBodyTemplate; else defaultTemplate">
117
- <ng-container *ngTemplateOutlet="customBodyTemplate; context: { $implicit: promptOutput }">
118
- </ng-container>
116
+ @if (customBodyTemplate) {
117
+ <ng-container *ngTemplateOutlet="customBodyTemplate; context: { $implicit: promptOutput }">
119
118
  </ng-container>
120
- <ng-template #defaultTemplate>
121
- <p>{{promptOutput.output}}</p>
122
- </ng-template>
119
+ } @else {
120
+ <p>{{promptOutput.output}}</p>
121
+ }
123
122
  </div>
124
123
  <div class="k-actions k-actions-start k-actions-horizontal k-card-actions">
124
+ <button kendoButton
125
+ fillMode="flat"
126
+ themeColor="primary"
127
+ rounded="full"
128
+ icon="copy"
129
+ [svgIcon]="copyIcon"
130
+ (click)="handleCopy()"
131
+ >{{messageFor('copyOutput')}}</button>
132
+ <button kendoButton
133
+ fillMode="flat"
134
+ rounded="full"
135
+ icon="arrow-rotate-cw"
136
+ [svgIcon]="retryIcon"
137
+ (click)="handleRetry()"
138
+ >{{messageFor('retryGeneration')}}</button>
139
+ @if (showRating) {
140
+ <span class="k-spacer"></span>
125
141
  <button kendoButton
126
- fillMode="flat"
127
- themeColor="primary"
128
- rounded="full"
129
- icon="copy"
130
- [svgIcon]="copyIcon"
131
- (click)="handleCopy()"
132
- >{{messageFor('copyOutput')}}</button>
142
+ fillMode="flat"
143
+ icon="thumb-up-outline"
144
+ [svgIcon]="positiveRatingIcon"
145
+ (click)="handleRating('positive')">
146
+ </button>
133
147
  <button kendoButton
134
- fillMode="flat"
135
- rounded="full"
136
- icon="arrow-rotate-cw"
137
- [svgIcon]="retryIcon"
138
- (click)="handleRetry()"
139
- >{{messageFor('retryGeneration')}}</button>
140
- <ng-container *ngIf="showRating">
141
- <span class="k-spacer"></span>
142
- <button kendoButton
143
- fillMode="flat"
144
- icon="thumb-up-outline"
145
- [svgIcon]="positiveRatingIcon"
146
- (click)="handleRating('positive')">
147
- </button>
148
- <button kendoButton
149
- fillMode="flat"
150
- icon="thumb-down-outline"
151
- [svgIcon]="negativeRatingIcon"
152
- (click)="handleRating('negative')">
153
- </button>
154
- </ng-container>
148
+ fillMode="flat"
149
+ icon="thumb-down-outline"
150
+ [svgIcon]="negativeRatingIcon"
151
+ (click)="handleRating('negative')">
152
+ </button>
153
+ }
155
154
  </div>
156
- `, isInline: true, dependencies: [{ 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: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
155
+ `, isInline: true, dependencies: [{ 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: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
157
156
  }
158
157
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AIPromptOutputCardComponent, decorators: [{
159
158
  type: Component,
@@ -161,56 +160,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
161
160
  selector: '[kendoAIPromptOutputCard]',
162
161
  template: `
163
162
  <div class="k-card-header">
164
- <div
165
- class="k-card-title"
166
- [attr.id]="titleId">{{outputTitle}}
167
- </div>
168
- <div class="k-card-subtitle">{{promptOutput.prompt}}</div>
163
+ <div
164
+ class="k-card-title"
165
+ [attr.id]="titleId">{{outputTitle}}
166
+ </div>
167
+ <div class="k-card-subtitle">{{promptOutput.prompt}}</div>
169
168
  </div>
170
169
  <div class="k-card-body">
171
- <ng-container *ngIf="customBodyTemplate; else defaultTemplate">
172
- <ng-container *ngTemplateOutlet="customBodyTemplate; context: { $implicit: promptOutput }">
173
- </ng-container>
170
+ @if (customBodyTemplate) {
171
+ <ng-container *ngTemplateOutlet="customBodyTemplate; context: { $implicit: promptOutput }">
174
172
  </ng-container>
175
- <ng-template #defaultTemplate>
176
- <p>{{promptOutput.output}}</p>
177
- </ng-template>
173
+ } @else {
174
+ <p>{{promptOutput.output}}</p>
175
+ }
178
176
  </div>
179
177
  <div class="k-actions k-actions-start k-actions-horizontal k-card-actions">
178
+ <button kendoButton
179
+ fillMode="flat"
180
+ themeColor="primary"
181
+ rounded="full"
182
+ icon="copy"
183
+ [svgIcon]="copyIcon"
184
+ (click)="handleCopy()"
185
+ >{{messageFor('copyOutput')}}</button>
186
+ <button kendoButton
187
+ fillMode="flat"
188
+ rounded="full"
189
+ icon="arrow-rotate-cw"
190
+ [svgIcon]="retryIcon"
191
+ (click)="handleRetry()"
192
+ >{{messageFor('retryGeneration')}}</button>
193
+ @if (showRating) {
194
+ <span class="k-spacer"></span>
180
195
  <button kendoButton
181
- fillMode="flat"
182
- themeColor="primary"
183
- rounded="full"
184
- icon="copy"
185
- [svgIcon]="copyIcon"
186
- (click)="handleCopy()"
187
- >{{messageFor('copyOutput')}}</button>
196
+ fillMode="flat"
197
+ icon="thumb-up-outline"
198
+ [svgIcon]="positiveRatingIcon"
199
+ (click)="handleRating('positive')">
200
+ </button>
188
201
  <button kendoButton
189
- fillMode="flat"
190
- rounded="full"
191
- icon="arrow-rotate-cw"
192
- [svgIcon]="retryIcon"
193
- (click)="handleRetry()"
194
- >{{messageFor('retryGeneration')}}</button>
195
- <ng-container *ngIf="showRating">
196
- <span class="k-spacer"></span>
197
- <button kendoButton
198
- fillMode="flat"
199
- icon="thumb-up-outline"
200
- [svgIcon]="positiveRatingIcon"
201
- (click)="handleRating('positive')">
202
- </button>
203
- <button kendoButton
204
- fillMode="flat"
205
- icon="thumb-down-outline"
206
- [svgIcon]="negativeRatingIcon"
207
- (click)="handleRating('negative')">
208
- </button>
209
- </ng-container>
202
+ fillMode="flat"
203
+ icon="thumb-down-outline"
204
+ [svgIcon]="negativeRatingIcon"
205
+ (click)="handleRating('negative')">
206
+ </button>
207
+ }
210
208
  </div>
211
- `,
209
+ `,
212
210
  standalone: true,
213
- imports: [ButtonComponent, NgIf, NgTemplateOutlet]
211
+ imports: [ButtonComponent, NgTemplateOutlet]
214
212
  }]
215
213
  }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.AIPromptService }], propDecorators: { hostClass: [{
216
214
  type: HostBinding,