@redneckz/wildless-cms-uni-blocks 0.9.8 → 0.9.10

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.
Files changed (212) hide show
  1. package/bin/migration-scripts/0.9.8.js +29 -0
  2. package/bin/migration-scripts/0.9.9.js +109 -0
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +26 -47
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  7. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  8. package/bundle/components/Footer/SocialMedia.d.ts +1 -1
  9. package/bundle/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  10. package/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  11. package/dist/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  12. package/dist/components/Blocks.js +0 -2
  13. package/dist/components/Blocks.js.map +1 -1
  14. package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  15. package/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  16. package/dist/components/CarouselEventCard/CarouselEventCard.js +1 -1
  17. package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  18. package/dist/components/CarouselProductCard/CarouselProductCard.js +5 -2
  19. package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  20. package/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  21. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
  22. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  23. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  24. package/dist/components/Footer/MediaButton.js +6 -7
  25. package/dist/components/Footer/MediaButton.js.map +1 -1
  26. package/dist/components/Footer/SocialMedia.d.ts +1 -1
  27. package/dist/components/Footer/SocialMedia.js +2 -2
  28. package/dist/components/Footer/SocialMedia.js.map +1 -1
  29. package/dist/components/StepsBlock/StepsBlock.js +5 -3
  30. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  31. package/dist/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  32. package/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  33. package/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  34. package/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  35. package/lib/common.css +1 -1
  36. package/lib/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  37. package/lib/components/Blocks.js +0 -2
  38. package/lib/components/Blocks.js.map +1 -1
  39. package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
  40. package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.d.ts +2 -10
  41. package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  42. package/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  43. package/lib/components/CarouselEventCard/CarouselEventCard.js +1 -1
  44. package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  45. package/lib/components/CarouselProductCard/CarouselProductCard.fixture.d.ts +2 -0
  46. package/lib/components/CarouselProductCard/CarouselProductCard.js +5 -2
  47. package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  48. package/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  49. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.d.ts +2 -0
  50. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
  51. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  52. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  53. package/lib/components/Footer/MediaButton.js +6 -7
  54. package/lib/components/Footer/MediaButton.js.map +1 -1
  55. package/lib/components/Footer/SocialMedia.d.ts +1 -1
  56. package/lib/components/Footer/SocialMedia.js +2 -2
  57. package/lib/components/Footer/SocialMedia.js.map +1 -1
  58. package/lib/components/StepsBlock/StepsBlock.js +5 -3
  59. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  60. package/lib/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  61. package/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  62. package/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  63. package/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  64. package/mobile/bundle/bundle.umd.js +9 -10
  65. package/mobile/bundle/bundle.umd.min.js +1 -1
  66. package/mobile/bundle/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  67. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  68. package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  69. package/mobile/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  70. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  71. package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  72. package/mobile/dist/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  73. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +1 -1
  74. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  75. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +5 -2
  76. package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  77. package/mobile/dist/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  78. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
  79. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  80. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  81. package/mobile/dist/components/Footer/MediaButton.js +6 -7
  82. package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
  83. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  84. package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  85. package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  86. package/mobile/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  87. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js +1 -1
  88. package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js +1 -1
  89. package/mobile/lib/components/CarouselBankHistoryCard/CarouselBankHistoryCard.js.map +1 -1
  90. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +1 -1
  91. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
  92. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +5 -2
  93. package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
  94. package/mobile/lib/components/CarouselProductCard/CarouselProductCardContent.d.ts +4 -0
  95. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
  96. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  97. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
  98. package/mobile/lib/components/Footer/MediaButton.js +6 -7
  99. package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
  100. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +10 -1
  101. package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
  102. package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
  103. package/mobile/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +0 -2
  104. package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
  105. package/mobile/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +2 -4
  106. package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +2 -2
  107. package/mobile/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +3 -1
  108. package/mobile/src/components/CarouselProductCard/CarouselProductCard.example.json +3 -1
  109. package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +5 -1
  110. package/mobile/src/components/CarouselProductCard/CarouselProductCardContent.ts +4 -0
  111. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +5 -2
  112. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +18 -34
  113. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -0
  114. package/mobile/src/components/ErrorBlock/ErrorBlock.example.json +3 -1
  115. package/mobile/src/components/Footer/MediaButton.tsx +7 -10
  116. package/mobile/src/components/MobileAppTile/MobileAppTile.example.json +3 -1
  117. package/mobile/src/components/PictureText/PictureText.example.json +3 -1
  118. package/mobile/src/components/ProductBlock/ProductBlock.example.json +3 -1
  119. package/mobile/src/components/ProductTile/ProductTile.example.json +3 -1
  120. package/mobile/src/components/StepsBlock/StepsBlock.example.json +7 -5
  121. package/mobile/src/components/StepsBlock/StepsBlock.ui.json +10 -0
  122. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +10 -2
  123. package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +3 -2
  124. package/mobile/src/components/Tile/Tile.example.json +3 -1
  125. package/mobile/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
  126. package/package.json +1 -1
  127. package/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
  128. package/src/components/Blocks.ts +0 -2
  129. package/src/components/Carousel/Carousel.fixture.tsx +43 -7
  130. package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.fixture.tsx +2 -9
  131. package/src/components/CarouselBankHistoryCard/CarouselBankHistoryCard.tsx +2 -4
  132. package/src/components/CarouselEventCard/CarouselEventCard.tsx +2 -2
  133. package/src/components/CarouselInvestmentCard/CarouselInvestmentCard.example.json +3 -1
  134. package/src/components/CarouselProductCard/CarouselProductCard.example.json +3 -1
  135. package/src/components/CarouselProductCard/CarouselProductCard.fixture.tsx +10 -0
  136. package/src/components/CarouselProductCard/CarouselProductCard.tsx +5 -1
  137. package/src/components/CarouselProductCard/CarouselProductCardContent.ts +4 -0
  138. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +5 -2
  139. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +28 -1
  140. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +18 -34
  141. package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -0
  142. package/src/components/ErrorBlock/ErrorBlock.example.json +3 -1
  143. package/src/components/Footer/MediaButton.tsx +7 -10
  144. package/src/components/Footer/SocialMedia.tsx +3 -11
  145. package/src/components/MobileAppTile/MobileAppTile.example.json +3 -1
  146. package/src/components/PictureText/PictureText.example.json +3 -1
  147. package/src/components/ProductBlock/ProductBlock.example.json +3 -1
  148. package/src/components/ProductTile/ProductTile.example.json +3 -1
  149. package/src/components/StepsBlock/StepsBlock.example.json +7 -5
  150. package/src/components/StepsBlock/StepsBlock.fixture.tsx +14 -8
  151. package/src/components/StepsBlock/StepsBlock.tsx +13 -4
  152. package/src/components/StepsBlock/StepsBlock.ui.json +10 -0
  153. package/src/components/StepsBlock/StepsBlockContent.ts +10 -2
  154. package/src/components/StepsBlock/StepsBlockStyleMaps.ts +3 -2
  155. package/src/components/Tile/Tile.example.json +3 -1
  156. package/src/components/VerticalLayout/VerticalLayoutContent.ts +0 -2
  157. package/bundle/components/Recommendation/Recommendation.d.ts +0 -5
  158. package/bundle/components/Recommendation/RecommendationCard.d.ts +0 -5
  159. package/bundle/components/Recommendation/RecommendationContent.d.ts +0 -24
  160. package/dist/components/Recommendation/Recommendation.d.ts +0 -5
  161. package/dist/components/Recommendation/Recommendation.js +0 -26
  162. package/dist/components/Recommendation/Recommendation.js.map +0 -1
  163. package/dist/components/Recommendation/RecommendationCard.d.ts +0 -5
  164. package/dist/components/Recommendation/RecommendationCard.js +0 -17
  165. package/dist/components/Recommendation/RecommendationCard.js.map +0 -1
  166. package/dist/components/Recommendation/RecommendationContent.d.ts +0 -24
  167. package/dist/components/Recommendation/RecommendationContent.js +0 -2
  168. package/dist/components/Recommendation/RecommendationContent.js.map +0 -1
  169. package/lib/components/Recommendation/Recommendation.d.ts +0 -5
  170. package/lib/components/Recommendation/Recommendation.fixture.d.ts +0 -15
  171. package/lib/components/Recommendation/Recommendation.js +0 -24
  172. package/lib/components/Recommendation/Recommendation.js.map +0 -1
  173. package/lib/components/Recommendation/RecommendationCard.d.ts +0 -5
  174. package/lib/components/Recommendation/RecommendationCard.js +0 -15
  175. package/lib/components/Recommendation/RecommendationCard.js.map +0 -1
  176. package/lib/components/Recommendation/RecommendationContent.d.ts +0 -24
  177. package/lib/components/Recommendation/RecommendationContent.js +0 -2
  178. package/lib/components/Recommendation/RecommendationContent.js.map +0 -1
  179. package/mobile/bundle/components/Recommendation/Recommendation.d.ts +0 -5
  180. package/mobile/bundle/components/Recommendation/RecommendationCard.d.ts +0 -5
  181. package/mobile/bundle/components/Recommendation/RecommendationContent.d.ts +0 -24
  182. package/mobile/dist/components/Recommendation/Recommendation.d.ts +0 -5
  183. package/mobile/dist/components/Recommendation/Recommendation.js +0 -26
  184. package/mobile/dist/components/Recommendation/Recommendation.js.map +0 -1
  185. package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +0 -5
  186. package/mobile/dist/components/Recommendation/RecommendationCard.js +0 -17
  187. package/mobile/dist/components/Recommendation/RecommendationCard.js.map +0 -1
  188. package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +0 -24
  189. package/mobile/dist/components/Recommendation/RecommendationContent.js +0 -2
  190. package/mobile/dist/components/Recommendation/RecommendationContent.js.map +0 -1
  191. package/mobile/lib/components/Recommendation/Recommendation.d.ts +0 -5
  192. package/mobile/lib/components/Recommendation/Recommendation.js +0 -24
  193. package/mobile/lib/components/Recommendation/Recommendation.js.map +0 -1
  194. package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +0 -5
  195. package/mobile/lib/components/Recommendation/RecommendationCard.js +0 -15
  196. package/mobile/lib/components/Recommendation/RecommendationCard.js.map +0 -1
  197. package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +0 -24
  198. package/mobile/lib/components/Recommendation/RecommendationContent.js +0 -2
  199. package/mobile/lib/components/Recommendation/RecommendationContent.js.map +0 -1
  200. package/mobile/src/components/Catalog/Catalog.ui.json +0 -1
  201. package/mobile/src/components/Recommendation/Recommendation.example.json +0 -61
  202. package/mobile/src/components/Recommendation/Recommendation.tsx +0 -66
  203. package/mobile/src/components/Recommendation/Recommendation.ui.json +0 -19
  204. package/mobile/src/components/Recommendation/RecommendationCard.tsx +0 -49
  205. package/mobile/src/components/Recommendation/RecommendationContent.ts +0 -27
  206. package/src/components/Catalog/Catalog.ui.json +0 -1
  207. package/src/components/Recommendation/Recommendation.example.json +0 -61
  208. package/src/components/Recommendation/Recommendation.fixture.tsx +0 -176
  209. package/src/components/Recommendation/Recommendation.tsx +0 -66
  210. package/src/components/Recommendation/Recommendation.ui.json +0 -19
  211. package/src/components/Recommendation/RecommendationCard.tsx +0 -49
  212. package/src/components/Recommendation/RecommendationContent.ts +0 -27
