@redneckz/wildless-cms-uni-blocks 0.14.55 → 0.14.57
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/bin/migration-scripts/0.14.56.js +33 -0
- package/bundle/bundle.umd.js +11 -8
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +1 -1
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/RollupItem/RollupItem.js +3 -1
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js +4 -3
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +1 -1
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/RollupItem/RollupItem.js +3 -1
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js +4 -3
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +12 -9
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +1 -1
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/RollupItem/RollupItem.js +3 -1
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +4 -3
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +1 -1
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/RollupItem/RollupItem.js +3 -1
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +4 -3
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +7 -9
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +6 -8
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +7 -9
- package/mobile/src/components/Footer/Footer.tsx +6 -1
- package/mobile/src/components/RollupItem/RollupItem.tsx +3 -1
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +10 -21
- package/package.json +1 -1
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +7 -9
- package/src/components/CarouselLinks/CarouselLinks.tsx +6 -8
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +7 -9
- package/src/components/Footer/Footer.mobile.tsx +6 -1
- package/src/components/RollupItem/RollupItem.fixture.mobile.tsx +7 -2
- package/src/components/RollupItem/RollupItem.fixture.tsx +1 -0
- package/src/components/RollupItem/RollupItem.tsx +3 -1
- package/src/components/VerticalLayout/VerticalLayout.fixture.mobile.tsx +4 -0
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +3 -2
- package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +10 -21
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export const description = 'v0.14.56';
|
|
2
|
+
|
|
3
|
+
export default (uniPath, content) => {
|
|
4
|
+
if (!content?.blocks) {
|
|
5
|
+
return content;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
for (const block of content.blocks) {
|
|
9
|
+
adjustRollupItemFoldButtonVersion(block);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return { ...content };
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
function adjustRollupItemFoldButtonVersion(block) {
|
|
16
|
+
if (block.blocks) {
|
|
17
|
+
for (const childBlock of block.blocks) {
|
|
18
|
+
adjustRollupItemFoldButtonVersion(childBlock);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (block.type === 'RollupItem') {
|
|
23
|
+
setRollupItemFoldButtonVersion(block.content);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function setRollupItemFoldButtonVersion(content = {}) {
|
|
28
|
+
if (!content.version || content.version === 'primary') {
|
|
29
|
+
content.foldButtonVersion = 'accordion';
|
|
30
|
+
} else {
|
|
31
|
+
content.foldButtonVersion = 'default';
|
|
32
|
+
}
|
|
33
|
+
}
|
package/bundle/bundle.umd.js
CHANGED
|
@@ -2907,7 +2907,7 @@
|
|
|
2907
2907
|
black: 'bg-black',
|
|
2908
2908
|
white: 'bg-white',
|
|
2909
2909
|
};
|
|
2910
|
-
const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors = [], align = 'text-left', padding, ...rest }) => (jsx(BlockWrapper, { className: style('flex flex-col justify-left', className), defaultPadding: "p-2xl", ...rest, children: jsxs(BaseTile, { className: "h-full", padding: padding, title:
|
|
2910
|
+
const CarouselCatalogCard = JSX(({ className = '', title, description, image, price, button, colors = [], align = 'text-left', padding, ...rest }) => (jsx(BlockWrapper, { className: style('flex flex-col justify-left', className), defaultPadding: "p-2xl", ...rest, children: jsxs(BaseTile, { className: "h-full", padding: padding, title: jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align }), rightImage: image?.src ? (jsx(Img, { className: "flex justify-center align-center mb-xl", image: image })) : null, buttons: renderButtonsSection([button], { buttonClassName: 'w-full self-end' }), children: [colors?.length ? (jsxs("div", { className: "flex text-secondary-text mb-m", children: [jsx("div", { className: "mr-xs", children: jsx(Text, { size: "text-s", align: "text-left", font: "font-light", children: "\u0426\u0432\u0435\u0442\u0430:" }) }), colors.map(renderColorOption)] })) : null, price ? (jsxs(Text, { size: "text-h3", align: "text-left", children: [price, "\u00A0\u20BD"] })) : null] }) })));
|
|
2911
2911
|
const renderColorOption = (color, i) => (jsx("div", { role: "figure", className: `w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${cardStyleMap[color]}` }, String(i)));
|
|
2912
2912
|
|
|
2913
2913
|
const cardColumnsModeStyleMap = {
|
|
@@ -2928,7 +2928,7 @@
|
|
|
2928
2928
|
|
|
2929
2929
|
const MAX_LINKS_COUNT = 10;
|
|
2930
2930
|
|
|
2931
|
-
const CarouselLinks = JSX(({ className, additionalDescription, description, links, title, ...rest }) => (jsx(BlockWrapper, { className: style('overflow-hidden', className), ...rest, children: jsxs("div", { className: "flex flex-col @6xl:flex-row gap-m", children: [jsxs("div", { children: [jsx(Headline, { isEmbedded: true, title: title, description: description, as: "h1", align: "text-left" }),
|
|
2931
|
+
const CarouselLinks = JSX(({ className, additionalDescription, description, links, title, ...rest }) => (jsx(BlockWrapper, { className: style('overflow-hidden', className), ...rest, children: jsxs("div", { className: "flex flex-col @6xl:flex-row gap-m", children: [jsxs("div", { children: [jsx(Headline, { isEmbedded: true, title: title, description: description, as: "h1", align: "text-left" }), jsx(Headline, { className: "pt-m", description: additionalDescription, align: "text-left", isEmbedded: true })] }), links?.length ? renderLinks(links, '@6xl:min-w-[672px] p-0 justify-self-end') : null] }) })));
|
|
2932
2932
|
const renderLinks = (links, className = '') => {
|
|
2933
2933
|
const itemCount = Math.ceil(links.length / MAX_LINKS_COUNT);
|
|
2934
2934
|
return (jsx(Carousel, { className: className, version: "secondary", itemCount: itemCount, arrowsPadded: false, padding: "p-0", children: new Array(itemCount).fill(null).map((_, groupIndex) => (jsx("div", { className: style('flex flex-wrap gap-2xs self-start xl:justify-center @5xl:grid @5xl:grid-cols-2'), children: links
|
|
@@ -2983,15 +2983,16 @@
|
|
|
2983
2983
|
const Tags = JSX(({ className, tags }) => tags?.length ? (jsx("div", { className: style('flex flex-wrap gap-xs', className), role: "list", children: tags.map(renderTag) })) : null);
|
|
2984
2984
|
const renderTag = (tag, key) => (jsx("div", { className: "p-xs border-solid border rounded-md border-gray", role: "listitem", children: jsx(Text, { size: "text-m", font: "font-light", children: tag }) }, String(key)));
|
|
2985
2985
|
|
|
2986
|
-
const BaseProductTile = JSX(
|
|
2986
|
+
const BaseProductTile = JSX(
|
|
2987
|
+
// eslint-disable-next-line max-lines-per-function
|
|
2988
|
+
({ className, padding, defaultPadding, title, description, headlineVersion = 'L', align = 'text-left', benefitsVersion, isTabularBenefits, benefits, __html, isFullWidthTitle, items, isDotted = true, priceList = [], listItemSize, tags = [], buttons, image, imageOptions: { imageAlign = 'center', directionRight = true, isImageAlwaysOnRight, isImageSecondary = false, } = {}, backwardButton, children, ...rest }) => {
|
|
2987
2989
|
const img = image?.src ? jsx(Img, { image: image }) : null;
|
|
2988
|
-
const headline =
|
|
2990
|
+
const headline = (jsx(Headline, { title: title, description: description, headlineVersion: headlineVersion, align: align, isEmbedded: true }));
|
|
2989
2991
|
const filteredBenefits = benefits?.filter((_) => _?.type === 'rte' || 'label' in _ || 'description' in _);
|
|
2990
2992
|
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: jsxs("div", { className: "flex flex-col sm:gap-xl gap-4xl", children: [filteredBenefits?.length ? (jsx(BenefitsList, { benefitsVersion: benefitsVersion, isTabularBenefits: isTabularBenefits, benefits: filteredBenefits })) : null, __html ? jsx(RichText, { __html: __html }) : null, items?.length ? (jsx(List, { items: items, isDotted: isDotted, listItemSize: listItemSize })) : null, children, priceList?.length ? jsx(PriceList, { priceList: priceList }) : null, renderTags(tags)] }) }));
|
|
2991
2993
|
});
|
|
2992
2994
|
const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
|
|
2993
2995
|
const renderTags = (tags) => (tags?.length ? jsx(Tags, { tags: tags }) : null);
|
|
2994
|
-
const renderHeadline = ({ title, description, headlineVersion, align }) => title || description ? (jsx(Headline, { title: title, description: description, headlineVersion: headlineVersion, align: align, isEmbedded: true })) : null;
|
|
2995
2996
|
|
|
2996
2997
|
const LinkWrapper = JSX(({ className = '', href, target, isRemote = false, children }) => {
|
|
2997
2998
|
const link = useLink({ isRemote });
|
|
@@ -3065,7 +3066,7 @@
|
|
|
3065
3066
|
|
|
3066
3067
|
//TODO: replace SocialMedia with renderButtonSection
|
|
3067
3068
|
const CarouselRecommendationCard = JSX(({ className, padding, description, additionalDescription, href, icon, items = [], isDotted, listItemSize = 'S', socialMedia = [], target, title, align = 'text-left', benefits, imageOptions: { directionRight = true, isImageAlwaysOnRight = ImageAlwaysOnRight, isImageSecondary = false, } = {}, ...rest }) => {
|
|
3068
|
-
return (jsx(BlockWrapper, { className: style('relative min-h-28 group-data-gray:bg-main-divider/50', className), defaultPadding: "p-0", ...rest, children: jsx(LinkWrapper, { href: href, target: target, className: "h-full", children: jsxs(BaseTile, { className: "h-full", defaultPadding: "p-2xl", padding: padding, insetTitle:
|
|
3069
|
+
return (jsx(BlockWrapper, { className: style('relative min-h-28 group-data-gray:bg-main-divider/50', className), defaultPadding: "p-0", ...rest, children: jsx(LinkWrapper, { href: href, target: target, className: "h-full", children: jsxs(BaseTile, { className: "h-full", defaultPadding: "p-2xl", padding: padding, insetTitle: jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align }), ...leftOrRightImage(isIcon(icon) ? jsx(Img, { image: icon }) : null, directionRight), buttons: socialMedia.length ? (jsx(SocialMedia, { media: socialMedia, showButtonText: true, version: rest?.version })) : null, isImageAlwaysOnRight: isImageAlwaysOnRight, isImageSecondary: isImageSecondary, imageAlign: "center", children: [jsx(BenefitsList, { benefits: benefits }), jsx(List, { items: items, listItemSize: listItemSize, isDotted: isDotted }), renderAdditionalDescription(additionalDescription, align)] }) }) }));
|
|
3069
3070
|
});
|
|
3070
3071
|
const renderAdditionalDescription = (additionalDescription, align) => additionalDescription ? (jsx(Paragraph, { size: "text-m", font: "font-light", color: "text-secondary-text group-data-secondary:text-white/80", align: align, children: additionalDescription })) : null;
|
|
3071
3072
|
|
|
@@ -5032,7 +5033,9 @@
|
|
|
5032
5033
|
|
|
5033
5034
|
const rollupItemStyles = 'border-0 border-b border-solid border-main-divider last:border-b-0';
|
|
5034
5035
|
|
|
5035
|
-
const RollupItem = JSX(({ className = '', isExpanded, isFoldButtonOnTop = true, label = 'Развернуть', labelIcon, labelIconBgVersion, foldButtonVersion = '
|
|
5036
|
+
const RollupItem = JSX(({ className = '', isExpanded, isFoldButtonOnTop = true, label = 'Развернуть', labelIcon, labelIconBgVersion, foldButtonVersion = 'default',
|
|
5037
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5038
|
+
version, ...rest }) => (jsx(BlockWrapper, { className: style('w-full', rollupItemStyles, className), defaultPadding: "p-0", tag: "div", version: "transparent", ...rest, children: jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: style('gap-lg', foldableSectionStyles), isUnfolded: isUnfolded, children: renderChildren({
|
|
5036
5039
|
...rest,
|
|
5037
5040
|
extraProps: { className: 'w-full', padding: 'p-0' },
|
|
5038
5041
|
}) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({
|
|
@@ -5807,7 +5810,7 @@
|
|
|
5807
5810
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
|
|
5808
5811
|
}
|
|
5809
5812
|
|
|
5810
|
-
const packageVersion = "0.14.
|
|
5813
|
+
const packageVersion = "0.14.56";
|
|
5811
5814
|
|
|
5812
5815
|
exports.Blocks = Blocks;
|
|
5813
5816
|
exports.ContentPage = ContentPage;
|