@ada-support/embed2 1.0.77 → 1.0.80

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,6 +14,7 @@ export interface StartOptions {
14
14
  sensitiveMetaFields?: Record<string, unknown>;
15
15
  parentElement?: string | HTMLElement;
16
16
  privateMode?: boolean;
17
+ chatFrameTimeoutCallback?(): void;
17
18
  adaReadyCallback?(params: {
18
19
  isRolledOut: boolean;
19
20
  }): void;
@@ -74,7 +75,7 @@ export interface StoreState extends StartOptionsNoFunction {
74
75
  language?: string;
75
76
  adaSettings: StartOptions;
76
77
  wasCampaignShownButNowClosed: boolean;
77
- isChatEmpty: boolean;
78
+ proactiveCampaignHadMessages: boolean;
78
79
  }
79
80
  export interface StartOptionsNoFunction {
80
81
  handle?: string;
@@ -8788,7 +8788,7 @@ var client = new error_tracker_BrowserClient({
8788
8788
  return event;
8789
8789
  },
8790
8790
  environment: "production",
8791
- release: "1.0.77-12e8ab2",
8791
+ release: "1.0.80-a465c37",
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, "12e8ab2", "/index.html");
9493
+ return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "a465c37", "/index.html");
9494
9494
  }
9495
9495
  /**
9496
9496
  * Generate the Chat / API URL
@@ -9595,9 +9595,10 @@ var actions = {
9595
9595
  }
9596
9596
 
9597
9597
  var hasChatOpenedAfterProactiveMessagesShown = currentState.hasChatOpenedAfterProactiveMessagesShown,
9598
- wasCampaignShownButNowClosed = currentState.wasCampaignShownButNowClosed;
9598
+ wasCampaignShownButNowClosed = currentState.wasCampaignShownButNowClosed,
9599
+ proactiveCampaignHadMessages = currentState.proactiveCampaignHadMessages;
9599
9600
 
9600
- if (!currentState.isDrawerOpen && !hasChatOpenedAfterProactiveMessagesShown && !wasCampaignShownButNowClosed && currentState.latestCampaignKey) {
9601
+ if (!currentState.isDrawerOpen && !hasChatOpenedAfterProactiveMessagesShown && !wasCampaignShownButNowClosed && proactiveCampaignHadMessages && currentState.latestCampaignKey) {
9601
9602
  var _url = getURL({
9602
9603
  name: "api",
9603
9604
  handle: currentState.handle,
@@ -9971,7 +9972,7 @@ var state = {
9971
9972
  chatterInLiveChat: false,
9972
9973
  adaSettings: {},
9973
9974
  wasCampaignShownButNowClosed: false,
9974
- isChatEmpty: false
9975
+ proactiveCampaignHadMessages: false
9975
9976
  };
9976
9977
  /* harmony default export */ var store_state = (state);
9977
9978
  ;// CONCATENATED MODULE: ./src/client/store/index.ts
@@ -11617,6 +11618,8 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
11617
11618
 
11618
11619
  (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), "channel", void 0);
11619
11620
 
