UNPKG

@progress/kendo-angular-conversational-ui

Version:

Kendo UI for Angular Conversational UI components

123 lines (122 loc) 4.83 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { AfterViewInit, EventEmitter, NgZone, OnDestroy, QueryList, TemplateRef } from "@angular/core"; import { SVGIcon } from "@progress/kendo-svg-icons"; import { LocalizationService } from '@progress/kendo-angular-l10n'; import { BaseView } from "./views/base-view"; import { AIPromptService } from "./common/aiprompt.service"; import { PromptCommand, PromptOutput, CommandExecuteEvent, PromptRequestEvent, OutputRatingChangeEvent } from "./models"; import { AIPromptToolbarActionsDirective } from "./templates/toolbar-actions.template"; import { ToolbarNavigationService } from "./common/toolbar-navigation.service"; import * as i0 from "@angular/core"; /** * Represents the Kendo UI AIPrompt component for Angular. */ export declare class AIPromptComponent implements AfterViewInit, OnDestroy { private localization; private service; private navigationService; private ngZone; hostClasses: boolean; get dirAttr(): string; constructor(localization: LocalizationService, service: AIPromptService, navigationService: ToolbarNavigationService, ngZone: NgZone); /** * @hidden */ views: QueryList<BaseView>; /** * @hidden */ toolbarActionsTemplate: AIPromptToolbarActionsDirective; /** * The active view index of the AIPrompt component. */ set activeView(idx: number); get activeView(): number; /** * The collection of commands that will be rendered in the Command view. */ set promptCommands(value: Array<PromptCommand>); /** * The collection of suggestions that will be rendered in the Prompt view. */ set promptSuggestions(value: Array<string>); /** * The collection of generated prompt outputs that will be rendered in the Output view. */ set promptOutputs(value: Array<PromptOutput>); /** * Specifies if the rating buttons in each Output view card will be rendered. * By default, rating buttons are not rendered. * * @default false */ set showOutputRating(value: boolean); /** * Fires when the `activeView` property of the component is updated. * Used to provide a two-way binding for the `activeView` property. */ activeViewChange: EventEmitter<number>; /** * Fires each time the user clicks the Prompt view Generate button or the Output view Retry button. * To distinguish the source element, use the event's `isRetry` field. */ promptRequest: EventEmitter<PromptRequestEvent>; /** * Fires each time the user clicks a Command view command. Exposes the selected command as event data. */ commandExecute: EventEmitter<CommandExecuteEvent>; /** * Fires each time the user clicks any Output view Copy button. */ outputCopy: EventEmitter<PromptOutput>; /** * Fires each time the user clicks a rating button in any Output view card. */ outputRatingChange: EventEmitter<OutputRatingChangeEvent>; ngAfterViewInit(): void; ngOnDestroy(): void; /** * Focuses the first focusable element in the AIPrompt. */ focus(): void; private subs; /** * @hidden */ get selectedView(): BaseView; /** * @hidden */ sparklesIcon: SVGIcon; /** * @hidden */ outputIcon: SVGIcon; /** * @hidden */ get viewsArray(): Array<BaseView>; private direction; private _activeView; /** * @hidden */ viewChange(idx: number): void; /** * @hidden */ messageFor(text: string): string; /** * @hidden */ get viewTemplate(): TemplateRef<any>; /** * @hidden */ handleGenerateOutput(): void; static ɵfac: i0.ɵɵFactoryDeclaration<AIPromptComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<AIPromptComponent, "kendo-aiprompt", ["kendoAIPrompt"], { "activeView": { "alias": "activeView"; "required": false; }; "promptCommands": { "alias": "promptCommands"; "required": false; }; "promptSuggestions": { "alias": "promptSuggestions"; "required": false; }; "promptOutputs": { "alias": "promptOutputs"; "required": false; }; "showOutputRating": { "alias": "showOutputRating"; "required": false; }; }, { "activeViewChange": "activeViewChange"; "promptRequest": "promptRequest"; "commandExecute": "commandExecute"; "outputCopy": "outputCopy"; "outputRatingChange": "outputRatingChange"; }, ["toolbarActionsTemplate", "views"], never, true, never>; }