@ada-support/embed2 1.6.53 → 1.6.54
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.
|
@@ -18,11 +18,11 @@ export interface CSInterface {
|
|
|
18
18
|
isEmbedFramed?: boolean;
|
|
19
19
|
}
|
|
20
20
|
export declare function getClientCacheUrl(handle: string, cluster?: AdaCluster, domain?: string): string;
|
|
21
|
-
export declare function getEmbedURL({ frameName, handle, cluster, domain
|
|
21
|
+
export declare function getEmbedURL({ frameName, handle, cluster, domain }: GetEmbedUrlParams): string;
|
|
22
22
|
/**
|
|
23
23
|
* Generate the Chat / API URL
|
|
24
24
|
*/
|
|
25
|
-
export declare function getURL({ name, handle, cluster, domain, route, qp
|
|
25
|
+
export declare function getURL({ name, handle, cluster, domain, route, qp }: CSInterface): string;
|
|
26
26
|
export declare function getChatURL({ handle, version, cluster, domain, qp, }: {
|
|
27
27
|
handle: string;
|
|
28
28
|
version?: string;
|
package/dist/npm-entry/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var createStorage = function (storageType) {
|
|
|
32
32
|
var storage = {
|
|
33
33
|
setItem: function (key, value) {
|
|
34
34
|
try {
|
|
35
|
-
storageProvider
|
|
35
|
+
storageProvider.setItem(key, JSON.stringify(value));
|
|
36
36
|
}
|
|
37
37
|
catch (e) {
|
|
38
38
|
console.warn(WEB_STORAGE_ACCESS_ERROR_MESSAGE);
|
|
@@ -40,7 +40,7 @@ var createStorage = function (storageType) {
|
|
|
40
40
|
},
|
|
41
41
|
getItem: function (key) {
|
|
42
42
|
try {
|
|
43
|
-
var rawStorageValue = storageProvider
|
|
43
|
+
var rawStorageValue = storageProvider.getItem(key);
|
|
44
44
|
return rawStorageValue && JSON.parse(rawStorageValue);
|
|
45
45
|
}
|
|
46
46
|
catch (e) {
|
|
@@ -50,7 +50,7 @@ var createStorage = function (storageType) {
|
|
|
50
50
|
},
|
|
51
51
|
removeItem: function (key) {
|
|
52
52
|
try {
|
|
53
|
-
storageProvider
|
|
53
|
+
storageProvider.removeItem(key);
|
|
54
54
|
}
|
|
55
55
|
catch (e) {
|
|
56
56
|
console.warn(WEB_STORAGE_ACCESS_ERROR_MESSAGE);
|
|
@@ -58,7 +58,7 @@ var createStorage = function (storageType) {
|
|
|
58
58
|
},
|
|
59
59
|
clear: function () {
|
|
60
60
|
try {
|
|
61
|
-
storageProvider
|
|
61
|
+
storageProvider.clear();
|
|
62
62
|
}
|
|
63
63
|
catch (e) {
|
|
64
64
|
console.warn(WEB_STORAGE_ACCESS_ERROR_MESSAGE);
|
|
@@ -13260,7 +13260,7 @@ const client = new error_tracker_BrowserClient({
|
|
|
13260
13260
|
return event;
|
|
13261
13261
|
},
|
|
13262
13262
|
environment: "production",
|
|
13263
|
-
release: "1.6.
|
|
13263
|
+
release: "1.6.54-4b65ab1",
|
|
13264
13264
|
sampleRate: 0.25,
|
|
13265
13265
|
autoSessionTracking: false,
|
|
13266
13266
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -13830,9 +13830,9 @@ function getEmbedURL(_ref) {
|
|
|
13830
13830
|
if (isProduction) {
|
|
13831
13831
|
host = `https://${handle}${clusterString}.${domainString}.support`;
|
|
13832
13832
|
} else {
|
|
13833
|
-
host = `http://${
|
|
13833
|
+
host = `http://${handle}.localhost:9001`;
|
|
13834
13834
|
}
|
|
13835
|
-
return `${host}/embed/${frameName}/${"
|
|
13835
|
+
return `${host}/embed/${frameName}/${"4b65ab1"}/index.html`;
|
|
13836
13836
|
}
|
|
13837
13837
|
function constructQueryString(query) {
|
|
13838
13838
|
return Object.keys(query).map(key => {
|
|
@@ -13867,7 +13867,7 @@ function getURL(_ref2) {
|
|
|
13867
13867
|
}
|
|
13868
13868
|
if (window.location.hostname.includes("localhost") || handle === "e2ereference") {
|
|
13869
13869
|
const domainName = window.location.hostname.includes("localhost") ? "localhost" : "e2ereference";
|
|
13870
|
-
const host = `${
|
|
13870
|
+
const host = `${handle}.${domainName}:${ports[domainName].api}`;
|
|
13871
13871
|
return `http://${host}/${routeString}${questionSym}${queryString}`;
|
|
13872
13872
|
}
|
|
13873
13873
|
return prodUrl;
|
|
@@ -15303,9 +15303,9 @@ async function log(message, extra, options) {
|
|
|
15303
15303
|
service: "embed",
|
|
15304
15304
|
env: "production",
|
|
15305
15305
|
embedVersion: 2,
|
|
15306
|
-
version: "1.6.
|
|
15306
|
+
version: "1.6.54",
|
|
15307
15307
|
isNpm: true,
|
|
15308
|
-
commitHash: "
|
|
15308
|
+
commitHash: "4b65ab1"
|
|
15309
15309
|
}))
|
|
15310
15310
|
});
|
|
15311
15311
|
}
|
|
@@ -15831,7 +15831,7 @@ class ChatFrame extends d {
|
|
|
15831
15831
|
const hostPageUrlParams = new URL(window.location.href).searchParams;
|
|
15832
15832
|
const smsToken = hostPageUrlParams.get("adaSMSToken");
|
|
15833
15833
|
const queryParams = {
|
|
15834
|
-
embedVersion: "
|
|
15834
|
+
embedVersion: "4b65ab1".slice(0, 7),
|
|
15835
15835
|
greeting,
|
|
15836
15836
|
language,
|
|
15837
15837
|
skipGreeting,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ada-support/embed2",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.54",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/npm-entry",
|
|
6
6
|
"typings": "dist/npm-entry/index-npm.d.ts",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@ada-support/embed-types": "^1.6.5",
|
|
82
|
-
"@ada-support/web-storage": "^
|
|
82
|
+
"@ada-support/web-storage": "^1.2.6",
|
|
83
83
|
"@babel/core": "^7.23.2",
|
|
84
84
|
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
85
85
|
"@babel/plugin-proposal-numeric-separator": "^7.16.7",
|