11621
+ (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), "chatRenderTimeout", void 0);
11622
+
11620
11623
  (0,defineProperty/* default */.Z)((0,assertThisInitialized/* default */.Z)(_this), "state", {
11621
11624
  isMounted: false,
11622
11625
  closeTransitionTime: 200
@@ -11941,7 +11944,7 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
11941
11944
  case 0:
11942
11945
  _this$props9 = this.props, adaSettings = _this$props9.adaSettings, setState = _this$props9.setState, setConnectionState = _this$props9.setConnectionState;
11943
11946
  _context22.t0 = type;
11944
- _context22.next = _context22.t0 === GET_WINDOW_ORIGIN ? 4 : _context22.t0 === CHAT_STARTED ? 8 : _context22.t0 === CHAT_WEBSOCKET_CONNECTED ? 13 : _context22.t0 === PUBLISH_EVENT ? 15 : _context22.t0 === ANALYTICS_EVENT ? 18 : _context22.t0 === CHATTER_EVENT ? 22 : _context22.t0 === "ZD_SESSION" ? 32 : _context22.t0 === ZD_MESSAGING_HANDOFF ? 41 : _context22.t0 === CHATTER_LIVECHAT_EVENT ? 50 : _context22.t0 === CUSTOM_JAVASCRIPT_EVENT ? 58 : _context22.t0 === RESET_FROM_CHAT_EVENT ? 67 : _context22.t0 === ZD_JWT_AUTH_EVENT ? 70 : _context22.t0 === CREATE_NOTIFICATION_EVENT ? 88 : _context22.t0 === BROWSER_HAS_NOTIFICATIONS_EVENT ? 90 : _context22.t0 === REQUEST_NOTIFICATIONS_EVENT ? 94 : _context22.t0 === END_CONVERSATION_EVENT ? 96 : 99;
11947
+ _context22.next = _context22.t0 === GET_WINDOW_ORIGIN ? 4 : _context22.t0 === CHAT_STARTED ? 8 : _context22.t0 === CHAT_WEBSOCKET_CONNECTED ? 14 : _context22.t0 === PUBLISH_EVENT ? 16 : _context22.t0 === ANALYTICS_EVENT ? 19 : _context22.t0 === CHATTER_EVENT ? 23 : _context22.t0 === "ZD_SESSION" ? 33 : _context22.t0 === ZD_MESSAGING_HANDOFF ? 42 : _context22.t0 === CHATTER_LIVECHAT_EVENT ? 51 : _context22.t0 === CUSTOM_JAVASCRIPT_EVENT ? 59 : _context22.t0 === RESET_FROM_CHAT_EVENT ? 68 : _context22.t0 === ZD_JWT_AUTH_EVENT ? 71 : _context22.t0 === CREATE_NOTIFICATION_EVENT ? 89 : _context22.t0 === BROWSER_HAS_NOTIFICATIONS_EVENT ? 91 : _context22.t0 === REQUEST_NOTIFICATIONS_EVENT ? 95 : _context22.t0 === END_CONVERSATION_EVENT ? 97 : 100;
11945
11948
  break;
11946
11949
 
11947
11950
  case 4:
@@ -11954,7 +11957,7 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
11954
11957
 
11955
11958
  case 6:
11956
11959
  this.channel.postMessage("SET_WINDOW_ORIGIN", window.location, id);
11957
- return _context22.abrupt("break", 100);
11960
+ return _context22.abrupt("break", 101);
11958
11961
 
11959
11962
  case 8:
11960
11963
  if (this.channel) {
@@ -11965,24 +11968,25 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
11965
11968
  throw new errors/* AdaEmbedError */.S("`this.channel` is not defined");
11966
11969
 
11967
11970
  case 10:
11971
+ clearTimeout(this.chatRenderTimeout);
11968
11972
  this.channel.isConnected = true;
11969
11973
  setConnectionState({
11970
11974
  "chat": ConnectionState.Done
11971
11975
  });
11972
- return _context22.abrupt("break", 100);
11976
+ return _context22.abrupt("break", 101);
11973
11977
 
11974
- case 13:
11978
+ case 14:
11975
11979
  setState({
11976
11980
  isChatWebsocketConnected: true
11977
11981
  });
11978
- return _context22.abrupt("break", 100);
11982
+ return _context22.abrupt("break", 101);
11979
11983
 
11980
- case 15:
11984
+ case 16:
11981
11985
  _ref = payload, eventKey = _ref.eventKey, data = _ref.data;
11982
11986
  publishEvent(eventKey, data);
11983
- return _context22.abrupt("break", 100);
11987
+ return _context22.abrupt("break", 101);
11984
11988
 
11985
- case 18:
11989
+ case 19:
11986
11990
  _ref2 = payload, analytics = _ref2.analytics;
11987
11991
  analyticsCallback = adaSettings.analyticsCallback;
11988
11992
 
@@ -11990,28 +11994,28 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
11990
11994
  analyticsCallback(analytics);
11991
11995
  }
11992
11996
 
11993
- return _context22.abrupt("break", 100);
11997
+ return _context22.abrupt("break", 101);
11994
11998
 
11995
- case 22:
11999
+ case 23:
11996
12000
  client = this.props.client;
11997
12001
  _ref3 = payload, chatter = _ref3.chatter, created = _ref3.created;
11998
12002
  chatterTokenCallback = adaSettings.chatterTokenCallback;
11999
12003
 
12000
12004
  if (client) {
12001
- _context22.next = 27;
12005
+ _context22.next = 28;
12002
12006
  break;
12003
12007
  }
12004
12008
 
12005
12009
  throw new errors/* AdaEmbedError */.S("`client` is undefined");
12006
12010
 
12007
- case 27:
12008
- _context22.next = 29;
12011
+ case 28:
12012
+ _context22.next = 30;
12009
12013
  return setState({
12010
12014
  chatterToken: chatter,
12011
12015
  chatterCreated: created
12012
12016
  });
12013
12017
 
12014
- case 29:
12018
+ case 30:
12015
12019
  /**
12016
12020
  * Store the token so when embed loads in the future, it doesn't have to wait for it to
12017
12021
  * come from chat. This is important for campaign and business event triggers.
@@ -12028,26 +12032,26 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
12028
12032
  chatterTokenCallback(chatter);
12029
12033
  }
12030
12034
 
12031
- return _context22.abrupt("break", 100);
12035
+ return _context22.abrupt("break", 101);
12032
12036
 
12033
- case 32:
12037
+ case 33:
12034
12038
  _client = this.props.client;
12035
12039
  _ref4 = payload, zdSessionId = _ref4.zdSessionId, zdPreviousTags = _ref4.zdPreviousTags;
12036
12040
 
12037
12041
  if (_client) {
12038
- _context22.next = 36;
12042
+ _context22.next = 37;
12039
12043
  break;
12040
12044
  }
12041
12045
 
12042
12046
  throw new errors/* AdaEmbedError */.S("`client` is undefined");
12043
12047
 
12044
- case 36:
12045
- _context22.next = 38;
12048
+ case 37:
12049
+ _context22.next = 39;
12046
12050
  return setState({
12047
12051
  zdSessionId: zdSessionId
12048
12052
  });
12049
12053
 
12050
- case 38:
12054
+ case 39:
12051
12055
  storage = function () {
12052
12056
  if (_client.persistence === PERSISTENCE_NORMAL) {
12053
12057
  return safeLocalStorage;
@@ -12074,27 +12078,27 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
12074
12078
  }
12075
12079
  }
12076
12080
 
12077
- return _context22.abrupt("break", 100);
12081
+ return _context22.abrupt("break", 101);
12078
12082
 
12079
- case 41:
12083
+ case 42:
12080
12084
  _client2 = this.props.client;
12081
12085
  _ref5 = payload, zdMessagingExternalUserId = _ref5.zdMessagingExternalUserId, zdMessagingChatterCreated = _ref5.zdMessagingChatterCreated;
12082
12086
 
12083
12087
  if (_client2) {
12084
- _context22.next = 45;
12088
+ _context22.next = 46;
12085
12089
  break;
12086
12090
  }
12087
12091
 
12088
12092
  throw new errors/* AdaEmbedError */.S("`client` is undefined");
12089
12093
 
12090
- case 45:
12091
- _context22.next = 47;
12094
+ case 46:
12095
+ _context22.next = 48;
12092
12096
  return setState({
12093
12097
  zdMessagingExternalUserId: zdMessagingExternalUserId,
12094
12098
  zdMessagingChatterCreated: zdMessagingChatterCreated
12095
12099
  });
12096
12100
 
12097
- case 47:
12101
+ case 48:
12098
12102
  if (zdMessagingExternalUserId === null) {
12099
12103
  safeLocalStorage.removeItem(ZD_MESSAGING_EXTERNAL_USER_ID_STORAGE_KEY);
12100
12104
  } else {
@@ -12107,25 +12111,25 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
12107
12111
  safeLocalStorage.setItem(ZD_MESSAGING_CHATTER_CREATED_STORAGE_KEY, zdMessagingChatterCreated);
12108
12112
  }
12109
12113
 
12110
- return _context22.abrupt("break", 100);
12114
+ return _context22.abrupt("break", 101);
12111
12115
 
12112
- case 50:
12116
+ case 51:
12113
12117
  _client3 = this.props.client;
12114
12118
  _ref6 = payload, inLiveChat = _ref6.inLiveChat;
12115
- _context22.next = 54;
12119
+ _context22.next = 55;
12116
12120
  return setState({
12117
12121
  chatterInLiveChat: inLiveChat
12118
12122
  });
12119
12123
 
12120
- case 54:
12124
+ case 55:
12121
12125
  if (_client3) {
12122
- _context22.next = 56;
12126
+ _context22.next = 57;
12123
12127
  break;
12124
12128
  }
12125
12129
 
12126
12130
  throw new errors/* AdaEmbedError */.S("`client` is not defined");
12127
12131
 
12128
- case 56:
12132
+ case 57:
12129
12133
  /**
12130
12134
  * Store the token so when embed loads in the future, it doesn't have to wait for it to
12131
12135
  * come from chat. This is important for campaign and business event triggers.
@@ -12136,19 +12140,19 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
12136
12140
  safeSessionStorage.setItem(IN_LIVE_CHAT_STORAGE_KEY, inLiveChat);
12137
12141
  }
12138
12142
 
12139
- return _context22.abrupt("break", 100);
12143
+ return _context22.abrupt("break", 101);
12140
12144
 
12141
- case 58:
12145
+ case 59:
12142
12146
  eventCallbacks = adaSettings.eventCallbacks;
12143
12147
 
12144
12148
  if (eventCallbacks) {
12145
- _context22.next = 61;
12149
+ _context22.next = 62;
12146
12150
  break;
12147
12151
  }
12148
12152
 
12149
- return _context22.abrupt("break", 100);
12153
+ return _context22.abrupt("break", 101);
12150
12154
 
12151
- case 61:
12155
+ case 62:
12152
12156
  customJavascriptEvent = payload.event_data;
12153
12157
  specificCallback = eventCallbacks[customJavascriptEvent.event_name];
12154
12158
  genericCallback = eventCallbacks["*"];
@@ -12161,22 +12165,22 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
12161
12165
  genericCallback(customJavascriptEvent);
12162
12166
  }
12163
12167
 
12164
- return _context22.abrupt("break", 100);
12168
+ return _context22.abrupt("break", 101);
12165
12169
 
12166
- case 67:
12170
+ case 68:
12167
12171
  resetChat = this.props.resetChat;
12168
12172
  resetChat();
12169
- return _context22.abrupt("break", 100);
12173
+ return _context22.abrupt("break", 101);
12170
12174
 
12171
- case 70:
12175
+ case 71:
12172
12176
  zdChatterAuthCallback = adaSettings.zdChatterAuthCallback;
12173
12177
 
12174
12178
  if (!zdChatterAuthCallback) {
12175
- _context22.next = 84;
12179
+ _context22.next = 85;
12176
12180
  break;
12177
12181
  }
12178
12182
 
12179
- _context22.prev = 72;
12183
+ _context22.prev = 73;
12180
12184
  zdChatterAuthCallback(function (token) {
12181
12185
  if (!_this4.channel) {
12182
12186
  throw new errors/* AdaEmbedError */.S("`this.channel` is not defined");
@@ -12186,82 +12190,82 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
12186
12190
  token: token
12187
12191
  }, id);
