@ada-support/embed2 1.4.13 → 1.4.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 +17 -11
- 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.4.
|
|
15814
|
+
release: "1.4.14-295d3c0",
|
|
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
|
|
@@ -16335,7 +16335,12 @@ let ActionTypes;
|
|
|
16335
16335
|
ActionTypes["SET_CONNECTION_STATE_TYPE"] = "SET_CONNECTION_STATE";
|
|
16336
16336
|
ActionTypes["INCREMENT_MESSAGE_COUNT_TYPE"] = "INCREMENT_MESSAGE_COUNT";
|
|
16337
16337
|
})(ActionTypes || (ActionTypes = {}));
|
|
16338
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/url.js
|
|
16339
|
+
var url = __webpack_require__(9969);
|
|
16340
|
+
var url_default = /*#__PURE__*/__webpack_require__.n(url);
|
|
16338
16341
|
;// CONCATENATED MODULE: ./src/common/helpers/http.ts
|
|
16342
|
+
|
|
16343
|
+
|
|
16339
16344
|
/**
|
|
16340
16345
|
* Vanilla HTTP request. Returns a Promise.
|
|
16341
16346
|
*/
|
|
@@ -16345,11 +16350,15 @@ function httpRequest(obj) {
|
|
|
16345
16350
|
const {
|
|
16346
16351
|
headers
|
|
16347
16352
|
} = obj;
|
|
16348
|
-
const xhr = new XMLHttpRequest();
|
|
16353
|
+
const xhr = new XMLHttpRequest(); // include the ada_request_origin query parameter since adding a header causes CORS issues.
|
|
16354
|
+
// this parameter would be used to tag the request's trace in Datadog.
|
|
16355
|
+
|
|
16356
|
+
const requestURL = new (url_default())(obj.url);
|
|
16357
|
+
requestURL.searchParams.set("ada_request_origin", "embed");
|
|
16349
16358
|
|
|
16350
16359
|
if ("withCredentials" in xhr) {
|
|
16351
16360
|
// XMLHttpRequest for Chrome/Firefox/Opera/Safari.
|
|
16352
|
-
xhr.open(method,
|
|
16361
|
+
xhr.open(method, requestURL, true);
|
|
16353
16362
|
} else {
|
|
16354
16363
|
return;
|
|
16355
16364
|
}
|
|
@@ -16432,7 +16441,7 @@ function getEmbedURL(_ref) {
|
|
|
16432
16441
|
host = "http://".concat(window.location.hostname, ":9001");
|
|
16433
16442
|
}
|
|
16434
16443
|
|
|
16435
|
-
return "".concat(host, "/embed/").concat(frameName, "/").concat("
|
|
16444
|
+
return "".concat(host, "/embed/").concat(frameName, "/").concat("295d3c0", "/index.html");
|
|
16436
16445
|
}
|
|
16437
16446
|
|
|
16438
16447
|
function constructQueryString(query) {
|
|
@@ -18186,9 +18195,9 @@ async function log(message, extra, options) {
|
|
|
18186
18195
|
service: "embed",
|
|
18187
18196
|
env: "production",
|
|
18188
18197
|
embedVersion: 2,
|
|
18189
|
-
version: "1.4.
|
|
18198
|
+
version: "1.4.14",
|
|
18190
18199
|
isNpm: true,
|
|
18191
|
-
commitHash: "
|
|
18200
|
+
commitHash: "295d3c0"
|
|
18192
18201
|
}))
|
|
18193
18202
|
});
|
|
18194
18203
|
}
|
|
@@ -18328,9 +18337,6 @@ const getChatVersion = async adaSettings => {
|
|
|
18328
18337
|
|
|
18329
18338
|
return getChatVersionFromManifest(manifest);
|
|
18330
18339
|
};
|
|
18331
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/url.js
|
|
18332
|
-
var url = __webpack_require__(9969);
|
|
18333
|
-
var url_default = /*#__PURE__*/__webpack_require__.n(url);
|
|
18334
18340
|
;// CONCATENATED MODULE: ./src/client/components/IFrame/index.tsx
|
|
18335
18341
|
|
|
18336
18342
|
|
|
@@ -18766,7 +18772,7 @@ class ChatFrame extends d {
|
|
|
18766
18772
|
const hostPageUrlParams = new (url_default())(window.location.href).searchParams;
|
|
18767
18773
|
const smsToken = hostPageUrlParams.get("adaSMSToken");
|
|
18768
18774
|
const queryParams = {
|
|
18769
|
-
embedVersion: "
|
|
18775
|
+
embedVersion: "295d3c0".slice(0, 7),
|
|
18770
18776
|
greeting,
|
|
18771
18777
|
language,
|
|
18772
18778
|
skipGreeting,
|
|
@@ -20941,7 +20947,7 @@ class Embed {
|
|
|
20941
20947
|
|
|
20942
20948
|
}
|
|
20943
20949
|
|
|
20944
|
-
_defineProperty(Embed, "embed2Version", "
|
|
20950
|
+
_defineProperty(Embed, "embed2Version", "295d3c0");
|
|
20945
20951
|
;// CONCATENATED MODULE: ./src/common/helpers/startup.ts
|
|
20946
20952
|
|
|
20947
20953
|
|