@ada-support/embed2 1.6.40 → 1.6.44
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
CHANGED
|
@@ -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.44-47c4d77",
|
|
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
|
|
@@ -13832,7 +13832,7 @@ function getEmbedURL(_ref) {
|
|
|
13832
13832
|
} else {
|
|
13833
13833
|
host = `http://${window.location.hostname}:9001`;
|
|
13834
13834
|
}
|
|
13835
|
-
return `${host}/embed/${frameName}/${"
|
|
13835
|
+
return `${host}/embed/${frameName}/${"47c4d77"}/index.html`;
|
|
13836
13836
|
}
|
|
13837
13837
|
function constructQueryString(query) {
|
|
13838
13838
|
return Object.keys(query).map(key => {
|
|
@@ -15093,8 +15093,7 @@ const RTLLanguages = ["ar", "he"];
|
|
|
15093
15093
|
const isRTLLanguage = language => Boolean(language && RTLLanguages.includes(language)) || false;
|
|
15094
15094
|
const isRTL = (client, language) => {
|
|
15095
15095
|
const rtlLanguageBool = isRTLLanguage(language) || isRTLLanguage(getBrowserLanguage());
|
|
15096
|
-
|
|
15097
|
-
return featureFlagsBool && rtlLanguageBool || false;
|
|
15096
|
+
return (client === null || client === void 0 ? void 0 : client.features.translations) && rtlLanguageBool || false;
|
|
15098
15097
|
};
|
|
15099
15098
|
;// CONCATENATED MODULE: ./src/common/helpers/getAlignment.ts
|
|
15100
15099
|
|
|
@@ -15304,9 +15303,9 @@ async function log(message, extra, options) {
|
|
|
15304
15303
|
service: "embed",
|
|
15305
15304
|
env: "production",
|
|
15306
15305
|
embedVersion: 2,
|
|
15307
|
-
version: "1.6.
|
|
15306
|
+
version: "1.6.44",
|
|
15308
15307
|
isNpm: true,
|
|
15309
|
-
commitHash: "
|
|
15308
|
+
commitHash: "47c4d77"
|
|
15310
15309
|
}))
|
|
15311
15310
|
});
|
|
15312
15311
|
}
|
|
@@ -15617,7 +15616,7 @@ class ButtonFrame extends d {
|
|
|
15617
15616
|
delayedIsShown
|
|
15618
15617
|
} = this.state;
|
|
15619
15618
|
// 48 = (SHADOW BLUR=40) + (2 * SPREAD=8)
|
|
15620
|
-
const BOX_SHADOW_BUFFER =
|
|
15619
|
+
const BOX_SHADOW_BUFFER = 48;
|
|
15621
15620
|
const POSITION_FROM_SCREEN_EDGE = 24;
|
|
15622
15621
|
const buttonSizeWithBuffer = buttonSize + BOX_SHADOW_BUFFER;
|
|
15623
15622
|
const buttonPosition = POSITION_FROM_SCREEN_EDGE - BOX_SHADOW_BUFFER / 2;
|
|
@@ -15639,27 +15638,23 @@ class ButtonFrame extends d {
|
|
|
15639
15638
|
visibility: ${this.isShown ? "visible" : "hidden"};
|
|
15640
15639
|
opacity: ${this.isShown ? "1" : "0"};
|
|
15641
15640
|
transition: visibility 200ms ease, opacity 200ms ease;
|
|
15641
|
+
transform: translate(0, 10%);
|
|
15642
|
+
transition: visibility 250ms ease, opacity 250ms ease, transform 250ms ease;
|
|
15643
|
+
${getAlignment(adaSettings)}: 0;
|
|
15644
|
+
bottom: 0;
|
|
15645
|
+
|
|
15646
|
+
${this.isShown ? "transform: translate(0, 0);" : ""}
|
|
15642
15647
|
`;
|
|
15643
|
-
if (
|
|
15648
|
+
if (buttonStyle === "text") {
|
|
15644
15649
|
styles += `
|
|
15645
|
-
|
|
15646
|
-
|
|
15647
|
-
|
|
15648
|
-
|
|
15649
|
-
|
|
15650
|
-
${
|
|
15651
|
-
|
|
15652
|
-
if (buttonStyle === "text") {
|
|
15653
|
-
styles += `
|
|
15654
|
-
width: ${frameWidth}px;
|
|
15655
|
-
height: ${textFrameHeight}px;
|
|
15650
|
+
width: ${frameWidth}px;
|
|
15651
|
+
height: ${textFrameHeight}px;
|
|
15652
|
+
`;
|
|
15653
|
+
} else {
|
|
15654
|
+
styles += `
|
|
15655
|
+
width: ${roundFrameHeight}px;
|
|
15656
|
+
height: ${roundFrameHeight}px;
|
|
15656
15657
|
`;
|
|
15657
|
-
} else {
|
|
15658
|
-
styles += `
|
|
15659
|
-
width: ${roundFrameHeight}px;
|
|
15660
|
-
height: ${roundFrameHeight}px;
|
|
15661
|
-
`;
|
|
15662
|
-
}
|
|
15663
15658
|
}
|
|
15664
15659
|
if (!this.isShown && !delayedIsShown) {
|
|
15665
15660
|
return styles + stylesForHiding;
|
|
@@ -15834,7 +15829,7 @@ class ChatFrame extends d {
|
|
|
15834
15829
|
const hostPageUrlParams = new URL(window.location.href).searchParams;
|
|
15835
15830
|
const smsToken = hostPageUrlParams.get("adaSMSToken");
|
|
15836
15831
|
const queryParams = {
|
|
15837
|
-
embedVersion: "
|
|
15832
|
+
embedVersion: "47c4d77".slice(0, 7),
|
|
15838
15833
|
greeting,
|
|
15839
15834
|
language,
|
|
15840
15835
|
skipGreeting,
|
|
@@ -15877,8 +15872,7 @@ class ChatFrame extends d {
|
|
|
15877
15872
|
const TEST_BOT_NAV_HEIGHT = 48;
|
|
15878
15873
|
const isTestBot = client.features.embed_test_bot && testMode;
|
|
15879
15874
|
const totalWindowHeight = isTestBot ? `${WINDOW_HEIGHT + TEST_BOT_NAV_HEIGHT}px` : `${WINDOW_HEIGHT}px`;
|
|
15880
|
-
|
|
15881
|
-
return `
|
|
15875
|
+
return `
|
|
15882
15876
|
position: fixed;
|
|
15883
15877
|
|
|
15884
15878
|
${isMobile ? `
|
|
@@ -15911,25 +15905,6 @@ class ChatFrame extends d {
|
|
|
15911
15905
|
visibility: visible;
|
|
15912
15906
|
`}
|
|
15913
15907
|
`;
|
|
15914
|
-
}
|
|
15915
|
-
return `
|
|
15916
|
-
position: fixed;
|
|
15917
|
-
${getAlignment(adaSettings)}: 0;
|
|
15918
|
-
bottom: 0;
|
|
15919
|
-
transform: translate(${isDrawerOpen && isMounted ? "0" : "375px"}, 0);
|
|
15920
|
-
opacity: ${isDrawerOpen && isMounted ? "1" : "0"};
|
|
15921
|
-
transition: transform 200ms ease, opacity 200ms ease;
|
|
15922
|
-
z-index: 9999;
|
|
15923
|
-
box-shadow: -1px 0 0 rgba(0, 0, 0, .1), -3px 0 9px rgba(0, 0, 0, .15);
|
|
15924
|
-
background-color: #ffffff;
|
|
15925
|
-
width: 100%;
|
|
15926
|
-
max-width: ${isMobile ? "none" : "375px"};
|
|
15927
|
-
height: ${isMobile ? "100%" : "100vh"};
|
|
15928
|
-
min-height: ${isMobile ? "100%" : "initial"};
|
|
15929
|
-
max-height: -webkit-fill-available;
|
|
15930
|
-
max-height: -moz-available;
|
|
15931
|
-
max-height: stretch;
|
|
15932
|
-
`;
|
|
15933
15908
|
}
|
|
15934
15909
|
get hasVisibleProactiveMessages() {
|
|
15935
15910
|
const {
|
|
@@ -15991,17 +15966,13 @@ class ChatFrame extends d {
|
|
|
15991
15966
|
opacity: 0;
|
|
15992
15967
|
transform: translate(375px, 0);
|
|
15993
15968
|
visibility: hidden;
|
|
15969
|
+
transform: translate(0, 100px);
|
|
15994
15970
|
|
|
15995
15971
|
${isMobile ? `
|
|
15996
15972
|
height: 0;
|
|
15997
15973
|
` : `
|
|
15998
15974
|
height: 90%;
|
|
15999
15975
|
`}
|
|
16000
|
-
|
|
16001
|
-
${client.features.chat_ui_v2 && `
|
|
16002
|
-
transform: translate(0, 100px);
|
|
16003
|
-
`}
|
|
16004
|
-
|
|
16005
15976
|
${!drawerHasBeenOpened && `
|
|
16006
15977
|
transition: none;
|
|
16007
15978
|
`}
|
|
@@ -16541,14 +16512,11 @@ class IntroFrame extends d {
|
|
|
16541
16512
|
opacity: ${this.isShown ? "1" : "0"};
|
|
16542
16513
|
height: ${introDimensions.height}px;
|
|
16543
16514
|
width: ${introDimensions.width}px;
|
|
16544
|
-
|
|
16545
|
-
|
|
16546
|
-
|
|
16547
|
-
|
|
16548
|
-
|
|
16549
|
-
${getAlignment(adaSettings)}: 0;
|
|
16550
|
-
bottom: ${buttonSize - 20}px;
|
|
16551
|
-
`}
|
|
16515
|
+
max-height: auto;
|
|
16516
|
+
max-width: 350px;
|
|
16517
|
+
z-index: 9999;
|
|
16518
|
+
${getAlignment(adaSettings)}: 0;
|
|
16519
|
+
bottom: ${buttonSize - 20}px;
|
|
16552
16520
|
`;
|
|
16553
16521
|
if (!this.isShown) {
|
|
16554
16522
|
return styles + stylesForHiding;
|
|
@@ -17409,11 +17377,6 @@ class Container extends d {
|
|
|
17409
17377
|
return;
|
|
17410
17378
|
}
|
|
17411
17379
|
const newClient = new Client(clientResponse.client);
|
|
17412
|
-
if (!newClient.features.chat_ui_v2) {
|
|
17413
|
-
log("Clients on old UI", {
|
|
17414
|
-
clientHandle: newClient.handle
|
|
17415
|
-
});
|
|
17416
|
-
}
|
|
17417
17380
|
const baseApiUrl = getURL({
|
|
17418
17381
|
name: "api",
|
|
17419
17382
|
handle,
|
|
@@ -17587,7 +17550,6 @@ class Container extends d {
|
|
|
17587
17550
|
}
|
|
17588
17551
|
renderBackdrop() {
|
|
17589
17552
|
const {
|
|
17590
|
-
client,
|
|
17591
17553
|
adaSettings,
|
|
17592
17554
|
chatDimensions,
|
|
17593
17555
|
isDrawerOpen,
|
|
@@ -17599,7 +17561,7 @@ class Container extends d {
|
|
|
17599
17561
|
|
|
17600
17562
|
// checking for a non-empty parentElement here to
|
|
17601
17563
|
// hide the backdrop in the SDKs
|
|
17602
|
-
if (
|
|
17564
|
+
if (parentElement) {
|
|
17603
17565
|
return null;
|
|
17604
17566
|
}
|
|
17605
17567
|
const hasProactiveMessagesShown = Boolean(chatDimensions === null || chatDimensions === void 0 ? void 0 : chatDimensions.height);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ada-support/embed2",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.44",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/npm-entry",
|
|
6
6
|
"typings": "dist/npm-entry/index-npm.d.ts",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"preact": "10.4.5",
|
|
109
109
|
"typescript": "^4.6.2",
|
|
110
110
|
"uniqid": "^5.3.0",
|
|
111
|
-
"webpack": "^5.
|
|
111
|
+
"webpack": "^5.76.0",
|
|
112
112
|
"webpack-cli": "^4.9.2",
|
|
113
113
|
"webpack-merge": "^5.8.0"
|
|
114
114
|
},
|