@ada-support/embed2 1.0.73 → 1.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -14
- package/dist/npm-entry/index.js +16 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,17 +26,3 @@ adaEmbed.start({
|
|
|
26
26
|
});
|
|
27
27
|
```
|
|
28
28
|
In the example above the `handle` key is a part of `AdaSettings`. To learn more about other settings, consult the [API reference](https://adasupport.github.io/documentation/#api-reference).
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## 3. Using the example page
|
|
32
|
-
Clone this repo and run
|
|
33
|
-
```
|
|
34
|
-
yarn && yarn start
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Ensure you have API running on port 8000 and CHAT running on 8002
|
|
38
|
-
|
|
39
|
-
In your browser, visit `http://<your-bot-handle>.localhost:9000/`
|
|
40
|
-
Note: If you see an error in the chat that says your server IP cannot be found, add `127.0.0.1 <your-bot-handle>.chat` to your `/etc/hosts` file
|
|
41
|
-
|
|
42
|
-
To modify the settings, edit `example/index.html`
|
package/dist/npm-entry/index.js
CHANGED
|
@@ -8788,7 +8788,7 @@ var client = new error_tracker_BrowserClient({
|
|
|
8788
8788
|
return event;
|
|
8789
8789
|
},
|
|
8790
8790
|
environment: "production",
|
|
8791
|
-
release: "1.0.
|
|
8791
|
+
release: "1.0.76-0f7dd6a",
|
|
8792
8792
|
sampleRate: 0.25,
|
|
8793
8793
|
autoSessionTracking: false,
|
|
8794
8794
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -9490,7 +9490,7 @@ function getEmbedURL(_ref) {
|
|
|
9490
9490
|
polyfillVersionString = "legacy";
|
|
9491
9491
|
}
|
|
9492
9492
|
|
|
9493
|
-
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "
|
|
9493
|
+
return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "0f7dd6a", "/index.html");
|
|
9494
9494
|
}
|
|
9495
9495
|
/**
|
|
9496
9496
|
* Generate the Chat / API URL
|
|
@@ -9594,11 +9594,10 @@ var actions = {
|
|
|
9594
9594
|
});
|
|
9595
9595
|
}
|
|
9596
9596
|
|
|
9597
|
-
var hasChatOpenedAfterProactiveMessagesShown = currentState.hasChatOpenedAfterProactiveMessagesShown
|
|
9598
|
-
|
|
9599
|
-
if (!currentState.isDrawerOpen && !hasChatOpenedAfterProactiveMessagesShown && currentState.latestCampaignKey) {
|
|
9600
|
-
hasChatOpenedAfterProactiveMessagesShown = true;
|
|
9597
|
+
var hasChatOpenedAfterProactiveMessagesShown = currentState.hasChatOpenedAfterProactiveMessagesShown,
|
|
9598
|
+
wasCampaignShownButNowClosed = currentState.wasCampaignShownButNowClosed;
|
|
9601
9599
|
|
|
9600
|
+
if (!currentState.isDrawerOpen && !hasChatOpenedAfterProactiveMessagesShown && !wasCampaignShownButNowClosed && currentState.latestCampaignKey) {
|
|
9602
9601
|
var _url = getURL({
|
|
9603
9602
|
name: "api",
|
|
9604
9603
|
handle: currentState.handle,
|
|
@@ -9788,8 +9787,9 @@ var mutations = function mutations(state, action) {
|
|
|
9788
9787
|
case ActionTypes.TOGGLE_CHAT_TYPE:
|
|
9789
9788
|
{
|
|
9790
9789
|
var hasChatOpenedAfterProactiveMessagesShown = state.hasChatOpenedAfterProactiveMessagesShown;
|
|
9790
|
+
var wasCampaignShownButNowClosed = state.wasCampaignShownButNowClosed;
|
|
9791
9791
|
|
|
9792
|
-
if (!state.isDrawerOpen && state.latestCampaignKey && !hasChatOpenedAfterProactiveMessagesShown) {
|
|
9792
|
+
if (!state.isDrawerOpen && state.latestCampaignKey && !hasChatOpenedAfterProactiveMessagesShown && !wasCampaignShownButNowClosed) {
|
|
9793
9793
|
hasChatOpenedAfterProactiveMessagesShown = true;
|
|
9794
9794
|
}
|
|
9795
9795
|
|
|
@@ -12763,8 +12763,7 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12763
12763
|
chatterInLiveChat = _this$props2.chatterInLiveChat,
|
|
12764
12764
|
messageService = _this$props2.messageService,
|
|
12765
12765
|
wasCampaignShownButNowClosed = _this$props2.wasCampaignShownButNowClosed,
|
|
12766
|
-
isChatEmpty = _this$props2.isChatEmpty
|
|
12767
|
-
setState = _this$props2.setState;
|
|
12766
|
+
isChatEmpty = _this$props2.isChatEmpty;
|
|
12768
12767
|
var adaReadyCallback = adaSettings.adaReadyCallback,
|
|
12769
12768
|
toggleCallback = adaSettings.toggleCallback;
|
|
12770
12769
|
|
|
@@ -12836,14 +12835,6 @@ var Container = /*#__PURE__*/function (_Component) {
|
|
|
12836
12835
|
}); // If the campaign has not been closed (i.e. is still visible), send the follow up response
|
|
12837
12836
|
} else if (isChatEmpty) {
|
|
12838
12837
|
chatChannel.postMessage(SEND_GREETING);
|
|
12839
|
-
} // We want to reset the state because there's a possibility
|
|
12840
|
-
// that a user might engage with another campaign on another page path
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
if (wasCampaignShownButNowClosed) {
|
|
12844
|
-
setState({
|
|
12845
|
-
wasCampaignShownButNowClosed: false
|
|
12846
|
-
});
|
|
12847
12838
|
}
|
|
12848
12839
|
|
|
12849
12840
|
this.setState({
|
|
@@ -14344,7 +14335,7 @@ window.__AdaEmbedConstructor = Embed;
|
|
|
14344
14335
|
/* harmony export */ });
|
|
14345
14336
|
var isModern = new RegExp("((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(15|(1[6-9]|[2-9]\\d|\\d{3,}))[_.]\\d+(?:[_.]\\d+)?)|((Chromium|Chrome)\\/(99|([1-9]\\d\\d|\\d{4,}))\\.\\d+(?:\\.\\d+)?)|(Version\\/(15|(1[6-9]|[2-9]\\d|\\d{3,}))\\.\\d+(?:\\.\\d+)? Safari\\/)|(Firefox\\/(98|(99|\\d{3,}))\\.\\d+\\.\\d+)|(Firefox\\/(98|(99|\\d{3,}))\\.\\d+(pre|[ab]\\d+[a-z]*)?)").test(navigator.userAgent);
|
|
14346
14337
|
var isProduction = "production" === "production";
|
|
14347
|
-
var embed2Version = "
|
|
14338
|
+
var embed2Version = "0f7dd6a";
|
|
14348
14339
|
|
|
14349
14340
|
/***/ }),
|
|
14350
14341
|
|
|
@@ -14690,9 +14681,9 @@ function _log() {
|
|
|
14690
14681
|
service: "embed",
|
|
14691
14682
|
env: "production",
|
|
14692
14683
|
embedVersion: 2,
|
|
14693
|
-
version: "1.0.
|
|
14684
|
+
version: "1.0.76",
|
|
14694
14685
|
isNpm: true,
|
|
14695
|
-
commitHash: "
|
|
14686
|
+
commitHash: "0f7dd6a"
|
|
14696
14687
|
}))
|
|
14697
14688
|
});
|
|
14698
14689
|
|
|
@@ -25633,7 +25624,7 @@ function _loadEmbed() {
|
|
|
25633
25624
|
polyfillVersionString = "legacy";
|
|
25634
25625
|
}
|
|
25635
25626
|
|
|
25636
|
-
embedScriptSource = concat_default()(_context17 = concat_default()(_context18 = "".concat(host, "/embed/")).call(_context18, polyfillVersionString, "/client/")).call(_context17, "
|
|
25627
|
+
embedScriptSource = concat_default()(_context17 = concat_default()(_context18 = "".concat(host, "/embed/")).call(_context18, polyfillVersionString, "/client/")).call(_context17, "0f7dd6a", "/index.js");
|
|
25637
25628
|
}
|
|
25638
25629
|
|
|
25639
25630
|
clientScriptExists = Boolean( true || // The client script is bundled with npm module
|
|
@@ -25759,7 +25750,10 @@ function createEmbedObject() {
|
|
|
25759
25750
|
(0,logger/* log */.cM)("Embed start", {
|
|
25760
25751
|
handle: adaSettings.handle,
|
|
25761
25752
|
embedSettings: adaSettings,
|
|
25762
|
-
hostPage: window.location.href
|
|
25753
|
+
hostPage: window.location.href,
|
|
25754
|
+
adaScriptURL: function (scriptElement) {
|
|
25755
|
+
return scriptElement ? scriptElement.src : null;
|
|
25756
|
+
}(document.getElementById("__ada"))
|
|
25763
25757
|
});
|
|
25764
25758
|
return _context2.abrupt("return", embed.initialized);
|
|
25765
25759
|
|