@plattar/plattar-ar-adapter 1.169.3 → 1.172.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.
@@ -1305,6 +1305,7 @@ class PlattarController {
1305
1305
  this._element = null;
1306
1306
  this._prevQROpt = null;
1307
1307
  this._selectVariationObserver = null;
1308
+ this._selectVariationIDObserver = null;
1308
1309
  this._selectVariationSKUObserver = null;
1309
1310
  this._parent = parent;
1310
1311
  }
@@ -1350,6 +1351,15 @@ class PlattarController {
1350
1351
  });
1351
1352
  }
1352
1353
  });
1354
+ this._selectVariationIDObserver = viewer.messengerInstance.observer.subscribe("selectVariationID", (cd) => {
1355
+ if (cd.type === "call") {
1356
+ const args = cd.data[0];
1357
+ const variations = args ? (Array.isArray(args) ? args : [args]) : [];
1358
+ variations.forEach((variationID) => {
1359
+ configState.state.setVariationID(variationID);
1360
+ });
1361
+ }
1362
+ });
1353
1363
  this._selectVariationSKUObserver = viewer.messengerInstance.observer.subscribe("selectVariationSKU", (cd) => {
1354
1364
  if (cd.type === "call") {
1355
1365
  const args = cd.data[0];
@@ -1368,6 +1378,10 @@ class PlattarController {
1368
1378
  this._selectVariationObserver();
1369
1379
  this._selectVariationObserver = null;
1370
1380
  }
1381
+ if (this._selectVariationIDObserver) {
1382
+ this._selectVariationIDObserver();
1383
+ this._selectVariationIDObserver = null;
1384
+ }
1371
1385
  if (this._selectVariationSKUObserver) {
1372
1386
  this._selectVariationSKUObserver();
1373
1387
  this._selectVariationSKUObserver = null;
@@ -3038,7 +3052,7 @@ exports.Util = Util;
3038
3052
  },{}],17:[function(require,module,exports){
3039
3053
  "use strict";
3040
3054
  Object.defineProperty(exports, "__esModule", { value: true });
3041
- exports.default = "1.169.3";
3055
+ exports.default = "1.172.1";
3042
3056
 
3043
3057
  },{}],18:[function(require,module,exports){
3044
3058
  "use strict";