UNPKG

@talkjs/react-native

Version:

Official TalkJS SDK for React Native

35 lines (33 loc) 2.05 kB
"use strict"; // Variable names export const SESSION = 'window.talkSession'; export const CHATBOX = 'window.talkChatbox'; export const CONVERSATION_LIST = 'window.talkConversationList'; export const HTML_PANEL = 'window.talkHtmlPanel'; export const CONTAINER = 'talkjs-container'; // Events export const BLUR_EVENT = 'onBlur'; export const FOCUS_EVENT = 'onFocus'; export const KEYUP_EVENT = 'onKeyup'; export const SEND_MESSAGE_EVENT = 'onSendMessage'; export const TRANSLATION_TOGGLED_EVENT = 'onTranslationToggled'; export const SELECT_CONVERSATION_EVENT = 'onSelectConversation'; export const LEAVE_CONVERSATION_EVENT = 'onLeaveConversation'; export const CUSTOM_MESSAGE_ACTION_EVENT = 'onCustomMessageAction'; export const CUSTOM_CONVERSATION_ACTION_EVENT = 'onCustomConversationAction'; export const ON_MESSAGE_EVENT = 'onMessage'; export const UNREADS_CHANGE_EVENT = 'unreads.onChange'; export const TalkEvents = [BLUR_EVENT, FOCUS_EVENT, SEND_MESSAGE_EVENT, TRANSLATION_TOGGLED_EVENT, SELECT_CONVERSATION_EVENT, KEYUP_EVENT, LEAVE_CONVERSATION_EVENT, CUSTOM_MESSAGE_ACTION_EVENT, CUSTOM_CONVERSATION_ACTION_EVENT, ON_MESSAGE_EVENT, UNREADS_CHANGE_EVENT]; // Custom Events export const WEBVIEW_ERROR = 'webViewError'; export const TALKJS_ERROR_REGEX = /^\[?TalkJS\]?/i; export const GET_TEXT_EVENT = 'message_field_get_text'; export const LEAVE_PROMISE_EVENT = 'resolve_leave_promise'; export const CURRENT_CONVERSATION_EVENT = 'current_conversation_event'; export const SEND_MESSAGE_PROMISE_EVENT = 'resolve_send_message_promise'; export const UI_MOUNTED_MESSAGE = 'ui_mounted'; export const WEBVIEW_LOADED_MESSAGE = 'webview_loaded'; export const VALID_CREDENTIALS_EVENT = 'resolve_has_valid_credentials_promise'; export const TOKEN_FETCHER_EVENT = 'resolve_token_fetcher_promise'; const CustomEvents = [WEBVIEW_ERROR, GET_TEXT_EVENT, LEAVE_PROMISE_EVENT, SEND_MESSAGE_PROMISE_EVENT, CURRENT_CONVERSATION_EVENT, UI_MOUNTED_MESSAGE, WEBVIEW_LOADED_MESSAGE, VALID_CREDENTIALS_EVENT, TOKEN_FETCHER_EVENT]; //# sourceMappingURL=constants.js.map