@redneckz/wildless-cms-uni-blocks 0.14.816 → 0.14.817
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/bundle/bundle.umd.js +21 -11
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
- package/dist/components/GalleryLayout/GalleryLayout.js +18 -8
- package/dist/components/GalleryLayout/GalleryLayout.js.map +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
- package/lib/common.css +1 -1
- package/lib/components/GalleryLayout/GalleryLayout.js +18 -8
- package/lib/components/GalleryLayout/GalleryLayout.js.map +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
- package/mobile/bundle/bundle.umd.js +21 -11
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
- package/mobile/dist/components/GalleryLayout/GalleryLayout.js +18 -8
- package/mobile/dist/components/GalleryLayout/GalleryLayout.js.map +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/GalleryLayout/GalleryLayout.js +18 -8
- package/mobile/lib/components/GalleryLayout/GalleryLayout.js.map +1 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +2 -0
- package/mobile/src/components/GalleryLayout/GalleryLayout.tsx +20 -9
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +2 -1
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +2 -0
- package/package.json +1 -1
- package/src/components/GalleryLayout/GalleryLayout.fixture.tsx +4 -15
- package/src/components/GalleryLayout/GalleryLayout.tsx +20 -9
- package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +2 -1
- package/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +2 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -712,8 +712,8 @@
|
|
|
712
712
|
};
|
|
713
713
|
const BaseProductTile = JSX(
|
|
714
714
|
// eslint-disable-next-line max-lines-per-function
|
|
715
|
-
({ className, padding, defaultPadding, title, description, headlineVersion = 'L', align = 'text-left', benefitsVersion, isTabularBenefits, isDotted = true, benefits, __html, richVersion, isFullWidthTitle, priceList = [], tags = [], buttons, image, imageOptions: { imageAlign = 'center', directionRight = true, isImageAlwaysOnRight, isImageSecondary = false, } = {}, backwardButton, children, ...rest }) => {
|
|
716
|
-
const img = image?.src ? jsx(Img, { image: image }) : null;
|
|
715
|
+
({ className, padding, defaultPadding, title, description, headlineVersion = 'L', align = 'text-left', benefitsVersion, isTabularBenefits, isDotted = true, benefits, __html, richVersion, isFullWidthTitle, priceList = [], tags = [], buttons, image, imageOptions: { imageAlign = 'center', directionRight = true, isImageAlwaysOnRight, isImageSecondary = false, className: imageClassName, } = {}, backwardButton, children, ...rest }) => {
|
|
716
|
+
const img = image?.src ? jsx(Img, { image: image, imageClassName: imageClassName }) : null;
|
|
717
717
|
const headline = (jsx(Headline, { title: title, description: description, headlineVersion: headlineVersion, align: align, isEmbedded: true }));
|
|
718
718
|
const filteredBenefits = benefits?.filter((_) => '__html' in _ || 'label' in _ || 'description' in _);
|
|
719
719
|
return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? { title: headline } : { insetTitle: headline }), ...leftOrRightImage(img, directionRight), isImageSecondary: isImageSecondary, imageAlign: imageAlign, isImageAlwaysOnRight: isImageAlwaysOnRight, buttons: renderButtonsSection(buttons), backwardButton: backwardButton, ...rest, children: renderChildList(renderBenefits(filteredBenefits, { benefitsVersion, isTabularBenefits }), renderRichText(__html, { richVersion, isDotted, headlineVersion }), children, renderPriceList(priceList), renderTags(tags)) }));
|
|
@@ -9925,7 +9925,7 @@
|
|
|
9925
9925
|
},
|
|
9926
9926
|
},
|
|
9927
9927
|
],
|
|
9928
|
-
title: 'Ссылка',
|
|
9928
|
+
title: 'Ссылка (если заполнено, то кнопка скрывается)',
|
|
9929
9929
|
required: ['href'],
|
|
9930
9930
|
},
|
|
9931
9931
|
};
|
|
@@ -9948,21 +9948,31 @@
|
|
|
9948
9948
|
...props,
|
|
9949
9949
|
render: (renderProps) => productBlockDecorator(idx)({ ...props, ...renderProps }, i),
|
|
9950
9950
|
}, `wrap_${i}`) ?? productBlockDecorator(idx)(props, i);
|
|
9951
|
-
const productBlockDecorator = (idx) => ({ blockClassName, block, render }, i) =>
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
|
|
9951
|
+
const productBlockDecorator = (idx) => ({ blockClassName, block, render }, i) => {
|
|
9952
|
+
const modifiedBlock = modifyBlock(block, idx);
|
|
9953
|
+
return (jsx(LinkWrapper, { ...modifiedBlock.content?.link, className: getChildStyle(idx), children: render({
|
|
9954
|
+
blockClassName: style(blockClassName, 'h-full'),
|
|
9955
|
+
block: modifiedBlock,
|
|
9956
|
+
}) }, String(i)));
|
|
9957
|
+
};
|
|
9955
9958
|
const getChildStyle = (index) => SHORT_TILE_INDEXES.includes(index)
|
|
9956
9959
|
? 'lg:col-span-1 lg:row-span-1'
|
|
9957
9960
|
: 'lg:col-span-2 lg:row-span-2';
|
|
9958
9961
|
const modifyBlock = (block, i) => {
|
|
9959
9962
|
const content = { ...block.content };
|
|
9960
|
-
|
|
9963
|
+
const isSmallTile = SHORT_TILE_INDEXES.includes(i);
|
|
9964
|
+
if (isSmallTile) {
|
|
9961
9965
|
delete content.description;
|
|
9962
9966
|
delete content.benefits;
|
|
9967
|
+
if (content.link?.href) {
|
|
9968
|
+
delete content.buttons;
|
|
9969
|
+
}
|
|
9970
|
+
content.imageOptions = { ...content.imageOptions, className: 'max-w-max !h-auto' };
|
|
9963
9971
|
}
|
|
9964
|
-
|
|
9965
|
-
|
|
9972
|
+
else {
|
|
9973
|
+
if ((content.buttons ?? []).length) {
|
|
9974
|
+
delete content.link;
|
|
9975
|
+
}
|
|
9966
9976
|
}
|
|
9967
9977
|
return { ...block, content };
|
|
9968
9978
|
};
|
|
@@ -11581,7 +11591,7 @@
|
|
|
11581
11591
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11582
11592
|
});
|
|
11583
11593
|
|
|
11584
|
-
const packageVersion = "0.14.
|
|
11594
|
+
const packageVersion = "0.14.816";
|
|
11585
11595
|
|
|
11586
11596
|
exports.Blocks = Blocks;
|
|
11587
11597
|
exports.ContentPage = ContentPage;
|