Installation
Using npm
Using a script tag
Usage
Use thetext-widget component and provide your organizationId:
Assignable properties
Config data
All properties described below are used for initialization on the first render and later updates of the chat widget with new values on change.Event handlers
All event handlers listed below are registered if provided for the first time. They unregister on the component cleanup or the property value change. Descriptions of all events are available after clicking on the associated links.- onReady
- onAvailabilityChanged
- onVisibilityChanged
- onCustomerStatusChanged
- onNewEvent
- onFormSubmitted
- onRatingSubmitted
- onGreetingDisplayed
- onGreetingHidden
- onRichMessageButtonClicked
Services
TheLiveChatWidgetModule, exported from this package, registers a set of injectable services. All of them expose a subscribable BehaviorSubject instance. It allows for consuming reactive data from the chat widget in any place of the application, as long as the LiveChatWidget or TextWidget component is rendered in the tree.
WidgetStateService
Access the current chat widgetavailability or visibility state if the chat widget is loaded.
WidgetIsReadyService
Check if the chat widget is ready using the boolean flagisWidgetReady.
WidgetChatDataService
Access thechatId and threadId of the chat if there’s one currently available.
WidgetGreetingService
Access the current greetingid and uniqueId if one is currently displayed (received and not hidden).
WidgetCustomerDataService
Access theid, isReturning, status, and sessionVariables of the current customer if the chat widget is loaded.