@redneckz/wildless-cms-uni-blocks 0.14.20 → 0.14.22
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.20.js +30 -0
- package/bin/migration-scripts/0.14.21.js +33 -0
- package/bin/migration-scripts/0.14.7.js +1 -4
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +18 -20
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +2 -2
- package/bundle/components/BonusBenefitsBlock/renderBonusBenefit.d.ts +2 -1
- package/bundle/components/BonusBenefitsBlock/renderBonusBenefits.d.ts +2 -2
- package/bundle/components/BonusBenefitsBlock/renderBonusBenefits.mobile.d.ts +2 -2
- package/bundle/components/Footer/SocialMedia.d.ts +3 -1
- package/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -0
- package/bundle/content-page-repository/transformAttachmentLink.d.ts +3 -0
- package/bundle/content-page-repository/transformContentPage.d.ts +3 -2
- package/bundle/ui-kit/List/ListContent.d.ts +0 -1
- package/dist/api/CorporateLeadAPI.js +3 -0
- package/dist/api/CorporateLeadAPI.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +2 -2
- package/dist/components/BonusBenefitsBlock/renderBonusBenefit.d.ts +2 -1
- package/dist/components/BonusBenefitsBlock/renderBonusBenefit.js +1 -2
- package/dist/components/BonusBenefitsBlock/renderBonusBenefit.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/renderBonusBenefits.d.ts +2 -2
- package/dist/components/BonusBenefitsBlock/renderBonusBenefits.js +1 -2
- package/dist/components/BonusBenefitsBlock/renderBonusBenefits.js.map +1 -1
- package/dist/components/BonusBenefitsBlock/renderBonusBenefits.mobile.d.ts +2 -2
- package/dist/components/BonusBenefitsBlock/renderBonusBenefits.mobile.js +1 -1
- package/dist/components/BonusBenefitsBlock/renderBonusBenefits.mobile.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.js +1 -1
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/SocialMedia.d.ts +3 -1
- package/dist/components/Footer/SocialMedia.js +4 -3
- package/dist/components/Footer/SocialMedia.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +5 -2
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -0
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/dist/content-page-repository/transformAttachmentLink.d.ts +3 -0
- package/dist/content-page-repository/transformAttachmentLink.js +33 -0
- package/dist/content-page-repository/transformAttachmentLink.js.map +1 -0
- package/dist/content-page-repository/transformContentPage.d.ts +3 -2
- package/dist/content-page-repository/transformContentPage.js +7 -1
- package/dist/content-page-repository/transformContentPage.js.map +1 -1
- package/dist/content-page-repository/transformDocument.js +1 -1
- package/dist/content-page-repository/transformDocument.js.map +1 -1
- package/dist/content-page-repository/transformImg.js +1 -1
- package/dist/content-page-repository/transformImg.js.map +1 -1
- package/dist/ui-kit/List/ListContent.d.ts +0 -1
- package/lib/api/CorporateLeadAPI.js +3 -0
- package/lib/api/CorporateLeadAPI.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +2 -2
- package/lib/components/BonusBenefitsBlock/renderBonusBenefit.d.ts +2 -1
- package/lib/components/BonusBenefitsBlock/renderBonusBenefit.js +1 -2
- package/lib/components/BonusBenefitsBlock/renderBonusBenefit.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/renderBonusBenefits.d.ts +2 -2
- package/lib/components/BonusBenefitsBlock/renderBonusBenefits.js +1 -2
- package/lib/components/BonusBenefitsBlock/renderBonusBenefits.js.map +1 -1
- package/lib/components/BonusBenefitsBlock/renderBonusBenefits.mobile.d.ts +2 -2
- package/lib/components/BonusBenefitsBlock/renderBonusBenefits.mobile.js +1 -1
- package/lib/components/BonusBenefitsBlock/renderBonusBenefits.mobile.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.js +1 -1
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/SocialMedia.d.ts +3 -1
- package/lib/components/Footer/SocialMedia.js +4 -3
- package/lib/components/Footer/SocialMedia.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.js +5 -2
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -0
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/lib/content-page-repository/transformAttachmentLink.d.ts +3 -0
- package/lib/content-page-repository/transformAttachmentLink.js +27 -0
- package/lib/content-page-repository/transformAttachmentLink.js.map +1 -0
- package/lib/content-page-repository/transformContentPage.d.ts +3 -2
- package/lib/content-page-repository/transformContentPage.js +6 -0
- package/lib/content-page-repository/transformContentPage.js.map +1 -1
- package/lib/content-page-repository/transformDocument.js +1 -1
- package/lib/content-page-repository/transformDocument.js.map +1 -1
- package/lib/content-page-repository/transformImg.js +1 -1
- package/lib/content-page-repository/transformImg.js.map +1 -1
- package/lib/ui-kit/List/ListContent.d.ts +0 -1
- package/mobile/bundle/bundle.umd.js +19 -12
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +2 -2
- package/mobile/bundle/components/BonusBenefitsBlock/renderBonusBenefit.d.ts +2 -1
- package/mobile/bundle/components/BonusBenefitsBlock/renderBonusBenefits.d.ts +2 -2
- package/mobile/bundle/components/Footer/SocialMedia.d.ts +3 -1
- package/mobile/bundle/components/ProductBlock/ProductBlockContent.d.ts +2 -0
- package/mobile/bundle/content-page-repository/transformAttachmentLink.d.ts +3 -0
- package/mobile/bundle/content-page-repository/transformContentPage.d.ts +3 -2
- package/mobile/bundle/ui-kit/List/ListContent.d.ts +0 -1
- package/mobile/dist/api/CorporateLeadAPI.js +3 -0
- package/mobile/dist/api/CorporateLeadAPI.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +2 -2
- package/mobile/dist/components/BonusBenefitsBlock/renderBonusBenefit.d.ts +2 -1
- package/mobile/dist/components/BonusBenefitsBlock/renderBonusBenefit.js +1 -2
- package/mobile/dist/components/BonusBenefitsBlock/renderBonusBenefit.js.map +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/renderBonusBenefits.d.ts +2 -2
- package/mobile/dist/components/BonusBenefitsBlock/renderBonusBenefits.js +1 -1
- package/mobile/dist/components/BonusBenefitsBlock/renderBonusBenefits.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/SocialMedia.d.ts +3 -1
- package/mobile/dist/components/Footer/SocialMedia.js +4 -3
- package/mobile/dist/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js +5 -2
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +2 -0
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/dist/content-page-repository/transformAttachmentLink.d.ts +3 -0
- package/mobile/dist/content-page-repository/transformAttachmentLink.js +33 -0
- package/mobile/dist/content-page-repository/transformAttachmentLink.js.map +1 -0
- package/mobile/dist/content-page-repository/transformContentPage.d.ts +3 -2
- package/mobile/dist/content-page-repository/transformContentPage.js +7 -1
- package/mobile/dist/content-page-repository/transformContentPage.js.map +1 -1
- package/mobile/dist/content-page-repository/transformDocument.js +1 -1
- package/mobile/dist/content-page-repository/transformDocument.js.map +1 -1
- package/mobile/dist/content-page-repository/transformImg.js +1 -1
- package/mobile/dist/content-page-repository/transformImg.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListContent.d.ts +0 -1
- package/mobile/lib/api/CorporateLeadAPI.js +3 -0
- package/mobile/lib/api/CorporateLeadAPI.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/BonusBenefitsBlockContent.d.ts +2 -2
- package/mobile/lib/components/BonusBenefitsBlock/renderBonusBenefit.d.ts +2 -1
- package/mobile/lib/components/BonusBenefitsBlock/renderBonusBenefit.js +1 -2
- package/mobile/lib/components/BonusBenefitsBlock/renderBonusBenefit.js.map +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/renderBonusBenefits.d.ts +2 -2
- package/mobile/lib/components/BonusBenefitsBlock/renderBonusBenefits.js +1 -1
- package/mobile/lib/components/BonusBenefitsBlock/renderBonusBenefits.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/SocialMedia.d.ts +3 -1
- package/mobile/lib/components/Footer/SocialMedia.js +4 -3
- package/mobile/lib/components/Footer/SocialMedia.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js +5 -2
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +2 -0
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/lib/content-page-repository/transformAttachmentLink.d.ts +3 -0
- package/mobile/lib/content-page-repository/transformAttachmentLink.js +27 -0
- package/mobile/lib/content-page-repository/transformAttachmentLink.js.map +1 -0
- package/mobile/lib/content-page-repository/transformContentPage.d.ts +3 -2
- package/mobile/lib/content-page-repository/transformContentPage.js +6 -0
- package/mobile/lib/content-page-repository/transformContentPage.js.map +1 -1
- package/mobile/lib/content-page-repository/transformDocument.js +1 -1
- package/mobile/lib/content-page-repository/transformDocument.js.map +1 -1
- package/mobile/lib/content-page-repository/transformImg.js +1 -1
- package/mobile/lib/content-page-repository/transformImg.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListContent.d.ts +0 -1
- package/mobile/src/api/CorporateLeadAPI.ts +4 -0
- package/mobile/src/components/Bonus/Bonus.ui.json +3 -0
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +1 -1
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +1 -1
- package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +2 -2
- package/mobile/src/components/BonusBenefitsBlock/renderBonusBenefit.tsx +26 -23
- package/mobile/src/components/BonusBenefitsBlock/renderBonusBenefits.tsx +3 -8
- package/mobile/src/components/BusinessBlock/BusinessBlock.ui.json +3 -0
- package/mobile/src/components/ButtonsBlock/ButtonsBlock.ui.json +3 -0
- package/mobile/src/components/Calculator/Calculator.ui.json +3 -0
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.ui.json +3 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +3 -1
- package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.ui.json +3 -0
- package/mobile/src/components/Footer/SocialMedia.tsx +8 -5
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +9 -2
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +2 -0
- package/mobile/src/components/ProductGallery/ProductGallery.ui.json +3 -0
- package/mobile/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.ui.json +3 -0
- package/mobile/src/components/StepsBlock/StepsBlock.ui.json +6 -0
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +0 -1
- package/mobile/src/components/TariffsTable/TariffsTable.ui.json +3 -0
- package/mobile/src/content-page-repository/transformAttachmentLink.ts +38 -0
- package/mobile/src/content-page-repository/transformContentPage.ts +13 -4
- package/mobile/src/content-page-repository/transformDocument.ts +1 -1
- package/mobile/src/content-page-repository/transformImg.ts +1 -1
- package/mobile/src/ui-kit/List/ListContent.ts +0 -1
- package/mobile/tailwind.config.cjs +127 -0
- package/package.json +2 -1
- package/src/api/CorporateLeadAPI.ts +4 -0
- package/src/components/Bonus/Bonus.ui.json +3 -0
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +1 -1
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.tsx +1 -1
- package/src/components/BonusBenefitsBlock/BonusBenefitsBlockContent.ts +2 -2
- package/src/components/BonusBenefitsBlock/renderBonusBenefit.tsx +26 -23
- package/src/components/BonusBenefitsBlock/renderBonusBenefits.mobile.tsx +3 -8
- package/src/components/BonusBenefitsBlock/renderBonusBenefits.tsx +4 -5
- package/src/components/BusinessBlock/BusinessBlock.ui.json +3 -0
- package/src/components/ButtonsBlock/ButtonsBlock.ui.json +3 -0
- package/src/components/Calculator/Calculator.ui.json +3 -0
- package/src/components/CarouselProductCard/CarouselProductCard.ui.json +3 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +3 -1
- package/src/components/CarouselTariffsCard/CarouselTariffsCard.ui.json +3 -0
- package/src/components/Footer/Footer.tsx +3 -1
- package/src/components/Footer/SocialMedia.tsx +8 -5
- package/src/components/ProductBlock/ProductBlock.tsx +9 -2
- package/src/components/ProductBlock/ProductBlockContent.ts +2 -0
- package/src/components/ProductGallery/ProductGallery.ui.json +3 -0
- package/src/components/RepresentativeOfficeInfo/RepresentativeOfficeInfo.ui.json +3 -0
- package/src/components/StepsBlock/StepsBlock.ui.json +6 -0
- package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +0 -1
- package/src/components/TariffsTable/TariffsTable.ui.json +3 -0
- package/src/content-page-repository/transformAttachmentLink.ts +38 -0
- package/src/content-page-repository/transformContentPage.ts +13 -4
- package/src/content-page-repository/transformDocument.ts +1 -1
- package/src/content-page-repository/transformImg.ts +1 -1
- package/src/ui-kit/List/ListContent.ts +0 -1
- package/bundle/model/AlignText.d.ts +0 -6
- package/bundle/model/AlignType.d.ts +0 -21
- package/dist/model/AlignText.d.ts +0 -6
- package/dist/model/AlignText.js +0 -11
- package/dist/model/AlignText.js.map +0 -1
- package/dist/model/AlignType.d.ts +0 -21
- package/dist/model/AlignType.js +0 -2
- package/dist/model/AlignType.js.map +0 -1
- package/lib/model/AlignText.d.ts +0 -6
- package/lib/model/AlignText.js +0 -9
- package/lib/model/AlignText.js.map +0 -1
- package/lib/model/AlignType.d.ts +0 -21
- package/lib/model/AlignType.js +0 -2
- package/lib/model/AlignType.js.map +0 -1
- package/mobile/bundle/model/AlignText.d.ts +0 -6
- package/mobile/bundle/model/AlignType.d.ts +0 -21
- package/mobile/dist/model/AlignText.d.ts +0 -6
- package/mobile/dist/model/AlignText.js +0 -11
- package/mobile/dist/model/AlignText.js.map +0 -1
- package/mobile/dist/model/AlignType.d.ts +0 -21
- package/mobile/dist/model/AlignType.js +0 -2
- package/mobile/dist/model/AlignType.js.map +0 -1
- package/mobile/lib/model/AlignText.d.ts +0 -6
- package/mobile/lib/model/AlignText.js +0 -9
- package/mobile/lib/model/AlignText.js.map +0 -1
- package/mobile/lib/model/AlignType.d.ts +0 -21
- package/mobile/lib/model/AlignType.js +0 -2
- package/mobile/lib/model/AlignType.js.map +0 -1
- package/mobile/src/model/AlignText.ts +0 -11
- package/mobile/src/model/AlignType.ts +0 -22
- package/src/model/AlignText.ts +0 -11
- package/src/model/AlignType.ts +0 -22
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"title": "Вы можете оплатить бонусными баллами",
|
|
4
4
|
"subtitle": "Удобный каталог с большим ассортиментом товаров и сервисов",
|
|
5
5
|
"columnsCount": "4",
|
|
6
|
-
"cardTextAlign": "center",
|
|
6
|
+
"cardTextAlign": "text-center",
|
|
7
7
|
"bonusBenefits": [
|
|
8
8
|
{
|
|
9
9
|
"title": "Верхний заголовок",
|
|
@@ -10,7 +10,7 @@ export interface BenefitsBlockProps extends BonusBenefitsBlockContent, UniBlockP
|
|
|
10
10
|
export const BonusBenefitsBlock = JSX<BenefitsBlockProps>(
|
|
11
11
|
({
|
|
12
12
|
bonusBenefits,
|
|
13
|
-
cardTextAlign = 'center',
|
|
13
|
+
cardTextAlign = 'text-center',
|
|
14
14
|
className = '',
|
|
15
15
|
columnsCount = '4',
|
|
16
16
|
subtitle,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type AlignType } from '../../model/AlignType';
|
|
2
1
|
import {
|
|
3
2
|
type DescriptionProps,
|
|
4
3
|
type SubtitleProps,
|
|
@@ -6,6 +5,7 @@ import {
|
|
|
6
5
|
} from '../../model/HeadlineType';
|
|
7
6
|
import { type UniBlockContent } from '../../model/JSXBlock';
|
|
8
7
|
import { type IconProps } from '../../model/Picture';
|
|
8
|
+
import { type TextAlign } from '../../ui-kit/Text/TextProps';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @title Количество элементов в строке
|
|
@@ -31,5 +31,5 @@ export type BonusBenefitsBlockContent = UniBlockContent &
|
|
|
31
31
|
/** @title Список бонусов */
|
|
32
32
|
bonusBenefits?: BonusBenefit[];
|
|
33
33
|
columnsCount?: ColumnsCount;
|
|
34
|
-
cardTextAlign?:
|
|
34
|
+
cardTextAlign?: TextAlign;
|
|
35
35
|
};
|
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
import { AlignStyles } from '../../model/AlignStyles';
|
|
2
1
|
import { Img } from '../../ui-kit/Img/Img';
|
|
3
2
|
import { Text } from '../../ui-kit/Text/Text';
|
|
3
|
+
import { type TextAlign } from '../../ui-kit/Text/TextProps';
|
|
4
4
|
import { style } from '../../utils/style';
|
|
5
5
|
import { type BonusBenefit } from './BonusBenefitsBlockContent';
|
|
6
6
|
import { bonusBenefitStyles } from './bonusBenefitStyles';
|
|
7
7
|
|
|
8
|
-
export const renderBonusBenefit =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
8
|
+
export const renderBonusBenefit =
|
|
9
|
+
(cardTextAlign: TextAlign) =>
|
|
10
|
+
({ icon, title, description }: BonusBenefit, i: number) =>
|
|
11
|
+
(
|
|
12
|
+
<div
|
|
13
|
+
key={String(i)}
|
|
14
|
+
className={style(
|
|
15
|
+
'flex flex-col gap-1',
|
|
16
|
+
bonusBenefitStyles,
|
|
17
|
+
!description && !title ? 'justify-center' : '',
|
|
18
|
+
)}
|
|
19
|
+
>
|
|
20
|
+
{title ? (
|
|
21
|
+
<Text size="text-h6" font="font-normal" align={cardTextAlign}>
|
|
22
|
+
{title}
|
|
23
|
+
</Text>
|
|
24
|
+
) : null}
|
|
25
|
+
{icon ? <Img image={icon} height="180" className="w-auto" /> : null}
|
|
26
|
+
{description ? (
|
|
27
|
+
<Text size="text-h6" font="font-normal" align={cardTextAlign}>
|
|
28
|
+
{description}
|
|
29
|
+
</Text>
|
|
30
|
+
) : null}
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
-
import { type AlignType } from '../../model/AlignType';
|
|
3
1
|
import { SwipeListControl } from '../../ui-kit/SwipeListControl/SwipeListControl';
|
|
2
|
+
import { type TextAlign } from '../../ui-kit/Text/TextProps';
|
|
4
3
|
import { type BonusBenefit, type ColumnsCount } from './BonusBenefitsBlockContent';
|
|
5
4
|
import { renderBonusBenefit } from './renderBonusBenefit';
|
|
6
5
|
|
|
7
6
|
export const renderBonusBenefits = (
|
|
8
7
|
bonusBenefits: BonusBenefit[],
|
|
9
8
|
_columnsCount: ColumnsCount,
|
|
10
|
-
_cardTextAlign:
|
|
11
|
-
) => (
|
|
12
|
-
<SwipeListControl>
|
|
13
|
-
{bonusBenefits.map((_, i) => renderBonusBenefit({ ..._ }, i))}
|
|
14
|
-
</SwipeListControl>
|
|
15
|
-
);
|
|
9
|
+
_cardTextAlign: TextAlign,
|
|
10
|
+
) => <SwipeListControl>{bonusBenefits.map(renderBonusBenefit(_cardTextAlign))}</SwipeListControl>;
|
|
@@ -54,7 +54,9 @@ export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
|
|
|
54
54
|
}
|
|
55
55
|
rightImage={icon?.icon || icon?.src ? <Img image={icon} /> : null}
|
|
56
56
|
buttons={
|
|
57
|
-
socialMedia.length ?
|
|
57
|
+
socialMedia.length ? (
|
|
58
|
+
<SocialMedia media={socialMedia} showButtonText={true} version={rest.version} />
|
|
59
|
+
) : null
|
|
58
60
|
}
|
|
59
61
|
isImageAlwaysOnRight={isImageAlwaysOnRight}
|
|
60
62
|
>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { ButtonVersion } from '../../model/ButtonVersion';
|
|
4
|
+
import type { Picture } from '../../model/Picture';
|
|
5
|
+
import type { ButtonContent } from '../../ui-kit/Button/ButtonContent';
|
|
5
6
|
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
|
|
6
7
|
import { Text } from '../../ui-kit/Text/Text';
|
|
7
8
|
import { style } from '../../utils/style';
|
|
@@ -12,25 +13,27 @@ export interface SocialMediaProps {
|
|
|
12
13
|
media?: ButtonContent[];
|
|
13
14
|
showButtonText?: boolean;
|
|
14
15
|
stretched?: boolean;
|
|
16
|
+
version?: ButtonVersion;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
export const SocialMedia = JSX<SocialMediaProps>(
|
|
18
|
-
({ className = '', media, showButtonText, stretched, children }) => {
|
|
20
|
+
({ className = '', media, showButtonText, stretched, version = 'white', children }) => {
|
|
19
21
|
const [hasText, setHasText] = useState<boolean | undefined>();
|
|
20
22
|
const buttons: ButtonContent[] | undefined = media?.map((_) => {
|
|
21
23
|
const { href, icon, text } = _;
|
|
22
24
|
const { iconMapped } = findIconByHref(href);
|
|
23
25
|
const iconCustom = getFilteredIcon(icon) ?? iconMapped;
|
|
24
|
-
const buttonText = showButtonText ? { text } : {};
|
|
26
|
+
const buttonText = showButtonText ? { text } : { text: '' };
|
|
25
27
|
|
|
26
28
|
if (!hasText && text) {
|
|
27
29
|
setHasText(true);
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
return {
|
|
33
|
+
..._,
|
|
31
34
|
...buttonText,
|
|
32
35
|
icon: { ...iconCustom, iconVersion: 'color' },
|
|
33
|
-
version
|
|
36
|
+
version,
|
|
34
37
|
};
|
|
35
38
|
});
|
|
36
39
|
|
|
@@ -12,16 +12,23 @@ import { renderBackwardButton } from './renderBackwardButton';
|
|
|
12
12
|
export interface ProductBlockProps extends UniBlockProps, ProductBlockContent {}
|
|
13
13
|
|
|
14
14
|
export const ProductBlock = JSX<ProductBlockProps>(
|
|
15
|
-
({ className, padding, backwardButton, ...rest }) => {
|
|
15
|
+
({ className, padding, backwardButton, showBorder, ...rest }) => {
|
|
16
16
|
const router = useRouter();
|
|
17
17
|
const handleClick = useCallback((ev?: PreventableEvent) => {
|
|
18
18
|
ev?.preventDefault();
|
|
19
19
|
router.back();
|
|
20
20
|
}, []);
|
|
21
|
+
const borderStyle = showBorder
|
|
22
|
+
? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
|
|
23
|
+
: '';
|
|
21
24
|
|
|
22
25
|
return (
|
|
23
26
|
<BlockWrapper
|
|
24
|
-
className={style(
|
|
27
|
+
className={style(
|
|
28
|
+
'overflow-hidden flex flex-col gap-3xl box-border',
|
|
29
|
+
borderStyle,
|
|
30
|
+
className,
|
|
31
|
+
)}
|
|
25
32
|
defaultPadding="p-6xl"
|
|
26
33
|
padding={padding}
|
|
27
34
|
{...rest}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
"content": {
|
|
3
3
|
"buttons": {
|
|
4
4
|
"items": {
|
|
5
|
+
"href": {
|
|
6
|
+
"ui:field": "attachmentHref"
|
|
7
|
+
},
|
|
5
8
|
"icon": {
|
|
6
9
|
"ui:field": "icon"
|
|
7
10
|
},
|
|
@@ -16,6 +19,9 @@
|
|
|
16
19
|
"ui:field": "icon"
|
|
17
20
|
},
|
|
18
21
|
"button": {
|
|
22
|
+
"href": {
|
|
23
|
+
"ui:field": "attachmentHref"
|
|
24
|
+
},
|
|
19
25
|
"icon": {
|
|
20
26
|
"ui:field": "icon"
|
|
21
27
|
},
|
|
@@ -40,7 +40,6 @@ export const StickyBottomMenu = JSX<StickyBottomMenuProps>(({ ...rest }) => {
|
|
|
40
40
|
<BlockWrapper
|
|
41
41
|
className="@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]"
|
|
42
42
|
padding="p-0"
|
|
43
|
-
data-component="sticky-bottom-menu"
|
|
44
43
|
>
|
|
45
44
|
<RenderMenuItems menuItems={menuItemsWithButton} onClick={toggle} />
|
|
46
45
|
</BlockWrapper>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import util from 'util';
|
|
4
|
+
import type { LinkProps } from '../model/LinkProps';
|
|
5
|
+
import type { TransformationOptions } from './TransformationOptions';
|
|
6
|
+
import { ATTACHMENT_PREFIX } from './transformContentPage';
|
|
7
|
+
|
|
8
|
+
const copyFile = util.promisify(fs.copyFile);
|
|
9
|
+
|
|
10
|
+
export async function transformAttachmentLink(
|
|
11
|
+
link: LinkProps,
|
|
12
|
+
pagePath: string,
|
|
13
|
+
options: TransformationOptions,
|
|
14
|
+
): Promise<LinkProps> {
|
|
15
|
+
if (!link?.href) {
|
|
16
|
+
return link;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const { contentDir, publicDir } = options;
|
|
20
|
+
const input = link.href.replace(ATTACHMENT_PREFIX, '');
|
|
21
|
+
const docRelativePath = path.relative(contentDir, input);
|
|
22
|
+
const output = path.join(publicDir, docRelativePath);
|
|
23
|
+
|
|
24
|
+
try {
|
|
25
|
+
await copyFile(input, output);
|
|
26
|
+
} catch (e) {
|
|
27
|
+
console.info(`No "${input}" attachment found on page: "${pagePath}"`);
|
|
28
|
+
|
|
29
|
+
return link;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const href = path.join('/', docRelativePath);
|
|
33
|
+
|
|
34
|
+
return {
|
|
35
|
+
...link,
|
|
36
|
+
href,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -2,11 +2,13 @@ import { fileResolver, resolveRef } from '@redneckz/json-ref';
|
|
|
2
2
|
import { type JSONNode } from '@redneckz/json-ref/lib/JSONNode';
|
|
3
3
|
import fs from 'fs';
|
|
4
4
|
import util from 'util';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import type { Attachment } from '../model/Attachment';
|
|
6
|
+
import type { ContentPageDef } from '../model/ContentPageDef';
|
|
7
|
+
import type { LinkProps } from '../model/LinkProps';
|
|
8
|
+
import type { Picture } from '../model/Picture';
|
|
8
9
|
import { mapJSON } from './mapJSON';
|
|
9
|
-
import {
|
|
10
|
+
import type { TransformationOptions } from './TransformationOptions';
|
|
11
|
+
import { transformAttachmentLink } from './transformAttachmentLink';
|
|
10
12
|
import { transformDocument } from './transformDocument';
|
|
11
13
|
import { transformHTML } from './transformHTML';
|
|
12
14
|
import { transformMarkdown } from './transformMarkdown';
|
|
@@ -17,6 +19,8 @@ const writeFile = util.promisify(fs.writeFile);
|
|
|
17
19
|
|
|
18
20
|
const OUTPUT_SUFFIX = '.static';
|
|
19
21
|
|
|
22
|
+
export const ATTACHMENT_PREFIX = 'file://';
|
|
23
|
+
|
|
20
24
|
const DOCUMENT_EXT_LIST = [
|
|
21
25
|
'.txt',
|
|
22
26
|
'.doc',
|
|
@@ -42,6 +46,8 @@ export async function transformContentPage(
|
|
|
42
46
|
return await transformMarkdown(value as string);
|
|
43
47
|
} else if (isHTML(key, value)) {
|
|
44
48
|
return await transformHTML(value as string);
|
|
49
|
+
} else if (isAttachmentLink(value)) {
|
|
50
|
+
return await transformAttachmentLink(value, pagePath, options);
|
|
45
51
|
} else if (isDocumentRef(value)) {
|
|
46
52
|
return await transformDocument(value, pagePath, options);
|
|
47
53
|
} else if (isPicture(value)) {
|
|
@@ -67,6 +73,9 @@ const isMarkdown = (key: string, value: any): value is string =>
|
|
|
67
73
|
const isHTML = (key: string, value: any): value is string =>
|
|
68
74
|
isString(value) && key?.endsWith('__html');
|
|
69
75
|
|
|
76
|
+
const isAttachmentLink = (_: any): _ is LinkProps =>
|
|
77
|
+
isLocalPath(_?.href) && _.href.startsWith(ATTACHMENT_PREFIX);
|
|
78
|
+
|
|
70
79
|
const isDocumentRef = (_: any): _ is Attachment =>
|
|
71
80
|
isLocalPath(_?.src) && DOCUMENT_EXT_LIST.some((ext) => _.src.toLowerCase().endsWith(ext));
|
|
72
81
|
|
|
@@ -17,7 +17,7 @@ export async function transformDocument(
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const { contentDir, publicDir } = options;
|
|
20
|
-
const input =
|
|
20
|
+
const input = attachment.src;
|
|
21
21
|
const docRelativePath = path.relative(contentDir, input);
|
|
22
22
|
const output = path.join(publicDir, docRelativePath);
|
|
23
23
|
const inputFileSize = (await stat(input)).size;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
const config = require('../tailwind.config.cjs');
|
|
2
|
+
|
|
3
|
+
const quadXL = '1.5rem 1.25rem'; // 24px 20px
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
...config,
|
|
7
|
+
theme: {
|
|
8
|
+
...config.theme,
|
|
9
|
+
extend: {
|
|
10
|
+
...config.theme.extend,
|
|
11
|
+
borderRadius: {
|
|
12
|
+
icon: '0.375rem',
|
|
13
|
+
},
|
|
14
|
+
spacing: {
|
|
15
|
+
'6xl': '1.5rem', // 24px
|
|
16
|
+
'5xl': '1.5rem', // 24px
|
|
17
|
+
'4xl': '1.5rem', // 24px
|
|
18
|
+
'3xl': '1rem', // 16px
|
|
19
|
+
'2xl': '1rem', // 16px
|
|
20
|
+
xl: '1rem', // 16px
|
|
21
|
+
lg: '1rem', // 16px
|
|
22
|
+
m: '0.5rem', // 8px
|
|
23
|
+
s: '0.5rem', // 8px
|
|
24
|
+
xs: '0.5rem', // 8px
|
|
25
|
+
'2xs': '0.25rem', // 4px
|
|
26
|
+
'3xs': '0', // 0
|
|
27
|
+
},
|
|
28
|
+
padding: {
|
|
29
|
+
'6xl': quadXL,
|
|
30
|
+
'5xl': quadXL,
|
|
31
|
+
'4xl': quadXL,
|
|
32
|
+
},
|
|
33
|
+
fontSize: {
|
|
34
|
+
...config.theme.extend.fontSize,
|
|
35
|
+
'title-extra': ['9.375rem', '13rem'], // 150px 208px
|
|
36
|
+
h0: [
|
|
37
|
+
'1.5rem',
|
|
38
|
+
{
|
|
39
|
+
// 24px 34px
|
|
40
|
+
lineHeight: '2.125rem',
|
|
41
|
+
fontWeight: '400',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
h1: [
|
|
45
|
+
'1.5rem',
|
|
46
|
+
{
|
|
47
|
+
// 24px 34px
|
|
48
|
+
lineHeight: '2.125rem',
|
|
49
|
+
fontWeight: '400',
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
h2: [
|
|
53
|
+
'1.5rem',
|
|
54
|
+
{
|
|
55
|
+
// 24px 34px
|
|
56
|
+
lineHeight: '2.125rem',
|
|
57
|
+
fontWeight: '400',
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
h3: [
|
|
61
|
+
'1.25rem',
|
|
62
|
+
{
|
|
63
|
+
// 20px 28px
|
|
64
|
+
lineHeight: '1.75rem',
|
|
65
|
+
fontWeight: '400',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
h4: [
|
|
69
|
+
'1.25rem',
|
|
70
|
+
{
|
|
71
|
+
// 20px 28px
|
|
72
|
+
lineHeight: '1.75rem',
|
|
73
|
+
fontWeight: '400',
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
h5: [
|
|
77
|
+
'1rem',
|
|
78
|
+
{
|
|
79
|
+
// 16px 24px
|
|
80
|
+
lineHeight: '1.5rem',
|
|
81
|
+
fontWeight: '400',
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
h6: [
|
|
85
|
+
'1rem',
|
|
86
|
+
{
|
|
87
|
+
// 16px 24px
|
|
88
|
+
lineHeight: '1.5rem',
|
|
89
|
+
fontWeight: '400',
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
xl: [
|
|
93
|
+
'1rem',
|
|
94
|
+
{
|
|
95
|
+
// 16px 24px
|
|
96
|
+
lineHeight: '1.5rem',
|
|
97
|
+
fontWeight: '400',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
l: [
|
|
101
|
+
'1rem',
|
|
102
|
+
{
|
|
103
|
+
// 16px 24px
|
|
104
|
+
lineHeight: '1.5rem',
|
|
105
|
+
fontWeight: '400',
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
s: [
|
|
109
|
+
'0.875rem',
|
|
110
|
+
{
|
|
111
|
+
// 14px 20px
|
|
112
|
+
lineHeight: '1.25rem',
|
|
113
|
+
fontWeight: '400',
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
xs: [
|
|
117
|
+
'0.75rem',
|
|
118
|
+
{
|
|
119
|
+
// 12px 18px
|
|
120
|
+
lineHeight: '1.125rem',
|
|
121
|
+
fontWeight: '400',
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redneckz/wildless-cms-uni-blocks",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.22",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"mobile/src",
|
|
70
70
|
"cosmos-static/icons",
|
|
71
71
|
"tailwind.config.cjs",
|
|
72
|
+
"mobile/tailwind.config.cjs",
|
|
72
73
|
"!**/*.spec.*"
|
|
73
74
|
],
|
|
74
75
|
"repository": {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"title": "Вы можете оплатить бонусными баллами",
|
|
4
4
|
"subtitle": "Удобный каталог с большим ассортиментом товаров и сервисов",
|
|
5
5
|
"columnsCount": "4",
|
|
6
|
-
"cardTextAlign": "center",
|
|
6
|
+
"cardTextAlign": "text-center",
|
|
7
7
|
"bonusBenefits": [
|
|
8
8
|
{
|
|
9
9
|
"title": "Верхний заголовок",
|
|
@@ -10,7 +10,7 @@ export interface BenefitsBlockProps extends BonusBenefitsBlockContent, UniBlockP
|
|
|
10
10
|
export const BonusBenefitsBlock = JSX<BenefitsBlockProps>(
|
|
11
11
|
({
|
|
12
12
|
bonusBenefits,
|
|
13
|
-
cardTextAlign = 'center',
|
|
13
|
+
cardTextAlign = 'text-center',
|
|
14
14
|
className = '',
|
|
15
15
|
columnsCount = '4',
|
|
16
16
|
subtitle,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type AlignType } from '../../model/AlignType';
|
|
2
1
|
import {
|
|
3
2
|
type DescriptionProps,
|
|
4
3
|
type SubtitleProps,
|
|
@@ -6,6 +5,7 @@ import {
|
|
|
6
5
|
} from '../../model/HeadlineType';
|
|
7
6
|
import { type UniBlockContent } from '../../model/JSXBlock';
|
|
8
7
|
import { type IconProps } from '../../model/Picture';
|
|
8
|
+
import { type TextAlign } from '../../ui-kit/Text/TextProps';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @title Количество элементов в строке
|
|
@@ -31,5 +31,5 @@ export type BonusBenefitsBlockContent = UniBlockContent &
|
|
|
31
31
|
/** @title Список бонусов */
|
|
32
32
|
bonusBenefits?: BonusBenefit[];
|
|
33
33
|
columnsCount?: ColumnsCount;
|
|
34
|
-
cardTextAlign?:
|
|
34
|
+
cardTextAlign?: TextAlign;
|
|
35
35
|
};
|