@ada-support/embed2 1.8.5 → 1.8.8

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.
@@ -2,12 +2,14 @@ export declare enum ActionCreators {
2
2
  SET_STATE_ACTION = "setState",
3
3
  TOGGLE_CHAT_ACTION = "toggleChat",
4
4
  SET_CONNECTION_STATE = "setConnectionState",
5
- SEND_UNREAD_MESSAGES_ACTION = "sendUnreadMessages"
5
+ SEND_UNREAD_MESSAGES_ACTION = "sendUnreadMessages",
6
+ FOCUS_OFF_ADA_ACTION = "focusOffAda"
6
7
  }
7
8
  export declare enum ActionTypes {
8
9
  SET_STATE_TYPE = "SET_STATE",
9
10
  TOGGLE_CHAT_TYPE = "TOGGLE_CHAT",
10
11
  SET_META_FIELDS_TYPE = "SET_META_FIELDS",
11
12
  SET_CONNECTION_STATE_TYPE = "SET_CONNECTION_STATE",
12
- INCREMENT_MESSAGE_COUNT_TYPE = "INCREMENT_MESSAGE_COUNT"
13
+ INCREMENT_MESSAGE_COUNT_TYPE = "INCREMENT_MESSAGE_COUNT",
14
+ FOCUS_OFF_ADA_TYPE = "FOCUS_OFF_ADA"
13
15
  }
@@ -14,6 +14,7 @@ export interface StoreState extends StartOptionsNoFunction {
14
14
  zdMessagingExternalUserId?: string | null;
15
15
  zdMessagingChatterCreated?: string | null;
16
16
  drawerHasBeenOpened: boolean;
17
+ focusIsOnAda: boolean;
17
18
  isIntroShown: boolean;
18
19
  isButtonShown: boolean;
19
20
  introDimensions: {
@@ -13949,7 +13949,7 @@ const client = new BrowserClient({
13949
13949
  return event;
13950
13950
  },
13951
13951
  environment: "production",
13952
- release: "1.8.5-7c0137e",
13952
+ release: "1.8.8-b6ee595",
13953
13953
  sampleRate: 0.25,
13954
13954
  autoSessionTracking: false,
13955
13955
  // Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
@@ -14386,6 +14386,7 @@ let ActionCreators = /*#__PURE__*/function (ActionCreators) {
14386
14386
  ActionCreators["TOGGLE_CHAT_ACTION"] = "toggleChat";
14387
14387
  ActionCreators["SET_CONNECTION_STATE"] = "setConnectionState";
14388
14388
  ActionCreators["SEND_UNREAD_MESSAGES_ACTION"] = "sendUnreadMessages";
14389
+ ActionCreators["FOCUS_OFF_ADA_ACTION"] = "focusOffAda";
14389
14390
  return ActionCreators;
14390
14391
  }({});
14391
14392
  let ActionTypes = /*#__PURE__*/function (ActionTypes) {
@@ -14394,6 +14395,7 @@ let ActionTypes = /*#__PURE__*/function (ActionTypes) {
14394
14395
  ActionTypes["SET_META_FIELDS_TYPE"] = "SET_META_FIELDS";
14395
14396
  ActionTypes["SET_CONNECTION_STATE_TYPE"] = "SET_CONNECTION_STATE";
14396
14397
  ActionTypes["INCREMENT_MESSAGE_COUNT_TYPE"] = "INCREMENT_MESSAGE_COUNT";
14398
+ ActionTypes["FOCUS_OFF_ADA_TYPE"] = "FOCUS_OFF_ADA";
14397
14399
  return ActionTypes;
14398
14400
  }({});
14399
14401
  ;// CONCATENATED MODULE: ./src/client/helpers/event-subscriptions/index.ts
@@ -14524,7 +14526,7 @@ function getEmbedURL(_ref) {
14524
14526
  } else {
14525
14527
  host = `http://${handle}.localhost:9001`;
14526
14528
  }
14527
- return `${host}/embed/${frameName}/${"7c0137e"}/index.html`;
14529
+ return `${host}/embed/${frameName}/${"b6ee595"}/index.html`;
14528
14530
  }
14529
14531
  function constructQueryString(query) {
14530
14532
  return Object.keys(query).map(key => {
@@ -14711,6 +14713,15 @@ const actions = {
14711
14713
  type: ActionTypes.SET_CONNECTION_STATE_TYPE,
14712
14714
  payload: payload
14713
14715
  };
14716
+ },
14717
+ focusOffAda: _ref5 => {
14718
+ let {
14719
+ payload
14720
+ } = _ref5;
14721
+ return {
14722
+ type: ActionTypes.FOCUS_OFF_ADA_TYPE,
14723
+ payload: payload
14724
+ };
14714
14725
  }
14715
14726
  };
14716
14727
  // EXTERNAL MODULE: ./node_modules/@ada-support/web-storage/dist/index.js
@@ -14740,6 +14751,7 @@ const mutations = (state, action) => {
14740
14751
  isDrawerOpen: !state.isDrawerOpen,
14741
14752
  isIntroShown: false,
14742
14753
  drawerHasBeenOpened: true,
14754
+ focusIsOnAda: true,
14743
14755
  unreadMessageCount: 0,
14744
14756
  hasChatOpenedAfterProactiveMessagesShown
14745
14757
  });
@@ -14779,6 +14791,12 @@ const mutations = (state, action) => {
14779
14791
  appConnectionState
14780
14792
  });
14781
14793
  }
14794
+ case ActionTypes.FOCUS_OFF_ADA_TYPE:
14795
+ {
14796
+ return mutations_objectSpread(mutations_objectSpread({}, state), {}, {
14797
+ focusIsOnAda: false
14798
+ });
14799
+ }
14782
14800
  default:
14783
14801
  return state;
14784
14802
  }