12188
12192
  });
12189
- _context22.next = 82;
12193
+ _context22.next = 83;
12190
12194
  break;
12191
12195
 
12192
- case 76:
12193
- _context22.prev = 76;
12194
- _context22.t1 = _context22["catch"](72);
12196
+ case 77:
12197
+ _context22.prev = 77;
12198
+ _context22.t1 = _context22["catch"](73);
12195
12199
  console.warn("Function for zdChatterAuthCallback produced an error - please ensure the callback is functioning normally");
12196
12200
 
12197
12201
  if (this.channel) {
12198
- _context22.next = 81;
12202
+ _context22.next = 82;
12199
12203
  break;
12200
12204
  }
12201
12205
 
12202
12206
  throw new errors/* AdaEmbedError */.S("`this.channel` is not defined");
12203
12207
 
12204
- case 81:
12208
+ case 82:
12205
12209
  this.channel.postMessage(ZD_JWT_AUTH_RESPONSE_EVENT, {}, id);
12206
12210
 
12207
- case 82:
12208
- _context22.next = 87;
12211
+ case 83:
12212
+ _context22.next = 88;
12209
12213
  break;
12210
12214
 
12211
- case 84:
12215
+ case 85:
12212
12216
  if (this.channel) {
12213
- _context22.next = 86;
12217
+ _context22.next = 87;
12214
12218
  break;
12215
12219
  }
