@ada-support/embed2 1.0.42 → 1.0.43

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.
@@ -1,7 +1,7 @@
1
- import MessageService from "client/lib/message-service";
2
- import { EvaluateCampaignParams } from "common/types";
3
- import { StartOptions } from "common/types/store-state";
4
- import { MarketingCampaign } from "./types";
1
+ import type { MessageService } from "client/lib/message-service";
2
+ import type { EvaluateCampaignParams } from "common/types";
3
+ import type { StartOptions } from "common/types/store-state";
4
+ import type { MarketingCampaign } from "./types";
5
5
  interface TriggerCampaignImplParams {
6
6
  adaSettings: StartOptions;
7
7
  chatterToken: string;
@@ -1,5 +1,5 @@
1
1
  import { h } from "preact";
2
- import { StartOptions } from "common/types/store-state";
2
+ import type { StartOptions } from "common/types/store-state";
3
3
  interface OwnProps {
4
4
  frameWidth: number;
5
5
  adaSettings: StartOptions;
@@ -1,8 +1,8 @@
1
1
  import { h } from "preact";
2
- import MessageService from "client/lib/message-service";
2
+ import type { MessageService } from "client/lib/message-service";
3
3
  import type { StoreProxy } from "client/lib/store-proxy";
4
- import { Module } from "common/types/modules";
5
- import { StartOptions } from "common/types/store-state";
4
+ import type { Module } from "common/types/modules";
5
+ import type { StartOptions } from "common/types/store-state";
6
6
  interface OwnProps {
7
7
  name: Module;
8
8
  adaSettings: StartOptions;
@@ -1,7 +1,7 @@
1
1
  import { h } from "preact";
2
- import MessageService from "client/lib/message-service";
2
+ import type { MessageService } from "client/lib/message-service";
3
3
  import type { StoreProxy } from "client/lib/store-proxy";
4
- import { StartOptions } from "common/types/store-state";
4
+ import type { StartOptions } from "common/types/store-state";
5
5
  interface OwnProps {
6
6
  store: StoreProxy;
7
7
  messageService: MessageService;
@@ -1,7 +1,7 @@
1
1
  import { h } from "preact";
2
- import MessageService from "client/lib/message-service";
2
+ import type { MessageService } from "client/lib/message-service";
3
3
  import type { StoreProxy } from "client/lib/store-proxy";
4
- import { Module } from "common/types/modules";
4
+ import type { Module } from "common/types/modules";
5
5
  interface OwnProps {
6
6
  name: Module;
7
7
  styles: string;
@@ -1,16 +1,16 @@
1
- import { EventSubscriptionCallback } from "client/helpers/event-subscriptions";
2
- import MessageService from "client/lib/message-service";
1
+ import type { EventSubscriptionCallback } from "client/helpers/event-subscriptions";
2
+ import { MessageService } from "client/lib/message-service";
3
3
  import { StoreProxy } from "client/lib/store-proxy";
4
4
  import "client/lib/error-tracker";
5
- import Client from "common/models/client";
6
- import { EvaluateCampaignParams, ResetParams, WindowInfo } from "common/types";
7
- import { MetaFieldPayload } from "common/types/store";
8
- import { StartOptions } from "common/types/store-state";
9
- import { CE } from "./lib/ce";
5
+ import type Client from "common/models/client";
6
+ import type { EvaluateCampaignParams, ResetParams, WindowInfo } from "common/types";
7
+ import type { MetaFieldPayload } from "common/types/store";
8
+ import type { StartOptions } from "common/types/store-state";
9
+ import type { CustomEventChannel } from "./lib/ce";
10
10
  export declare class Embed {
11
11
  client: Client;
12
12
  storage: Storage;
13
- localChannel: CE;
13
+ localChannel: CustomEventChannel;
14
14
  store: StoreProxy;
15
15
  messageService: MessageService;
16
16
  buttonWasMoved: boolean;
@@ -1,10 +1,11 @@
1
- import { FetchEventStatusType } from "common/constants/events";
2
- import { Channel, EmbedEvent, PayloadByEvent } from "common/lib/channel";
3
- import { AdaCustomEvent, Refhandler } from "common/types/events";
1
+ import type { FetchEventStatusType } from "common/constants/events";
2
+ import type { EmbedEvent, PayloadByEvent } from "common/lib/channel";
3
+ import { Channel } from "common/lib/channel";
4
+ import type { AdaCustomEvent, Refhandler } from "common/types/events";
4
5
  /**
5
6
  * Custom Event Channel
6
7
  */
7
- export declare class CE extends Channel {
8
+ export declare class CustomEventChannel extends Channel {
8
9
  protected trackedListeners: Set<Refhandler>;
9
10
  protected trackedTimeouts: Set<number>;
10
11
  protected eventType: string;
@@ -1,11 +1,11 @@
1
- import FC from "common/lib/fc";
2
- import { Channels } from "common/types/channels";
3
- import { Module } from "common/types/modules";
4
- import { CE } from "./ce";
5
- export default class MessageService {
1
+ import { FrameChannel } from "common/lib/fc";
2
+ import type { Channels } from "common/types/channels";
3
+ import type { Module } from "common/types/modules";
4
+ import { CustomEventChannel } from "./ce";
5
+ export declare class MessageService {
6
6
  channels: Channels;
7
- registerFrameChannel(name: Module, targetWindow: Window, targetOrigin?: string): FC;
7
+ registerFrameChannel(name: Module, targetWindow: Window, targetOrigin?: string): FrameChannel;
8
8
  unregisterChannel(name: keyof Channels): void;
9
- getChannel(name: keyof Channels): FC | CE | null;
10
- getAllChannels(): (CE | FC)[];
9
+ getChannel(name: keyof Channels): FrameChannel | CustomEventChannel | null;
10
+ getAllChannels(): (FrameChannel | CustomEventChannel)[];
11
11
  }
@@ -1,11 +1,11 @@
1
- import MessageService from "client/lib/message-service";
1
+ import type { MessageService } from "client/lib/message-service";
2
2
  import { Store } from "client/store";
3
- import { Channels } from "common/types/channels";
4
- import { StoreProxyInterface } from "common/types/store";
5
- import { StoreState } from "common/types/store-state";
6
- import { CE } from "./ce";
3
+ import type { Channels } from "common/types/channels";
4
+ import type { StoreProxyInterface } from "common/types/store";
5
+ import type { StoreState } from "common/types/store-state";
6
+ import type { CustomEventChannel } from "./ce";
7
7
  export declare class StoreProxy implements StoreProxyInterface {
8
- localChannel: CE;
8
+ localChannel: CustomEventChannel;
9
9
  store: Store;
10
10
  registeredCallbacks: ((payload: StoreState) => void)[];
11
11
  constructor(messageService: MessageService);
@@ -1,6 +1,6 @@
1
- import MessageService from "client/lib/message-service";
2
- import { Channels } from "common/types/channels";
3
- import { StoreState } from "common/types/store-state";
1
+ import type { MessageService } from "client/lib/message-service";
2
+ import type { Channels } from "common/types/channels";
3
+ import type { StoreState } from "common/types/store-state";
4
4
  export declare class Store {
5
5
  state: StoreState;
6
6
  defaultState: StoreState;
@@ -1,3 +1,3 @@
1
- import { StoreState } from "common/types/store-state";
1
+ import type { StoreState } from "common/types/store-state";
2
2
  declare const state: StoreState;
3
3
  export default state;
@@ -1,13 +1,14 @@
1
- import { FetchEventStatusType } from "common/constants/events";
2
- import { Channel, EmbedEvent, PayloadByEvent } from "common/lib/channel";
3
- import { Refhandler } from "common/types/events";
1
+ import type { FetchEventStatusType } from "common/constants/events";
2
+ import type { EmbedEvent, PayloadByEvent } from "common/lib/channel";
3
+ import { Channel } from "common/lib/channel";
4
+ import type { Refhandler } from "common/types/events";
4
5
  /**
5
6
  * Frame Channel: Used for postMessage communication between iFrames.
6
7
  * NOTE: iFrames must have the same domain - when postMessages are sent between
7
8
  * iframes they use the eventListener below to check if the target domain matches
8
9
  * the domain from where the postMessage originated from.
9
10
  */
10
- export default class FC extends Channel {
11
+ export declare class FrameChannel extends Channel {
11
12
  protected trackedListeners: Set<Refhandler>;
12
13
  protected trackedTimeouts: Set<number>;
13
14
  protected eventType: string;
@@ -1,10 +1,10 @@
1
- import { CE } from "client/lib/ce";
2
- import FC from "common/lib/fc";
3
- import { PartialRecord } from "common/types/helpers";
4
- import { Module } from "common/types/modules";
5
- declare type FrameChannels = PartialRecord<Module, FC>;
1
+ import type { CustomEventChannel } from "client/lib/ce";
2
+ import type { FrameChannel } from "common/lib/fc";
3
+ import type { PartialRecord } from "common/types/helpers";
4
+ import type { Module } from "common/types/modules";
5
+ declare type FrameChannels = PartialRecord<Module, FrameChannel>;
6
6
  interface LocalChannel {
7
- local: CE;
7
+ local: CustomEventChannel;
8
8
  }
9
9
  export declare type Channels = FrameChannels & LocalChannel;
10
10
  export {};
@@ -1,4 +1,3 @@
1
- export declare type ValueOf<T> = T[keyof T];
2
1
  export declare type PartialRecord<K extends keyof any, T> = {
3
2
  [P in K]?: T;
4
3
  };
@@ -1,7 +1,6 @@
1
- import { ConnectionState } from "common/constants/events";
2
- import Client from "common/models/client";
3
- import { ChatterEventPayload } from "common/types/events";
4
- import { ValueOf } from "common/types/helpers";
1
+ import type { ConnectionState } from "common/constants/events";
2
+ import type Client from "common/models/client";
3
+ import type { ChatterEventPayload } from "common/types/events";
5
4
  export interface StartOptions {
6
5
  handle?: string;
7
6
  lazy?: boolean;
@@ -41,7 +40,7 @@ export interface StartOptions {
41
40
  export interface StoreState extends StartOptionsNoFunction {
42
41
  chatterCreated?: string | null;
43
42
  chatterToken?: string | null;
44
- client: Client;
43
+ client?: Client;
45
44
  isDrawerOpen: boolean;
46
45
  zdSessionId?: string | null;
47
46
  zdPreviousTags?: string | null;
@@ -52,7 +51,7 @@ export interface StoreState extends StartOptionsNoFunction {
52
51
  height?: number;
53
52
  width?: number;
54
53
  };
55
- initialURL: string;
54
+ initialURL?: string;
56
55
  wasIntroShown: boolean;
57
56
  unreadMessageCount: number;
58
57
  embedStyles?: string;
@@ -60,14 +59,14 @@ export interface StoreState extends StartOptionsNoFunction {
60
59
  [key: string]: ConnectionState;
61
60
  };
62
61
  appConnectionState: ConnectionState;
63
- notificationsPermission: NotificationPermission;
62
+ notificationsPermission?: NotificationPermission;
64
63
  browserHasNotificationSupport: boolean;
65
- chatDimensions: {
64
+ chatDimensions?: {
66
65
  height?: number;
67
66
  width?: number;
68
67
  };
69
68
  isChatWebsocketConnected: boolean;
70
- latestCampaignKey: string;
69
+ latestCampaignKey?: string;
71
70
  hasChatOpenedAfterProactiveMessagesShown: boolean;
72
71
  chatterInLiveChat: boolean;
73
72
  language?: string;
@@ -96,4 +95,3 @@ export interface StartOptionsNoFunction {
96
95
  };
97
96
  preload?: boolean;
98
97
  }
99
- export declare type ResponsePayload = Promise<StoreState | ValueOf<StoreState>>;
@@ -8500,7 +8500,7 @@ var client = new error_tracker_BrowserClient({
8500
8500
  return event;
8501
8501
  },
8502
8502
  environment: "production",
8503
- release: "42a0dad879a0093ea3dae3ce4fbc48176784fa90",
8503
+ release: "5094d37a41a17d892252465cfc3fc353b6f1da1d",
8504
8504
  sampleRate: 0.25,
8505
8505
  autoSessionTracking: false,
8506
8506
  // Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
@@ -8796,15 +8796,15 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !(c
8796
8796
  * iframes they use the eventListener below to check if the target domain matches
8797
8797
  * the domain from where the postMessage originated from.
8798
8798
  */
8799
- var FC = /*#__PURE__*/function (_Channel) {
8800
- (0,inherits/* default */.Z)(FC, _Channel);
8799
+ var FrameChannel = /*#__PURE__*/function (_Channel) {
8800
+ (0,inherits/* default */.Z)(FrameChannel, _Channel);
8801
8801
 
8802
- var _super = _createSuper(FC);
8802
+ var _super = _createSuper(FrameChannel);
8803
8803
 
8804
- function FC(name, targetWindow, targetOrigin) {
8804
+ function FrameChannel(name, targetWindow, targetOrigin) {
8805
8805
  var _this;
8806
8806
 
8807
- (0,classCallCheck/* default */.Z)(this, FC);
8807
+ (0,classCallCheck/* default */.Z)(this, FrameChannel);
8808
8808
 
8809
8809
  _this = _super.call(this);
8810
8810
 
@@ -8830,7 +8830,7 @@ var FC = /*#__PURE__*/function (_Channel) {
8830
8830
  return _this;
8831
8831
  }
8832
8832
 
8833
- _createClass(FC, [{
8833
+ _createClass(FrameChannel, [{
8834
8834
  key: "postMessage",
8835
8835
  value: function postMessage(eventName, data, id, status) {
8836
8836
  this.targetWindow.postMessage(this.constructObjectToSend(eventName, data, id, status), this.targetOrigin);
@@ -8850,7 +8850,7 @@ var FC = /*#__PURE__*/function (_Channel) {
8850
8850
  }
8851
8851
 
8852
8852
  try {
8853
- if (FC.isMessageEvent(event)) {
8853
+ if (FrameChannel.isMessageEvent(event)) {
8854
8854
  parsedData = JSON.parse(event.data);
8855
8855
  }
8856
8856
  } catch (_unused) {
@@ -8907,10 +8907,8 @@ var FC = /*#__PURE__*/function (_Channel) {
8907
8907
  }
8908
8908
  }]);
8909
8909
 
8910
- return FC;
8910
+ return FrameChannel;
8911
8911
  }(Channel);
8912
-
8913
-
8914
8912
  ;// CONCATENATED MODULE: ./src/client/helpers/events/index.ts
8915
8913
  /**
8916
8914
  * Older browsers like IE11 cannot use Event and CustomEvent constructors. These
@@ -8976,17 +8974,17 @@ var ADA_CUSTOM_EVENT = "ada-custom-message";
8976
8974
  * Custom Event Channel
8977
8975
  */
8978
8976
 
8979
- var CE = /*#__PURE__*/function (_Channel) {
8980
- (0,inherits/* default */.Z)(CE, _Channel);
8977
+ var CustomEventChannel = /*#__PURE__*/function (_Channel) {
8978
+ (0,inherits/* default */.Z)(CustomEventChannel, _Channel);
8981
8979
 
8982
- var _super = ce_createSuper(CE);
8980
+ var _super = ce_createSuper(CustomEventChannel);
8983
8981
 
8984
- function CE() {
8982
+ function CustomEventChannel() {
8985
8983
  var _context;
8986
8984
 
8987
8985
  var _this;
8988
8986
 
8989
- (0,classCallCheck/* default */.Z)(this, CE);
8987
+ (0,classCallCheck/* default */.Z)(this, CustomEventChannel);
8990
8988
 
8991
8989
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
8992
8990
  args[_key] = arguments[_key];
@@ -9005,9 +9003,9 @@ var CE = /*#__PURE__*/function (_Channel) {
9005
9003
  return _this;
9006
9004
  }
9007
9005
 
9008
- _createClass(CE, [{
9006
+ _createClass(CustomEventChannel, [{
9009
9007
  key: "postMessage",
9010
- value: // We want CE to have the same interface as FC
9008
+ value: // We want CustomEventChannel to have the same interface as FrameChannel
9011
9009
  function postMessage(eventName, data, id, status) {
9012
9010
  var customEvent = createNewCustomEvent(this.eventType, this.constructObjectToSend(eventName, data, id, status));
9013
9011
  window.dispatchEvent(customEvent);
@@ -9044,7 +9042,7 @@ var CE = /*#__PURE__*/function (_Channel) {
9044
9042
  }
9045
9043
  }]);
9046
9044
 
9047
- return CE;
9045
+ return CustomEventChannel;
9048
9046
  }(Channel);
9049
9047
  ;// CONCATENATED MODULE: ./src/client/lib/message-service.ts
9050
9048
 
@@ -9054,20 +9052,19 @@ var CE = /*#__PURE__*/function (_Channel) {
9054
9052
 
9055
9053
 
9056
9054
 
9057
-
9058
9055
  var MessageService = /*#__PURE__*/function () {
9059
9056
  function MessageService() {
9060
9057
  (0,classCallCheck/* default */.Z)(this, MessageService);
9061
9058
 
9062
9059
  (0,defineProperty/* default */.Z)(this, "channels", {
9063
- local: new CE()
9060
+ local: new CustomEventChannel()
9064
9061
  });
9065
9062
  }
9066
9063
 
9067
9064
  _createClass(MessageService, [{
9068
9065
  key: "registerFrameChannel",
9069
9066
  value: function registerFrameChannel(name, targetWindow, targetOrigin) {
9070
- var frameChannel = new FC(name, targetWindow, targetOrigin);
9067
+ var frameChannel = new FrameChannel(name, targetWindow, targetOrigin);
9071
9068
  this.channels[name] = frameChannel;
9072
9069
  return frameChannel;
9073
9070
  }
@@ -9104,8 +9101,6 @@ var MessageService = /*#__PURE__*/function () {
9104
9101
 
9105
9102
  return MessageService;
9106
9103
  }();
9107
-
9108
-
9109
9104
  // EXTERNAL MODULE: ./node_modules/json-stable-stringify/index.js
9110
9105
  var json_stable_stringify = __webpack_require__(7266);
9111
9106
  var json_stable_stringify_default = /*#__PURE__*/__webpack_require__.n(json_stable_stringify);
@@ -9192,7 +9187,7 @@ function getEmbedURL(_ref) {
9192
9187
  polyfillVersionString = "legacy";
9193
9188
  }
9194
9189
 
9195
- return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "42a0dad", "/index.html");
9190
+ return concat_default()(_context5 = concat_default()(_context6 = concat_default()(_context7 = "".concat(host, "/embed/")).call(_context7, polyfillVersionString, "/")).call(_context6, frameName, "/")).call(_context5, "5094d37", "/index.html");
9196
9191
  }
9197
9192
  /**
9198
9193
  * Generate the Chat / API URL
@@ -11460,7 +11455,7 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
11460
11455
  closeTransitionTime = _this$state.closeTransitionTime;
11461
11456
  var isShown = isDrawerOpen && isMounted;
11462
11457
  var backgroundColor = this.darkMode ? "#121212" : "#fff";
11463
- var borderRadius = (client === null || client === void 0 ? void 0 : (_client$ui_settings2 = client.ui_settings) === null || _client$ui_settings2 === void 0 ? void 0 : _client$ui_settings2.chat.style) === "rectangular" ? "8px" : "16px";
11458
+ var borderRadius = ((_client$ui_settings2 = client.ui_settings) === null || _client$ui_settings2 === void 0 ? void 0 : _client$ui_settings2.chat.style) === "rectangular" ? "8px" : "16px";
11464
11459
  var WINDOW_HEIGHT = 725;
11465
11460
  var TEST_BOT_NAV_HEIGHT = 48;
11466
11461
  var isTestBot = client.features.embed_test_bot && testMode;
@@ -11484,7 +11479,7 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
11484
11479
  }, {
11485
11480
  key: "visibleProactiveStyles",
11486
11481
  get: function get() {
11487
- var _client$ui_settings3, _client$ui_settings3$, _client$chat_button, _context15, _context16, _context17;
11482
+ var _client$ui_settings3, _client$ui_settings3$, _context15, _context16, _context17;
11488
11483
 
11489
11484
  var _this$props5 = this.props,
11490
11485
  chatDimensions = _this$props5.chatDimensions,
@@ -11494,7 +11489,7 @@ var ChatFrame = /*#__PURE__*/function (_Component) {
11494
11489
 
11495
11490
  var delta = 3;
11496
11491
  var TEXT_BUTTON_HEIGHT = 44;
11497
- var bottomOffset = (client === null || client === void 0 ? void 0 : (_client$ui_settings3 = client.ui_settings) === null || _client$ui_settings3 === void 0 ? void 0 : (_client$ui_settings3$ = _client$ui_settings3.embed) === null || _client$ui_settings3$ === void 0 ? void 0 : _client$ui_settings3$.style) === "text" ? TEXT_BUTTON_HEIGHT - delta : (client === null || client === void 0 ? void 0 : (_client$chat_button = client.chat_button) === null || _client$chat_button === void 0 ? void 0 : _client$chat_button.size) - delta;
11492
+ var bottomOffset = (client === null || client === void 0 ? void 0 : (_client$ui_settings3 = client.ui_settings) === null || _client$ui_settings3 === void 0 ? void 0 : (_client$ui_settings3$ = _client$ui_settings3.embed) === null || _client$ui_settings3$ === void 0 ? void 0 : _client$ui_settings3$.style) === "text" ? TEXT_BUTTON_HEIGHT - delta : (client === null || client === void 0 ? void 0 : client.chat_button.size) - delta;
11498
11493
  return concat_default()(_context15 = concat_default()(_context16 = concat_default()(_context17 = "\n box-shadow: none;\n background: none;\n height: ".concat(chatDimensions === null || chatDimensions === void 0 ? void 0 : chatDimensions.height, "px !important;\n width: ")).call(_context17, chatDimensions === null || chatDimensions === void 0 ? void 0 : chatDimensions.width, "px !important;\n ")).call(_context16, getAlignment(adaSettings), ": 0;\n bottom: ")).call(_context15, bottomOffset, "px;\n z-index: 9999;\n ");
11499
11494
  }
11500
11495
  }, {
@@ -12007,7 +12002,7 @@ var IntroFrame = /*#__PURE__*/function (_Component) {
12007
12002
  var introPositionRight = INTRO_BUTTON_PADDING + buttonSize;
12008
12003
  var stylesForHiding = "\n visibility: \"hidden\";\n top: -9999px !important;\n left: -9999px !important;\n ";
12009
12004
 
12010
- var styles = concat_default()(_context = concat_default()(_context2 = concat_default()(_context3 = concat_default()(_context4 = concat_default()(_context5 = "\n position: fixed;\n ".concat(getAlignment(adaSettings), ": ")).call(_context5, introPositionRight, "px;\n bottom: 8px;\n z-index: 10000;\n max-height: 300px;\n max-width: 250px;\n opacity: ")).call(_context4, this.isShown ? "1" : "0", ";\n height: ")).call(_context3, introDimensions === null || introDimensions === void 0 ? void 0 : introDimensions.height, "px;\n width: ")).call(_context2, introDimensions === null || introDimensions === void 0 ? void 0 : introDimensions.width, "px;\n\n ")).call(_context, Boolean(client === null || client === void 0 ? void 0 : client.features.chat_ui_v2) && concat_default()(_context6 = "\n max-height: auto;\n max-width: 350px;\n z-index: 9999;\n ".concat(getAlignment(adaSettings), ": 0;\n bottom: ")).call(_context6, buttonSize - 20, "px;\n "), "\n ");
12005
+ var styles = concat_default()(_context = concat_default()(_context2 = concat_default()(_context3 = concat_default()(_context4 = concat_default()(_context5 = "\n position: fixed;\n ".concat(getAlignment(adaSettings), ": ")).call(_context5, introPositionRight, "px;\n bottom: 8px;\n z-index: 10000;\n max-height: 300px;\n max-width: 250px;\n opacity: ")).call(_context4, this.isShown ? "1" : "0", ";\n height: ")).call(_context3, introDimensions.height, "px;\n width: ")).call(_context2, introDimensions.width, "px;\n\n ")).call(_context, Boolean(client === null || client === void 0 ? void 0 : client.features.chat_ui_v2) && concat_default()(_context6 = "\n max-height: auto;\n max-width: 350px;\n z-index: 9999;\n ".concat(getAlignment(adaSettings), ": 0;\n bottom: ")).call(_context6, buttonSize - 20, "px;\n "), "\n ");
12011
12006
 
12012
12007
  if (!this.isShown) {
12013
12008
  return styles + stylesForHiding;
@@ -12452,7 +12447,7 @@ var Container = /*#__PURE__*/function (_Component) {
12452
12447
  */
12453
12448
 
12454
12449
 
12455
- if (chatterToken && prevProps.chatterToken !== chatterToken && client !== null && client !== void 0 && client.business_events && client !== null && client !== void 0 && client.features.afm_business_events) {
12450
+ if (chatterToken && prevProps.chatterToken !== chatterToken && client !== null && client !== void 0 && client.business_events && client.features.afm_business_events) {
12456
12451
  this.evaluateBusinessEventConditions();
12457
12452
  }
12458
12453
  }
@@ -13892,7 +13887,7 @@ window.__AdaEmbedConstructor = Embed;
13892
13887
  /* harmony export */ });
13893
13888
  var isModern = new RegExp("((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(14|(1[5-9]|[2-9]\\d|\\d{3,}))[_.]\\d+(?:[_.]\\d+)?)|((Chromium|Chrome)\\/(92|(9[3-9]|\\d{3,}))\\.\\d+(?:\\.\\d+)?)|(Version\\/(14|(1[5-9]|[2-9]\\d|\\d{3,}))\\.\\d+(?:\\.\\d+)? Safari\\/)|(Firefox\\/(91|(9[2-9]|\\d{3,}))\\.\\d+\\.\\d+)|(Firefox\\/(91|(9[2-9]|\\d{3,}))\\.\\d+(pre|[ab]\\d+[a-z]*)?)").test(navigator.userAgent);
13894
13889
  var isProduction = "production" === "production";
13895
- var embed2Version = "42a0dad";
13890
+ var embed2Version = "5094d37";
13896
13891
 
13897
13892
  /***/ }),
13898
13893
 
@@ -23676,7 +23671,7 @@ function _loadEmbed() {
23676
23671
  polyfillVersionString = "legacy";
23677
23672
  }
23678
23673
 
23679
- embedScriptSource = concat_default()(_context16 = concat_default()(_context17 = "".concat(host, "/embed/")).call(_context17, polyfillVersionString, "/client/")).call(_context16, "42a0dad", "/index.js");
23674
+ embedScriptSource = concat_default()(_context16 = concat_default()(_context17 = "".concat(host, "/embed/")).call(_context17, polyfillVersionString, "/client/")).call(_context16, "5094d37", "/index.js");
23680
23675
  }
23681
23676
 
23682
23677
  clientScriptExists = Boolean( true || // The client script is bundled with npm module
@@ -23803,10 +23798,10 @@ function createEmbedObject() {
23803
23798
  handle: adaSettings.handle,
23804
23799
  embedVersion: 2,
23805
23800
  embedSettings: adaSettings,
23806
- version: "1.0.42",
23801
+ version: "1.0.43",
23807
23802
  isNpm: true,
23808
23803
  hostPage: window.location.href,
23809
- commitHash: "42a0dad"
23804
+ commitHash: "5094d37"
23810
23805
  }, {
23811
23806
  sampleRate: 0.01 // 1% of logs will go through
23812
23807
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ada-support/embed2",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
4
4
  "description": "",
5
5
  "main": "dist/npm-entry",
6
6
  "typings": "dist/npm-entry/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "build:modern": "NODE_ENV=production BROWSERSLIST_ENV=modern npx webpack --config webpack.prod.ts",
11
11
  "build:npm-types": "tsc --project tsconfig.npm.json --declaration --outDir dist/npm-entry --emitDeclarationOnly --allowJs false --checkJs false",
12
12
  "build:npm": "./npm-build.sh",
13
- "lint": "tsc --noEmit --strict false && ./node_modules/.bin/eslint --report-unused-disable-directives --ext .js,.jsx,.ts,.tsx . --max-warnings 26",
13
+ "lint": "tsc --noEmit --strict false && ./node_modules/.bin/eslint --report-unused-disable-directives --ext .js,.jsx,.ts,.tsx . --max-warnings 129",
14
14
  "lint:fix": "yarn lint --fix",
15
15
  "deploy-legacy": "TS_NODE_PROJECT=wp.tsconfig.json NODE_ENV=production BROWSERSLIST_ENV=legacy npx webpack --config webpack.prod.ts",
16
16
  "deploy-modern": "TS_NODE_PROJECT=wp.tsconfig.json NODE_ENV=production BROWSERSLIST_ENV=modern npx webpack --config webpack.prod.ts",
@@ -53,7 +53,7 @@
53
53
  "author": "",
54
54
  "license": "ISC",
55
55
  "devDependencies": {
56
- "@ada-support/eslint-config-ada": "^1.1.1",
56
+ "@ada-support/eslint-config-ada": "^1.1.5",
57
57
  "@babel/core": "^7.14.8",
58
58
  "@babel/plugin-proposal-class-properties": "^7.14.5",
59
59
  "@babel/plugin-proposal-numeric-separator": "^7.14.5",
@@ -76,6 +76,7 @@
76
76
  "cypress": "^9.1.0",
77
77
  "enzyme": "^3.11.0",
78
78
  "enzyme-adapter-preact-pure": "^2.2.0",
79
+ "eslint": "^8.6.0",
79
80
  "eslint-plugin-chai-friendly": "^0.7.2",
80
81
  "eslint-plugin-compat": "^3.13.0",
81
82
  "eslint-plugin-cypress": "^2.11.3",