@redneckz/wildless-cms-uni-blocks 0.14.99 → 0.14.101
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.6.32.js +1 -1
- package/bundle/bundle.umd.js +11 -12
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Header/isHrefActive.d.ts +4 -2
- package/bundle/services/sitemap/SitemapData.d.ts +2 -2
- package/bundle/ui-kit/LocationDialog/renderForeignOffices.d.ts +2 -4
- package/bundle/ui-kit/SVG.d.ts +4 -2
- package/dist/api/LeadServiceAPI.js +1 -1
- package/dist/api/LeadServiceAPI.js.map +1 -1
- package/dist/components/Carousel/Carousel.js +0 -3
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Header/DropdownMenu.js +1 -1
- package/dist/components/Header/DropdownMenu.js.map +1 -1
- package/dist/components/Header/isHrefActive.d.ts +4 -2
- package/dist/components/Header/isHrefActive.js +2 -3
- package/dist/components/Header/isHrefActive.js.map +1 -1
- package/dist/components/RollupItem/getIconName.js +1 -1
- package/dist/components/RollupItem/getIconName.js.map +1 -1
- package/dist/components/RollupItem/getIconName.mobile.js +1 -1
- package/dist/components/RollupItem/getIconName.mobile.js.map +1 -1
- package/dist/services/sitemap/SitemapData.d.ts +2 -2
- package/dist/ui-kit/LinkButton/renderArrows.js +5 -1
- package/dist/ui-kit/LinkButton/renderArrows.js.map +1 -1
- package/dist/ui-kit/LocationDialog/renderForeignOffices.d.ts +2 -4
- package/dist/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -1
- package/dist/ui-kit/SVG.d.ts +4 -2
- package/dist/ui-kit/SVG.js.map +1 -1
- package/dist/utils/getBorderStyle.js +1 -1
- package/dist/utils/getBorderStyle.js.map +1 -1
- package/lib/api/LeadServiceAPI.js +1 -1
- package/lib/api/LeadServiceAPI.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Carousel/Carousel.js +0 -3
- package/lib/components/Carousel/Carousel.js.map +1 -1
- package/lib/components/Header/DropdownMenu.js +1 -1
- package/lib/components/Header/DropdownMenu.js.map +1 -1
- package/lib/components/Header/isHrefActive.d.ts +4 -2
- package/lib/components/Header/isHrefActive.js +2 -3
- package/lib/components/Header/isHrefActive.js.map +1 -1
- package/lib/components/RollupItem/getIconName.js +1 -1
- package/lib/components/RollupItem/getIconName.js.map +1 -1
- package/lib/components/RollupItem/getIconName.mobile.js +1 -1
- package/lib/components/RollupItem/getIconName.mobile.js.map +1 -1
- package/lib/services/sitemap/SitemapData.d.ts +2 -2
- package/lib/ui-kit/LinkButton/renderArrows.js +5 -1
- package/lib/ui-kit/LinkButton/renderArrows.js.map +1 -1
- package/lib/ui-kit/LocationDialog/renderForeignOffices.d.ts +2 -4
- package/lib/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -1
- package/lib/ui-kit/SVG.d.ts +4 -2
- package/lib/ui-kit/SVG.js.map +1 -1
- package/lib/utils/getBorderStyle.js +1 -1
- package/lib/utils/getBorderStyle.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +10 -11
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Header/isHrefActive.d.ts +4 -2
- package/mobile/bundle/services/sitemap/SitemapData.d.ts +2 -2
- package/mobile/bundle/ui-kit/LocationDialog/renderForeignOffices.d.ts +2 -4
- package/mobile/bundle/ui-kit/SVG.d.ts +4 -2
- package/mobile/dist/api/LeadServiceAPI.js +1 -1
- package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
- package/mobile/dist/components/Carousel/Carousel.js +0 -3
- package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
- package/mobile/dist/components/Header/DropdownMenu.js +1 -1
- package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/dist/components/Header/isHrefActive.d.ts +4 -2
- package/mobile/dist/components/Header/isHrefActive.js +2 -3
- package/mobile/dist/components/Header/isHrefActive.js.map +1 -1
- package/mobile/dist/components/RollupItem/getIconName.js +1 -1
- package/mobile/dist/components/RollupItem/getIconName.js.map +1 -1
- package/mobile/dist/services/sitemap/SitemapData.d.ts +2 -2
- package/mobile/dist/ui-kit/LinkButton/renderArrows.js +5 -1
- package/mobile/dist/ui-kit/LinkButton/renderArrows.js.map +1 -1
- package/mobile/dist/ui-kit/LocationDialog/renderForeignOffices.d.ts +2 -4
- package/mobile/dist/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -1
- package/mobile/dist/ui-kit/SVG.d.ts +4 -2
- package/mobile/dist/ui-kit/SVG.js.map +1 -1
- package/mobile/dist/utils/getBorderStyle.js +1 -1
- package/mobile/dist/utils/getBorderStyle.js.map +1 -1
- package/mobile/lib/api/LeadServiceAPI.js +1 -1
- package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Carousel/Carousel.js +0 -3
- package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
- package/mobile/lib/components/Header/DropdownMenu.js +1 -1
- package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
- package/mobile/lib/components/Header/isHrefActive.d.ts +4 -2
- package/mobile/lib/components/Header/isHrefActive.js +2 -3
- package/mobile/lib/components/Header/isHrefActive.js.map +1 -1
- package/mobile/lib/components/RollupItem/getIconName.js +1 -1
- package/mobile/lib/components/RollupItem/getIconName.js.map +1 -1
- package/mobile/lib/services/sitemap/SitemapData.d.ts +2 -2
- package/mobile/lib/ui-kit/LinkButton/renderArrows.js +5 -1
- package/mobile/lib/ui-kit/LinkButton/renderArrows.js.map +1 -1
- package/mobile/lib/ui-kit/LocationDialog/renderForeignOffices.d.ts +2 -4
- package/mobile/lib/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -1
- package/mobile/lib/ui-kit/SVG.d.ts +4 -2
- package/mobile/lib/ui-kit/SVG.js.map +1 -1
- package/mobile/lib/utils/getBorderStyle.js +1 -1
- package/mobile/lib/utils/getBorderStyle.js.map +1 -1
- package/mobile/src/api/LeadServiceAPI.ts +1 -1
- package/mobile/src/components/Carousel/Carousel.tsx +0 -3
- package/mobile/src/components/Header/DropdownMenu.tsx +1 -1
- package/mobile/src/components/Header/isHrefActive.ts +7 -4
- package/mobile/src/components/RollupItem/getIconName.tsx +1 -1
- package/mobile/src/services/sitemap/SitemapData.ts +2 -2
- package/mobile/src/ui-kit/LinkButton/renderArrows.tsx +9 -4
- package/mobile/src/ui-kit/LocationDialog/renderForeignOffices.tsx +3 -3
- package/mobile/src/ui-kit/SVG.tsx +5 -2
- package/mobile/src/utils/getBorderStyle.ts +1 -1
- package/package.json +1 -1
- package/src/api/LeadServiceAPI.ts +1 -1
- package/src/components/Carousel/Carousel.tsx +0 -3
- package/src/components/Header/DropdownMenu.tsx +1 -1
- package/src/components/Header/isHrefActive.ts +7 -4
- package/src/components/RollupItem/getIconName.mobile.tsx +1 -1
- package/src/components/RollupItem/getIconName.tsx +1 -1
- package/src/services/sitemap/SitemapData.ts +2 -2
- package/src/ui-kit/LinkButton/renderArrows.tsx +9 -4
- package/src/ui-kit/LocationDialog/renderForeignOffices.tsx +3 -3
- package/src/ui-kit/SVG.tsx +5 -2
- package/src/utils/getBorderStyle.ts +1 -1
- package/bin/migration-scripts/0.11.0.js +0 -29
- package/bin/migration-scripts/0.12.9.js +0 -30
- package/bin/migration-scripts/0.13.5.js +0 -36
- package/bin/migration-scripts/0.13.6.js +0 -33
- package/bin/migration-scripts/0.14.26.js +0 -55
- package/bin/migration-scripts/0.14.28.js +0 -28
- package/bin/migration-scripts/0.14.29.js +0 -75
- package/bin/migration-scripts/0.14.30.js +0 -54
- package/bin/migration-scripts/0.14.44.js +0 -103
- package/bin/migration-scripts/0.5.14.js +0 -33
- package/bin/migration-scripts/0.6.43.js +0 -32
- package/bin/migration-scripts/0.7.8.js +0 -32
- package/bin/migration-scripts/0.8.10.js +0 -31
- package/bin/migration-scripts/0.8.29.js +0 -42
- package/bin/migration-scripts/0.8.8.js +0 -124
- package/bin/migration-scripts/0.9.1.js +0 -71
- package/bin/migration-scripts/0.9.10.js +0 -30
- package/bin/migration-scripts/0.9.9.js +0 -111
- package/bundle/components/SafeDepositRental/renderClusterer.d.ts +0 -2
- package/dist/components/SafeDepositRental/renderClusterer.d.ts +0 -2
- package/dist/components/SafeDepositRental/renderClusterer.js +0 -35
- package/dist/components/SafeDepositRental/renderClusterer.js.map +0 -1
- package/lib/components/SafeDepositRental/renderClusterer.d.ts +0 -2
- package/lib/components/SafeDepositRental/renderClusterer.js +0 -32
- package/lib/components/SafeDepositRental/renderClusterer.js.map +0 -1
- package/mobile/bundle/components/SafeDepositRental/renderClusterer.d.ts +0 -2
- package/mobile/dist/components/SafeDepositRental/renderClusterer.d.ts +0 -2
- package/mobile/dist/components/SafeDepositRental/renderClusterer.js +0 -35
- package/mobile/dist/components/SafeDepositRental/renderClusterer.js.map +0 -1
- package/mobile/lib/components/SafeDepositRental/renderClusterer.d.ts +0 -2
- package/mobile/lib/components/SafeDepositRental/renderClusterer.js +0 -32
- package/mobile/lib/components/SafeDepositRental/renderClusterer.js.map +0 -1
- package/mobile/src/components/SafeDepositRental/renderClusterer.ts +0 -51
- package/src/components/SafeDepositRental/renderClusterer.ts +0 -51
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { deleteEmptyButton, deleteEmptyProps, deleteProp, renameProp } from '../utils.js';
|
|
2
|
-
|
|
3
|
-
export const description = 'v0.14.29';
|
|
4
|
-
|
|
5
|
-
export default (uniPath, content) => {
|
|
6
|
-
if (!content?.blocks) {
|
|
7
|
-
return content;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
for (const block of content.blocks) {
|
|
11
|
-
adjustCarouselProductCardBlock(block);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return { ...content };
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
function adjustCarouselProductCardBlock(block) {
|
|
18
|
-
if (block.blocks) {
|
|
19
|
-
for (const childBlock of block.blocks) {
|
|
20
|
-
adjustCarouselProductCardBlock(childBlock);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const content = block?.content;
|
|
25
|
-
|
|
26
|
-
if (!block?.content) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (block.type === 'CarouselProductCard' && content) {
|
|
31
|
-
block.content = deleteEmptyProps(content);
|
|
32
|
-
block.content = deleteEmptyButton(content);
|
|
33
|
-
|
|
34
|
-
const isHeadlineSmallVersion = 'headlineSmallVersion' in content;
|
|
35
|
-
const isXL =
|
|
36
|
-
content?.headlineSmallVersion === 'XL_L' ||
|
|
37
|
-
content?.headlineSmallVersion === 'XL_R' ||
|
|
38
|
-
content?.headlineSmallVersion === 'L_R';
|
|
39
|
-
adjustSocialMedia(content);
|
|
40
|
-
if (isHeadlineSmallVersion && isXL && content?.title) {
|
|
41
|
-
renameProp(content, 'title', 'description');
|
|
42
|
-
}
|
|
43
|
-
content.imageOptions = {
|
|
44
|
-
...content.imageOptions,
|
|
45
|
-
isImageAlwaysOnRight: false,
|
|
46
|
-
};
|
|
47
|
-
if (!content?.align || content?.align === 'center') {
|
|
48
|
-
content.align = 'text-center';
|
|
49
|
-
}
|
|
50
|
-
if (content?.isTopPosition) {
|
|
51
|
-
content.imageOptions = {
|
|
52
|
-
...content.imageOptions,
|
|
53
|
-
directionRight: false,
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
if (content?.items && content?.items?.length) {
|
|
57
|
-
content.items = content.items.map((_) => _?.text || _);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
deleteProp(content, 'headlineSmallVersion');
|
|
61
|
-
deleteProp(content, 'button');
|
|
62
|
-
deleteProp(content, 'isImageFullWidth');
|
|
63
|
-
deleteProp(content, 'isButtonFullWidth');
|
|
64
|
-
deleteProp(content, 'isTopPosition');
|
|
65
|
-
|
|
66
|
-
block.type = 'CarouselRecommendationCard';
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function adjustSocialMedia(content) {
|
|
71
|
-
const button = content?.button;
|
|
72
|
-
if (button?.text || button?.icon || button?.iconRight) {
|
|
73
|
-
content.socialMedia = [{ ...button }];
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { deleteEmptyButton, deleteEmptyProps, deleteProp } from '../utils.js';
|
|
2
|
-
|
|
3
|
-
export const description = 'v0.14.30';
|
|
4
|
-
|
|
5
|
-
export default (uniPath, content) => {
|
|
6
|
-
if (!content?.blocks) {
|
|
7
|
-
return content;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
for (const block of content.blocks) {
|
|
11
|
-
adjustCarouselPictureText(block);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return { ...content };
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
function adjustCarouselPictureText(block) {
|
|
18
|
-
if (block.blocks) {
|
|
19
|
-
for (const childBlock of block.blocks) {
|
|
20
|
-
adjustCarouselPictureText(childBlock);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const content = block?.content;
|
|
25
|
-
if (block.type === 'PictureText' && content) {
|
|
26
|
-
block.content = deleteEmptyProps(content);
|
|
27
|
-
block.content = deleteEmptyButton(content);
|
|
28
|
-
|
|
29
|
-
if (content?.title) {
|
|
30
|
-
content.isFullWidthTitle = true;
|
|
31
|
-
content.align = 'text-center';
|
|
32
|
-
content.headlineVersion = 'M';
|
|
33
|
-
}
|
|
34
|
-
if (content?.sum || content?.monthLimit) {
|
|
35
|
-
content.priceList = [];
|
|
36
|
-
}
|
|
37
|
-
if (content?.sum) {
|
|
38
|
-
content.priceList.push({ label: 'Страховая сумма', amount: content.sum });
|
|
39
|
-
}
|
|
40
|
-
if (content?.monthLimit) {
|
|
41
|
-
content.priceList.push({ label: 'Ежемесячный лимит', amount: content.monthLimit });
|
|
42
|
-
}
|
|
43
|
-
deleteProp(content, 'sum');
|
|
44
|
-
deleteProp(content, 'monthLimit');
|
|
45
|
-
deleteProp(content, 'directionRight');
|
|
46
|
-
content.imageOptions = {
|
|
47
|
-
...content.imageOptions,
|
|
48
|
-
directionRight: content?.imageOptions?.directionRight || false,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
if (block.type === 'PictureText') {
|
|
52
|
-
block.type = 'ProductBlock';
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { deleteEmptyButton, deleteEmptyProps, deleteProp } from '../utils.js';
|
|
2
|
-
|
|
3
|
-
export const description = 'v0.14.44';
|
|
4
|
-
|
|
5
|
-
export default (uniPath, content) => {
|
|
6
|
-
if (!content?.blocks) {
|
|
7
|
-
return content;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
for (const block of content.blocks) {
|
|
11
|
-
adjustCarouselBusinessBlock(block);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return { ...content };
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
function adjustCarouselBusinessBlock(block) {
|
|
18
|
-
if (block.blocks) {
|
|
19
|
-
for (const childBlock of block.blocks) {
|
|
20
|
-
adjustCarouselBusinessBlock(childBlock);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
const content = block?.content;
|
|
24
|
-
if (block.type === 'BusinessBlock') {
|
|
25
|
-
block.content = deleteEmptyProps(content);
|
|
26
|
-
block.content = deleteEmptyButton(content);
|
|
27
|
-
|
|
28
|
-
block.type = 'VerticalLayout';
|
|
29
|
-
block.blocks = [
|
|
30
|
-
{
|
|
31
|
-
type: 'Headline',
|
|
32
|
-
content: {
|
|
33
|
-
title: content?.title,
|
|
34
|
-
align: 'text-center',
|
|
35
|
-
headlineVersion: 'M',
|
|
36
|
-
isEmbedded: true,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
style: ['col-span-12'],
|
|
41
|
-
type: 'HorizontalLayout',
|
|
42
|
-
content: {
|
|
43
|
-
version: 'primary',
|
|
44
|
-
isTheme: false,
|
|
45
|
-
gap: 'M',
|
|
46
|
-
title: 'Горизонтальный компоновщик',
|
|
47
|
-
isCardBorder: true,
|
|
48
|
-
isPadding: false,
|
|
49
|
-
},
|
|
50
|
-
blocks: content.cards.map(cardToProductBlock),
|
|
51
|
-
},
|
|
52
|
-
];
|
|
53
|
-
block.content = {
|
|
54
|
-
version: 'primary',
|
|
55
|
-
isPadding: true,
|
|
56
|
-
isInnerPadding: true,
|
|
57
|
-
gap: 'L',
|
|
58
|
-
defaultPadding: 'p-6xl',
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
deleteProp(content, 'cards');
|
|
62
|
-
block.content = deleteEmptyProps(block.content);
|
|
63
|
-
block.content = deleteEmptyButton(block.content);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const cardToProductBlock = (card) => ({
|
|
68
|
-
style: ['col-span-6'],
|
|
69
|
-
type: 'ProductBlock',
|
|
70
|
-
content: {
|
|
71
|
-
headlineVersion: 'S',
|
|
72
|
-
title: card?.title,
|
|
73
|
-
backwardButton: false,
|
|
74
|
-
image: card?.image,
|
|
75
|
-
isDotted: true,
|
|
76
|
-
buttons: [
|
|
77
|
-
{
|
|
78
|
-
...deleteEmptyButton(card.button),
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
version: 'primary',
|
|
82
|
-
benefitsVersion: 'normal',
|
|
83
|
-
benefits: card?.cardItems?.map(itemToBenefit),
|
|
84
|
-
imageOptions: {
|
|
85
|
-
directionRight: false,
|
|
86
|
-
imageAlign: 'end',
|
|
87
|
-
},
|
|
88
|
-
padding: 'p-3xl',
|
|
89
|
-
},
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
const itemToBenefit = (benefit) => {
|
|
93
|
-
const isIconName = benefit?.icon?.icon || benefit?.icon?.src;
|
|
94
|
-
if (!isIconName) {
|
|
95
|
-
deleteProp(benefit, 'icon');
|
|
96
|
-
}
|
|
97
|
-
benefit.type = 'default';
|
|
98
|
-
if (benefit?.text) {
|
|
99
|
-
benefit.description = benefit?.text;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return benefit;
|
|
103
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { renameProp } from '../utils.js';
|
|
2
|
-
|
|
3
|
-
export const description = 'v0.5.14';
|
|
4
|
-
|
|
5
|
-
export default (unitPath, content) => {
|
|
6
|
-
if (!content?.blocks) {
|
|
7
|
-
return content;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
for (const block of content.blocks) {
|
|
11
|
-
adjustGalleryBlock(block);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return { ...content };
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
function adjustGalleryBlock(block) {
|
|
18
|
-
if (block.blocks) {
|
|
19
|
-
for (const childBlock of block.blocks) {
|
|
20
|
-
adjustGalleryBlock(childBlock);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (block.type !== 'Gallery' || !block.content || !block.content.cards) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
for (const item of block.content.cards) {
|
|
29
|
-
if (item.image) {
|
|
30
|
-
renameProp(item, 'image', 'icon');
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export const description = 'v0.6.43';
|
|
2
|
-
|
|
3
|
-
export default (uniPath, content) => {
|
|
4
|
-
if (!content?.blocks) {
|
|
5
|
-
return content;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
for (const block of content.blocks) {
|
|
9
|
-
adjustProductTile(block);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return { ...content };
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
function adjustProductTile(block) {
|
|
16
|
-
if (block.blocks) {
|
|
17
|
-
for (const childBlock of block.blocks) {
|
|
18
|
-
adjustProductTile(childBlock);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (block.type !== 'ProductTile') {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (block.content?.benefits?.length) {
|
|
27
|
-
block.content.benefits = block.content.benefits.map((b) => ({
|
|
28
|
-
...b,
|
|
29
|
-
type: b.type ? b.type : 'default',
|
|
30
|
-
}));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export const description = 'v0.7.8';
|
|
2
|
-
|
|
3
|
-
export default (uniPath, content) => {
|
|
4
|
-
if (!content?.blocks) {
|
|
5
|
-
return content;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
for (const block of content.blocks) {
|
|
9
|
-
adjustPictureText(block);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return { ...content };
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
function adjustPictureText(block) {
|
|
16
|
-
if (block.blocks) {
|
|
17
|
-
for (const childBlock of block.blocks) {
|
|
18
|
-
adjustPictureText(childBlock);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (block.type !== 'PictureText') {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (block.content?.benefits?.length) {
|
|
27
|
-
block.content.benefits = block.content.benefits.map((b) => ({
|
|
28
|
-
...b,
|
|
29
|
-
type: b.type ? b.type : 'default',
|
|
30
|
-
}));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export const description = 'v0.8.10';
|
|
2
|
-
|
|
3
|
-
export default (uniPath, content) => {
|
|
4
|
-
if (!content?.blocks) {
|
|
5
|
-
return content;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
for (const block of content.blocks) {
|
|
9
|
-
adjustTile(block);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return { ...content };
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
function adjustTile(block) {
|
|
16
|
-
if (block.blocks) {
|
|
17
|
-
for (const childBlock of block.blocks) {
|
|
18
|
-
adjustTile(childBlock);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (block.type !== 'Tile') {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (block.content) {
|
|
27
|
-
const { description: oldDesc, ...rest } = block.content;
|
|
28
|
-
|
|
29
|
-
block.content = { ...rest, ...(oldDesc ? { __html: `<p>${oldDesc}</p>` } : undefined) };
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export const description = 'v0.8.29';
|
|
2
|
-
|
|
3
|
-
export default (uniPath, content) => {
|
|
4
|
-
if (!content?.blocks) {
|
|
5
|
-
return content;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
for (const block of content.blocks) {
|
|
9
|
-
adjustOtherProduct(block);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return { ...content };
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
function adjustOtherProduct(block) {
|
|
16
|
-
if (block.blocks) {
|
|
17
|
-
for (const childBlock of block.blocks) {
|
|
18
|
-
adjustOtherProduct(childBlock);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (block.type !== 'OtherProducts') {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const innerRollupItem = block?.blocks?.[0];
|
|
27
|
-
|
|
28
|
-
if (!innerRollupItem) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const newHorizontalLayout = {
|
|
33
|
-
content: { version: 'transparent', gap: 'XS', isPadding: false },
|
|
34
|
-
type: 'HorizontalLayout',
|
|
35
|
-
blocks: innerRollupItem?.blocks || [],
|
|
36
|
-
style: ['col-span-12'],
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
block.type = 'RollupItem';
|
|
40
|
-
block.content = innerRollupItem?.content;
|
|
41
|
-
block.blocks = [newHorizontalLayout];
|
|
42
|
-
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { renameProp } from '../utils.js';
|
|
2
|
-
|
|
3
|
-
export const description = 'v0.8.8';
|
|
4
|
-
|
|
5
|
-
const COL_SPAN = 'col-span-12';
|
|
6
|
-
|
|
7
|
-
export default (unitPath, content) => {
|
|
8
|
-
if (!content?.blocks) {
|
|
9
|
-
return content;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
for (const block of content.blocks) {
|
|
13
|
-
adjustCarouselBlock(block);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return { ...content };
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const adjustCarouselBlock = (block) => {
|
|
20
|
-
if (block.blocks) {
|
|
21
|
-
for (const childBlock of block.blocks) {
|
|
22
|
-
adjustCarouselBlock(childBlock);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (block.type === 'Catalog') {
|
|
27
|
-
adjustCarousel(block, 'CarouselCatalogCard');
|
|
28
|
-
}
|
|
29
|
-
if (block.type === 'Gallery') {
|
|
30
|
-
adjustCarousel(block, 'CarouselProductCard');
|
|
31
|
-
}
|
|
32
|
-
if (block.type === 'MiniGallery') {
|
|
33
|
-
adjustCarousel(block, 'CarouselProductCard', 4);
|
|
34
|
-
}
|
|
35
|
-
if (block.type === 'InvestmentGallery') {
|
|
36
|
-
adjustCarousel(block, 'CarouselInvestmentCard', 2);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const adjustCarousel = (block, type, cardCount) => {
|
|
41
|
-
const cards = block?.content?.cards;
|
|
42
|
-
const headlineTitle = block?.content?.title;
|
|
43
|
-
const button = block?.content?.button;
|
|
44
|
-
const headlineVersion = block?.content?.headlineVersion;
|
|
45
|
-
const anchor = block?.anchor;
|
|
46
|
-
block.blocks = [];
|
|
47
|
-
if (headlineTitle) {
|
|
48
|
-
block.blocks.push(getHeadlineBlock(headlineTitle, headlineVersion));
|
|
49
|
-
}
|
|
50
|
-
if (cards && cards?.length > 0) {
|
|
51
|
-
block.blocks.push(getCarousel(cards, type, cardCount));
|
|
52
|
-
}
|
|
53
|
-
if (button?.text || button?.icon?.icon || button?.icon?.src) {
|
|
54
|
-
block.blocks.push(getButtonBlock(button));
|
|
55
|
-
}
|
|
56
|
-
if (anchor) {
|
|
57
|
-
block.anchor = anchor;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const innerPadding = type === 'CarouselCatalogCard' ? true : false;
|
|
61
|
-
getVerticalLayout(block, innerPadding);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
const getVerticalLayout = (block, isInnerPadding = false) => {
|
|
65
|
-
block.content = {
|
|
66
|
-
version: 'primary',
|
|
67
|
-
align: 'center',
|
|
68
|
-
gap: 'L',
|
|
69
|
-
isPadding: true,
|
|
70
|
-
isInnerPadding: isInnerPadding,
|
|
71
|
-
};
|
|
72
|
-
block.style = [COL_SPAN];
|
|
73
|
-
block.type = 'VerticalLayout';
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
const getCarousel = (cards, cardType, cardCount = 3) => {
|
|
77
|
-
return {
|
|
78
|
-
content: {
|
|
79
|
-
isBlur: true,
|
|
80
|
-
visibleItemCount: cardCount,
|
|
81
|
-
isCycle: false,
|
|
82
|
-
},
|
|
83
|
-
style: [COL_SPAN],
|
|
84
|
-
type: 'Carousel',
|
|
85
|
-
blocks: cards.map((_) => {
|
|
86
|
-
const newCard = {
|
|
87
|
-
content: _,
|
|
88
|
-
style: [COL_SPAN],
|
|
89
|
-
type: cardType,
|
|
90
|
-
};
|
|
91
|
-
if (cardType === 'CarouselInvestmentCard') {
|
|
92
|
-
const columnsMode = _?.columnsMode === 'double' ? 2 : 1;
|
|
93
|
-
_.columnsMode = columnsMode;
|
|
94
|
-
if ('cardList' in _) {
|
|
95
|
-
for (const card of _.cardList) {
|
|
96
|
-
renameProp(card, 'parametr', 'parameter');
|
|
97
|
-
renameProp(card, 'parametrDesccription', 'parameterDescription');
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return newCard;
|
|
103
|
-
}),
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
const getHeadlineBlock = (title, headlineVersion = 'M') => ({
|
|
108
|
-
content: {
|
|
109
|
-
title: title,
|
|
110
|
-
align: 'center',
|
|
111
|
-
bgColorHeadline: 'transparent',
|
|
112
|
-
headlineVersion: headlineVersion,
|
|
113
|
-
},
|
|
114
|
-
style: [COL_SPAN],
|
|
115
|
-
type: 'Headline',
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
const getButtonBlock = (button) => ({
|
|
119
|
-
content: {
|
|
120
|
-
button: button,
|
|
121
|
-
},
|
|
122
|
-
style: [COL_SPAN],
|
|
123
|
-
type: 'ButtonBlock',
|
|
124
|
-
});
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
export const description = 'v0.9.1';
|
|
2
|
-
|
|
3
|
-
export default (unitPath, content) => {
|
|
4
|
-
if (!content?.blocks) {
|
|
5
|
-
return content;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
for (const block of content.blocks) {
|
|
9
|
-
adjustAccordion(block);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return { ...content };
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const adjustAccordion = (block) => {
|
|
16
|
-
if (block.blocks) {
|
|
17
|
-
for (const childBlock of block.blocks) {
|
|
18
|
-
adjustAccordion(childBlock);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (block.type !== 'Accordion') {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const headlineTitle = block?.content?.title;
|
|
27
|
-
const headlineDescription = block?.content?.description;
|
|
28
|
-
const anchor = block?.anchor;
|
|
29
|
-
|
|
30
|
-
block.content = {
|
|
31
|
-
isTheme: false,
|
|
32
|
-
version: 'primary',
|
|
33
|
-
isPadding: true,
|
|
34
|
-
isInnerPadding: true,
|
|
35
|
-
align: 'stretch',
|
|
36
|
-
gap: 'XS',
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
block.style = ['col-span-12'];
|
|
40
|
-
block.type = 'VerticalLayout';
|
|
41
|
-
|
|
42
|
-
if (!block?.blocks) {
|
|
43
|
-
block.blocks = [];
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (headlineTitle) {
|
|
47
|
-
block.blocks.unshift(getHeadlineBlock(headlineTitle, headlineDescription));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (anchor) {
|
|
51
|
-
block.anchor = anchor;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const getHeadlineBlock = (title, descriptionBlock = null) => {
|
|
56
|
-
const headline = {
|
|
57
|
-
content: {
|
|
58
|
-
title: title,
|
|
59
|
-
align: 'center',
|
|
60
|
-
bgColorHeadline: 'transparent',
|
|
61
|
-
headlineVersion: 'M',
|
|
62
|
-
},
|
|
63
|
-
style: ['col-span-12'],
|
|
64
|
-
type: 'Headline',
|
|
65
|
-
};
|
|
66
|
-
if (descriptionBlock) {
|
|
67
|
-
headline.content.description = descriptionBlock;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return headline;
|
|
71
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { renameProp } from '../utils.js';
|
|
2
|
-
|
|
3
|
-
export const description = 'v0.9.10';
|
|
4
|
-
|
|
5
|
-
export default (uniPath, content) => {
|
|
6
|
-
if (!content?.blocks) {
|
|
7
|
-
return content;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
for (const block of content.blocks) {
|
|
11
|
-
adjustProductTileBlock(block);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return { ...content };
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
function adjustProductTileBlock(block) {
|
|
18
|
-
if (block.blocks) {
|
|
19
|
-
for (const childBlock of block.blocks) {
|
|
20
|
-
adjustProductTileBlock(childBlock);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (block.type === 'ProductTile') {
|
|
25
|
-
const blockContent = block?.content;
|
|
26
|
-
if (blockContent?.isImageOnRightSide) {
|
|
27
|
-
renameProp(blockContent, 'isImageOnRightSide', 'directionRight');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|