@ada-support/embed2 1.0.69 → 1.0.71

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.69-8c748e1",
8791
+ release: "1.0.71-d5ef290",
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, "8c748e1", "/index.html");
9493
+ return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "d5ef290", "/index.html");
9494
9494
  }
9495
9495
  /**
9496
9496
  * Generate the Chat / API URL
@@ -12989,7 +12989,7 @@ var Container = /*#__PURE__*/function (_Component) {
12989
12989
  }, {
12990
12990
  key: "triggerCampaign",
12991
12991
  value: function triggerCampaign(params) {
12992
- var _client$marketing_cam, _campaign$follow_up_r;
12992
+ var _client$marketing_cam;
12993
12993
 
12994
12994
  var _this$props7 = this.props,
12995
12995
  client = _this$props7.client,
@@ -12998,14 +12998,7 @@ var Container = /*#__PURE__*/function (_Component) {
12998
12998
  var chatHasBeenRendered = this.state.chatHasBeenRendered;
12999
12999
  var campaignKey = params.campaignKey,
13000
13000
  ignoreStatus = params.ignoreStatus,
13001
- ignoreFrequency = params.ignoreFrequency;
13002
- (0,services_logger/* log */.cM)("triggerCampaign called", {
13003
- clientHandle: client === null || client === void 0 ? void 0 : client.handle,
13004
- campaignKey: campaignKey,
13005
- isDrawerOpen: isDrawerOpen
13006
- }, {
13007
- sampleRate: (client === null || client === void 0 ? void 0 : client.handle) === "tsi-cocoon" ? 1 : 0
13008
- }); // Don't allow sending campaigns when chat is open, it would interrupt the conversation
13001
+ ignoreFrequency = params.ignoreFrequency; // Don't allow sending campaigns when chat is open, it would interrupt the conversation
13009
13002
 
13010
13003
  if (isDrawerOpen) {
13011
13004
  return;
@@ -13017,15 +13010,11 @@ var Container = /*#__PURE__*/function (_Component) {
13017
13010
 
13018
13011
  if (!campaign) {
13019
13012
  throw new errors/* AdaEmbedError */.S("Could not find campaign with key: ".concat(campaignKey));
13020
- }
13013
+ } // we were using the null coalescing (??) operator but it yielded incorrect behaviour.
13014
+ // we are not sure why, but switching to using a ternary fixes the behaviour
13021
13015
 
13022
- 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;
13023
- (0,services_logger/* log */.cM)("followUpResponseId initialized", {
13024
- clientHandle: client === null || client === void 0 ? void 0 : client.handle,
13025
- followUpResponseId: followUpResponseId
13026
- }, {
13027
- sampleRate: (client === null || client === void 0 ? void 0 : client.handle) === "tsi-cocoon" ? 1 : 0
13028
- });
13016
+
13017
+ var followUpResponseId = campaign.follow_up_response_id ? campaign.follow_up_response_id : campaign.response_id;
13029
13018
  setState({
13030
13019
  latestCampaignKey: campaignKey,
13031
13020
  hasChatOpenedAfterProactiveMessagesShown: false,
@@ -14361,7 +14350,7 @@ window.__AdaEmbedConstructor = Embed;
14361
14350
  /* harmony export */ });
14362
14351
  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)\\/(97|(9[8-9]|\\d{3,}))\\.\\d+(?:\\.\\d+)?)|(Version\\/(15|(1[6-9]|[2-9]\\d|\\d{3,}))\\.\\d+(?:\\.\\d+)? Safari\\/)|(Firefox\\/(96|(9[7-9]|\\d{3,}))\\.\\d+\\.\\d+)|(Firefox\\/(96|(9[7-9]|\\d{3,}))\\.\\d+(pre|[ab]\\d+[a-z]*)?)").test(navigator.userAgent);
14363
14352
  var isProduction = "production" === "production";
14364
- var embed2Version = "8c748e1";
14353
+ var embed2Version = "d5ef290";
14365
14354
 
14366
14355
  /***/ }),
14367
14356
 
@@ -14707,9 +14696,9 @@ function _log() {
14707
14696
  service: "embed",
14708
14697
  env: "production",
14709
14698
  embedVersion: 2,
14710
- version: "1.0.69",
14699
+ version: "1.0.71",
14711
14700
  isNpm: true,
14712
- commitHash: "8c748e1"
14701
+ commitHash: "d5ef290"
14713
14702
  }))
14714
14703
  });
14715
14704
 
@@ -25650,7 +25639,7 @@ function _loadEmbed() {
25650
25639
  polyfillVersionString = "legacy";
25651
25640
  }
25652
25641
 
25653
- embedScriptSource = concat_default()(_context17 = concat_default()(_context18 = "".concat(host, "/embed/")).call(_context18, polyfillVersionString, "/client/")).call(_context17, "8c748e1", "/index.js");
25642
+ embedScriptSource = concat_default()(_context17 = concat_default()(_context18 = "".concat(host, "/embed/")).call(_context18, polyfillVersionString, "/client/")).call(_context17, "d5ef290", "/index.js");
25654
25643
  }
25655
25644
 
25656
25645
  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.69",
3
+ "version": "1.0.71",
4
4
  "description": "",
5
5
  "main": "dist/npm-entry",
6
6
  "typings": "dist/npm-entry/index.d.ts",