@plattar/plattar-ar-adapter 1.121.1 → 1.122.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.
@@ -38,7 +38,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
38
38
 
39
39
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
40
40
 
41
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
41
+ 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); }
42
42
 
43
43
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
44
44
 
@@ -842,6 +842,14 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
842
842
  viewer.setAttribute("server", _this11._server);
843
843
  viewer.setAttribute("scene-id", _this11._sceneID);
844
844
 
845
+ if (_this11._productID) {
846
+ viewer.setAttribute("product-id", _this11._productID);
847
+ }
848
+
849
+ if (_this11._variationID) {
850
+ viewer.setAttribute("variation-id", _this11._variationID);
851
+ }
852
+
845
853
  viewer.onload = function () {
846
854
  return accept(viewer);
847
855
  };
@@ -931,6 +939,14 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
931
939
 
932
940
  var dst = plattar_api_1.Server.location().base + "renderer/viewer.html?scene_id=" + _this12._sceneID;
933
941
 
942
+ if (_this12._productID) {
943
+ dst += "&productId=" + _this12._productID;
944
+ }
945
+
946
+ if (_this12._variationID) {
947
+ dst += "&variationId=" + _this12._variationID;
948
+ }
949
+
934
950
  viewer.setAttribute("url", dst);
935
951
 
936
952
  viewer.onload = function () {
@@ -1249,7 +1265,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
1249
1265
  Object.defineProperty(exports, "__esModule", {
1250
1266
  value: true
1251
1267
  });
1252
- exports["default"] = "1.121.1";
1268
+ exports["default"] = "1.122.1";
1253
1269
  }, {}],
1254
1270
  10: [function (require, module, exports) {
1255
1271
  "use strict";
@@ -7177,7 +7193,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
7177
7193
  key = _step7$value[0],
7178
7194
  value = _step7$value[1];
7179
7195
 
7180
- queryStr = first ? "?" + key + "=" + value : "&" + key + "=" + value;
7196
+ queryStr += first ? "?" + key + "=" + value : "&" + key + "=" + value;
7181
7197
  first = false;
7182
7198
  }
7183
7199
  } catch (err) {
@@ -7718,6 +7734,17 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
7718
7734
  get: function get() {
7719
7735
  return "viewer";
7720
7736
  }
7737
+ }, {
7738
+ key: "optionalAttributes",
7739
+ get: function get() {
7740
+ return [{
7741
+ key: "variation-id",
7742
+ map: "variationId"
7743
+ }, {
7744
+ key: "product-id",
7745
+ map: "productId"
7746
+ }];
7747
+ }
7721
7748
  }]);
7722
7749
 
7723
7750
  return ViewerElement;
@@ -7926,7 +7953,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
7926
7953
  module.exports = Util;
7927
7954
  }, {}],
7928
7955
  116: [function (require, module, exports) {
7929
- module.exports = "1.121.2";
7956
+ module.exports = "1.122.2";
7930
7957
  }, {}],
7931
7958
  117: [function (require, module, exports) {
7932
7959
  (function (global) {