@plattar/plattar-ar-adapter 1.167.3 → 1.167.4

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.
@@ -1885,7 +1885,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
1885
1885
  key: "removeRenderer",
1886
1886
  value: function removeRenderer() {
1887
1887
  if (this._element) {
1888
- this.removeChild(this._element);
1888
+ this._element.remove();
1889
1889
  this._element = null;
1890
1890
  return true;
1891
1891
  }
@@ -2286,18 +2286,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2286
2286
  });
2287
2287
  shadow.append(element);
2288
2288
  }
2289
- /**
2290
- *
2291
- * @param element
2292
- */
2293
- }, {
2294
- key: "removeChild",
2295
- value: function removeChild(element) {
2296
- var shadow = this.parent.shadowRoot;
2297
- if (shadow) {
2298
- shadow.removeChild(element);
2299
- }
2300
- }
2301
2289
  }]);
2302
2290
  return PlattarController;
2303
2291
  }();
@@ -2585,7 +2573,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2585
2573
  key: "removeRenderer",
2586
2574
  value: function removeRenderer() {
2587
2575
  if (this._element) {
2588
- this.removeChild(this._element);
2576
+ this._element.remove();
2589
2577
  this._element = null;
2590
2578
  return true;
2591
2579
  }
@@ -3050,7 +3038,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3050
3038
  key: "removeRenderer",
3051
3039
  value: function removeRenderer() {
3052
3040
  if (this._element) {
3053
- this.removeChild(this._element);
3041
+ this._element.remove();
3054
3042
  this._element = null;
3055
3043
  return true;
3056
3044
  }
@@ -3116,7 +3104,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3116
3104
  _this25._observerState = ObserverState.Unlocked;
3117
3105
  _this25._controller = null;
3118
3106
  _this25._currentSceneID = null;
3119
- _this25._currentServer = null;
3120
3107
  _this25._observer = null;
3121
3108
  return _this25;
3122
3109
  }
@@ -3140,6 +3127,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3140
3127
  key: "create",
3141
3128
  value: function create() {
3142
3129
  var _this26 = this;
3130
+ // server cannot be changed once its set - defaults to production
3131
+ var server = this.hasAttribute("server") ? this.getAttribute("server") : "production";
3132
+ plattar_api_1.Server.create(plattar_api_1.Server.match(server || "production"));
3143
3133
  if (!this._observer) {
3144
3134
  this._observer = new MutationObserver(function (mutations) {
3145
3135
  if (_this26._observerState === ObserverState.Unlocked) {
@@ -3203,9 +3193,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3203
3193
  }, {
3204
3194
  key: "_CreateLegacyEmbed",
3205
3195
  value: function _CreateLegacyEmbed() {
3206
- // server cannot be changed once its set - defaults to production
3207
- var server = this.hasAttribute("server") ? this.getAttribute("server") : "production";
3208
- plattar_api_1.Server.create(plattar_api_1.Server.match(server || "production"));
3209
3196
  this._controller = new product_controller_1.ProductController(this);
3210
3197
  var init = this.hasAttribute("init") ? this.getAttribute("init") : null;
3211
3198
  switch (init) {
@@ -3224,17 +3211,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
3224
3211
  }, {
3225
3212
  key: "_CreateEmbed",
3226
3213
  value: function _CreateEmbed(attributeName) {
3227
- // check if controller needs to be destroyed due to server change
3228
- var serverAttribute = this.hasAttribute("server") ? this.getAttribute("server") : "production";
3229
- if (this._currentServer !== serverAttribute) {
3230
- this._currentSceneID = serverAttribute || "production";
3231
- // reset the controller if any
3232
- if (this._controller) {
3233
- this._controller.removeRenderer();
3234
- this._controller = null;
3235
- }
3236
- }
3237
- plattar_api_1.Server.create(plattar_api_1.Server.match(this._currentServer || "production"));
3238
3214
  var embedType = this.hasAttribute("embed-type") ? this.getAttribute("embed-type") : "configurator";
3239
3215
  var currentEmbed = this._currentType;
3240
3216
  if (embedType) {
@@ -4212,7 +4188,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4212
4188
  Object.defineProperty(exports, "__esModule", {
4213
4189
  value: true
4214
4190
  });
4215
- exports["default"] = "1.167.3";
4191
+ exports["default"] = "1.167.4";
4216
4192
  }, {}],
4217
4193
  17: [function (require, module, exports) {
4218
4194
  "use strict";
@@ -9135,19 +9111,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
9135
9111
  var shortenURL = this.hasAttribute("shorten") ? this.getAttribute("shorten") : "false";
9136
9112
  if (shortenURL && shortenURL.toLowerCase() === "true") {
9137
9113
  this._ShortenURL(url).then(function (newURL) {
9138
- // make sure by time promise is resolved that the original url hasn't been updated
9139
- var updatedURL = _this56.hasAttribute("url") ? _this56.getAttribute("url") : undefined;
9140
- if (updatedURL === url) {
9141
- _this56._GenerateQRCode(newURL, width, height);
9142
- }
9114
+ _this56._GenerateQRCode(newURL, width, height);
9143
9115
  })["catch"](function (_err) {
9144
9116
  console.warn(_err);
9145
9117
  // ignore error and just generate normal QR Code
9146
- // make sure by time promise is resolved that the original url hasn't been updated
9147
- var updatedURL = _this56.hasAttribute("url") ? _this56.getAttribute("url") : undefined;
9148
- if (updatedURL === url) {
9149
- _this56._GenerateQRCode(url, width, height);
9150
- }
9118
+ _this56._GenerateQRCode(url, width, height);
9151
9119
  });
9152
9120
  } else {
9153
9121
  this._GenerateQRCode(url, width, height);
@@ -9293,7 +9261,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
9293
9261
  "./version": 111
9294
9262
  }],
9295
9263
  111: [function (require, module, exports) {
9296
- module.exports = "1.165.1";
9264
+ module.exports = "1.160.1";
9297
9265
  }, {}],
9298
9266
  112: [function (require, module, exports) {
9299
9267
  "use strict";
@@ -10598,10 +10566,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
10598
10566
  module.exports = Util;
10599
10567
  }, {}],
10600
10568
  131: [function (require, module, exports) {
10601
- arguments[4][111][0].apply(exports, arguments);
10602
- }, {
10603
- "dup": 111
10604
- }],
10569
+ module.exports = "1.165.1";
10570
+ }, {}],
10605
10571
  132: [function (require, module, exports) {
10606
10572
  (function (global) {
10607
10573
  (function () {