@redneckz/wildless-cms-uni-blocks 0.8.16 → 0.8.17

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 (322) hide show
  1. package/bin/migration-scripts/0.8.8.js +9 -6
  2. package/bundle/ProjectSettings.d.ts +2 -0
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +44 -33
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/CarouselCard/CarouselCardContent.d.ts +2 -2
  7. package/bundle/components/CarouselCard/constants.d.ts +3 -3
  8. package/bundle/components/CarouselEventCard/CarouselEventCard.d.ts +5 -0
  9. package/bundle/components/CarouselEventCard/CarouselEventCardContent.d.ts +9 -0
  10. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +8 -9
  11. package/bundle/components/Header/HeaderChatBotButton.d.ts +1 -3
  12. package/bundle/components/Header/HeaderContent.d.ts +0 -6
  13. package/bundle/components/Header/HeaderSecondaryMenu.d.ts +0 -2
  14. package/bundle/components/Header/useChatBot.d.ts +1 -2
  15. package/bundle/components/TariffsTable/TariffsTableContent.d.ts +1 -0
  16. package/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +2 -2
  17. package/bundle/model/AlignType.d.ts +10 -0
  18. package/bundle/services/sitemap/isTopItemActive.d.ts +3 -2
  19. package/dist/ProjectSettings.d.ts +2 -0
  20. package/dist/ProjectSettings.js +3 -0
  21. package/dist/ProjectSettings.js.map +1 -1
  22. package/dist/components/Blocks.js +2 -0
  23. package/dist/components/Blocks.js.map +1 -1
  24. package/dist/components/Carousel/Carousel.js +1 -0
  25. package/dist/components/Carousel/Carousel.js.map +1 -1
  26. package/dist/components/CarouselCard/CarouselCard.js +1 -1
  27. package/dist/components/CarouselCard/CarouselCard.js.map +1 -1
  28. package/dist/components/CarouselCard/CarouselCardContent.d.ts +2 -2
  29. package/dist/components/CarouselCard/constants.d.ts +3 -3
  30. package/dist/components/CarouselCard/constants.js +2 -2
  31. package/dist/components/CarouselCard/constants.js.map +1 -1
  32. package/dist/components/CarouselEventCard/CarouselEventCard.d.ts +5 -0
  33. package/dist/components/CarouselEventCard/CarouselEventCard.js +12 -0
  34. package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -0
  35. package/dist/components/CarouselEventCard/CarouselEventCardContent.d.ts +9 -0
  36. package/{mobile/dist/model/CarouselCardVersion.js → dist/components/CarouselEventCard/CarouselEventCardContent.js} +1 -1
  37. package/dist/components/CarouselEventCard/CarouselEventCardContent.js.map +1 -0
  38. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +3 -4
  39. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  40. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +8 -9
  41. package/dist/components/Footer/MediaButton.js +13 -10
  42. package/dist/components/Footer/MediaButton.js.map +1 -1
  43. package/dist/components/Header/Header.js +2 -2
  44. package/dist/components/Header/Header.js.map +1 -1
  45. package/dist/components/Header/HeaderChatBotButton.d.ts +1 -3
  46. package/dist/components/Header/HeaderChatBotButton.js.map +1 -1
  47. package/dist/components/Header/HeaderContent.d.ts +0 -6
  48. package/dist/components/Header/HeaderSecondaryMenu.d.ts +0 -2
  49. package/dist/components/Header/HeaderSecondaryMenu.js +3 -2
  50. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  51. package/dist/components/Header/useChatBot.d.ts +1 -2
  52. package/dist/components/Header/useChatBot.js.map +1 -1
  53. package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
  54. package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
  55. package/dist/components/ProductBlock/renderBackwardButton.js +3 -3
  56. package/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
  57. package/dist/components/ProductGallery/ProductGallery.js +1 -1
  58. package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
  59. package/dist/components/TariffsTable/TariffsTableContent.d.ts +1 -0
  60. package/dist/components/VerticalLayout/VerticalLayout.js +2 -1
  61. package/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  62. package/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +2 -2
  63. package/dist/components/Video/Video.js +6 -1
  64. package/dist/components/Video/Video.js.map +1 -1
  65. package/dist/hooks/useLink.js +1 -1
  66. package/dist/hooks/useLink.js.map +1 -1
  67. package/dist/model/AlignType.d.ts +10 -0
  68. package/dist/services/sitemap/isTopItemActive.d.ts +3 -2
  69. package/dist/services/sitemap/isTopItemActive.js +1 -3
  70. package/dist/services/sitemap/isTopItemActive.js.map +1 -1
  71. package/dist/wlc.json +3 -1
  72. package/lib/ProjectSettings.d.ts +2 -0
  73. package/lib/ProjectSettings.js +3 -0
  74. package/lib/ProjectSettings.js.map +1 -1
  75. package/lib/common.css +1 -1
  76. package/lib/components/Blocks.js +2 -0
  77. package/lib/components/Blocks.js.map +1 -1
  78. package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
  79. package/lib/components/Carousel/Carousel.js +1 -0
  80. package/lib/components/Carousel/Carousel.js.map +1 -1
  81. package/lib/components/CarouselCard/CarouselCard.js +1 -1
  82. package/lib/components/CarouselCard/CarouselCard.js.map +1 -1
  83. package/lib/components/CarouselCard/CarouselCardContent.d.ts +2 -2
  84. package/lib/components/CarouselCard/constants.d.ts +3 -3
  85. package/lib/components/CarouselCard/constants.js +2 -2
  86. package/lib/components/CarouselCard/constants.js.map +1 -1
  87. package/lib/components/CarouselEventCard/CarouselEventCard.d.ts +5 -0
  88. package/lib/components/CarouselEventCard/CarouselEventCard.fixture.d.ts +7 -0
  89. package/lib/components/CarouselEventCard/CarouselEventCard.js +10 -0
  90. package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -0
  91. package/lib/components/CarouselEventCard/CarouselEventCardContent.d.ts +9 -0
  92. package/lib/components/CarouselEventCard/CarouselEventCardContent.js +2 -0
  93. package/lib/components/CarouselEventCard/CarouselEventCardContent.js.map +1 -0
  94. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +3 -4
  95. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  96. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +8 -9
  97. package/lib/components/Footer/MediaButton.js +13 -10
  98. package/lib/components/Footer/MediaButton.js.map +1 -1
  99. package/lib/components/Header/Header.js +2 -2
  100. package/lib/components/Header/Header.js.map +1 -1
  101. package/lib/components/Header/HeaderChatBotButton.d.ts +1 -3
  102. package/lib/components/Header/HeaderChatBotButton.js.map +1 -1
  103. package/lib/components/Header/HeaderContent.d.ts +0 -6
  104. package/lib/components/Header/HeaderSecondaryMenu.d.ts +0 -2
  105. package/lib/components/Header/HeaderSecondaryMenu.js +3 -2
  106. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  107. package/lib/components/Header/useChatBot.d.ts +1 -2
  108. package/lib/components/Header/useChatBot.js.map +1 -1
  109. package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
  110. package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
  111. package/lib/components/ProductBlock/renderBackwardButton.js +3 -3
  112. package/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
  113. package/lib/components/ProductGallery/ProductGallery.js +1 -1
  114. package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
  115. package/lib/components/TariffsTable/TariffsTableContent.d.ts +1 -0
  116. package/lib/components/VerticalLayout/VerticalLayout.js +2 -1
  117. package/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  118. package/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +2 -2
  119. package/lib/components/Video/Video.js +6 -1
  120. package/lib/components/Video/Video.js.map +1 -1
  121. package/lib/hooks/useLink.js +1 -1
  122. package/lib/hooks/useLink.js.map +1 -1
  123. package/lib/model/AlignType.d.ts +10 -0
  124. package/lib/services/sitemap/isTopItemActive.d.ts +3 -2
  125. package/lib/services/sitemap/isTopItemActive.js +1 -3
  126. package/lib/services/sitemap/isTopItemActive.js.map +1 -1
  127. package/lib/wlc.json +3 -1
  128. package/mobile/bundle/ProjectSettings.d.ts +2 -0
  129. package/mobile/bundle/bundle.umd.js +18 -14
  130. package/mobile/bundle/bundle.umd.min.js +1 -1
  131. package/mobile/bundle/components/CarouselCard/CarouselCardContent.d.ts +2 -2
  132. package/mobile/bundle/components/CarouselCard/constants.d.ts +3 -3
  133. package/mobile/bundle/components/CarouselEventCard/CarouselEventCard.d.ts +5 -0
  134. package/mobile/bundle/components/CarouselEventCard/CarouselEventCardContent.d.ts +9 -0
  135. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +8 -9
  136. package/mobile/bundle/components/Header/HeaderChatBotButton.d.ts +1 -3
  137. package/mobile/bundle/components/Header/HeaderContent.d.ts +0 -6
  138. package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +0 -2
  139. package/mobile/bundle/components/Header/useChatBot.d.ts +1 -2
  140. package/mobile/bundle/components/TariffsTable/TariffsTableContent.d.ts +1 -0
  141. package/mobile/bundle/components/VerticalLayout/VerticalLayoutContent.d.ts +2 -2
  142. package/mobile/bundle/model/AlignType.d.ts +10 -0
  143. package/mobile/bundle/services/sitemap/isTopItemActive.d.ts +3 -2
  144. package/mobile/dist/ProjectSettings.d.ts +2 -0
  145. package/mobile/dist/ProjectSettings.js +3 -0
  146. package/mobile/dist/ProjectSettings.js.map +1 -1
  147. package/mobile/dist/components/Carousel/Carousel.js +1 -0
  148. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  149. package/mobile/dist/components/CarouselCard/CarouselCard.js +1 -1
  150. package/mobile/dist/components/CarouselCard/CarouselCard.js.map +1 -1
  151. package/mobile/dist/components/CarouselCard/CarouselCardContent.d.ts +2 -2
  152. package/mobile/dist/components/CarouselCard/constants.d.ts +3 -3
  153. package/mobile/dist/components/CarouselCard/constants.js +2 -2
  154. package/mobile/dist/components/CarouselCard/constants.js.map +1 -1
  155. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.d.ts +5 -0
  156. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +12 -0
  157. package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -0
  158. package/mobile/dist/components/CarouselEventCard/CarouselEventCardContent.d.ts +9 -0
  159. package/{dist/model/CarouselCardVersion.js → mobile/dist/components/CarouselEventCard/CarouselEventCardContent.js} +1 -1
  160. package/mobile/dist/components/CarouselEventCard/CarouselEventCardContent.js.map +1 -0
  161. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +3 -4
  162. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  163. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +8 -9
  164. package/mobile/dist/components/Footer/MediaButton.js +13 -10
  165. package/mobile/dist/components/Footer/MediaButton.js.map +1 -1
  166. package/mobile/dist/components/Header/HeaderChatBotButton.d.ts +1 -3
  167. package/mobile/dist/components/Header/HeaderChatBotButton.js.map +1 -1
  168. package/mobile/dist/components/Header/HeaderContent.d.ts +0 -6
  169. package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +0 -2
  170. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +3 -2
  171. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  172. package/mobile/dist/components/Header/useChatBot.d.ts +1 -2
  173. package/mobile/dist/components/Header/useChatBot.js.map +1 -1
  174. package/mobile/dist/components/ProductBlock/renderBackwardButton.js +3 -3
  175. package/mobile/dist/components/ProductBlock/renderBackwardButton.js.map +1 -1
  176. package/mobile/dist/components/ProductGallery/ProductGallery.js +1 -1
  177. package/mobile/dist/components/ProductGallery/ProductGallery.js.map +1 -1
  178. package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +1 -0
  179. package/mobile/dist/components/VerticalLayout/VerticalLayout.js +2 -1
  180. package/mobile/dist/components/VerticalLayout/VerticalLayout.js.map +1 -1
  181. package/mobile/dist/components/VerticalLayout/VerticalLayoutContent.d.ts +2 -2
  182. package/mobile/dist/components/Video/Video.js +6 -1
  183. package/mobile/dist/components/Video/Video.js.map +1 -1
  184. package/mobile/dist/hooks/useLink.js +1 -1
  185. package/mobile/dist/hooks/useLink.js.map +1 -1
  186. package/mobile/dist/model/AlignType.d.ts +10 -0
  187. package/mobile/dist/services/sitemap/isTopItemActive.d.ts +3 -2
  188. package/mobile/dist/services/sitemap/isTopItemActive.js +1 -3
  189. package/mobile/dist/services/sitemap/isTopItemActive.js.map +1 -1
  190. package/mobile/dist/wlc.json +3 -1
  191. package/mobile/lib/ProjectSettings.d.ts +2 -0
  192. package/mobile/lib/ProjectSettings.js +3 -0
  193. package/mobile/lib/ProjectSettings.js.map +1 -1
  194. package/mobile/lib/components/Carousel/Carousel.js +1 -0
  195. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  196. package/mobile/lib/components/CarouselCard/CarouselCard.js +1 -1
  197. package/mobile/lib/components/CarouselCard/CarouselCard.js.map +1 -1
  198. package/mobile/lib/components/CarouselCard/CarouselCardContent.d.ts +2 -2
  199. package/mobile/lib/components/CarouselCard/constants.d.ts +3 -3
  200. package/mobile/lib/components/CarouselCard/constants.js +2 -2
  201. package/mobile/lib/components/CarouselCard/constants.js.map +1 -1
  202. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.d.ts +5 -0
  203. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +10 -0
  204. package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -0
  205. package/mobile/lib/components/CarouselEventCard/CarouselEventCardContent.d.ts +9 -0
  206. package/mobile/lib/components/CarouselEventCard/CarouselEventCardContent.js +2 -0
  207. package/mobile/lib/components/CarouselEventCard/CarouselEventCardContent.js.map +1 -0
  208. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +3 -4
  209. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  210. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +8 -9
  211. package/mobile/lib/components/Footer/MediaButton.js +13 -10
  212. package/mobile/lib/components/Footer/MediaButton.js.map +1 -1
  213. package/mobile/lib/components/Header/HeaderChatBotButton.d.ts +1 -3
  214. package/mobile/lib/components/Header/HeaderChatBotButton.js.map +1 -1
  215. package/mobile/lib/components/Header/HeaderContent.d.ts +0 -6
  216. package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +0 -2
  217. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +3 -2
  218. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  219. package/mobile/lib/components/Header/useChatBot.d.ts +1 -2
  220. package/mobile/lib/components/Header/useChatBot.js.map +1 -1
  221. package/mobile/lib/components/ProductBlock/renderBackwardButton.js +3 -3
  222. package/mobile/lib/components/ProductBlock/renderBackwardButton.js.map +1 -1
  223. package/mobile/lib/components/ProductGallery/ProductGallery.js +1 -1
  224. package/mobile/lib/components/ProductGallery/ProductGallery.js.map +1 -1
  225. package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +1 -0
  226. package/mobile/lib/components/VerticalLayout/VerticalLayout.js +2 -1
  227. package/mobile/lib/components/VerticalLayout/VerticalLayout.js.map +1 -1
  228. package/mobile/lib/components/VerticalLayout/VerticalLayoutContent.d.ts +2 -2
  229. package/mobile/lib/components/Video/Video.js +6 -1
  230. package/mobile/lib/components/Video/Video.js.map +1 -1
  231. package/mobile/lib/hooks/useLink.js +1 -1
  232. package/mobile/lib/hooks/useLink.js.map +1 -1
  233. package/mobile/lib/model/AlignType.d.ts +10 -0
  234. package/mobile/lib/services/sitemap/isTopItemActive.d.ts +3 -2
  235. package/mobile/lib/services/sitemap/isTopItemActive.js +1 -3
  236. package/mobile/lib/services/sitemap/isTopItemActive.js.map +1 -1
  237. package/mobile/lib/wlc.json +3 -1
  238. package/mobile/src/ProjectSettings.ts +4 -0
  239. package/mobile/src/components/Carousel/Carousel.tsx +1 -0
  240. package/mobile/src/components/CarouselCard/CarouselCard.tsx +4 -4
  241. package/mobile/src/components/CarouselCard/CarouselCardContent.ts +2 -2
  242. package/mobile/src/components/CarouselCard/constants.ts +5 -5
  243. package/mobile/src/components/CarouselEventCard/CarouselEventCard.example.json +14 -0
  244. package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +32 -0
  245. package/mobile/src/components/CarouselEventCard/CarouselEventCard.ui.json +1 -0
  246. package/mobile/src/components/CarouselEventCard/CarouselEventCardContent.ts +12 -0
  247. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +18 -18
  248. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +1 -4
  249. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +1 -4
  250. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +9 -9
  251. package/mobile/src/components/Footer/MediaButton.tsx +19 -14
  252. package/mobile/src/components/Header/HeaderChatBotButton.tsx +1 -4
  253. package/mobile/src/components/Header/HeaderContent.ts +0 -7
  254. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +8 -5
  255. package/mobile/src/components/Header/useChatBot.ts +2 -3
  256. package/mobile/src/components/ProductBlock/renderBackwardButton.tsx +6 -4
  257. package/mobile/src/components/ProductGallery/ProductGallery.example.json +2 -3
  258. package/mobile/src/components/ProductGallery/ProductGallery.tsx +1 -1
  259. package/mobile/src/components/TariffsTable/TariffsTable.example.json +3 -0
  260. package/mobile/src/components/TariffsTable/TariffsTableContent.ts +1 -0
  261. package/mobile/src/components/VerticalLayout/VerticalLayout.example.json +1 -1
  262. package/mobile/src/components/VerticalLayout/VerticalLayout.tsx +4 -3
  263. package/mobile/src/components/VerticalLayout/VerticalLayoutContent.ts +2 -2
  264. package/mobile/src/components/Video/Video.tsx +22 -16
  265. package/mobile/src/hooks/useLink.ts +1 -1
  266. package/mobile/src/model/AlignType.ts +11 -0
  267. package/mobile/src/services/sitemap/isTopItemActive.ts +2 -7
  268. package/mobile/src/wlc.json +3 -1
  269. package/package.json +1 -1
  270. package/src/ProjectSettings.ts +4 -0
  271. package/src/components/Blocks.ts +2 -0
  272. package/src/components/Carousel/Carousel.fixture.tsx +19 -0
  273. package/src/components/Carousel/Carousel.tsx +1 -0
  274. package/src/components/CarouselCard/CarouselCard.fixture.tsx +1 -1
  275. package/src/components/CarouselCard/CarouselCard.tsx +4 -4
  276. package/src/components/CarouselCard/CarouselCardContent.ts +2 -2
  277. package/src/components/CarouselCard/constants.ts +5 -5
  278. package/src/components/CarouselEventCard/CarouselEventCard.example.json +14 -0
  279. package/src/components/CarouselEventCard/CarouselEventCard.fixture.tsx +21 -0
  280. package/src/components/CarouselEventCard/CarouselEventCard.tsx +32 -0
  281. package/src/components/CarouselEventCard/CarouselEventCard.ui.json +1 -0
  282. package/src/components/CarouselEventCard/CarouselEventCardContent.ts +12 -0
  283. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +18 -18
  284. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +8 -3
  285. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +1 -4
  286. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +1 -4
  287. package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +9 -9
  288. package/src/components/Footer/MediaButton.tsx +19 -14
  289. package/src/components/Header/Header.fixture.tsx +3 -3
  290. package/src/components/Header/Header.tsx +0 -2
  291. package/src/components/Header/HeaderChatBotButton.tsx +1 -4
  292. package/src/components/Header/HeaderContent.ts +0 -7
  293. package/src/components/Header/HeaderSecondaryMenu.tsx +8 -5
  294. package/src/components/Header/useChatBot.ts +2 -3
  295. package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
  296. package/src/components/ProductBlock/renderBackwardButton.tsx +6 -4
  297. package/src/components/ProductGallery/ProductGallery.example.json +2 -3
  298. package/src/components/ProductGallery/ProductGallery.tsx +1 -1
  299. package/src/components/TariffsTable/TariffsTable.example.json +3 -0
  300. package/src/components/TariffsTable/TariffsTableContent.ts +1 -0
  301. package/src/components/VerticalLayout/VerticalLayout.example.json +1 -1
  302. package/src/components/VerticalLayout/VerticalLayout.tsx +4 -3
  303. package/src/components/VerticalLayout/VerticalLayoutContent.ts +2 -2
  304. package/src/components/Video/Video.tsx +22 -16
  305. package/src/hooks/useLink.ts +1 -1
  306. package/src/model/AlignType.ts +11 -0
  307. package/src/services/sitemap/isTopItemActive.ts +2 -7
  308. package/src/wlc.json +3 -1
  309. package/bundle/model/CarouselCardVersion.d.ts +0 -1
  310. package/dist/model/CarouselCardVersion.d.ts +0 -1
  311. package/dist/model/CarouselCardVersion.js.map +0 -1
  312. package/lib/model/CarouselCardVersion.d.ts +0 -1
  313. package/lib/model/CarouselCardVersion.js +0 -2
  314. package/lib/model/CarouselCardVersion.js.map +0 -1
  315. package/mobile/bundle/model/CarouselCardVersion.d.ts +0 -1
  316. package/mobile/dist/model/CarouselCardVersion.d.ts +0 -1
  317. package/mobile/dist/model/CarouselCardVersion.js.map +0 -1
  318. package/mobile/lib/model/CarouselCardVersion.d.ts +0 -1
  319. package/mobile/lib/model/CarouselCardVersion.js +0 -2
  320. package/mobile/lib/model/CarouselCardVersion.js.map +0 -1
  321. package/mobile/src/model/CarouselCardVersion.ts +0 -1
  322. package/src/model/CarouselCardVersion.ts +0 -1
