@artisan-commerce/builders 0.7.0-canary.54 → 0.7.0-canary.55
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/dist/bundle.cjs.js +5 -1
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +5 -1
- package/dist/bundle.esm.js.map +1 -1
- package/dist/bundle.umd.js +5 -1
- package/dist/bundle.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/bundle.cjs.js
CHANGED
|
@@ -548,7 +548,7 @@ const genBaseProducts = (quantity) => {
|
|
|
548
548
|
};
|
|
549
549
|
const MODIFIER_TYPES = ["RADIO", "CHECKBOX", "QUANTITY", "CUSTOMIZED"];
|
|
550
550
|
const buildProductAnswer = (overrides = {}, loop = 1) => {
|
|
551
|
-
const withQuestions = genBiasBoolean(0.1) && loop <
|
|
551
|
+
const withQuestions = genBiasBoolean(0.1) && loop < 2;
|
|
552
552
|
const selectedRenderType = chooseRandom(MODIFIER_TYPES);
|
|
553
553
|
const renderType = genBiasBoolean(0.9) ? null : selectedRenderType;
|
|
554
554
|
const images = genCDNImages(void 0, { width: 60, height: 60 });
|
|
@@ -571,6 +571,8 @@ const buildProductAnswer = (overrides = {}, loop = 1) => {
|
|
|
571
571
|
}, overrides);
|
|
572
572
|
};
|
|
573
573
|
const genProductAnswers = (quantity, loop = 1) => {
|
|
574
|
+
if (loop > 2)
|
|
575
|
+
return [];
|
|
574
576
|
const num = quantity != null ? quantity : genNumber({ min: 1, max: 6 });
|
|
575
577
|
const productAnswers = [];
|
|
576
578
|
for (let i = 0; i < num; i++) {
|
|
@@ -600,6 +602,8 @@ const buildProductQuestion = (overrides = {}, loop = 1) => {
|
|
|
600
602
|
}, overrides);
|
|
601
603
|
};
|
|
602
604
|
const genProductQuestions = (quantity, loop = 1) => {
|
|
605
|
+
if (loop > 2)
|
|
606
|
+
return [];
|
|
603
607
|
const num = quantity != null ? quantity : genNumber({ min: 1, max: 5 });
|
|
604
608
|
const productQuestions = [];
|
|
605
609
|
for (let i = 0; i < num; i++) {
|