@progress/kendo-angular-conversational-ui
Version:
Kendo UI for Angular Conversational UI components
90 lines (89 loc) • 4.01 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, NgZone } from '@angular/core';
import { AttachmentTemplateDirective } from './attachment-template.directive';
import { LocalizationService } from '@progress/kendo-angular-l10n';
import { MessageTemplateDirective } from './message-template.directive';
import { ExecuteActionEvent, Message, SendMessageEvent, User } from './api';
import { MessageBoxType } from './common/models/message-box-options';
import { ChatMessageBoxTemplateDirective } from './message-box.directive';
import { MessageBoxComponent } from './message-box.component';
import * as i0 from "@angular/core";
/**
* Represents the Kendo UI Chat component for Angular.
*
* <demo metaUrl="conversational-ui/chat/echo/" height="700"></demo>
*
*/
export declare class ChatComponent implements AfterViewInit, OnDestroy {
private localization;
private zone;
/**
* Sets the messages of the Chat.
* The message timestamp, if provided, tracks unique messages.
* For more information, refer to [ngFor - Change Tracking](link:site.data.urls.angular['ngforof']#change-propagation).
*/
messages: Message[];
/**
* Sets the [`User`]({% slug api_conversational-ui_user %}) instance for the local user.
* The User ID identifies messages that are authored by the local user.
*/
user: User;
/**
* Used to switch between a one-liner input or a textarea.
* ([see example]({% slug message_box %})#toc-message-box-types).
* @default input
*/
messageBoxType: MessageBoxType;
/**
* Fires when the user types a message and clicks the **Send** button or presses **Enter**.
* Emits the [`SendMessageEvent`]({% slug api_conversational-ui_sendmessageevent %}).
*
* > The message is not automatically appended to the `messages` array.
*/
sendMessage: EventEmitter<SendMessageEvent>;
/**
* Fires when the user clicks a quick action button.
* The Chat internally handles the `reply`, `openUrl`, and `call` [known actions]({% slug api_conversational-ui_actiontype %}).
*
* Emits the [`ExecuteActionEvent`]({% slug api_conversational-ui_executeactionevent %}).
* The event is preventable. If `preventDefault` is called, the built-in action will be suppressed.
*/
executeAction: EventEmitter<ExecuteActionEvent>;
get className(): string;
get dirAttr(): string;
attachmentTemplate: AttachmentTemplateDirective;
messageTemplate: MessageTemplateDirective;
messageBoxTemplate: ChatMessageBoxTemplateDirective;
messageBox: MessageBoxComponent;
/**
* @hidden
*/
messageList: ElementRef;
/**
* @hidden
*/
get localizationText(): LocalizationService;
/**
* @hidden
*/
autoScroll: boolean;
private direction;
private localizationChangeSubscription;
constructor(localization: LocalizationService, zone: NgZone);
ngOnChanges(): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
/**
* @hidden
*/
dispatchAction(e: ExecuteActionEvent): void;
/**
* @hidden
*/
textFor(key: string): string;
static ɵfac: i0.ɵɵFactoryDeclaration<ChatComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ChatComponent, "kendo-chat", never, { "messages": { "alias": "messages"; "required": false; }; "user": { "alias": "user"; "required": false; }; "messageBoxType": { "alias": "messageBoxType"; "required": false; }; }, { "sendMessage": "sendMessage"; "executeAction": "executeAction"; }, ["attachmentTemplate", "messageTemplate", "messageBoxTemplate"], never, true, never>;
}