@redneckz/wildless-cms-uni-blocks 0.14.9 → 0.14.11
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.7.js +32 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +40 -38
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Depository/useDepository.d.ts +1 -1
- package/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +4 -4
- package/bundle/ui-kit/BaseTile/BaseTile.d.ts +1 -1
- package/bundle/ui-kit/Pagination/PageSizeSelector.d.ts +7 -0
- package/bundle/ui-kit/Pagination/Pagination.d.ts +3 -2
- package/bundle/ui-kit/Pagination/PaginationContainer.d.ts +7 -0
- package/bundle/ui-kit/Pagination/paginationBlockStyle.d.ts +1 -0
- package/bundle/ui-kit/Pagination/renderPages.d.ts +2 -2
- package/bundle/utils/formatDate.d.ts +1 -0
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -2
- package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +1 -1
- package/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/ContentPage/ContentPage.js +1 -1
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/Depository/Depository.js +3 -2
- package/dist/components/Depository/Depository.js.map +1 -1
- package/dist/components/Depository/DepositoryItem.js +3 -3
- package/dist/components/Depository/DepositoryItem.js.map +1 -1
- package/dist/components/Depository/useDepository.d.ts +1 -1
- package/dist/components/ProductTile/ProductTile.js +1 -1
- package/dist/components/ProductTile/ProductTile.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 +4 -4
- package/dist/ui-kit/BaseTile/BaseTile.d.ts +1 -1
- package/dist/ui-kit/BaseTile/BaseTile.js +8 -5
- package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/dist/ui-kit/Icon/Icon.js +1 -1
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/Pagination/PageSizeSelector.d.ts +7 -0
- package/dist/ui-kit/Pagination/PageSizeSelector.js +12 -0
- package/dist/ui-kit/Pagination/PageSizeSelector.js.map +1 -0
- package/dist/ui-kit/Pagination/Pagination.d.ts +3 -2
- package/dist/ui-kit/Pagination/Pagination.js +4 -27
- package/dist/ui-kit/Pagination/Pagination.js.map +1 -1
- package/dist/ui-kit/Pagination/PaginationContainer.d.ts +7 -0
- package/dist/ui-kit/Pagination/PaginationContainer.js +31 -0
- package/dist/ui-kit/Pagination/PaginationContainer.js.map +1 -0
- package/dist/ui-kit/Pagination/paginationBlockStyle.d.ts +1 -0
- package/dist/ui-kit/Pagination/paginationBlockStyle.js +4 -0
- package/dist/ui-kit/Pagination/paginationBlockStyle.js.map +1 -0
- package/dist/ui-kit/Pagination/renderPages.d.ts +2 -2
- package/dist/ui-kit/Pagination/renderPages.js +2 -2
- package/dist/ui-kit/Pagination/renderPages.js.map +1 -1
- package/dist/ui-kit/Select/Select.js +1 -1
- package/dist/ui-kit/Select/Select.js.map +1 -1
- package/dist/utils/formatDate.d.ts +1 -0
- package/dist/utils/formatDate.js +5 -0
- package/dist/utils/formatDate.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -2
- package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +1 -1
- package/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/ContentPage/ContentPage.js +1 -1
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/Depository/Depository.js +3 -2
- package/lib/components/Depository/Depository.js.map +1 -1
- package/lib/components/Depository/DepositoryItem.js +3 -3
- package/lib/components/Depository/DepositoryItem.js.map +1 -1
- package/lib/components/Depository/useDepository.d.ts +1 -1
- package/lib/components/ProductTile/ProductTile.js +1 -1
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/Tile/Tile.fixture.d.ts +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 +4 -4
- package/lib/ui-kit/BaseTile/BaseTile.d.ts +1 -1
- package/lib/ui-kit/BaseTile/BaseTile.js +8 -5
- package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/lib/ui-kit/Icon/Icon.js +1 -1
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/Pagination/PageSizeSelector.d.ts +7 -0
- package/lib/ui-kit/Pagination/PageSizeSelector.js +9 -0
- package/lib/ui-kit/Pagination/PageSizeSelector.js.map +1 -0
- package/lib/ui-kit/Pagination/Pagination.d.ts +3 -2
- package/lib/ui-kit/Pagination/Pagination.js +3 -26
- package/lib/ui-kit/Pagination/Pagination.js.map +1 -1
- package/lib/ui-kit/Pagination/PaginationContainer.d.ts +7 -0
- package/lib/ui-kit/Pagination/PaginationContainer.js +28 -0
- package/lib/ui-kit/Pagination/PaginationContainer.js.map +1 -0
- package/lib/ui-kit/Pagination/paginationBlockStyle.d.ts +1 -0
- package/lib/ui-kit/Pagination/paginationBlockStyle.js +2 -0
- package/lib/ui-kit/Pagination/paginationBlockStyle.js.map +1 -0
- package/lib/ui-kit/Pagination/renderPages.d.ts +2 -2
- package/lib/ui-kit/Pagination/renderPages.js +1 -1
- package/lib/ui-kit/Pagination/renderPages.js.map +1 -1
- package/lib/ui-kit/Select/Select.js +1 -1
- package/lib/ui-kit/Select/Select.js.map +1 -1
- package/lib/utils/formatDate.d.ts +1 -0
- package/lib/utils/formatDate.js +2 -0
- package/lib/utils/formatDate.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +15 -12
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Depository/useDepository.d.ts +1 -1
- package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +4 -4
- package/mobile/bundle/ui-kit/BaseTile/BaseTile.d.ts +1 -1
- package/mobile/bundle/ui-kit/Pagination/PageSizeSelector.d.ts +7 -0
- package/mobile/bundle/ui-kit/Pagination/Pagination.d.ts +3 -2
- package/mobile/bundle/ui-kit/Pagination/PaginationContainer.d.ts +7 -0
- package/mobile/bundle/ui-kit/Pagination/paginationBlockStyle.d.ts +1 -0
- package/mobile/bundle/ui-kit/Pagination/renderPages.d.ts +2 -2
- package/mobile/bundle/utils/formatDate.d.ts +1 -0
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -2
- package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js +1 -1
- package/mobile/dist/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/Depository/Depository.js +3 -2
- package/mobile/dist/components/Depository/Depository.js.map +1 -1
- package/mobile/dist/components/Depository/DepositoryItem.js +3 -3
- package/mobile/dist/components/Depository/DepositoryItem.js.map +1 -1
- package/mobile/dist/components/Depository/useDepository.d.ts +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.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 +4 -4
- package/mobile/dist/ui-kit/BaseTile/BaseTile.d.ts +1 -1
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js +8 -5
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.js +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/dist/ui-kit/Pagination/PageSizeSelector.d.ts +7 -0
- package/mobile/dist/ui-kit/Pagination/PageSizeSelector.js +12 -0
- package/mobile/dist/ui-kit/Pagination/PageSizeSelector.js.map +1 -0
- package/mobile/dist/ui-kit/Pagination/Pagination.d.ts +3 -2
- package/mobile/dist/ui-kit/Pagination/Pagination.js +4 -27
- package/mobile/dist/ui-kit/Pagination/Pagination.js.map +1 -1
- package/mobile/dist/ui-kit/Pagination/PaginationContainer.d.ts +7 -0
- package/mobile/dist/ui-kit/Pagination/PaginationContainer.js +31 -0
- package/mobile/dist/ui-kit/Pagination/PaginationContainer.js.map +1 -0
- package/mobile/dist/ui-kit/Pagination/paginationBlockStyle.d.ts +1 -0
- package/mobile/dist/ui-kit/Pagination/paginationBlockStyle.js +4 -0
- package/mobile/dist/ui-kit/Pagination/paginationBlockStyle.js.map +1 -0
- package/mobile/dist/ui-kit/Pagination/renderPages.d.ts +2 -2
- package/mobile/dist/ui-kit/Pagination/renderPages.js +2 -2
- package/mobile/dist/ui-kit/Pagination/renderPages.js.map +1 -1
- package/mobile/dist/ui-kit/Select/Select.js +1 -1
- package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
- package/mobile/dist/utils/formatDate.d.ts +1 -0
- package/mobile/dist/utils/formatDate.js +5 -0
- package/mobile/dist/utils/formatDate.js.map +1 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +2 -2
- package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js +1 -1
- package/mobile/lib/components/CarouselInvestmentCard/CarouselInvestmentCard.js.map +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js +1 -1
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/Depository/Depository.js +3 -2
- package/mobile/lib/components/Depository/Depository.js.map +1 -1
- package/mobile/lib/components/Depository/DepositoryItem.js +3 -3
- package/mobile/lib/components/Depository/DepositoryItem.js.map +1 -1
- package/mobile/lib/components/Depository/useDepository.d.ts +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.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 +4 -4
- package/mobile/lib/ui-kit/BaseTile/BaseTile.d.ts +1 -1
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js +8 -5
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.js +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/lib/ui-kit/Pagination/PageSizeSelector.d.ts +7 -0
- package/mobile/lib/ui-kit/Pagination/PageSizeSelector.js +9 -0
- package/mobile/lib/ui-kit/Pagination/PageSizeSelector.js.map +1 -0
- package/mobile/lib/ui-kit/Pagination/Pagination.d.ts +3 -2
- package/mobile/lib/ui-kit/Pagination/Pagination.js +3 -26
- package/mobile/lib/ui-kit/Pagination/Pagination.js.map +1 -1
- package/mobile/lib/ui-kit/Pagination/PaginationContainer.d.ts +7 -0
- package/mobile/lib/ui-kit/Pagination/PaginationContainer.js +28 -0
- package/mobile/lib/ui-kit/Pagination/PaginationContainer.js.map +1 -0
- package/mobile/lib/ui-kit/Pagination/paginationBlockStyle.d.ts +1 -0
- package/mobile/lib/ui-kit/Pagination/paginationBlockStyle.js +2 -0
- package/mobile/lib/ui-kit/Pagination/paginationBlockStyle.js.map +1 -0
- package/mobile/lib/ui-kit/Pagination/renderPages.d.ts +2 -2
- package/mobile/lib/ui-kit/Pagination/renderPages.js +1 -1
- package/mobile/lib/ui-kit/Pagination/renderPages.js.map +1 -1
- package/mobile/lib/ui-kit/Select/Select.js +1 -1
- package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
- package/mobile/lib/utils/formatDate.d.ts +1 -0
- package/mobile/lib/utils/formatDate.js +2 -0
- package/mobile/lib/utils/formatDate.js.map +1 -0
- package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +2 -2
- package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +1 -1
- package/mobile/src/components/ContentPage/ContentPage.tsx +1 -1
- package/mobile/src/components/Depository/Depository.tsx +5 -2
- package/mobile/src/components/Depository/DepositoryItem.tsx +3 -3
- package/mobile/src/components/Depository/useDepository.ts +1 -1
- package/mobile/src/components/ProductTile/ProductTile.example.json +1 -1
- package/mobile/src/components/ProductTile/ProductTile.tsx +1 -1
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +6 -5
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +4 -4
- package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +24 -18
- package/mobile/src/ui-kit/Icon/Icon.tsx +1 -1
- package/mobile/src/ui-kit/Pagination/PageSizeSelector.tsx +27 -0
- package/mobile/src/ui-kit/Pagination/Pagination.tsx +26 -80
- package/mobile/src/ui-kit/Pagination/PaginationContainer.tsx +87 -0
- package/mobile/src/ui-kit/Pagination/paginationBlockStyle.ts +2 -0
- package/mobile/src/ui-kit/Pagination/renderPages.tsx +3 -2
- package/mobile/src/ui-kit/Select/Select.tsx +2 -2
- package/mobile/src/utils/formatDate.ts +1 -0
- package/package.json +1 -1
- package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +2 -2
- package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.tsx +1 -1
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +1 -1
- package/src/components/ContentPage/ContentPage.tsx +1 -1
- package/src/components/Depository/Depository.fixture.tsx +2 -0
- package/src/components/Depository/Depository.tsx +5 -2
- package/src/components/Depository/DepositoryItem.tsx +3 -3
- package/src/components/Depository/useDepository.ts +1 -1
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +1 -1
- package/src/components/ProductTile/ProductTile.example.json +1 -1
- package/src/components/ProductTile/ProductTile.tsx +1 -1
- package/src/components/Tile/Tile.fixture.tsx +1 -2
- package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +6 -5
- package/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +4 -4
- package/src/ui-kit/BaseTile/BaseTile.tsx +24 -18
- package/src/ui-kit/Icon/Icon.tsx +1 -1
- package/src/ui-kit/Pagination/PageSizeSelector.tsx +27 -0
- package/src/ui-kit/Pagination/Pagination.tsx +26 -80
- package/src/ui-kit/Pagination/PaginationContainer.tsx +87 -0
- package/src/ui-kit/Pagination/paginationBlockStyle.ts +2 -0
- package/src/ui-kit/Pagination/renderPages.tsx +3 -2
- package/src/ui-kit/Select/Select.tsx +2 -2
- package/src/utils/formatDate.ts +1 -0
- package/tailwind.config.cjs +20 -1
- package/bundle/utils/convertTimestampToDate.d.ts +0 -1
- package/dist/utils/convertTimestampToDate.d.ts +0 -1
- package/dist/utils/convertTimestampToDate.js +0 -16
- package/dist/utils/convertTimestampToDate.js.map +0 -1
- package/lib/utils/convertTimestampToDate.d.ts +0 -1
- package/lib/utils/convertTimestampToDate.js +0 -13
- package/lib/utils/convertTimestampToDate.js.map +0 -1
- package/mobile/bundle/utils/convertTimestampToDate.d.ts +0 -1
- package/mobile/dist/utils/convertTimestampToDate.d.ts +0 -1
- package/mobile/dist/utils/convertTimestampToDate.js +0 -16
- package/mobile/dist/utils/convertTimestampToDate.js.map +0 -1
- package/mobile/lib/utils/convertTimestampToDate.d.ts +0 -1
- package/mobile/lib/utils/convertTimestampToDate.js +0 -13
- package/mobile/lib/utils/convertTimestampToDate.js.map +0 -1
- package/mobile/src/utils/convertTimestampToDate.ts +0 -15
- package/src/utils/convertTimestampToDate.ts +0 -15
package/bundle/bundle.umd.js
CHANGED
|
@@ -789,7 +789,7 @@
|
|
|
789
789
|
if (className?.includes('h-')) {
|
|
790
790
|
return {};
|
|
791
791
|
}
|
|
792
|
-
return { height: isOnlyDigits(height) ? `${height}px` : height };
|
|
792
|
+
return { height: isOnlyDigits(height) ? `${height}px` : height, width: 'auto' };
|
|
793
793
|
};
|
|
794
794
|
const getSvgSize = (width) => (width ? '' : 'w-full h-full');
|
|
795
795
|
const Background = JSX(({ className, children }) => className ? jsx("div", { className: className, children: children }) : children);
|
|
@@ -2622,24 +2622,27 @@
|
|
|
2622
2622
|
center: '@xl:self-center',
|
|
2623
2623
|
end: '@xl:self-end',
|
|
2624
2624
|
};
|
|
2625
|
-
const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign,
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
const
|
|
2625
|
+
const BaseTile = JSX(({ className, defaultPadding, padding, title = '', insetTitle = '', buttons, leftImage, rightImage, imageAlign, isImageAlwaysOnRight = false, isImageSecondary, children, }) => (jsxs("div", { className: style('relative flex flex-col gap-3xl font-sans overflow-hidden', padding || defaultPadding, className), children: [title ? jsx("div", { className: "relative", children: title }) : null, jsxs("div", { className: style('grow relative flex flex-col-reverse @xl:flex-row justify-around @xl:justify-between items-stretch gap-3xl'), children: [renderImageContainer(leftImage, { imageAlign }), jsxs("div", { className: style('grid gap-3xl', rightImage ? '@xl:grid-cols-2' : '', leftImage ? '' : 'grow'), children: [jsxs("div", { className: "grow grid gap-3xl row-span-1", children: [insetTitle, children] }), renderImageContainer(rightImage, {
|
|
2626
|
+
className: style('@xl:justify-self-end row-start-1 @xl:row-end-3 @xl:col-start-2', positionStyle(isImageAlwaysOnRight), isImageSecondary ? 'hidden @xl:block' : ''),
|
|
2627
|
+
imageAlign,
|
|
2628
|
+
}), jsx("div", { className: "self-end", children: buttons })] })] })] })));
|
|
2629
|
+
const positionStyle = (isImageAlwaysOnRight) => isImageAlwaysOnRight
|
|
2630
|
+
? 'ml-xl justify-self-end row-start-1 row-end-3 col-start-2 self-center'
|
|
2631
|
+
: '';
|
|
2632
|
+
const renderImageContainer = (image, { className, imageAlign }) => image ? (jsx("div", { className: style('shrink-1/2 justify-self-center', imageAlign && imageAlignmentMap[imageAlign], className), children: image })) : null;
|
|
2630
2633
|
|
|
2631
2634
|
const cardStyleMap = {
|
|
2632
2635
|
black: 'bg-black',
|
|
2633
2636
|
white: 'bg-white',
|
|
2634
2637
|
};
|
|
2635
|
-
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: title ? (jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align })) : null, rightImage: image?.src ? (jsx(Img, { className: "flex justify-center align-center mb-xl", image: image })) : null, buttons: renderButtonsSection([button], { buttonClassName: 'w-full
|
|
2638
|
+
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: title ? (jsx(Headline, { title: title, description: description, headlineVersion: "XS", isEmbedded: true, align: align })) : null, 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] }) })));
|
|
2636
2639
|
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)));
|
|
2637
2640
|
|
|
2638
2641
|
const cardColumnsModeStyleMap = {
|
|
2639
2642
|
1: 'grid-cols-1',
|
|
2640
2643
|
2: 'grid-cols-2',
|
|
2641
2644
|
};
|
|
2642
|
-
const CarouselInvestmentCard = JSX(({ className, padding, additionalDescription, cardsList = [], columnsMode = 1, description, image, title, ...rest }) => (jsx(BlockWrapper, { className: style('text-left', className), padding: "p-0", ...rest, children: jsxs(BaseTile, { className: "h-full", defaultPadding: "p-xl", padding: padding, title: title ? jsx(Heading, { headingType: "h4", as: "h3", className: "mb-m z-10", title: title }) : null,
|
|
2645
|
+
const CarouselInvestmentCard = JSX(({ className, padding, additionalDescription, cardsList = [], columnsMode = 1, description, image, title, ...rest }) => (jsx(BlockWrapper, { className: style('text-left', className), padding: "p-0", ...rest, children: jsxs(BaseTile, { className: "h-full", defaultPadding: "p-xl", padding: padding, title: title ? jsx(Heading, { headingType: "h4", as: "h3", className: "mb-m z-10", title: title }) : null, rightImage: image?.src ? jsx(Img, { image: image }) : null, children: [jsxs("div", { className: "flex justify-between mb-m", children: [description ? (jsx("div", { className: "w-1/3", children: jsx(Text, { size: "text-h6", children: description }) })) : null, additionalDescription ? (jsx(Text, { size: "text-m", font: "font-light", color: "group-data-primary:text-secondary-text", children: additionalDescription })) : null] }), cardsList.length ? (jsx("ul", { className: style('list-none m-0 p-0 grid gap-xs', cardColumnsModeStyleMap[columnsMode]), children: renderCardList(cardsList) })) : null] }) })));
|
|
2643
2646
|
const renderCardList = (cardsList) => cardsList.map((item, i) => (jsxs("li", { children: [item?.parameter ? (jsx("div", { className: "inline pr-xs", children: jsx(Text, { size: "text-h6", children: item.parameter }) })) : null, item?.parameterDescription ? (jsx(Text, { size: "text-m", font: "font-light", color: "text-secondary-text", children: item.parameterDescription })) : null] }, String(i))));
|
|
2644
2647
|
|
|
2645
2648
|
const LINK_CLASS_NAME = `absolute border
|
|
@@ -2746,11 +2749,11 @@
|
|
|
2746
2749
|
const Tags = JSX(({ className, tags }) => tags?.length ? (jsx("div", { className: style('flex flex-wrap gap-xs', className), role: "list", children: tags.map(renderTag) })) : null);
|
|
2747
2750
|
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)));
|
|
2748
2751
|
|
|
2749
|
-
const BaseProductTile = JSX(({ className, padding, defaultPadding, title, description, headlineVersion = 'L', align = 'text-left', benefitsVersion, isTabularBenefits, benefits, __html, isFullWidthTitle = true, items, isDotted = true, listItemSize, tags = [], buttons, image, imageOptions: { imageAlign = '
|
|
2752
|
+
const BaseProductTile = JSX(({ className, padding, defaultPadding, title, description, headlineVersion = 'L', align = 'text-left', benefitsVersion, isTabularBenefits, benefits, __html, isFullWidthTitle = true, items, isDotted = true, listItemSize, tags = [], buttons, image, imageOptions: { imageAlign = 'center', directionRight = true, isImageAlwaysOnRight, isImageSecondary = false, } = {}, children, }) => {
|
|
2750
2753
|
const img = image?.src ? jsx(Img, { image: image }) : null;
|
|
2751
2754
|
const headline = renderHeadline({ title, description, headlineVersion, align });
|
|
2752
2755
|
const filteredBenefits = benefits?.filter((_) => _?.type === 'rte' || 'label' in _ || 'description' in _);
|
|
2753
|
-
return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? { insetTitle: headline } : { title: headline }), ...
|
|
2756
|
+
return (jsx(BaseTile, { className: className, padding: padding, defaultPadding: defaultPadding, ...(isFullWidthTitle ? { insetTitle: headline } : { title: headline }), ...leftOrRightImage(img, directionRight), isImageSecondary: isImageSecondary, imageAlign: imageAlign, isImageAlwaysOnRight: isImageAlwaysOnRight, buttons: renderButtonsSection(buttons), 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, renderTags(tags)] }) }));
|
|
2754
2757
|
});
|
|
2755
2758
|
const leftOrRightImage = (img, directionRight) => directionRight ? { rightImage: img } : { leftImage: img };
|
|
2756
2759
|
const renderTags = (tags) => (tags?.length ? jsx(Tags, { tags: tags }) : null);
|
|
@@ -2821,7 +2824,7 @@
|
|
|
2821
2824
|
|
|
2822
2825
|
//TODO: replace SocialMedia with renderButtonSection
|
|
2823
2826
|
const CarouselRecommendationCard = JSX(({ className, padding, description, href, icon, items = [], listItemSize = 'S', socialMedia = [], target, title, align = 'text-left', ...rest }) => {
|
|
2824
|
-
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: jsx(BaseTile, { className: "h-full", defaultPadding: "p-m", padding: padding, title: title ? (jsx(Headline, { title: title, description: description, headlineVersion: "S", isEmbedded: true, align: align })) : null,
|
|
2827
|
+
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: jsx(BaseTile, { className: "h-full", defaultPadding: "p-m", padding: padding, title: title ? (jsx(Headline, { title: title, description: description, headlineVersion: "S", isEmbedded: true, align: align })) : null, rightImage: icon?.icon || icon?.src ? jsx(Img, { image: icon }) : null, buttons: socialMedia.length ? jsx(SocialMedia, { media: socialMedia, showButtonText: true }) : null, children: items.length ? jsx(List, { items: items, listItemSize: listItemSize }) : null }) }) }));
|
|
2825
2828
|
});
|
|
2826
2829
|
|
|
2827
2830
|
const CarouselRichTextCard = JSX(({ className = '', __html, richVersion = 'striped', ...rest }) => (jsx(BlockWrapper, { className: className, ...rest, children: jsx(RichText, { __html: __html, richVersion: richVersion }) })));
|
|
@@ -3098,6 +3101,14 @@
|
|
|
3098
3101
|
sourceBook: sourceBookSchema,
|
|
3099
3102
|
});
|
|
3100
3103
|
|
|
3104
|
+
const DEFAULT_OPTIONS = [{ key: '10' }, { key: '50' }, { key: '100' }];
|
|
3105
|
+
const PageSizeSelector = ({ itemCount, onItemCountChange }) => {
|
|
3106
|
+
const handleItemCountChange = useCallback(({ key }) => onItemCountChange(Number(key)), []);
|
|
3107
|
+
return (jsxs("div", { className: "flex items-center gap-s", children: [jsx("span", { children: "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u043E" }), jsx(Select, { onChange: handleItemCountChange, value: { key: String(itemCount) }, options: DEFAULT_OPTIONS })] }));
|
|
3108
|
+
};
|
|
3109
|
+
|
|
3110
|
+
const paginationBlockStyle = 'py-m px-lg rounded-md cursor-pointer hover:bg-green-more-dark hover:text-white';
|
|
3111
|
+
|
|
3101
3112
|
const checkPageRange = (page, currentPage, totalPages) => (currentPage <= 3 && page <= currentPage + 3) ||
|
|
3102
3113
|
(currentPage >= totalPages - 1 && page >= totalPages - 4);
|
|
3103
3114
|
const shouldRenderPage = (page, currentPage, totalPages) => (page < currentPage && page >= currentPage - 2) ||
|
|
@@ -3116,9 +3127,13 @@
|
|
|
3116
3127
|
return null;
|
|
3117
3128
|
};
|
|
3118
3129
|
|
|
3119
|
-
const paginationBlockStyle = 'py-m px-lg rounded-md cursor-pointer hover:bg-green-more-dark hover:text-white';
|
|
3120
3130
|
const ICON_SIZE$1 = { width: '24', height: '24' };
|
|
3121
|
-
const
|
|
3131
|
+
const PaginationContainer = ({ currentPage, onPageChange, totalPages, }) => {
|
|
3132
|
+
const pages = useMemo(() => new Array(totalPages).fill({
|
|
3133
|
+
currentPage,
|
|
3134
|
+
onPageChange,
|
|
3135
|
+
totalPages,
|
|
3136
|
+
}), [totalPages, currentPage]);
|
|
3122
3137
|
const handlePrevPage = useCallback(() => {
|
|
3123
3138
|
if (currentPage > 1) {
|
|
3124
3139
|
onPageChange(currentPage - 1);
|
|
@@ -3131,32 +3146,18 @@
|
|
|
3131
3146
|
}, [currentPage, totalPages]);
|
|
3132
3147
|
const handleFirstPage = useCallback(() => onPageChange(1), []);
|
|
3133
3148
|
const handleLastPage = useCallback(() => onPageChange(totalPages), [totalPages]);
|
|
3134
|
-
|
|
3135
|
-
currentPage,
|
|
3136
|
-
onPageChange,
|
|
3137
|
-
totalPages,
|
|
3138
|
-
}), [totalPages, currentPage]);
|
|
3139
|
-
return (jsx("div", { className: "mt-3xl flex items-center select-none", role: "navigation", "aria-label": "\u041F\u0430\u0433\u0438\u043D\u0430\u0446\u0438\u044F", children: jsxs("div", { className: "flex gap-m items-center", children: [jsx("div", { onClick: handlePrevPage, children: jsx(Icon, { name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === 1), ...ICON_SIZE$1 }) }), jsxs("div", { className: "flex gap-xs", children: [currentPage > 1 ? (jsx("div", { onClick: handleFirstPage, className: paginationBlockStyle, "aria-label": "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 1", children: "1" })) : null, currentPage > 4 ? jsx("div", { className: "py-m px-s", children: "..." }) : null, pages.map(renderPages), currentPage < totalPages - 3 ? jsx("div", { className: "py-m px-s", children: "..." }) : null, currentPage < totalPages ? (jsx("div", { onClick: handleLastPage, className: paginationBlockStyle, "aria-label": `Страница ${totalPages}}`, children: totalPages })) : null] }), jsx("div", { onClick: handleNextPage, children: jsx(Icon, { className: "rotate-180", name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === totalPages), ...ICON_SIZE$1 }) })] }) }));
|
|
3149
|
+
return (jsxs("div", { className: "flex gap-m items-center", children: [jsx("div", { onClick: handlePrevPage, children: jsx(Icon, { name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === 1), ...ICON_SIZE$1 }) }), jsxs("div", { className: "flex gap-xs", children: [currentPage > 1 ? (jsx("div", { onClick: handleFirstPage, className: paginationBlockStyle, "aria-label": "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 1", children: "1" })) : null, currentPage > 4 ? jsx("div", { className: "py-m px-s", children: "..." }) : null, pages.map(renderPages), currentPage < totalPages - 3 ? jsx("div", { className: "py-m px-s", children: "..." }) : null, currentPage < totalPages ? (jsx("div", { onClick: handleLastPage, className: paginationBlockStyle, "aria-label": `Страница ${totalPages}}`, children: totalPages })) : null] }), jsx("div", { onClick: handleNextPage, children: jsx(Icon, { className: "rotate-180", name: "ArrowLeftIcon", iconVersion: "black", imageClassName: getIconStyle(currentPage === totalPages), ...ICON_SIZE$1 }) })] }));
|
|
3140
3150
|
};
|
|
3141
3151
|
const getIconStyle = (condition) => condition ? 'opacity-20' : 'cursor-pointer hover:opacity-60';
|
|
3142
3152
|
|
|
3143
|
-
const
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
if (dd < 10) {
|
|
3147
|
-
dd = '0' + dd;
|
|
3148
|
-
}
|
|
3149
|
-
let mm = date.getMonth() + 1;
|
|
3150
|
-
if (mm < 10) {
|
|
3151
|
-
mm = '0' + mm;
|
|
3152
|
-
}
|
|
3153
|
-
return dd + '.' + mm + '.' + date.getFullYear();
|
|
3154
|
-
};
|
|
3153
|
+
const Pagination = ({ currentPage, onPageChange, totalPages, itemCount, onItemCountChange, }) => (jsxs("div", { className: "mt-3xl flex justify-between items-center select-none", role: "navigation", "aria-label": "\u041F\u0430\u0433\u0438\u043D\u0430\u0446\u0438\u044F", children: [jsx(PaginationContainer, { currentPage: currentPage, onPageChange: onPageChange, totalPages: totalPages }), itemCount && onItemCountChange ? (jsx(PageSizeSelector, { itemCount: itemCount, onItemCountChange: onItemCountChange })) : null] }));
|
|
3154
|
+
|
|
3155
|
+
const formatDate$1 = (date) => date.split('-').reverse().join('.');
|
|
3155
3156
|
|
|
3156
|
-
const DepositoryItem = ({ title, timestamp =
|
|
3157
|
+
const DepositoryItem = ({ title, timestamp = '', publicId }) => {
|
|
3157
3158
|
const link = useLink();
|
|
3158
3159
|
const { href } = link({ href: `/api/v1/depository/${publicId}/file` });
|
|
3159
|
-
return (jsxs("div", { className: "grid grid-cols-12 py-lg border-gray border-opacity-50 border-b", children: [jsx("div", { className: "col-span-2 text-m", children: jsx("span", { children:
|
|
3160
|
+
return (jsxs("div", { className: "grid grid-cols-12 py-lg border-gray border-opacity-50 border-b", children: [jsx("div", { className: "col-span-2 text-m", children: jsx("span", { children: formatDate$1(timestamp) }) }), jsx("div", { className: "col-span-10 text-h6 hover:text-primary-active", children: jsx("a", { href: href, download: true, "aria-label": "\u0421\u043A\u0430\u0447\u0430\u0442\u044C", children: title }) })] }, publicId));
|
|
3160
3161
|
};
|
|
3161
3162
|
|
|
3162
3163
|
const useDepository = (size, page) => {
|
|
@@ -3167,10 +3168,11 @@
|
|
|
3167
3168
|
const DEFAULT_ITEMS_COUNT = 10;
|
|
3168
3169
|
const Depository = JSX(({ className, ...rest }) => {
|
|
3169
3170
|
const [currentPage, setCurrentPage] = useState(0);
|
|
3170
|
-
const [itemCount] = useState(DEFAULT_ITEMS_COUNT);
|
|
3171
|
+
const [itemCount, setItemCount] = useState(DEFAULT_ITEMS_COUNT);
|
|
3171
3172
|
const { totalPages = 0, items } = useDepository(itemCount, currentPage);
|
|
3172
3173
|
const handleChangePage = useCallback((page) => setCurrentPage(page - 1), []);
|
|
3173
|
-
|
|
3174
|
+
const handleItemCountChange = useCallback((count) => setItemCount(count), []);
|
|
3175
|
+
return (jsx(BlockWrapper, { className: style(className, 'container p-4xl'), ...rest, children: jsxs("div", { className: "flex flex-col", children: [jsxs("div", { className: "grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b", children: [jsx("span", { className: "col-span-2 text-gray text-m", children: "\u0414\u0430\u0442\u0430" }), jsx("span", { className: "col-span-10 text-gray text-m", children: "\u0422\u0435\u043C\u0430" })] }), items?.map((params) => (jsx(DepositoryItem, { ...params }, String(params.publicId)))), jsx(Pagination, { currentPage: currentPage + 1, onPageChange: handleChangePage, totalPages: totalPages + 1, itemCount: itemCount, onItemCountChange: handleItemCountChange })] }) }));
|
|
3174
3176
|
});
|
|
3175
3177
|
|
|
3176
3178
|
const renderErrorContent = (error) => {
|
|
@@ -4627,7 +4629,7 @@
|
|
|
4627
4629
|
return (jsxs("button", { type: "button", onClick: () => onClick(i), "aria-label": nav?.title, className: style('relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50', btnClassName), children: [jsx("div", { className: btnTitleClassName, children: nav?.title }), jsx("div", { className: btnDescClassName, children: nav?.description })] }, String(i)));
|
|
4628
4630
|
};
|
|
4629
4631
|
|
|
4630
|
-
const ProductTile = JSX(({ className, padding, headlineVersion = 'S', isTabularBenefits = true, additionalDescription, imageOptions, ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-4xl sm:p-xl", padding: padding, headlineVersion: headlineVersion, isTabularBenefits: isTabularBenefits, imageOptions: {
|
|
4632
|
+
const ProductTile = JSX(({ className, padding, headlineVersion = 'S', isTabularBenefits = true, additionalDescription, imageOptions, ...rest }) => (jsx(BlockWrapper, { className: className, padding: "p-0", ...rest, children: jsx(BaseProductTile, { className: "h-full", defaultPadding: "p-4xl sm:p-xl", padding: padding, headlineVersion: headlineVersion, isTabularBenefits: isTabularBenefits, imageOptions: { isImageSecondary: true, ...imageOptions }, ...rest, children: additionalDescription ? (jsx(Paragraph, { size: "text-m", font: "font-light", color: "group-data-primary:text-secondary-text", children: additionalDescription })) : null }) })));
|
|
4631
4633
|
|
|
4632
4634
|
const PromoTile = JSX(({ className, title = 'Акции и спецпредложения', description, headlineVersion = 'S', date, buttons = [], ...rest }) => (jsx(BlockWrapper, { className: style('box-border', className), ...rest, children: jsxs(BaseTile, { className: "h-full", title: title ? (jsx(Headline, { title: title, headlineVersion: headlineVersion, align: "text-left", isEmbedded: true })) : null, buttons: renderButtonsSection(buttons), children: [date ? jsx("div", { className: "text-s mb-xs", children: formatDate(date) }) : null, jsx("div", { className: "text-l", children: description })] }) })));
|
|
4633
4635
|
function formatDate(date) {
|
|
@@ -5439,7 +5441,7 @@
|
|
|
5439
5441
|
parent: data,
|
|
5440
5442
|
};
|
|
5441
5443
|
useBlockRouterProvider();
|
|
5442
|
-
return (jsxs("div", { "data-theme": colorPalette, children: [jsxs("section", { className: style('relative', pageStyle, className), children: [slots?.header ? (jsx("div", { className: "relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, { ...options, slotName: 'header' }) })) : null, jsxs("div", { className: "container space-y-px @lg:space-y-0 @lg:grid @lg:grid-cols-12 @lg:gap-2xs", children: [renderChildren({ block: data, options, extraProps: { className: 'scroll-mt-12' } }), renderBlocksList(slots?.footer, { ...options, slotName: 'footer' })] }), likeControl ? renderLikeControl() : null] }), jsx(StickyBottomMenu, {}), jsx(DialogManager, {}), jsx(PopupManager, {}), jsx(CookiePopup, { termLink: { href: '/pd-policy#cookie', target: '_blank' }, personalDataPolicyLink: { href: '/pd-policy', target: '_blank' } })] }));
|
|
5444
|
+
return (jsxs("div", { "data-theme": colorPalette, children: [jsxs("section", { className: style('@container relative', pageStyle, className), children: [slots?.header ? (jsx("div", { className: "relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]", children: renderBlocksList(slots?.header, { ...options, slotName: 'header' }) })) : null, jsxs("div", { className: "container space-y-px @lg:space-y-0 @lg:grid @lg:grid-cols-12 @lg:gap-2xs", children: [renderChildren({ block: data, options, extraProps: { className: 'scroll-mt-12' } }), renderBlocksList(slots?.footer, { ...options, slotName: 'footer' })] }), likeControl ? renderLikeControl() : null] }), jsx(StickyBottomMenu, {}), jsx(DialogManager, {}), jsx(PopupManager, {}), jsx(CookiePopup, { termLink: { href: '/pd-policy#cookie', target: '_blank' }, personalDataPolicyLink: { href: '/pd-policy', target: '_blank' } })] }));
|
|
5443
5445
|
});
|
|
5444
5446
|
ContentPage.childrenTypes = [];
|
|
5445
5447
|
ContentPage.slots = () => ['header', 'footer', 'StickyBottomMenu'];
|
|
@@ -5447,7 +5449,7 @@
|
|
|
5447
5449
|
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" }) }));
|
|
5448
5450
|
}
|
|
5449
5451
|
|
|
5450
|
-
const packageVersion = "0.14.
|
|
5452
|
+
const packageVersion = "0.14.11";
|
|
5451
5453
|
|
|
5452
5454
|
exports.Blocks = Blocks;
|
|
5453
5455
|
exports.ContentPage = ContentPage;
|