@@ -15016,6 +15034,7 @@ const getInitialState = adaSettings => ({
15016
15034
  parentElement: undefined,
15017
15035
  isDrawerOpen: false,
15018
15036
  drawerHasBeenOpened: false,
15037
+ focusIsOnAda: false,
15019
15038
  enabledLanguages: ["en"],
15020
15039
  client: undefined,
15021
15040
  isIntroShown: false,
@@ -15702,9 +15721,9 @@ async function log(message, extra, options) {
15702
15721
  service: "embed",
15703
15722
  env: "production",
15704
15723
  embedVersion: 2,
15705
- version: "1.8.5",
15724
+ version: "1.8.8",
15706
15725
  isNpm: true,
15707
- commitHash: "7c0137e"
15726
+ commitHash: "b6ee595"
15708
15727
  }))
15709
15728
  });
15710
15729
  }
@@ -16880,7 +16899,7 @@ class ChatFrame extends d {
16880
16899
  const hostPageUrlParams = new URL(window.location.href).searchParams;
16881
16900
  const smsToken = hostPageUrlParams.get("adaSMSToken");
16882
16901
  const queryParams = {
16883
- embedVersion: "7c0137e".slice(0, 7),
16902
+ embedVersion: "b6ee595".slice(0, 7),
16884
16903
  greeting,
16885
16904
  language,
16886
16905
  skipGreeting,
@@ -17939,7 +17958,7 @@ class Container extends d {
17939
17958
  // This can be used by the AI manager to customize the greeting
17940
17959
  setGlobalState({
17941
17960
  metaFields: {
17942
- proactive_conversation: true
17961
+ proactive_conversation: recentProactiveConversationConfig.key
17943
17962
  }
17944
17963
  });
17945
17964
  chatChannel.postMessage(INJECT_PROACTIVE_CONVERSATION, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ada-support/embed2",
3
- "version": "1.8.5",
3
+ "version": "1.8.8",
4
4
  "description": "",
5
5
  "main": "dist/npm-entry",
6
6
  "typings": "dist/npm-entry/index-npm.d.ts",
@@ -77,8 +77,8 @@
77
77
  "eslint-plugin-compat": "^4.0.2",
78
78
  "eslint-plugin-cypress": "^2.12.1",
79
79
  "eslint-plugin-sonarjs": "^0.11.0",
80
- "husky": "^7.0.0",
81
80
  "html-webpack-plugin": "^5.5.0",
81
+ "husky": "^7.0.0",
82
82
  "jest": "^27.5.1",
83
83
  "jest-localstorage-mock": "^2.4.0",
84
84
  "lint-staged": "^11.2.3",