@redneckz/wildless-cms-uni-blocks 0.8.28 → 0.8.30

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 (484) hide show
  1. package/bin/migration-scripts/0.8.29.js +41 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +127 -97
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
  6. package/bundle/components/ImgBlock/ImgBlockContent.d.ts +1 -1
  7. package/bundle/components/StepsBlock/StepsBlockContent.d.ts +4 -1
  8. package/bundle/components/TariffsTable/TariffsTableContent.d.ts +3 -3
  9. package/bundle/components/TextBlock/TextBlockContent.d.ts +2 -7
  10. package/bundle/{services/sitemap → hooks}/fallbackWCMSResource.d.ts +1 -1
  11. package/bundle/hooks/useLink.d.ts +1 -1
  12. package/bundle/services/{sitemap/search → search}/jaroWinklerDistance.d.ts +0 -0
  13. package/bundle/services/{sitemap/search → search}/joinMaps.d.ts +0 -0
  14. package/bundle/services/{sitemap/search → search}/search.d.ts +0 -0
  15. package/bundle/services/{sitemap/search → search}/textRank.d.ts +0 -0
  16. package/bundle/services/{sitemap/search → search}/tokenize.d.ts +0 -0
  17. package/{dist/services/sitemap → bundle/services/search}/useSearch.d.ts +1 -1
  18. package/bundle/ui-kit/Button/ButtonProps.d.ts +2 -3
  19. package/bundle/ui-kit/Dialog/CloseButton.d.ts +7 -0
  20. package/bundle/ui-kit/Dialog/Dialog.d.ts +7 -0
  21. package/bundle/ui-kit/Location/LocationProps.d.ts +2 -2
  22. package/bundle/{model → ui-kit}/PreventableEvent.d.ts +0 -0
  23. package/bundle/ui-kit/SearchBar/SearchBarInner.d.ts +2 -3
  24. package/bundle/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
  25. package/bundle/{components/Footer → ui-kit/Sitemap}/Sitemap.d.ts +2 -2
  26. package/bundle/ui-kit/TopItem/TopItem.d.ts +1 -1
  27. package/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  28. package/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  29. package/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  30. package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  31. package/dist/components/Blocks.js +0 -2
  32. package/dist/components/Blocks.js.map +1 -1
  33. package/dist/components/Footer/Footer.fallback.js +1 -1
  34. package/dist/components/Footer/Footer.fallback.js.map +1 -1
  35. package/dist/components/Footer/Footer.js +2 -21
  36. package/dist/components/Footer/Footer.js.map +1 -1
  37. package/dist/components/Header/Header.fallback.js +1 -1
  38. package/dist/components/Header/Header.fallback.js.map +1 -1
  39. package/dist/components/Header/HeaderSecondaryMenu.js +1 -1
  40. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  41. package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
  42. package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  43. package/dist/components/ImgBlock/ImgBlockContent.d.ts +1 -1
  44. package/dist/components/StepsBlock/StepsBlockContent.d.ts +4 -1
  45. package/dist/components/TariffsTable/TariffsTableContent.d.ts +3 -3
  46. package/dist/components/TextBlock/TextBlockContent.d.ts +2 -7
  47. package/dist/{services/sitemap → hooks}/fallbackWCMSResource.d.ts +1 -1
  48. package/dist/{services/sitemap → hooks}/fallbackWCMSResource.js +0 -0
  49. package/dist/hooks/fallbackWCMSResource.js.map +1 -0
  50. package/dist/hooks/useLink.d.ts +1 -1
  51. package/dist/services/{sitemap/search → search}/jaroWinklerDistance.d.ts +0 -0
  52. package/dist/services/{sitemap/search → search}/jaroWinklerDistance.js +0 -0
  53. package/dist/services/search/jaroWinklerDistance.js.map +1 -0
  54. package/dist/services/{sitemap/search → search}/joinMaps.d.ts +0 -0
  55. package/dist/services/{sitemap/search → search}/joinMaps.js +0 -0
  56. package/dist/services/search/joinMaps.js.map +1 -0
  57. package/dist/services/{sitemap/search → search}/search.d.ts +0 -0
  58. package/{mobile/dist/services/sitemap → dist/services}/search/search.js +2 -2
  59. package/dist/services/search/search.js.map +1 -0
  60. package/dist/services/{sitemap/search → search}/textRank.d.ts +0 -0
  61. package/{mobile/dist/services/sitemap → dist/services}/search/textRank.js +2 -2
  62. package/dist/services/search/textRank.js.map +1 -0
  63. package/dist/services/{sitemap/search → search}/tokenize.d.ts +0 -0
  64. package/dist/services/{sitemap/search → search}/tokenize.js +0 -0
  65. package/dist/services/search/tokenize.js.map +1 -0
  66. package/{lib/services/sitemap → dist/services/search}/useSearch.d.ts +1 -1
  67. package/{mobile/dist/services/sitemap → dist/services/search}/useSearch.js +1 -1
  68. package/dist/services/search/useSearch.js.map +1 -0
  69. package/dist/ui-kit/Button/ButtonProps.d.ts +2 -3
  70. package/dist/ui-kit/Dialog/CloseButton.d.ts +7 -0
  71. package/dist/ui-kit/Dialog/CloseButton.js +8 -0
  72. package/dist/ui-kit/Dialog/CloseButton.js.map +1 -0
  73. package/dist/ui-kit/Dialog/Dialog.d.ts +7 -0
  74. package/dist/ui-kit/Dialog/Dialog.js +26 -0
  75. package/dist/ui-kit/Dialog/Dialog.js.map +1 -0
  76. package/dist/ui-kit/Location/Location.js +9 -11
  77. package/dist/ui-kit/Location/Location.js.map +1 -1
  78. package/dist/ui-kit/Location/LocationProps.d.ts +2 -2
  79. package/dist/{model → ui-kit}/PreventableEvent.d.ts +0 -0
  80. package/dist/{model → ui-kit}/PreventableEvent.js +0 -0
  81. package/dist/ui-kit/PreventableEvent.js.map +1 -0
  82. package/dist/ui-kit/SearchBar/SearchBarInner.d.ts +2 -3
  83. package/dist/ui-kit/SearchBar/SearchBarInner.js +46 -14
  84. package/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  85. package/dist/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
  86. package/dist/ui-kit/SearchBar/SearchBarInput.js +14 -0
  87. package/dist/ui-kit/SearchBar/SearchBarInput.js.map +1 -0
  88. package/{lib/components/Footer → dist/ui-kit/Sitemap}/Sitemap.d.ts +2 -2
  89. package/dist/ui-kit/Sitemap/Sitemap.js +23 -0
  90. package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -0
  91. package/dist/ui-kit/TopItem/TopItem.d.ts +1 -1
  92. package/dist/ui-kit/TopItem/TopItem.js.map +1 -1
  93. package/dist/utils/groupBy.js +6 -6
  94. package/dist/utils/groupBy.js.map +1 -1
  95. package/lib/common.css +1 -1
  96. package/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  97. package/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  98. package/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  99. package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  100. package/lib/components/Blocks.js +0 -2
  101. package/lib/components/Blocks.js.map +1 -1
  102. package/lib/components/Footer/Footer.fallback.js +1 -1
  103. package/lib/components/Footer/Footer.fallback.js.map +1 -1
  104. package/lib/components/Footer/Footer.js +2 -21
  105. package/lib/components/Footer/Footer.js.map +1 -1
  106. package/lib/components/Header/Header.fallback.js +1 -1
  107. package/lib/components/Header/Header.fallback.js.map +1 -1
  108. package/lib/components/Header/HeaderSecondaryMenu.js +1 -1
  109. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  110. package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
  111. package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  112. package/lib/components/ImgBlock/ImgBlockContent.d.ts +1 -1
  113. package/lib/components/StepsBlock/StepsBlockContent.d.ts +4 -1
  114. package/lib/components/TariffsTable/TariffsTableContent.d.ts +3 -3
  115. package/lib/components/TextBlock/TextBlockContent.d.ts +2 -7
  116. package/lib/{services/sitemap → hooks}/fallbackWCMSResource.d.ts +1 -1
  117. package/lib/{services/sitemap → hooks}/fallbackWCMSResource.js +0 -0
  118. package/lib/hooks/fallbackWCMSResource.js.map +1 -0
  119. package/lib/hooks/useLink.d.ts +1 -1
  120. package/lib/services/{sitemap/search → search}/jaroWinklerDistance.d.ts +0 -0
  121. package/lib/services/{sitemap/search → search}/jaroWinklerDistance.js +0 -0
  122. package/lib/services/search/jaroWinklerDistance.js.map +1 -0
  123. package/lib/services/{sitemap/search → search}/joinMaps.d.ts +0 -0
  124. package/lib/services/{sitemap/search → search}/joinMaps.js +0 -0
  125. package/lib/services/search/joinMaps.js.map +1 -0
  126. package/lib/services/{sitemap/search → search}/search.d.ts +0 -0
  127. package/lib/services/{sitemap/search → search}/search.js +2 -2
  128. package/lib/services/search/search.js.map +1 -0
  129. package/lib/services/{sitemap/search → search}/textRank.d.ts +0 -0
  130. package/{mobile/lib/services/sitemap → lib/services}/search/textRank.js +2 -2
  131. package/lib/services/search/textRank.js.map +1 -0
  132. package/lib/services/{sitemap/search → search}/tokenize.d.ts +0 -0
  133. package/lib/services/{sitemap/search → search}/tokenize.js +0 -0
  134. package/lib/services/search/tokenize.js.map +1 -0
  135. package/{mobile/bundle/services/sitemap → lib/services/search}/useSearch.d.ts +1 -1
  136. package/lib/services/{sitemap → search}/useSearch.js +1 -1
  137. package/lib/services/search/useSearch.js.map +1 -0
  138. package/lib/ui-kit/Button/ButtonProps.d.ts +2 -3
  139. package/lib/ui-kit/Dialog/CloseButton.d.ts +7 -0
  140. package/lib/ui-kit/Dialog/CloseButton.js +6 -0
  141. package/lib/ui-kit/Dialog/CloseButton.js.map +1 -0
  142. package/lib/ui-kit/Dialog/Dialog.d.ts +7 -0
  143. package/lib/ui-kit/Dialog/Dialog.js +24 -0
  144. package/lib/ui-kit/Dialog/Dialog.js.map +1 -0
  145. package/lib/ui-kit/Location/Location.js +9 -11
  146. package/lib/ui-kit/Location/Location.js.map +1 -1
  147. package/lib/ui-kit/Location/LocationProps.d.ts +2 -2
  148. package/lib/{model → ui-kit}/PreventableEvent.d.ts +0 -0
  149. package/lib/{model → ui-kit}/PreventableEvent.js +0 -0
  150. package/lib/ui-kit/PreventableEvent.js.map +1 -0
  151. package/lib/ui-kit/SearchBar/SearchBarInner.d.ts +2 -3
  152. package/lib/ui-kit/SearchBar/SearchBarInner.js +46 -14
  153. package/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  154. package/lib/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
  155. package/lib/ui-kit/SearchBar/SearchBarInput.js +12 -0
  156. package/lib/ui-kit/SearchBar/SearchBarInput.js.map +1 -0
  157. package/{mobile/bundle/components/Footer → lib/ui-kit/Sitemap}/Sitemap.d.ts +2 -2
  158. package/lib/ui-kit/Sitemap/Sitemap.js +21 -0
  159. package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -0
  160. package/lib/ui-kit/TopItem/TopItem.d.ts +1 -1
  161. package/lib/ui-kit/TopItem/TopItem.js.map +1 -1
  162. package/lib/utils/groupBy.js +6 -6
  163. package/lib/utils/groupBy.js.map +1 -1
  164. package/mobile/bundle/bundle.umd.js +248 -13
  165. package/mobile/bundle/bundle.umd.min.js +1 -1
  166. package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
  167. package/mobile/bundle/components/ImgBlock/ImgBlockContent.d.ts +1 -1
  168. package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +4 -1
  169. package/mobile/bundle/components/TariffsTable/TariffsTableContent.d.ts +3 -3
  170. package/mobile/bundle/components/TextBlock/TextBlockContent.d.ts +2 -7
  171. package/mobile/bundle/{services/sitemap → hooks}/fallbackWCMSResource.d.ts +1 -1
  172. package/mobile/bundle/hooks/useLink.d.ts +1 -1
  173. package/mobile/bundle/services/{sitemap/search → search}/jaroWinklerDistance.d.ts +0 -0
  174. package/mobile/bundle/services/{sitemap/search → search}/joinMaps.d.ts +0 -0
  175. package/mobile/bundle/services/{sitemap/search → search}/search.d.ts +0 -0
  176. package/mobile/bundle/services/{sitemap/search → search}/textRank.d.ts +0 -0
  177. package/mobile/bundle/services/{sitemap/search → search}/tokenize.d.ts +0 -0
  178. package/{bundle/services/sitemap → mobile/bundle/services/search}/useSearch.d.ts +1 -1
  179. package/mobile/bundle/ui-kit/Button/ButtonProps.d.ts +2 -3
  180. package/mobile/bundle/ui-kit/Dialog/CloseButton.d.ts +7 -0
  181. package/mobile/bundle/ui-kit/Dialog/Dialog.d.ts +7 -0
  182. package/mobile/bundle/ui-kit/Location/LocationProps.d.ts +2 -2
  183. package/mobile/bundle/{model → ui-kit}/PreventableEvent.d.ts +0 -0
  184. package/mobile/bundle/ui-kit/SearchBar/SearchBarInner.d.ts +2 -3
  185. package/mobile/bundle/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
  186. package/{dist/components/Footer → mobile/bundle/ui-kit/Sitemap}/Sitemap.d.ts +2 -2
  187. package/mobile/bundle/ui-kit/TopItem/TopItem.d.ts +1 -1
  188. package/mobile/dist/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  189. package/mobile/dist/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  190. package/mobile/dist/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  191. package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  192. package/mobile/dist/components/Footer/Footer.fallback.js +1 -1
  193. package/mobile/dist/components/Footer/Footer.fallback.js.map +1 -1
  194. package/mobile/dist/components/Header/Header.fallback.js +1 -1
  195. package/mobile/dist/components/Header/Header.fallback.js.map +1 -1
  196. package/mobile/dist/components/Header/HeaderSecondaryMenu.js +1 -1
  197. package/mobile/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  198. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
  199. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  200. package/mobile/dist/components/ImgBlock/ImgBlockContent.d.ts +1 -1
  201. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +4 -1
  202. package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +3 -3
  203. package/mobile/dist/components/TextBlock/TextBlockContent.d.ts +2 -7
  204. package/mobile/dist/hooks/fallbackWCMSResource.d.ts +2 -0
  205. package/mobile/dist/{services/sitemap → hooks}/fallbackWCMSResource.js +0 -0
  206. package/mobile/dist/hooks/fallbackWCMSResource.js.map +1 -0
  207. package/mobile/dist/hooks/useLink.d.ts +1 -1
  208. package/mobile/dist/services/{sitemap/search → search}/jaroWinklerDistance.d.ts +0 -0
  209. package/mobile/dist/services/{sitemap/search → search}/jaroWinklerDistance.js +0 -0
  210. package/mobile/dist/services/search/jaroWinklerDistance.js.map +1 -0
  211. package/mobile/dist/services/{sitemap/search → search}/joinMaps.d.ts +0 -0
  212. package/mobile/dist/services/{sitemap/search → search}/joinMaps.js +0 -0
  213. package/mobile/dist/services/search/joinMaps.js.map +1 -0
  214. package/mobile/dist/services/{sitemap/search → search}/search.d.ts +0 -0
  215. package/{dist/services/sitemap → mobile/dist/services}/search/search.js +2 -2
  216. package/mobile/dist/services/search/search.js.map +1 -0
  217. package/mobile/dist/services/{sitemap/search → search}/textRank.d.ts +0 -0
  218. package/{dist/services/sitemap → mobile/dist/services}/search/textRank.js +2 -2
  219. package/mobile/dist/services/search/textRank.js.map +1 -0
  220. package/mobile/dist/services/{sitemap/search → search}/tokenize.d.ts +0 -0
  221. package/mobile/dist/services/{sitemap/search → search}/tokenize.js +0 -0
  222. package/mobile/dist/services/search/tokenize.js.map +1 -0
  223. package/mobile/dist/services/search/useSearch.d.ts +8 -0
  224. package/{dist/services/sitemap → mobile/dist/services/search}/useSearch.js +1 -1
  225. package/mobile/dist/services/search/useSearch.js.map +1 -0
  226. package/mobile/dist/ui-kit/Button/ButtonProps.d.ts +2 -3
  227. package/mobile/dist/ui-kit/Dialog/CloseButton.d.ts +7 -0
  228. package/mobile/dist/ui-kit/Dialog/CloseButton.js +8 -0
  229. package/mobile/dist/ui-kit/Dialog/CloseButton.js.map +1 -0
  230. package/mobile/dist/ui-kit/Dialog/Dialog.d.ts +7 -0
  231. package/mobile/dist/ui-kit/Dialog/Dialog.js +26 -0
  232. package/mobile/dist/ui-kit/Dialog/Dialog.js.map +1 -0
  233. package/mobile/dist/ui-kit/Location/Location.js +9 -11
  234. package/mobile/dist/ui-kit/Location/Location.js.map +1 -1
  235. package/mobile/dist/ui-kit/Location/LocationProps.d.ts +2 -2
  236. package/mobile/dist/{model → ui-kit}/PreventableEvent.d.ts +0 -0
  237. package/mobile/dist/{model → ui-kit}/PreventableEvent.js +0 -0
  238. package/mobile/dist/ui-kit/PreventableEvent.js.map +1 -0
  239. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.d.ts +2 -3
  240. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js +46 -14
  241. package/mobile/dist/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  242. package/mobile/dist/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
  243. package/mobile/dist/ui-kit/SearchBar/SearchBarInput.js +14 -0
  244. package/mobile/dist/ui-kit/SearchBar/SearchBarInput.js.map +1 -0
  245. package/mobile/dist/ui-kit/Sitemap/Sitemap.d.ts +6 -0
  246. package/mobile/dist/ui-kit/Sitemap/Sitemap.js +23 -0
  247. package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -0
  248. package/mobile/dist/ui-kit/TopItem/TopItem.d.ts +1 -1
  249. package/mobile/dist/ui-kit/TopItem/TopItem.js.map +1 -1
  250. package/mobile/dist/utils/groupBy.js +6 -6
  251. package/mobile/dist/utils/groupBy.js.map +1 -1
  252. package/mobile/lib/components/ApplicationForm/ApplicationFormAcquiring.js.map +1 -1
  253. package/mobile/lib/components/ApplicationForm/ApplicationFormCredit.js.map +1 -1
  254. package/mobile/lib/components/ApplicationForm/ApplicationFormDeposit.js.map +1 -1
  255. package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
  256. package/mobile/lib/components/Footer/Footer.fallback.js +1 -1
  257. package/mobile/lib/components/Footer/Footer.fallback.js.map +1 -1
  258. package/mobile/lib/components/Header/Header.fallback.js +1 -1
  259. package/mobile/lib/components/Header/Header.fallback.js.map +1 -1
  260. package/mobile/lib/components/Header/HeaderSecondaryMenu.js +1 -1
  261. package/mobile/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  262. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +2 -3
  263. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  264. package/mobile/lib/components/ImgBlock/ImgBlockContent.d.ts +1 -1
  265. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +4 -1
  266. package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +3 -3
  267. package/mobile/lib/components/TextBlock/TextBlockContent.d.ts +2 -7
  268. package/mobile/lib/hooks/fallbackWCMSResource.d.ts +2 -0
  269. package/mobile/lib/{services/sitemap → hooks}/fallbackWCMSResource.js +0 -0
  270. package/mobile/lib/hooks/fallbackWCMSResource.js.map +1 -0
  271. package/mobile/lib/hooks/useLink.d.ts +1 -1
  272. package/mobile/lib/services/{sitemap/search → search}/jaroWinklerDistance.d.ts +0 -0
  273. package/mobile/lib/services/{sitemap/search → search}/jaroWinklerDistance.js +0 -0
  274. package/mobile/lib/services/search/jaroWinklerDistance.js.map +1 -0
  275. package/mobile/lib/services/{sitemap/search → search}/joinMaps.d.ts +0 -0
  276. package/mobile/lib/services/{sitemap/search → search}/joinMaps.js +0 -0
  277. package/mobile/lib/services/search/joinMaps.js.map +1 -0
  278. package/mobile/lib/services/{sitemap/search → search}/search.d.ts +0 -0
  279. package/mobile/lib/services/{sitemap/search → search}/search.js +2 -2
  280. package/mobile/lib/services/search/search.js.map +1 -0
  281. package/mobile/lib/services/{sitemap/search → search}/textRank.d.ts +0 -0
  282. package/{lib/services/sitemap → mobile/lib/services}/search/textRank.js +2 -2
  283. package/mobile/lib/services/search/textRank.js.map +1 -0
  284. package/mobile/lib/services/{sitemap/search → search}/tokenize.d.ts +0 -0
  285. package/mobile/lib/services/{sitemap/search → search}/tokenize.js +0 -0
  286. package/mobile/lib/services/search/tokenize.js.map +1 -0
  287. package/mobile/lib/services/search/useSearch.d.ts +8 -0
  288. package/mobile/lib/services/{sitemap → search}/useSearch.js +1 -1
  289. package/mobile/lib/services/search/useSearch.js.map +1 -0
  290. package/mobile/lib/ui-kit/Button/ButtonProps.d.ts +2 -3
  291. package/mobile/lib/ui-kit/Dialog/CloseButton.d.ts +7 -0
  292. package/mobile/lib/ui-kit/Dialog/CloseButton.js +6 -0
  293. package/mobile/lib/ui-kit/Dialog/CloseButton.js.map +1 -0
  294. package/mobile/lib/ui-kit/Dialog/Dialog.d.ts +7 -0
  295. package/mobile/lib/ui-kit/Dialog/Dialog.js +24 -0
  296. package/mobile/lib/ui-kit/Dialog/Dialog.js.map +1 -0
  297. package/mobile/lib/ui-kit/Location/Location.js +9 -11
  298. package/mobile/lib/ui-kit/Location/Location.js.map +1 -1
  299. package/mobile/lib/ui-kit/Location/LocationProps.d.ts +2 -2
  300. package/mobile/lib/{model → ui-kit}/PreventableEvent.d.ts +0 -0
  301. package/mobile/lib/{model → ui-kit}/PreventableEvent.js +0 -0
  302. package/mobile/lib/ui-kit/PreventableEvent.js.map +1 -0
  303. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.d.ts +2 -3
  304. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js +46 -14
  305. package/mobile/lib/ui-kit/SearchBar/SearchBarInner.js.map +1 -1
  306. package/mobile/lib/ui-kit/SearchBar/SearchBarInput.d.ts +9 -0
  307. package/mobile/lib/ui-kit/SearchBar/SearchBarInput.js +12 -0
  308. package/mobile/lib/ui-kit/SearchBar/SearchBarInput.js.map +1 -0
  309. package/mobile/lib/ui-kit/Sitemap/Sitemap.d.ts +6 -0
  310. package/mobile/lib/ui-kit/Sitemap/Sitemap.js +21 -0
  311. package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -0
  312. package/mobile/lib/ui-kit/TopItem/TopItem.d.ts +1 -1
  313. package/mobile/lib/ui-kit/TopItem/TopItem.js.map +1 -1
  314. package/mobile/lib/utils/groupBy.js +6 -6
  315. package/mobile/lib/utils/groupBy.js.map +1 -1
  316. package/mobile/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +1 -1
  317. package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +1 -1
  318. package/mobile/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
  319. package/mobile/src/components/ApplicationForm/ApplicationFormDeposit.tsx +1 -1
  320. package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +1 -1
  321. package/mobile/src/components/Footer/Footer.fallback.ts +1 -1
  322. package/mobile/src/components/Header/Header.fallback.ts +1 -1
  323. package/mobile/src/components/Header/HeaderSecondaryMenu.tsx +2 -2
  324. package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -1
  325. package/mobile/src/components/ImgBlock/ImgBlockContent.ts +1 -1
  326. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +4 -1
  327. package/mobile/src/components/TariffsTable/TariffsTableContent.ts +4 -3
  328. package/mobile/src/components/TextBlock/TextBlockContent.ts +3 -8
  329. package/mobile/src/{services/sitemap → hooks}/fallbackWCMSResource.ts +1 -1
  330. package/mobile/src/hooks/useLink.ts +1 -1
  331. package/mobile/src/services/{sitemap/search → search}/jaroWinklerDistance.ts +0 -0
  332. package/mobile/src/services/{sitemap/search → search}/joinMaps.ts +0 -0
  333. package/mobile/src/services/{sitemap/search → search}/search.ts +2 -2
  334. package/mobile/src/services/{sitemap/search → search}/textRank.ts +2 -2
  335. package/mobile/src/services/{sitemap/search → search}/tokenize.ts +0 -0
  336. package/{src/services/sitemap → mobile/src/services/search}/useSearch.ts +1 -1
  337. package/mobile/src/ui-kit/Button/ButtonProps.ts +2 -1
  338. package/mobile/src/ui-kit/Dialog/CloseButton.tsx +22 -0
  339. package/mobile/src/ui-kit/Dialog/Dialog.tsx +54 -0
  340. package/mobile/src/ui-kit/Location/Location.tsx +36 -44
  341. package/mobile/src/ui-kit/Location/LocationProps.ts +2 -2
  342. package/mobile/src/{model → ui-kit}/PreventableEvent.ts +0 -0
  343. package/mobile/src/ui-kit/SearchBar/SearchBarInner.tsx +100 -63
  344. package/mobile/src/ui-kit/SearchBar/SearchBarInput.tsx +46 -0
  345. package/mobile/src/{components/Footer → ui-kit/Sitemap}/Sitemap.tsx +12 -8
  346. package/mobile/src/ui-kit/TopItem/TopItem.tsx +1 -1
  347. package/mobile/src/utils/groupBy.ts +8 -7
  348. package/package.json +2 -2
  349. package/src/components/ApplicationForm/ApplicationFormAcquiring.tsx +1 -1
  350. package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +1 -1
  351. package/src/components/ApplicationForm/ApplicationFormCredit.tsx +1 -1
  352. package/src/components/ApplicationForm/ApplicationFormDeposit.tsx +1 -1
  353. package/src/components/ApplicationForm/ApplicationFormWed.tsx +1 -1
  354. package/src/components/Blocks.ts +0 -2
  355. package/src/components/Footer/Footer.fallback.ts +1 -1
  356. package/src/components/Footer/Footer.tsx +3 -31
  357. package/src/components/Header/Header.fallback.ts +1 -1
  358. package/src/components/Header/HeaderSecondaryMenu.tsx +2 -2
  359. package/src/components/Header/HeaderSecondaryMenuButton.tsx +2 -1
  360. package/src/components/ImgBlock/ImgBlockContent.ts +1 -1
  361. package/src/components/StepsBlock/StepsBlockContent.ts +4 -1
  362. package/src/components/TariffsTable/TariffsTableContent.ts +4 -3
  363. package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +11 -20
  364. package/src/components/TextBlock/TextBlockContent.ts +3 -8
  365. package/src/{services/sitemap → hooks}/fallbackWCMSResource.ts +1 -1
  366. package/src/hooks/useLink.ts +1 -1
  367. package/src/services/{sitemap/search → search}/jaroWinklerDistance.ts +0 -0
  368. package/src/services/{sitemap/search → search}/joinMaps.ts +0 -0
  369. package/src/services/{sitemap/search → search}/search.ts +2 -2
  370. package/src/services/{sitemap/search → search}/textRank.ts +2 -2
  371. package/src/services/{sitemap/search → search}/tokenize.ts +0 -0
  372. package/{mobile/src/services/sitemap → src/services/search}/useSearch.ts +1 -1
  373. package/src/ui-kit/Button/ButtonProps.ts +2 -1
  374. package/src/ui-kit/Dialog/CloseButton.tsx +22 -0
  375. package/src/ui-kit/Dialog/Dialog.tsx +54 -0
  376. package/src/ui-kit/Location/Location.fixture.tsx +1 -1
  377. package/src/ui-kit/Location/Location.tsx +36 -44
  378. package/src/ui-kit/Location/LocationProps.ts +2 -2
  379. package/src/{model → ui-kit}/PreventableEvent.ts +0 -0
  380. package/src/ui-kit/SearchBar/SearchBarInner.tsx +100 -63
  381. package/src/ui-kit/SearchBar/SearchBarInput.tsx +46 -0
  382. package/src/{components/Footer → ui-kit/Sitemap}/Sitemap.tsx +12 -8
  383. package/src/ui-kit/TopItem/TopItem.tsx +1 -1
  384. package/src/utils/groupBy.ts +8 -7
  385. package/bundle/components/OtherProducts/OtherProducts.d.ts +0 -5
  386. package/bundle/components/OtherProducts/OtherProductsContent.d.ts +0 -8
  387. package/bundle/model/SitemapProps.d.ts +0 -24
  388. package/dist/components/Footer/Sitemap.js +0 -22
  389. package/dist/components/Footer/Sitemap.js.map +0 -1
  390. package/dist/components/OtherProducts/OtherProducts.d.ts +0 -5
  391. package/dist/components/OtherProducts/OtherProducts.js +0 -9
  392. package/dist/components/OtherProducts/OtherProducts.js.map +0 -1
  393. package/dist/components/OtherProducts/OtherProductsContent.d.ts +0 -8
  394. package/dist/components/OtherProducts/OtherProductsContent.js +0 -2
  395. package/dist/components/OtherProducts/OtherProductsContent.js.map +0 -1
  396. package/dist/model/PreventableEvent.js.map +0 -1
  397. package/dist/model/SitemapProps.d.ts +0 -24
  398. package/dist/model/SitemapProps.js +0 -2
  399. package/dist/model/SitemapProps.js.map +0 -1
  400. package/dist/services/sitemap/fallbackWCMSResource.js.map +0 -1
  401. package/dist/services/sitemap/search/jaroWinklerDistance.js.map +0 -1
  402. package/dist/services/sitemap/search/joinMaps.js.map +0 -1
  403. package/dist/services/sitemap/search/search.js.map +0 -1
  404. package/dist/services/sitemap/search/textRank.js.map +0 -1
  405. package/dist/services/sitemap/search/tokenize.js.map +0 -1
  406. package/dist/services/sitemap/useSearch.js.map +0 -1
  407. package/lib/components/Footer/Sitemap.js +0 -20
  408. package/lib/components/Footer/Sitemap.js.map +0 -1
  409. package/lib/components/OtherProducts/OtherProducts.d.ts +0 -5
  410. package/lib/components/OtherProducts/OtherProducts.fixture.d.ts +0 -8
  411. package/lib/components/OtherProducts/OtherProducts.js +0 -7
  412. package/lib/components/OtherProducts/OtherProducts.js.map +0 -1
  413. package/lib/components/OtherProducts/OtherProductsContent.d.ts +0 -8
  414. package/lib/components/OtherProducts/OtherProductsContent.js +0 -2
  415. package/lib/components/OtherProducts/OtherProductsContent.js.map +0 -1
  416. package/lib/model/PreventableEvent.js.map +0 -1
  417. package/lib/model/SitemapProps.d.ts +0 -24
  418. package/lib/model/SitemapProps.js +0 -2
  419. package/lib/model/SitemapProps.js.map +0 -1
  420. package/lib/services/sitemap/fallbackWCMSResource.js.map +0 -1
  421. package/lib/services/sitemap/search/jaroWinklerDistance.js.map +0 -1
  422. package/lib/services/sitemap/search/joinMaps.js.map +0 -1
  423. package/lib/services/sitemap/search/search.js.map +0 -1
  424. package/lib/services/sitemap/search/textRank.js.map +0 -1
  425. package/lib/services/sitemap/search/tokenize.js.map +0 -1
  426. package/lib/services/sitemap/useSearch.js.map +0 -1
  427. package/mobile/bundle/components/OtherProducts/OtherProducts.d.ts +0 -5
  428. package/mobile/bundle/components/OtherProducts/OtherProductsContent.d.ts +0 -8
  429. package/mobile/bundle/model/SitemapProps.d.ts +0 -24
  430. package/mobile/dist/components/Footer/Sitemap.d.ts +0 -6
  431. package/mobile/dist/components/Footer/Sitemap.js +0 -22
  432. package/mobile/dist/components/Footer/Sitemap.js.map +0 -1
  433. package/mobile/dist/components/OtherProducts/OtherProducts.d.ts +0 -5
  434. package/mobile/dist/components/OtherProducts/OtherProducts.js +0 -9
  435. package/mobile/dist/components/OtherProducts/OtherProducts.js.map +0 -1
  436. package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +0 -8
  437. package/mobile/dist/components/OtherProducts/OtherProductsContent.js +0 -2
  438. package/mobile/dist/components/OtherProducts/OtherProductsContent.js.map +0 -1
  439. package/mobile/dist/model/PreventableEvent.js.map +0 -1
  440. package/mobile/dist/model/SitemapProps.d.ts +0 -24
  441. package/mobile/dist/model/SitemapProps.js +0 -2
  442. package/mobile/dist/model/SitemapProps.js.map +0 -1
  443. package/mobile/dist/services/sitemap/fallbackWCMSResource.d.ts +0 -2
  444. package/mobile/dist/services/sitemap/fallbackWCMSResource.js.map +0 -1
  445. package/mobile/dist/services/sitemap/search/jaroWinklerDistance.js.map +0 -1
  446. package/mobile/dist/services/sitemap/search/joinMaps.js.map +0 -1
  447. package/mobile/dist/services/sitemap/search/search.js.map +0 -1
  448. package/mobile/dist/services/sitemap/search/textRank.js.map +0 -1
  449. package/mobile/dist/services/sitemap/search/tokenize.js.map +0 -1
  450. package/mobile/dist/services/sitemap/useSearch.d.ts +0 -8
  451. package/mobile/dist/services/sitemap/useSearch.js.map +0 -1
  452. package/mobile/lib/components/Footer/Sitemap.d.ts +0 -6
  453. package/mobile/lib/components/Footer/Sitemap.js +0 -20
  454. package/mobile/lib/components/Footer/Sitemap.js.map +0 -1
  455. package/mobile/lib/components/OtherProducts/OtherProducts.d.ts +0 -5
  456. package/mobile/lib/components/OtherProducts/OtherProducts.js +0 -7
  457. package/mobile/lib/components/OtherProducts/OtherProducts.js.map +0 -1
  458. package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +0 -8
  459. package/mobile/lib/components/OtherProducts/OtherProductsContent.js +0 -2
  460. package/mobile/lib/components/OtherProducts/OtherProductsContent.js.map +0 -1
  461. package/mobile/lib/model/PreventableEvent.js.map +0 -1
  462. package/mobile/lib/model/SitemapProps.d.ts +0 -24
  463. package/mobile/lib/model/SitemapProps.js +0 -2
  464. package/mobile/lib/model/SitemapProps.js.map +0 -1
  465. package/mobile/lib/services/sitemap/fallbackWCMSResource.d.ts +0 -2
  466. package/mobile/lib/services/sitemap/fallbackWCMSResource.js.map +0 -1
  467. package/mobile/lib/services/sitemap/search/jaroWinklerDistance.js.map +0 -1
  468. package/mobile/lib/services/sitemap/search/joinMaps.js.map +0 -1
  469. package/mobile/lib/services/sitemap/search/search.js.map +0 -1
  470. package/mobile/lib/services/sitemap/search/textRank.js.map +0 -1
  471. package/mobile/lib/services/sitemap/search/tokenize.js.map +0 -1
  472. package/mobile/lib/services/sitemap/useSearch.d.ts +0 -8
  473. package/mobile/lib/services/sitemap/useSearch.js.map +0 -1
  474. package/mobile/src/components/OtherProducts/OtherProducts.example.json +0 -30
  475. package/mobile/src/components/OtherProducts/OtherProducts.tsx +0 -17
  476. package/mobile/src/components/OtherProducts/OtherProducts.ui.json +0 -1
  477. package/mobile/src/components/OtherProducts/OtherProductsContent.ts +0 -9
  478. package/mobile/src/model/SitemapProps.ts +0 -27
  479. package/src/components/OtherProducts/OtherProducts.example.json +0 -30
  480. package/src/components/OtherProducts/OtherProducts.fixture.tsx +0 -88
  481. package/src/components/OtherProducts/OtherProducts.tsx +0 -17
  482. package/src/components/OtherProducts/OtherProducts.ui.json +0 -1
  483. package/src/components/OtherProducts/OtherProductsContent.ts +0 -9
  484. package/src/model/SitemapProps.ts +0 -27
