@saasquatch/squatch-js 2.6.1-0 → 2.6.1

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.
package/CHANGELOG.md CHANGED
@@ -7,8 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- - Added custom web-components `squatch-embed` and `squatch-popup` for easier widget rendering.
11
- - Support for additional namespacing of squatchjs
10
+ ## [2.6.1] - 2023-09-01
11
+
12
+ - Fix customElementRegistry error that occurs when multiple instances of squatchjs are loaded on the same page.
12
13
 
13
14
  ## [2.6.0] - 2023-08-23
14
15
 
@@ -348,7 +349,8 @@ No release notes.
348
349
 
349
350
  No release notes.
350
351
 
351
- [unreleased]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.6.0...HEAD
352
+ [unreleased]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.6.1...HEAD
353
+ [2.6.1]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.5.0...@saasquatch%2Fsquatch-js@2.6.1
352
354
  [2.6.0]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.5.0...@saasquatch%2Fsquatch-js@2.6.0
353
355
  [2.5.0]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.4.1...@saasquatch%2Fsquatch-js@2.5.0
354
356
  [2.4.3]: https://github.com/saasquatch/squatch-js/compare/@saasquatch%2Fsquatch-js@2.4.2...@saasquatch%2Fsquatch-js@2.4.3
@@ -803,7 +803,6 @@ class EmbedWidget extends Widget {
803
803
  } = entry.contentRect; // @ts-ignore -- number will be cast to string by browsers
804
804
 
805
805
  frame.height = height;
806
- console.log("RESIZE");
807
806
  }
808
807
  });
809
808
  var container = await this._findInnerContainer(frame);
@@ -2079,7 +2078,7 @@ function help() {
2079
2078
  console.log("Having trouble using Squatch.js? Go to https://docs.referralsaasquatch.com/developer/ for tutorials, references and error codes.");
2080
2079
  }
2081
2080
 
2082
- // @ts-check
2081
+ var _window$squatch;
2083
2082
  // debug.disable("squatch-js*");
2084
2083
 
2085
2084
  /** @hidden */
@@ -2267,8 +2266,10 @@ function pushCookie() {
2267
2266
 
2268
2267
  if (typeof document !== "undefined" && !window.SaaSquatchDoNotAutoDrop) {
2269
2268
  pushCookie();
2270
- }
2269
+ } // Show message if squatchjs has already been loaded on the page
2270
+
2271
2271
 
2272
+ if ((_window$squatch = window["squatch"]) != null && _window$squatch.init) _log("Squatchjs is being loaded more than once. This may lead to multiple load events being sent, duplicated widgets, and inaccurate analytics.");
2272
2273
  if (typeof document !== "undefined") asyncLoad();
2273
2274
 
2274
2275
  export { DeclarativeEmbedWidget, DeclarativePopupWidget, EmbedWidget, PopupWidget, WidgetApi, Widgets, _auto, api, autofill, events, help, init, pushCookie, ready, widget, widgets };