@artisan-commerce/builders 0.7.0-canary.54 → 0.7.0-canary.56
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 +17 -8
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.d.ts +0 -5
- package/dist/bundle.esm.js +17 -8
- package/dist/bundle.esm.js.map +1 -1
- package/dist/bundle.umd.js +17 -8
- package/dist/bundle.umd.js.map +1 -1
- package/package.json +3 -3
package/dist/bundle.cjs.js
CHANGED
|
@@ -20,7 +20,8 @@ const genItems = (builder, quantity) => {
|
|
|
20
20
|
|
|
21
21
|
const getCommonDocumentTypes = () => ["PASSPORT"];
|
|
22
22
|
const getARDocumentTypes = () => [
|
|
23
|
-
...getCommonDocumentTypes()
|
|
23
|
+
...getCommonDocumentTypes(),
|
|
24
|
+
"DNI"
|
|
24
25
|
];
|
|
25
26
|
const getBODocumentTypes = () => [
|
|
26
27
|
...getCommonDocumentTypes()
|
|
@@ -29,14 +30,13 @@ const getBRDocumentTypes = () => [
|
|
|
29
30
|
...getCommonDocumentTypes()
|
|
30
31
|
];
|
|
31
32
|
const getCLDocumentTypes = () => [
|
|
32
|
-
...getCommonDocumentTypes()
|
|
33
|
+
...getCommonDocumentTypes(),
|
|
34
|
+
"RUT"
|
|
33
35
|
];
|
|
34
36
|
const getCODocumentTypes = () => [
|
|
35
37
|
...getCommonDocumentTypes(),
|
|
36
|
-
"RUT",
|
|
37
38
|
"NIT",
|
|
38
|
-
"
|
|
39
|
-
"CC"
|
|
39
|
+
"CI_CO"
|
|
40
40
|
];
|
|
41
41
|
const getECDocumentTypes = () => [
|
|
42
42
|
...getCommonDocumentTypes(),
|
|
@@ -47,13 +47,18 @@ const getPYDocumentTypes = () => [
|
|
|
47
47
|
...getCommonDocumentTypes()
|
|
48
48
|
];
|
|
49
49
|
const getPEDocumentTypes = () => [
|
|
50
|
-
...getCommonDocumentTypes()
|
|
50
|
+
...getCommonDocumentTypes(),
|
|
51
|
+
"DNI",
|
|
52
|
+
"RUC"
|
|
51
53
|
];
|
|
52
54
|
const getUYDocumentTypes = () => [
|
|
53
55
|
...getCommonDocumentTypes()
|
|
54
56
|
];
|
|
55
57
|
const getVEDocumentTypes = () => [
|
|
56
|
-
...getCommonDocumentTypes()
|
|
58
|
+
...getCommonDocumentTypes(),
|
|
59
|
+
"CE_VE",
|
|
60
|
+
"CI_VE",
|
|
61
|
+
"RIF"
|
|
57
62
|
];
|
|
58
63
|
const getUSDocumentTypes = () => [
|
|
59
64
|
...getCommonDocumentTypes()
|
|
@@ -548,7 +553,7 @@ const genBaseProducts = (quantity) => {
|
|
|
548
553
|
};
|
|
549
554
|
const MODIFIER_TYPES = ["RADIO", "CHECKBOX", "QUANTITY", "CUSTOMIZED"];
|
|
550
555
|
const buildProductAnswer = (overrides = {}, loop = 1) => {
|
|
551
|
-
const withQuestions = genBiasBoolean(0.1) && loop <
|
|
556
|
+
const withQuestions = genBiasBoolean(0.1) && loop < 2;
|
|
552
557
|
const selectedRenderType = chooseRandom(MODIFIER_TYPES);
|
|
553
558
|
const renderType = genBiasBoolean(0.9) ? null : selectedRenderType;
|
|
554
559
|
const images = genCDNImages(void 0, { width: 60, height: 60 });
|
|
@@ -571,6 +576,8 @@ const buildProductAnswer = (overrides = {}, loop = 1) => {
|
|
|
571
576
|
}, overrides);
|
|
572
577
|
};
|
|
573
578
|
const genProductAnswers = (quantity, loop = 1) => {
|
|
579
|
+
if (loop > 2)
|
|
580
|
+
return [];
|
|
574
581
|
const num = quantity != null ? quantity : genNumber({ min: 1, max: 6 });
|
|
575
582
|
const productAnswers = [];
|
|
576
583
|
for (let i = 0; i < num; i++) {
|
|
@@ -600,6 +607,8 @@ const buildProductQuestion = (overrides = {}, loop = 1) => {
|
|
|
600
607
|
}, overrides);
|
|
601
608
|
};
|
|
602
609
|
const genProductQuestions = (quantity, loop = 1) => {
|
|
610
|
+
if (loop > 2)
|
|
611
|
+
return [];
|
|
603
612
|
const num = quantity != null ? quantity : genNumber({ min: 1, max: 5 });
|
|
604
613
|
const productQuestions = [];
|
|
605
614
|
for (let i = 0; i < num; i++) {
|