@treely/strapi-slices 5.4.0 → 5.5.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.
- package/dist/slices/BlogCards/BlogCards.stories.d.ts +5 -0
- package/dist/slices/Comparison/Comparison.stories.d.ts +6 -0
- package/dist/slices/Cta/Cta.stories.d.ts +9 -0
- package/dist/slices/CtaOnly/CtaOnly.stories.d.ts +3 -0
- package/dist/slices/CustomerStories/CustomerStories.stories.d.ts +6 -0
- package/dist/slices/Facts/Facts.stories.d.ts +7 -0
- package/dist/slices/FullWidthHighlightQuote/FullWidthHighlightQuote.stories.d.ts +4 -0
- package/dist/slices/FullWidthImage/FullWidthImage.stories.d.ts +5 -0
- package/dist/slices/FullWidthImageSlider/FullWidthImageSlider.stories.d.ts +3 -0
- package/dist/slices/Glossary/Glossary.stories.d.ts +3 -0
- package/dist/slices/Hero/Hero.stories.d.ts +9 -0
- package/dist/slices/IconGrid/IconGrid.stories.d.ts +5 -0
- package/dist/slices/ImageGrid/ImageGrid.stories.d.ts +5 -0
- package/dist/slices/ImageTextSequence/ImageTextSequence.stories.d.ts +7 -0
- package/dist/slices/LeftTextRightCard/LeftTextRightCard.stories.d.ts +8 -0
- package/dist/slices/LinkCardsGrid/LinkCardsGrid.stories.d.ts +5 -0
- package/dist/slices/LogoGridWithText/LogoGridWithText.stories.d.ts +6 -0
- package/dist/slices/MapHero/MapHero.stories.d.ts +8 -0
- package/dist/slices/ProjectFacts/ProjectFacts.stories.d.ts +8 -0
- package/dist/slices/ProjectsGrid/ProjectsGrid.stories.d.ts +3 -0
- package/dist/slices/ProjectsMap/ProjectsMap.stories.d.ts +6 -0
- package/dist/slices/QAndA/QAndA.stories.d.ts +7 -0
- package/dist/slices/QuoteCards/QuoteCards.stories.d.ts +8 -0
- package/dist/slices/RichTextSection/RichTextSection.stories.d.ts +3 -0
- package/dist/slices/ShopCheckout/ShopCheckout.stories.d.ts +7 -0
- package/dist/slices/SideBySideImages/SideBySideImages.stories.d.ts +3 -0
- package/dist/slices/SmallHero/SmallHero.stories.d.ts +11 -0
- package/dist/slices/Steps/Steps.stories.d.ts +7 -0
- package/dist/slices/TextCardGrid/TextCardGrid.stories.d.ts +8 -0
- package/dist/slices/TextCarousel/TextCarousel.stories.d.ts +6 -0
- package/dist/slices/TextWithCard/TextWithCard.stories.d.ts +10 -0
- package/dist/slices/TextWithTextCards/TextWithTextCards.stories.d.ts +7 -0
- package/dist/slices/Timeline/Timeline.stories.d.ts +9 -0
- package/dist/slices/Video/Video.stories.d.ts +3 -0
- package/dist/strapi-slices.cjs.development.js +16 -8
- package/dist/strapi-slices.cjs.development.js.map +1 -1
- package/dist/strapi-slices.cjs.production.min.js +1 -1
- package/dist/strapi-slices.cjs.production.min.js.map +1 -1
- package/dist/strapi-slices.esm.js +16 -8
- package/dist/strapi-slices.esm.js.map +1 -1
- package/package.json +6 -1
- package/src/components/portfolio/SmallCheckout/SmallCheckout.test.tsx +2 -2
- package/src/components/portfolio/SmallCheckout/SmallCheckout.tsx +14 -5
- package/src/slices/BlogCards/BlogCards.stories.tsx +16 -11
- package/src/slices/ImageTextSequence/ImageTextSequence.stories.tsx +8 -1
- package/src/slices/ProjectsMap/ProjectsMap.stories.tsx +5 -5
- package/src/slices/ShopCheckout/ShopCheckout.test.tsx +2 -2
- package/src/slices/ShopCheckout/ShopCheckout.tsx +10 -6
- package/src/slices/Steps/Steps.tsx +1 -0
- package/src/slices/TextWithCard/TextWithCard.stories.tsx +3 -2
- package/src/slices/Timeline/Timeline.stories.tsx +6 -2
|
@@ -1809,6 +1809,7 @@ var Steps = function Steps(_ref) {
|
|
|
1809
1809
|
text: slice.card.text,
|
|
1810
1810
|
shapes: slice.card.shapes && ((_slice$card$shapes = slice.card.shapes) == null ? void 0 : _slice$card$shapes.map(function (shape) {
|
|
1811
1811
|
return React.createElement(Image, {
|
|
1812
|
+
key: shape.id,
|
|
1812
1813
|
src: strapiMediaUrl(shape.img, 'small'),
|
|
1813
1814
|
alt: shape.alt,
|
|
1814
1815
|
fill: true,
|
|
@@ -3817,11 +3818,13 @@ var ShopCheckout = function ShopCheckout(_ref) {
|
|
|
3817
3818
|
}, [locale]);
|
|
3818
3819
|
var onSubmit = function onSubmit(_ref2) {
|
|
3819
3820
|
var contributionValue = _ref2.contributionValue;
|
|
3820
|
-
var
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3821
|
+
var checkoutURL = new URL(FPM_API_URI + "/v1/webhooks/shop/checkout");
|
|
3822
|
+
var currentURL = new URL(window.location.href);
|
|
3823
|
+
checkoutURL.searchParams.append('batchId', slice.batchId);
|
|
3824
|
+
checkoutURL.searchParams.append('quantity', Math.floor(contributionValue / slice.pricePerKg).toString());
|
|
3825
|
+
checkoutURL.searchParams.append('cancelPath', currentURL.pathname);
|
|
3826
|
+
if (slice.couponId) checkoutURL.searchParams.append('couponId', slice.couponId);
|
|
3827
|
+
push(checkoutURL.toString());
|
|
3825
3828
|
};
|
|
3826
3829
|
return React.createElement(DefaultSectionContainer, {
|
|
3827
3830
|
backgroundColor: primary50,
|
|
@@ -4189,13 +4192,18 @@ var SmallCheckout = function SmallCheckout(_ref) {
|
|
|
4189
4192
|
}, [locale]);
|
|
4190
4193
|
var onSubmit = /*#__PURE__*/function () {
|
|
4191
4194
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
|
|
4192
|
-
var contributionValueCurrency;
|
|
4195
|
+
var contributionValueCurrency, checkoutURL, currentURL;
|
|
4193
4196
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4194
4197
|
while (1) switch (_context.prev = _context.next) {
|
|
4195
4198
|
case 0:
|
|
4196
4199
|
contributionValueCurrency = _ref2.contributionValueCurrency;
|
|
4197
|
-
|
|
4198
|
-
|
|
4200
|
+
checkoutURL = new URL(FPM_API_URI + "/v1/webhooks/shop/checkout");
|
|
4201
|
+
currentURL = new URL(window.location.href);
|
|
4202
|
+
checkoutURL.searchParams.append('batchId', batchId);
|
|
4203
|
+
checkoutURL.searchParams.append('quantity', Math.floor(contributionValueCurrency / pricePerKg).toString());
|
|
4204
|
+
checkoutURL.searchParams.append('cancelPath', currentURL.pathname);
|
|
4205
|
+
push(checkoutURL.toString());
|
|
4206
|
+
case 7:
|
|
4199
4207
|
case "end":
|
|
4200
4208
|
return _context.stop();
|
|
4201
4209
|
}
|