12216
12220
 
12217
12221
  throw new errors/* AdaEmbedError */.S("`this.channel` is not defined");
12218
12222
 
12219
- case 86:
12220
- this.channel.postMessage(ZD_JWT_AUTH_RESPONSE_EVENT, {}, id);
12221
-
12222
12223
  case 87:
12223
- return _context22.abrupt("break", 100);
12224
+ this.channel.postMessage(ZD_JWT_AUTH_RESPONSE_EVENT, {}, id);
12224
12225
 
12225
12226
  case 88:
12227
+ return _context22.abrupt("break", 101);
12228
+
12229
+ case 89:
12226
12230
  this.handleNotifications(payload);
12227
- return _context22.abrupt("break", 100);
12231
+ return _context22.abrupt("break", 101);
12228
12232
 
12229
- case 90:
12233
+ case 91:
12230
12234
  if (this.channel) {
12231
- _context22.next = 92;
12235
+ _context22.next = 93;
12232
12236
  break;
12233
12237
  }
12234
12238
 
12235
12239
  throw new errors/* AdaEmbedError */.S("`this.channel` is not defined");
12236
12240
 
12237
- case 92:
12241
+ case 93:
12238
12242
  this.channel.postMessage(BROWSER_HAS_NOTIFICATIONS_RESPONSE_EVENT, {
12239
12243
  browserHasNotificationSupport: browserHasNotificationSupport
12240
12244
  });
