@plattar/plattar-ar-adapter 1.167.5 → 1.167.6
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/build/es2015/plattar-ar-adapter.js +42 -63
- package/build/es2015/plattar-ar-adapter.min.js +1 -1
- package/build/es2019/plattar-ar-adapter.js +36 -58
- package/build/es2019/plattar-ar-adapter.min.js +1 -1
- package/dist/embed/controllers/configurator-controller.d.ts +1 -0
- package/dist/embed/controllers/configurator-controller.js +9 -0
- package/dist/embed/controllers/plattar-controller.d.ts +1 -6
- package/dist/embed/controllers/plattar-controller.js +0 -27
- package/dist/embed/controllers/product-controller.d.ts +1 -0
- package/dist/embed/controllers/product-controller.js +8 -0
- package/dist/embed/controllers/vto-controller.d.ts +1 -0
- package/dist/embed/controllers/vto-controller.js +9 -0
- package/dist/embed/plattar-embed.d.ts +0 -1
- package/dist/embed/plattar-embed.js +3 -15
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -7
|
@@ -1881,6 +1881,17 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1881
1881
|
}
|
|
1882
1882
|
return _InitARGenerated;
|
|
1883
1883
|
}())
|
|
1884
|
+
}, {
|
|
1885
|
+
key: "removeRenderer",
|
|
1886
|
+
value: function removeRenderer() {
|
|
1887
|
+
if (this._element) {
|
|
1888
|
+
this._element.remove();
|
|
1889
|
+
this._element = null;
|
|
1890
|
+
return true;
|
|
1891
|
+
}
|
|
1892
|
+
this.removeMessengerObservers();
|
|
1893
|
+
return false;
|
|
1894
|
+
}
|
|
1884
1895
|
}, {
|
|
1885
1896
|
key: "element",
|
|
1886
1897
|
get: function get() {
|
|
@@ -2208,29 +2219,10 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2208
2219
|
}
|
|
2209
2220
|
return startARQRCode;
|
|
2210
2221
|
}()
|
|
2211
|
-
/**
|
|
2212
|
-
* Removes the currently active renderer view from the DOM
|
|
2213
|
-
*/
|
|
2214
|
-
)
|
|
2215
|
-
}, {
|
|
2216
|
-
key: "removeRenderer",
|
|
2217
|
-
value: function removeRenderer() {
|
|
2218
|
-
// remove all other children
|
|
2219
|
-
var shadow = this.parent.shadowRoot;
|
|
2220
|
-
if (shadow) {
|
|
2221
|
-
var child = shadow.lastElementChild;
|
|
2222
|
-
while (child) {
|
|
2223
|
-
shadow.removeChild(child);
|
|
2224
|
-
child = shadow.lastElementChild;
|
|
2225
|
-
}
|
|
2226
|
-
}
|
|
2227
|
-
this._element = null;
|
|
2228
|
-
this.removeMessengerObservers();
|
|
2229
|
-
return true;
|
|
2230
|
-
}
|
|
2231
2222
|
/**
|
|
2232
2223
|
* Returns the Parent Instance
|
|
2233
2224
|
*/
|
|
2225
|
+
)
|
|
2234
2226
|
}, {
|
|
2235
2227
|
key: "parent",
|
|
2236
2228
|
get: function get() {
|
|
@@ -2294,18 +2286,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2294
2286
|
});
|
|
2295
2287
|
shadow.append(element);
|
|
2296
2288
|
}
|
|
2297
|
-
/**
|
|
2298
|
-
*
|
|
2299
|
-
* @param element
|
|
2300
|
-
*/
|
|
2301
|
-
}, {
|
|
2302
|
-
key: "removeChild",
|
|
2303
|
-
value: function removeChild(element) {
|
|
2304
|
-
var shadow = this.parent.shadowRoot;
|
|
2305
|
-
if (shadow) {
|
|
2306
|
-
shadow.removeChild(element);
|
|
2307
|
-
}
|
|
2308
|
-
}
|
|
2309
2289
|
}]);
|
|
2310
2290
|
return PlattarController;
|
|
2311
2291
|
}();
|
|
@@ -2589,6 +2569,16 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2589
2569
|
return reject(new Error("ProductController.initAR() - minimum required attributes not set, use product-id as a minimum"));
|
|
2590
2570
|
});
|
|
2591
2571
|
}
|
|
2572
|
+
}, {
|
|
2573
|
+
key: "removeRenderer",
|
|
2574
|
+
value: function removeRenderer() {
|
|
2575
|
+
if (this._element) {
|
|
2576
|
+
this._element.remove();
|
|
2577
|
+
this._element = null;
|
|
2578
|
+
return true;
|
|
2579
|
+
}
|
|
2580
|
+
return false;
|
|
2581
|
+
}
|
|
2592
2582
|
}, {
|
|
2593
2583
|
key: "element",
|
|
2594
2584
|
get: function get() {
|
|
@@ -3044,6 +3034,17 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3044
3034
|
}
|
|
3045
3035
|
return _InitARGenerated;
|
|
3046
3036
|
}())
|
|
3037
|
+
}, {
|
|
3038
|
+
key: "removeRenderer",
|
|
3039
|
+
value: function removeRenderer() {
|
|
3040
|
+
if (this._element) {
|
|
3041
|
+
this._element.remove();
|
|
3042
|
+
this._element = null;
|
|
3043
|
+
return true;
|
|
3044
|
+
}
|
|
3045
|
+
this.removeMessengerObservers();
|
|
3046
|
+
return false;
|
|
3047
|
+
}
|
|
3047
3048
|
}, {
|
|
3048
3049
|
key: "element",
|
|
3049
3050
|
get: function get() {
|
|
@@ -3103,7 +3104,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3103
3104
|
_this25._observerState = ObserverState.Unlocked;
|
|
3104
3105
|
_this25._controller = null;
|
|
3105
3106
|
_this25._currentSceneID = null;
|
|
3106
|
-
_this25._currentServer = null;
|
|
3107
3107
|
_this25._observer = null;
|
|
3108
3108
|
return _this25;
|
|
3109
3109
|
}
|
|
@@ -3127,6 +3127,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3127
3127
|
key: "create",
|
|
3128
3128
|
value: function create() {
|
|
3129
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"));
|
|
3130
3133
|
if (!this._observer) {
|
|
3131
3134
|
this._observer = new MutationObserver(function (mutations) {
|
|
3132
3135
|
if (_this26._observerState === ObserverState.Unlocked) {
|
|
@@ -3190,9 +3193,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3190
3193
|
}, {
|
|
3191
3194
|
key: "_CreateLegacyEmbed",
|
|
3192
3195
|
value: function _CreateLegacyEmbed() {
|
|
3193
|
-
// server cannot be changed once its set - defaults to production
|
|
3194
|
-
var server = this.hasAttribute("server") ? this.getAttribute("server") : "production";
|
|
3195
|
-
plattar_api_1.Server.create(plattar_api_1.Server.match(server || "production"));
|
|
3196
3196
|
this._controller = new product_controller_1.ProductController(this);
|
|
3197
3197
|
var init = this.hasAttribute("init") ? this.getAttribute("init") : null;
|
|
3198
3198
|
switch (init) {
|
|
@@ -3211,17 +3211,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3211
3211
|
}, {
|
|
3212
3212
|
key: "_CreateEmbed",
|
|
3213
3213
|
value: function _CreateEmbed(attributeName) {
|
|
3214
|
-
// check if controller needs to be destroyed due to server change
|
|
3215
|
-
var serverAttribute = this.hasAttribute("server") ? this.getAttribute("server") : "production";
|
|
3216
|
-
if (this._currentServer !== serverAttribute) {
|
|
3217
|
-
this._currentSceneID = serverAttribute || "production";
|
|
3218
|
-
// reset the controller if any
|
|
3219
|
-
if (this._controller) {
|
|
3220
|
-
this._controller.removeRenderer();
|
|
3221
|
-
this._controller = null;
|
|
3222
|
-
}
|
|
3223
|
-
}
|
|
3224
|
-
plattar_api_1.Server.create(plattar_api_1.Server.match(this._currentServer || "production"));
|
|
3225
3214
|
var embedType = this.hasAttribute("embed-type") ? this.getAttribute("embed-type") : "configurator";
|
|
3226
3215
|
var currentEmbed = this._currentType;
|
|
3227
3216
|
if (embedType) {
|
|
@@ -4199,7 +4188,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4199
4188
|
Object.defineProperty(exports, "__esModule", {
|
|
4200
4189
|
value: true
|
|
4201
4190
|
});
|
|
4202
|
-
exports["default"] = "1.167.
|
|
4191
|
+
exports["default"] = "1.167.6";
|
|
4203
4192
|
}, {}],
|
|
4204
4193
|
17: [function (require, module, exports) {
|
|
4205
4194
|
"use strict";
|
|
@@ -9122,19 +9111,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
9122
9111
|
var shortenURL = this.hasAttribute("shorten") ? this.getAttribute("shorten") : "false";
|
|
9123
9112
|
if (shortenURL && shortenURL.toLowerCase() === "true") {
|
|
9124
9113
|
this._ShortenURL(url).then(function (newURL) {
|
|
9125
|
-
|
|
9126
|
-
var updatedURL = _this56.hasAttribute("url") ? _this56.getAttribute("url") : undefined;
|
|
9127
|
-
if (updatedURL === url) {
|
|
9128
|
-
_this56._GenerateQRCode(newURL, width, height);
|
|
9129
|
-
}
|
|
9114
|
+
_this56._GenerateQRCode(newURL, width, height);
|
|
9130
9115
|
})["catch"](function (_err) {
|
|
9131
9116
|
console.warn(_err);
|
|
9132
9117
|
// ignore error and just generate normal QR Code
|
|
9133
|
-
|
|
9134
|
-
var updatedURL = _this56.hasAttribute("url") ? _this56.getAttribute("url") : undefined;
|
|
9135
|
-
if (updatedURL === url) {
|
|
9136
|
-
_this56._GenerateQRCode(url, width, height);
|
|
9137
|
-
}
|
|
9118
|
+
_this56._GenerateQRCode(url, width, height);
|
|
9138
9119
|
});
|
|
9139
9120
|
} else {
|
|
9140
9121
|
this._GenerateQRCode(url, width, height);
|
|
@@ -9280,7 +9261,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
9280
9261
|
"./version": 111
|
|
9281
9262
|
}],
|
|
9282
9263
|
111: [function (require, module, exports) {
|
|
9283
|
-
module.exports = "1.
|
|
9264
|
+
module.exports = "1.160.1";
|
|
9284
9265
|
}, {}],
|
|
9285
9266
|
112: [function (require, module, exports) {
|
|
9286
9267
|
"use strict";
|
|
@@ -10585,10 +10566,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
10585
10566
|
module.exports = Util;
|
|
10586
10567
|
}, {}],
|
|
10587
10568
|
131: [function (require, module, exports) {
|
|
10588
|
-
|
|
10589
|
-
}, {
|
|
10590
|
-
"dup": 111
|
|
10591
|
-
}],
|
|
10569
|
+
module.exports = "1.165.1";
|
|
10570
|
+
}, {}],
|
|
10592
10571
|
132: [function (require, module, exports) {
|
|
10593
10572
|
(function (global) {
|
|
10594
10573
|
(function () {
|