@plattar/plattar-ar-adapter 1.189.2 → 2.5.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/build/es2015/plattar-ar-adapter.js +62 -43
- package/build/es2015/plattar-ar-adapter.min.js +1 -1
- package/build/es2019/plattar-ar-adapter.js +41 -25
- package/build/es2019/plattar-ar-adapter.min.js +1 -1
- package/dist/util/configurator-state.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +6 -6
|
@@ -3344,7 +3344,7 @@ class ConfiguratorState {
|
|
|
3344
3344
|
scene_product_id: productState[meta.scene_product_index],
|
|
3345
3345
|
product_variation_id: productState[meta.product_variation_index],
|
|
3346
3346
|
meta_data: {
|
|
3347
|
-
augment: productState[meta.meta_index].augment
|
|
3347
|
+
augment: productState[meta.meta_index].augment ?? true,
|
|
3348
3348
|
type: productState[meta.meta_index].type || "sceneproduct"
|
|
3349
3349
|
}
|
|
3350
3350
|
});
|
|
@@ -3727,7 +3727,7 @@ exports.Util = Util;
|
|
|
3727
3727
|
},{}],20:[function(require,module,exports){
|
|
3728
3728
|
"use strict";
|
|
3729
3729
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3730
|
-
exports.default = "
|
|
3730
|
+
exports.default = "2.5.1";
|
|
3731
3731
|
|
|
3732
3732
|
},{}],21:[function(require,module,exports){
|
|
3733
3733
|
"use strict";
|
|
@@ -8405,8 +8405,26 @@ class BaseElement extends HTMLElement {
|
|
|
8405
8405
|
return "none";
|
|
8406
8406
|
}
|
|
8407
8407
|
|
|
8408
|
-
get
|
|
8409
|
-
|
|
8408
|
+
get elementFullLocation() {
|
|
8409
|
+
const server = this.hasAttribute("server") ? this.getAttribute("server") : "production";
|
|
8410
|
+
|
|
8411
|
+
const serverLocation = Util.getServerLocation(server);
|
|
8412
|
+
|
|
8413
|
+
if (serverLocation === undefined) {
|
|
8414
|
+
throw new Error(`BaseElement.elementFullLocation - attribute "server" must be one of "production", "staging", "review" or "dev" but was "${server}"`);
|
|
8415
|
+
}
|
|
8416
|
+
|
|
8417
|
+
const embedLocation = Util.getElementLocation(this.elementType);
|
|
8418
|
+
|
|
8419
|
+
if (embedLocation === undefined) {
|
|
8420
|
+
throw new Error(`BaseElement.elementFullLocation - element named "${this.elementType}" is invalid`);
|
|
8421
|
+
}
|
|
8422
|
+
|
|
8423
|
+
if (serverLocation === Util.getServerLocation('dev')) {
|
|
8424
|
+
return `${serverLocation}renderer/${embedLocation}${this.allMappedAttributesQuery}`;
|
|
8425
|
+
}
|
|
8426
|
+
|
|
8427
|
+
return `${serverLocation}${embedLocation}${this.allMappedAttributesQuery}`;
|
|
8410
8428
|
}
|
|
8411
8429
|
}
|
|
8412
8430
|
|
|
@@ -8427,14 +8445,24 @@ class ConfiguratorElement extends BaseElement {
|
|
|
8427
8445
|
return "configurator";
|
|
8428
8446
|
}
|
|
8429
8447
|
|
|
8430
|
-
get
|
|
8448
|
+
get elementFullLocation() {
|
|
8431
8449
|
if (this.hasAttribute("show-ui")) {
|
|
8432
8450
|
const state = this.getAttribute("show-ui");
|
|
8433
8451
|
|
|
8434
|
-
|
|
8452
|
+
if (state === "true") {
|
|
8453
|
+
const server = this.hasAttribute("server") ? this.getAttribute("server") : "production";
|
|
8454
|
+
|
|
8455
|
+
switch (server) {
|
|
8456
|
+
case "production": return `https://configurator.plattar.com/index.html${this.allMappedAttributesQuery}`;
|
|
8457
|
+
case "staging": return `https://configurator-staging.plattar.com/index.html${this.allMappedAttributesQuery}`;
|
|
8458
|
+
case "review": return `https://configurator-review.plattar.com/index.html${this.allMappedAttributesQuery}`;
|
|
8459
|
+
case "dev": return `https://localhost/configurator/dist/index.html${this.allMappedAttributesQuery}`;
|
|
8460
|
+
default: throw new Error(`ConfiguratorElement.elementFullLocation - attribute "server" must be one of "production", "staging", "review" or "dev" but was "${server}"`);
|
|
8461
|
+
}
|
|
8462
|
+
}
|
|
8435
8463
|
}
|
|
8436
8464
|
|
|
8437
|
-
return super.
|
|
8465
|
+
return super.elementFullLocation;
|
|
8438
8466
|
}
|
|
8439
8467
|
|
|
8440
8468
|
get optionalAttributes() {
|
|
@@ -8495,19 +8523,7 @@ class ElementController {
|
|
|
8495
8523
|
|
|
8496
8524
|
this._server = element.hasAttribute("server") ? element.getAttribute("server") : "production";
|
|
8497
8525
|
|
|
8498
|
-
const
|
|
8499
|
-
|
|
8500
|
-
if (serverLocation === undefined) {
|
|
8501
|
-
throw new Error("ElementController - attribute \"server\" must be one of \"production\", \"staging\", \"review\" or \"dev\"");
|
|
8502
|
-
}
|
|
8503
|
-
|
|
8504
|
-
const embedLocation = element.elementLocation;
|
|
8505
|
-
|
|
8506
|
-
if (embedLocation === undefined) {
|
|
8507
|
-
throw new Error("ElementController - element named \"" + elementType + "\" is invalid");
|
|
8508
|
-
}
|
|
8509
|
-
|
|
8510
|
-
const source = serverLocation + embedLocation + element.allMappedAttributesQuery;
|
|
8526
|
+
const source = element.elementFullLocation;
|
|
8511
8527
|
|
|
8512
8528
|
// ensure iframe ID is randomly generated as we could have multiple iframes
|
|
8513
8529
|
// with same Scene ID - such as viewer and editor running on same page
|
|
@@ -9034,9 +9050,9 @@ module.exports = {
|
|
|
9034
9050
|
class Util {
|
|
9035
9051
|
static getServerLocation(server) {
|
|
9036
9052
|
switch (server) {
|
|
9037
|
-
case "production": return "https://
|
|
9038
|
-
case "staging": return "https://staging.plattar.
|
|
9039
|
-
case "review": return "https://review.plattar.com/";
|
|
9053
|
+
case "production": return "https://renderer.plattar.com/";
|
|
9054
|
+
case "staging": return "https://renderer-staging.plattar.com/";
|
|
9055
|
+
case "review": return "https://renderer-review.plattar.com/";
|
|
9040
9056
|
case "dev": return "https://localhost/";
|
|
9041
9057
|
default: return undefined;
|
|
9042
9058
|
}
|
|
@@ -9046,7 +9062,7 @@ class Util {
|
|
|
9046
9062
|
const isValid = Util.isValidType(etype);
|
|
9047
9063
|
|
|
9048
9064
|
if (isValid) {
|
|
9049
|
-
return
|
|
9065
|
+
return `${etype}.html`;
|
|
9050
9066
|
}
|
|
9051
9067
|
|
|
9052
9068
|
return undefined;
|
|
@@ -9091,7 +9107,7 @@ class Util {
|
|
|
9091
9107
|
|
|
9092
9108
|
module.exports = Util;
|
|
9093
9109
|
},{}],140:[function(require,module,exports){
|
|
9094
|
-
module.exports = "
|
|
9110
|
+
module.exports = "2.5.3";
|
|
9095
9111
|
|
|
9096
9112
|
},{}],141:[function(require,module,exports){
|
|
9097
9113
|
'use strict'
|