12241
- return _context22.abrupt("break", 100);
12245
+ return _context22.abrupt("break", 101);
12242
12246
 
12243
- case 94:
12247
+ case 95:
12244
12248
  requestNotificationPermission();
12245
- return _context22.abrupt("break", 100);
12249
+ return _context22.abrupt("break", 101);
12246
12250
 
12247
- case 96:
12251
+ case 97:
12248
12252
  conversationEndCallback = adaSettings.conversationEndCallback;
12249
12253
 
12250
12254
  if (conversationEndCallback) {
12251
12255
  conversationEndCallback(payload);
12252
12256
  }
12253
12257
 
12254
- return _context22.abrupt("break", 100);
12255
-
12256
- case 99:
12257
- return _context22.abrupt("break", 100);
12258
+ return _context22.abrupt("break", 101);
12258
12259
 
12259
12260
  case 100:
12261
+ return _context22.abrupt("break", 101);
12262
+
12263
+ case 101:
12260
12264
  case "end":
12261
12265
  return _context22.stop();
12262
12266
  }
12263
12267
  }
12264
- }, _callee, this, [[72, 76]]);
12268
+ }, _callee, this, [[73, 77]]);
12265
12269
  }));
12266
12270
 
12267
12271
  function handleChatEvent(_x, _x2, _x3) {
@@ -12288,12 +12292,34 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
12288
12292
  _this5.handleChatEvent(type, payload, id);
12289
12293
  });
12290
12294
  }
