@ada-support/embed2 1.2.10 → 1.2.13

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.
@@ -15811,7 +15811,7 @@ const client = new error_tracker_BrowserClient({
15811
15811
  },
15812
15812
 
15813
15813
  environment: "production",
15814
- release: "1.2.10-7430dc4",
15814
+ release: "1.2.13-9f1e1a1",
15815
15815
  sampleRate: 0.25,
15816
15816
  autoSessionTracking: false,
15817
15817
  // Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
@@ -16426,7 +16426,7 @@ function getEmbedURL(_ref) {
16426
16426
  host = "http://".concat(window.location.hostname, ":9001");
16427
16427
  }
16428
16428
 
16429
- return "".concat(host, "/embed/").concat(frameName, "/").concat("7430dc4", "/index.html");
16429
+ return "".concat(host, "/embed/").concat(frameName, "/").concat("9f1e1a1", "/index.html");
16430
16430
  }
16431
16431
  /**
16432
16432
  * Generate the Chat / API URL
@@ -17588,9 +17588,11 @@ let WebNotificationEvents;
17588
17588
 
17589
17589
  function handleWebNotificationClick(data) {
17590
17590
  if (data.type === WebNotificationEvents.NOTIFICATION_CLICK) {
17591
- var _window$adaEmbed;
17591
+ setTimeout(() => {
17592
+ var _window$adaEmbed;
17592
17593
 
17593
- (_window$adaEmbed = window.adaEmbed) === null || _window$adaEmbed === void 0 ? void 0 : _window$adaEmbed.handleNotification();
17594
+ return (_window$adaEmbed = window.adaEmbed) === null || _window$adaEmbed === void 0 ? void 0 : _window$adaEmbed.handleNotification();
17595
+ }, 0);
17594
17596
  }
17595
17597
  } // the Firebase client will post messages to the host page running the bot.
17596
17598
  // the messages will contain event data that embed would need to take action on
@@ -17846,6 +17848,7 @@ function _objectWithoutProperties(source, excluded) {
17846
17848
 
17847
17849
 
17848
17850
  const _excluded = ["chat", "chat_button", "features", "handle", "language", "persistence", "privacy", "rollout", "tint"];
17851
+
17849
17852
  class Client {
17850
17853
  constructor(clientResponse) {
17851
17854
  _defineProperty(this, "tint", void 0);
@@ -17912,7 +17915,7 @@ function getButtonText(client) {
17912
17915
  var _client$ui_settings, _client$ui_settings$e;
17913
17916
 
17914
17917
  const buttonTextMap = client === null || client === void 0 ? void 0 : (_client$ui_settings = client.ui_settings) === null || _client$ui_settings === void 0 ? void 0 : (_client$ui_settings$e = _client$ui_settings.embed) === null || _client$ui_settings$e === void 0 ? void 0 : _client$ui_settings$e.button_text;
17915
- const languageKey = (client === null || client === void 0 ? void 0 : client.language) || "en";
17918
+ const languageKey = get_browser_language();
17916
17919
 
17917
17920
  if (!buttonTextMap || !buttonTextMap[languageKey]) {
17918
17921
  return "Chat";
@@ -17999,9 +18002,9 @@ async function log(message, extra, options) {
17999
18002
  service: "embed",
18000
18003
  env: "production",
18001
18004
  embedVersion: 2,
18002
- version: "1.2.10",
18005
+ version: "1.2.13",
18003
18006
  isNpm: true,
18004
- commitHash: "7430dc4"
18007
+ commitHash: "9f1e1a1"
18005
18008
  }))
18006
18009
  });
18007
18010
  }
@@ -18428,7 +18431,7 @@ class ChatFrame extends d {
18428
18431
  const hostPageUrlParams = new (url_default())(window.location.href).searchParams;
18429
18432
  const smsToken = hostPageUrlParams.get("adaSMSToken");
18430
18433
  const queryParams = {
18431
- embedVersion: "7430dc4".slice(0, 7),
18434
+ embedVersion: "9f1e1a1".slice(0, 7),
18432
18435
  greeting,
18433
18436
  language,
18434
18437
  skipGreeting,
@@ -20572,7 +20575,7 @@ class Embed {
20572
20575
 
20573
20576
  }
20574
20577
 
20575
- _defineProperty(Embed, "embed2Version", "7430dc4");
20578
+ _defineProperty(Embed, "embed2Version", "9f1e1a1");
20576
20579
  ;// CONCATENATED MODULE: ./src/common/helpers/startup.ts
20577
20580
 
20578
20581
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ada-support/embed2",
3
- "version": "1.2.10",
3
+ "version": "1.2.13",
4
4
  "description": "",
5
5
  "main": "dist/npm-entry",
6
6
  "typings": "dist/npm-entry/index-npm.d.ts",