@@ -2531,6 +2531,41 @@
2531
2531
  return data || {};
2532
2532
  }
2533
2533
 
2534
+ const ICON_VERSION_MAP = {
2535
+ 'bg-white': 'color',
2536
+ transparent: 'white',
2537
+ };
2538
+ const SVG_COLOR = {
2539
+ 'bg-white': 'text-primary-main',
2540
+ transparent: 'text-white',
2541
+ };
2542
+ const renderImage$2 = (bgColor, image, size) => {
2543
+ return image?.src ? (jsx(ImgInner, { image: image, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height, pathPrefix: "/wcms-resources/", asSVG: true })) : (jsx(ImgInner, { image: {
2544
+ icon: image?.icon || 'LogoIcon',
2545
+ iconVersion: ICON_VERSION_MAP[bgColor],
2546
+ }, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height, asSVG: true }));
2547
+ };
2548
+
2549
+ const TEXT_COLOR = {
2550
+ 'bg-white': 'text-primary-text',
2551
+ transparent: 'text-white',
2552
+ };
2553
+ const renderTitle$3 = (title, bgColor, className) => {
2554
+ return (jsx("span", { className: `${TEXT_COLOR[bgColor]} ml-2.5 font-medium ${className || ''}`, children: title || 'Россельхозбанк' }));
2555
+ };
2556
+
2557
+ const Logo = JSX(({ className = '', href, logo, children = logo?.title, targetBlank, bgColor = 'bg-white', showTitle = true, }) => {
2558
+ 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$2(bgColor, logo?.image, { width: '40', height: '45' }), showTitle ? renderTitle$3(children || logo?.title, bgColor) : null] }));
2559
+ });
2560
+
2561
+ function useBool(defaultValue = false) {
2562
+ const [value, setValue] = useState(defaultValue);
2563
+ const setTrue = useCallback(() => setValue(true), []);
2564
+ const setFalse = useCallback(() => setValue(false), []);
2565
+ const toggle = useCallback(() => setValue((_) => !_), []);
2566
+ return [value, { setValue, setTrue, setFalse, toggle }];
2567
+ }
2568
+
2534
2569
  const compareBy = (indexOf) => (a, b) => indexOf(a) - indexOf(b);
