@redneckz/wildless-cms-uni-blocks 0.6.41 → 0.6.43

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 (381) hide show
  1. package/bin/migration-scripts/0.6.34.js +2 -0
  2. package/bin/migration-scripts/0.6.43.js +29 -0
  3. package/bundle/blocks.schema.json +1 -1
  4. package/bundle/bundle.umd.js +213 -101
  5. package/bundle/bundle.umd.min.js +1 -1
  6. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
  7. package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
  8. package/bundle/components/Header/HeaderSecondaryMenu.d.ts +2 -0
  9. package/bundle/components/ProductTile/ProductTileContent.d.ts +24 -2
  10. package/bundle/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
  11. package/bundle/components/ProductTile/renderBenefit.d.ts +4 -0
  12. package/bundle/components/ProductTile/renderImage.d.ts +3 -0
  13. package/bundle/content-page-repository/transformImg.d.ts +1 -1
  14. package/bundle/hooks/useCachedAsyncData.d.ts +2 -0
  15. package/bundle/hooks/useLocation.d.ts +6 -0
  16. package/bundle/hooks/useRegions.d.ts +6 -0
  17. package/bundle/services/sitemap/SitemapProps.d.ts +8 -0
  18. package/bundle/ui-kit/Location/Location.d.ts +19 -0
  19. package/bundle/ui-kit/Location/SearchBar.d.ts +6 -0
  20. package/bundle/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
  21. package/bundle/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
  22. package/bundle/utils/groupBy.d.ts +1 -0
  23. package/dist/components/Blocks.js +4 -2
  24. package/dist/components/Blocks.js.map +1 -1
  25. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
  26. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +22 -0
  27. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
  28. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
  29. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
  30. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
  31. package/dist/components/Header/Header.js +2 -2
  32. package/dist/components/Header/Header.js.map +1 -1
  33. package/dist/components/Header/HeaderBurger.js +4 -3
  34. package/dist/components/Header/HeaderBurger.js.map +1 -1
  35. package/dist/components/Header/HeaderSecondaryMenu.d.ts +2 -0
  36. package/dist/components/Header/HeaderSecondaryMenu.js +13 -4
  37. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  38. package/dist/components/ProductTile/ProductTile.js +9 -22
  39. package/dist/components/ProductTile/ProductTile.js.map +1 -1
  40. package/dist/components/ProductTile/ProductTileContent.d.ts +24 -2
  41. package/dist/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
  42. package/dist/components/ProductTile/renderAdditionalDescription.js +18 -0
  43. package/dist/components/ProductTile/renderAdditionalDescription.js.map +1 -0
  44. package/dist/components/ProductTile/renderBenefit.d.ts +4 -0
  45. package/dist/components/ProductTile/renderBenefit.js +32 -0
  46. package/dist/components/ProductTile/renderBenefit.js.map +1 -0
  47. package/dist/components/ProductTile/renderImage.d.ts +3 -0
  48. package/dist/components/ProductTile/renderImage.js +12 -0
  49. package/dist/components/ProductTile/renderImage.js.map +1 -0
  50. package/dist/components/Recommendation/RecommendationCard.js +1 -1
  51. package/dist/components/Recommendation/RecommendationCard.js.map +1 -1
  52. package/dist/components/TextBlock/TextBlock.js +13 -28
  53. package/dist/components/TextBlock/TextBlock.js.map +1 -1
  54. package/dist/content-page-repository/transformImg.d.ts +1 -1
  55. package/dist/content-page-repository/transformImg.js +4 -10
  56. package/dist/content-page-repository/transformImg.js.map +1 -1
  57. package/dist/content-page-repository/transformMarkdown.js +3 -3
  58. package/dist/content-page-repository/transformMarkdown.js.map +1 -1
  59. package/dist/hooks/useCachedAsyncData.d.ts +2 -0
  60. package/dist/hooks/useCachedAsyncData.js +25 -0
  61. package/dist/hooks/useCachedAsyncData.js.map +1 -0
  62. package/dist/hooks/useLocation.d.ts +6 -0
  63. package/dist/hooks/useLocation.js +26 -0
  64. package/dist/hooks/useLocation.js.map +1 -0
  65. package/dist/hooks/useRegions.d.ts +6 -0
  66. package/dist/hooks/useRegions.js +11 -0
  67. package/dist/hooks/useRegions.js.map +1 -0
  68. package/dist/services/sitemap/SitemapProps.d.ts +8 -0
  69. package/dist/ui-kit/Location/Location.d.ts +19 -0
  70. package/dist/ui-kit/Location/Location.js +44 -0
  71. package/dist/ui-kit/Location/Location.js.map +1 -0
  72. package/dist/ui-kit/Location/SearchBar.d.ts +6 -0
  73. package/dist/ui-kit/Location/SearchBar.js +9 -0
  74. package/dist/ui-kit/Location/SearchBar.js.map +1 -0
  75. package/dist/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
  76. package/dist/ui-kit/MarkdownText/MarkdownText.js +9 -0
  77. package/dist/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
  78. package/dist/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
  79. package/dist/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
  80. package/dist/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
  81. package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
  82. package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  83. package/dist/ui-kit/Text/Text.js +1 -5
  84. package/dist/ui-kit/Text/Text.js.map +1 -1
  85. package/dist/utils/groupBy.d.ts +1 -0
  86. package/dist/utils/groupBy.js +13 -0
  87. package/dist/utils/groupBy.js.map +1 -0
  88. package/lib/common.css +1 -1
  89. package/lib/components/Blocks.js +4 -2
  90. package/lib/components/Blocks.js.map +1 -1
  91. package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
  92. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
  93. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.d.ts +9 -0
  94. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +20 -0
  95. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
  96. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
  97. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
  98. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
  99. package/lib/components/Header/Header.js +2 -2
  100. package/lib/components/Header/Header.js.map +1 -1
  101. package/lib/components/Header/HeaderBurger.js +4 -3
  102. package/lib/components/Header/HeaderBurger.js.map +1 -1
  103. package/lib/components/Header/HeaderSecondaryMenu.d.ts +2 -0
  104. package/lib/components/Header/HeaderSecondaryMenu.js +13 -4
  105. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  106. package/lib/components/ProductTile/ProductTile.js +10 -23
  107. package/lib/components/ProductTile/ProductTile.js.map +1 -1
  108. package/lib/components/ProductTile/ProductTileContent.d.ts +24 -2
  109. package/lib/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
  110. package/lib/components/ProductTile/renderAdditionalDescription.js +15 -0
  111. package/lib/components/ProductTile/renderAdditionalDescription.js.map +1 -0
  112. package/lib/components/ProductTile/renderBenefit.d.ts +4 -0
  113. package/lib/components/ProductTile/renderBenefit.js +29 -0
  114. package/lib/components/ProductTile/renderBenefit.js.map +1 -0
  115. package/lib/components/ProductTile/renderImage.d.ts +3 -0
  116. package/lib/components/ProductTile/renderImage.js +9 -0
  117. package/lib/components/ProductTile/renderImage.js.map +1 -0
  118. package/lib/components/Recommendation/Recommendation.fixture.d.ts +1 -1
  119. package/lib/components/Recommendation/RecommendationCard.js +1 -1
  120. package/lib/components/Recommendation/RecommendationCard.js.map +1 -1
  121. package/lib/components/TextBlock/TextBlock.js +13 -28
  122. package/lib/components/TextBlock/TextBlock.js.map +1 -1
  123. package/lib/content-page-repository/transformImg.d.ts +1 -1
  124. package/lib/content-page-repository/transformImg.js +4 -10
  125. package/lib/content-page-repository/transformImg.js.map +1 -1
  126. package/lib/content-page-repository/transformMarkdown.js +3 -3
  127. package/lib/content-page-repository/transformMarkdown.js.map +1 -1
  128. package/lib/hooks/useCachedAsyncData.d.ts +2 -0
  129. package/lib/hooks/useCachedAsyncData.js +22 -0
  130. package/lib/hooks/useCachedAsyncData.js.map +1 -0
  131. package/lib/hooks/useLocation.d.ts +6 -0
  132. package/lib/hooks/useLocation.js +23 -0
  133. package/lib/hooks/useLocation.js.map +1 -0
  134. package/lib/hooks/useRegions.d.ts +6 -0
  135. package/lib/hooks/useRegions.js +8 -0
  136. package/lib/hooks/useRegions.js.map +1 -0
  137. package/lib/services/sitemap/SitemapProps.d.ts +8 -0
  138. package/lib/ui-kit/Location/Location.d.ts +19 -0
  139. package/lib/ui-kit/Location/Location.fixture.d.ts +6 -0
  140. package/lib/ui-kit/Location/Location.js +42 -0
  141. package/lib/ui-kit/Location/Location.js.map +1 -0
  142. package/lib/ui-kit/Location/SearchBar.d.ts +6 -0
  143. package/lib/ui-kit/Location/SearchBar.js +7 -0
  144. package/lib/ui-kit/Location/SearchBar.js.map +1 -0
  145. package/lib/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
  146. package/lib/ui-kit/MarkdownText/MarkdownText.js +7 -0
  147. package/lib/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
  148. package/lib/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
  149. package/lib/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
  150. package/lib/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
  151. package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
  152. package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  153. package/lib/ui-kit/Text/Text.js +1 -5
  154. package/lib/ui-kit/Text/Text.js.map +1 -1
  155. package/lib/utils/groupBy.d.ts +1 -0
  156. package/lib/utils/groupBy.js +10 -0
  157. package/lib/utils/groupBy.js.map +1 -0
  158. package/mobile/bundle/bundle.umd.js +49 -25
  159. package/mobile/bundle/bundle.umd.min.js +1 -1
  160. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
  161. package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
  162. package/mobile/bundle/components/Header/HeaderSecondaryMenu.d.ts +2 -0
  163. package/mobile/bundle/components/ProductTile/ProductTileContent.d.ts +24 -2
  164. package/mobile/bundle/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
  165. package/mobile/bundle/components/ProductTile/renderBenefit.d.ts +4 -0
  166. package/mobile/bundle/components/ProductTile/renderImage.d.ts +3 -0
  167. package/mobile/bundle/content-page-repository/transformImg.d.ts +1 -1
  168. package/mobile/bundle/hooks/useCachedAsyncData.d.ts +2 -0
  169. package/mobile/bundle/hooks/useLocation.d.ts +6 -0
  170. package/mobile/bundle/hooks/useRegions.d.ts +6 -0
  171. package/mobile/bundle/services/sitemap/SitemapProps.d.ts +8 -0
  172. package/mobile/bundle/ui-kit/Location/Location.d.ts +19 -0
  173. package/mobile/bundle/ui-kit/Location/SearchBar.d.ts +6 -0
  174. package/mobile/bundle/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
  175. package/mobile/bundle/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
  176. package/mobile/bundle/utils/groupBy.d.ts +1 -0
  177. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
  178. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +22 -0
  179. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
  180. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
  181. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
  182. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
  183. package/mobile/dist/components/Header/HeaderBurger.js +4 -3
  184. package/mobile/dist/components/Header/HeaderBurger.js.map +1 -1
  185. package/mobile/dist/components/Header/HeaderSecondaryMenu.d.ts +2 -0
  186. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +13 -4
  187. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  188. package/mobile/dist/components/ProductTile/ProductTile.js +9 -22
  189. package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
  190. package/mobile/dist/components/ProductTile/ProductTileContent.d.ts +24 -2
  191. package/mobile/dist/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
  192. package/mobile/dist/components/ProductTile/renderAdditionalDescription.js +18 -0
  193. package/mobile/dist/components/ProductTile/renderAdditionalDescription.js.map +1 -0
  194. package/mobile/dist/components/ProductTile/renderBenefit.d.ts +4 -0
  195. package/mobile/dist/components/ProductTile/renderBenefit.js +32 -0
  196. package/mobile/dist/components/ProductTile/renderBenefit.js.map +1 -0
  197. package/mobile/dist/components/ProductTile/renderImage.d.ts +3 -0
  198. package/mobile/dist/components/ProductTile/renderImage.js +12 -0
  199. package/mobile/dist/components/ProductTile/renderImage.js.map +1 -0
  200. package/mobile/dist/components/Recommendation/RecommendationCard.js +1 -1
  201. package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -1
  202. package/mobile/dist/content-page-repository/transformImg.d.ts +1 -1
  203. package/mobile/dist/content-page-repository/transformImg.js +4 -10
  204. package/mobile/dist/content-page-repository/transformImg.js.map +1 -1
  205. package/mobile/dist/content-page-repository/transformMarkdown.js +3 -3
  206. package/mobile/dist/content-page-repository/transformMarkdown.js.map +1 -1
  207. package/mobile/dist/hooks/useCachedAsyncData.d.ts +2 -0
  208. package/mobile/dist/hooks/useCachedAsyncData.js +25 -0
  209. package/mobile/dist/hooks/useCachedAsyncData.js.map +1 -0
  210. package/mobile/dist/hooks/useLocation.d.ts +6 -0
  211. package/mobile/dist/hooks/useLocation.js +26 -0
  212. package/mobile/dist/hooks/useLocation.js.map +1 -0
  213. package/mobile/dist/hooks/useRegions.d.ts +6 -0
  214. package/mobile/dist/hooks/useRegions.js +11 -0
  215. package/mobile/dist/hooks/useRegions.js.map +1 -0
  216. package/mobile/dist/services/sitemap/SitemapProps.d.ts +8 -0
  217. package/mobile/dist/ui-kit/Location/Location.d.ts +19 -0
  218. package/mobile/dist/ui-kit/Location/Location.js +44 -0
  219. package/mobile/dist/ui-kit/Location/Location.js.map +1 -0
  220. package/mobile/dist/ui-kit/Location/SearchBar.d.ts +6 -0
  221. package/mobile/dist/ui-kit/Location/SearchBar.js +9 -0
  222. package/mobile/dist/ui-kit/Location/SearchBar.js.map +1 -0
  223. package/mobile/dist/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
  224. package/mobile/dist/ui-kit/MarkdownText/MarkdownText.js +9 -0
  225. package/mobile/dist/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
  226. package/mobile/dist/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
  227. package/mobile/dist/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
  228. package/mobile/dist/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
  229. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
  230. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  231. package/mobile/dist/ui-kit/Text/Text.js +1 -5
  232. package/mobile/dist/ui-kit/Text/Text.js.map +1 -1
  233. package/mobile/dist/utils/groupBy.d.ts +1 -0
  234. package/mobile/dist/utils/groupBy.js +13 -0
  235. package/mobile/dist/utils/groupBy.js.map +1 -0
  236. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.d.ts +5 -0
  237. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +20 -0
  238. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -0
  239. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +44 -0
  240. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js +2 -0
  241. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.js.map +1 -0
  242. package/mobile/lib/components/Header/HeaderBurger.js +4 -3
  243. package/mobile/lib/components/Header/HeaderBurger.js.map +1 -1
  244. package/mobile/lib/components/Header/HeaderSecondaryMenu.d.ts +2 -0
  245. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +13 -4
  246. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  247. package/mobile/lib/components/ProductTile/ProductTile.js +10 -23
  248. package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
  249. package/mobile/lib/components/ProductTile/ProductTileContent.d.ts +24 -2
  250. package/mobile/lib/components/ProductTile/renderAdditionalDescription.d.ts +4 -0
  251. package/mobile/lib/components/ProductTile/renderAdditionalDescription.js +15 -0
  252. package/mobile/lib/components/ProductTile/renderAdditionalDescription.js.map +1 -0
  253. package/mobile/lib/components/ProductTile/renderBenefit.d.ts +4 -0
  254. package/mobile/lib/components/ProductTile/renderBenefit.js +29 -0
  255. package/mobile/lib/components/ProductTile/renderBenefit.js.map +1 -0
  256. package/mobile/lib/components/ProductTile/renderImage.d.ts +3 -0
  257. package/mobile/lib/components/ProductTile/renderImage.js +9 -0
  258. package/mobile/lib/components/ProductTile/renderImage.js.map +1 -0
  259. package/mobile/lib/components/Recommendation/RecommendationCard.js +1 -1
  260. package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -1
  261. package/mobile/lib/content-page-repository/transformImg.d.ts +1 -1
  262. package/mobile/lib/content-page-repository/transformImg.js +4 -10
  263. package/mobile/lib/content-page-repository/transformImg.js.map +1 -1
  264. package/mobile/lib/content-page-repository/transformMarkdown.js +3 -3
  265. package/mobile/lib/content-page-repository/transformMarkdown.js.map +1 -1
  266. package/mobile/lib/hooks/useCachedAsyncData.d.ts +2 -0
  267. package/mobile/lib/hooks/useCachedAsyncData.js +22 -0
  268. package/mobile/lib/hooks/useCachedAsyncData.js.map +1 -0
  269. package/mobile/lib/hooks/useLocation.d.ts +6 -0
  270. package/mobile/lib/hooks/useLocation.js +23 -0
  271. package/mobile/lib/hooks/useLocation.js.map +1 -0
  272. package/mobile/lib/hooks/useRegions.d.ts +6 -0
  273. package/mobile/lib/hooks/useRegions.js +8 -0
  274. package/mobile/lib/hooks/useRegions.js.map +1 -0
  275. package/mobile/lib/services/sitemap/SitemapProps.d.ts +8 -0
  276. package/mobile/lib/ui-kit/Location/Location.d.ts +19 -0
  277. package/mobile/lib/ui-kit/Location/Location.js +42 -0
  278. package/mobile/lib/ui-kit/Location/Location.js.map +1 -0
  279. package/mobile/lib/ui-kit/Location/SearchBar.d.ts +6 -0
  280. package/mobile/lib/ui-kit/Location/SearchBar.js +7 -0
  281. package/mobile/lib/ui-kit/Location/SearchBar.js.map +1 -0
  282. package/mobile/lib/ui-kit/MarkdownText/MarkdownText.d.ts +2 -0
  283. package/mobile/lib/ui-kit/MarkdownText/MarkdownText.js +7 -0
  284. package/mobile/lib/ui-kit/MarkdownText/MarkdownText.js.map +1 -0
  285. package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.d.ts +6 -0
  286. package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.js +2 -0
  287. package/mobile/lib/ui-kit/MarkdownText/MarkdownTextProps.js.map +1 -0
  288. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +8 -4
  289. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  290. package/mobile/lib/ui-kit/Text/Text.js +1 -5
  291. package/mobile/lib/ui-kit/Text/Text.js.map +1 -1
  292. package/mobile/lib/utils/groupBy.d.ts +1 -0
  293. package/mobile/lib/utils/groupBy.js +10 -0
  294. package/mobile/lib/utils/groupBy.js.map +1 -0
  295. package/mobile/src/common.css +50 -0
  296. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +19 -0
  297. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +62 -0
  298. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +9 -0
  299. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +45 -0
  300. package/mobile/src/components/Header/HeaderBurger.tsx +5 -7
  301. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +32 -5
  302. package/mobile/src/components/MiniGallery/MiniGallery.ui.json +1 -1
  303. package/mobile/src/components/ProductTile/ProductTile.example.json +3 -0
  304. package/mobile/src/components/ProductTile/ProductTile.tsx +13 -44
  305. package/mobile/src/components/ProductTile/ProductTile.ui.json +14 -1
  306. package/mobile/src/components/ProductTile/ProductTileContent.ts +26 -2
  307. package/mobile/src/components/ProductTile/renderAdditionalDescription.tsx +30 -0
  308. package/mobile/src/components/ProductTile/renderBenefit.tsx +39 -0
  309. package/mobile/src/components/ProductTile/renderImage.tsx +15 -0
  310. package/mobile/src/components/Recommendation/Recommendation.example.json +6 -5
  311. package/mobile/src/components/Recommendation/Recommendation.ui.json +8 -0
  312. package/mobile/src/components/Recommendation/RecommendationCard.tsx +1 -1
  313. package/mobile/src/content-page-repository/transformImg.ts +6 -14
  314. package/mobile/src/content-page-repository/transformMarkdown.ts +3 -3
  315. package/mobile/src/hooks/useCachedAsyncData.ts +37 -0
  316. package/mobile/src/hooks/useLocation.ts +48 -0
  317. package/mobile/src/hooks/useRegions.ts +16 -0
  318. package/mobile/src/services/sitemap/SitemapProps.ts +9 -0
  319. package/mobile/src/ui-kit/Location/Location.tsx +168 -0
  320. package/mobile/src/ui-kit/Location/SearchBar.tsx +30 -0
  321. package/mobile/src/ui-kit/MarkdownText/MarkdownText.tsx +8 -0
  322. package/mobile/src/ui-kit/MarkdownText/MarkdownTextProps.ts +6 -0
  323. package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +8 -4
  324. package/mobile/src/ui-kit/Text/Text.tsx +5 -7
  325. package/mobile/src/utils/groupBy.ts +10 -0
  326. package/package.json +2 -2
  327. package/src/common.css +50 -0
  328. package/src/components/Blocks.ts +4 -2
  329. package/src/components/Carousel/Carousel.fixture.tsx +22 -4
  330. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +19 -0
  331. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +47 -0
  332. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +62 -0
  333. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.ui.json +9 -0
  334. package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +45 -0
  335. package/src/components/Header/Header.tsx +6 -4
  336. package/src/components/Header/HeaderBurger.tsx +5 -7
  337. package/src/components/Header/HeaderSecondaryMenu.tsx +32 -5
  338. package/src/components/MiniGallery/MiniGallery.ui.json +1 -1
  339. package/src/components/ProductTile/ProductTile.example.json +3 -0
  340. package/src/components/ProductTile/ProductTile.fixture.tsx +11 -4
  341. package/src/components/ProductTile/ProductTile.tsx +13 -44
  342. package/src/components/ProductTile/ProductTile.ui.json +14 -1
  343. package/src/components/ProductTile/ProductTileContent.ts +26 -2
  344. package/src/components/ProductTile/renderAdditionalDescription.tsx +30 -0
  345. package/src/components/ProductTile/renderBenefit.tsx +39 -0
  346. package/src/components/ProductTile/renderImage.tsx +15 -0
  347. package/src/components/Recommendation/Recommendation.example.json +6 -5
  348. package/src/components/Recommendation/Recommendation.fixture.tsx +11 -10
  349. package/src/components/Recommendation/Recommendation.ui.json +8 -0
  350. package/src/components/Recommendation/RecommendationCard.tsx +1 -1
  351. package/src/components/TextBlock/TextBlock.tsx +49 -41
  352. package/src/content-page-repository/transformImg.ts +6 -14
  353. package/src/content-page-repository/transformMarkdown.ts +3 -3
  354. package/src/hooks/useCachedAsyncData.ts +37 -0
  355. package/src/hooks/useLocation.ts +48 -0
  356. package/src/hooks/useRegions.ts +16 -0
  357. package/src/services/sitemap/SitemapProps.ts +9 -0
  358. package/src/ui-kit/Location/Location.fixture.tsx +81 -0
  359. package/src/ui-kit/Location/Location.tsx +168 -0
  360. package/src/ui-kit/Location/SearchBar.tsx +30 -0
  361. package/src/ui-kit/MarkdownText/MarkdownText.tsx +8 -0
  362. package/src/ui-kit/MarkdownText/MarkdownTextProps.ts +6 -0
  363. package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +8 -4
  364. package/src/ui-kit/Text/Text.tsx +5 -7
  365. package/src/utils/groupBy.ts +10 -0
  366. package/bundle/hooks/useGeolocation.d.ts +0 -1
  367. package/dist/hooks/useGeolocation.d.ts +0 -1
  368. package/dist/hooks/useGeolocation.js +0 -21
  369. package/dist/hooks/useGeolocation.js.map +0 -1
  370. package/lib/hooks/useGeolocation.d.ts +0 -1
  371. package/lib/hooks/useGeolocation.js +0 -18
  372. package/lib/hooks/useGeolocation.js.map +0 -1
  373. package/mobile/bundle/hooks/useGeolocation.d.ts +0 -1
  374. package/mobile/dist/hooks/useGeolocation.d.ts +0 -1
  375. package/mobile/dist/hooks/useGeolocation.js +0 -21
  376. package/mobile/dist/hooks/useGeolocation.js.map +0 -1
  377. package/mobile/lib/hooks/useGeolocation.d.ts +0 -1
  378. package/mobile/lib/hooks/useGeolocation.js +0 -18
  379. package/mobile/lib/hooks/useGeolocation.js.map +0 -1
  380. package/mobile/src/hooks/useGeolocation.ts +0 -22
  381. package/src/hooks/useGeolocation.ts +0 -22
