@redneckz/wildless-cms-uni-blocks 0.2.91 → 0.2.94

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 (284) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +156 -80
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/api/LikeAPI.js +1 -0
  5. package/dist/api/LikeAPI.js.map +1 -1
  6. package/dist/components/Accordion/AccordionContent.d.ts +38 -14
  7. package/dist/components/Accordion/AccordionItem.js +8 -6
  8. package/dist/components/Accordion/AccordionItem.js.map +1 -1
  9. package/dist/components/BaseTile/BaseTile.js +1 -1
  10. package/dist/components/BaseTile/BaseTile.js.map +1 -1
  11. package/dist/components/BlockContent.d.ts +2 -1
  12. package/dist/components/Blocks.d.ts +1 -0
  13. package/dist/components/Blocks.js +2 -0
  14. package/dist/components/Blocks.js.map +1 -1
  15. package/dist/components/ComparisonTable/ComparisonTable.js +12 -10
  16. package/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
  17. package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +0 -18
  18. package/dist/components/ComparisonTable/HeaderCell.js +1 -1
  19. package/dist/components/ComparisonTable/HeaderCell.js.map +1 -1
  20. package/dist/components/ComparisonTable/TableCarouselContainer.d.ts +3 -0
  21. package/dist/components/ComparisonTable/TableCarouselContainer.js +5 -2
  22. package/dist/components/ComparisonTable/TableCarouselContainer.js.map +1 -1
  23. package/dist/components/ComparisonTable/TableRow.js +1 -1
  24. package/dist/components/ComparisonTable/TableRow.js.map +1 -1
  25. package/dist/components/ContentPage/ContentPage.d.ts +9 -1
  26. package/dist/components/ContentPage/ContentPage.js +20 -17
  27. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  28. package/dist/components/ContentPage/ContentPageHead.d.ts +1 -1
  29. package/dist/components/ContentPage/toMobilePage.js +13 -2
  30. package/dist/components/ContentPage/toMobilePage.js.map +1 -1
  31. package/dist/components/CreditCalculator/CreditCalculator.js +1 -1
  32. package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
  33. package/dist/components/Footer/Contacts.js +1 -1
  34. package/dist/components/Footer/Contacts.js.map +1 -1
  35. package/dist/components/Footer/FooterContent.d.ts +1 -2
  36. package/dist/components/Footer/HorizontalNavigation.js +1 -1
  37. package/dist/components/Footer/SocialMedia.js +1 -2
  38. package/dist/components/Footer/SocialMedia.js.map +1 -1
  39. package/dist/components/Gallery/GalleryInner.js +2 -2
  40. package/dist/components/Gallery/GalleryInner.js.map +1 -1
  41. package/dist/components/Header/Header.js +3 -3
  42. package/dist/components/Header/Header.js.map +1 -1
  43. package/dist/components/LinkDocs/LinkDocs.js +5 -5
  44. package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
  45. package/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -2
  46. package/dist/components/MobileBlocks.js +0 -3
  47. package/dist/components/MobileBlocks.js.map +1 -1
  48. package/dist/components/PictureText/PictureTextContent.d.ts +1 -3
  49. package/dist/components/Placeholder/Placeholder.js.map +1 -1
  50. package/dist/components/ProductBlock/ProductBlock.js +1 -1
  51. package/dist/components/ProductBlock/ProductBlock.js.map +1 -1
  52. package/dist/components/ProductBlock/ProductBlock.mobile.js +3 -1
  53. package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
  54. package/dist/components/ProductBlock/ProductBlockInner.js +2 -5
  55. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  56. package/dist/components/ProductGallery/ProductGallery.js +2 -2
  57. package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
  58. package/dist/components/PromoTile/PromoTile.d.ts +1 -1
  59. package/dist/components/PromoTile/PromoTile.js +1 -1
  60. package/dist/components/PromoTile/PromoTile.js.map +1 -1
  61. package/dist/components/TariffsTable/TariffsTable.d.ts +5 -0
  62. package/dist/components/TariffsTable/TariffsTable.js +25 -0
  63. package/dist/components/TariffsTable/TariffsTable.js.map +1 -0
  64. package/dist/components/TariffsTable/TariffsTableCell.d.ts +6 -0
  65. package/dist/components/TariffsTable/TariffsTableCell.js +18 -0
  66. package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -0
  67. package/dist/components/TariffsTable/TariffsTableContent.d.ts +55 -0
  68. package/dist/components/TariffsTable/TariffsTableContent.js +2 -0
  69. package/dist/components/TariffsTable/TariffsTableContent.js.map +1 -0
  70. package/dist/components/TariffsTable/TariffsTableRow.d.ts +8 -0
  71. package/dist/components/TariffsTable/TariffsTableRow.js +13 -0
  72. package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -0
  73. package/dist/components/TariffsTable/constants.d.ts +4 -0
  74. package/dist/components/TariffsTable/constants.js +7 -0
  75. package/dist/components/TariffsTable/constants.js.map +1 -0
  76. package/dist/components/TextBlock/TextBlock.d.ts +1 -1
  77. package/dist/components/TextBlock/TextBlock.js +1 -1
  78. package/dist/components/TextBlock/TextBlock.js.map +1 -1
  79. package/dist/components/TextBlock/TextBlockContent.d.ts +1 -2
  80. package/dist/components/Tile/Tile.d.ts +1 -1
  81. package/dist/components/Tile/Tile.js +14 -2
  82. package/dist/components/Tile/Tile.js.map +1 -1
  83. package/dist/content-page-repository/ContentPageRepository.js +1 -0
  84. package/dist/content-page-repository/ContentPageRepository.js.map +1 -1
  85. package/dist/hooks/useComparisonTableScroll.d.ts +12 -0
  86. package/dist/hooks/useComparisonTableScroll.js +12 -0
  87. package/dist/hooks/useComparisonTableScroll.js.map +1 -0
  88. package/dist/hooks/useLink.js +1 -1
  89. package/dist/hooks/useLink.js.map +1 -1
  90. package/dist/model/TableVersion.d.ts +1 -0
  91. package/dist/model/TableVersion.js +2 -0
  92. package/dist/model/TableVersion.js.map +1 -0
  93. package/dist/types.d.ts +8 -0
  94. package/dist/ui-kit/BlockItem/BlockItem.d.ts +1 -9
  95. package/dist/ui-kit/BlockItem/BlockItem.js +5 -5
  96. package/dist/ui-kit/BlockItem/BlockItem.js.map +1 -1
  97. package/dist/ui-kit/BlockItem/BlockItemProps.d.ts +20 -0
  98. package/dist/ui-kit/BlockItem/BlockItemProps.js +2 -0
  99. package/dist/ui-kit/BlockItem/BlockItemProps.js.map +1 -0
  100. package/dist/ui-kit/Icon/IconProps.d.ts +57 -25
  101. package/dist/ui-kit/Icon/IconProps.js +39 -23
  102. package/dist/ui-kit/Icon/IconProps.js.map +1 -1
  103. package/dist/ui-kit/InputRange/InputRange.js +1 -1
  104. package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  105. package/dist/ui-kit/SearchBar.js +2 -1
  106. package/dist/ui-kit/SearchBar.js.map +1 -1
  107. package/lib/api/LikeAPI.js +1 -0
  108. package/lib/api/LikeAPI.js.map +1 -1
  109. package/lib/common.css +1 -1
  110. package/lib/components/Accordion/Accordion.fixture.d.ts +1 -4
  111. package/lib/components/Accordion/AccordionContent.d.ts +38 -14
  112. package/lib/components/Accordion/AccordionItem.js +8 -6
  113. package/lib/components/Accordion/AccordionItem.js.map +1 -1
  114. package/lib/components/BaseTile/BaseTile.js +1 -1
  115. package/lib/components/BaseTile/BaseTile.js.map +1 -1
  116. package/lib/components/BlockContent.d.ts +2 -1
  117. package/lib/components/Blocks.d.ts +1 -0
  118. package/lib/components/Blocks.js +2 -0
  119. package/lib/components/Blocks.js.map +1 -1
  120. package/lib/components/ComparisonTable/ComparisonTable.js +12 -10
  121. package/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
  122. package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +0 -18
  123. package/lib/components/ComparisonTable/HeaderCell.js +1 -1
  124. package/lib/components/ComparisonTable/HeaderCell.js.map +1 -1
  125. package/lib/components/ComparisonTable/TableCarouselContainer.d.ts +3 -0
  126. package/lib/components/ComparisonTable/TableCarouselContainer.js +5 -2
  127. package/lib/components/ComparisonTable/TableCarouselContainer.js.map +1 -1
  128. package/lib/components/ComparisonTable/TableRow.js +2 -2
  129. package/lib/components/ComparisonTable/TableRow.js.map +1 -1
  130. package/lib/components/ContentPage/ContentPage.d.ts +9 -1
  131. package/lib/components/ContentPage/ContentPage.js +20 -17
  132. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  133. package/lib/components/ContentPage/ContentPageHead.d.ts +1 -1
  134. package/lib/components/ContentPage/toMobilePage.js +13 -2
  135. package/lib/components/ContentPage/toMobilePage.js.map +1 -1
  136. package/lib/components/CreditCalculator/CreditCalculator.js +1 -1
  137. package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
  138. package/lib/components/Footer/Contacts.js +1 -1
  139. package/lib/components/Footer/Contacts.js.map +1 -1
  140. package/lib/components/Footer/FooterContent.d.ts +1 -2
  141. package/lib/components/Footer/HorizontalNavigation.js +1 -1
  142. package/lib/components/Footer/SocialMedia.js +1 -2
  143. package/lib/components/Footer/SocialMedia.js.map +1 -1
  144. package/lib/components/Gallery/GalleryInner.js +2 -2
  145. package/lib/components/Gallery/GalleryInner.js.map +1 -1
  146. package/lib/components/Header/Header.js +3 -3
  147. package/lib/components/Header/Header.js.map +1 -1
  148. package/lib/components/Headline/Headline.fixture.d.ts +3 -2
  149. package/lib/components/LinkDocs/LinkDocs.fixture.d.ts +7 -7
  150. package/lib/components/LinkDocs/LinkDocs.js +5 -5
  151. package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
  152. package/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -2
  153. package/lib/components/MobileBlocks.js +0 -3
  154. package/lib/components/MobileBlocks.js.map +1 -1
  155. package/lib/components/PictureText/PictureText.fixture.d.ts +2 -0
  156. package/lib/components/PictureText/PictureTextContent.d.ts +1 -3
  157. package/lib/components/Placeholder/Placeholder.js.map +1 -1
  158. package/lib/components/ProductBlock/ProductBlock.js +1 -1
  159. package/lib/components/ProductBlock/ProductBlock.js.map +1 -1
  160. package/lib/components/ProductBlock/ProductBlock.mobile.js +3 -1
  161. package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
  162. package/lib/components/ProductBlock/ProductBlockInner.js +2 -5
  163. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  164. package/lib/components/ProductGallery/ProductGallery.js +2 -2
  165. package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
  166. package/lib/components/PromoTile/PromoTile.d.ts +1 -1
  167. package/lib/components/PromoTile/PromoTile.js +1 -1
  168. package/lib/components/PromoTile/PromoTile.js.map +1 -1
  169. package/lib/components/TariffsTable/TariffsTable.d.ts +5 -0
  170. package/lib/components/TariffsTable/TariffsTable.fixture.d.ts +7 -0
  171. package/lib/components/TariffsTable/TariffsTable.js +23 -0
  172. package/lib/components/TariffsTable/TariffsTable.js.map +1 -0
  173. package/lib/components/TariffsTable/TariffsTableCell.d.ts +6 -0
  174. package/lib/components/TariffsTable/TariffsTableCell.js +16 -0
  175. package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -0
  176. package/lib/components/TariffsTable/TariffsTableContent.d.ts +55 -0
  177. package/lib/components/TariffsTable/TariffsTableContent.js +2 -0
  178. package/lib/components/TariffsTable/TariffsTableContent.js.map +1 -0
  179. package/lib/components/TariffsTable/TariffsTableRow.d.ts +8 -0
  180. package/lib/components/TariffsTable/TariffsTableRow.js +11 -0
  181. package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -0
  182. package/lib/components/TariffsTable/constants.d.ts +4 -0
  183. package/lib/components/TariffsTable/constants.js +5 -0
  184. package/lib/components/TariffsTable/constants.js.map +1 -0
  185. package/lib/components/TextBlock/TextBlock.d.ts +1 -1
  186. package/lib/components/TextBlock/TextBlock.fixture.d.ts +2 -0
  187. package/lib/components/TextBlock/TextBlock.js +1 -1
  188. package/lib/components/TextBlock/TextBlock.js.map +1 -1
  189. package/lib/components/TextBlock/TextBlockContent.d.ts +1 -2
  190. package/lib/components/Tile/Tile.d.ts +1 -1
  191. package/lib/components/Tile/Tile.js +14 -2
  192. package/lib/components/Tile/Tile.js.map +1 -1
  193. package/lib/content-page-repository/ContentPageRepository.js +1 -0
  194. package/lib/content-page-repository/ContentPageRepository.js.map +1 -1
  195. package/lib/hooks/useComparisonTableScroll.d.ts +12 -0
  196. package/lib/hooks/useComparisonTableScroll.js +9 -0
  197. package/lib/hooks/useComparisonTableScroll.js.map +1 -0
  198. package/lib/hooks/useLink.js +1 -1
  199. package/lib/hooks/useLink.js.map +1 -1
  200. package/lib/model/TableVersion.d.ts +1 -0
  201. package/lib/model/TableVersion.js +2 -0
  202. package/lib/model/TableVersion.js.map +1 -0
  203. package/lib/types.d.ts +8 -0
  204. package/lib/ui-kit/BlockItem/BlockItem.d.ts +1 -9
  205. package/lib/ui-kit/BlockItem/BlockItem.fixture.d.ts +6 -1
  206. package/lib/ui-kit/BlockItem/BlockItem.js +5 -5
  207. package/lib/ui-kit/BlockItem/BlockItem.js.map +1 -1
  208. package/lib/ui-kit/BlockItem/BlockItemProps.d.ts +20 -0
  209. package/lib/ui-kit/BlockItem/BlockItemProps.js +2 -0
  210. package/lib/ui-kit/BlockItem/BlockItemProps.js.map +1 -0
  211. package/lib/ui-kit/Icon/IconProps.d.ts +57 -25
  212. package/lib/ui-kit/Icon/IconProps.js +39 -23
  213. package/lib/ui-kit/Icon/IconProps.js.map +1 -1
  214. package/lib/ui-kit/InputRange/InputRange.js +1 -1
  215. package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  216. package/lib/ui-kit/SearchBar.js +2 -1
  217. package/lib/ui-kit/SearchBar.js.map +1 -1
  218. package/package.json +19 -9
  219. package/src/api/LikeAPI.ts +1 -0
  220. package/src/components/Accordion/Accordion.example.json +18 -42
  221. package/src/components/Accordion/Accordion.fixture.tsx +29 -119
  222. package/src/components/Accordion/AccordionContent.ts +47 -18
  223. package/src/components/Accordion/AccordionItem.tsx +13 -9
  224. package/src/components/BaseTile/BaseTile.tsx +6 -3
  225. package/src/components/BlockContent.ts +2 -0
  226. package/src/components/Blocks.ts +2 -0
  227. package/src/components/ComparisonTable/ComparisonTable.tsx +17 -14
  228. package/src/components/ComparisonTable/ComparisonTableContent.ts +0 -19
  229. package/src/components/ComparisonTable/HeaderCell.tsx +3 -3
  230. package/src/components/ComparisonTable/TableCarouselContainer.tsx +11 -4
  231. package/src/components/ComparisonTable/TableRow.tsx +2 -2
  232. package/src/components/ContentPage/ContentPage.fixture.tsx +3 -3
  233. package/src/components/ContentPage/ContentPage.page.json +426 -22
  234. package/src/components/ContentPage/ContentPage.tsx +71 -36
  235. package/src/components/ContentPage/ContentPageHead.tsx +1 -1
  236. package/src/components/ContentPage/toMobilePage.ts +19 -2
  237. package/src/components/CreditCalculator/CreditCalculator.tsx +1 -1
  238. package/src/components/Footer/Contacts.tsx +1 -1
  239. package/src/components/Footer/FooterContent.ts +1 -1
  240. package/src/components/Footer/HorizontalNavigation.tsx +1 -1
  241. package/src/components/Footer/SocialMedia.tsx +5 -6
  242. package/src/components/Gallery/GalleryInner.tsx +2 -1
  243. package/src/components/Header/Header.tsx +14 -12
  244. package/src/components/Headline/Headline.fixture.tsx +11 -34
  245. package/src/components/LinkDocs/LinkDocs.example.json +26 -0
  246. package/src/components/LinkDocs/LinkDocs.fixture.tsx +13 -13
  247. package/src/components/LinkDocs/LinkDocs.tsx +9 -8
  248. package/src/components/MiniGallery/MiniGalleryContent.ts +1 -1
  249. package/src/components/MobileBlocks.ts +0 -3
  250. package/src/components/PictureText/PictureText.fixture.tsx +20 -20
  251. package/src/components/PictureText/PictureTextContent.ts +1 -3
  252. package/src/components/Placeholder/Placeholder.tsx +2 -2
  253. package/src/components/ProductBlock/ProductBlock.fixture.tsx +1 -0
  254. package/src/components/ProductBlock/ProductBlock.mobile.tsx +1 -0
  255. package/src/components/ProductBlock/ProductBlock.tsx +3 -1
  256. package/src/components/ProductBlock/ProductBlockInner.tsx +9 -12
  257. package/src/components/ProductGallery/ProductGallery.example.json +1 -1
  258. package/src/components/ProductGallery/ProductGallery.fixture.tsx +7 -13
  259. package/src/components/ProductGallery/ProductGallery.tsx +7 -5
  260. package/src/components/PromoTile/PromoTile.tsx +3 -3
  261. package/src/components/TariffsTable/TariffsTable.example.json +87 -0
  262. package/src/components/TariffsTable/TariffsTable.fixture.tsx +195 -0
  263. package/src/components/TariffsTable/TariffsTable.tsx +74 -0
  264. package/src/components/TariffsTable/TariffsTableCell.tsx +64 -0
  265. package/src/components/TariffsTable/TariffsTableContent.ts +61 -0
  266. package/src/components/TariffsTable/TariffsTableRow.tsx +46 -0
  267. package/src/components/TariffsTable/constants.ts +4 -0
  268. package/src/components/TextBlock/TextBlock.example.json +9 -2
  269. package/src/components/TextBlock/TextBlock.fixture.tsx +20 -64
  270. package/src/components/TextBlock/TextBlock.tsx +2 -2
  271. package/src/components/TextBlock/TextBlockContent.ts +1 -2
  272. package/src/components/Tile/Tile.example.json +5 -2
  273. package/src/components/Tile/Tile.tsx +16 -5
  274. package/src/content-page-repository/ContentPageRepository.ts +1 -0
  275. package/src/hooks/useComparisonTableScroll.ts +21 -0
  276. package/src/hooks/useLink.ts +1 -1
  277. package/src/model/TableVersion.ts +1 -0
  278. package/src/types.ts +11 -1
  279. package/src/ui-kit/BlockItem/BlockItem.fixture.tsx +8 -1
  280. package/src/ui-kit/BlockItem/BlockItem.tsx +7 -18
  281. package/src/ui-kit/BlockItem/BlockItemProps.ts +22 -0
  282. package/src/ui-kit/Icon/IconProps.ts +34 -2
  283. package/src/ui-kit/InputRange/InputRange.tsx +2 -2
  284. package/src/ui-kit/SearchBar.tsx +16 -6