2535
2570
  const desc = (cmp) => (a, b) => -cmp(a, b);
2536
2571
 
@@ -2679,47 +2714,89 @@
2679
2714
  };
2680
2715
  const fetchSearchIndex = async (...basePathList) => (await Promise.allSettled(basePathList.map((basePath) => fetchJSON(joinPath(basePath, '/', SEARCH_INDEX_FILENAME))))).map((_) => (_.status === 'fulfilled' ? _.value : {}));
2681
2716
 
2682
- const ICON_VERSION_MAP = {
2683
- 'bg-white': 'color',
2684
- transparent: 'white',
2685
- };
2686
- const SVG_COLOR = {
2687
- 'bg-white': 'text-primary-main',
2688
- transparent: 'text-white',
2689
- };
2690
- const renderImage$2 = (bgColor, image, size) => {
2691
- return image?.src ? (jsx(ImgInner, { image: image, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height, pathPrefix: "/wcms-resources/", asSVG: true })) : (jsx(ImgInner, { image: {
2692
- icon: image?.icon || 'LogoIcon',
2693
- iconVersion: ICON_VERSION_MAP[bgColor],
2694
- }, className: SVG_COLOR[bgColor], width: size?.width, height: size?.height, asSVG: true }));
2695
- };
2717
+ const CloseButton = JSX(({ className, onClick }) => (jsx("button", { className: style('visible peer-placeholder-shown:invisible w-6 h-6 p-1 bg-transparent border-none', className), onClick: onClick, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(ImgInner, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
2696
2718
 
2697
- const TEXT_COLOR = {
2698
- 'bg-white': 'text-primary-text',
2699
- transparent: 'text-white',
2700
- };
2701
- const renderTitle$3 = (title, bgColor, className) => {
2702
- return (jsx("span", { className: `${TEXT_COLOR[bgColor]} ml-2.5 font-medium ${className || ''}`, children: title || 'Россельхозбанк' }));
2719
+ const Dialog = JSX(({ className, head, children, onClose }) => {
2720
+ const handleClose = useCallback((ev) => {
2721
+ ev.preventDefault();
2722
+ onClose && onClose();
2723
+ }, [onClose]);
2724
+ useEffect(() => {
2725
+ const handleEscape = ({ key }) => {
2726
+ if (key === 'Escape') {
2727
+ onClose && onClose();
2728
+ }
2729
+ };
2730
+ globalThis.document?.addEventListener('keydown', handleEscape);
2731
+ return () => {
2732
+ globalThis.document?.removeEventListener('keydown', handleEscape);
2733
+ };
2734
+ }, [onClose]);
2735
+ return (jsx("div", { className: style('fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar', className), role: "dialog", children: jsxs("div", { className: "relative container pb-12 min-h-full", children: [jsxs("div", { className: "sticky bg-white pt-6 top-0", children: [jsx(CloseButton, { className: "absolute top-3 -right-6", onClick: handleClose }), head] }), children] }) }));
2736
+ });
2737
+
2738
+ const Sitemap = JSX(({ className, topItems }) => {
2739
+ const link = useLink(true);
2740
+ return (jsx("div", { className: style('flex items-start justify-between', className), children: topItems?.map(link).map(renderColumn) }));
2741
+ });
2742
+ const renderColumn = (menuItem, index) => {
2743
+ const { text, items, href, target, onClick } = menuItem;
2744
+ return (jsxs("div", { className: "flex flex-col gap-3.5 w-1/4", children: [jsx("a", { className: "leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ..._, basePath: href, index: i }, String(i))))] }, String(index)));
2703
2745
  };
2746
+ const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
2747
+ const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
2748
+ const link = useLink(isAnotherPortal);
2749
+ const { href, target, onClick } = link(rest);
2750
+ return (jsx("a", { className: style('text-l-light text-secondary-text hover:text-primary-main no-underline', 'overflow-x-hidden overflow-ellipsis whitespace-nowrap'), href: isAnotherPortal ? joinPath(basePath, href) : href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }));
2751
+ });
2704
2752
 
2705
- const Logo = JSX(({ className = '', href, logo, children = logo?.title, targetBlank, bgColor = 'bg-white', showTitle = true, }) => {
2706
- 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$2(bgColor, logo?.image, { width: '40', height: '45' }), showTitle ? renderTitle$3(children || logo?.title, bgColor) : null] }));
2753
+ const SearchBarInput = JSX(({ className, isMobile, value, autoFocus, onChange, onFocus }) => {
2754
+ const handleChange = useCallback((ev) => {
2755
+ onChange && onChange(ev.target?.value || '');
2756
+ }, [onChange]);
2757
+ return (jsxs("div", { className: style('font-sans relative', className), role: "form", children: [jsx("div", { className: "absolute h-full flex items-center pl-4 pointer-events-none", children: jsx(ImgInner, { image: { icon: 'LoupeIcon' }, width: "24", height: "24" }) }), jsx("input", { className: style('h-12 pl-12 w-full text-l text-black outline-none box-border', 'border border-solid rounded-md border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text', isMobile ? '' : 'h-full'), value: value, type: "text", name: "search-bar-input", placeholder: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443", autoFocus: autoFocus, onChange: handleChange, onFocus: onFocus })] }));
2707
2758
  });
2708
2759
 
2709
- const SearchBarInner = JSX(({ className, isMobile, value: query, onChange, onFocus }) => {
2710
- const LoupeIconClassName = isMobile ? 'w-5 h-5' : 'w-6 h-6';
2711
- const SearchBarLabelClassName = isMobile ? 'text-s' : 'text-l-light';
2712
- const SearchBarInputClassName = isMobile ? ' placeholder-transparent' : 'h-full';
2713
- const inputPlaceholder = isMobile ? 'some search' : undefined;
2714
- return (jsxs("form", { className: `font-sans relative ${className}`, children: [jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [jsx("div", { className: LoupeIconClassName, children: jsx(ImgInner, { image: { icon: 'LoupeIcon' }, width: "24", height: "24" }) }), query ? null : (jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text ${SearchBarLabelClassName}`, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443" }))] }), jsx("input", { id: "search-bar-input", className: `h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border
2715
- outline-none pr-[6%] border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text ${SearchBarInputClassName}`, value: query, onChange: (e) => onChange && onChange(e.target.value || ''), onFocus: onFocus, type: "text", name: "search-bar-input", placeholder: inputPlaceholder }), isMobile ? (jsx("button", { className: "visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none", onClick: (e) => {
2760
+ const MIN_QUERY_LEN = 3;
2761
+ const SearchBarInner = JSX(({ className, isMobile, topItems }) => {
2762
+ const basePathList = topItems?.map((_) => _.href || '/');
2763
+ const [searchResult, searchInputProps] = useSearch(basePathList);
2764
+ const { value, onChange, onFocus } = searchInputProps;
2765
+ const searchItems = useMemo(() => combineTopItemsAndSearchResult(topItems)(searchResult), [topItems, searchResult]);
2766
+ useEffect(() => printSearchItems(searchItems), [searchItems]); // Temp
2767
+ const [isSearchDialogOpen, { setTrue: openSearchDialog, setFalse: hideSearchDialog }] = useBool();
2768
+ const handleInitialInputChange = useCallback((_) => {
2769
+ onChange(_);
2770
+ if (isQueryLongEnough(_)) {
2771
+ openSearchDialog();
2772
+ }
2773
+ }, [onChange, isQueryLongEnough]);
2774
+ const handleInitialInputFocus = useCallback(() => {
2775
+ onFocus();
2776
+ if (isQueryLongEnough(value)) {
2777
+ openSearchDialog();
2778
+ }
2779
+ }, [value, onFocus]);
2780
+ return (jsxs("div", { className: className, children: [jsx(SearchBarInput, { isMobile: isMobile, value: value, onChange: handleInitialInputChange, onFocus: handleInitialInputFocus }), isMobile ? (jsx(CloseButton, { className: "absolute top-2 right-3", onClick: (e) => {
2716
2781
  e.preventDefault();
2717
- onChange && onChange('');
2718
- }, children: jsx(ImgInner, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })) : (jsx(Button, { version: "primary", text: "\u041D\u0430\u0439\u0442\u0438", className: "invisible peer-focus:visible absolute top-[3px] right-1", onClick: (ev) => {
2719
- ev?.preventDefault();
2720
- console.log('click');
2721
- }, children: jsx("div", { className: "text-s px-9 py-2.5", children: "\u041D\u0430\u0439\u0442\u0438" }) }))] }));
2782
+ onChange('');
2783
+ } })) : null, isSearchDialogOpen ? (jsx(Dialog, { head: jsx(SearchBarInput, { className: "my-5", isMobile: isMobile, autoFocus: true, ...searchInputProps }), onClose: hideSearchDialog, children: jsx(Sitemap, { topItems: searchItems }) })) : null] }));
2722
2784
  });
2785
+ const isQueryLongEnough = (_) => _ && _.length >= MIN_QUERY_LEN;
2786
+ const combineTopItemsAndSearchResult = (topItems) => (searchResult) => topItems?.length && searchResult?.length
2787
+ ? zip(topItems, searchResult).map(([_, portalSearchResult]) => ({
2788
+ ..._,
2789
+ items: portalSearchResult?.map(({ title, uri }) => ({ text: title, href: uri })),
2790
+ }))
2791
+ : [];
2792
+ // Temp
2793
+ function printSearchItems(topItems) {
2794
+ for (const _ of topItems.filter(({ items }) => items?.length)) {
2795
+ console.group(_.text);
2796
+ console.table(_.items, ['text', 'href']);
2797
+ console.groupEnd();
2798
+ }
2799
+ }
2723
2800
 
2724
2801
  const SearchBar$1 = JSX((props) => jsx(SearchBarInner, { ...props }));
2725
2802
 
@@ -2750,21 +2827,6 @@
2750
2827
  return (jsx("div", { className: className, children: links?.length ? (jsx("div", { className: "flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider", children: links.map((_, i) => (jsx(HorizontalNavigationLink, { index: i, className: "text-l-light max-w-[292px]", ..._ }, String(i)))) })) : null }));
2751
2828
  });
2752
2829
 
2753
- const Sitemap = JSX(({ className = '', sitemap }) => {
2754
- const link = useLink(true);
2755
- return (jsx("div", { className: `flex flex-grow items-start justify-between gap-[54px] xl:gap-5 ${className}`, children: sitemap?.topItems?.map((_, i) => renderColumn(link(_), i)) }));
2756
- });
2757
- const renderColumn = (menuItem, index) => {
2758
- const { text, items, href, target, onClick } = menuItem;
2759
- return (jsxs("div", { className: "flex flex-col w-1/5 last:w-1/4 gap-3.5", children: [jsx("a", { className: "block leading-5 text-l text-primary-text hover:text-primary-main no-underline", href: href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }), items?.map((_, i) => (jsx(ColumnItem, { ..._, basePath: href, index: i }, String(i))))] }, String(index)));
2760
- };
2761
- const ColumnItem = JSX(({ text, index, basePath, ...rest }) => {
2762
- const isAnotherPortal = projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
2763
- const link = useLink(isAnotherPortal);
2764
- const { href, target, onClick } = link(rest);
2765
- return (jsx("a", { className: "block text-l-light text-secondary-text hover:text-primary-main no-underline", href: isAnotherPortal ? joinPath(basePath, href) : href, target: target || '_self', onClick: onClick, children: text || `Раздел ${index}` }));
2766
- });
2767
-
2768
2830
  const TextInformationLink = JSX(({ className = '', index, ...rest }) => {
2769
2831
  const link = useLink();
2770
2832
  const { href, target, text, onClick } = link(rest);
@@ -2778,24 +2840,8 @@
2778
2840
  const fallback = rest.options?.page?.fallback;
2779
2841
  const sitemap = useSWRResource(projectSettings.SITEMAP || 'sitemap', fallback);
2780
2842
  const { documents, relatedEnterprises, contacts, socialMedia, mobileApps, logo } = useSWRResource(projectSettings.FOOTER || 'footer', fallback);
2781
- const basePathList = sitemap?.topItems?.map((_) => _.href || '/');
2782
- const [searchResult, searchInputProps] = useSearch(basePathList);
2783
- useEffect(() => {
2784
- printSearchResult(sitemap, searchResult); // Temp
2785
- }, [sitemap, searchResult]);
2786
- return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 ${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", ...searchInputProps })] }), 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]", sitemap: sitemap })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
2843
+ return (jsxs(BlockWrapper, { tag: "footer", className: `p-9 ${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", topItems: sitemap?.topItems })] }), 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: "flex-grow", topItems: sitemap?.topItems })] }), jsx(HorizontalNavigation, { className: "mt-[98px]", links: relatedEnterprises }), jsx(TextInformation, { links: documents })] }));
2787
2844
  });
2788
- // Temp
2789
- function printSearchResult(sitemap, searchResult) {
2790
- if (!sitemap?.topItems?.length || !searchResult?.length) {
2791
- return;
2792
- }
2793
- for (const [{ text }, portalSearchResult] of zip(sitemap.topItems, searchResult).filter(([, _]) => _?.length)) {
2794
- console.group(text);
2795
- console.table(portalSearchResult, ['title', 'uri']);
2796
- console.groupEnd();
2797
- }
2798
- }
2799
2845
 
2800
2846
  const GracePeriod = JSX(({ className = '', title, description, calendar, ...rest }) => (jsxs(BlockWrapper, { className: `p-12 ${className}`, ...rest, children: [jsx(Headline, { className: "!p-0 mb-4", title: title, description: description, headlineVersion: "M" }), calendar ? renderCalendar(calendar) : null] })));
2801
2847
  const renderCalendar = (calendar) => {
@@ -2829,14 +2875,6 @@
2829
2875
  ? 'text-primary-main'
2830
2876
  : style(flat ? 'text-primary-text' : 'text-secondary-text', 'hover:text-primary-main'), 'group-data-transparent:text-white group-data-transparent:hover:text-primary-hover');
2831
2877
 
2832
- function useBool(defaultValue = false) {
2833
- const [value, setValue] = useState(defaultValue);
2834
- const setTrue = useCallback(() => setValue(true), []);
2835
- const setFalse = useCallback(() => setValue(false), []);
2836
- const toggle = useCallback(() => setValue((_) => !_), []);
2837
- return [value, { setValue, setTrue, setFalse, toggle }];
2838
- }
2839
-
2840
2878
  const STORAGE_DEFAULT_TTL = 86400000; // 24 * 60 * 60 * 1000
2841
2879
  function useCachedAsyncData(key, fetcher, storage = globalThis?.localStorage) {
2842
2880
  const cachedFetcher = useCallback(async (...args) => {
@@ -2890,13 +2928,13 @@
2890
2928
  }
2891
2929
 
2892
2930
  const groupBy = (list, keyGetter) => {
2893
- const map = new Map();
2894
- list.forEach((item) => {
2931
+ const result = new Map();
2932
+ for (const item of list) {
2895
2933
  const key = keyGetter(item);
2896
- const collection = map.get(key);
2897
- map.set(key, [...(collection || []), item]);
2898
- });
2899
- return map;
2934
+ const group = result.get(key) || [];
2935
+ result.set(key, [...group, item]);
2936
+ }
2937
+ return result;
2900
2938
  };
2901
2939
 
2902
2940
  const SearchBar = JSX(({ className, searchTerm, onSearch }) => {
@@ -2905,13 +2943,13 @@
2905
2943
  });
2906
2944
 
2907
2945
  const SEARCH_TERM_MIN_LENGTH = 3;
2908
- const Location = JSX(({ currentLocation, onChangeLocation, close, foreignOffices }) => {
2946
+ const Location = JSX(({ currentLocation, onChangeLocation, onClose, foreignOffices }) => {
2909
2947
  const [query, setQuery] = useState('');
2910
2948
  const regions = cleanUpRegions(useRegions()).sort((a, b) => a.name.localeCompare(b.name));
2911
2949
  const regionsGroupByLetter = groupBy(regions, regionFirstLetter);
2912
- return (jsx("div", { className: "absolute h-full w-full inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll", children: jsxs("div", { className: "relative container pt-6 pb-12", children: [jsxs("div", { className: "sticky bg-white pt-6 top-0", children: [jsx(CloseButton, { close: close }), jsx(CurrentLocation, { currentLocation: currentLocation }), jsx(SearchBar, { onSearch: setQuery, searchTerm: query, className: "mb-7" })] }), query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
2913
- .filter((region) => region.name?.startsWith(query))
2914
- .map(renderRegion({ onChangeLocation, close })) })) : (jsx("div", { className: "columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup({ onChangeLocation, close })) })), jsx(ForeignOffices, { foreignOffices: foreignOffices })] }) }));
2950
+ return (jsxs(Dialog, { head: jsxs("div", { children: [jsx(CurrentLocation, { currentLocation: currentLocation }), jsx(SearchBar, { onSearch: setQuery, searchTerm: query, className: "mb-7" })] }), onClose: onClose, children: [query && query.length >= SEARCH_TERM_MIN_LENGTH ? (jsx("div", { children: regions
2951
+ .filter(({ name }) => name && jaroWinklerDistance(name.toLowerCase())(query.toLowerCase()) >= 0.8)
2952
+ .map(renderRegion({ onChangeLocation, onClose })) })) : (jsx("div", { className: "columns-5", children: Array.from(regionsGroupByLetter.entries()).map(renderRegionGroup({ onChangeLocation, onClose })) })), jsx(ForeignOffices, { foreignOffices: foreignOffices })] }));
2915
2953
  });
2916
2954
  const regionFirstLetter = (region) => region.name?.charAt(0) || '';
2917
2955
  const cleanUpRegions = (regions) => regions.map((region) => ({
@@ -2919,14 +2957,10 @@
2919
2957
  name: region.name?.replace(/республика|область|край'/gi, '').trim() || '',
2920
2958
  }));
2921
2959
  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-primary-main", children: currentLocation.name }) })] })) : null);
2922
- const CloseButton = JSX(({ close }) => (jsx("button", { className: "visible peer-placeholder-shown:invisible absolute top-0 -right-6 w-6 h-6 p-1 bg-transparent cursor-pointer border-none", onClick: (e) => {
2923
- e.preventDefault();
2924
- close && close();
2925
- }, children: jsx(ImgInner, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
2926
- 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));
2927
- const renderRegion = ({ onChangeLocation, close }) => (region) => (jsx("div", { className: "mb-1", children: jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
2960
+ const renderRegionGroup = ({ onChangeLocation, onClose }) => ([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, onClose }))] }, letter));
2961
+ const renderRegion = ({ onChangeLocation, onClose }) => (region) => (jsx("div", { className: "mb-1", children: jsx("button", { className: "cursor-pointer hover:text-primary-hover", onClick: () => {
2928
2962
  onChangeLocation && onChangeLocation(region);
2929
- close && close();
2963
+ onClose && onClose();
2930
2964
  }, children: region.name || '' }) }, region.id));
2931
2965
  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", font: "font-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);
2932
2966
  const ForeignOffice = JSX(({ icon, ...rest }) => {
@@ -3003,7 +3037,7 @@
3003
3037
  showLocationModal();
3004
3038
  }, []);
3005
3039
  defaultEventBus.fire('setPageOverflowHidden', isShowLocationModal);
3006
- return (jsxs("div", { className: style('flex items-center', className), children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: location.name, onClick: handleShowLocationModal }), 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" })) : null, projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { className: "mr-5", iconVersion: iconVersion, chat: projectSettings.CHAT_BOT })) : null, isShowLocationModal ? (jsx(Location, { currentLocation: location, foreignOffices: foreignOffices, onChangeLocation: onChangeLocation, close: hideLocationModal })) : null] }));
3040
+ return (jsxs("div", { className: style('flex items-center', className), children: [jsx(TopItem, { className: "mr-5", flat: true, href: "#", text: location.name, onClick: handleShowLocationModal }), 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" })) : null, projectSettings.CHAT_BOT ? (jsx(HeaderChatBotButton, { className: "mr-5", iconVersion: iconVersion, chat: projectSettings.CHAT_BOT })) : null, isShowLocationModal ? (jsx(Location, { currentLocation: location, foreignOffices: foreignOffices, onChangeLocation: onChangeLocation, onClose: hideLocationModal })) : null] }));
3007
3041
  });
3008
3042
 
3009
3043
  const findActiveSubItem = (router) => (items = []) => {
@@ -3644,9 +3678,6 @@
3644
3678
  const OfficeServicesBlock = JSX(({ className = '', title, servicesList, ...rest }) => (jsxs(BlockWrapper, { className: `p-8 flex flex-col ${className}`, ...rest, children: [title ? jsx(Heading, { headingType: "h5", className: "mb-5", title: title }) : null, servicesList?.length ? (jsx("ul", { className: "list-none m-0 p-0", children: servicesList.map(renderListItems) })) : null] })));
3645
3679
  const renderListItems = (itemList, i) => (jsxs("li", { className: "flex mb-5 last:mb-0 list-none", children: [itemList.icon ? (jsx(ImgInner, { className: "mr-3 min-w-6 min-h-6 w-6 h-6", width: "24", height: "24", asSVG: true, image: getIconWithVersion(itemList.icon) })) : null, itemList.label ? jsx("span", { className: "text-l-light", children: itemList.label }) : null] }, `list_item_${String(i)}`));
3646
3680
 
3647
- const OtherProducts = JSX(({ className = '', ...rest }) => (jsx(BlockWrapper, { className: `font-sans text-primary-text ${className}`, ...rest, children: renderChildren(rest) })));
3648
- OtherProducts.childrenTypes = ['OtherProductsItem'];
3649
-
3650
3681
  const ParagraphBlock = JSX(({ text, size, align, font, children, ...rest }) => (jsx(BlockWrapper, { ...rest, children: jsx(Paragraph, { size: size, align: align, font: font, children: text || children }) })));
3651
3682
 
3652
3683
  const BenefitItem = JSX((props) => {
@@ -4564,7 +4595,6 @@
4564
4595
  MobileAppTile,
4565
4596
  OfficeMap,
4566
4597
  OfficeServicesBlock,
4567
- OtherProducts,
4568
4598
  ParagraphBlock,
4569
4599
  PictureText,
4570
4600
  Placeholder,
@@ -4713,7 +4743,7 @@
4713
4743
  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" }) }));
4714
4744
  }
4715
4745
 
4716
- const packageVersion = "0.8.28";
4746
+ const packageVersion = "0.8.30";
4717
4747
 
4718
4748
  exports.Blocks = Blocks;
4719
4749
  exports.ContentPage = ContentPage;