@plattar/plattar-ar-adapter 1.188.4 → 1.188.5
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 +6 -6
- package/build/es2015/plattar-ar-adapter.min.js +1 -1
- package/build/es2019/plattar-ar-adapter.js +17 -17
- package/build/es2019/plattar-ar-adapter.min.js +1 -1
- package/dist/embed/controllers/launcher-controller.js +16 -16
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -23,24 +23,24 @@ class LauncherController extends plattar_controller_1.PlattarController {
|
|
|
23
23
|
}
|
|
24
24
|
async onAttributesUpdated(attributeName) {
|
|
25
25
|
const state = this._state;
|
|
26
|
+
if (attributeName === "variation-id") {
|
|
27
|
+
const configState = await this.getConfiguratorState();
|
|
28
|
+
const variationIDs = this.getAttribute("variation-id");
|
|
29
|
+
const variationIDsList = variationIDs ? variationIDs.split(",") : [];
|
|
30
|
+
variationIDsList.forEach((variationID) => {
|
|
31
|
+
configState.state.setVariationID(variationID);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
if (attributeName === "variation-sku") {
|
|
35
|
+
const configState = await this.getConfiguratorState();
|
|
36
|
+
const variationSKUs = this.getAttribute("variation-sku");
|
|
37
|
+
const variationSKUList = variationSKUs ? variationSKUs.split(",") : [];
|
|
38
|
+
variationSKUList.forEach((variationSKU) => {
|
|
39
|
+
configState.state.setVariationSKU(variationSKU);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
26
42
|
// re-render the QR Code when attributes have changed
|
|
27
43
|
if (state === plattar_controller_1.ControllerState.QRCode) {
|
|
28
|
-
if (attributeName === "variation-id") {
|
|
29
|
-
const configState = await this.getConfiguratorState();
|
|
30
|
-
const variationIDs = this.getAttribute("variation-id");
|
|
31
|
-
const variationIDsList = variationIDs ? variationIDs.split(",") : [];
|
|
32
|
-
variationIDsList.forEach((variationID) => {
|
|
33
|
-
configState.state.setVariationID(variationID);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
if (attributeName === "variation-sku") {
|
|
37
|
-
const configState = await this.getConfiguratorState();
|
|
38
|
-
const variationSKUs = this.getAttribute("variation-sku");
|
|
39
|
-
const variationSKUList = variationSKUs ? variationSKUs.split(",") : [];
|
|
40
|
-
variationSKUList.forEach((variationSKU) => {
|
|
41
|
-
configState.state.setVariationSKU(variationSKU);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
44
|
this.startQRCode(this._prevQROpt);
|
|
45
45
|
return;
|
|
46
46
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.188.
|
|
1
|
+
declare const _default: "1.188.5";
|
|
2
2
|
export default _default;
|
package/dist/version.js
CHANGED