@ada-support/embed2 1.7.32 → 1.7.34
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.
|
@@ -9,6 +9,7 @@ interface OwnProps {
|
|
|
9
9
|
messageService: MessageService;
|
|
10
10
|
onTransitionEnd?: h.JSX.TransitionEventHandler<HTMLIFrameElement>;
|
|
11
11
|
title?: string;
|
|
12
|
+
sandboxParams?: string;
|
|
12
13
|
}
|
|
13
14
|
declare const _default: (ownProps: OwnProps) => h.JSX.Element;
|
|
14
15
|
export default _default;
|
package/dist/npm-entry/index.js
CHANGED
|
@@ -13949,7 +13949,7 @@ const client = new BrowserClient({
|
|
|
13949
13949
|
return event;
|
|
13950
13950
|
},
|
|
13951
13951
|
environment: "production",
|
|
13952
|
-
release: "1.7.
|
|
13952
|
+
release: "1.7.34-621ed5f",
|
|
13953
13953
|
sampleRate: 0.25,
|
|
13954
13954
|
autoSessionTracking: false,
|
|
13955
13955
|
// Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
|
|
@@ -14523,7 +14523,7 @@ function getEmbedURL(_ref) {
|
|
|
14523
14523
|
} else {
|
|
14524
14524
|
host = `http://${handle}.localhost:9001`;
|
|
14525
14525
|
}
|
|
14526
|
-
return `${host}/embed/${frameName}/${"
|
|
14526
|
+
return `${host}/embed/${frameName}/${"621ed5f"}/index.html`;
|
|
14527
14527
|
}
|
|
14528
14528
|
function constructQueryString(query) {
|
|
14529
14529
|
return Object.keys(query).map(key => {
|
|
@@ -15701,9 +15701,9 @@ async function log(message, extra, options) {
|
|
|
15701
15701
|
service: "embed",
|
|
15702
15702
|
env: "production",
|
|
15703
15703
|
embedVersion: 2,
|
|
15704
|
-
version: "1.7.
|
|
15704
|
+
version: "1.7.34",
|
|
15705
15705
|
isNpm: true,
|
|
15706
|
-
commitHash: "
|
|
15706
|
+
commitHash: "621ed5f"
|
|
15707
15707
|
}))
|
|
15708
15708
|
});
|
|
15709
15709
|
}
|
|
@@ -16241,7 +16241,7 @@ function proactiveShownWithinFrequency(proactiveConversationKey, frequency, hand
|
|
|
16241
16241
|
return false;
|
|
16242
16242
|
case "session":
|
|
16243
16243
|
{
|
|
16244
|
-
const storageValue = dist/* adaSessionStorage */.ad.getFnItem("
|
|
16244
|
+
const storageValue = dist/* adaSessionStorage */.ad.getFnItem("proactive_conversations_shown");
|
|
16245
16245
|
const perSessionProactives = storageValue ? (storageValue[handle] || "").split(",") : [];
|
|
16246
16246
|
return perSessionProactives.includes(proactiveConversationKey);
|
|
16247
16247
|
}
|
|
@@ -16258,9 +16258,9 @@ function recordProactiveTrigger(proactiveConversationKey, frequency, handle) {
|
|
|
16258
16258
|
break;
|
|
16259
16259
|
case "session":
|
|
16260
16260
|
{
|
|
16261
|
-
const currentStorageValue = dist/* adaSessionStorage */.ad.getFnItem("
|
|
16261
|
+
const currentStorageValue = dist/* adaSessionStorage */.ad.getFnItem("proactive_conversations_shown");
|
|
16262
16262
|
const newStorageValue = addProactiveToStorageString(currentStorageValue ? currentStorageValue[handle] || "" : "", proactiveConversationKey);
|
|
16263
|
-
dist/* adaSessionStorage */.ad.setFnItem("
|
|
16263
|
+
dist/* adaSessionStorage */.ad.setFnItem("proactive_conversations_shown", proactiveConversation_objectSpread(proactiveConversation_objectSpread({}, currentStorageValue), {}, {
|
|
16264
16264
|
[handle]: newStorageValue
|
|
16265
16265
|
}));
|
|
16266
16266
|
break;
|
|
@@ -16549,7 +16549,8 @@ class IFrame extends d {
|
|
|
16549
16549
|
roleDescription,
|
|
16550
16550
|
onTransitionEnd,
|
|
16551
16551
|
styles,
|
|
16552
|
-
title
|
|
16552
|
+
title,
|
|
16553
|
+
sandboxParams
|
|
16553
16554
|
} = this.props;
|
|
16554
16555
|
const iFrameName = `ada-${name}-frame`;
|
|
16555
16556
|
return v("iframe", {
|
|
@@ -16564,7 +16565,8 @@ class IFrame extends d {
|
|
|
16564
16565
|
className: iFrameName,
|
|
16565
16566
|
onTransitionEnd: onTransitionEnd,
|
|
16566
16567
|
"aria-roledescription": roleDescription,
|
|
16567
|
-
role: "application"
|
|
16568
|
+
role: "application",
|
|
16569
|
+
sandbox: sandboxParams
|
|
16568
16570
|
});
|
|
16569
16571
|
}
|
|
16570
16572
|
}
|
|
@@ -16687,13 +16689,15 @@ class ButtonFrame extends d {
|
|
|
16687
16689
|
}
|
|
16688
16690
|
return `${client.handle.charAt(0).toUpperCase() + client.handle.slice(1)} Chat Button Frame`;
|
|
16689
16691
|
};
|
|
16692
|
+
const sandboxParams = "allow-same-origin allow-scripts";
|
|
16690
16693
|
return v(StoreContext.Consumer, null, store => v(MessageServiceContext.Consumer, null, messageService => v(components_IFrame, {
|
|
16691
16694
|
title: getTitle(),
|
|
16692
16695
|
styles: this.styles,
|
|
16693
16696
|
name: BUTTON_IFRAME,
|
|
16694
16697
|
store: store,
|
|
16695
16698
|
messageService: messageService,
|
|
16696
|
-
onTransitionEnd: this.handleOnTransitionEndBound
|
|
16699
|
+
onTransitionEnd: this.handleOnTransitionEndBound,
|
|
16700
|
+
sandboxParams: sandboxParams
|
|
16697
16701
|
})));
|
|
16698
16702
|
}
|
|
16699
16703
|
}
|
|
@@ -16842,7 +16846,7 @@ class ChatFrame extends d {
|
|
|
16842
16846
|
const hostPageUrlParams = new URL(window.location.href).searchParams;
|
|
16843
16847
|
const smsToken = hostPageUrlParams.get("adaSMSToken");
|
|
16844
16848
|
const queryParams = {
|
|
16845
|
-
embedVersion: "
|
|
16849
|
+
embedVersion: "621ed5f".slice(0, 7),
|
|
16846
16850
|
greeting,
|
|
16847
16851
|
language,
|
|
16848
16852
|
skipGreeting,
|
|
@@ -17418,6 +17422,7 @@ class ChatFrame extends d {
|
|
|
17418
17422
|
isDrawerOpen
|
|
17419
17423
|
} = this.props;
|
|
17420
17424
|
const iFrameName = `ada-chat-frame`;
|
|
17425
|
+
const sandboxParams = "allow-downloads allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts";
|
|
17421
17426
|
const roleDescription = () => {
|
|
17422
17427
|
if (!(client !== null && client !== void 0 && client.handle)) {
|
|
17423
17428
|
return "Chat Window";
|
|
@@ -17439,7 +17444,8 @@ class ChatFrame extends d {
|
|
|
17439
17444
|
"aria-modal": true,
|
|
17440
17445
|
allowTransparency: true,
|
|
17441
17446
|
allowFullScreen: true,
|
|
17442
|
-
onLoad: this.frameLoaded.bind(this)
|
|
17447
|
+
onLoad: this.frameLoaded.bind(this),
|
|
17448
|
+
sandbox: sandboxParams
|
|
17443
17449
|
});
|
|
17444
17450
|
}
|
|
17445
17451
|
}
|
|
@@ -17653,11 +17659,13 @@ class XStorageFrame extends d {
|
|
|
17653
17659
|
`;
|
|
17654
17660
|
}
|
|
17655
17661
|
render() {
|
|
17662
|
+
const sandboxParams = "allow-same-origin allow-scripts";
|
|
17656
17663
|
return v(StoreContext.Consumer, null, store => v(MessageServiceContext.Consumer, null, messageService => v(components_IFrame, {
|
|
17657
17664
|
styles: XStorageFrame.styles,
|
|
17658
17665
|
name: XSTORAGE_IFRAME,
|
|
17659
17666
|
store: store,
|
|
17660
|
-
messageService: messageService
|
|
17667
|
+
messageService: messageService,
|
|
17668
|
+
sandboxParams: sandboxParams
|
|
17661
17669
|
})));
|
|
17662
17670
|
}
|
|
17663
17671
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ada-support/embed2",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.34",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/npm-entry",
|
|
6
6
|
"typings": "dist/npm-entry/index-npm.d.ts",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
99
|
"@ada-support/embed-types": "^1.8.0",
|
|
100
|
-
"@ada-support/web-storage": "^1.2.
|
|
100
|
+
"@ada-support/web-storage": "^1.2.9",
|
|
101
101
|
"@babel/runtime-corejs3": "^7.15.4",
|
|
102
102
|
"@sentry/browser": "^8.33.0",
|
|
103
103
|
"@sentry/types": "^8.33.1",
|