@@ -519,11 +519,7 @@
519
519
  return (jsx(ImgAsPicture, { className: className, imageClassName: imageClassName, image: image, isMobile: isMobile }));
520
520
  });
521
521
 
522
- const Text = JSX((props) => {
523
- const { size = '', color = '', align = '', font = '', children } = props;
524
- const textClasses = `font-sans ${size} ${color} ${align} ${font}`;
525
- return jsx("span", { className: textClasses, children: children });
526
- });
522
+ const Text = JSX(({ size, color, align, font, children }) => (jsx("span", { className: ['font-sans', size, color, align, font].filter(Boolean).join(' '), children: children })));
527
523
 
528
524
  const icons$1 = ['PlusIcon', 'MinusIcon'];
529
525
  const AccordionItem = JSX(({ className = '', label = '', isExpanded, ...rest }) => (jsx("li", { className: `border-0 border-b border-solid border-main-divider last:border-b-0 ${className}`, children: jsx(Foldable, { isFoldButtonOnTop: true, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { className: "grid grid-cols-12 gap-5 [&>*]:p-0", isUnfolded: isUnfolded, children: renderChildren(rest) })), renderFoldButton: ({ isUnfolded, onToggle }) => (jsx(FoldButton$1, { label: label, icon: icons$1[Number(isUnfolded)], onClick: onToggle })) }) })));