@@ -0,0 +1,29 @@
1
+ export const description = 'v0.9.8';
2
+
3
+ export default (unitPath, content) => {
4
+ if (!content?.blocks) {
5
+ return content;
6
+ }
7
+
8
+ for (const block of content.blocks) {
9
+ adjustStepsBlock(block);
10
+ }
11
+
12
+ return { ...content };
13
+ };
14
+
15
+ const adjustStepsBlock = (block) => {
16
+ if (block.blocks) {
17
+ for (const childBlock of block.blocks) {
18
+ adjustStepsBlock(childBlock);
19
+ }
20
+ }
21
+
22
+ if (block.type !== 'StepsBlock') {
23
+ return;
24
+ }
25
+ if (block?.content?.button) {
26
+ block.content.buttons = [block?.content?.button];
27
+ Reflect.deleteProperty(block.content, 'button');
28
+ }
29
+ };
@@ -0,0 +1,109 @@
1
+ import { deleteEmptyProps, renameProp } from '../utils.js';
2
+
3
+ export const description = 'v0.9.9';
4
+
5
+ export default (unitPath, content) => {
6
+ if (!content?.blocks) {
7
+ return content;
8
+ }
9
+
10
+ for (const block of content.blocks) {
11
+ adjustCarouselBlock(block);
12
+ }
13
+
14
+ return { ...content };
15
+ };
16
+
17
+ const adjustCarouselBlock = (block) => {
18
+ if (block.blocks) {
19
+ for (const childBlock of block.blocks) {
20
+ adjustCarouselBlock(childBlock);
21
+ }
22
+ }
23
+
24
+ if (block.type === 'Recommendation') {
25
+ adjustCarousel(block, 'CarouselRecommendationCard');
26
+ }
27
+ };
28
+
29
+ const adjustCarousel = (block, type, cardCount) => {
30
+ if (block.blocks) {
31
+ for (const childBlock of block.blocks) {
32
+ adjustCarousel(childBlock);
33
+ }
34
+ }
35
+
36
+ const recommendations = block?.content?.recommendations;
37
+ const headlineTitle = block?.content?.title;
38
+ const anchor = block?.anchor;
39
+ block.blocks = [];
40
+ if (headlineTitle) {
41
+ block.blocks.push(getHeadlineBlock(headlineTitle));
42
+ }
43
+ if (recommendations && recommendations?.length > 0) {
44
+ block.blocks.push(getCarousel(recommendations, type, cardCount));
45
+ }
46
+ if (anchor) {
47
+ block.anchor = anchor;
48
+ }
49
+
50
+ getVerticalLayout(block);
51
+ };
52
+
53
+ const getVerticalLayout = (block) => {
54
+ block.content = {
55
+ isTheme: false,
56
+ version: 'secondary',
57
+ isPadding: true,
58
+ isInnerPadding: true,
59
+ align: 'stretch',
60
+ gap: 'L',
61
+ };
62
+ block.style = ['col-span-12'];
63
+ block.type = 'VerticalLayout';
64
+ };
65
+
66
+ const getCarousel = (recommendation, cardType) => {
67
+ return {
68
+ content: {
69
+ isTheme: true,
70
+ visibleItemCount: 0,
71
+ isBlur: false,
72
+ arrowsPadded: true,
73
+ isCycle: false,
74
+ isPadding: false,
75
+ version: '',
76
+ },
77
+ style: ['col-span-12'],
78
+ type: 'Carousel',
79
+ blocks: recommendation.map((_) => {
80
+ renameProp(_, 'image', 'icon');
81
+ if (!_.button?.text) {
82
+ Reflect.deleteProperty(_, 'button');
83
+ }
84
+ if (_?.recommendations) {
85
+ Reflect.deleteProperty(_, 'recommendations');
86
+ }
87
+ deleteEmptyProps(_);
88
+
89
+ return {
90
+ content: _,
91
+ style: ['col-span-12'],
92
+ type: cardType,
93
+ };
94
+ }),
95
+ };
96
+ };
97
+
98
+ const getHeadlineBlock = (title) => ({
99
+ content: {
100
+ isTheme: true,
101
+ title: title,
102
+ align: 'text-center',
103
+ bgColorHeadline: 'transparent',
104
+ headlineVersion: 'M',
105
+ isPadding: false,
106
+ },
107
+ style: ['col-span-12'],
108
+ type: 'Headline',
109
+ });