@plattar/plattar-ar-adapter 1.167.1 → 1.167.2

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.
@@ -2056,7 +2056,6 @@ class PlattarEmbed extends HTMLElement {
2056
2056
  this._observerState = ObserverState.Unlocked;
2057
2057
  this._controller = null;
2058
2058
  this._currentSceneID = null;
2059
- this._currentServer = null;
2060
2059
  this._observer = null;
2061
2060
  }
2062
2061
  get viewer() {
@@ -2072,6 +2071,9 @@ class PlattarEmbed extends HTMLElement {
2072
2071
  * creates a brand new instance of this embed
2073
2072
  */
2074
2073
  create() {
2074
+ // server cannot be changed once its set - defaults to production
2075
+ const server = this.hasAttribute("server") ? this.getAttribute("server") : "production";
2076
+ plattar_api_1.Server.create(plattar_api_1.Server.match(server || "production"));
2075
2077
  if (!this._observer) {
2076
2078
  this._observer = new MutationObserver((mutations) => {
2077
2079
  if (this._observerState === ObserverState.Unlocked) {
@@ -2128,9 +2130,6 @@ class PlattarEmbed extends HTMLElement {
2128
2130
  * embedding products with variations (without a scene-id)
2129
2131
  */
2130
2132
  _CreateLegacyEmbed() {
2131
- // server cannot be changed once its set - defaults to production
2132
- const server = this.hasAttribute("server") ? this.getAttribute("server") : "production";
2133
- plattar_api_1.Server.create(plattar_api_1.Server.match(server || "production"));
2134
2133
  this._controller = new product_controller_1.ProductController(this);
2135
2134
  const init = this.hasAttribute("init") ? this.getAttribute("init") : null;
2136
2135
  switch (init) {
@@ -2147,17 +2146,6 @@ class PlattarEmbed extends HTMLElement {
2147
2146
  * this can also be called when attributes/state changes so embeds can be re-loaded
2148
2147
  */
2149
2148
  _CreateEmbed(attributeName) {
2150
- // check if controller needs to be destroyed due to server change
2151
- const serverAttribute = this.hasAttribute("server") ? this.getAttribute("server") : "production";
2152
- if (this._currentServer !== serverAttribute) {
2153
- this._currentSceneID = serverAttribute || "production";
2154
- // reset the controller if any
2155
- if (this._controller) {
2156
- this._controller.removeRenderer();
2157
- this._controller = null;
2158
- }
2159
- }
2160
- plattar_api_1.Server.create(plattar_api_1.Server.match(this._currentServer || "production"));
2161
2149
  const embedType = this.hasAttribute("embed-type") ? this.getAttribute("embed-type") : "configurator";
2162
2150
  const currentEmbed = this._currentType;
2163
2151
  if (embedType) {
@@ -2831,7 +2819,7 @@ exports.Util = Util;
2831
2819
  },{}],16:[function(require,module,exports){
2832
2820
  "use strict";
2833
2821
  Object.defineProperty(exports, "__esModule", { value: true });
2834
- exports.default = "1.167.1";
2822
+ exports.default = "1.167.2";
2835
2823
 
2836
2824
  },{}],17:[function(require,module,exports){
2837
2825
  "use strict";
@@ -6782,21 +6770,11 @@ class BaseElement extends HTMLElement {
6782
6770
 
6783
6771
  if (shortenURL && shortenURL.toLowerCase() === "true") {
6784
6772
  this._ShortenURL(url).then((newURL) => {
6785
- // make sure by time promise is resolved that the original url hasn't been updated
6786
- const updatedURL = this.hasAttribute("url") ? this.getAttribute("url") : undefined;
6787
-
6788
- if (updatedURL === url) {
6789
- this._GenerateQRCode(newURL, width, height);
6790
- }
6773
+ this._GenerateQRCode(newURL, width, height);
6791
6774
  }).catch((_err) => {
6792
6775
  console.warn(_err);
6793
6776
  // ignore error and just generate normal QR Code
6794
- // make sure by time promise is resolved that the original url hasn't been updated
6795
- const updatedURL = this.hasAttribute("url") ? this.getAttribute("url") : undefined;
6796
-
6797
- if (updatedURL === url) {
6798
- this._GenerateQRCode(url, width, height);
6799
- }
6777
+ this._GenerateQRCode(url, width, height);
6800
6778
  });
6801
6779
  }
6802
6780
  else {
@@ -6946,7 +6924,7 @@ module.exports = {
6946
6924
  version: Version
6947
6925
  };
6948
6926
  },{"./elements/qrcode-element.js":109,"./version":111}],111:[function(require,module,exports){
6949
- module.exports = "1.165.1";
6927
+ module.exports = "1.160.1";
6950
6928
 
6951
6929
  },{}],112:[function(require,module,exports){
6952
6930
  "use strict";
@@ -8044,8 +8022,9 @@ class Util {
8044
8022
 
8045
8023
  module.exports = Util;
8046
8024
  },{}],131:[function(require,module,exports){
8047
- arguments[4][111][0].apply(exports,arguments)
8048
- },{"dup":111}],132:[function(require,module,exports){
8025
+ module.exports = "1.165.1";
8026
+
8027
+ },{}],132:[function(require,module,exports){
8049
8028
  (function (global){(function (){
8050
8029
  "use strict";
8051
8030