@@ -559,9 +555,9 @@
559
555
  const BenefitsBlock = JSX(({ className = '', title, benefitList, version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: `font-sans text-primary-text p-12 flex flex-col items-center ${className} ${VersionStyleMap[version]}`, ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: `max-w-[47rem] text-center ${benefitsTextStyleMap[version]}`, title: title })) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full justify-center gap-x-20 mt-8", children: benefitList.map(renderStep(version)) })) : null] })));
560
556
  const renderStep = (version) => (benefit, i) => {
561
557
  const description = benefit.description;
562
- return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: `w-12 h-12 min-w-12 p-3 rounded-full ${benefitsIconStyleMap[version]}`, image: getIconWithVersion(benefit.icon, version), asSVG: true })) : null, benefit?.icon?.src ? jsx(ImgInner, { image: benefit.icon }) : null, jsxs("div", { className: "ml-5", children: [benefit?.label ? (jsx("h3", { className: `text-h6 m-0 ${benefitsTextStyleMap[version]}`, children: benefit.label })) : null, renderDescription$4(description, version)] })] }, String(i)));
558
+ return (jsxs("div", { className: "flex items-center basis-1/2 max-w-[500px] mb-14", children: [benefit?.icon?.icon ? (jsx(ImgInner, { className: `w-12 h-12 min-w-12 p-3 rounded-full ${benefitsIconStyleMap[version]}`, image: getIconWithVersion(benefit.icon, version), asSVG: true })) : null, benefit?.icon?.src ? jsx(ImgInner, { image: benefit.icon }) : null, jsxs("div", { className: "ml-5", children: [benefit?.label ? (jsx("h3", { className: `text-h6 m-0 ${benefitsTextStyleMap[version]}`, children: benefit.label })) : null, renderDescription$5(description, version)] })] }, String(i)));
563
559
  };
