@redneckz/wildless-cms-uni-blocks 0.14.48 → 0.14.50
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.31.js +66 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +29 -36
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/model/JSXBlock.d.ts +2 -2
- package/bundle/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
- package/bundle/ui-kit/BaseTile/BaseTile.d.ts +1 -0
- package/dist/components/Blocks.js +0 -4
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Blocks.mobile.js +0 -4
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Depository/useDepository.js +2 -2
- package/dist/components/Depository/useDepository.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.js +1 -13
- package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/dist/model/JSXBlock.d.ts +2 -2
- package/dist/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
- package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/dist/ui-kit/BaseTile/BaseTile.d.ts +1 -0
- package/dist/ui-kit/BaseTile/BaseTile.js +16 -5
- package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +0 -4
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Blocks.mobile.js +0 -4
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Depository/useDepository.js +2 -2
- package/lib/components/Depository/useDepository.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +1 -0
- package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +2 -0
- package/lib/components/ProductBlock/ProductBlock.js +2 -14
- package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/lib/model/JSXBlock.d.ts +2 -2
- package/lib/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js +2 -2
- package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
- package/lib/ui-kit/BaseTile/BaseTile.d.ts +1 -0
- package/lib/ui-kit/BaseTile/BaseTile.js +16 -5
- package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +27 -34
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/model/JSXBlock.d.ts +2 -2
- package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
- package/mobile/bundle/ui-kit/BaseTile/BaseTile.d.ts +1 -0
- package/mobile/dist/components/Blocks.js +0 -4
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Depository/useDepository.js +2 -2
- package/mobile/dist/components/Depository/useDepository.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js +1 -13
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/model/JSXBlock.d.ts +2 -2
- package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
- 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/BaseTile/BaseTile.d.ts +1 -0
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js +16 -5
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Blocks.js +0 -4
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/Depository/useDepository.js +2 -2
- package/mobile/lib/components/Depository/useDepository.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js +2 -14
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/model/JSXBlock.d.ts +2 -2
- package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.d.ts +1 -0
- 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/BaseTile/BaseTile.d.ts +1 -0
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js +16 -5
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/src/common.css +4 -0
- package/mobile/src/components/Blocks.ts +0 -4
- package/mobile/src/components/Depository/useDepository.ts +2 -2
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +13 -32
- package/mobile/src/model/JSXBlock.ts +2 -2
- package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +5 -1
- package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +48 -35
- package/package.json +1 -1
- package/src/common.css +4 -0
- package/src/components/Blocks.mobile.ts +0 -4
- package/src/components/Blocks.ts +0 -4
- package/src/components/DepositFiltration/DepositFiltration.fixture.mobile.tsx +5 -5
- package/src/components/DepositFiltration/DepositFiltration.fixture.tsx +5 -5
- package/src/components/Depository/useDepository.ts +2 -2
- package/src/components/HorizontalLayout/HorizontalLayout.fixture.tsx +15 -15
- package/src/components/MortgageFiltration/MortgageFiltration.fixture.mobile.tsx +8 -8
- package/src/components/MortgageFiltration/MortgageFiltration.fixture.tsx +8 -8
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +41 -0
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +40 -0
- package/src/components/ProductBlock/ProductBlock.tsx +13 -32
- package/src/components/SwipeListControlBlock/SwipeListControlBlock.fixture.mobile.tsx +9 -9
- package/src/components/SwipeListControlBlock/SwipeListControlBlock.fixture.tsx +11 -11
- package/src/components/VerticalLayout/VerticalLayout.fixture.mobile.tsx +3 -3
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +9 -10
- package/src/model/JSXBlock.ts +2 -2
- package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +5 -1
- package/src/ui-kit/BaseTile/BaseTile.tsx +48 -35
- package/bundle/components/ProductTile/ProductTile.d.ts +0 -5
- package/bundle/components/ProductTile/ProductTileContent.d.ts +0 -7
- package/bundle/components/Tile/Tile.d.ts +0 -5
- package/bundle/components/Tile/TileContent.d.ts +0 -6
- package/dist/components/ProductTile/ProductTile.d.ts +0 -5
- package/dist/components/ProductTile/ProductTile.js +0 -9
- package/dist/components/ProductTile/ProductTile.js.map +0 -1
- package/dist/components/ProductTile/ProductTileContent.d.ts +0 -7
- package/dist/components/ProductTile/ProductTileContent.js +0 -2
- package/dist/components/ProductTile/ProductTileContent.js.map +0 -1
- package/dist/components/Tile/Tile.d.ts +0 -5
- package/dist/components/Tile/Tile.js +0 -8
- package/dist/components/Tile/Tile.js.map +0 -1
- package/dist/components/Tile/TileContent.d.ts +0 -6
- package/dist/components/Tile/TileContent.js +0 -2
- package/dist/components/Tile/TileContent.js.map +0 -1
- package/lib/components/ProductTile/ProductTile.d.ts +0 -5
- package/lib/components/ProductTile/ProductTile.fixture.d.ts +0 -17
- package/lib/components/ProductTile/ProductTile.fixture.mobile.d.ts +0 -16
- package/lib/components/ProductTile/ProductTile.js +0 -7
- package/lib/components/ProductTile/ProductTile.js.map +0 -1
- package/lib/components/ProductTile/ProductTileContent.d.ts +0 -7
- package/lib/components/ProductTile/ProductTileContent.js +0 -2
- package/lib/components/ProductTile/ProductTileContent.js.map +0 -1
- package/lib/components/Tile/Tile.d.ts +0 -5
- package/lib/components/Tile/Tile.fixture.d.ts +0 -15
- package/lib/components/Tile/Tile.fixture.mobile.d.ts +0 -9
- package/lib/components/Tile/Tile.js +0 -6
- package/lib/components/Tile/Tile.js.map +0 -1
- package/lib/components/Tile/TileContent.d.ts +0 -6
- package/lib/components/Tile/TileContent.js +0 -2
- package/lib/components/Tile/TileContent.js.map +0 -1
- package/mobile/bundle/components/ProductTile/ProductTile.d.ts +0 -5
- package/mobile/bundle/components/ProductTile/ProductTileContent.d.ts +0 -7
- package/mobile/bundle/components/Tile/Tile.d.ts +0 -5
- package/mobile/bundle/components/Tile/TileContent.d.ts +0 -6
- package/mobile/dist/components/ProductTile/ProductTile.d.ts +0 -5
- package/mobile/dist/components/ProductTile/ProductTile.js +0 -9
- package/mobile/dist/components/ProductTile/ProductTile.js.map +0 -1
- package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +0 -7
- package/mobile/dist/components/ProductTile/ProductTileContent.js +0 -2
- package/mobile/dist/components/ProductTile/ProductTileContent.js.map +0 -1
- package/mobile/dist/components/Tile/Tile.d.ts +0 -5
- package/mobile/dist/components/Tile/Tile.js +0 -8
- package/mobile/dist/components/Tile/Tile.js.map +0 -1
- package/mobile/dist/components/Tile/TileContent.d.ts +0 -6
- package/mobile/dist/components/Tile/TileContent.js +0 -2
- package/mobile/dist/components/Tile/TileContent.js.map +0 -1
- package/mobile/lib/components/ProductTile/ProductTile.d.ts +0 -5
- package/mobile/lib/components/ProductTile/ProductTile.js +0 -7
- package/mobile/lib/components/ProductTile/ProductTile.js.map +0 -1
- package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +0 -7
- package/mobile/lib/components/ProductTile/ProductTileContent.js +0 -2
- package/mobile/lib/components/ProductTile/ProductTileContent.js.map +0 -1
- package/mobile/lib/components/Tile/Tile.d.ts +0 -5
- package/mobile/lib/components/Tile/Tile.js +0 -6
- package/mobile/lib/components/Tile/Tile.js.map +0 -1
- package/mobile/lib/components/Tile/TileContent.d.ts +0 -6
- package/mobile/lib/components/Tile/TileContent.js +0 -2
- package/mobile/lib/components/Tile/TileContent.js.map +0 -1
- package/mobile/src/components/ProductTile/ProductTile.example.json +0 -44
- package/mobile/src/components/ProductTile/ProductTile.tsx +0 -40
- package/mobile/src/components/ProductTile/ProductTile.ui.json +0 -17
- package/mobile/src/components/ProductTile/ProductTileContent.ts +0 -10
- package/mobile/src/components/Tile/Tile.example.json +0 -28
- package/mobile/src/components/Tile/Tile.tsx +0 -23
- package/mobile/src/components/Tile/Tile.ui.json +0 -17
- package/mobile/src/components/Tile/TileContent.ts +0 -7
- package/src/components/ProductTile/ProductTile.example.json +0 -44
- package/src/components/ProductTile/ProductTile.fixture.mobile.tsx +0 -217
- package/src/components/ProductTile/ProductTile.fixture.tsx +0 -227
- package/src/components/ProductTile/ProductTile.tsx +0 -40
- package/src/components/ProductTile/ProductTile.ui.json +0 -17
- package/src/components/ProductTile/ProductTileContent.ts +0 -10
- package/src/components/Tile/Tile.example.json +0 -28
- package/src/components/Tile/Tile.fixture.mobile.tsx +0 -48
- package/src/components/Tile/Tile.fixture.tsx +0 -146
- package/src/components/Tile/Tile.tsx +0 -23
- package/src/components/Tile/Tile.ui.json +0 -17
- package/src/components/Tile/TileContent.ts +0 -7
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export const description = 'v0.14.31';
|
|
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
|
+
updateTileDefaultValue(block.content);
|
|
24
|
+
block.type = 'ProductBlock';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (block.type === 'ProductTile') {
|
|
28
|
+
updateProductTileDefaultValue(block.content);
|
|
29
|
+
block.type = 'ProductBlock';
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function updateTileDefaultValue(content = {}) {
|
|
34
|
+
if (!content.headlineVersion) {
|
|
35
|
+
content.headlineVersion = 'S';
|
|
36
|
+
}
|
|
37
|
+
if (!content.listItemSize) {
|
|
38
|
+
content.listItemSize = 'M';
|
|
39
|
+
}
|
|
40
|
+
if (typeof content.isFullWidthTitle !== 'boolean') {
|
|
41
|
+
content.isFullWidthTitle = false;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function updateProductTileDefaultValue(content = {}) {
|
|
46
|
+
if (content.additionalDescription) {
|
|
47
|
+
const blockQuote = `<blockquote>${content.additionalDescription}</blockquote>`;
|
|
48
|
+
content.__html = content.__html ? blockQuote + content.__html : blockQuote;
|
|
49
|
+
Reflect.deleteProperty(content, 'additionalDescription');
|
|
50
|
+
}
|
|
51
|
+
if (!content.headlineVersion) {
|
|
52
|
+
content.headlineVersion = 'S';
|
|
53
|
+
}
|
|
54
|
+
if (!content.imageOptions || typeof content.imageOptions.isImageSecondary !== 'boolean') {
|
|
55
|
+
if (!content.imageOptions) {
|
|
56
|
+
content.imageOptions = {};
|
|
57
|
+
}
|
|
58
|
+
content.imageOptions.isImageSecondary = true;
|
|
59
|
+
}
|
|
60
|
+
if (typeof content.isFullWidthTitle !== 'boolean') {
|
|
61
|
+
content.isFullWidthTitle = true;
|
|
62
|
+
}
|
|
63
|
+
if (typeof content.isTabularBenefits !== 'boolean') {
|
|
64
|
+
content.isTabularBenefits = true;
|
|
65
|
+
}
|
|
66
|
+
}
|