@artisan-commerce/builders 0.7.0-canary.34 → 0.7.0-canary.35
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/CHANGELOG.md +8 -0
- package/dist/bundle.cjs.js +31 -4
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.d.ts +33 -1
- package/dist/bundle.esm.js +31 -4
- package/dist/bundle.esm.js.map +1 -1
- package/dist/bundle.umd.js +31 -4
- package/dist/bundle.umd.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.7.0-canary.35](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.34...@artisan-commerce/builders@0.7.0-canary.35) (2021-12-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @artisan-commerce/builders
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.7.0-canary.34](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/builders@0.7.0-canary.33...@artisan-commerce/builders@0.7.0-canary.34) (2021-12-15)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @artisan-commerce/builders
|
package/dist/bundle.cjs.js
CHANGED
|
@@ -141572,18 +141572,26 @@ var __spreadValues$g = (a, b) => {
|
|
|
141572
141572
|
};
|
|
141573
141573
|
const buildBanner = (overrides = {}) => {
|
|
141574
141574
|
const bannerScopes = ["APP", "GLOBAL", "WEB"];
|
|
141575
|
-
const bannerTypes = [
|
|
141575
|
+
const bannerTypes = [
|
|
141576
|
+
"COUPON",
|
|
141577
|
+
"INFO",
|
|
141578
|
+
"PRODUCT",
|
|
141579
|
+
"URL",
|
|
141580
|
+
"CATEGORY",
|
|
141581
|
+
"COUPON_QR",
|
|
141582
|
+
"SECTION"
|
|
141583
|
+
];
|
|
141576
141584
|
return __spreadValues$g({
|
|
141577
141585
|
banner_title: genWords(2),
|
|
141578
141586
|
banner_description: genWords(8),
|
|
141579
141587
|
image_url: buildURLImage(),
|
|
141580
141588
|
banner_qr_code: "",
|
|
141581
|
-
coupon:
|
|
141582
|
-
coupon_id:
|
|
141589
|
+
coupon: buildBannerCoupon(),
|
|
141590
|
+
coupon_id: genNumber(20),
|
|
141583
141591
|
banner_type: chooseRandom(bannerTypes),
|
|
141584
141592
|
image_file_name: `${genWord}.jpg`,
|
|
141585
141593
|
image_base64: genBase64(),
|
|
141586
|
-
benefits:
|
|
141594
|
+
benefits: genBannerBenefits(),
|
|
141587
141595
|
vendor_id: genNumber(20),
|
|
141588
141596
|
vendor_name: faker.company.companyName(),
|
|
141589
141597
|
scope: chooseRandom(bannerScopes),
|
|
@@ -141602,6 +141610,22 @@ const buildBanner = (overrides = {}) => {
|
|
|
141602
141610
|
section: null
|
|
141603
141611
|
}, overrides);
|
|
141604
141612
|
};
|
|
141613
|
+
const buildBannerCoupon = (overrides = {}) => {
|
|
141614
|
+
return __spreadValues$g({
|
|
141615
|
+
name: genWord(),
|
|
141616
|
+
only_store: genBiasBoolean(0.6),
|
|
141617
|
+
coupon_type: chooseRandom(["COUPON", "MIX"])
|
|
141618
|
+
}, overrides);
|
|
141619
|
+
};
|
|
141620
|
+
const buildBannerBenefits = (overrides = {}) => {
|
|
141621
|
+
return __spreadValues$g({
|
|
141622
|
+
id: genNumber(10),
|
|
141623
|
+
name: genWord()
|
|
141624
|
+
}, overrides);
|
|
141625
|
+
};
|
|
141626
|
+
const genBannerBenefits = (quantity) => {
|
|
141627
|
+
return genItems(buildBannerBenefits, quantity);
|
|
141628
|
+
};
|
|
141605
141629
|
const genBanners = (quantity) => {
|
|
141606
141630
|
return genItems(buildBanner, quantity);
|
|
141607
141631
|
};
|
|
@@ -141623,6 +141647,9 @@ const genBannerImages = (quantity) => {
|
|
|
141623
141647
|
var banner_builder = /*#__PURE__*/Object.freeze({
|
|
141624
141648
|
__proto__: null,
|
|
141625
141649
|
buildBanner: buildBanner,
|
|
141650
|
+
buildBannerCoupon: buildBannerCoupon,
|
|
141651
|
+
buildBannerBenefits: buildBannerBenefits,
|
|
141652
|
+
genBannerBenefits: genBannerBenefits,
|
|
141626
141653
|
genBanners: genBanners,
|
|
141627
141654
|
buildBannerImage: buildBannerImage,
|
|
141628
141655
|
genBannerImages: genBannerImages
|