564
- const renderDescription$4 = (description, version) => {
560
+ const renderDescription$5 = (description, version) => {
565
561
  const benefitType = description?.benefitType || null;
566
562
  return description && benefitType ? (jsx("div", { className: `text-l-light mt-2 ${benefitsDescriptionStyleMap[version]}`, children: benefitType === 'list'
567
563
  ? renderListBenefit(description)
@@ -1444,7 +1440,7 @@
1444
1440
  });
1445
1441
 
1446
1442
  const childStyleMap = ['min-w-[100%]', 'min-w-[50%]', 'min-w-[33.33%]', 'min-w-[25%]'];
1447
- const SwipeListContainer = JSX(({ className = '', containerRef, activeIndex, visibleItemCount, gap = 0, padding = 0, snapAlign = 'snap-center', children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
1443
+ const SwipeListContainer = JSX(({ className = '', containerRef, activeIndex, visibleItemCount = 0, gap = 0, padding = 0, snapAlign = 'snap-center', children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
1448
1444
  const observerOptions = {
1449
1445
  sensitivity: 1,
1450
1446
  rootRef: containerRef,
@@ -1457,14 +1453,18 @@
1457
1453
  onVisibleItemsChange && onVisibleItemsChange(itemsVisibilityList);
1458
1454
  onVisibleIndicesChange && onVisibleIndicesChange(getVisibleIndices(itemsVisibilityList));
1459
1455
  }, [onVisibleItemsChange, onVisibleIndicesChange]);
1460
- return (jsx("div", { className: `box-border overflow-auto flex horizontal-list no-scrollbar ${className}`, style: { ...getContainerStyle(padding), gap: `${gap}px` }, role: "list", ref: containerRef, children: mapChildren((child, idx) => (jsx(SwipeListItem, { className: `${snapAlign} ${visibleItemCount ? childStyleMap[visibleItemCount - 1] : ''}`, style: getContainerStyle(padding / 4), activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
1456
+ const additionPadding = visibleItemCount > 0 ? gap * Number(visibleItemCount) - 1 : 0;
1457
+ return (jsx("div", { className: `box-border overflow-auto flex horizontal-list no-scrollbar ${className}`, style: {
1458
+ ...getContainerStyle(padding, additionPadding),
1459
+ gap: `${gap}px`,
1460
+ }, role: "list", ref: containerRef, children: mapChildren((child, idx) => (jsx(SwipeListItem, { className: `${snapAlign} ${visibleItemCount ? childStyleMap[visibleItemCount - 1] : ''}`, style: getContainerStyle(padding / 4), activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
1461
1461
  });
1462
1462
  // Styles used to compensate outer container padding to get rid of clipping effect
1463
- const getContainerStyle = (padding) => ({
1463
+ const getContainerStyle = (padding, additionalPadding = 0) => ({
1464
1464
  marginLeft: `${-padding}px`,
1465
1465
  marginRight: `${-padding}px`,
1466
1466
  paddingLeft: `${padding}px`,
1467
- paddingRight: `${padding}px`,
1467
+ paddingRight: `${padding + additionalPadding}px`,
1468
1468
  });
1469
1469
  const getVisibleIndices = (itemsVisibilityList) => itemsVisibilityList
1470
1470
  .map((_, i) => [_, i])
@@ -1672,11 +1672,11 @@
1672
1672
  BORDER_STYLE,
1673
1673
  AlignText[align],
1674
1674
  VersionStyleMap[version],
1675
- ].join(' '), role: "listitem", children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$4(icon, version), renderCardTitle$1(headlineSmallVersion, title), renderDescription$3(description, title), renderItems$2(items, isDotted, version), renderAdditionalDescription$2(additionalDescription, version)] }), renderButton({ button, buttonClassName: 'mt-6' })] }));
1675
+ ].join(' '), role: "listitem", children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$4(icon, version), renderCardTitle$1(headlineSmallVersion, title), renderDescription$4(description, title), renderItems$2(items, isDotted, version), renderAdditionalDescription$2(additionalDescription, version)] }), renderButton({ button, buttonClassName: 'mt-6' })] }));
1676
1676
  });
1677
1677
  const renderImage$4 = (image, version) => (jsxs("div", { className: "flex justify-center", children: [image?.src ? jsx(ImgInner, { className: "mb-5", image: image }) : null, image?.icon ? (jsx(ImgInner, { className: `w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full`, image: getIconWithVersion(image, version), asSVG: true })) : null] }));
1678
1678
  const renderCardTitle$1 = (headlineSmallVersion, title) => title ? jsx(Text, { size: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
1679
- const renderDescription$3 = (description, title) => description ? (jsx("div", { className: title ? 'mt-2' : '', children: jsx(Paragraph, { size: "text-l", children: description }) })) : null;
1679
+ const renderDescription$4 = (description, title) => description ? (jsx("div", { className: title ? 'mt-2' : '', children: jsx(Paragraph, { size: "text-l", children: description }) })) : null;
1680
1680
  const renderAdditionalDescription$2 = (additionalDescription, version = 'primary') => additionalDescription ? (jsx("div", { className: "mt-auto", children: jsx(Text, { size: "text-m", font: "font-light", color: descriptionStyleMap[version], children: additionalDescription }) })) : null;
1681
1681
  const renderItems$2 = (items, isDotted, version = 'primary') => items?.length ? (jsx(List, { className: `max-w-[308px] mt-2 text-s ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "text-left", items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted, version: version })) : null;
1682
1682
 
@@ -1827,7 +1827,7 @@
1827
1827
  return (jsxs("tr", { className: "pb-1 text-h6", children: [jsx("td", { className: "pt-4", children: jsxs("div", { className: "flex items-center", children: [currency ? (jsx(ImgInner, { image: { icon: CURRENCY_ICONS_MAP[currency] }, width: "24", height: "24" })) : null, jsx("span", { className: "ml-2", children: currency })] }) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.saleExchangeRate) }), jsx("td", { className: "pt-4 pl-11", children: formatCurrency(exchangeCurrencyItem?.buyExchangeRate) })] }, currency));
1828
1828
  };
1829
1829
 
1830
- const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className: `flex ${className}`, children: [jsx(ImgInner, { image: { icon: 'GpsIcon' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "ml-3", children: [address ? jsx("p", { className: "text-primary-main m-0 mb-1 text-l", children: address }) : null, jsx("p", { className: "text-secondary-text m-0 text-m", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
1830
+ const CurrentLocation$1 = JSX(({ className = '', address }) => (jsxs("div", { className: `flex ${className}`, children: [jsx(ImgInner, { image: { icon: 'GpsIcon' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "ml-3", children: [address ? jsx("p", { className: "text-primary-main m-0 mb-1 text-l", children: address }) : null, jsx("p", { className: "text-secondary-text m-0 text-m", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
1831
1831
 
1832
1832
  const roundTo = (value, precision = 2) => {
1833
1833
  const factor = 10 ** precision;
@@ -1975,7 +1975,7 @@
1975
1975
  };
1976
1976
 
1977
1977
  const EXCHANGE_RATES_URL = '/api/v1/exchangerates';
1978
- const REGION_URL = '/api/v1/region';
1978
+ const REGION_URL$1 = '/api/v1/region';
1979
1979
  function useFetchExchangeRateData() {
1980
1980
  const { data } = useAsyncData(EXCHANGE_RATES_URL, fetchData);
1981
1981
  return data || {};
@@ -1988,7 +1988,7 @@
1988
1988
  };
1989
1989
  const fetchRegion = async () => {
1990
1990
  try {
1991
- return await fetchJSONUnsafe(REGION_URL, { method: 'GET' });
1991
+ return await fetchJSONUnsafe(REGION_URL$1, { method: 'GET' });
1992
1992
  }
1993
1993
  catch (error) {
1994
1994
  console.log(error);
@@ -2014,7 +2014,7 @@
2014
2014
  currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
2015
2015
  const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
2016
2016
  currencyRatesSell.push({ currency: { currency: Currency.RUB } });
2017
- return (jsx(BlockWrapper, { className: `bg-white text-primary-text font-sans p-9 box-border min-h-80 ${className}`, ...rest, children: jsx(BaseTile, { title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap text-h4 mb-5" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-14 pt-4", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-[30px]", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
2017
+ return (jsx(BlockWrapper, { className: `bg-white text-primary-text font-sans p-9 box-border min-h-80 ${className}`, ...rest, children: jsx(BaseTile, { title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap text-h4 mb-5" }), children: jsxs("div", { className: "flex", children: [jsxs("div", { className: "mr-14 pt-4", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-[30px]", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation$1, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
2018
2018
  });
2019
2019
  const getCurrencyRates = (currencies) => {
2020
2020
  return currencies?.filter((_) => _?.currency?.id === 1 || _?.currency?.id === 2) || [];
@@ -2046,12 +2046,12 @@
2046
2046
  'bg-white': 'text-primary-text',
2047
2047
  transparent: 'text-white',
2048
2048
  };
2049
- const renderTitle$2 = (title, bgColor, className) => {
2049
+ const renderTitle$3 = (title, bgColor, className) => {
2050
2050
  return (jsx("span", { className: `${TEXT_COLOR[bgColor]} ml-2.5 font-medium ${className || ''}`, children: title || 'Россельхозбанк' }));
2051
2051
  };
2052
2052
 
2053
2053
  const Logo = JSX(({ className = '', href, logo, children = logo?.title, targetBlank, bgColor = 'bg-white', showTitle = true, }) => {
2054
- return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [renderImage$3(bgColor, logo?.image, { width: '40', height: '45' }), showTitle ? renderTitle$2(children || logo?.title, bgColor) : null] }));
2054
+ return (jsxs("a", { className: `inline-flex items-center font-sans no-underline ${className}`, href: href || '/', target: targetBlank ? '_blank' : '_self', "aria-label": logo?.title || 'Россельхозбанк', children: [renderImage$3(bgColor, logo?.image, { width: '40', height: '45' }), showTitle ? renderTitle$3(children || logo?.title, bgColor) : null] }));
2055
2055
  });
2056
2056
 
2057
2057
  const useSearch = () => {
@@ -2078,7 +2078,7 @@
2078
2078
  }, children: jsx("div", { className: "text-s px-9 py-2.5", children: "\u041D\u0430\u0439\u0442\u0438" }) }))] }));
2079
2079
  });
2080
2080
 
2081
- const SearchBar = JSX((props) => jsx(SearchBarInner, { ...props }));
2081
+ const SearchBar$1 = JSX((props) => jsx(SearchBarInner, { ...props }));
2082
2082
 
2083
2083
  const Contacts = JSX(({ className = '', items, hasButton }) => (jsxs("div", { className: className, children: [items?.length ? items.map(renderContact) : null, hasButton ? (jsx(Button, { version: "primary", className: "mb-6 w-full", href: "/", target: "_blank", ariaLabel: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C", text: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C" })) : null] })));
2084
2084
  const renderContact = (item, index) => {
@@ -2183,7 +2183,7 @@
2183
2183
  const Footer = JSX(({ className, ...rest }) => {
2184
2184
  const fallback = rest.options?.page?.fallback;
2185
2185
  const { documents, relatedEnterprises, contacts, socialMedia, mobileApps, topItems, logo } = useSWRResource(projectSettings.FOOTER || 'footer', fallback);
2186
- return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 bg-white font-sans ${className || ''}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD, logo: logo }), jsx(SearchBar, { className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, hasButton: true }), jsx(SocialMedia, { media: socialMedia, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]", items: topItems, fallback: fallback })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
2186
+ return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 bg-white font-sans ${className || ''}`, ...rest, children: [jsxs("div", { className: "flex items-stretch gap-[54px] pb-[30px] xl:gap-8", children: [jsx(Logo, { className: LEFT_COL_WIDTH_FULL_HD, logo: logo }), jsx(SearchBar$1, { className: "grow" })] }), jsxs("div", { className: "flex items-stretch gap-[54px] xl:gap-8", children: [jsxs("div", { className: `${LEFT_COL_WIDTH_FULL_HD} flex flex-col shrink-0 overflow-hidden`, children: [jsx(Contacts, { items: contacts, hasButton: true }), jsx(SocialMedia, { media: socialMedia, children: "\u0421\u043E\u0446\u0441\u0435\u0442\u0438" }), jsx(SocialMedia, { className: "mt-6", media: mobileApps, children: "\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u043E\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" })] }), jsx(Sitemap, { className: "pt-[3px]", items: topItems, fallback: fallback })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
2187
2187
  });
2188
2188
 
2189
2189
  const galleryLengthForScrollMap = {
@@ -2199,7 +2199,7 @@
2199
2199
  mini: 276,
2200
2200
  };
2201
2201
 
2202
- const GalleryCardInner = JSX(({ title, headlineSmallVersion = 'H6', description, additionalDescription, icon, items, button, version, isFullWidth = true, isDotted = true, align = 'center', }) => (jsxs("div", { className: `h-full flex flex-col justify-between ${AlignText[align]}`, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$2(icon, version), renderCardTitle(headlineSmallVersion, title), renderDescription$2(description, title), items?.length ? renderItems$1(items, isDotted, version) : null, renderAdditionalDescription$1(additionalDescription, version)] }), button?.text
2202
+ const GalleryCardInner = JSX(({ title, headlineSmallVersion = 'H6', description, additionalDescription, icon, items, button, version, isFullWidth = true, isDotted = true, align = 'center', }) => (jsxs("div", { className: `h-full flex flex-col justify-between ${AlignText[align]}`, children: [jsxs("div", { className: "flex flex-col h-full", children: [renderImage$2(icon, version), renderCardTitle(headlineSmallVersion, title), renderDescription$3(description, title), items?.length ? renderItems$1(items, isDotted, version) : null, renderAdditionalDescription$1(additionalDescription, version)] }), button?.text
2203
2203
  ? renderButton({
2204
2204
  button,
2205
2205
  buttonClassName: `mt-6 ${isFullWidth ? '' : 'self-center'}`,
@@ -2207,7 +2207,7 @@
2207
2207
  : null] })));
2208
2208
  const renderImage$2 = (image, version) => (jsxs("div", { className: "flex justify-center", children: [image?.src ? jsx(ImgInner, { className: "mb-5", image: image }) : null, image?.icon ? (jsx(ImgInner, { className: `w-8 h-8 min-w-8 mb-5 rounded-full`, image: getIconWithVersion(image, version), asSVG: true })) : null] }));
2209
2209
  const renderCardTitle = (headlineSmallVersion, title) => title ? jsx("div", { className: HEADLINE_SMALL_VERSION[headlineSmallVersion], children: title }) : null;
2210
- const renderDescription$2 = (description, title) => description ? jsx("div", { className: `text-l ${title ? 'mt-2' : ''}`, children: description }) : null;
2210
+ const renderDescription$3 = (description, title) => description ? jsx("div", { className: `text-l ${title ? 'mt-2' : ''}`, children: description }) : null;
2211
2211
  const renderAdditionalDescription$1 = (additionalDescription, version) => additionalDescription ? (jsx("div", { className: `text-m-light mt-auto ${VersionAdditionalStyleMap[version ?? 'primary']}`, children: additionalDescription })) : null;
2212
2212
  const renderItems$1 = (items, isDotted, version = 'primary') => (jsx(List, { className: `max-w-[308px] mt-2 text-s ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "text-left", items: items.filter((item) => item?.text).map((item) => item.text), isDotted: isDotted, version: version }));
2213
2213
 
@@ -2282,22 +2282,99 @@
2282
2282
  return `${active ? 'text-primary-main' : nonActiveAtoms} ${TEXT_CLASSES$2}`;
2283
2283
  };
2284
2284
 
2285
- const DaData = DaDataAPI('https://10.80.4.9');
2286
- function useGeolocation(defaultLocation) {
2287
- const [city, setCity] = useState(defaultLocation);
2285
+ const STORAGE_DEFAULT_TTL = 86400000; // 24 * 60 * 60 * 1000
2286
+ function useCachedAsyncData(key, fetcher, storage = globalThis?.localStorage) {
2287
+ const cachedFetcher = useCallback(async (...args) => {
2288
+ const storageKey = `async:${key}`;
2289
+ const storageData = storage.getItem(storageKey);
2290
+ const cachedData = getParsedData(storageData);
2291
+ if (cachedData) {
2292
+ return cachedData;
2293
+ }
2294
+ const data = await fetcher(...args);
2295
+ storage.setItem(storageKey, JSON.stringify({ data, timestamp: Date.now() }));
2296
+ return data;
2297
+ }, [key, fetcher]);
2298
+ return useAsyncData(key, cachedFetcher);
2299
+ }
2300
+ function getParsedData(storageData) {
2301
+ const { data = null, timestamp = null } = storageData ? JSON.parse(storageData) : {};
2302
+ return data && Date.now() - timestamp < STORAGE_DEFAULT_TTL ? data : undefined;
2303
+ }
2304
+
2305
+ const REGION_URL = '/api/v1/region';
2306
+ const localStorageLocation = globalThis?.localStorage.getItem('location');
2307
+ const currentLocation = localStorageLocation
2308
+ ? JSON.parse(localStorageLocation)
2309
+ : null;
2310
+ function useLocation(defaultLocation) {
2311
+ const [location, setLocation] = useState(currentLocation?.region ?? { name: defaultLocation });
2312
+ const { data } = useCachedAsyncData(REGION_URL, fetchJSONUnsafe);
2288
2313
  useEffect(() => {
2289
- setCity(globalThis?.localStorage.getItem('location') || defaultLocation);
2290
- }, [defaultLocation]);
2291
- const getCity = useCallback(() => {
2292
- DaData.getFetcherAddress().then((_) => {
2293
- const location = _ || defaultLocation;
2294
- globalThis?.localStorage.setItem('location', location);
2295
- setCity(location);
2296
- });
2297
- }, [defaultLocation]);
2298
- return [city, getCity];
2314
+ setLocation(currentLocation?.region && currentLocation?.manual
2315
+ ? currentLocation.region
2316
+ : data || { name: defaultLocation });
2317
+ }, [data]);
2318
+ const onChangeLocation = useCallback((region) => {
2319
+ globalThis?.localStorage.setItem('location', JSON.stringify({ manual: true, region }));
2320
+ setLocation(region);
2321
+ }, [setLocation]);
2322
+ return [location, onChangeLocation];
2299
2323
  }
2300
2324
 
2325
+ const REGIONS_URL$1 = '/api/v1/regions';
2326
+ function useRegions() {
2327
+ const { data } = useAsyncData(REGIONS_URL$1, fetchJSONUnsafe);
2328
+ return data || [];
2329
+ }
2330
+
2331
+ const groupBy = (list, keyGetter) => {
2332
+ const map = new Map();
2333
+ list.forEach((item) => {
2334
+ const key = keyGetter(item);
2335
+ const collection = map.get(key);
2336
+ map.set(key, [...(collection || []), item]);
2337
+ });
2338
+ return map;
2339
+ };
2340
+
2341
+ const SearchBar = JSX(({ className, searchTerm, onSearch }) => {
2342
+ return (jsxs("form", { className: `font-sans relative ${className}`, children: [jsx("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: searchTerm ? null : (jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text `, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0444\u0438\u043B\u0438\u0430\u043B\u0430\u043C" })) }), jsx("input", { id: "search-bar-input", className: `h-12 pl-4 w-full peer text-l text-black border border-solid rounded-md box-border
2343
+ outline-none border-main-stroke hover:border-primary-hover active:border-primary-text focus:border-primary-text`, value: searchTerm, onChange: (e) => onSearch(e.target.value), type: "text", name: "location-search-bar-input" })] }));
2344
+ });
2345
+
2346
+ const SEARCH_TERM_MIN_LENGTH = 3;
2347
+ const Location = JSX(({ currentLocation, onChangeLocation, close, foreignOffices }) => {
2348
+ const { term, setTerm } = useSearch();
2349
+ const handleSearch = useCallback((_) => setTerm(_), []);
2350
+ const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
2351
+ const regionsGroupByLetter = groupBy(regions, regionFirstLetter);
2352
+ return (jsxs("div", { className: "absolute h-full w-full inset-0 bg-white text-l-light z-50", children: [jsx(CloseButton, { close: close }), jsxs("div", { className: "container py-12", children: [jsx(CurrentLocation, { currentLocation: currentLocation }), jsx(SearchBar, { onSearch: handleSearch, searchTerm: term, className: "mb-7" }), term && term.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
2353
+ .filter((region) => region.name?.startsWith(term))
2354
+ .map(renderRegion({ onChangeLocation, close })) })) : (jsx("div", { className: "columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup({ onChangeLocation, close })) })), jsx(ForeignOffices, { foreignOffices: foreignOffices })] })] }));
2355
+ });
2356
+ const regionFirstLetter = (region) => region.name?.charAt(0) || '';
2357
+ const cleanUpRegions = (regions) => regions.map((region) => ({
2358
+ ...region,
2359
+ name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
2360
+ }));
2361
+ const CurrentLocation = JSX(({ currentLocation }) => currentLocation ? (jsxs("div", { className: "mb-4", children: [jsx(Text, { size: "text-l", font: "font-light", children: "\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044B\u0431\u0440\u0430\u043D:\u00A0" }), jsx("button", { className: "cursor-pointer", onClick: close, children: jsx(Text, { color: "text-green", children: currentLocation.name }) })] })) : null);
2362
+ const CloseButton = JSX(({ close }) => (jsx("button", { className: "visible peer-placeholder-shown:invisible absolute top-6 right-6 w-6 h-6 p-1 bg-transparent cursor-pointer border-none", onClick: (e) => {
2363
+ e.preventDefault();
2364
+ close && close();
2365
+ }, children: jsx(ImgInner, { image: "CloseIcon", width: "24", height: "24" }) })));
2366
+ const renderRegionGroup = ({ onChangeLocation, close }) => ([letter, regions]) => (jsxs("div", { className: "break-inside-avoid mb-7 w-[224px]", children: [jsx("div", { className: "mb-2.5", children: jsx(Text, { size: "text-h6", children: letter }) }), regions.map(renderRegion({ onChangeLocation, close }))] }, letter));
2367
+ const renderRegion = ({ onChangeLocation, close }) => (region) => (jsx("div", { className: "mb-1", children: jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
2368
+ onChangeLocation && onChangeLocation(region);
2369
+ close && close();
2370
+ }, children: region.name }) }, region.id));
2371
+ const ForeignOffices = JSX(({ foreignOffices }) => foreignOffices?.length ? (jsxs("div", { className: "border-t border-main-divider mt-7 pt-7", children: [jsx("div", { className: "mb-4", children: jsx(Text, { size: "text-m-light", color: "text-secondary-text", children: "\u041F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430 \u0437\u0430 \u0440\u0443\u0431\u0435\u0436\u043E\u043C:" }) }), jsx("div", { className: "flex gap-10", children: foreignOffices.map((office, i) => (jsx(ForeignOffice, { ...office }, String(i)))) })] })) : null);
2372
+ const ForeignOffice = JSX(({ icon, ...rest }) => {
2373
+ const link = useLink();
2374
+ const { text, target, href, onClick } = link(rest);
2375
+ return (jsxs("div", { className: "flex gap-x-3", children: [jsx(ImgInner, { image: icon }), jsx("a", { className: "hover:text-primary-hover", href: href, target: target, onClick: onClick, children: text })] }));
2376
+ });
2377
+
2301
2378
  const HeaderSecondaryMenuButton = JSX(({ className = '', children, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 p-0 w-6 h-6 flex items-center bg-inherit cursor-pointer ${className}`, disabled: true, "aria-label": ariaLabel, children: children })));
2302
2379
 
2303
2380
  const COLORS_MAP = {
@@ -2312,9 +2389,16 @@
2312
2389
  'bg-white': 'black',
2313
2390
  transparent: 'white',
2314
2391
  };
2315
- const HeaderSecondaryMenu = JSX(({ className, officesLink, defaultLocation = 'Москва', bgColor = 'bg-white' }) => {
2316
- const [city, getCity] = useGeolocation(defaultLocation);
2317
- return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: city, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: getCity, bgColor: bgColor }), officesLink ? (jsx(TopItem, { className: "mr-7", flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor })) : null, jsx(HeaderSecondaryMenuButton, { className: `mr-5 group ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(ImgInner, { image: { icon: 'LoupeIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0 pointer-events-none", asSVG: true }) }), jsx(HeaderSecondaryMenuButton, { className: `${LINKS_COLORS_MAP[bgColor]} group min-w-8 min-h-8`, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: jsx(ImgInner, { image: { icon: 'GridIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full bg-main-divider/20 rounded-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0", asSVG: true }) })] }));
2392
+ const HeaderSecondaryMenu = JSX(({ className, officesLink, defaultLocation = 'Москва', foreignOffices, bgColor = 'bg-white', }) => {
2393
+ const [isShowLocationModal, setShowLocationModal] = useState(false);
2394
+ const [location, onChangeLocation] = useLocation(defaultLocation);
2395
+ const showLocationModal = () => {
2396
+ setShowLocationModal(true);
2397
+ };
2398
+ const hideLocationModal = () => {
2399
+ setShowLocationModal(false);
2400
+ };
2401
+ return (jsxs("div", { className: `flex items-center ${className || ''}`, children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: location.name, ariaLabel: "\u041C\u0435\u0441\u0442\u043E\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", onClick: showLocationModal, bgColor: bgColor }), officesLink ? (jsx(TopItem, { className: "mr-7", flat: true, href: officesLink, text: "\u041E\u0444\u0438\u0441\u044B \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u044B", ariaLabel: "\u0421\u043F\u0438\u0441\u043E\u043A \u0432\u0441\u0435\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043E\u0444\u0438\u0441\u043E\u0432 \u0438 \u0431\u0430\u043D\u043A\u043E\u043C\u0430\u0442\u043E\u0432", bgColor: bgColor })) : null, jsx(HeaderSecondaryMenuButton, { className: `mr-5 group ${COLORS_MAP[bgColor]}`, ariaLabel: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", children: jsx(ImgInner, { image: { icon: 'LoupeIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0 pointer-events-none", asSVG: true }) }), jsx(HeaderSecondaryMenuButton, { className: `${LINKS_COLORS_MAP[bgColor]} group min-w-8 min-h-8`, ariaLabel: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0441\u044B\u043B\u043A\u0438", children: jsx(ImgInner, { image: { icon: 'GridIcon', iconVersion: LINKS_ICON_VERSION_MAP[bgColor] }, className: "h-full bg-main-divider/20 rounded-full pointer-events-none", imageClassName: "group-hover:text-primary-hover group-hover:invert-0", asSVG: true }) }), isShowLocationModal ? (jsx(Location, { currentLocation: location, foreignOffices: foreignOffices, onChangeLocation: onChangeLocation, close: hideLocationModal })) : null] }));
2318
2402
  });
2319
2403
 
2320
2404
  const findActiveSubItem = (router) => (items = []) => {
@@ -2395,10 +2479,10 @@
2395
2479
  };
2396
2480
  const Header = JSX(({ bgColor = 'bg-white', className = '', showSubMenu = true, ...rest }) => {
2397
2481
  const router = useRouter();
2398
- const { topItems, logo, defaultLocation, officesLink } = useSWRResource(projectSettings.SITEMAP || 'sitemap', rest.options?.page?.fallback);
2482
+ const { topItems, logo, defaultLocation, foreignOffices, officesLink } = useSWRResource(projectSettings.SITEMAP || 'sitemap', rest.options?.page?.fallback);
2399
2483
  const activeTopItem = showSubMenu ? getActiveItem(topItems, router) : null;
2400
2484
  const topMenu = topItems?.map((_, i) => (jsx(TopItem, { active: _ === activeTopItem, "aria-label": _.text, bgColor: bgColor, ..._ }, String(i))));
2401
- return (jsx(BlockWrapper, { tag: "header", className: `pt-6 px-20 ${bgColor} ${className} ${showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5'}`, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, jsx(HeaderSecondaryMenu, { className: "ml-auto", defaultLocation: defaultLocation, officesLink: officesLink, bgColor: bgColor })] }), jsx("div", { className: `mt-6 h-px ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
2485
+ return (jsx(BlockWrapper, { tag: "header", className: `pt-6 px-20 ${bgColor} ${className} ${showSubMenu && activeTopItem?.items?.length ? 'pb-4' : 'pb-5'}`, ...rest, children: jsxs("div", { className: "container", children: [jsxs("div", { className: "flex items-center", children: [jsx(Logo, { className: "mr-8", bgColor: bgColor, logo: logo }), topMenu, jsx(HeaderSecondaryMenu, { className: "ml-auto", foreignOffices: foreignOffices, defaultLocation: defaultLocation, officesLink: officesLink, bgColor: bgColor })] }), jsx("div", { className: `mt-6 h-px ${BORDER_COLORS[bgColor]}` }), showSubMenu && activeTopItem?.items?.length ? (jsx(HeaderSubMenu, { subItems: activeTopItem.items, bgColor: bgColor })) : null] }) }));
2402
2486
  });
2403
2487
  const getActiveItem = (topItems, router) => {
2404
2488
  const [firstPortal] = topItems || [];
@@ -2587,12 +2671,12 @@
2587
2671
  ${getTileMinHeight(className)}
2588
2672
  ${VersionStyleMap[version]}
2589
2673
  ${className}`, ...rest, children: [jsxs(BaseTile, { className: "z-10", title: title ? (jsx(Heading, { headingType: headingType, as: "h3", title: title, className: `whitespace-pre-wrap mb-7 w-full
2590
- ${textColorClass} ${AlignText[alignTitle]}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { buttons: buttonsWithClass, className: "flex gap-4 mt-8", ...rest })) : null, children: [renderDescription$1(description), jsxs("div", { className: "flex flex-1 items-center mb-3", children: [qr?.src ? (jsx("div", { className: `flex justify-center mr-5 bg-white rounded-md ${containerStyle}`, children: jsx(ImgInner, { className: "w-fit", image: qr }) })) : null, renderList$1(version, items)] })] }), image?.src ? (jsx("div", { className: "absolute right-0 bottom-0", children: jsx(ImgInner, { image: image }) })) : null] }));
2674
+ ${textColorClass} ${AlignText[alignTitle]}` })) : null, buttons: buttons?.length ? (jsx(ButtonSection, { buttons: buttonsWithClass, className: "flex gap-4 mt-8", ...rest })) : null, children: [renderDescription$2(description), jsxs("div", { className: "flex flex-1 items-center mb-3", children: [qr?.src ? (jsx("div", { className: `flex justify-center mr-5 bg-white rounded-md ${containerStyle}`, children: jsx(ImgInner, { className: "w-fit", image: qr }) })) : null, renderList$1(version, items)] })] }), image?.src ? (jsx("div", { className: "absolute right-0 bottom-0", children: jsx(ImgInner, { image: image }) })) : null] }));
2591
2675
  });
2592
2676
  const renderList$1 = (version, items) => {
2593
2677
  return items?.length ? (jsx(List, { items: items, itemClassName: "text-l-light mb-2 last:mb-0", version: version })) : (jsx("span", { className: "text-m-light text-secondary-text", children: "\u041D\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u0430\u043C\u0435\u0440\u0443 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430 \u043D\u0430 QR-\u043A\u043E\u0434 \u0438 \u0441\u043A\u0430\u0447\u0430\u0439\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435" }));
2594
2678
  };
2595
- const renderDescription$1 = (description) => description ? jsx("p", { className: "text-xl-light mb-5 pt-0.5", children: description }) : null;
2679
+ const renderDescription$2 = (description) => description ? jsx("p", { className: "text-xl-light mb-5 pt-0.5", children: description }) : null;
2596
2680
 
2597
2681
  function renderClusterer(yandexMaps, map, points) {
2598
2682
  map.geoObjects.removeAll();
@@ -3191,26 +3275,53 @@
3191
3275
  `, children: jsxs("div", { className: "border-0 px-6", children: [jsx("div", { className: `last:pb-0 ${btnTitleClassName}`, children: slide?.title }), jsx("div", { className: `text-secondary-text ${btnDescClassName}`, children: slide?.description })] }) }, String(i)));
3192
3276
  }
3193
3277
 
3194
- const ProductTile = JSX(({ className = '', title, headlineVersion = 'S', description, additionalDescription, benefits = [], buttons, image, isImageOnRightSide = true, version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: `overflow-hidden font-sans p-9 box-border relative min-h-[364px]
3195
- ${VersionStyleMap[version]} ${getTileRightPadding(className)} ${className}`, ...rest, children: [jsxs("div", { className: `flex flex-col ${isImageOnRightSide ? '' : 'items-end'}`, children: [jsx(Headline, { className: `!p-0 !bg-transparent z-10 ${title || description ? 'mb-3.5' : ''}`, as: "h2", title: title, description: description, headlineVersion: headlineVersion, bgColorHeadline: version, align: "left", ...rest }), renderBenefits(benefits, version, image), additionalDescription ? renderAdditionalDescription(additionalDescription, image) : null, buttons?.length ? (jsx(ButtonSection, { buttons: buttons, className: "mt-5 gap-4 z-10 text-l" })) : null] }), renderImage$1(image, isImageOnRightSide)] })));
3196
- function renderBenefits(benefits, version, image) {
3197
- // picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
3198
- const BENEFITS_WIDTH = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
3199
- return (jsx("div", { className: `z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline
3200
- ${BENEFITS_WIDTH}`, children: benefits.length ? benefits.map(renderBenefit(version)) : null }));
3201
- }
3202
- const renderBenefit = (version = 'primary') => (benefit, i) => {
3203
- const { label = '', description = '' } = benefit;
3204
- return [
3205
- jsx("div", { className: "text-h6", children: label }, `label-${i}`),
3206
- jsx("div", { className: `text-m-light ${VersionAdditionalStyleMap[version]}`, children: description }, `desc-${i}`),
3207
- ];
3278
+ const DESCRIPTION_STYLE_MAP = {
3279
+ primary: 'text-secondary-text',
3280
+ secondary: 'text-white',
3208
3281
  };
3209
- function renderAdditionalDescription(additionalDescription, image) {
3282
+ function renderAdditionalDescription(additionalDescription, image, version = 'primary') {
3283
+ if (!additionalDescription) {
3284
+ return null;
3285
+ }
3210
3286
  // picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
3211
- const DESCRIPTION_WIDTH = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
3212
- return (jsx("div", { className: `text-m-light mt-2.5 z-10 ${DESCRIPTION_WIDTH}`, children: additionalDescription }));
3287
+ const descriptionWidth = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
3288
+ return (jsx("div", { className: `mt-2.5 z-10 ${descriptionWidth}`, children: jsx(Paragraph, { size: "text-m", font: "font-light", color: DESCRIPTION_STYLE_MAP[version], children: additionalDescription }) }));
3213
3289
  }
3290
+
3291
+ const MarkdownText = JSX((props) => {
3292
+ const { md = '' } = props;
3293
+ return jsx("div", { className: "md-container", dangerouslySetInnerHTML: { __html: md } });
3294
+ });
3295
+
3296
+ function assertUnreachable(x) {
3297
+ throw new Error(x);
3298
+ }
3299
+
3300
+ const LABEL_STYLE_MAP = {
3301
+ primary: 'text-secondary-text',
3302
+ secondary: 'text-white',
3303
+ };
3304
+ const renderBenefit = (version = 'primary') =>
3305
+ // Linter doesn't understand that switch processes all cases
3306
+ // eslint-disable-next-line consistent-return
3307
+ (benefit, i) => {
3308
+ const { type } = benefit;
3309
+ if (!(type === 'default' || type === 'md')) {
3310
+ return null;
3311
+ }
3312
+ switch (type) {
3313
+ case 'default':
3314
+ return [
3315
+ jsx(Text, { size: "text-h6", children: benefit.label }, `label-${i}`),
3316
+ jsx(Text, { size: "text-m-light", color: LABEL_STYLE_MAP[version], children: benefit.description }, `desc-${i}`),
3317
+ ];
3318
+ case 'md':
3319
+ return jsx(MarkdownText, { md: benefit.md });
3320
+ default:
3321
+ assertUnreachable(benefit);
3322
+ }
3323
+ };
3324
+
3214
3325
  function renderImage$1(image, isImageOnRightSide) {
3215
3326
  if (!image?.src) {
3216
3327
  return null;
@@ -3218,6 +3329,18 @@
3218
3329
  return (jsx(ImgInner, { className: `absolute ${isImageOnRightSide ? 'right-0' : 'left-0'} bottom-0`, image: image }));
3219
3330
  }
3220
3331
 
3332
+ const ProductTile = JSX(({ className = '', title, headlineVersion = 'S', description, additionalDescription, benefits = [], buttons, image, isImageOnRightSide = true, version = 'primary', ...rest }) => (jsxs(BlockWrapper, { className: `overflow-hidden font-sans p-9 box-border relative min-h-[364px]
3333
+ ${VersionStyleMap[version]} ${getTileRightPadding(className)} ${className}`, ...rest, children: [jsxs("div", { className: `flex flex-col ${isImageOnRightSide ? '' : 'items-end'}`, children: [jsx(Headline, { className: `!p-0 !bg-transparent z-10 ${title || description ? 'mb-3.5' : ''}`, as: "h2", title: title, description: description, headlineVersion: headlineVersion, bgColorHeadline: version, align: "left", ...rest }), renderBenefits(benefits, version, image), renderAdditionalDescription(additionalDescription, image), buttons?.length ? (jsx(ButtonSection, { buttons: buttons, className: "mt-5 gap-4 z-10 text-l" })) : null] }), renderImage$1(image, isImageOnRightSide)] })));
3334
+ function renderBenefits(benefits, version, image) {
3335
+ if (!benefits.length) {
3336
+ return null;
3337
+ }
3338
+ // picture width = 242px. Text can overlay picture 20px deep. Outer paddings_x = 36px. 242-36-20 = 186px
3339
+ const benefitsWidth = image?.src ? 'max-w-[calc(100%-186px)]' : '100%';
3340
+ return (jsx("div", { className: `z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline
3341
+ ${benefitsWidth}`, children: benefits.length ? benefits.map(renderBenefit(version)) : null }));
3342
+ }
3343
+
3221
3344
  const PromoTile = JSX(({ className = '', title = 'Акции и спецпредложения', date, description, buttons = [], version = 'primary', ...rest }) => (jsx(BlockWrapper, { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${VersionStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: jsx(BaseTile, { title: title ? (jsx(Headline, { title: title, className: `!p-0 max-w-[600px]`, headlineVersion: getTileHeadingType(className), bgColorHeadline: version, align: "left", as: "h2", ...rest })) : null, buttons: buttons?.length ? jsx(ButtonSection, { buttons: buttons, className: "flex gap-3" }) : null, children: jsxs("div", { className: "mt-1.5", children: [date ? jsx("div", { className: "text-s mb-2", children: formatDate(date) }) : null, jsx("div", { className: "text-l", children: description })] }) }) })));
3222
3345
  function formatDate(date) {
3223
3346
  const dateObj = new Date(date);
@@ -3229,10 +3352,19 @@
3229
3352
  return dateObj.toLocaleString('ru-RU', dateFormat).replace('г.', '');
3230
3353
  }
3231
3354
 
3355
+ const CarouselRecommendationCard = JSX(({ button, className = '', description, image, items = [], socialMedia = [], title, version = 'primary', ...rest }) => {
3356
+ const tileTitle = title ? (jsx(Heading, { headingType: "h5", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
3357
+ const tileImage = image?.src ? (jsx(ImgInner, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
3358
+ return (jsx(BlockWrapper, { className: `relative text-left border border-solid box-border p-7 min-w-[524px]
3359
+ ${BorderVersionStyleMap[version]}
3360
+ ${VersionStyleMap[version]}
3361
+ ${className}`, ...rest, children: jsx(BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: jsxs("div", { className: "h-full flex flex-col justify-between", children: [description ? jsx("span", { className: "mb-2", children: description }) : null, items.length ? (jsx(List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items, version: version })) : null, socialMedia.length ? (jsx(SocialMedia, { className: "pt-10 pb-0", media: socialMedia, version: version })) : null, button?.text ? jsx("div", { className: "pt-2 mt-16", children: renderButton({ button }) }) : null] }) }) }));
3362
+ });
3363
+
3232
3364
  const RecommendationCard = JSX(({ className = '', title, description, items, image, version, socialMedia, button }) => {
3233
3365
  const tileTitle = title ? (jsx(Heading, { headingType: "h5", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
3234
3366
  const tileImage = image?.src ? (jsx(ImgInner, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
3235
- return (jsx("section", { className: `relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${className}`, role: "listitem", children: jsx(BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: jsxs("div", { className: "h-full flex flex-col justify-between", children: [description ? jsx("span", { className: "mb-2", children: description }) : null, items?.length ? (jsx(List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items, version: version })) : null, socialMedia ? (jsx(SocialMedia, { className: "pt-10 pb-0", media: socialMedia, version: version })) : null, button?.text ? (jsx("div", { className: "pt-2", children: renderButton({ button, buttonClassName: 'mt-16' }) })) : null] }) }) }));
3367
+ return (jsx("section", { className: `relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${className}`, role: "listitem", children: jsx(BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: jsxs("div", { className: "h-full flex flex-col justify-between", children: [description ? jsx("span", { className: "mb-2", children: description }) : null, items?.length ? (jsx(List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items, version: version })) : null, socialMedia ? (jsx(SocialMedia, { className: "pt-10 pb-0", media: socialMedia, version: version })) : null, button?.text ? (jsx("div", { className: "pt-2", children: renderButton({ button, buttonClassName: 'mt-16 px-5' }) })) : null] }) }) }));
3236
3368
  });
3237
3369
 
3238
3370
  const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
@@ -3467,10 +3599,6 @@
3467
3599
  const renderStepIcon = (styleMap, version) => ({ icon }, i) => (jsx("div", { className: "flex flex-col items-center text-center", children: jsx("div", { className: `h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center
3468
3600
  ${styleMap.iconBackground} ${styleMap.title}`, children: checkIsIconRenderable(icon) ? (jsx(ImgInner, { image: getIconWithVersion(icon || {}, version), width: "48", height: "48", asSVG: true })) : (jsx("span", { className: `text-h4 ${styleMap.iconText}`, children: i + 1 })) }) }, String(i)));
3469
3601
 
3470
- function assertUnreachable(x) {
3471
- throw new Error(x);
3472
- }
3473
-
3474
3602
  const LINK_CLASSES = 'h-12 flex-1 flex items-center justify-center cursor-pointer';
3475
3603
  const ACTIVE_LINK_CLASSES = 'bg-primary-main';
3476
3604
  const INACTIVE_LINK_CLASSES = 'group bg-white';
@@ -3494,9 +3622,9 @@
3494
3622
  const count = tab.ref && page?.blocks
3495
3623
  ? page.blocks.filter((block) => block?.labels?.includes(tab.ref)).length
3496
3624
  : 0;
3497
- return (jsx("div", { className: `${LINK_CLASSES} ${active ? ACTIVE_LINK_CLASSES : INACTIVE_LINK_CLASSES}`, role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? renderTitle$1(tab.title, active) : null, showCounter && count ? renderCount(count, active) : null] }) }, String(i)));
3625
+ return (jsx("div", { className: `${LINK_CLASSES} ${active ? ACTIVE_LINK_CLASSES : INACTIVE_LINK_CLASSES}`, role: "tab", "aria-selected": active, onClick: () => onClick(tab), children: jsxs("div", { className: "flex flex-1 items-center justify-center", children: [tab?.title ? renderTitle$2(tab.title, active) : null, showCounter && count ? renderCount(count, active) : null] }) }, String(i)));
3498
3626
  };
3499
- const renderTitle$1 = (title, active) => (jsx("h3", { className: `${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`, children: title }));
3627
+ const renderTitle$2 = (title, active) => (jsx("h3", { className: `${TEXT_CLASSES} ${active ? ACTIVE_TEXT_CLASSES : INACTIVE_TEXT_CLASSES}`, children: title }));
3500
3628
  const renderCount = (count, active) => (jsx("div", { className: `${BADGE_CLASSES} ${active ? ACTIVE_BADGE_CLASSES : INACTIVE_BADGE_CLASSES}`, children: count }));
3501
3629
 
3502
3630
  const renderTab = ({ page, currentTab, showCounter, onClick }) =>
@@ -3705,12 +3833,12 @@
3705
3833
  });
3706
3834
  const rows = (rowData || []).map((row, i) => (jsx(TariffsTableRow, { row: row, activeIndex: activeIndex, rowIdx: i, ...rest }, String(i))));
3707
3835
  const [visibleRows, hiddenRows] = hiddenRowsNum > 0 ? [rows.slice(0, -hiddenRowsNum), rows.slice(-hiddenRowsNum)] : [rows, []];
3708
- return (jsxs(BlockWrapper, { className: `bg-white font-sans p-12 overflow-hidden text-primary-text relative ${itemCount > 1 ? 'pr-0' : ''} ${className}`, ...rest, children: [renderTitle({ title, description }), renderDescription(description), hiddenRowsNum > 0 ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs(Wrapper, { controls: controls, children: [visibleRows, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] })), renderFoldButton: renderDefaultFoldButton })) : (jsx(Wrapper, { controls: controls, children: rows }))] }));
3836
+ return (jsxs(BlockWrapper, { className: `bg-white font-sans p-12 overflow-hidden text-primary-text relative ${itemCount > 1 ? 'pr-0' : ''} ${className}`, ...rest, children: [renderTitle$1({ title, description }), renderDescription$1(description), hiddenRowsNum > 0 ? (jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (jsxs(Wrapper, { controls: controls, children: [visibleRows, jsx(FoldableSection, { isUnfolded: isUnfolded, children: hiddenRows })] })), renderFoldButton: renderDefaultFoldButton })) : (jsx(Wrapper, { controls: controls, children: rows }))] }));
3709
3837
  });
