WebView

Default region: ru-1.

The URL gets parsed and passed into init method with unclosable param set to true.

The WebView should persist localStorage and sessionStorage

Expected URL params:

Example:
webview.html?eyezon&businessId=5d63fe246c2590002eecef83&language=ru&buttonId=5ec26f248107de3797f0807c&target=SKU-1&title=Samsung%20Television

Extended example:
webview.html?eyezon&businessId=5d63fe246c2590002eecef83&language=ru&buttonId=5ec26f248107de3797f0807c&target=SKU-1&title=Samsung%20Television&name=Test&phone=%2B3801111111111&email=test@test.test&clientId=test123&region=Brest&autoSubmit=Message

Notice

There are 2 main scenarios of opening dialogs.

Opening by target

When a target is used, it either

The client can always navigate to dialog list by clicking on the arrow in top left corner.

The opening url format:
webview.html?eyezon&businessId=<businessId>&language=<language>&buttonId=<buttonId>&target=<target>&title=<title>

Opening by dialog ID

Used for restoring specific dialogs from push-messages.
Opens the provided dialogId even if the dialog is closed.

The restoration url format:
webview.html?open=true&businessId=<businessId>&language=<language>&buttonId=<buttonId>&userId=<userId>&dialogId=<dialogId>&notificationType=push

Note that push-message payload has receiverId instead of userId:
data.websiteUrl + '?open=true&businessId=' + yourBusinessId + '&language=' + appLanguage + '&buttonId=' + data.buttonId + '&userId=' + data.receiverId + '&dialogId=' + data.dialogId + '&notificationType=push'

Put in cart

Putting in cart details can be extracted from PUT_IN_CART_FROM_WIDGET

eyeZon('on', 'PUT_IN_CART_FROM_WIDGET', () => {}) - handler must exist on the host page for put in cart functionality to work and the current dialog must have been created with putInCart set to true