UNPKG

ai-bot-snippet

Version:

A package for fast AI Chat for your website

95 lines (94 loc) 6.05 kB
/** * @input {string} backgroundColor - Background color of the chat window. * @input {string} inputColor - Color of the text in the input field. * @input {string} botMassageColor - Color of the bot's messages. * @input {string} userMassageColor - Color of the user's messages. * @input {string} sendColor - Color of the send button (button to send a message). * @input {string} scrollbarColor - Color of the scrollbar. * @input {string} scrollbarTrackColor - Color of the scrollbar track. * @input {string} aiUrl - URL endpoint for the AI service to handle chat requests. * @input {string} left - The left position of the chat window on the screen. * @input {string} bottom - The bottom position of the chat window on the screen. * @input {string} top - The top position of the chat window on the screen. * @input {string} right - The right position of the chat window on the screen. * @input {string} width - Width of the chat window. * @input {string} height - Height of the chat window. * @input {string} borderRadius - The border radius of the chat window for rounded corners. * @input {string} boxShadow - The box shadow applied to the chat window for a 3D effect. * @input {string} placeholder - Just placeholder for chat input. * @input {boolean} show - Determines whether the chat window is shown (true) or hidden (false). * @input {string} btnBackgroundImage - Background image of the button that opens the chat window. * @input {string} btnBackgroundSize - The size of the background image on the open button. * @input {string} btnLeft - The left position of the button that opens the chat window. * @input {string} btnBottom - The bottom position of the button that opens the chat window. * @input {string} btnTop - The top position of the button that opens the chat window. * @input {string} btnRight - The right position of the button that opens the chat window. * @input {string} btnWidth - The width of the button that opens the chat window. * @input {string} btnHeight - The height of the button that opens the chat window. * @input {string} btnBorderRadius - The border radius of the button that opens the chat window for rounded corners. * @input {string} btnBoxShadow - The box shadow applied to the button that opens the chat window. * @input {string} btnText - The text displayed on the button that opens the chat window. */ import { ElementRef, AfterViewInit, OnDestroy } from '@angular/core'; import * as i0 from "@angular/core"; interface Message { sender: 'user' | 'bot'; text: string; } export declare class ChatBotComponent implements AfterViewInit, OnDestroy { chatContainer: ElementRef; backgroundColor: string; inputColor: string; botMassageColor: string; userMassageColor: string; sendColor: string; scrollbarColor: string; scrollbarTrackColor: string; aiUrl: string; left: string; bottom: string; top: string; right: string; width: string; height: string; borderRadius: string; boxShadow: string; placeholder: string; show: boolean; btnBackgroundImage: string; btnBackgroundSize: string; btnLeft: string; btnBottom: string; btnTop: string; btnRight: string; btnWidth: string; btnHeight: string; btnBorderRadius: string; startMessage: string; btnBoxShadow: string; btnText: string; errorCon: string; webSiteUrl: string; messages: Message[]; inputText: string; error: string; loading: boolean; isClosing: boolean; isClearing: boolean; showBlock: boolean; constructor(); get widthInPixels(): number; toggleChat(): void; ngAfterViewInit(): void; startAnimation(): void; ngOnDestroy(): void; loadMessages(): void; saveMessages(): void; animateOpen(): void; animateClose(): void; sendMessage(): Promise<void>; clearChat(): void; static ɵfac: i0.ɵɵFactoryDeclaration<ChatBotComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ChatBotComponent, "app-chat-bot", never, { "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "inputColor": { "alias": "inputColor"; "required": false; }; "botMassageColor": { "alias": "botMassageColor"; "required": false; }; "userMassageColor": { "alias": "userMassageColor"; "required": false; }; "sendColor": { "alias": "sendColor"; "required": false; }; "scrollbarColor": { "alias": "scrollbarColor"; "required": false; }; "scrollbarTrackColor": { "alias": "scrollbarTrackColor"; "required": false; }; "aiUrl": { "alias": "aiUrl"; "required": false; }; "left": { "alias": "left"; "required": false; }; "bottom": { "alias": "bottom"; "required": false; }; "top": { "alias": "top"; "required": false; }; "right": { "alias": "right"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; "boxShadow": { "alias": "boxShadow"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "show": { "alias": "show"; "required": false; }; "btnBackgroundImage": { "alias": "btnBackgroundImage"; "required": false; }; "btnBackgroundSize": { "alias": "btnBackgroundSize"; "required": false; }; "btnLeft": { "alias": "btnLeft"; "required": false; }; "btnBottom": { "alias": "btnBottom"; "required": false; }; "btnTop": { "alias": "btnTop"; "required": false; }; "btnRight": { "alias": "btnRight"; "required": false; }; "btnWidth": { "alias": "btnWidth"; "required": false; }; "btnHeight": { "alias": "btnHeight"; "required": false; }; "btnBorderRadius": { "alias": "btnBorderRadius"; "required": false; }; "startMessage": { "alias": "startMessage"; "required": false; }; "btnBoxShadow": { "alias": "btnBoxShadow"; "required": false; }; "btnText": { "alias": "btnText"; "required": false; }; "errorCon": { "alias": "errorCon"; "required": false; }; "webSiteUrl": { "alias": "webSiteUrl"; "required": false; }; }, {}, never, never, true, never>; } export {};