@ada-support/embed2 1.6.44 → 1.6.47

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.
@@ -14,12 +14,9 @@ export interface CurrentIntro {
14
14
  delay: number;
15
15
  }
16
16
  export interface Features {
17
- disable_embed_notification_status?: boolean;
18
17
  ui_customization?: boolean;
19
- developer_proactive?: boolean;
20
18
  afm_business_events?: boolean;
21
19
  afm_proactive_messaging?: boolean;
22
- embed_test_bot?: boolean;
23
20
  translations?: boolean;
24
21
  chat_session_auth?: boolean;
25
22
  }
@@ -1,4 +1,4 @@
1
- import type { StartOptions } from "@ada-support/embed-types";
1
+ import type { Modality, StartOptions } from "@ada-support/embed-types";
2
2
  import type { ConnectionState } from "common/constants/events";
3
3
  import type { Client } from "common/models/client";
4
4
  import type { AdaCluster } from "common/types";
@@ -43,6 +43,7 @@ export interface StoreState extends StartOptionsNoFunction {
43
43
  wasCampaignShownButNowClosed: boolean;
44
44
  proactiveCampaignHadMessages: boolean;
45
45
  deviceToken: string | null;
46
+ activeModality?: Modality;
46
47
  }
47
48
  export interface StartOptionsNoFunction {
48
49
  handle: string;
@@ -13260,7 +13260,7 @@ const client = new error_tracker_BrowserClient({
13260
13260
  return event;
13261
13261
  },
13262
13262
  environment: "production",
13263
- release: "1.6.44-47c4d77",
13263
+ release: "1.6.47-3681e6c",
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}/${"47c4d77"}/index.html`;
13835
+ return `${host}/embed/${frameName}/${"3681e6c"}/index.html`;
13836
13836
  }
13837
13837
  function constructQueryString(query) {
13838
13838
  return Object.keys(query).map(key => {
@@ -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.44",
15306
+ version: "1.6.47",
15307
15307
  isNpm: true,
15308
- commitHash: "47c4d77"
15308
+ commitHash: "3681e6c"
15309
15309
  }))
15310
15310
  });
15311
15311
  }
@@ -15829,7 +15829,7 @@ class ChatFrame extends d {
15829
15829
  const hostPageUrlParams = new URL(window.location.href).searchParams;
15830
15830
  const smsToken = hostPageUrlParams.get("adaSMSToken");
15831
15831
  const queryParams = {
15832
- embedVersion: "47c4d77".slice(0, 7),
15832
+ embedVersion: "3681e6c".slice(0, 7),
15833
15833
  greeting,
15834
15834
  language,
15835
15835
  skipGreeting,
@@ -15870,8 +15870,7 @@ class ChatFrame extends d {
15870
15870
  const borderRadius = ((_client$ui_settings2 = client.ui_settings) === null || _client$ui_settings2 === void 0 ? void 0 : (_client$ui_settings2$ = _client$ui_settings2.chat) === null || _client$ui_settings2$ === void 0 ? void 0 : _client$ui_settings2$.style) === "rectangular" ? "8px" : "16px";
15871
15871
  const WINDOW_HEIGHT = 725;
15872
15872
  const TEST_BOT_NAV_HEIGHT = 48;
15873
- const isTestBot = client.features.embed_test_bot && testMode;
15874
- const totalWindowHeight = isTestBot ? `${WINDOW_HEIGHT + TEST_BOT_NAV_HEIGHT}px` : `${WINDOW_HEIGHT}px`;
15873
+ const totalWindowHeight = testMode ? `${WINDOW_HEIGHT + TEST_BOT_NAV_HEIGHT}px` : `${WINDOW_HEIGHT}px`;
15875
15874
  return `
15876
15875
  position: fixed;
15877
15876
 
@@ -17176,7 +17175,8 @@ class Container extends d {
17176
17175
  language,
17177
17176
  metaFields: newMetaFields,
17178
17177
  sensitiveMetaFields,
17179
- resetChatHistory = true
17178
+ resetChatHistory = true,
17179
+ activeModality
17180
17180
  } = payload;
17181
17181
  const {
17182
17182
  setGlobalState
@@ -17200,7 +17200,8 @@ class Container extends d {
17200
17200
  language,
17201
17201
  metaFields: newMetaFields,
17202
17202
  sensitiveMetaFields,
17203
- chatDimensions: undefined
17203
+ chatDimensions: undefined,
17204
+ activeModality
17204
17205
  };
17205
17206
  if (resetChatHistory) {
17206
17207
  if (!xStorageChannel) {
@@ -17267,9 +17268,6 @@ class Container extends d {
17267
17268
  duration
17268
17269
  } = payload;
17269
17270
  const EXTRA_PROACTIVE_DELAY = 1000;
17270
-
17271
- // Do not feature flag gate this behind the developer_proactive flag
17272
- // It's also used for free-tier campaigns, which are available to all clients
17273
17271
  this.setState({
17274
17272
  hideIntroOverride: true
17275
17273
  }, async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ada-support/embed2",
3
- "version": "1.6.44",
3
+ "version": "1.6.47",
4
4
  "description": "",
5
5
  "main": "dist/npm-entry",
6
6
  "typings": "dist/npm-entry/index-npm.d.ts",
@@ -83,7 +83,7 @@
83
83
  "webpack-dev-server": "^4.3.1"
84
84
  },
85
85
  "dependencies": {
86
- "@ada-support/embed-types": "^1.6.4",
86
+ "@ada-support/embed-types": "^1.6.5",
87
87
  "@ada-support/web-storage": "^0.14.0",
88
88
  "@babel/core": "7.20.12",
89
89
  "@babel/plugin-proposal-class-properties": "^7.16.7",
@@ -127,4 +127,4 @@
127
127
  "publishConfig": {
128
128
  "access": "public"
129
129
  }
130
- }
130
+ }