@progress/kendo-angular-conversational-ui
Version:
Kendo UI for Angular Conversational UI components
77 lines (76 loc) • 3.6 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Component, forwardRef } from '@angular/core';
import { LocalizationService } from '@progress/kendo-angular-l10n';
import { BaseView } from './base-view';
import { AIPromptService } from '../common/aiprompt.service';
import { AIPromptOutputCardComponent } from '../common/output-card.component';
import { NgFor } from '@angular/common';
import * as i0 from "@angular/core";
import * as i1 from "@progress/kendo-angular-l10n";
import * as i2 from "../common/aiprompt.service";
/**
* Represents the component that renders the **Output** view of the AIPrompt.
*
* @example
* ```html
* <kendo-aiprompt-output-view
* buttonText="My output view">
* </kendo-aiprompt-output-view>
* ```
*/
export class OutputViewComponent extends BaseView {
service;
constructor(localization, service) {
super('output', localization);
this.service = service;
}
/**
* @hidden
*/
get promptOutputs() {
return this.service.promptOutputs;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OutputViewComponent, deps: [{ token: i1.LocalizationService }, { token: i2.AIPromptService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: OutputViewComponent, isStandalone: true, selector: "kendo-aiprompt-output-view", providers: [{
provide: BaseView,
useExisting: forwardRef(() => OutputViewComponent)
}], usesInheritance: true, ngImport: i0, template: `
<ng-template
<div
class="k-card-list"
role="list">
<div *ngFor="let output of promptOutputs"
kendoAIPromptOutputCard
[ ]="output">
</div>
</div>
</ng-template>
`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: AIPromptOutputCardComponent, selector: "[kendoAIPromptOutputCard]", inputs: ["promptOutput"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OutputViewComponent, decorators: [{
type: Component,
args: [{
selector: 'kendo-aiprompt-output-view',
providers: [{
provide: BaseView,
useExisting: forwardRef(() => OutputViewComponent)
}],
template: `
<ng-template
<div
class="k-card-list"
role="list">
<div *ngFor="let output of promptOutputs"
kendoAIPromptOutputCard
[ ]="output">
</div>
</div>
</ng-template>
`,
standalone: true,
imports: [NgFor, AIPromptOutputCardComponent]
}]
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i2.AIPromptService }]; } });