12295
+ }, {
12296
+ key: "frameLoaded",
12297
+ value: function frameLoaded() {
12298
+ var _this6 = this;
12299
+
12300
+ var _this$props11 = this.props,
12301
+ handle = _this$props11.handle,
12302
+ adaSettings = _this$props11.adaSettings;
12303
+ var chatFrameTimeoutCallback = adaSettings.chatFrameTimeoutCallback;
12304
+ this.chatRenderTimeout = window.setTimeout(function () {
12305
+ var _this6$channel;
12306
+
12307
+ (0,services_logger/* log */.cM)("Chat frame took over 5 seconds to respond", {
12308
+ handle: handle,
12309
+ embedSettings: adaSettings
12310
+ });
12311
+
12312
+ if (chatFrameTimeoutCallback && !((_this6$channel = _this6.channel) !== null && _this6$channel !== void 0 && _this6$channel.isConnected)) {
12313
+ chatFrameTimeoutCallback();
12314
+ }
12315
+ }, 5000);
12316
+ }
12291
12317
  }, {
12292
12318
  key: "render",
12293
12319
  value: function render() {
12294
- var _this$props11 = this.props,
12295
- name = _this$props11.name,
12296
- isDrawerOpen = _this$props11.isDrawerOpen;
12320
+ var _this$props12 = this.props,
12321
+ name = _this$props12.name,
12322
+ isDrawerOpen = _this$props12.isDrawerOpen;
12297
12323
  var iFrameName = "ada-".concat(name, "-frame");
12298
12324
  return v("iframe", {
12299
12325
  src: this.url,
@@ -12307,7 +12333,8 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
12307
12333
  className: iFrameName,
12308
12334
  "aria-expanded": isDrawerOpen,
12309
12335
  allowTransparency: true,
12310
- allowFullScreen: true
12336
+ allowFullScreen: true,
12337
+ onLoad: this.frameLoaded.bind(this)
12311
12338
  });
12312
12339
  }
12313
12340
  }], [{
@@ -12774,8 +12801,7 @@ var Container = /*#__PURE__*/function (_Component) {
12774
12801
  adaSettings = _this$props2.adaSettings,
12775
12802
  chatterInLiveChat = _this$props2.chatterInLiveChat,
12776
12803
  messageService = _this$props2.messageService,
12777
- wasCampaignShownButNowClosed = _this$props2.wasCampaignShownButNowClosed,
12778
- isChatEmpty = _this$props2.isChatEmpty;
12804
+ wasCampaignShownButNowClosed = _this$props2.wasCampaignShownButNowClosed;
12779
12805
  var adaReadyCallback = adaSettings.adaReadyCallback,
12780
12806
  toggleCallback = adaSettings.toggleCallback;
12781
12807
 
@@ -12842,10 +12868,12 @@ var Container = /*#__PURE__*/function (_Component) {
12842
12868
 
12843
12869
  if (chatChannel) {
12844
12870
  if (!wasCampaignShownButNowClosed) {
12871
+ // If the campaign has not been closed (i.e. is still visible), send the follow up response
12845
12872
  chatChannel.postMessage(SEND_GREETING, {
12846
12873
  responseId: followUpResponseId
12847
- }); // If the campaign has not been closed (i.e. is still visible), send the follow up response
12848
- } else if (isChatEmpty) {
12874
+ });
12875
+ } else {
12876
+ // otherwise, send the bot's default greeting answer (if the conversation has messages already, `chat` will ignore this message)
12849
12877
  chatChannel.postMessage(SEND_GREETING);
12850
12878
  }
12851
12879
 
@@ -13015,7 +13043,8 @@ var Container = /*#__PURE__*/function (_Component) {
13015
13043
  setState({
13016
13044
  latestCampaignKey: campaignKey,
13017
13045
  hasChatOpenedAfterProactiveMessagesShown: false,
13018
- wasCampaignShownButNowClosed: false
13046
+ wasCampaignShownButNowClosed: false,
13047
+ proactiveCampaignHadMessages: false
13019
13048
  });
13020
13049
  this.setState({
13021
13050
  // Only need to load chat for engage campaigns, not free tier (message_text) campaigns
@@ -13735,8 +13764,7 @@ function Container_mapStateToProps(storeState) {
13735
13764
  chatDimensions = storeState.chatDimensions,
13736
13765
  isIntroShown = storeState.isIntroShown,
13737
13766
  language = storeState.language,
13738
- wasCampaignShownButNowClosed = storeState.wasCampaignShownButNowClosed,
13739
- isChatEmpty = storeState.isChatEmpty;
13767
+ wasCampaignShownButNowClosed = storeState.wasCampaignShownButNowClosed;
13740
13768
  return {
13741
13769
  client: client,
13742
13770
  hideMask: hideMask,
@@ -13751,8 +13779,7 @@ function Container_mapStateToProps(storeState) {
13751
13779
  chatDimensions: chatDimensions,
13752
13780
  isIntroShown: isIntroShown,
13753
13781
  language: language,
13754
- wasCampaignShownButNowClosed: wasCampaignShownButNowClosed,
13755
- isChatEmpty: isChatEmpty
13782
+ wasCampaignShownButNowClosed: wasCampaignShownButNowClosed
13756
13783
  };
13757
13784
  }
13758
13785
 
@@ -14347,7 +14374,7 @@ window.__AdaEmbedConstructor = Embed;
14347
14374
  /* harmony export */ });
14348
14375
  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);
14349
14376
  var isProduction = "production" === "production";
14350
- var embed2Version = "12e8ab2";
14377
+ var embed2Version = "a465c37";
14351
14378
 
14352
14379
  /***/ }),
14353
14380
 
@@ -14693,9 +14720,9 @@ function _log() {
14693
14720
  service: "embed",
14694
14721
  env: "production",
14695
14722
  embedVersion: 2,
14696
- version: "1.0.77",
14723
+ version: "1.0.80",
14697
14724
  isNpm: true,
14698
- commitHash: "12e8ab2"
14725
+ commitHash: "a465c37"
14699
14726
  }))
14700
14727
  });
14701
14728
 
@@ -25636,7 +25663,7 @@ function _loadEmbed() {
25636
25663
  polyfillVersionString = "legacy";
25637
25664
  }
25638
25665
 
25639
- embedScriptSource = concat_default()(_context17 = concat_default()(_context18 = "".concat(host, "/embed/")).call(_context18, polyfillVersionString, "/client/")).call(_context17, "12e8ab2", "/index.js");
25666
+ embedScriptSource = concat_default()(_context17 = concat_default()(_context18 = "".concat(host, "/embed/")).call(_context18, polyfillVersionString, "/client/")).call(_context17, "a465c37", "/index.js");
25640
25667
  }
25641
25668
 
25642
25669
  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.77",
3
+ "version": "1.0.80",
4
4
  "description": "",
5
5
  "main": "dist/npm-entry",
6
6
  "typings": "dist/npm-entry/index.d.ts",