@@ -1,4 +1,4 @@
1
- import type { AlignType } from '../../model/AlignType';
1
+ import type { AlignTypeWithStretch } from '../../model/AlignType';
2
2
  import type { BlockVersion } from '../../model/BlockVersion';
3
3
  import type { ColorPalette } from '../../model/ContentPageDef';
4
4
  import type { GapVersion } from '../HorizontalLayout/HorizontalLayoutContent';
@@ -9,7 +9,7 @@ import type { GapVersion } from '../HorizontalLayout/HorizontalLayoutContent';
9
9
  export interface VerticalLayoutContent {
10
10
  colorPalette?: ColorPalette;
11
11
  version?: BlockVersion;
12
- align?: AlignType;
12
+ align?: AlignTypeWithStretch;
13
13
  gap?: GapVersion;
14
14
  /** @title Внутренний отступ компоновщика */
15
15
  isPadding?: boolean;
@@ -1,6 +1,8 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { useRouter } from '../../hooks/useRouter';
2
3
  import type { UniBlockProps } from '../../model/JSXBlock';
3
4
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
5
+ import { adjustHref } from '../../utils/adjustHref';
4
6
  import { style } from '../../utils/style';
5
7
  import { Headline } from '../Headline/Headline';
6
8
  import { getPaddings } from './getPaddings';
@@ -8,19 +10,23 @@ import type { VideoContent } from './VideoContent';
8
10
 
9
11
  interface VideoProps extends VideoContent, UniBlockProps {}
10
12
 
11
- export const Video = JSX<VideoProps>(({ className, title, src, previewImg, ...rest }) => (
12
- <BlockWrapper className={style(getPaddings(className), className)} {...rest}>
13
- <Headline title={title} headlineVersion="M" />
14
- {src ? (
15
- <video
16
- className="m-auto w-full object-fill"
17
- preload="metadata"
18
- poster={previewImg?.src}
19
- style={{ maxHeight: 524 }}
20
- controls
21
- >
22
- <source src={src} />
23
- </video>
24
- ) : null}
25
- </BlockWrapper>
26
- ));
13
+ export const Video = JSX<VideoProps>(({ className, title, src, previewImg, ...rest }) => {
14
+ const router = useRouter();
15
+
16
+ return (
17
+ <BlockWrapper className={style(getPaddings(className), className)} {...rest}>
18
+ <Headline title={title} headlineVersion="M" />
19
+ {src ? (
20
+ <video
21
+ className="m-auto w-full object-fill"
22
+ preload="metadata"
23
+ poster={adjustHref(router)(previewImg?.src)}
24
+ style={{ maxHeight: 524 }}
25
+ controls
26
+ >
27
+ <source src={adjustHref(router)(src)} />
28
+ </video>
29
+ ) : null}
30
+ </BlockWrapper>
31
+ );
32
+ });
@@ -12,7 +12,7 @@ interface Clickable {
12
12
  onClick(ev?: PreventableEvent): void;
13
13
  }
14
14
 
15
- export function useLink(isRemote?: boolean) {
15
+ export function useLink(isRemote = false) {
16
16
  const router = useRouter();
17
17
 
18
18
  return <L extends Partial<LinkProps & Clickable>>(props: L): L & Clickable => ({
@@ -7,3 +7,14 @@
7
7
  * ]
8
8
  */
9
9
  export type AlignType = 'left' | 'center' | 'right';
10
+
11
+ /**
12
+ * @title Выравнивание
13
+ * @enumNames [
14
+ * "Во всю ширину",
15
+ * "По левому краю",
16
+ * "По центру",
17
+ * "По правому краю"
18
+ * ]
19
+ */
20
+ export type AlignTypeWithStretch = 'stretch' | 'left' | 'center' | 'right';
@@ -1,11 +1,6 @@
1
1
  import type { Router } from '../../hooks/useRouter';
2
2
  import { projectSettings } from '../../ProjectSettings';
3
3
  import { isHrefActive } from './isHrefActive';
4
- import { TopMenuItem } from './SitemapProps';
5
4
 
6
- export const isTopItemActive =
7
- (router: Router) =>
8
- (topItem: TopMenuItem): boolean =>
9
- projectSettings.BASE_PATH
10
- ? isHrefActive({ pathname: projectSettings.BASE_PATH })(topItem)
11
- : topItem.items?.some(isHrefActive(router)) || isHrefActive(router)(topItem);
5
+ export const isTopItemActive = (router: Router) =>
6
+ isHrefActive(projectSettings.BASE_PATH ? { pathname: projectSettings.BASE_PATH } : router);
@@ -2,5 +2,7 @@
2
2
  "PROD_BRANCH": "master",
3
3
  "FORCED_DRAFT_FLOW": false,
4
4
  "YANDEX_MAP_API_KEY": "f4b40c1e-1891-45f2-b307-90c481af210b",
5
- "SITEMAP": "sayt-rshb"
5
+ "SITEMAP": "sayt-rshb",
6
+ "CHAT_BOT": "personal",
7
+ "BASE_PATH": "/natural/"
6
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.8.16",
3
+ "version": "0.8.17",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -6,6 +6,7 @@ export interface ProjectSettings {
6
6
  ASSIST_PROJECT_ID?: string;
7
7
  SITEMAP?: string;
8
8
  FOOTER?: string;
9
+ CHAT_BOT?: string; // "personal" or "business"
9
10
  CDN?: string; // Should ends with "/"
10
11
  BASE_PATH?: string; // Should ends with "/"
11
12
  YANDEX_MAP_API_KEY?: string;
@@ -42,6 +43,9 @@ export const projectSettings = new (class implements ProjectSettings {
42
43
  get FOOTER() {
43
44
  return this._.FOOTER;
44
45
  }
46
+ get CHAT_BOT() {
47
+ return this._.CHAT_BOT;
48
+ }
45
49
  get CDN() {
46
50
  return appendSlash(this._.CDN);
47
51
  }
@@ -13,6 +13,7 @@ import { Carousel } from './Carousel/Carousel';
13
13
  import { CarouselBankHistoryCard } from './CarouselBankHistoryCard/CarouselBankHistoryCard';
14
14
  import { CarouselCard } from './CarouselCard/CarouselCard';
15
15
  import { CarouselCatalogCard } from './CarouselCatalogCard/CarouselCatalogCard';
16
+ import { CarouselEventCard } from './CarouselEventCard/CarouselEventCard';
16
17
  import { CarouselInvestmentCard } from './CarouselInvestmentCard/CarouselInvestmentCard';
17
18
  import { CarouselLinks } from './CarouselLinks/CarouselLinks';
18
19
  import { CarouselProductCard } from './CarouselProductCard/CarouselProductCard';
@@ -72,6 +73,7 @@ export const Blocks: BlocksRegistry = {
72
73
  CarouselBankHistoryCard,
73
74
  CarouselCard,
74
75
  CarouselCatalogCard,
76
+ CarouselEventCard,
75
77
  CarouselInvestmentCard,
76
78
  CarouselLinks,
77
79
  CarouselProductCard,
@@ -4,6 +4,7 @@ import { Blocks } from '../Blocks';
4
4
  import { BANK_HISTORY_CARD } from '../CarouselBankHistoryCard/CarouselBankHistoryCard.fixture';
5
5
  import { CARD, CARD_MINI, CARD_NEW } from '../CarouselCard/CarouselCard.fixture';
6
6
  import { CATALOG_CARD } from '../CarouselCatalogCard/CarouselCatalogCard.fixture';
7
+ import { CAROUSEL_EVENT_CARD } from '../CarouselEventCard/CarouselEventCard.fixture';
7
8
  import { INVESTMENT_CARD_WITH_SINGLE_COLUMN } from '../CarouselInvestmentCard/CarouselInvestmentCard.fixture';
8
9
  import { PRODUCT_CARD } from '../CarouselProductCard/CarouselProductCard.fixture';
9
10
  import { BUSINESS_CARD } from '../CarouselProgramsCard/CarouselProgramsCard.fixture';
@@ -176,6 +177,24 @@ export default {
176
177
  />
177
178
  </div>
178
179
  ),
180
+ events: (
181
+ <div className="container grid grid-cols-12">
182
+ <Carousel
183
+ className="col-span-12"
184
+ isBlur={false}
185
+ isCyclic={false}
186
+ block={{
187
+ type: 'Carousel',
188
+ blocks: new Array(6).fill({
189
+ type: 'CarouselEventCard',
190
+ content: CAROUSEL_EVENT_CARD,
191
+ style: ['col-span-4'],
192
+ }),
193
+ }}
194
+ options={options}
195
+ />
196
+ </div>
197
+ ),
179
198
  'bank-history': (
180
199
  <div className="container grid grid-cols-12">
181
200
  <Carousel
@@ -91,6 +91,7 @@ Carousel.childrenTypes = [
91
91
  'CarouselRecommendationCard',
92
92
  'CarouselTariffsCard',
93
93
  'CarouselInvestmentCard',
94
+ 'CarouselEventCard',
94
95
  ];
95
96
 
96
97
  const getPaddingStyle = (isPadding: boolean): string => (isPadding ? 'p-12' : '');
@@ -27,7 +27,7 @@ export const CARD_MINI: CarouselCardContent = {
27
27
  title: 'Хочешь попасть на практику в РСХБ?',
28
28
  description: 'Стажировка в Россельхозбанке — это возможность реализовать смелые идеи и проекты.',
29
29
  button,
30
- carouselVersion: 'mini',
30
+ carouselVersion: 'small',
31
31
  };
32
32
 
33
33
  export default {
@@ -1,17 +1,17 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import type { CarouselCardVersion } from '../../model/CarouselCardVersion';
3
- import type { UniBlockProps } from '../../model/JSXBlock';
4
2
  import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
5
3
  import { Headline } from '../Headline/Headline';
4
+ import type { UniBlockProps } from '../../model/JSXBlock';
6
5
  import type { CarouselCardContent } from './CarouselCardContent';
6
+ import type { SizeVersion } from '../../model/SizeVersion';
7
7
 
8
8
  export interface CarouselCardProps extends CarouselCardContent, UniBlockProps {}
9
9
 
10
10
  const BLOCK_CLASSES = 'absolute border border-solid border-gray w-full h-full';
11
11
 
12
- const CARD_WIDTH_MAP: Record<CarouselCardVersion, string> = {
12
+ const CARD_WIDTH_MAP: Record<SizeVersion, string> = {
13
13
  normal: 'min-w-[970px]',
14
- mini: 'min-w-[355px]',
14
+ small: 'min-w-[355px]',
15
15
  };
16
16
 
17
17
  export const CarouselCard = JSX<CarouselCardProps>(
@@ -1,4 +1,4 @@
1
- import type { CarouselCardVersion } from '../../model/CarouselCardVersion';
1
+ import type { SizeVersion } from '../../model/SizeVersion';
2
2
  import type { HeadlineCommonProps } from '../../model/HeadlineType';
3
3
  import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
4
4
 
@@ -14,5 +14,5 @@ export interface CarouselCardContent extends HeadlineCommonProps {
14
14
  * }
15
15
  */
16
16
  button?: ButtonWithIconProps;
17
- carouselVersion?: CarouselCardVersion;
17
+ carouselVersion?: SizeVersion;
18
18
  }
@@ -1,11 +1,11 @@
1
- import type { CarouselCardVersion } from '../../model/CarouselCardVersion';
1
+ import type { SizeVersion } from '../../model/SizeVersion';
2
2
 
3
- export const cardStyleMap: Record<CarouselCardVersion, string> = {
3
+ export const cardStyleMap: Record<SizeVersion, string> = {
4
4
  normal: 'min-w-[100%] justify-center items-center m-7 col-span-12',
5
- mini: 'min-w-auto justify-center items-center m-9 col-span-4',
5
+ small: 'min-w-auto justify-center items-center m-9 col-span-4',
6
6
  };
7
7
 
8
- export const cardWidthMap: Record<CarouselCardVersion, string> = {
8
+ export const cardWidthMap: Record<SizeVersion, string> = {
9
9
  normal: 'w-[1007px]',
10
- mini: 'w-[350px]',
10
+ small: 'w-[350px]',
11
11
  };
@@ -0,0 +1,14 @@
1
+ {
2
+ "icon": {
3
+ "icon": "SignDocsIcon",
4
+ "format": "webp",
5
+ "size": {
6
+ "width": 365,
7
+ "height": 195
8
+ }
9
+ },
10
+ "title": "Заголовок",
11
+ "description": "Описание",
12
+ "target": null,
13
+ "href": null
14
+ }
@@ -0,0 +1,21 @@
1
+ import { CarouselEventCard } from './CarouselEventCard';
2
+ import type { Picture } from '../../model/Picture';
3
+ import type { CarouselEventCardContent } from './CarouselEventCardContent';
4
+
5
+ const image: Picture = {
6
+ src: 'event.png',
7
+ format: 'webp',
8
+ title: 'business',
9
+ };
10
+
11
+ export const CAROUSEL_EVENT_CARD: CarouselEventCardContent = {
12
+ title: 'ПЕРСОНАЛ В АПК',
13
+ description: '22-23 ноября 2022',
14
+ icon: image,
15
+ };
16
+
17
+ const CAROUSEL_EVENT = <CarouselEventCard {...CAROUSEL_EVENT_CARD} />;
18
+
19
+ export default {
20
+ default: <div className="container grid grid-cols-12">{CAROUSEL_EVENT}</div>,
21
+ };
@@ -0,0 +1,32 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { BlockWrapper } from '../../ui-kit/BlockWrapper';
3
+ import { Heading } from '../../ui-kit/Heading/Heading';
4
+ import { Img } from '../../ui-kit/Img/Img';
5
+ import { Text } from '../../ui-kit/Text/Text';
6
+ import { getIconWithVersion } from '../../utils/getIconWithVersion';
7
+ import { style } from '../../utils/style';
8
+ import type { UniBlockProps } from '../../model/JSXBlock';
9
+ import type { CarouselEventCardContent } from './CarouselEventCardContent';
10
+
11
+ export interface CarouselEventCardProps extends CarouselEventCardContent, UniBlockProps {}
12
+
13
+ export const CarouselEventCard = JSX<CarouselEventCardProps>(
14
+ ({ className = '', icon, title, description, href, target, ...rest }) => (
15
+ <BlockWrapper className={style('flex flex-col w-[365px]', className)} {...rest}>
16
+ <a href={href} target={target} role="link">
17
+ {icon?.icon ? <Img image={getIconWithVersion(icon)} asSVG /> : null}
18
+ {icon?.src ? <Img image={icon} /> : null}
19
+ {title ? (
20
+ <Heading headingType="h6" as="h4" className="text-left mb-2" title={title} />
21
+ ) : null}
22
+ {description ? (
23
+ <div className="mb-4">
24
+ <Text font="font-light" size="text-s" color="text-secondary-text">
25
+ {description}
26
+ </Text>
27
+ </div>
28
+ ) : null}
29
+ </a>
30
+ </BlockWrapper>
31
+ ),
32
+ );
@@ -0,0 +1,12 @@
1
+ import type { DescriptionProps, TitleProps } from '../../model/HeadlineType';
2
+ import type { LinkCommonProps } from '../../model/LinkProps';
3
+ import type { Picture } from '../../model/Picture';
4
+
5
+ /**
6
+ * @title Карточка мероприятия в карусели
7
+ */
8
+ export type CarouselEventCardContent = TitleProps &
9
+ DescriptionProps &
10
+ LinkCommonProps & {
11
+ icon?: Picture;
12
+ };
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "content": {
3
- "image": {
4
- "format": "webp",
5
- "size": {
6
- "width": 180,
7
- "height": 180
8
- }
9
- },
10
- "title": "Заголовок 1",
11
- "description": "Описание 1",
12
- "socialMedia": [
13
- {
14
- "href": "https://t.me",
15
- "target": "_blank",
16
- "version": "gray",
17
- "rounded": false
18
- }
19
- ],
20
- "version": "primary"
3
+ "image": {
4
+ "format": "webp",
5
+ "size": {
6
+ "width": 180,
7
+ "height": 180
8
+ }
9
+ },
10
+ "title": "Заголовок 1",
11
+ "description": "Описание 1",
12
+ "socialMedia": [
13
+ {
14
+ "href": "https://t.me",
15
+ "target": "_blank",
16
+ "version": "gray",
17
+ "rounded": false
18
+ }
19
+ ],
20
+ "version": "primary"
21
21
  }
22
22
  }
@@ -1,8 +1,10 @@
1
- import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
2
1
  import type { Picture } from '../../model/Picture';
3
2
  import '../../setup-fixture';
4
3
  import { CarouselRecommendationCard } from './CarouselRecommendationCard';
5
- import type { CarouselRecommendationCardContent } from './CarouselRecommendationCardContent';
4
+ import type {
5
+ CarouselRecommendationCardContent,
6
+ RecommendationSocialMedia,
7
+ } from './CarouselRecommendationCardContent';
6
8
 
7
9
  const image: Picture = {
8
10
  src: 'product-basket.png',
@@ -14,7 +16,7 @@ const image: Picture = {
14
16
  title: 'product-basket',
15
17
  };
16
18
 
17
- const socialMedia: ButtonWithIconProps[] = [
19
+ const socialMedia: RecommendationSocialMedia[] = [
18
20
  {
19
21
  href: 'https://t.me',
20
22
  target: '_blank',
@@ -32,6 +34,9 @@ const socialMedia: ButtonWithIconProps[] = [
32
34
  target: '_blank',
33
35
  version: 'gray',
34
36
  rounded: false,
37
+ icon: {
38
+ icon: 'OkIcon',
39
+ },
35
40
  },
36
41
  ];
37
42
 
@@ -1,20 +1,18 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { UniBlockProps } from '../../model/JSXBlock';
3
3
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
4
- import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
5
4
  import { Heading } from '../../ui-kit/Heading/Heading';
6
5
  import { Img } from '../../ui-kit/Img/Img';
7
6
  import { List } from '../../ui-kit/List/List';
7
+ import { style } from '../../utils/style';
8
8
  import { BaseTile } from '../BaseTile/BaseTile';
9
9
  import { SocialMedia } from '../Footer/SocialMedia';
10
10
  import type { CarouselRecommendationCardContent } from './CarouselRecommendationCardContent';
11
- import { style } from '../../utils/style';
12
11
 
13
12
  export interface RecommendationCardProps extends CarouselRecommendationCardContent, UniBlockProps {}
14
13
 
15
14
  export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
16
15
  ({
17
- button,
18
16
  className = '',
19
17
  description,
20
18
  image,
@@ -57,7 +55,6 @@ export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
57
55
  />
58
56
  ) : null}
59
57
  {socialMedia.length ? <SocialMedia className="pt-10 pb-0" media={socialMedia} /> : null}
60
- {renderButtonsSection([button], { className: 'pt-2 mt-16' })}
61
58
  </div>
62
59
  </BaseTile>
63
60
  </BlockWrapper>
@@ -2,14 +2,11 @@
2
2
  "content": {
3
3
  "image": {
4
4
  "ui:field": "picture"
5
- },
5
+ },
6
6
  "socialMedia": {
7
7
  "items": {
8
8
  "icon": {
9
9
  "ui:field": "icon"
10
- },
11
- "iconRight": {
12
- "ui:field": "icon"
13
10
  }
14
11
  }
15
12
  }
@@ -1,9 +1,16 @@
1
1
  import type { BlockVersion } from '../../model/BlockVersion';
2
+ import type { ButtonVersion } from '../../model/ButtonVersion';
2
3
  import type { HeadlineCommonProps } from '../../model/HeadlineType';
4
+ import type { LinkCommonProps } from '../../model/LinkProps';
3
5
  import type { Picture } from '../../model/Picture';
4
- import type { ButtonWithIconProps, ButtonProps } from '../../ui-kit/Button/ButtonProps';
5
6
  import type { ListContent } from '../../ui-kit/List/ListContent';
6
7
 
8
+ export type RecommendationSocialMedia = LinkCommonProps & {
9
+ version: ButtonVersion;
10
+ icon?: Picture;
11
+ rounded?: boolean;
12
+ };
13
+
7
14
  /**
8
15
  * @title Карточка рекомендаций
9
16
  */
@@ -11,7 +18,7 @@ export interface CarouselRecommendationCardContent extends HeadlineCommonProps,
11
18
  /**
12
19
  * @title Соц сети
13
20
  */
14
- socialMedia?: ButtonWithIconProps[];
21
+ socialMedia?: RecommendationSocialMedia[];
15
22
  /**
16
23
  * @default {
17
24
  * "format": "webp",
@@ -27,12 +34,5 @@ export interface CarouselRecommendationCardContent extends HeadlineCommonProps,
27
34
  * }
28
35
  */
29
36
  image?: Picture;
30
- /**
31
- * @default {
32
- * "text": "",
33
- * "version": "secondary"
34
- * }
35
- */
36
- button?: ButtonProps;
37
37
  version?: BlockVersion;
38
38
  }
@@ -1,45 +1,45 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { Img } from '../../ui-kit/Img/Img';
3
- import { getIconWithVersion } from '../../utils/getIconWithVersion';
4
- import { style } from '../../utils/style';
5
- import type { Picture } from '../../model/Picture';
6
2
  import type { IconVersion } from '../../model/IconVersion';
3
+ import type { Picture } from '../../model/Picture';
7
4
  import { Button } from '../../ui-kit/Button/Button';
8
5
  import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
6
+ import { Img } from '../../ui-kit/Img/Img';
7
+ import { getIconWithVersion } from '../../utils/getIconWithVersion';
8
+ import { style } from '../../utils/style';
9
9
 
10
10
  const ICONS_MAP: Array<{
11
11
  origins: string[];
12
- icon: Picture;
12
+ iconMapped: Picture;
13
13
  label: string;
14
14
  }> = [
15
15
  {
16
16
  origins: ['t.me', 'telegram.org'],
17
- icon: { icon: 'TelegramIcon' },
17
+ iconMapped: { icon: 'TelegramIcon' },
18
18
  label: 'Телеграм',
19
19
  },
20
20
  {
21
21
  origins: ['vk.com'],
22
- icon: { icon: 'VKIcon' },
22
+ iconMapped: { icon: 'VKIcon' },
23
23
  label: 'ВКонтакте',
24
24
  },
25
25
  {
26
26
  origins: ['ok.ru'],
27
- icon: { icon: 'OkIcon' },
27
+ iconMapped: { icon: 'OkIcon' },
28
28
  label: 'Одноклассники',
29
29
  },
30
30
  {
31
31
  origins: ['apps.apple.com'],
32
- icon: { icon: 'AppleIcon' },
32
+ iconMapped: { icon: 'AppleIcon' },
33
33
  label: 'App Store',
34
34
  },
35
35
  {
36
36
  origins: ['play.google.com'],
37
- icon: { icon: 'PlayMarketIcon' },
37
+ iconMapped: { icon: 'PlayMarketIcon' },
38
38
  label: 'Google Play',
39
39
  },
40
40
  {
41
41
  origins: ['youtube.com'],
42
- icon: { icon: 'YoutubeIcon' },
42
+ iconMapped: { icon: 'YoutubeIcon' },
43
43
  label: 'Youtube',
44
44
  },
45
45
  ];
@@ -57,12 +57,17 @@ const buttonSizeStyles = {
57
57
  };
58
58
 
59
59
  export const MediaButton = JSX<MediaButtonProps>(
60
- ({ iconVersion = 'color', buttonSize = 'default', rounded = false, ...rest }) => {
60
+ ({ iconVersion = 'color', buttonSize = 'default', rounded = false, icon, ...rest }) => {
61
61
  const { href, version } = rest;
62
62
 
63
- const { icon, label } =
63
+ const { iconMapped, label } =
64
64
  ICONS_MAP.find(({ origins }) => origins.some((_) => href?.includes(_))) || {};
65
- const iconWithVersion = icon ? { ...getIconWithVersion(icon), iconVersion } : null;
65
+
66
+ const iconCustom = icon ?? iconMapped;
67
+
68
+ const iconWithVersion = iconCustom
69
+ ? { ...getIconWithVersion(iconCustom), iconVersion }
70
+ : undefined;
66
71
 
67
72
  return (
68
73
  <Button
@@ -2,7 +2,7 @@ import '../../setup-fixture';
2
2
  import { Header } from './Header';
3
3
 
4
4
  export default {
5
- default: <Header chat="personal" />,
6
- transparent: <Header bgColor="transparent" chat="personal" />,
7
- 'no submenu': <Header showSubMenu={false} chat="personal" />,
5
+ default: <Header />,
6
+ transparent: <Header bgColor="transparent" />,
7
+ 'no submenu': <Header showSubMenu={false} />,
8
8
  };
@@ -28,7 +28,6 @@ export const Header = JSX<HeaderProps>(
28
28
  className,
29
29
  showSubMenu = true,
30
30
  version = BG_COLOR_TO_BLOCK_VERSION[bgColor],
31
- chat,
32
31
  ...rest
33
32
  }) => {
34
33
  const router = useRouter();
@@ -64,7 +63,6 @@ export const Header = JSX<HeaderProps>(
64
63
  foreignOffices={foreignOffices}
65
64
  defaultLocation={defaultLocation}
66
65
  officesLink={officesLink}
67
- chat={chat}
68
66
  />
69
67
  </div>
70
68
  <div
@@ -2,16 +2,13 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useBool } from '../../hooks/useBool';
3
3
  import type { IconVersion } from '../../model/IconVersion';
4
4
  import { style } from '../../utils/style';
5
- import type { ChatBot as ChatBotWithEmptyOption } from './HeaderContent';
6
5
  import { HeaderSecondaryMenuButton } from './HeaderSecondaryMenuButton';
7
6
  import { useChatBot } from './useChatBot';
8
7
 
9
- export type ChatBot = Exclude<ChatBotWithEmptyOption, ''>;
10
-
11
8
  interface HeaderChatBotButtonProps {
12
9
  className?: string;
13
10
  iconVersion?: IconVersion;
14
- chat?: ChatBot;
11
+ chat?: string;
15
12
  onClick?: () => void;
16
13
  }
17
14