@supportai.it/chat-widget
Version:
Chat widget web component for supportAI.it
170 lines (169 loc) • 4.14 kB
TypeScript
import { PropType } from 'vue';
import '../chat-widget';
export interface VueChatWidgetProps {
/**
* Unique identifier for the chat
*/
chatId: string;
/**
* API key for authentication
*/
apiKey: string;
/**
* Background color of the chat button
* @default "#582975"
*/
buttonColor?: string;
/**
* Background color of the chat button on hover
* @default "#7b2ba6"
*/
buttonHoverColor?: string;
/**
* Size of the chat button
* @default "64px"
*/
buttonSize?: string;
/**
* Message bubble text or boolean to disable
* @default "Ciao, sono l'assistente virtuale di supportAI, se hai bisogno di assistenza apri la chat!"
*/
messageBubble?: string | boolean;
/**
* Alignment of the chat widget
* @default "right"
*/
chatAlign?: "left" | "right";
/**
* Custom SVG icon for the chat button
* @default Built-in SupportAI icon
*/
svgIcon?: string;
/**
* Chat width
* @default "400px"
*/
chatWidth?: string;
/**
* Chat height
* @default "600px"
*/
chatHeight?: string;
/**
* Base URL for the chat service
*/
baseUrl?: string;
}
/**
* Vue Chat Widget Component
*
* A Vue wrapper for the supportAI chat widget that provides type safety
* and Vue-specific functionality.
*/
export declare const ChatWidget: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
chatId: {
type: PropType<string>;
required: true;
};
apiKey: {
type: PropType<string>;
required: true;
};
buttonColor: {
type: PropType<string>;
default: string;
};
buttonHoverColor: {
type: PropType<string>;
default: string;
};
buttonSize: {
type: PropType<string>;
default: string;
};
messageBubble: {
type: PropType<string | boolean>;
default: string;
};
chatAlign: {
type: PropType<"left" | "right">;
default: string;
validator: (value: string) => boolean;
};
svgIcon: {
type: PropType<string>;
};
chatWidth: {
type: PropType<string>;
default: string;
};
chatHeight: {
type: PropType<string>;
default: string;
};
baseUrl: {
type: PropType<string>;
};
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
chatId: {
type: PropType<string>;
required: true;
};
apiKey: {
type: PropType<string>;
required: true;
};
buttonColor: {
type: PropType<string>;
default: string;
};
buttonHoverColor: {
type: PropType<string>;
default: string;
};
buttonSize: {
type: PropType<string>;
default: string;
};
messageBubble: {
type: PropType<string | boolean>;
default: string;
};
chatAlign: {
type: PropType<"left" | "right">;
default: string;
validator: (value: string) => boolean;
};
svgIcon: {
type: PropType<string>;
};
chatWidth: {
type: PropType<string>;
default: string;
};
chatHeight: {
type: PropType<string>;
default: string;
};
baseUrl: {
type: PropType<string>;
};
}>> & Readonly<{}>, {
buttonColor: string;
buttonHoverColor: string;
buttonSize: string;
messageBubble: string | boolean;
chatAlign: "right" | "left";
chatWidth: string;
chatHeight: string;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
/**
* Composable to update chat context
*/
export declare const useChatContext: () => {
updateContext: (context: Record<string, unknown>) => void;
};
export default ChatWidget;
export type { VueChatWidgetProps as ChatWidgetProps };