@redneckz/wildless-cms-uni-blocks 0.14.117 → 0.14.119
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.111.js +12 -9
- package/bin/migration-scripts/0.14.117.js +47 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +5 -10
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/TextBlock/TextBlockContent.d.ts +3 -5
- package/dist/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/dist/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.js +1 -7
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/components/TextBlock/TextBlockContent.d.ts +3 -5
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/lib/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.fixture.mobile.d.ts +0 -2
- package/lib/components/TextBlock/TextBlock.js +1 -7
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/components/TextBlock/TextBlockContent.d.ts +3 -5
- package/mobile/bundle/bundle.umd.js +5 -10
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/TextBlock/TextBlockContent.d.ts +3 -5
- package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
- package/mobile/dist/components/TextBlock/TextBlock.js +1 -7
- package/mobile/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/dist/components/TextBlock/TextBlockContent.d.ts +3 -5
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js.map +1 -1
- package/mobile/lib/components/TextBlock/TextBlock.js +1 -7
- package/mobile/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/lib/components/TextBlock/TextBlockContent.d.ts +3 -5
- package/mobile/src/components/ApplicationForm/renderQuestionsInterested.tsx +1 -1
- package/mobile/src/components/TextBlock/TextBlock.example.json +1 -11
- package/mobile/src/components/TextBlock/TextBlock.tsx +1 -24
- package/mobile/src/components/TextBlock/TextBlockContent.ts +3 -7
- package/package.json +1 -1
- package/src/components/ApplicationForm/renderQuestionsInterested.tsx +1 -1
- package/src/components/HorizontalLayout/HorizontalLayout.fixture.mobile.tsx +0 -23
- package/src/components/TextBlock/TextBlock.example.json +1 -11
- package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +0 -28
- package/src/components/TextBlock/TextBlock.fixture.tsx +1 -12
- package/src/components/TextBlock/TextBlock.tsx +1 -24
- package/src/components/TextBlock/TextBlockContent.ts +3 -7
- package/src/components/VerticalLayout/VerticalLayout.fixture.mobile.tsx +1 -26
- package/bin/migration-scripts/0.14.114.js +0 -17
|
@@ -5,17 +5,20 @@ export const description = 'v0.14.111';
|
|
|
5
5
|
export default traversePageBlocks(adjustClearBlock);
|
|
6
6
|
|
|
7
7
|
function adjustClearBlock(block) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
const content = block?.content;
|
|
9
|
+
if (!content) {
|
|
10
|
+
return;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
block.content = deleteEmptyProps(block?.content);
|
|
13
|
+
block.content = clearImage(block.content);
|
|
14
|
+
|
|
15
|
+
if (content?.__html === '<p><br></p>') {
|
|
16
|
+
deleteProp(content, '__html');
|
|
14
17
|
}
|
|
15
|
-
if (!('items' in
|
|
16
|
-
deleteProp(
|
|
18
|
+
if (block?.content && !('items' in content)) {
|
|
19
|
+
deleteProp(content, 'isDotted');
|
|
17
20
|
}
|
|
18
|
-
if (block.type === 'TextBlock' &&
|
|
19
|
-
deleteProp(
|
|
21
|
+
if (block.type === 'TextBlock' && content?.version === 'primary') {
|
|
22
|
+
deleteProp(content, 'version');
|
|
20
23
|
}
|
|
21
24
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { clearImage, deleteEmptyProps, deleteProp, traversePageBlocks } from '../utils.js';
|
|
2
|
+
|
|
3
|
+
export const description = 'v0.14.117';
|
|
4
|
+
|
|
5
|
+
export default traversePageBlocks(adjustClearBlock, adjustTextBlock);
|
|
6
|
+
|
|
7
|
+
function adjustClearBlock(block) {
|
|
8
|
+
const content = block?.content;
|
|
9
|
+
if (!content) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
block.content = deleteEmptyProps(content);
|
|
13
|
+
block.content = clearImage(content);
|
|
14
|
+
|
|
15
|
+
if (content?.__html === '<p><br></p>') {
|
|
16
|
+
deleteProp(content, '__html');
|
|
17
|
+
}
|
|
18
|
+
if (block?.content && !('items' in content)) {
|
|
19
|
+
deleteProp(content, 'isDotted');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function adjustTextBlock(block) {
|
|
24
|
+
const content = block?.content;
|
|
25
|
+
if (!content || block.type !== 'TextBlock') {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
deleteProp(content, 'isDotted');
|
|
30
|
+
deleteProp(content, 'blockVersion');
|
|
31
|
+
|
|
32
|
+
if (content?.version === 'primary') {
|
|
33
|
+
deleteProp(content, 'version');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (!content?.description && content?.title) {
|
|
37
|
+
const html = content?.__html || '';
|
|
38
|
+
content.__html = `<p><strong>${content.title}</strong></p> ${html}`;
|
|
39
|
+
deleteProp(content, 'title');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (!content?.title && !content?.description && content?.iconVersion !== 'small') {
|
|
43
|
+
block.type = 'RichTextBlock';
|
|
44
|
+
block.content.padding = 'p-3xl';
|
|
45
|
+
deleteProp(content, 'iconVersion');
|
|
46
|
+
}
|
|
47
|
+
}
|