@ada-support/embed2 1.0.70-dev.1 → 1.0.72

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.
@@ -8788,7 +8788,7 @@ var client = new error_tracker_BrowserClient({
8788
8788
  return event;
8789
8789
  },
8790
8790
  environment: "production",
8791
- release: "1.0.70-7b202fa",
8791
+ release: "1.0.72-6eb0fae",
8792
8792
  sampleRate: 0.25,
8793
8793
  autoSessionTracking: false,
8794
8794
  // Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
@@ -9490,7 +9490,7 @@ function getEmbedURL(_ref) {
9490
9490
  polyfillVersionString = "legacy";
9491
9491
  }
9492
9492
 
9493
- return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "7b202fa", "/index.html");
9493
+ return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "6eb0fae", "/index.html");
9494
9494
  }
9495
9495
  /**
9496
9496
  * Generate the Chat / API URL
@@ -12983,7 +12983,7 @@ var Container = /*#__PURE__*/function (_Component) {
12983
12983
  }, {
12984
12984
  key: "triggerCampaign",
12985
12985
  value: function triggerCampaign(params) {
12986
- var _client$marketing_cam, _campaign$follow_up_r;
12986
+ var _client$marketing_cam;
12987
12987
 
12988
12988
  var _this$props7 = this.props,
12989
12989
  client = _this$props7.client,
@@ -12992,14 +12992,7 @@ var Container = /*#__PURE__*/function (_Component) {
12992
12992
  var chatHasBeenRendered = this.state.chatHasBeenRendered;
12993
12993
  var campaignKey = params.campaignKey,
12994
12994
  ignoreStatus = params.ignoreStatus,
12995
- ignoreFrequency = params.ignoreFrequency;
12996
- (0,services_logger/* log */.cM)("triggerCampaign called", {
12997
- clientHandle: client === null || client === void 0 ? void 0 : client.handle,
12998
- campaignKey: campaignKey,
12999
- isDrawerOpen: isDrawerOpen
13000
- }, {
13001
- sampleRate: (client === null || client === void 0 ? void 0 : client.handle) === "tsi-cocoon" ? 1 : 0
13002
- }); // Don't allow sending campaigns when chat is open, it would interrupt the conversation
12995
+ ignoreFrequency = params.ignoreFrequency; // Don't allow sending campaigns when chat is open, it would interrupt the conversation
13003
12996
 
13004
12997
  if (isDrawerOpen) {
13005
12998
  return;
@@ -13011,15 +13004,11 @@ var Container = /*#__PURE__*/function (_Component) {
13011
13004
 
13012
13005
  if (!campaign) {
13013
13006
  throw new errors/* AdaEmbedError */.S("Could not find campaign with key: ".concat(campaignKey));
13014
- }
13007
+ } // we were using the null coalescing (??) operator but it yielded incorrect behaviour.
13008
+ // we are not sure why, but switching to using a ternary fixes the behaviour
13015
13009
 
13016
- var followUpResponseId = (_campaign$follow_up_r = campaign.follow_up_response_id) !== null && _campaign$follow_up_r !== void 0 ? _campaign$follow_up_r : campaign.response_id;
13017
- (0,services_logger/* log */.cM)("followUpResponseId initialized", {
13018
- clientHandle: client === null || client === void 0 ? void 0 : client.handle,
13019
- followUpResponseId: followUpResponseId
13020
- }, {
13021
- sampleRate: (client === null || client === void 0 ? void 0 : client.handle) === "tsi-cocoon" ? 1 : 0
13022
- });
13010
+
13011
+ var followUpResponseId = campaign.follow_up_response_id ? campaign.follow_up_response_id : campaign.response_id;
13023
13012
  setState({
13024
13013
  latestCampaignKey: campaignKey,
13025
13014
  hasChatOpenedAfterProactiveMessagesShown: false,
@@ -14355,7 +14344,7 @@ window.__AdaEmbedConstructor = Embed;
14355
14344
  /* harmony export */ });
14356
14345
  var isModern = new RegExp("((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(15|(1[6-9]|[2-9]\\d|\\d{3,}))[_.]\\d+(?:[_.]\\d+)?)|((Chromium|Chrome)\\/(99|([1-9]\\d\\d|\\d{4,}))\\.\\d+(?:\\.\\d+)?)|(Version\\/(15|(1[6-9]|[2-9]\\d|\\d{3,}))\\.\\d+(?:\\.\\d+)? Safari\\/)|(Firefox\\/(98|(99|\\d{3,}))\\.\\d+\\.\\d+)|(Firefox\\/(98|(99|\\d{3,}))\\.\\d+(pre|[ab]\\d+[a-z]*)?)").test(navigator.userAgent);
14357
14346
  var isProduction = "production" === "production";
14358
- var embed2Version = "7b202fa";
14347
+ var embed2Version = "6eb0fae";
14359
14348
 
14360
14349
  /***/ }),
14361
14350
 
@@ -14701,9 +14690,9 @@ function _log() {
14701
14690
  service: "embed",
14702
14691
  env: "production",
14703
14692
  embedVersion: 2,
14704
- version: "1.0.70",
14693
+ version: "1.0.72",
14705
14694
  isNpm: true,
14706
- commitHash: "7b202fa"
14695
+ commitHash: "6eb0fae"
14707
14696
  }))