3710
- function renderTitle({ title, description }) {
3838
+ function renderTitle$1({ title, description }) {
3711
3839
  return title ? (jsx(Heading, { headingType: "h3", className: `text-center ${description ? 'mb-2.5' : 'mb-8'}`, title: title })) : null;
3712
3840
  }
3713
- function renderDescription(description) {
3841
+ function renderDescription$1(description) {
3714
3842
  return description ? jsx("div", { className: "mb-9 text-center text-l", children: description }) : null;
3715
3843
  }
3716
3844
  const Wrapper = JSX(({ children, controls }) => {
@@ -3722,36 +3850,19 @@
3722
3850
  })] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
3723
3851
  });
3724
3852
 
3725
- const textBlockStyleMaps = {
3726
- primary: {
3727
- background: 'bg-white',
3728
- icon: 'bg-primary-main text-white',
3729
- title: 'text-primary-text',
3730
- description: 'text-secondary-text',
3731
- },
3732
- secondary: {
3733
- background: 'bg-primary-main',
3734
- icon: 'bg-white text-primary-main',
3735
- title: 'text-white',
3736
- description: 'text-white',
3737
- },
3738
- 'secondary-light': {
3739
- background: 'bg-primary-main/10',
3740
- icon: 'bg-primary-main text-white',
3741
- title: 'text-primary-text',
3742
- description: 'text-secondary-text',
3743
- },
3853
+ const textBlockBack = {
3854
+ primary: 'bg-white',
3855
+ secondary: 'bg-primary-main',
3856
+ 'secondary-light': 'bg-primary-main/10',
3744
3857
  };
3745
- const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className, ...rest }) => {
3746
- const textBlockStyleMap = textBlockStyleMaps[blockVersion];
3747
- return (jsxs(BlockWrapper, { className: `font-sans px-9 py-4 flex ${textBlockStyleMap.background} ${className || ''}`, ...rest, children: [iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "py-0.5", children: [title ? (jsx("div", { className: `text-l font-medium mb-1 ${textBlockStyleMap.title}`, children: title })) : null, description ? (jsx("div", { className: `text-s ${textBlockStyleMap.description}`, children: description })) : null] })] }));
3858
+ const TextBlock = JSX(({ className = '', title, description, blockVersion = 'primary', iconVersion, image, ...rest }) => {
3859
+ const isSecondaryBlock = blockVersion === 'secondary';
3860
+ return (jsxs(BlockWrapper, { className: `px-9 py-4 flex gap-3 ${textBlockBack[blockVersion]} ${className}`, ...rest, children: [iconVersion === 'small' ? (jsx("div", { className: "mt-1", children: renderIcon(isSecondaryBlock) })) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { children: [title ? renderTitle(title, isSecondaryBlock) : null, description ? (jsx("div", { className: "mt-1", children: renderDescription(description, isSecondaryBlock) })) : null] })] }));
3748
3861
  });
