@ada-support/embed2 1.11.2 → 1.11.3

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.
@@ -46,6 +46,7 @@ export declare class ChatFrame extends Component<ChatFrameProps, ChatFrameState>
46
46
  documentBodyOverflow: string;
47
47
  channel?: FrameChannel;
48
48
  chatRenderTimeout?: number;
49
+ chatRenderTimeoutLater?: number;
49
50
  url: string;
50
51
  state: ChatFrameState;
51
52
  componentDidMount(): void;
@@ -15919,7 +15919,7 @@ const client = new BrowserClient({
15919
15919
  return event;
15920
15920
  },
15921
15921
  environment: "production",
15922
- release: "1.11.2-6ffecd9",
15922
+ release: "1.11.3-8cc0a0d",
15923
15923
  sampleRate: 0.25,
15924
15924
  autoSessionTracking: false,
15925
15925
  // Integrations don't seem to work with Sentry: https://github.com/getsentry/sentry-javascript/issues/2541
@@ -16464,9 +16464,9 @@ async function log(message, extra, options) {
16464
16464
  service: "embed",
16465
16465
  env: "production",
16466
16466
  embedVersion: 2,
16467
- version: "1.11.2",
16467
+ version: "1.11.3",
16468
16468
  isNpm: true,
16469
- commitHash: "6ffecd9"
16469
+ commitHash: "8cc0a0d"
16470
16470
  }))
16471
16471
  });
16472
16472
  }
@@ -16569,7 +16569,7 @@ function getEmbedURL(_ref) {
16569
16569
  } else {
16570
16570
  host = `http://${handle}.localhost:9001`;
16571
16571
  }
16572
- return `${host}/embed/${frameName}/${"6ffecd9"}/index.html`;
16572
+ return `${host}/embed/${frameName}/${"8cc0a0d"}/index.html`;
16573
16573
  }
16574
16574
  function constructQueryString(query) {
16575
16575
  return Object.keys(query).map(key => {
@@ -18928,6 +18928,7 @@ class ChatFrame extends d {
18928
18928
  _defineProperty(this, "documentBodyOverflow", "");
18929
18929
  _defineProperty(this, "channel", void 0);
18930
18930
  _defineProperty(this, "chatRenderTimeout", void 0);
18931
+ _defineProperty(this, "chatRenderTimeoutLater", void 0);
18931
18932
  _defineProperty(this, "url", this.getIframeSrc());
18932
18933
  _defineProperty(this, "state", {
18933
18934
  isMounted: false,
@@ -18960,7 +18961,7 @@ class ChatFrame extends d {
18960
18961
  log("Chat frame mount", {
18961
18962
  handle,
18962
18963
  chatUrl: this.url,
18963
- embedVersion: "6ffecd9".slice(0, 7),
18964
+ embedVersion: "8cc0a0d".slice(0, 7),
18964
18965
  embedSettings: adaSettings
18965
18966
  });
18966
18967
 
@@ -19010,6 +19011,10 @@ class ChatFrame extends d {
19010
19011
  clearTimeout(this.chatRenderTimeout);
19011
19012
  this.chatRenderTimeout = undefined;
19012
19013
  }
19014
+ if (this.chatRenderTimeoutLater) {
19015
+ clearTimeout(this.chatRenderTimeoutLater);
19016
+ this.chatRenderTimeoutLater = undefined;
19017
+ }
19013
19018
  }
19014
19019
  get darkMode() {
19015
19020
  var _client$ui_settings, _client$ui_settings$c;
@@ -19044,7 +19049,7 @@ class ChatFrame extends d {
19044
19049
  const hostPageUrlParams = new URL(window.location.href).searchParams;
19045
19050
  const smsToken = hostPageUrlParams.get("adaSMSToken");
19046
19051
  const queryParams = {
19047
- embedVersion: "6ffecd9".slice(0, 7),
19052
+ embedVersion: "8cc0a0d".slice(0, 7),
19048
19053
  greeting,
19049
19054
  language,
19050
19055
  skipGreeting,
@@ -19646,15 +19651,6 @@ class ChatFrame extends d {
19646
19651
  this.clearFallbackTimeout();
19647
19652
  this.chatRenderTimeout = window.setTimeout(() => {
19648
19653
  var _this$channel;
19649
- log(`Chat frame took over ${CHAT_FALLBACK_DELAY_MS / 1000} seconds to respond`, {
19650
- handle,
19651
- chatUrl: this.url,
19652
- embedVersion: "6ffecd9".slice(0, 7),
19653
- embedSettings: adaSettings
19654
- }, {
19655
- level: "error",
19656
- sampleRate: 1.0
19657
- });
19658
19654
  const {
19659
19655
  isDrawerOpen: drawerIsOpen
19660
19656
  } = this.props;
@@ -19662,8 +19658,10 @@ class ChatFrame extends d {
19662
19658
  // Only show fallback if drawer is STILL open and chat hasn't connected
19663
19659
  if (!((_this$channel = this.channel) !== null && _this$channel !== void 0 && _this$channel.isConnected) && drawerIsOpen) {
19664
19660
  log("Chat frame took over 5 seconds to respond", {
19665
- handle,
19666
- embedSettings: adaSettings
19661
+ handle
19662
+ }, {
19663
+ level: "error",
19664
+ sampleRate: 1.0
19667
19665
  });
19668
19666
 
19669
19667
  // SUP-1141- TODO: Remove chatFrameTimeoutCallback
@@ -19678,6 +19676,23 @@ class ChatFrame extends d {
19678
19676
  }
19679
19677
  }
19680
19678
  }, CHAT_FALLBACK_DELAY_MS);
19679
+ this.chatRenderTimeoutLater = window.setTimeout(() => {
19680
+ var _this$channel2;
19681
+ const {
19682
+ isDrawerOpen: drawerIsOpen
19683
+ } = this.props;
19684
+
19685
+ // REMOVE: ONLY FOR LOGGING PURPOSES
19686
+ // Only show fallback if drawer is STILL open and chat hasn't connected - 10 second check
19687
+ if (!((_this$channel2 = this.channel) !== null && _this$channel2 !== void 0 && _this$channel2.isConnected) && drawerIsOpen) {
19688
+ log("Chat frame took over 10 seconds to respond", {
19689
+ handle
19690
+ }, {
19691
+ level: "error",
19692
+ sampleRate: 1.0
19693
+ });
19694
+ }
19695
+ }, CHAT_FALLBACK_DELAY_MS + 5000);
19681
19696
  }
19682
19697
  render() {
19683
19698
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ada-support/embed2",
3
- "version": "1.11.2",
3
+ "version": "1.11.3",
4
4
  "description": "",
5
5
  "main": "dist/npm-entry",
6
6
  "typings": "dist/npm-entry/index-npm.d.ts",