14708
14697
  });
14709
14698
 
@@ -25644,7 +25633,7 @@ function _loadEmbed() {
25644
25633
  polyfillVersionString = "legacy";
25645
25634
  }
25646
25635
 
25647
- embedScriptSource = concat_default()(_context17 = concat_default()(_context18 = "".concat(host, "/embed/")).call(_context18, polyfillVersionString, "/client/")).call(_context17, "7b202fa", "/index.js");
25636
+ embedScriptSource = concat_default()(_context17 = concat_default()(_context18 = "".concat(host, "/embed/")).call(_context18, polyfillVersionString, "/client/")).call(_context17, "6eb0fae", "/index.js");
25648
25637
  }
25649
25638
 
25650
25639
  clientScriptExists = Boolean( true || // The client script is bundled with npm module
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ada-support/embed2",
3
- "version": "1.0.70-dev.1",
3
+ "version": "1.0.72",
4
4
  "description": "",
5
5
  "main": "dist/npm-entry",
6
6
  "typings": "dist/npm-entry/index.d.ts",
@@ -54,7 +54,7 @@
54
54
  "author": "",
55
55
  "license": "ISC",
56
56
  "devDependencies": {
57
- "@ada-support/eslint-config-ada": "^1.2.0",
57
+ "@ada-support/eslint-config-ada": "^1.2.1",
58
58
  "@types/enzyme": "^3.10.11",
59
59
  "@types/jest": "^27.0.2",
60
60
  "@types/json-stable-stringify": "^1.0.33",
@@ -120,7 +120,8 @@
120
120
  "webpack-subresource-integrity": "^5.1.0"
121
121
  },
122
122
  "resolutions": {
123
- "@lambdatest/node-tunnel": ">=3.0.2"
123
+ "@lambdatest/node-tunnel": ">=3.0.2",
124
+ "minimist": ">=1.2.6"
124
125
  },
125
126
  "files": [
126
127
  "dist/npm-entry"
@@ -1,3 +0,0 @@
1
- import { TriggerCondition, URLMatchTriggerCondition } from "./types";
2
- export declare const evalUrlMatchTriggerCondition: (triggerCondition: URLMatchTriggerCondition, url: string) => boolean;
3
- export declare const evalTriggerCondition: (triggerCondition: TriggerCondition) => boolean;
@@ -1,4 +0,0 @@
1
- import { DateTimeTriggerCondition, TriggerCondition, URLMatchTriggerCondition } from "./types";
2
- export declare const evalUrlMatchTriggerCondition: (triggerCondition: URLMatchTriggerCondition, url: string) => boolean;
3
- export declare const evalDatetimeTriggerCondition: (triggerCondition: DateTimeTriggerCondition, currentDateTime: Date) => boolean;
4
- export declare const evalTriggerCondition: (triggerCondition: TriggerCondition) => boolean;
@@ -1,12 +0,0 @@
1
- import "frames/lib/error-tracker";
2
- export declare const LIVE_CHAT_PENDING_STORAGE_KEY = "liveChatPending";
3
- export declare const IS_DRAWER_OPEN_STORAGE_KEY = "ada-embed_is-drawer-open";
4
- /**
5
- * NOTE: If you import this file into any other file
6
- * it will trigger the init() function below - may cause errors!
7
- */
8
- /**
9
- * Auto-opens the chat door if crossWindowPersistence is one, the chatter is in
10
- * a live chat, and if the drawer was previously opened.
11
- */
12
- export declare function setIsDrawerOpen(): Promise<void>;
@@ -1,3 +0,0 @@
1
- import { StoreState } from "common/types/store-state";
2
- export declare function initializeFrame(waitForOtherFrames?: boolean, initialState?: Partial<StoreState>): Promise<boolean>;
3
- export declare function addCustomStyles(styles: string, hasUICustomization: boolean): void;
@@ -1,6 +0,0 @@
1
- import * as Sentry from "@sentry/browser";
2
- declare const errorTracker: {
3
- trackException(error: Error): void;
4
- addBreadCrumb(category: string, message: string, data: object, level?: Sentry.Severity): void;
5
- };
6
- export default errorTracker;
@@ -1,3 +0,0 @@
1
- import FC from "common/lib/fc";
2
- declare const _default: FC;
3
- export default _default;
@@ -1,2 +0,0 @@
1
- import { StoreProxyInterface } from "common/types/store";
2
- export declare const store: StoreProxyInterface;
@@ -1,2 +0,0 @@
1
- declare const _default: import("./common/types").AdaEmbedAPI;
2
- export default _default;