@@ -11,26 +11,32 @@
11
11
  "date": "2022-04-08",
12
12
  "style": ["p-20", "pt-0", "gap-5", "bg-secondary-light"],
13
13
  "likeControl": true,
14
- "blocks": [
15
- {
16
- "type": "Header",
17
- "style": ["col-span-12", "-mx-20", "mb-5", "shadow-[0_8px_32px_0px_#00000014]"],
18
- "content": {
19
- "defaultLocation": "Москва",
20
- "topItems": [
21
- {
22
- "href": "https://rshb.ru/",
23
- "text": "Бизнес клиентам",
24
- "target": "_blank"
25
- },
26
- {
27
- "href": "https://rshb.ru/",
28
- "text": "Частным клиентам",
29
- "target": "_blank"
14
+ "slots": {
15
+ "header": {
16
+ "blocks": [
17
+ {
18
+ "type": "Header",
19
+ "style": ["-mx-20", "mb-5", "shadow-[0_8px_32px_0px_#00000014]"],
20
+ "content": {
21
+ "defaultLocation": "Москва",
22
+ "topItems": [
23
+ {
24
+ "href": "https://rshb.ru/",
25
+ "text": "Бизнес клиентам",
26
+ "target": "_blank"
27
+ },
28
+ {
29
+ "href": "https://rshb.ru/",
30
+ "text": "Частным клиентам",
31
+ "target": "_blank"
32
+ }
33
+ ]
30
34
  }
31
- ]
32
- }
33
- },
35
+ }
36
+ ]
37
+ }
38
+ },
39
+ "blocks": [
34
40
  {
35
41
  "type": "ProductGallery",
36
42
  "style": ["col-span-12"],
@@ -92,6 +98,7 @@
92
98
  "src": "worker.png",
93
99
  "title": "Рабочий",
94
100
  "format": "webp",
101
+ "alt": "Кредит наличными",
95
102
  "size": {
96
103
  "width": 280,
97
104
  "height": 280
@@ -106,7 +113,6 @@
106
113
  },
107
114
  "productBlock": {
108
115
  "title": "Дополнительные бонусные баллы за покупки!»",
109
- "description": "Кредит наличными без залога и поручительства. Потребительский кредит на любые цели. Нужен только паспорт.",
110
116
  "buttons": [
111
117
  {
112
118
  "href": "https://rshb.ru",
@@ -119,6 +125,7 @@
119
125
  "src": "credit-card-1.png",
120
126
  "title": "Кредитка",
121
127
  "format": "webp",
128
+ "alt": "Кредит наличными",
122
129
  "size": {
123
130
  "width": 280,
124
131
  "height": 280
@@ -133,7 +140,6 @@
133
140
  },
134
141
  "productBlock": {
135
142
  "title": "Карты Unionpay»",
136
- "description": "Кэшбэк до 20% у партнеров",
137
143
  "items": [
138
144
  "Потребительский кредит по специальной процентной ставке",
139
145
  "Получите деньги без залога и поручительства",
@@ -151,6 +157,7 @@
151
157
  "src": "credit-card-1.png",
152
158
  "title": "Кредитка",
153
159
  "format": "webp",
160
+ "alt": "Кредит наличными",
154
161
  "size": {
155
162
  "width": 280,
156
163
  "height": 280
@@ -1408,7 +1415,7 @@
1408
1415
  "href": "/abc7/yolo.png"
1409
1416
  },
1410
1417
  {
1411
- "text": "Some more generic text, and even more, more text",
1418
+ "text": "Some more generic text, and even more, more text, and more generic text, and even more, more text, and even more",
1412
1419
  "href": "/abc8/archive.zip",
1413
1420
  "fileSize": "2.3МБ"
1414
1421
  },
@@ -1425,6 +1432,403 @@
1425
1432
  ]
1426
1433
  }
1427
1434
  },
1435
+ {
1436
+ "type": "TariffsTable",
1437
+ "style": ["col-span-12"],
1438
+ "content": {
1439
+ "title": "Другие дебетовые карты Россельхозбанка",
1440
+ "rowHeaders": [
1441
+ {
1442
+ "title": "Начисление процентов на остаток по счету",
1443
+ "icon": "OkIcon"
1444
+ },
1445
+ {
1446
+ "title": "Снятие наличных",
1447
+ "icon": "GlassIcon"
1448
+ },
1449
+ {
1450
+ "title": "Оформление онлайн",
1451
+ "icon": "ShieldTickIcon"
1452
+ },
1453
+ {
1454
+ "title": "Кэшбэк баллами"
1455
+ },
1456
+ {
1457
+ "title": "Стоимость обслуживания"
1458
+ },
1459
+ {
1460
+ "title": "Стоимость SMS-сервиса"
1461
+ },
1462
+ {
1463
+ "title": "Дополнительная информация"
1464
+ }
1465
+ ],
1466
+ "columns": [
1467
+ {
1468
+ "data": [
1469
+ [
1470
+ {
1471
+ "label": "Нет"
1472
+ }
1473
+ ],
1474
+ [
1475
+ {
1476
+ "label": "Бесплатно",
1477
+ "description": "В банкоматах и кассах Россельхозбанка и банков-партнеров"
1478
+ },
1479
+ {
1480
+ "label": "Бесплатно",
1481
+ "description": "В сторонних банкоматах - 1 раз в месяц, далее 1% минимум 150 руб"
1482
+ }
1483
+ ],
1484
+ [
1485
+ {
1486
+ "label": "Нет"
1487
+ }
1488
+ ],
1489
+ [
1490
+ {
1491
+ "label": "Платёжные системы картинкой"
1492
+ },
1493
+ {
1494
+ "image": {
1495
+ "src": "payment-systems.png",
1496
+ "format": "webp",
1497
+ "size": {
1498
+ "width": 288,
1499
+ "height": 56
1500
+ },
1501
+ "alt": "Платёжные системы",
1502
+ "title": "Платёжные системы"
1503
+ }
1504
+ }
1505
+ ],
1506
+ [
1507
+ {
1508
+ "label": "Кнопки-иконки"
1509
+ },
1510
+ {
1511
+ "buttons": [
1512
+ {
1513
+ "icon": "AppleIcon",
1514
+ "rounded": true,
1515
+ "version": "secondary",
1516
+ "href": "/_blank",
1517
+ "target": "_blank"
1518
+ },
1519
+ {
1520
+ "icon": "PlayMarketIcon",
1521
+ "rounded": true,
1522
+ "version": "secondary",
1523
+ "href": "/secondary"
1524
+ }
1525
+ ]
1526
+ }
1527
+ ],
1528
+ [
1529
+ {
1530
+ "label": "Бесплатно",
1531
+ "list": {
1532
+ "items": ["item 1", "item 2", "item 3"]
1533
+ }
1534
+ }
1535
+ ],
1536
+ [
1537
+ {
1538
+ "image": {
1539
+ "src": "money-1.png",
1540
+ "format": "webp",
1541
+ "size": {
1542
+ "width": 140,
1543
+ "height": 140
1544
+ },
1545
+ "alt": "Деньги"
1546
+ }
1547
+ }
1548
+ ]
1549
+ ]
1550
+ },
1551
+ {
1552
+ "data": [
1553
+ [
1554
+ {
1555
+ "label": "Нет"
1556
+ }
1557
+ ],
1558
+ [
1559
+ {
1560
+ "label": "Бесплатно",
1561
+ "description": "В банкоматах и кассах Россельхозбанка и банков-партнеров"
1562
+ },
1563
+ {
1564
+ "label": "1%",
1565
+ "description": "В сторонних банкоматах, минимум 150 руб"
1566
+ }
1567
+ ],
1568
+ [
1569
+ {
1570
+ "label": "Нет"
1571
+ }
1572
+ ],
1573
+ [
1574
+ {
1575
+ "label": "До 20%"
1576
+ },
1577
+ {
1578
+ "list": {
1579
+ "isDotted": false,
1580
+ "items": ["item 1", "item 2", "item 3"]
1581
+ }
1582
+ }
1583
+ ],
1584
+ [
1585
+ {
1586
+ "label": "Бесплатно",
1587
+ "description": "При обороте по карте от 10000 ₽ в месяц"
1588
+ }
1589
+ ],
1590
+ [
1591
+ {
1592
+ "label": "69 рублей в месяц"
1593
+ },
1594
+ {
1595
+ "list": {
1596
+ "version": "primary",
1597
+ "items": ["item 1", "item 2", "item 3"]
1598
+ }
1599
+ }
1600
+ ],
1601
+ [
1602
+ {
1603
+ "description": "Копите баллы каждый день и обменивайте их на скидки на электронику и бытовую технику Panasonic"
1604
+ }
1605
+ ]
1606
+ ]
1607
+ },
1608
+ {
1609
+ "data": [
1610
+ [
1611
+ {
1612
+ "label": "Нет"
1613
+ }
1614
+ ],
1615
+ [
1616
+ {
1617
+ "label": "Бесплатно"
1618
+ }
1619
+ ],
1620
+ [
1621
+ {
1622
+ "label": "Есть"
1623
+ }
1624
+ ],
1625
+ [
1626
+ {
1627
+ "label": "До 20%"
1628
+ }
1629
+ ],
1630
+ [
1631
+ {
1632
+ "label": "Бесплатно",
1633
+ "description": "При обороте по карте от 10000 ₽ в месяц"
1634
+ }
1635
+ ],
1636
+ [
1637
+ {
1638
+ "label": "69 рублей в месяц"
1639
+ }
1640
+ ],
1641
+ [
1642
+ {
1643
+ "description": "Для членов профсоюзных организаций"
1644
+ }
1645
+ ]
1646
+ ]
1647
+ },
1648
+ {
1649
+ "data": [
1650
+ [
1651
+ {
1652
+ "label": "Нет"
1653
+ }
1654
+ ],
1655
+ [
1656
+ {
1657
+ "label": "Бесплатно",
1658
+ "description": "В банкоматах и кассах Россельхозбанка и банков-партнеров"
1659
+ },
1660
+ {
1661
+ "label": "Бесплатно",
1662
+ "description": "В сторонних банкоматах - 1 раз в месяц, далее 1% минимум 150 руб"
1663
+ }
1664
+ ],
1665
+ [
1666
+ {
1667
+ "label": "Нет"
1668
+ }
1669
+ ],
1670
+ [
1671
+ {
1672
+ "label": "Платёжные системы картинкой"
1673
+ },
1674
+ {
1675
+ "image": {
1676
+ "src": "payment-systems.png",
1677
+ "format": "webp",
1678
+ "size": {
1679
+ "width": 288,
1680
+ "height": 56
1681
+ },
1682
+ "alt": "Платёжные системы",
1683
+ "title": "Платёжные системы"
1684
+ }
1685
+ }
1686
+ ],
1687
+ [
1688
+ {
1689
+ "label": "Кнопки-иконки"
1690
+ },
1691
+ {
1692
+ "buttons": [
1693
+ {
1694
+ "icon": "AppleIcon",
1695
+ "rounded": true,
1696
+ "version": "secondary",
1697
+ "href": "/_blank",
1698
+ "target": "_blank"
1699
+ },
1700
+ {
1701
+ "icon": "PlayMarketIcon",
1702
+ "rounded": true,
1703
+ "version": "secondary",
1704
+ "href": "/secondary"
1705
+ }
1706
+ ]
1707
+ }
1708
+ ],
1709
+ [
1710
+ {
1711
+ "label": "Бесплатно",
1712
+ "list": {
1713
+ "items": ["item 1", "item 2", "item 3"]
1714
+ }
1715
+ }
1716
+ ],
1717
+ [
1718
+ {
1719
+ "image": {
1720
+ "src": "money-1.png",
1721
+ "format": "webp",
1722
+ "size": {
1723
+ "width": 140,
1724
+ "height": 140
1725
+ },
1726
+ "alt": "Деньги"
1727
+ }
1728
+ }
1729
+ ]
1730
+ ]
1731
+ },
1732
+ {
1733
+ "data": [
1734
+ [
1735
+ {
1736
+ "label": "Нет"
1737
+ }
1738
+ ],
1739
+ [
1740
+ {
1741
+ "label": "Бесплатно",
1742
+ "description": "В банкоматах и кассах Россельхозбанка и банков-партнеров"
1743
+ },
1744
+ {
1745
+ "label": "1%",
1746
+ "description": "В сторонних банкоматах, минимум 150 руб"
1747
+ }
1748
+ ],
1749
+ [
1750
+ {
1751
+ "label": "Нет"
1752
+ }
1753
+ ],
1754
+ [
1755
+ {
1756
+ "label": "До 20%"
1757
+ },
1758
+ {
1759
+ "list": {
1760
+ "isDotted": false,
1761
+ "items": ["item 1", "item 2", "item 3"]
1762
+ }
1763
+ }
1764
+ ],
1765
+ [
1766
+ {
1767
+ "label": "Бесплатно",
1768
+ "description": "При обороте по карте от 10000 ₽ в месяц"
1769
+ }
1770
+ ],
1771
+ [
1772
+ {
1773
+ "label": "69 рублей в месяц"
1774
+ },
1775
+ {
1776
+ "list": {
1777
+ "version": "primary",
1778
+ "items": ["item 1", "item 2", "item 3"]
1779
+ }
1780
+ }
1781
+ ],
1782
+ [
1783
+ {
1784
+ "description": "Копите баллы каждый день и обменивайте их на скидки на электронику и бытовую технику Panasonic"
1785
+ }
1786
+ ]
1787
+ ]
1788
+ },
1789
+ {
1790
+ "data": [
1791
+ [
1792
+ {
1793
+ "label": "Нет"
1794
+ }
1795
+ ],
1796
+ [
1797
+ {
1798
+ "label": "Бесплатно"
1799
+ }
1800
+ ],
1801
+ [
1802
+ {
1803
+ "label": "Есть"
1804
+ }
1805
+ ],
1806
+ [
1807
+ {
1808
+ "label": "До 20%"
1809
+ }
1810
+ ],
1811
+ [
1812
+ {
1813
+ "label": "Бесплатно",
1814
+ "description": "При обороте по карте от 10000 ₽ в месяц"
1815
+ }
1816
+ ],
1817
+ [
1818
+ {
1819
+ "label": "69 рублей в месяц"
1820
+ }
1821
+ ],
1822
+ [
1823
+ {
1824
+ "description": "Для членов профсоюзных организаций"
1825
+ }
1826
+ ]
1827
+ ]
1828
+ }
1829
+ ]
1830
+ }
1831
+ },
1428
1832
  {
1429
1833
  "type": "PictureText",
1430
1834
  "style": ["col-span-12"],
@@ -3,6 +3,7 @@ import type { BlockDef, ContentPageDef, UniBlockProps } from '../../types';
3
3
  import type { BlockContent } from '../BlockContent';
4
4
  import { LikeControl } from '../LikeControl/LikeControl';
5
5
  import { Placeholder } from '../Placeholder/Placeholder';
6
+ import { ContentPageContext } from './ContentPageContext';
6
7
 
7
8
  interface BlockDecoratorProps<VNode> {
8
9
  blockClassName: string;
@@ -20,12 +21,21 @@ export type JSXBlock = (
20
21
  context?: any,
21
22
  ) => any;
22
23
 
24
+ export type BlocksRegistry = Record<string, JSXBlock>;
25
+
23
26
  export interface ContentPageProps extends UniBlockProps {
24
- blocksRegistry: Record<string, JSXBlock>;
27
+ blocksRegistry: BlocksRegistry;
25
28
  data: ContentPageDef;
26
29
  blockDecorator?: BlockDecorator;
27
30
  }
28
31
 
32
+ export interface RenderBlockFunc {
33
+ block: BlockDef;
34
+ blockDecorator: BlockDecorator;
35
+ blocksRegistry: BlocksRegistry;
36
+ context: ContentPageContext;
37
+ }
38
+
29
39
  const defaultBlockDecorator: BlockDecorator = ({ blockClassName, block, render }) =>
30
40
  render({ blockClassName, block });
31
41
 
@@ -34,14 +44,32 @@ export const ContentPage = JSX<ContentPageProps>(
34
44
  className,
35
45
  context,
36
46
  blocksRegistry,
37
- data: { style: pageStyle, blocks, likeControl, colorPalette = 'pc' },
47
+ data: { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' },
38
48
  blockDecorator = defaultBlockDecorator,
39
49
  }) => {
50
+ const { header } = slots;
51
+
40
52
  return (
41
- <section className="relative" data-theme={colorPalette}>
42
- <div className={`grid grid-cols-12 gap-1 ${style2className(pageStyle)} ${className || ''}`}>
43
- {blocks?.length ? blocks.map(renderBlock) : null}
44
- </div>
53
+ <section
54
+ className={`relative ${style2className(pageStyle)} ${className || ''}`}
55
+ data-theme={colorPalette}
56
+ >
57
+ {header?.blocks?.length ? (
58
+ <div className={`${style2className(header?.style)}`}>
59
+ {header.blocks.map((block, i) =>
60
+ renderBlock({ block, blockDecorator, blocksRegistry, context }, i),
61
+ )}
62
+ </div>
63
+ ) : null}
64
+
65
+ {blocks?.length ? (
66
+ <div className="container grid grid-cols-12 gap-1">
67
+ {blocks.map((block, i) =>
68
+ renderBlock({ block, blockDecorator, blocksRegistry, context }, i),
69
+ )}
70
+ </div>
71
+ ) : null}
72
+
45
73
  {likeControl && (
46
74
  <div className="flex items-end absolute bottom-0 right-0 h-full pointer-events-none">
47
75
  <LikeControl
@@ -52,39 +80,46 @@ export const ContentPage = JSX<ContentPageProps>(
52
80
  )}
53
81
  </section>
54
82
  );
55
-
56
- function renderBlock(block: BlockDef, i: number) {
57
- const { type } = block;
58
- if (!(type in blocksRegistry)) {
59
- console.warn(`No block with "${type}" is registered`);
60
- }
61
-
62
- const BlockComponent = blocksRegistry[type] || Placeholder;
63
- return blockDecorator(
64
- {
65
- blockClassName: style2className(block.style),
66
- block,
67
- render: (props) => {
68
- const { version, content, blocks } = props.block;
69
- return (
70
- <BlockComponent
71
- key={`${type}-${i}`}
72
- className={props.blockClassName}
73
- version={version}
74
- context={context}
75
- {...content}
76
- >
77
- {blocks?.length ? blocks.map(renderBlock) : null}
78
- </BlockComponent>
79
- );
80
- },
81
- },
82
- `block-${i}`,
83
- );
84
- }
85
83
  },
86
84
  );
87
85
 
86
+ function renderBlock(
87
+ { block, blockDecorator, blocksRegistry, context }: RenderBlockFunc,
88
+ i: number,
89
+ ) {
90
+ const { type } = block;
91
+ if (!(type in blocksRegistry)) {
92
+ console.warn(`No block with "${type}" is registered`);
93
+ }
94
+
95
+ const BlockComponent = blocksRegistry[type] || Placeholder;
96
+ return blockDecorator(
97
+ {
98
+ blockClassName: style2className(block.style),
99
+ block,
100
+ render: (props) => {
101
+ const { version, content, blocks } = props.block;
102
+ return (
103
+ <BlockComponent
104
+ key={`${type}-${i}`}
105
+ className={props.blockClassName}
106
+ version={version}
107
+ context={context}
108
+ {...content}
109
+ >
110
+ {blocks?.length
111
+ ? blocks.map((block, i) =>
112
+ renderBlock({ block, blockDecorator, blocksRegistry, context }, i),
113
+ )
114
+ : null}
115
+ </BlockComponent>
116
+ );
117
+ },
118
+ },
119
+ `block-${i}`,
120
+ );
121
+ }
122
+
88
123
  function style2className(style: string[] | undefined | null): string {
89
124
  return style ? style.join(' ') : '';
90
125
  }
@@ -2,7 +2,7 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { ContentPageMeta } from '../../types';
3
3
 
4
4
  export interface ContentPageHeadProps {
5
- HeadComponent: Function;
5
+ HeadComponent: <Props, Context, VNode>(props: Props, context?: Context) => VNode;
6
6
  data: ContentPageMeta;
7
7
  }
8
8
 
@@ -1,13 +1,30 @@
1
1
  import type { BlockDef, ContentPageDef } from '../../types';
2
2
 
3
3
  export function toMobilePage(contentPage: ContentPageDef): ContentPageDef {
4
- const blocks = contentPage.blocks?.filter(({ mobile }) => !mobile?.hidden).map(toMobileBlock);
4
+ const { blocks, slots } = contentPage;
5
+
5
6
  return {
6
7
  ...contentPage,
7
- blocks,
8
+ blocks: getMobileBlocks(blocks),
9
+ slots:
10
+ slots &&
11
+ Object.keys(slots).reduce(
12
+ (res, key) => ({
13
+ ...res,
14
+ [key]: {
15
+ ...slots[key],
16
+ blocks: getMobileBlocks(slots[key].blocks),
17
+ },
18
+ }),
19
+ {},
20
+ ),
8
21
  };
9
22
  }
10
23
 
24
+ function getMobileBlocks(blocks?: BlockDef[]) {
25
+ return blocks?.filter(({ mobile }) => !mobile?.hidden).map(toMobileBlock);
26
+ }
27
+
11
28
  function toMobileBlock(block: BlockDef): BlockDef {
12
29
  const { mobile } = block;
13
30
  if (mobile) {
@@ -129,7 +129,7 @@ export const CreditCalculator = JSX<CreditCalculatorProps>(
129
129
  aria-label="Соглашение на обработку персональных данных"
130
130
  >
131
131
  Отправляя заявку, вы соглашаетесь на обработку персональных данных соответственно
132
- требованиям ФЗ «О персональных данных»
132
+ требованиям ФЗ «О персональных данных»
133
133
  </div>
134
134
  </div>
135
135
  </div>