3749
- function renderIcon(className) {
3750
- return (jsx("div", { className: "pt-1.5 pl-1 pr-4", children: jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs-light ${className}`, children: "i" }) }));
3751
- }
3752
- function renderImage(image) {
3753
- return image?.src ? jsx(ImgInner, { className: "pt-0.5 pr-3", image: image }) : null;
3754
- }
3862
+ const renderIcon = (isSecondaryBlock) => (jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs-light ${isSecondaryBlock ? 'bg-white text-primary-main' : 'bg-primary-main text-white'}`, children: "i" }));
3863
+ const renderImage = (image) => (image?.src ? jsx(ImgInner, { image: image }) : null);
3864
+ const renderTitle = (title, isSecondaryBlock) => (jsx(Text, { size: "text-l", font: "font-medium", color: isSecondaryBlock ? 'text-white' : 'text-primary-text', children: title }));
3865
+ const renderDescription = (description, isSecondaryBlock) => (jsx(Paragraph, { size: "text-s", color: isSecondaryBlock ? 'text-white' : 'text-secondary-text', children: description }));
3755
3866
 
3756
3867
  const Tags = JSX((props) => {
3757
3868
  const { tags, className = '' } = props;
@@ -3854,11 +3965,10 @@
3854
3965
  ProductGallery,
3855
3966
  ProductTile,
3856
3967
  PromoTile,
3857
- OfficeMap,
3858
3968
  OfficeServicesBlock,
3859
3969
  OtherProducts,
3860
3970
  OtherProductsItem,
3861
- Recommendation,
3971
+ CarouselRecommendationCard,
3862
3972
  RollupItem,
3863
3973
  SafeDepositRental,
3864
3974
  StepsBlock,
@@ -3868,6 +3978,8 @@
3868
3978
  Tile,
3869
3979
  VerticalLayout,
3870
3980
  Video,
3981
+ Recommendation,
3982
+ OfficeMap,
3871
3983
  };
3872
3984
 
3873
3985
  const debounce = (fn, delay = 600) => {
@@ -3995,7 +4107,7 @@
3995
4107
  return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
3996
4108
  }
3997
4109
 
3998
- const packageVersion = "0.6.41";
4110
+ const packageVersion = "0.6.43";
3999
4111
 
4000
4112
  exports.Blocks = Blocks;
4001
4113
  exports.ContentPage = ContentPage;