UNPKG

@supportai.it/chat-widget

Version:

Chat widget web component for supportAI.it

49 lines (48 loc) 1.42 kB
declare const SafeHTMLElement: { new (): HTMLElement; prototype: HTMLElement; }; declare class ChatWidget extends SafeHTMLElement { private _isOpen; private _isMobile; private _fullChatUrl; private _baseUrl; private _isFirstLoad; private _firstChatOpen; private _messageBubbleVisible; private readonly _cookieName; private readonly _cookieExpDays; private _chatModal; private _chatButton; private _messageContainer; private _connected; private _lastRenderedState; private _config; private setCookie; private getCookie; private updateChatUrl; constructor(); static get observedAttributes(): string[]; attributeChangedCallback(name: string, oldValue: string, newValue: string): void; /** * it's part of the Custom Elements API. * https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements * * Called once the element is inserted into the DOM */ connectedCallback(): void; disconnectedCallback(): void; private setupEventListeners; private removeEventListeners; private handleResize; private toggleChat; private closeBubble; private setBubbleCookie; private updateChatState; private updateMessageBubble; private updateContext; private handlePostMessage; private closeChat; private render; } export default ChatWidget;