@plattar/plattar-ar-adapter 1.130.1 → 1.131.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 +145 -47
- package/build/es2015/plattar-ar-adapter.min.js +1 -1
- package/build/es2019/plattar-ar-adapter.js +112 -55
- package/build/es2019/plattar-ar-adapter.min.js +1 -9
- package/dist/ar/product-ar.d.ts +4 -2
- package/dist/ar/product-ar.js +24 -7
- package/dist/ar/scene-product-ar.d.ts +1 -1
- package/dist/ar/scene-product-ar.js +2 -2
- package/dist/embed/controllers/configurator-controller.js +8 -0
- package/dist/embed/controllers/plattar-controller.js +4 -0
- package/dist/embed/controllers/product-controller.js +11 -2
- package/dist/embed/controllers/viewer-controller.js +29 -8
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
|
@@ -24,17 +24,17 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
24
24
|
|
|
25
25
|
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
|
26
26
|
|
|
27
|
-
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
27
|
+
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
28
28
|
|
|
29
29
|
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
30
30
|
|
|
31
|
-
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
31
|
+
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
32
32
|
|
|
33
33
|
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
34
34
|
|
|
35
35
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
36
36
|
|
|
37
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
37
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
38
38
|
|
|
39
39
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
40
40
|
|
|
@@ -44,7 +44,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
44
44
|
|
|
45
45
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
46
46
|
|
|
47
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
47
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
48
48
|
|
|
49
49
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
50
50
|
|
|
@@ -394,6 +394,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
394
394
|
|
|
395
395
|
var productID = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
396
396
|
var variationID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
397
|
+
var variationSKU = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
397
398
|
|
|
398
399
|
_classCallCheck(this, ProductAR);
|
|
399
400
|
|
|
@@ -406,7 +407,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
406
407
|
}
|
|
407
408
|
|
|
408
409
|
_this4._productID = productID;
|
|
409
|
-
_this4.
|
|
410
|
+
_this4._variationSKU = variationSKU;
|
|
411
|
+
_this4._variationID = variationID ? variationID : variationSKU ? null : "default";
|
|
410
412
|
_this4._ar = null;
|
|
411
413
|
return _this4;
|
|
412
414
|
}
|
|
@@ -421,6 +423,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
421
423
|
get: function get() {
|
|
422
424
|
return this._variationID;
|
|
423
425
|
}
|
|
426
|
+
}, {
|
|
427
|
+
key: "variationSKU",
|
|
428
|
+
get: function get() {
|
|
429
|
+
return this._variationSKU;
|
|
430
|
+
}
|
|
424
431
|
}, {
|
|
425
432
|
key: "_SetupAnalytics",
|
|
426
433
|
value: function _SetupAnalytics(product, variation) {
|
|
@@ -478,16 +485,33 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
478
485
|
product.include(plattar_api_1.Scene.include(plattar_api_1.Project));
|
|
479
486
|
product.get().then(function (product) {
|
|
480
487
|
// find the required variation from our product
|
|
481
|
-
var variationID = _this5.variationID ? _this5.variationID === "default" ? product.attributes.product_variation_id : _this5.variationID :
|
|
488
|
+
var variationID = _this5.variationID ? _this5.variationID === "default" ? product.attributes.product_variation_id : _this5.variationID : null;
|
|
489
|
+
var variationSKU = _this5.variationSKU;
|
|
482
490
|
|
|
483
|
-
if (!variationID) {
|
|
484
|
-
return reject(new Error("ProductAR.init() - cannot proceed as variation was not
|
|
491
|
+
if (!variationID && !variationSKU) {
|
|
492
|
+
return reject(new Error("ProductAR.init() - cannot proceed as variation-id or variation-sku was not set correctly"));
|
|
485
493
|
}
|
|
486
494
|
|
|
487
|
-
var variation =
|
|
495
|
+
var variation = undefined;
|
|
496
|
+
|
|
497
|
+
if (variationID) {
|
|
498
|
+
variation = product.relationships.find(plattar_api_1.ProductVariation, variationID);
|
|
499
|
+
} // if no variation was found with variationID - try searching variation sku
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
if (!variation && variationSKU) {
|
|
503
|
+
var variations = product.relationships.filter(plattar_api_1.ProductVariation);
|
|
504
|
+
|
|
505
|
+
if (variations) {
|
|
506
|
+
variation = variations.find(function (element) {
|
|
507
|
+
return element.attributes.sku === variationSKU;
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
} // make sure our variation is actually available before moving forward
|
|
511
|
+
|
|
488
512
|
|
|
489
513
|
if (!variation) {
|
|
490
|
-
return reject(new Error("ProductAR.init() - cannot proceed as variation with id " + variationID + " cannot be found"));
|
|
514
|
+
return reject(new Error("ProductAR.init() - cannot proceed as variation with id " + variationID + " or sku " + variationSKU + " cannot be found"));
|
|
491
515
|
} // otherwise both the product and variation are available
|
|
492
516
|
// we need to figure out if we can actually do AR though
|
|
493
517
|
// check if variation has a model file defined
|
|
@@ -1044,10 +1068,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1044
1068
|
|
|
1045
1069
|
var sceneProductID = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1046
1070
|
var variationID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1071
|
+
var variationSKU = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
1047
1072
|
|
|
1048
1073
|
_classCallCheck(this, SceneProductAR);
|
|
1049
1074
|
|
|
1050
|
-
_this10 = _super5.call(this, sceneProductID, variationID); // this is evaluated in the init() function
|
|
1075
|
+
_this10 = _super5.call(this, sceneProductID, variationID, variationSKU); // this is evaluated in the init() function
|
|
1051
1076
|
|
|
1052
1077
|
_this10._attachedProductID = null;
|
|
1053
1078
|
|
|
@@ -1195,6 +1220,12 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1195
1220
|
|
|
1196
1221
|
var showAR = _this12.getAttribute("show-ar");
|
|
1197
1222
|
|
|
1223
|
+
var showUI = _this12.getAttribute("show-ui");
|
|
1224
|
+
|
|
1225
|
+
if (showUI && showUI === "true") {
|
|
1226
|
+
dst = plattar_api_1.Server.location().base + "configurator/dist/index.html?scene_id=" + sceneID;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1198
1229
|
if (configState) {
|
|
1199
1230
|
dst += "&config_state=" + configState;
|
|
1200
1231
|
}
|
|
@@ -1246,6 +1277,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1246
1277
|
|
|
1247
1278
|
var showAR = _this13.getAttribute("show-ar");
|
|
1248
1279
|
|
|
1280
|
+
var showUI = _this13.getAttribute("show-ui");
|
|
1281
|
+
|
|
1249
1282
|
if (configState) {
|
|
1250
1283
|
viewer.setAttribute("config-state", configState);
|
|
1251
1284
|
}
|
|
@@ -1254,6 +1287,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1254
1287
|
viewer.setAttribute("show-ar", showAR);
|
|
1255
1288
|
}
|
|
1256
1289
|
|
|
1290
|
+
if (showUI) {
|
|
1291
|
+
viewer.setAttribute("show-ui", showUI);
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1257
1294
|
viewer.onload = function () {
|
|
1258
1295
|
return accept(viewer);
|
|
1259
1296
|
};
|
|
@@ -1559,6 +1596,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1559
1596
|
|
|
1560
1597
|
var variationID = _this16.getAttribute("variation-id");
|
|
1561
1598
|
|
|
1599
|
+
var variationSKU = _this16.getAttribute("variation-sku");
|
|
1600
|
+
|
|
1562
1601
|
var arMode = _this16.getAttribute("ar-mode");
|
|
1563
1602
|
|
|
1564
1603
|
if (configState) {
|
|
@@ -1581,6 +1620,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1581
1620
|
dst += "&variation_id=" + variationID;
|
|
1582
1621
|
}
|
|
1583
1622
|
|
|
1623
|
+
if (variationSKU) {
|
|
1624
|
+
dst += "&variation_sku=" + variationSKU;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1584
1627
|
if (arMode) {
|
|
1585
1628
|
dst += "&ar_mode=" + arMode;
|
|
1586
1629
|
}
|
|
@@ -1744,12 +1787,18 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1744
1787
|
|
|
1745
1788
|
var variationID = _this17.getAttribute("variation-id");
|
|
1746
1789
|
|
|
1790
|
+
var variationSKU = _this17.getAttribute("variation-sku");
|
|
1791
|
+
|
|
1747
1792
|
var showAR = _this17.getAttribute("show-ar");
|
|
1748
1793
|
|
|
1749
1794
|
var dst = plattar_api_1.Server.location().base + "renderer/product.html?product_id=" + productID;
|
|
1750
1795
|
|
|
1751
1796
|
if (variationID) {
|
|
1752
|
-
dst += "&
|
|
1797
|
+
dst += "&variationId=" + variationID;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
if (variationSKU) {
|
|
1801
|
+
dst += "&variationSku=" + variationSKU;
|
|
1753
1802
|
}
|
|
1754
1803
|
|
|
1755
1804
|
if (showAR) {
|
|
@@ -1797,12 +1846,18 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1797
1846
|
|
|
1798
1847
|
var variationID = _this18.getAttribute("variation-id");
|
|
1799
1848
|
|
|
1849
|
+
var variationSKU = _this18.getAttribute("variation-sku");
|
|
1850
|
+
|
|
1800
1851
|
var showAR = _this18.getAttribute("show-ar");
|
|
1801
1852
|
|
|
1802
1853
|
if (variationID) {
|
|
1803
1854
|
viewer.setAttribute("variation-id", variationID);
|
|
1804
1855
|
}
|
|
1805
1856
|
|
|
1857
|
+
if (variationSKU) {
|
|
1858
|
+
viewer.setAttribute("variation-sku", variationSKU);
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1806
1861
|
if (showAR) {
|
|
1807
1862
|
viewer.setAttribute("show-ar", showAR);
|
|
1808
1863
|
}
|
|
@@ -1836,7 +1891,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1836
1891
|
if (productID) {
|
|
1837
1892
|
var variationID = _this19.getAttribute("variation-id");
|
|
1838
1893
|
|
|
1839
|
-
var
|
|
1894
|
+
var variationSKU = _this19.getAttribute("variation-sku");
|
|
1895
|
+
|
|
1896
|
+
var product = new product_ar_1.ProductAR(productID, variationID, variationSKU);
|
|
1840
1897
|
return product.init().then(accept)["catch"](reject);
|
|
1841
1898
|
}
|
|
1842
1899
|
|
|
@@ -1884,6 +1941,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1884
1941
|
|
|
1885
1942
|
var product_ar_1 = require("../../ar/product-ar");
|
|
1886
1943
|
|
|
1944
|
+
var scene_ar_1 = require("../../ar/scene-ar");
|
|
1945
|
+
|
|
1887
1946
|
var scene_product_ar_1 = require("../../ar/scene-product-ar");
|
|
1888
1947
|
|
|
1889
1948
|
var configurator_state_1 = require("../../util/configurator-state");
|
|
@@ -1971,6 +2030,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1971
2030
|
|
|
1972
2031
|
var variationID = _this20.getAttribute("variation-id");
|
|
1973
2032
|
|
|
2033
|
+
var variationSKU = _this20.getAttribute("variation-sku");
|
|
2034
|
+
|
|
1974
2035
|
var showAR = _this20.getAttribute("show-ar");
|
|
1975
2036
|
|
|
1976
2037
|
if (productID) {
|
|
@@ -1981,6 +2042,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
1981
2042
|
dst += "&variationId=" + variationID;
|
|
1982
2043
|
}
|
|
1983
2044
|
|
|
2045
|
+
if (variationSKU) {
|
|
2046
|
+
dst += "&variationSku=" + variationSKU;
|
|
2047
|
+
}
|
|
2048
|
+
|
|
1984
2049
|
if (showAR) {
|
|
1985
2050
|
dst += "&show_ar=" + showAR;
|
|
1986
2051
|
}
|
|
@@ -2028,6 +2093,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2028
2093
|
|
|
2029
2094
|
var variationID = _this21.getAttribute("variation-id");
|
|
2030
2095
|
|
|
2096
|
+
var variationSKU = _this21.getAttribute("variation-sku");
|
|
2097
|
+
|
|
2031
2098
|
var showAR = _this21.getAttribute("show-ar");
|
|
2032
2099
|
|
|
2033
2100
|
if (productID) {
|
|
@@ -2038,6 +2105,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2038
2105
|
viewer.setAttribute("variation-id", variationID);
|
|
2039
2106
|
}
|
|
2040
2107
|
|
|
2108
|
+
if (variationSKU) {
|
|
2109
|
+
viewer.setAttribute("variation-sku", variationSKU);
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2041
2112
|
if (showAR) {
|
|
2042
2113
|
viewer.setAttribute("show-ar", showAR);
|
|
2043
2114
|
}
|
|
@@ -2072,7 +2143,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2072
2143
|
if (productID) {
|
|
2073
2144
|
var variationID = _this22.getAttribute("variation-id");
|
|
2074
2145
|
|
|
2075
|
-
var
|
|
2146
|
+
var variationSKU = _this22.getAttribute("variation-sku");
|
|
2147
|
+
|
|
2148
|
+
var product = new product_ar_1.ProductAR(productID, variationID, variationSKU);
|
|
2076
2149
|
return product.init().then(accept)["catch"](reject);
|
|
2077
2150
|
}
|
|
2078
2151
|
|
|
@@ -2082,24 +2155,39 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2082
2155
|
if (sceneProductID) {
|
|
2083
2156
|
var _variationID = _this22.getAttribute("variation-id");
|
|
2084
2157
|
|
|
2085
|
-
var
|
|
2158
|
+
var _variationSKU = _this22.getAttribute("variation-sku");
|
|
2159
|
+
|
|
2160
|
+
var _product = new scene_product_ar_1.SceneProductAR(sceneProductID, _variationID, _variationSKU);
|
|
2086
2161
|
|
|
2087
2162
|
return _product.init().then(accept)["catch"](reject);
|
|
2088
2163
|
}
|
|
2089
2164
|
|
|
2090
|
-
var sceneID = _this22.getAttribute("scene-id"); //
|
|
2165
|
+
var sceneID = _this22.getAttribute("scene-id"); // fallback to using default SceneAR implementation
|
|
2091
2166
|
|
|
2092
2167
|
|
|
2093
2168
|
if (sceneID) {
|
|
2169
|
+
// special case - check if scene only has a single product, if so
|
|
2170
|
+
// we need to use provided variation-id or variation-sku to override
|
|
2171
|
+
var _variationID2 = _this22.getAttribute("variation-id");
|
|
2172
|
+
|
|
2173
|
+
var _variationSKU2 = _this22.getAttribute("variation-sku"); // just do scene-ar if variation ID and variation SKU is not set
|
|
2174
|
+
|
|
2175
|
+
|
|
2176
|
+
if (!_variationID2 && !_variationSKU2) {
|
|
2177
|
+
var sceneAR = new scene_ar_1.SceneAR(sceneID);
|
|
2178
|
+
return sceneAR.init().then(accept)["catch"](reject);
|
|
2179
|
+
} // otherwise decode scene
|
|
2180
|
+
|
|
2181
|
+
|
|
2094
2182
|
return configurator_state_1.ConfiguratorState.decodeScene(sceneID).then(function (state) {
|
|
2095
|
-
var
|
|
2183
|
+
var firstProduct = state.first();
|
|
2096
2184
|
|
|
2097
|
-
if (
|
|
2098
|
-
|
|
2099
|
-
return sceneProductAR.init().then(accept)["catch"](reject);
|
|
2185
|
+
if (state.length > 1 || !firstProduct) {
|
|
2186
|
+
return reject(new Error("ViewerController.initAR() - single product required to override variation-id or variation-sku"));
|
|
2100
2187
|
}
|
|
2101
2188
|
|
|
2102
|
-
|
|
2189
|
+
var product = new scene_product_ar_1.SceneProductAR(firstProduct.scene_product_id, _variationID2, _variationSKU2);
|
|
2190
|
+
return product.init().then(accept)["catch"](reject);
|
|
2103
2191
|
})["catch"](reject);
|
|
2104
2192
|
}
|
|
2105
2193
|
|
|
@@ -2131,6 +2219,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2131
2219
|
exports.ViewerController = ViewerController;
|
|
2132
2220
|
}, {
|
|
2133
2221
|
"../../ar/product-ar": 3,
|
|
2222
|
+
"../../ar/scene-ar": 5,
|
|
2134
2223
|
"../../ar/scene-product-ar": 6,
|
|
2135
2224
|
"../../util/configurator-state": 14,
|
|
2136
2225
|
"../../util/util": 15,
|
|
@@ -3251,7 +3340,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
3251
3340
|
Object.defineProperty(exports, "__esModule", {
|
|
3252
3341
|
value: true
|
|
3253
3342
|
});
|
|
3254
|
-
exports["default"] = "1.
|
|
3343
|
+
exports["default"] = "1.131.1";
|
|
3255
3344
|
}, {}],
|
|
3256
3345
|
17: [function (require, module, exports) {
|
|
3257
3346
|
"use strict";
|
|
@@ -9610,6 +9699,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
9610
9699
|
exports["default"] = "1.120.1";
|
|
9611
9700
|
}, {}],
|
|
9612
9701
|
115: [function (require, module, exports) {
|
|
9702
|
+
var Util = require("../../util/util");
|
|
9703
|
+
|
|
9613
9704
|
var ElementController = require("../controllers/element-controller");
|
|
9614
9705
|
|
|
9615
9706
|
var BaseElement = /*#__PURE__*/function (_HTMLElement3) {
|
|
@@ -9774,6 +9865,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
9774
9865
|
get: function get() {
|
|
9775
9866
|
return "none";
|
|
9776
9867
|
}
|
|
9868
|
+
}, {
|
|
9869
|
+
key: "elementLocation",
|
|
9870
|
+
get: function get() {
|
|
9871
|
+
return Util.getElementLocation(this.elementType);
|
|
9872
|
+
}
|
|
9777
9873
|
}]);
|
|
9778
9874
|
|
|
9779
9875
|
return BaseElement;
|
|
@@ -9781,6 +9877,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
9781
9877
|
|
|
9782
9878
|
module.exports = BaseElement;
|
|
9783
9879
|
}, {
|
|
9880
|
+
"../../util/util": 128,
|
|
9784
9881
|
"../controllers/element-controller": 117
|
|
9785
9882
|
}],
|
|
9786
9883
|
116: [function (require, module, exports) {
|
|
@@ -9807,6 +9904,16 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
9807
9904
|
get: function get() {
|
|
9808
9905
|
return "configurator";
|
|
9809
9906
|
}
|
|
9907
|
+
}, {
|
|
9908
|
+
key: "elementLocation",
|
|
9909
|
+
get: function get() {
|
|
9910
|
+
if (this.hasAttribute("show-ui")) {
|
|
9911
|
+
var state = this.getAttribute("show-ui");
|
|
9912
|
+
return state === "true" ? "configurator/dist/index.html" : _get(_getPrototypeOf(ConfiguratorElement.prototype), "elementLocation", this);
|
|
9913
|
+
}
|
|
9914
|
+
|
|
9915
|
+
return _get(_getPrototypeOf(ConfiguratorElement.prototype), "elementLocation", this);
|
|
9916
|
+
}
|
|
9810
9917
|
}, {
|
|
9811
9918
|
key: "optionalAttributes",
|
|
9812
9919
|
get: function get() {
|
|
@@ -9891,7 +9998,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
9891
9998
|
throw new Error("ElementController - attribute \"server\" must be one of \"production\", \"staging\" or \"dev\"");
|
|
9892
9999
|
}
|
|
9893
10000
|
|
|
9894
|
-
var embedLocation =
|
|
10001
|
+
var embedLocation = element.elementLocation;
|
|
9895
10002
|
|
|
9896
10003
|
if (embedLocation === undefined) {
|
|
9897
10004
|
throw new Error("ElementController - element named \"" + elementType + "\" is invalid");
|
|
@@ -9999,7 +10106,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
9999
10106
|
|
|
10000
10107
|
if (element.hasAttribute("fullscreen")) {
|
|
10001
10108
|
var style = document.createElement('style');
|
|
10002
|
-
style.textContent = "
|
|
10109
|
+
style.textContent = "._PlattarFullScreen { width: 100%; height: 100%; position: absolute; top: 0; left: 0; }";
|
|
10003
10110
|
this._iframe.className = "_PlattarFullScreen";
|
|
10004
10111
|
shadow.append(style);
|
|
10005
10112
|
this._fsStyle = style;
|
|
@@ -10187,6 +10294,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
10187
10294
|
return [{
|
|
10188
10295
|
key: "variation-id",
|
|
10189
10296
|
map: "variationId"
|
|
10297
|
+
}, {
|
|
10298
|
+
key: "variation-sku",
|
|
10299
|
+
map: "variationSku"
|
|
10190
10300
|
}, {
|
|
10191
10301
|
key: "product-id",
|
|
10192
10302
|
map: "productId"
|
|
@@ -10286,6 +10396,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
10286
10396
|
return [{
|
|
10287
10397
|
key: "variation-id",
|
|
10288
10398
|
map: "variation_id"
|
|
10399
|
+
}, {
|
|
10400
|
+
key: "variation-sku",
|
|
10401
|
+
map: "variationSku"
|
|
10289
10402
|
}, {
|
|
10290
10403
|
key: "show-ar",
|
|
10291
10404
|
map: "show_ar"
|
|
@@ -10363,6 +10476,9 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
10363
10476
|
return [{
|
|
10364
10477
|
key: "variation-id",
|
|
10365
10478
|
map: "variationId"
|
|
10479
|
+
}, {
|
|
10480
|
+
key: "variation-sku",
|
|
10481
|
+
map: "variationSku"
|
|
10366
10482
|
}, {
|
|
10367
10483
|
key: "product-id",
|
|
10368
10484
|
map: "productId"
|
|
@@ -10499,13 +10615,13 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
10499
10615
|
value: function getServerLocation(server) {
|
|
10500
10616
|
switch (server) {
|
|
10501
10617
|
case "production":
|
|
10502
|
-
return "https://app.plattar.com/
|
|
10618
|
+
return "https://app.plattar.com/";
|
|
10503
10619
|
|
|
10504
10620
|
case "staging":
|
|
10505
|
-
return "https://staging.plattar.space/
|
|
10621
|
+
return "https://staging.plattar.space/";
|
|
10506
10622
|
|
|
10507
10623
|
case "dev":
|
|
10508
|
-
return "https://localhost/
|
|
10624
|
+
return "https://localhost/";
|
|
10509
10625
|
|
|
10510
10626
|
default:
|
|
10511
10627
|
return undefined;
|
|
@@ -10517,25 +10633,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
10517
10633
|
var isValid = Util.isValidType(etype);
|
|
10518
10634
|
|
|
10519
10635
|
if (isValid) {
|
|
10520
|
-
return etype + ".html";
|
|
10521
|
-
}
|
|
10522
|
-
|
|
10523
|
-
return undefined;
|
|
10524
|
-
}
|
|
10525
|
-
}, {
|
|
10526
|
-
key: "getElementBundleLocation",
|
|
10527
|
-
value: function getElementBundleLocation(etype, server) {
|
|
10528
|
-
var location = Util.getServerLocation(server);
|
|
10529
|
-
|
|
10530
|
-
if (!location) {
|
|
10531
|
-
return undefined;
|
|
10532
|
-
}
|
|
10533
|
-
|
|
10534
|
-
var isValid = Util.isValidType(etype);
|
|
10535
|
-
|
|
10536
|
-
if (isValid) {
|
|
10537
|
-
var isMinified = location === "dev" ? false : true;
|
|
10538
|
-
return isMinified ? etype + "-bundle.min.js" : etype + "-bundle.js";
|
|
10636
|
+
return "renderer/" + etype + ".html";
|
|
10539
10637
|
}
|
|
10540
10638
|
|
|
10541
10639
|
return undefined;
|
|
@@ -10587,7 +10685,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
10587
10685
|
module.exports = Util;
|
|
10588
10686
|
}, {}],
|
|
10589
10687
|
129: [function (require, module, exports) {
|
|
10590
|
-
module.exports = "1.
|
|
10688
|
+
module.exports = "1.131.1";
|
|
10591
10689
|
}, {}],
|
|
10592
10690
|
130: [function (require, module, exports) {
|
|
10593
10691
|
(function (global) {
|