@redneckz/wildless-cms-uni-blocks 0.14.45 → 0.14.47
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.44.js +103 -0
- package/bin/migration-scripts/0.14.45.js +17 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +1 -13
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Blocks.js +0 -2
- package/dist/components/Blocks.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +0 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/VerticalLayout/VerticalLayout.fixture.d.ts +1 -0
- package/mobile/bundle/bundle.umd.js +1 -1
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/lib/common.css +1 -1
- package/package.json +1 -1
- package/src/components/Blocks.ts +0 -2
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +62 -0
- package/bundle/components/BusinessBlock/BusinessBlock.d.ts +0 -5
- package/bundle/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
- package/bundle/components/BusinessBlock/BusinessCard.d.ts +0 -2
- package/dist/components/BusinessBlock/BusinessBlock.d.ts +0 -5
- package/dist/components/BusinessBlock/BusinessBlock.js +0 -9
- package/dist/components/BusinessBlock/BusinessBlock.js.map +0 -1
- package/dist/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
- package/dist/components/BusinessBlock/BusinessBlockContent.js +0 -2
- package/dist/components/BusinessBlock/BusinessBlockContent.js.map +0 -1
- package/dist/components/BusinessBlock/BusinessCard.d.ts +0 -2
- package/dist/components/BusinessBlock/BusinessCard.js +0 -17
- package/dist/components/BusinessBlock/BusinessCard.js.map +0 -1
- package/lib/components/BusinessBlock/BusinessBlock.d.ts +0 -5
- package/lib/components/BusinessBlock/BusinessBlock.fixture.d.ts +0 -6
- package/lib/components/BusinessBlock/BusinessBlock.js +0 -7
- package/lib/components/BusinessBlock/BusinessBlock.js.map +0 -1
- package/lib/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
- package/lib/components/BusinessBlock/BusinessBlockContent.js +0 -2
- package/lib/components/BusinessBlock/BusinessBlockContent.js.map +0 -1
- package/lib/components/BusinessBlock/BusinessCard.d.ts +0 -2
- package/lib/components/BusinessBlock/BusinessCard.js +0 -15
- package/lib/components/BusinessBlock/BusinessCard.js.map +0 -1
- package/mobile/bundle/components/BusinessBlock/BusinessBlock.d.ts +0 -5
- package/mobile/bundle/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
- package/mobile/bundle/components/BusinessBlock/BusinessCard.d.ts +0 -2
- package/mobile/dist/components/BusinessBlock/BusinessBlock.d.ts +0 -5
- package/mobile/dist/components/BusinessBlock/BusinessBlock.js +0 -9
- package/mobile/dist/components/BusinessBlock/BusinessBlock.js.map +0 -1
- package/mobile/dist/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
- package/mobile/dist/components/BusinessBlock/BusinessBlockContent.js +0 -2
- package/mobile/dist/components/BusinessBlock/BusinessBlockContent.js.map +0 -1
- package/mobile/dist/components/BusinessBlock/BusinessCard.d.ts +0 -2
- package/mobile/dist/components/BusinessBlock/BusinessCard.js +0 -17
- package/mobile/dist/components/BusinessBlock/BusinessCard.js.map +0 -1
- package/mobile/lib/components/BusinessBlock/BusinessBlock.d.ts +0 -5
- package/mobile/lib/components/BusinessBlock/BusinessBlock.js +0 -7
- package/mobile/lib/components/BusinessBlock/BusinessBlock.js.map +0 -1
- package/mobile/lib/components/BusinessBlock/BusinessBlockContent.d.ts +0 -25
- package/mobile/lib/components/BusinessBlock/BusinessBlockContent.js +0 -2
- package/mobile/lib/components/BusinessBlock/BusinessBlockContent.js.map +0 -1
- package/mobile/lib/components/BusinessBlock/BusinessCard.d.ts +0 -2
- package/mobile/lib/components/BusinessBlock/BusinessCard.js +0 -15
- package/mobile/lib/components/BusinessBlock/BusinessCard.js.map +0 -1
- package/mobile/src/components/BusinessBlock/BusinessBlock.example.json +0 -97
- package/mobile/src/components/BusinessBlock/BusinessBlock.tsx +0 -17
- package/mobile/src/components/BusinessBlock/BusinessBlock.ui.json +0 -29
- package/mobile/src/components/BusinessBlock/BusinessBlockContent.ts +0 -30
- package/mobile/src/components/BusinessBlock/BusinessCard.tsx +0 -42
- package/src/components/BusinessBlock/BusinessBlock.example.json +0 -97
- package/src/components/BusinessBlock/BusinessBlock.fixture.tsx +0 -75
- package/src/components/BusinessBlock/BusinessBlock.tsx +0 -17
- package/src/components/BusinessBlock/BusinessBlock.ui.json +0 -29
- package/src/components/BusinessBlock/BusinessBlockContent.ts +0 -30
- package/src/components/BusinessBlock/BusinessCard.tsx +0 -42
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const description = 'v0.14.45';
|
|
2
|
+
|
|
3
|
+
const CALCULATOR_OLD_SCHEME_NAME = 'Калькулятора параметры.schema.json';
|
|
4
|
+
const CALCULATOR_NEW_SCHEME_NAME = 'Параметры калькулятора.schema.json';
|
|
5
|
+
|
|
6
|
+
export default (unitPath, content) => {
|
|
7
|
+
if (!content._schemaPath || !content._schemaPath.endsWith(CALCULATOR_OLD_SCHEME_NAME)) {
|
|
8
|
+
return content;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
content._schemaPath = content._schemaPath.replace(
|
|
12
|
+
CALCULATOR_OLD_SCHEME_NAME,
|
|
13
|
+
CALCULATOR_NEW_SCHEME_NAME,
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
return { ...content };
|
|
17
|
+
};
|