@ada-support/embed2 1.2.13 → 1.2.14
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/dist/npm-entry/index.js +29 -16
- package/package.json +1 -1
package/dist/npm-entry/index.js
CHANGED
|
@@ -15811,7 +15811,7 @@ const client = new error_tracker_BrowserClient({
|
|
|
15811
15811
|
},
|
|
15812
15812
|
|
|
15813
15813
|
environment: "production",
|
|
15814
|
-
release: "1.2.
|
|
15814
|
+
release: "1.2.14-1aa8551",
|
|
15815
15815
|
sampleRate: 0.25,
|
|
15816
15816
|
autoSessionTracking: false,
|
|
15817
15817
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -16426,7 +16426,7 @@ function getEmbedURL(_ref) {
|
|
|
16426
16426
|
host = "http://".concat(window.location.hostname, ":9001");
|
|
16427
16427
|
}
|
|
16428
16428
|
|
|
16429
|
-
return "".concat(host, "/embed/").concat(frameName, "/").concat("
|
|
16429
|
+
return "".concat(host, "/embed/").concat(frameName, "/").concat("1aa8551", "/index.html");
|
|
16430
16430
|
}
|
|
16431
16431
|
/**
|
|
16432
16432
|
* Generate the Chat / API URL
|
|
@@ -18002,9 +18002,9 @@ async function log(message, extra, options) {
|
|
|
18002
18002
|
service: "embed",
|
|
18003
18003
|
env: "production",
|
|
18004
18004
|
embedVersion: 2,
|
|
18005
|
-
version: "1.2.
|
|
18005
|
+
version: "1.2.14",
|
|
18006
18006
|
isNpm: true,
|
|
18007
|
-
commitHash: "
|
|
18007
|
+
commitHash: "1aa8551"
|
|
18008
18008
|
}))
|
|
18009
18009
|
});
|
|
18010
18010
|
}
|
|
@@ -18431,7 +18431,7 @@ class ChatFrame extends d {
|
|
|
18431
18431
|
const hostPageUrlParams = new (url_default())(window.location.href).searchParams;
|
|
18432
18432
|
const smsToken = hostPageUrlParams.get("adaSMSToken");
|
|
18433
18433
|
const queryParams = {
|
|
18434
|
-
embedVersion: "
|
|
18434
|
+
embedVersion: "1aa8551".slice(0, 7),
|
|
18435
18435
|
greeting,
|
|
18436
18436
|
language,
|
|
18437
18437
|
skipGreeting,
|
|
@@ -19699,6 +19699,28 @@ class Container extends d {
|
|
|
19699
19699
|
}
|
|
19700
19700
|
}
|
|
19701
19701
|
|
|
19702
|
+
async handleSettingDeviceToken(localChannel, payload, id) {
|
|
19703
|
+
const {
|
|
19704
|
+
setState,
|
|
19705
|
+
sensitiveMetaFields,
|
|
19706
|
+
metaFields
|
|
19707
|
+
} = this.props;
|
|
19708
|
+
const sdkType = (metaFields === null || metaFields === void 0 ? void 0 : metaFields.sdkType) || "WEB"; // If using react native then send os type as android since react native uses Firebase Cloud Messaging
|
|
19709
|
+
|
|
19710
|
+
const deviceOS = sdkType === "REACTNATIVE" ? "ANDROID" : sdkType;
|
|
19711
|
+
const {
|
|
19712
|
+
token
|
|
19713
|
+
} = payload;
|
|
19714
|
+
await setState({
|
|
19715
|
+
deviceToken: token,
|
|
19716
|
+
sensitiveMetaFields: Container_objectSpread(Container_objectSpread({}, sensitiveMetaFields), {}, {
|
|
19717
|
+
device_token: token,
|
|
19718
|
+
device_os: deviceOS
|
|
19719
|
+
})
|
|
19720
|
+
});
|
|
19721
|
+
localChannel.postMessage(SET_DEVICE_TOKEN_RESPONSE, null, id);
|
|
19722
|
+
}
|
|
19723
|
+
|
|
19702
19724
|
async handleEmbedAction(type, payload, id) {
|
|
19703
19725
|
const {
|
|
19704
19726
|
client,
|
|
@@ -19954,16 +19976,7 @@ class Container extends d {
|
|
|
19954
19976
|
|
|
19955
19977
|
case SET_DEVICE_TOKEN:
|
|
19956
19978
|
{
|
|
19957
|
-
|
|
19958
|
-
setState
|
|
19959
|
-
} = this.props;
|
|
19960
|
-
const {
|
|
19961
|
-
token
|
|
19962
|
-
} = payload;
|
|
19963
|
-
await setState({
|
|
19964
|
-
deviceToken: token
|
|
19965
|
-
});
|
|
19966
|
-
localChannel.postMessage(SET_DEVICE_TOKEN_RESPONSE, null, id);
|
|
19979
|
+
this.handleSettingDeviceToken(localChannel, payload, id);
|
|
19967
19980
|
break;
|
|
19968
19981
|
}
|
|
19969
19982
|
|
|
@@ -20575,7 +20588,7 @@ class Embed {
|
|
|
20575
20588
|
|
|
20576
20589
|
}
|
|
20577
20590
|
|
|
20578
|
-
_defineProperty(Embed, "embed2Version", "
|
|
20591
|
+
_defineProperty(Embed, "embed2Version", "1aa8551");
|
|
20579
20592
|
;// CONCATENATED MODULE: ./src/common/helpers/startup.ts
|
|
20580
20593
|
|
|
20581
20594
|
|