@redneckz/wildless-cms-uni-blocks 0.4.6 → 0.4.7

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 (393) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +189 -196
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/BlockContent.d.ts +3 -1
  5. package/dist/components/Blocks.d.ts +2 -0
  6. package/dist/components/Blocks.js +5 -1
  7. package/dist/components/Blocks.js.map +1 -1
  8. package/dist/components/Calculator/BonusCalculatorForm.js +1 -1
  9. package/dist/components/Calculator/Calculator.js +6 -4
  10. package/dist/components/Calculator/Calculator.js.map +1 -1
  11. package/dist/components/Calculator/CalculatorContent.d.ts +7 -6
  12. package/dist/components/Calculator/CalculatorValueBlock.js +1 -1
  13. package/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
  14. package/dist/components/Calculator/CreditCalculatorForm.js +1 -1
  15. package/dist/components/Calculator/MortgageCalculatorForm.js +1 -3
  16. package/dist/components/Calculator/MortgageCalculatorForm.js.map +1 -1
  17. package/dist/components/Calculator/Rate.js +1 -1
  18. package/dist/components/Calculator/Rate.js.map +1 -1
  19. package/dist/components/Calculator/renderCalculatorBlock.js +2 -1
  20. package/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
  21. package/dist/components/Calculator/renderInitialFeeInput.js +1 -1
  22. package/dist/components/Calculator/renderMonthsInput.js +1 -1
  23. package/dist/components/Calculator/renderProposalMortgage.js +2 -1
  24. package/dist/components/Calculator/renderProposalMortgage.js.map +1 -1
  25. package/dist/components/ErrorBlock/ErrorBlock.d.ts +5 -0
  26. package/dist/components/ErrorBlock/ErrorBlock.js +23 -0
  27. package/dist/components/ErrorBlock/ErrorBlock.js.map +1 -0
  28. package/dist/components/ErrorBlock/ErrorBlockContent.d.ts +35 -0
  29. package/dist/components/ErrorBlock/ErrorBlockContent.js +2 -0
  30. package/dist/components/ErrorBlock/ErrorBlockContent.js.map +1 -0
  31. package/dist/components/OfficeServicesBlock/OfficeServicesBlock.d.ts +5 -0
  32. package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +12 -0
  33. package/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -0
  34. package/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +24 -0
  35. package/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.js +2 -0
  36. package/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.js.map +1 -0
  37. package/dist/components/PictureText/PictureText.js +4 -4
  38. package/dist/components/PictureText/PictureText.js.map +1 -1
  39. package/dist/components/SafeDepositRental/RegionsAndBranches.d.ts +12 -0
  40. package/dist/components/SafeDepositRental/RegionsAndBranches.js +9 -0
  41. package/dist/components/SafeDepositRental/RegionsAndBranches.js.map +1 -0
  42. package/dist/components/SafeDepositRental/RenderRadioButtons.d.ts +2 -0
  43. package/dist/components/SafeDepositRental/RenderRadioButtons.js +12 -0
  44. package/dist/components/SafeDepositRental/RenderRadioButtons.js.map +1 -0
  45. package/dist/components/SafeDepositRental/RentalPeriod.d.ts +6 -0
  46. package/dist/components/SafeDepositRental/RentalPeriod.js +10 -0
  47. package/dist/components/SafeDepositRental/RentalPeriod.js.map +1 -0
  48. package/dist/components/SafeDepositRental/SafeBoxCases.d.ts +11 -0
  49. package/dist/components/SafeDepositRental/SafeBoxCases.js +9 -0
  50. package/dist/components/SafeDepositRental/SafeBoxCases.js.map +1 -0
  51. package/dist/components/SafeDepositRental/SafeDepositRental.js +5 -71
  52. package/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  53. package/dist/components/SafeDepositRental/SafeDepositRentalContent.d.ts +17 -0
  54. package/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +5 -5
  55. package/dist/components/SafeDepositRental/SafeDepositRentalForm.js +51 -67
  56. package/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
  57. package/dist/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +5 -7
  58. package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js +15 -10
  59. package/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  60. package/dist/components/SafeDepositRental/WrapperSelect.d.ts +11 -0
  61. package/dist/components/SafeDepositRental/WrapperSelect.js +10 -0
  62. package/dist/components/SafeDepositRental/WrapperSelect.js.map +1 -0
  63. package/dist/components/SafeDepositRental/fetchBranches.d.ts +2 -0
  64. package/dist/components/SafeDepositRental/fetchBranches.js +20 -0
  65. package/dist/components/SafeDepositRental/fetchBranches.js.map +1 -0
  66. package/dist/components/SafeDepositRental/useGetRegions.d.ts +6 -0
  67. package/dist/components/SafeDepositRental/useGetRegions.js +11 -0
  68. package/dist/components/SafeDepositRental/useGetRegions.js.map +1 -0
  69. package/dist/ui-kit/BenefitItem/BenefitItem.d.ts +1 -1
  70. package/dist/ui-kit/BenefitItem/BenefitItem.js +3 -2
  71. package/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
  72. package/dist/ui-kit/InputRange/InputRange.js +1 -1
  73. package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  74. package/dist/ui-kit/Radio/Radio.js +1 -1
  75. package/dist/ui-kit/Radio/Radio.js.map +1 -1
  76. package/dist/ui-kit/Select/Select.js +1 -1
  77. package/dist/ui-kit/Select/Select.js.map +1 -1
  78. package/dist/ui-kit/Select/SelectOption.d.ts +1 -0
  79. package/dist/ui-kit/Select/SelectOption.js +2 -2
  80. package/dist/ui-kit/Select/SelectOption.js.map +1 -1
  81. package/lib/common.css +1 -1
  82. package/lib/components/BlockContent.d.ts +3 -1
  83. package/lib/components/Blocks.d.ts +2 -0
  84. package/lib/components/Blocks.js +5 -1
  85. package/lib/components/Blocks.js.map +1 -1
  86. package/lib/components/Calculator/BonusCalculatorForm.js +1 -1
  87. package/lib/components/Calculator/Calculator.js +6 -4
  88. package/lib/components/Calculator/Calculator.js.map +1 -1
  89. package/lib/components/Calculator/CalculatorContent.d.ts +7 -6
  90. package/lib/components/Calculator/CalculatorValueBlock.js +1 -1
  91. package/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
  92. package/lib/components/Calculator/CreditCalculatorForm.js +1 -1
  93. package/lib/components/Calculator/MortgageCalculatorForm.js +1 -3
  94. package/lib/components/Calculator/MortgageCalculatorForm.js.map +1 -1
  95. package/lib/components/Calculator/Rate.js +1 -1
  96. package/lib/components/Calculator/Rate.js.map +1 -1
  97. package/lib/components/Calculator/renderCalculatorBlock.js +3 -2
  98. package/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
  99. package/lib/components/Calculator/renderInitialFeeInput.js +1 -1
  100. package/lib/components/Calculator/renderMonthsInput.js +1 -1
  101. package/lib/components/Calculator/renderProposalMortgage.js +2 -1
  102. package/lib/components/Calculator/renderProposalMortgage.js.map +1 -1
  103. package/lib/components/ErrorBlock/ErrorBlock.d.ts +5 -0
  104. package/lib/components/ErrorBlock/ErrorBlock.fixture.d.ts +6 -0
  105. package/lib/components/ErrorBlock/ErrorBlock.js +21 -0
  106. package/lib/components/ErrorBlock/ErrorBlock.js.map +1 -0
  107. package/lib/components/ErrorBlock/ErrorBlockContent.d.ts +35 -0
  108. package/lib/components/ErrorBlock/ErrorBlockContent.js +2 -0
  109. package/lib/components/ErrorBlock/ErrorBlockContent.js.map +1 -0
  110. package/lib/components/OfficeServicesBlock/OfficeServicesBlock.d.ts +5 -0
  111. package/lib/components/OfficeServicesBlock/OfficeServicesBlock.fixture.d.ts +5 -0
  112. package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +10 -0
  113. package/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -0
  114. package/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +24 -0
  115. package/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.js +2 -0
  116. package/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.js.map +1 -0
  117. package/lib/components/PictureText/PictureText.js +4 -4
  118. package/lib/components/PictureText/PictureText.js.map +1 -1
  119. package/lib/components/SafeDepositRental/RegionsAndBranches.d.ts +12 -0
  120. package/lib/components/SafeDepositRental/RegionsAndBranches.js +7 -0
  121. package/lib/components/SafeDepositRental/RegionsAndBranches.js.map +1 -0
  122. package/lib/components/SafeDepositRental/RenderRadioButtons.d.ts +2 -0
  123. package/lib/components/SafeDepositRental/RenderRadioButtons.js +10 -0
  124. package/lib/components/SafeDepositRental/RenderRadioButtons.js.map +1 -0
  125. package/lib/components/SafeDepositRental/RentalPeriod.d.ts +6 -0
  126. package/lib/components/SafeDepositRental/RentalPeriod.js +8 -0
  127. package/lib/components/SafeDepositRental/RentalPeriod.js.map +1 -0
  128. package/lib/components/SafeDepositRental/SafeBoxCases.d.ts +11 -0
  129. package/lib/components/SafeDepositRental/SafeBoxCases.js +7 -0
  130. package/lib/components/SafeDepositRental/SafeBoxCases.js.map +1 -0
  131. package/lib/components/SafeDepositRental/SafeDepositRental.js +5 -71
  132. package/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  133. package/lib/components/SafeDepositRental/SafeDepositRentalContent.d.ts +17 -0
  134. package/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +5 -5
  135. package/lib/components/SafeDepositRental/SafeDepositRentalForm.js +50 -65
  136. package/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
  137. package/lib/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +5 -7
  138. package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js +15 -9
  139. package/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  140. package/lib/components/SafeDepositRental/WrapperSelect.d.ts +11 -0
  141. package/lib/components/SafeDepositRental/WrapperSelect.js +8 -0
  142. package/lib/components/SafeDepositRental/WrapperSelect.js.map +1 -0
  143. package/lib/components/SafeDepositRental/fetchBranches.d.ts +2 -0
  144. package/lib/components/SafeDepositRental/fetchBranches.js +17 -0
  145. package/lib/components/SafeDepositRental/fetchBranches.js.map +1 -0
  146. package/lib/components/SafeDepositRental/useGetRegions.d.ts +6 -0
  147. package/lib/components/SafeDepositRental/useGetRegions.js +8 -0
  148. package/lib/components/SafeDepositRental/useGetRegions.js.map +1 -0
  149. package/lib/ui-kit/BenefitItem/BenefitItem.d.ts +1 -1
  150. package/lib/ui-kit/BenefitItem/BenefitItem.js +3 -2
  151. package/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
  152. package/lib/ui-kit/InputRange/InputRange.js +1 -1
  153. package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  154. package/lib/ui-kit/Radio/Radio.js +1 -1
  155. package/lib/ui-kit/Radio/Radio.js.map +1 -1
  156. package/lib/ui-kit/Select/Select.js +1 -1
  157. package/lib/ui-kit/Select/Select.js.map +1 -1
  158. package/lib/ui-kit/Select/SelectOption.d.ts +1 -0
  159. package/lib/ui-kit/Select/SelectOption.js +2 -2
  160. package/lib/ui-kit/Select/SelectOption.js.map +1 -1
  161. package/mobile/bundle/bundle.umd.js +6 -5
  162. package/mobile/bundle/bundle.umd.min.js +1 -1
  163. package/mobile/dist/components/BlockContent.d.ts +3 -1
  164. package/mobile/dist/components/Calculator/BonusCalculatorForm.js +1 -1
  165. package/mobile/dist/components/Calculator/Calculator.js +6 -4
  166. package/mobile/dist/components/Calculator/Calculator.js.map +1 -1
  167. package/mobile/dist/components/Calculator/CalculatorContent.d.ts +7 -6
  168. package/mobile/dist/components/Calculator/CalculatorValueBlock.js +1 -1
  169. package/mobile/dist/components/Calculator/CalculatorValueBlock.js.map +1 -1
  170. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +1 -1
  171. package/mobile/dist/components/Calculator/MortgageCalculatorForm.js +1 -3
  172. package/mobile/dist/components/Calculator/MortgageCalculatorForm.js.map +1 -1
  173. package/mobile/dist/components/Calculator/Rate.js +1 -1
  174. package/mobile/dist/components/Calculator/Rate.js.map +1 -1
  175. package/mobile/dist/components/Calculator/renderCalculatorBlock.js +2 -1
  176. package/mobile/dist/components/Calculator/renderCalculatorBlock.js.map +1 -1
  177. package/mobile/dist/components/Calculator/renderInitialFeeInput.js +1 -1
  178. package/mobile/dist/components/Calculator/renderMonthsInput.js +1 -1
  179. package/mobile/dist/components/Calculator/renderProposalMortgage.js +2 -1
  180. package/mobile/dist/components/Calculator/renderProposalMortgage.js.map +1 -1
  181. package/mobile/dist/components/ErrorBlock/ErrorBlock.d.ts +5 -0
  182. package/mobile/dist/components/ErrorBlock/ErrorBlock.js +23 -0
  183. package/mobile/dist/components/ErrorBlock/ErrorBlock.js.map +1 -0
  184. package/mobile/dist/components/ErrorBlock/ErrorBlockContent.d.ts +35 -0
  185. package/mobile/dist/components/ErrorBlock/ErrorBlockContent.js +2 -0
  186. package/mobile/dist/components/ErrorBlock/ErrorBlockContent.js.map +1 -0
  187. package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.d.ts +5 -0
  188. package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js +12 -0
  189. package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -0
  190. package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +24 -0
  191. package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.js +2 -0
  192. package/mobile/dist/components/OfficeServicesBlock/OfficeServicesBlockContent.js.map +1 -0
  193. package/mobile/dist/components/PictureText/PictureText.js +4 -4
  194. package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
  195. package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.d.ts +12 -0
  196. package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.js +9 -0
  197. package/mobile/dist/components/SafeDepositRental/RegionsAndBranches.js.map +1 -0
  198. package/mobile/dist/components/SafeDepositRental/RenderRadioButtons.d.ts +2 -0
  199. package/mobile/dist/components/SafeDepositRental/RenderRadioButtons.js +12 -0
  200. package/mobile/dist/components/SafeDepositRental/RenderRadioButtons.js.map +1 -0
  201. package/mobile/dist/components/SafeDepositRental/RentalPeriod.d.ts +6 -0
  202. package/mobile/dist/components/SafeDepositRental/RentalPeriod.js +10 -0
  203. package/mobile/dist/components/SafeDepositRental/RentalPeriod.js.map +1 -0
  204. package/mobile/dist/components/SafeDepositRental/SafeBoxCases.d.ts +11 -0
  205. package/mobile/dist/components/SafeDepositRental/SafeBoxCases.js +9 -0
  206. package/mobile/dist/components/SafeDepositRental/SafeBoxCases.js.map +1 -0
  207. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js +5 -71
  208. package/mobile/dist/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  209. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalContent.d.ts +17 -0
  210. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.d.ts +5 -5
  211. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js +51 -67
  212. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
  213. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +5 -7
  214. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js +15 -10
  215. package/mobile/dist/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  216. package/mobile/dist/components/SafeDepositRental/WrapperSelect.d.ts +11 -0
  217. package/mobile/dist/components/SafeDepositRental/WrapperSelect.js +10 -0
  218. package/mobile/dist/components/SafeDepositRental/WrapperSelect.js.map +1 -0
  219. package/mobile/dist/components/SafeDepositRental/fetchBranches.d.ts +2 -0
  220. package/mobile/dist/components/SafeDepositRental/fetchBranches.js +20 -0
  221. package/mobile/dist/components/SafeDepositRental/fetchBranches.js.map +1 -0
  222. package/mobile/dist/components/SafeDepositRental/useGetRegions.d.ts +6 -0
  223. package/mobile/dist/components/SafeDepositRental/useGetRegions.js +11 -0
  224. package/mobile/dist/components/SafeDepositRental/useGetRegions.js.map +1 -0
  225. package/mobile/dist/ui-kit/BenefitItem/BenefitItem.d.ts +1 -1
  226. package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js +3 -2
  227. package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
  228. package/mobile/dist/ui-kit/InputRange/InputRange.js +1 -1
  229. package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
  230. package/mobile/dist/ui-kit/Radio/Radio.js +1 -1
  231. package/mobile/dist/ui-kit/Radio/Radio.js.map +1 -1
  232. package/mobile/dist/ui-kit/Select/Select.js +1 -1
  233. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  234. package/mobile/dist/ui-kit/Select/SelectOption.d.ts +1 -0
  235. package/mobile/dist/ui-kit/Select/SelectOption.js +2 -2
  236. package/mobile/dist/ui-kit/Select/SelectOption.js.map +1 -1
  237. package/mobile/lib/components/BlockContent.d.ts +3 -1
  238. package/mobile/lib/components/Calculator/BonusCalculatorForm.js +1 -1
  239. package/mobile/lib/components/Calculator/Calculator.js +6 -4
  240. package/mobile/lib/components/Calculator/Calculator.js.map +1 -1
  241. package/mobile/lib/components/Calculator/CalculatorContent.d.ts +7 -6
  242. package/mobile/lib/components/Calculator/CalculatorValueBlock.js +1 -1
  243. package/mobile/lib/components/Calculator/CalculatorValueBlock.js.map +1 -1
  244. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +1 -1
  245. package/mobile/lib/components/Calculator/MortgageCalculatorForm.js +1 -3
  246. package/mobile/lib/components/Calculator/MortgageCalculatorForm.js.map +1 -1
  247. package/mobile/lib/components/Calculator/Rate.js +1 -1
  248. package/mobile/lib/components/Calculator/Rate.js.map +1 -1
  249. package/mobile/lib/components/Calculator/renderCalculatorBlock.js +3 -2
  250. package/mobile/lib/components/Calculator/renderCalculatorBlock.js.map +1 -1
  251. package/mobile/lib/components/Calculator/renderInitialFeeInput.js +1 -1
  252. package/mobile/lib/components/Calculator/renderMonthsInput.js +1 -1
  253. package/mobile/lib/components/Calculator/renderProposalMortgage.js +2 -1
  254. package/mobile/lib/components/Calculator/renderProposalMortgage.js.map +1 -1
  255. package/mobile/lib/components/ErrorBlock/ErrorBlock.d.ts +5 -0
  256. package/mobile/lib/components/ErrorBlock/ErrorBlock.js +21 -0
  257. package/mobile/lib/components/ErrorBlock/ErrorBlock.js.map +1 -0
  258. package/mobile/lib/components/ErrorBlock/ErrorBlockContent.d.ts +35 -0
  259. package/mobile/lib/components/ErrorBlock/ErrorBlockContent.js +2 -0
  260. package/mobile/lib/components/ErrorBlock/ErrorBlockContent.js.map +1 -0
  261. package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.d.ts +5 -0
  262. package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js +10 -0
  263. package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlock.js.map +1 -0
  264. package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.d.ts +24 -0
  265. package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.js +2 -0
  266. package/mobile/lib/components/OfficeServicesBlock/OfficeServicesBlockContent.js.map +1 -0
  267. package/mobile/lib/components/PictureText/PictureText.js +4 -4
  268. package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
  269. package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.d.ts +12 -0
  270. package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.js +7 -0
  271. package/mobile/lib/components/SafeDepositRental/RegionsAndBranches.js.map +1 -0
  272. package/mobile/lib/components/SafeDepositRental/RenderRadioButtons.d.ts +2 -0
  273. package/mobile/lib/components/SafeDepositRental/RenderRadioButtons.js +10 -0
  274. package/mobile/lib/components/SafeDepositRental/RenderRadioButtons.js.map +1 -0
  275. package/mobile/lib/components/SafeDepositRental/RentalPeriod.d.ts +6 -0
  276. package/mobile/lib/components/SafeDepositRental/RentalPeriod.js +8 -0
  277. package/mobile/lib/components/SafeDepositRental/RentalPeriod.js.map +1 -0
  278. package/mobile/lib/components/SafeDepositRental/SafeBoxCases.d.ts +11 -0
  279. package/mobile/lib/components/SafeDepositRental/SafeBoxCases.js +7 -0
  280. package/mobile/lib/components/SafeDepositRental/SafeBoxCases.js.map +1 -0
  281. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js +5 -71
  282. package/mobile/lib/components/SafeDepositRental/SafeDepositRental.js.map +1 -1
  283. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalContent.d.ts +17 -0
  284. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.d.ts +5 -5
  285. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js +50 -65
  286. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalForm.js.map +1 -1
  287. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.d.ts +5 -7
  288. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js +15 -9
  289. package/mobile/lib/components/SafeDepositRental/SafeDepositRentalTotal.js.map +1 -1
  290. package/mobile/lib/components/SafeDepositRental/WrapperSelect.d.ts +11 -0
  291. package/mobile/lib/components/SafeDepositRental/WrapperSelect.js +8 -0
  292. package/mobile/lib/components/SafeDepositRental/WrapperSelect.js.map +1 -0
  293. package/mobile/lib/components/SafeDepositRental/fetchBranches.d.ts +2 -0
  294. package/mobile/lib/components/SafeDepositRental/fetchBranches.js +17 -0
  295. package/mobile/lib/components/SafeDepositRental/fetchBranches.js.map +1 -0
  296. package/mobile/lib/components/SafeDepositRental/useGetRegions.d.ts +6 -0
  297. package/mobile/lib/components/SafeDepositRental/useGetRegions.js +8 -0
  298. package/mobile/lib/components/SafeDepositRental/useGetRegions.js.map +1 -0
  299. package/mobile/lib/ui-kit/BenefitItem/BenefitItem.d.ts +1 -1
  300. package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js +3 -2
  301. package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
  302. package/mobile/lib/ui-kit/InputRange/InputRange.js +1 -1
  303. package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
  304. package/mobile/lib/ui-kit/Radio/Radio.js +1 -1
  305. package/mobile/lib/ui-kit/Radio/Radio.js.map +1 -1
  306. package/mobile/lib/ui-kit/Select/Select.js +1 -1
  307. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  308. package/mobile/lib/ui-kit/Select/SelectOption.d.ts +1 -0
  309. package/mobile/lib/ui-kit/Select/SelectOption.js +2 -2
  310. package/mobile/lib/ui-kit/Select/SelectOption.js.map +1 -1
  311. package/mobile/src/common.css +1 -1
  312. package/mobile/src/components/BlockContent.ts +5 -1
  313. package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +1 -1
  314. package/mobile/src/components/Calculator/Calculator.tsx +6 -4
  315. package/mobile/src/components/Calculator/CalculatorContent.ts +11 -6
  316. package/mobile/src/components/Calculator/CalculatorValueBlock.tsx +1 -1
  317. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +1 -1
  318. package/mobile/src/components/Calculator/MortgageCalculatorForm.tsx +2 -8
  319. package/mobile/src/components/Calculator/Rate.tsx +3 -3
  320. package/mobile/src/components/Calculator/renderCalculatorBlock.tsx +2 -0
  321. package/mobile/src/components/Calculator/renderInitialFeeInput.tsx +1 -1
  322. package/mobile/src/components/Calculator/renderMonthsInput.tsx +1 -1
  323. package/mobile/src/components/Calculator/renderProposalMortgage.tsx +7 -2
  324. package/mobile/src/components/ErrorBlock/ErrorBlock.example.json +13 -0
  325. package/mobile/src/components/ErrorBlock/ErrorBlock.tsx +45 -0
  326. package/mobile/src/components/ErrorBlock/ErrorBlockContent.ts +38 -0
  327. package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlock.example.json +33 -0
  328. package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +41 -0
  329. package/mobile/src/components/OfficeServicesBlock/OfficeServicesBlockContent.ts +26 -0
  330. package/mobile/src/components/PictureText/PictureText.tsx +6 -6
  331. package/mobile/src/components/SafeDepositRental/RegionsAndBranches.tsx +50 -0
  332. package/mobile/src/components/SafeDepositRental/RenderRadioButtons.tsx +29 -0
  333. package/mobile/src/components/SafeDepositRental/RentalPeriod.tsx +18 -0
  334. package/mobile/src/components/SafeDepositRental/SafeBoxCases.tsx +48 -0
  335. package/mobile/src/components/SafeDepositRental/SafeDepositRental.tsx +8 -78
  336. package/mobile/src/components/SafeDepositRental/SafeDepositRentalContent.ts +21 -0
  337. package/mobile/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +86 -143
  338. package/mobile/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +23 -15
  339. package/mobile/src/components/SafeDepositRental/WrapperSelect.tsx +45 -0
  340. package/mobile/src/components/SafeDepositRental/fetchBranches.ts +21 -0
  341. package/mobile/src/components/SafeDepositRental/useGetRegions.ts +16 -0
  342. package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +38 -65
  343. package/mobile/src/ui-kit/BenefitItem/BenefitItem.tsx +12 -9
  344. package/mobile/src/ui-kit/InputRange/InputRange.tsx +1 -1
  345. package/mobile/src/ui-kit/Radio/Radio.tsx +1 -1
  346. package/mobile/src/ui-kit/Select/Select.tsx +1 -0
  347. package/mobile/src/ui-kit/Select/SelectOption.tsx +3 -2
  348. package/package.json +1 -1
  349. package/src/common.css +1 -1
  350. package/src/components/BlockContent.ts +5 -1
  351. package/src/components/Blocks.ts +5 -1
  352. package/src/components/Calculator/BonusCalculatorForm.tsx +1 -1
  353. package/src/components/Calculator/Calculator.fixture.tsx +1 -0
  354. package/src/components/Calculator/Calculator.tsx +6 -4
  355. package/src/components/Calculator/CalculatorContent.ts +11 -6
  356. package/src/components/Calculator/CalculatorValueBlock.tsx +1 -1
  357. package/src/components/Calculator/CreditCalculatorForm.tsx +1 -1
  358. package/src/components/Calculator/MortgageCalculatorForm.tsx +2 -8
  359. package/src/components/Calculator/Rate.tsx +3 -3
  360. package/src/components/Calculator/renderCalculatorBlock.tsx +2 -0
  361. package/src/components/Calculator/renderInitialFeeInput.tsx +1 -1
  362. package/src/components/Calculator/renderMonthsInput.tsx +1 -1
  363. package/src/components/Calculator/renderProposalMortgage.tsx +7 -2
  364. package/src/components/ErrorBlock/ErrorBlock.example.json +13 -0
  365. package/src/components/ErrorBlock/ErrorBlock.fixture.tsx +53 -0
  366. package/src/components/ErrorBlock/ErrorBlock.tsx +45 -0
  367. package/src/components/ErrorBlock/ErrorBlockContent.ts +38 -0
  368. package/src/components/OfficeServicesBlock/OfficeServicesBlock.example.json +33 -0
  369. package/src/components/OfficeServicesBlock/OfficeServicesBlock.fixture.tsx +44 -0
  370. package/src/components/OfficeServicesBlock/OfficeServicesBlock.tsx +41 -0
  371. package/src/components/OfficeServicesBlock/OfficeServicesBlockContent.ts +26 -0
  372. package/src/components/PictureText/PictureText.fixture.tsx +1 -1
  373. package/src/components/PictureText/PictureText.tsx +6 -6
  374. package/src/components/SafeDepositRental/RegionsAndBranches.tsx +50 -0
  375. package/src/components/SafeDepositRental/RenderRadioButtons.tsx +29 -0
  376. package/src/components/SafeDepositRental/RentalPeriod.tsx +18 -0
  377. package/src/components/SafeDepositRental/SafeBoxCases.tsx +48 -0
  378. package/src/components/SafeDepositRental/SafeDepositRental.fixture.tsx +1 -0
  379. package/src/components/SafeDepositRental/SafeDepositRental.tsx +8 -78
  380. package/src/components/SafeDepositRental/SafeDepositRentalContent.ts +21 -0
  381. package/src/components/SafeDepositRental/SafeDepositRentalForm.tsx +86 -143
  382. package/src/components/SafeDepositRental/SafeDepositRentalTotal.tsx +23 -15
  383. package/src/components/SafeDepositRental/WrapperSelect.tsx +45 -0
  384. package/src/components/SafeDepositRental/fetchBranches.ts +21 -0
  385. package/src/components/SafeDepositRental/useGetRegions.ts +16 -0
  386. package/src/components/__snapshots__/Blocks.spec.tsx.snap +38 -65
  387. package/src/ui-kit/BenefitItem/BenefitItem.tsx +12 -9
  388. package/src/ui-kit/InputRange/InputRange.tsx +1 -1
  389. package/src/ui-kit/Radio/Radio.tsx +1 -1
  390. package/src/ui-kit/Select/Select.tsx +1 -0
  391. package/src/ui-kit/Select/SelectOption.tsx +3 -2
  392. package/mobile/src/components/SafeDepositRental/SafeDepositRental.example.json +0 -3
  393. package/src/components/SafeDepositRental/SafeDepositRental.example.json +0 -3
@@ -633,6 +633,11 @@
633
633
  return (jsxs(BlockWrapper, { className: `font-sans text-primary-text p-[50px] bg-white ${className}`, context: context, ...rest, children: [jsx(Headline, { className: "!p-0", title: title, description: description, context: context, align: align, headlineVersion: "M", as: "h2" }), jsx(LinkDocsList, { className: `mt-8 ${linkColumnsModeStyleMap[columnsMode]}`, columnsMode: columnsMode, documents: documents, icon: icon })] }));
634
634
  });
635
635
 
636
+ const VersionStyleMap = {
637
+ primary: 'bg-white text-primary-text',
638
+ secondary: 'bg-primary-main text-white',
639
+ };
640
+
636
641
  const titleStyleMap = {
637
642
  primary: 'text-primary-text',
638
643
  secondary: 'text-white',
@@ -644,7 +649,8 @@
644
649
  const BenefitItem = JSX((props) => {
645
650
  const { className = '', icon, label, description, version = 'primary', benefitsVersion = 'normal', } = props;
646
651
  const isIconWhite = benefitsVersion === 'white' || version === 'secondary';
647
- return (jsxs("div", { className: `flex items-start gap-5 ${className}`, children: [icon ? (jsx(Img, { className: renderBenefitIconBgStyle(version, benefitsVersion), image: { ...icon, iconVersion: isIconWhite ? 'white' : 'normal' }, asSVG: true })) : null, jsxs("div", { className: "gap-0.5", children: [label ? jsx("div", { className: `text-h6 ${titleStyleMap[version]}`, children: label }) : null, description ? (jsx("div", { className: `text-m-light ${descStyleMap[version]}`, children: description })) : null] })] }));
652
+ const listItemAlign = description ? 'items-start' : 'items-center';
653
+ return (jsxs("div", { className: `flex gap-5 ${listItemAlign} ${className}`, children: [icon ? (jsx("div", { className: renderBenefitIconBgStyle(version, benefitsVersion), children: jsx(Img, { className: "w-[24px] h-[24px]", image: { ...icon, iconVersion: isIconWhite ? 'white' : 'normal' }, asSVG: true }) })) : null, jsxs("div", { className: "gap-0.5", children: [label ? jsx("div", { className: `text-h6 ${titleStyleMap[version]}`, children: label }) : null, description ? (jsx("div", { className: `text-m-light ${descStyleMap[version]}`, children: description })) : null] })] }));
648
654
  });
649
655
  function renderBenefitIconBgStyle(version, benefitsVersion) {
650
656
  let bgColorStyle = 'bg-primary-main text-black';
@@ -654,18 +660,13 @@
654
660
  else if (benefitsVersion === 'normal') {
655
661
  bgColorStyle = 'bg-secondary-light text-primary-main';
656
662
  }
657
- return `w-[50px] h-[50px] min-w-[50px] rounded-full p-[10px] box-border ${bgColorStyle}`;
663
+ return `w-[50px] h-[50px] min-w-[50px] rounded-full p-[10px] box-border flex items-center justify-center ${bgColorStyle}`;
658
664
  }
659
665
 
660
666
  const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', { maximumSignificantDigits: 3 }).format(number);
661
667
 
662
- const VersionStyleMap = {
663
- primary: 'bg-white text-primary-text',
664
- secondary: 'bg-primary-main text-white',
665
- };
666
-
667
668
  const PictureText = JSX(({ className = '', context, title, description, image, benefits, version = 'primary', sum, monthLimit, directionRight = false, ...rest }) => {
668
- return (jsxs(BlockWrapper, { className: `relative font-sans p-14 ${VersionStyleMap[version]} ${className}`, context: context, ...rest, children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", bgColorHeadline: version, align: "center" }), jsxs("div", { className: 'flex justify-center gap-[122px] mt-[30px]', children: [image?.src && jsx(Img, { className: directionRight ? 'order-2 ml-6' : 'mr-6', image: image }), jsxs("div", { className: "w-[558px] m-auto", children: [benefits?.length ? (jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit$2(version)) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] })] }));
669
+ return (jsxs(BlockWrapper, { className: `relative font-sans p-14 ${VersionStyleMap[version]} ${className}`, context: context, ...rest, children: [jsx(Headline, { context: context, className: "!p-0", title: title, description: description, headlineVersion: "M", bgColorHeadline: version, align: "center" }), jsxs("div", { className: 'flex justify-center gap-[122px] mt-[30px]', children: [image?.src ? jsx(Img, { className: directionRight ? 'order-2' : '', image: image }) : null, jsxs("div", { className: "w-[558px] m-auto", children: [benefits?.length ? (jsx("div", { className: "flex flex-col gap-4", children: benefits.map(renderBenefit$2(version)) })) : null, renderInsuranceSumMonth(sum, monthLimit)] })] })] }));
669
670
  });
670
671
  const renderBenefit$2 = (version) => (benefit, i) => (jsx(BenefitItem, { icon: benefit.icon, label: benefit.label, description: benefit.description, version: version }, String(i)));
671
672
  function renderInsuranceSumMonth(sum, monthLimit) {
@@ -1235,7 +1236,7 @@
1235
1236
  };
1236
1237
 
1237
1238
  const CalculatorValueBlock = JSX(({ title, value, postfix = '', prefix, className = '' }) => {
1238
- return (jsxs("div", { className: `mb-5 ${className}`, children: [title ? jsx("div", { className: "text-l-light", children: title }) : null, value ? (jsxs("div", { className: "text-h3", children: [prefix, " ", addSpacesBetweenNumbers(Math.round(value)), " ", postfix] })) : null] }));
1239
+ return (jsxs("div", { className: `mb-5 ${className}`, children: [title ? jsx("div", { className: "text-l-light text-secondary-text", children: title }) : null, value ? (jsxs("div", { className: "text-h3", children: [prefix, " ", addSpacesBetweenNumbers(Math.round(value)), " ", postfix] })) : null] }));
1239
1240
  });
1240
1241
 
1241
1242
  const DEFAULT_MIN_SUM = 60000;
@@ -1275,7 +1276,7 @@
1275
1276
  const CREDIT_CALC_DEFAULT_DIR = 'credit-calculator-data';
1276
1277
  const BONUS_CALC_DEFAULT_DIR = 'bonus-calculator-data';
1277
1278
 
1278
- const Rate = JSX(({ rate, title = 'Ставка', unit, rateBlockClassName }) => (jsxs("div", { children: [jsx("div", { className: "text-l-light ml-3", children: title }), jsxs("div", { className: "flex justify-start", children: [jsx("span", { className: `block calc-rate-text font-mohave text-title-huge pr-6 -mt-4 ${rateBlockClassName}`, children: String(rate).replace('.', ',') }), unit ? jsx("span", { className: "calc-rate-text text-[65px] leading-[75px]", children: unit }) : ''] })] })));
1279
+ const Rate = JSX(({ rate, title = 'Ставка', unit, rateBlockClassName }) => (jsxs("div", { children: [jsx("div", { className: "text-l-light text-secondary-text", children: title }), jsxs("div", { className: "flex justify-start", children: [jsx("span", { className: `block gradient-color-text font-mohave text-title-huge pr-6 -mt-4 ${rateBlockClassName}`, children: String(rate).replace('.', ',') }), unit ? jsx("span", { className: "gradient-color-text text-[65px] leading-[75px]", children: unit }) : ''] })] })));
1279
1280
 
1280
1281
  function renderButtonSection(context, buttons) {
1281
1282
  return buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-7 gap-2" })) : null;
@@ -1304,7 +1305,7 @@
1304
1305
  onChange(max);
1305
1306
  }
1306
1307
  };
1307
- return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? jsx("span", { className: "text-m font-light", children: title }) : null, jsx("input", { className: `m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-main-stroke rounded-md
1308
+ return (jsxs("div", { className: className, children: [jsxs("label", { className: "block relative", children: [title ? jsx("span", { className: "text-m-light", children: title }) : null, jsx("input", { className: `m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-main-stroke rounded-md
1308
1309
  outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-focus ${DISABLED_INPUT_CLASSES}`, value: addSpacesBetweenNumbers(value), disabled: disabled, onChange: (e) => handleChange(e.target.value), onBlur: handleBlur }), jsx("div", { className: "absolute inset-x-0 -bottom-1 px-4 leading-[18px]", children: jsx("input", { className: "box-border w-full m-0 cursor-pointer slider", type: "range", min: min, max: max, step: step, value: value, disabled: disabled, onChange: (e) => handleChange(e.target.value), style: inputStyle }) })] }), jsx("div", { className: "flex justify-between my-2", children: items.map((item, i) => (jsx("span", { className: "text-s-light text-secondary-text", children: item }, String(i)))) })] }));
1309
1310
  });
1310
1311
 
@@ -1438,7 +1439,7 @@
1438
1439
  step: 500,
1439
1440
  isShowItems: false,
1440
1441
  }, setTravelExpenseValue), renderWantedSumInput('Сумма покупок в остальных категориях, ₽', {
1441
- className: 'mt-6',
1442
+ className: 'mt-7',
1442
1443
  minSum: minSumOther,
1443
1444
  maxSum: maxSumOther,
1444
1445
  moneyValue: restExpenseValue,
@@ -1475,7 +1476,7 @@
1475
1476
  const text = Number(month) % 10 === 1 ? 'месяца' : 'месяцев';
1476
1477
  return `${month} ${text}`;
1477
1478
  };
1478
- return (jsx(InputRange, { className: "mt-6", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: clamp(monthsValue, minMonths, maxMonths), onChange: callback }));
1479
+ return (jsx(InputRange, { className: "mt-7", title: title, items: [`От ${monthText(minMonths)}`, `До ${monthText(maxMonths)}`], min: minMonths, max: maxMonths, step: STEP_MONTHS, value: clamp(monthsValue, minMonths, maxMonths), onChange: callback }));
1479
1480
  }
1480
1481
 
1481
1482
  const RadioButtonGroup = JSX(({ items, checkedItem, onChangeCheckedItem }) => {
@@ -1548,7 +1549,7 @@
1548
1549
  monthsValue,
1549
1550
  };
1550
1551
  const calculatorParams = useCreditCalculatorParams(userInputParams, sourceBookDir);
1551
- return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, setMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, setMonthsValue), jsxs("div", { className: "pt-7", children: [jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", checked: isSalaryClient, onChange: toggleIsSalaryClient }), jsx(Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", checked: isStateEmployee, onChange: toggleIsStateEmployee }), jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsurance, onChange: toggleIsInsurance })] })] }), jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.finalRate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-[351px]", children: [jsx(CalculatorValueBlock, { title: isAnnuity ? 'Ежемесячный платеж' : 'Платёж в первый месяц', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), renderPaymentTypeSelector(context, {
1552
+ return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderWantedSumInput('Сумма кредита, ₽', { ...calculatorParams, step: 500 }, setMoneyValue), renderMonthsInput('Срок кредита, месяцев', calculatorParams, setMonthsValue), jsxs("div", { className: "mt-7", children: [jsx(Checkbox, { text: "\u041F\u043E\u043B\u0443\u0447\u0430\u044E \u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0443 \u043D\u0430 \u0441\u0447\u0451\u0442 \u0432 \u0420\u043E\u0441\u0441\u0435\u043B\u044C\u0445\u043E\u0437\u0431\u0430\u043D\u043A\u0435", checked: isSalaryClient, onChange: toggleIsSalaryClient }), jsx(Checkbox, { className: "mt-3", text: "\u0420\u0430\u0431\u043E\u0442\u0430\u044E \u0432 \u0431\u044E\u0434\u0436\u0435\u0442\u043D\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", checked: isStateEmployee, onChange: toggleIsStateEmployee }), jsx(Checkbox, { className: "mt-3", text: "\u041A\u043E\u043C\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u044F \u0437\u0430\u0449\u0438\u0442\u0430", checked: isInsurance, onChange: toggleIsInsurance })] })] }), jsx(Rate, { title: "\u0421\u0442\u0430\u0432\u043A\u0430", rate: calculatorParams.finalRate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { className: "w-[351px]", children: [jsx(CalculatorValueBlock, { title: isAnnuity ? 'Ежемесячный платеж' : 'Платёж в первый месяц', value: calculatorParams.monthlyPayment, postfix: "\u20BD" }), renderPaymentTypeSelector(context, {
1552
1553
  items: paymentTypeItems,
1553
1554
  checkedItem: isAnnuity ? ANNUITY : DIFFERENTIAL,
1554
1555
  onChange: (text) => toggleIsAnnuity(text === ANNUITY),
@@ -1587,14 +1588,15 @@
1587
1588
  const { moneyValue } = props;
1588
1589
  const minSum = DEFAULT_MIN_SUM;
1589
1590
  const maxSum = DEFAULT_MAX_SUM;
1590
- return (jsx(InputRange, { className: "mt-6", title: title, items: [
1591
+ return (jsx(InputRange, { className: "mt-7", title: title, items: [
1591
1592
  `От ${addSpacesBetweenNumbers(minSum)} рублей`,
1592
1593
  `До ${addSpacesBetweenNumbers(maxSum)} рублей`,
1593
1594
  ], min: minSum, max: maxSum, step: STEP_MONEY$1, value: moneyValue, onChange: callback }));
1594
1595
  }
1595
1596
 
1597
+ const monthlyPayment = 777777; // TODO: hardcode
1596
1598
  function renderProposalMortgage({ credit, period, taxRefund }) {
1597
- return (jsxs("div", { children: [jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430", value: credit, postfix: "\u20BD" }), jsx(CalculatorValueBlock, { title: "\u0421\u0440\u043E\u043A", value: period, postfix: "\u043B\u0435\u0442" }), jsx(CalculatorValueBlock, { title: "\u041D\u0430\u043B\u043E\u0433\u043E\u0432\u044B\u0439 \u0432\u044B\u0447\u0435\u0442", value: taxRefund, postfix: "\u20BD" })] }));
1599
+ return (jsxs("div", { children: [jsxs("div", { className: "flex justify-between", children: [jsx(CalculatorValueBlock, { title: "\u0421\u0443\u043C\u043C\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u0430", value: credit, postfix: "\u20BD" }), jsx(CalculatorValueBlock, { title: "\u0421\u0440\u043E\u043A", value: period, postfix: "\u043B\u0435\u0442", className: "w-[120px]" })] }), jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: monthlyPayment, postfix: "\u20BD" }), jsx(CalculatorValueBlock, { title: "\u041D\u0430\u043B\u043E\u0433\u043E\u0432\u044B\u0439 \u0432\u044B\u0447\u0435\u0442", value: taxRefund, postfix: "\u20BD" })] }));
1598
1600
  }
1599
1601
 
1600
1602
  const STEP_MONEY = 1000;
@@ -1614,7 +1616,6 @@
1614
1616
  const minMonths = /*calculatorParams?.minMonths ||*/ DEFAULT_MIN_MONTHS;
1615
1617
  const maxMonths = /* calculatorParams?.maxMonths || */ DEFAULT_MAX_MONTHS;
1616
1618
  const rate = getCreditRate({ calculatorParams, isInsurance: isInsurance });
1617
- const monthlyPayment = 777777; // TODO: hardcode
1618
1619
  const proposalMortgageValue = { credit: 3892000, period: 15, taxRefund: 650000 }; // TODO: hardcode
1619
1620
  return (jsxs("section", { className: className, children: [jsxs("div", { className: "w-[468px]", children: [renderRealEstateValue('Стоимость недвижимости, ₽', { moneyValue }, setMoneyValue), renderInitialFeeInput('Первоначальный взнос, ₽', {
1620
1621
  moneyValue,
@@ -1622,7 +1623,7 @@
1622
1623
  minMonths,
1623
1624
  maxMonths,
1624
1625
  monthsValue,
1625
- }, setMonthsValue), jsxs("div", { className: "mt-7", children: [jsx(Checkbox, { text: "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435 \u0436\u0438\u0437\u043D\u0438", checked: isInsurance, onChange: toggleIsInsurance }), jsx(Checkbox, { className: "mt-4", text: "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435 \u0436\u0438\u0437\u043D\u0438, \u0437\u043B\u043E\u0440\u043E\u0432\u044C\u044F \u0438 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439 \u0443\u0442\u0440\u0430\u0442\u044B \u0442\u0440\u0443\u0434\u043E\u0441\u043F\u043E\u0441\u043E\u0431\u043D\u043E\u0441\u0442\u0438", checked: isFullInsurance, onChange: toggleIsFullInsurance })] })] }), jsxs("div", { children: [jsx(Rate, { rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsx(CalculatorValueBlock, { title: "\u0415\u0436\u0435\u043C\u0435\u0441\u044F\u0447\u043D\u044B\u0439 \u043F\u043B\u0430\u0442\u0435\u0436", value: monthlyPayment, postfix: "\u20BD" })] }), jsxs("div", { children: [jsx("div", { className: "w-[351px]", children: renderProposalMortgage(proposalMortgageValue) }), renderButtonSection(context, buttons)] })] }));
1626
+ }, setMonthsValue), jsxs("div", { className: "mt-7", children: [jsx(Checkbox, { text: "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435 \u0436\u0438\u0437\u043D\u0438", checked: isInsurance, onChange: toggleIsInsurance }), jsx(Checkbox, { className: "mt-4", text: "\u0421\u0442\u0440\u0430\u0445\u043E\u0432\u0430\u043D\u0438\u0435 \u0436\u0438\u0437\u043D\u0438, \u0437\u0434\u043E\u0440\u043E\u0432\u044C\u044F \u0438 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439 \u0443\u0442\u0440\u0430\u0442\u044B \u0442\u0440\u0443\u0434\u043E\u0441\u043F\u043E\u0441\u043E\u0431\u043D\u043E\u0441\u0442\u0438", checked: isFullInsurance, onChange: toggleIsFullInsurance })] })] }), jsx(Rate, { rate: rate, rateBlockClassName: "tracking-[-25px]", unit: "%" }), jsxs("div", { children: [jsx("div", { className: "w-[351px]", children: renderProposalMortgage(proposalMortgageValue) }), renderButtonSection(context, buttons)] })] }));
1626
1627
  });
1627
1628
 
1628
1629
  const EmbeddableCalcBlocks = {
@@ -1638,7 +1639,7 @@
1638
1639
  return null;
1639
1640
  }
1640
1641
  const EmbeddedBlock = EmbeddableCalcBlocks[type];
1641
- return (jsx("section", { className: `box-border relative bg-white flex shrink-0 self-start basis-full ${className}`, role: "listitem", children: jsx("div", { className: "box-border p-9 w-full", children: jsx(EmbeddedBlock, { context: context, ...block, className: "flex justify-between" }) }) }, String(i)));
1642
+ return (jsx("section", { className: `box-border relative bg-white flex shrink-0 self-start basis-full ${className}`, role: "listitem", children: jsxs("div", { className: "box-border p-9 w-full", children: [block?.title ? jsx(Heading, { className: "text-center mb-6", title: block.title }) : null, jsx(EmbeddedBlock, { context: context, ...block, className: "flex justify-between" })] }) }, String(i)));
1642
1643
  };
1643
1644
 
1644
1645
  const Calculator = JSX(({ className = '', context, calculatorTabs = [], ...rest }) => {
@@ -1666,12 +1667,14 @@
1666
1667
  const isActiveBtn = i === activeSlideIndex;
1667
1668
  const btnClassName = isActiveBtn
1668
1669
  ? 'h-[88px] w-[387px] min-w-[387px] p-5 border-none bg-primary-main text-white'
1669
- : `h-[77px] w-[322px] min-w-[322px] px-5 py-4 ease-in duration-300 bg-white text-primary-text`;
1670
+ : `h-[77px] w-[328px] min-w-[328px] px-5 py-4 ease-in duration-300 bg-white text-primary-text`;
1670
1671
  const btnTitleClassName = isActiveBtn ? 'text-xl mb-1.5' : `text-l mb-[3px]`;
1671
- const btnDescClassName = isActiveBtn ? 'text-l font-light text-white' : `text-m font-light`;
1672
+ const btnDescClassName = isActiveBtn
1673
+ ? 'text-l-light text-white'
1674
+ : `text-m-light text-secondary-text`;
1672
1675
  const iconClassName = isActiveBtn ? '' : `text-primary-main`;
1673
- return (jsxs("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className: `box-border font-sans relative border border-main-stroke cursor-pointer text-left border-b-0 flex hover:h-[88px]
1674
- ${btnClassName}`, children: [jsx(Img, { className: `h-[24px] w-[24px] min-w-[24px] min-h-[24px] mr-4 ${iconClassName}`, image: { ...tab?.icon, iconVersion: isActiveBtn ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "border-0", children: [jsx("div", { className: `${btnTitleClassName}`, children: tab?.title }), jsx("div", { className: `text-secondary-text ${btnDescClassName}`, children: tab.description })] })] }, String(i)));
1676
+ return (jsxs("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className: `box-border relative border border-main-stroke cursor-pointer text-left border-b-0 flex hover:h-[88px]
1677
+ ${btnClassName}`, children: [jsx(Img, { className: `h-[24px] w-[24px] min-w-[24px] min-h-[24px] mr-4 ${iconClassName}`, image: { ...tab?.icon, iconVersion: isActiveBtn ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true }), jsxs("div", { className: "border-0", children: [jsx("div", { className: `${btnTitleClassName}`, children: tab?.title }), jsx("div", { className: `${btnDescClassName}`, children: tab.description })] })] }, String(i)));
1675
1678
  }
1676
1679
  function renderTabs({ tabsShift, tabsNav, activeSlideIndex, setActiveSlideIndex }) {
1677
1680
  return (jsxs("div", { children: [jsx("div", { style: { transform: `translateX(-${tabsShift * 388}px)` }, className: "flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000", children: jsx("div", { className: "w-full flex flex-nowrap items-end gap-2", children: tabsNav.map((tab, i) => renderNavButton$2({
@@ -1682,6 +1685,40 @@
1682
1685
  })) }) }), jsx("div", { className: "w-full h-2 bg-primary-main" })] }));
1683
1686
  }
1684
1687
 
1688
+ const CurrencyMap = {
1689
+ RUB: '₽',
1690
+ USD: '$',
1691
+ EUR: '€',
1692
+ };
1693
+ const CurrencyInput = JSX(({ className = '', label, currency = 'RUB', onChange, value = '', minValue = 0, maxValue = 300000, ...inputProps }) => {
1694
+ const handleChange = (e) => {
1695
+ if (!onChange) {
1696
+ return;
1697
+ }
1698
+ const newValue = e.target.value === '' ? '' : String(clamp(e.target.value, minValue, maxValue));
1699
+ onChange(newValue);
1700
+ };
1701
+ return (jsxs("div", { className: className, children: [label ? jsx("label", { className: "block text-m-light mb-2", children: label }) : null, jsxs("div", { className: "h-[56px] relative flex items-center", children: [jsx("input", { type: "number", className: "text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke", onChange: handleChange, value: value, min: minValue, max: maxValue, ...inputProps }), jsx("span", { className: "text-xl-light absolute right-4", children: CurrencyMap[currency] })] })] }));
1702
+ });
1703
+
1704
+ const AMOUNT_KEY = 'amount';
1705
+ const INPUT_LABEL = 'Сумма перевода';
1706
+ const BUTTON_TEXT = 'Далее';
1707
+ const PLACEHOLDER = '1500';
1708
+ const TITLE = 'Укажите сумму перевода';
1709
+ const FORM_URL = 'https://www.rshb.ru/p2p/';
1710
+ const BUTTON_CLASS_PARAMS = {
1711
+ version: 'primary',
1712
+ className: 'w-full h-[56px] px-9 mt-6',
1713
+ };
1714
+ const CardTransfer = JSX(({ className = '', title = TITLE, ...rest }) => {
1715
+ const [value, setValue] = useState('');
1716
+ const isDisabled = !Number(value);
1717
+ return (jsxs(BlockWrapper, { className: `p-[50px] flex flex-col items-center font-sans bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, value: value, onChange: setValue, placeholder: PLACEHOLDER, label: INPUT_LABEL }), jsx("button", { type: "submit", className: isDisabled
1718
+ ? getDisabledButtonClasses(BUTTON_CLASS_PARAMS)
1719
+ : getRegularButtonClasses(BUTTON_CLASS_PARAMS), disabled: isDisabled, children: BUTTON_TEXT })] })] }));
1720
+ });
1721
+
1685
1722
  const iconVersionMap = {
1686
1723
  default: 'normal',
1687
1724
  primary: 'white',
@@ -1741,40 +1778,6 @@
1741
1778
  });
1742
1779
  };
1743
1780
 
1744
- const CurrencyMap = {
1745
- RUB: '₽',
1746
- USD: '$',
1747
- EUR: '€',
1748
- };
1749
- const CurrencyInput = JSX(({ className = '', label, currency = 'RUB', onChange, value = '', minValue = 0, maxValue = 300000, ...inputProps }) => {
1750
- const handleChange = (e) => {
1751
- if (!onChange) {
1752
- return;
1753
- }
1754
- const newValue = e.target.value === '' ? '' : String(clamp(e.target.value, minValue, maxValue));
1755
- onChange(newValue);
1756
- };
1757
- return (jsxs("div", { className: className, children: [label ? jsx("label", { className: "block text-m-light mb-2", children: label }) : null, jsxs("div", { className: "h-[56px] relative flex items-center", children: [jsx("input", { type: "number", className: "text-l pl-4 pr-8 w-full h-full rounded-md border border-solid border-main-stroke", onChange: handleChange, value: value, min: minValue, max: maxValue, ...inputProps }), jsx("span", { className: "text-xl-light absolute right-4", children: CurrencyMap[currency] })] })] }));
1758
- });
1759
-
1760
- const AMOUNT_KEY = 'amount';
1761
- const INPUT_LABEL = 'Сумма перевода';
1762
- const BUTTON_TEXT = 'Далее';
1763
- const PLACEHOLDER = '1500';
1764
- const TITLE = 'Укажите сумму перевода';
1765
- const FORM_URL = 'https://www.rshb.ru/p2p/';
1766
- const BUTTON_CLASS_PARAMS = {
1767
- version: 'primary',
1768
- className: 'w-full h-[56px] px-9 mt-6',
1769
- };
1770
- const CardTransfer = JSX(({ className = '', title = TITLE, ...rest }) => {
1771
- const [value, setValue] = useState('');
1772
- const isDisabled = !Number(value);
1773
- return (jsxs(BlockWrapper, { className: `p-[50px] flex flex-col items-center font-sans bg-white ${className}`, ...rest, children: [title ? jsx(Heading, { className: "max-w-[684px] pb-9", headingType: "h2", title: title }) : null, jsxs("form", { className: "w-[468px]", method: "POST", action: FORM_URL, children: [jsx(CurrencyInput, { name: AMOUNT_KEY, value: value, onChange: setValue, placeholder: PLACEHOLDER, label: INPUT_LABEL }), jsx("button", { type: "submit", className: isDisabled
1774
- ? getDisabledButtonClasses(BUTTON_CLASS_PARAMS)
1775
- : getRegularButtonClasses(BUTTON_CLASS_PARAMS), disabled: isDisabled, children: BUTTON_TEXT })] })] }));
1776
- });
1777
-
1778
1781
  const useTableArrowScrollControl = ({ columnsLength, colsLengthForScroll, activeCardIndex, setActiveCardIndex, }) => {
1779
1782
  const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
1780
1783
  const handlePrevClick = () => setActiveCardIndex(activeCardIndex - 1);
@@ -1983,11 +1986,11 @@
1983
1986
  background: `url('/icons/ArrowDownIcon.svg') no-repeat right 16px top 50%`,
1984
1987
  };
1985
1988
  const Select = JSX(({ className = '', id, name, children, value, onChange }) => {
1986
- return (jsx("select", { className: `appearance-none ${className}`, style: selectStyle, id: id, name: name || id, value: value, onChange: (e) => onChange(e.target.value), children: children }));
1989
+ return (jsx("select", { className: `appearance-none ${className}`, style: selectStyle, id: id, name: name || id, value: value, onChange: (e) => onChange(e.target.value), placeholder: "12321321312", children: children }));
1987
1990
  });
1988
1991
 
1989
- const SelectOption = JSX(({ className = '', value, selected, children }) => {
1990
- return (jsx("option", { className: className, value: `${value}`, selected: selected, children: children }));
1992
+ const SelectOption = JSX(({ className = '', value, selected, disabled = false, children }) => {
1993
+ return (jsx("option", { className: className, value: `${value}`, selected: selected, disabled: disabled, children: children }));
1991
1994
  });
1992
1995
 
1993
1996
  function renderInput(props) {
@@ -2506,6 +2509,11 @@
2506
2509
  .map((button, i) => (jsx(NavigationItem, { className: "first:rounded-tl-md first:rounded-bl-md last:rounded-tr-md last:rounded-br-md", isActive: button === activeButton, ...useLink({ router, handlerDecorator }, button) }, String(i)))) })) : null] }));
2507
2510
  });
2508
2511
 
2512
+ const OfficeServicesBlock = JSX(({ className = '', context, title, officesList, anchor = '' }) => {
2513
+ return (jsxs(BlockWrapper, { context: context, id: anchor, className: `font-sans bg-white p-12 flex flex-col ${className}`, children: [title ? jsx(Heading, { headingType: "h5", className: "mb-2.5", title: title }) : null, officesList?.length ? officesList.map(renderListItems) : null] }));
2514
+ });
2515
+ const renderListItems = (itemList, i) => (jsxs("li", { className: "flex mb-2.5 list-none", children: [itemList.icon ? (jsx(Img, { className: "mr-[14px] max-w-6 max-h-6", width: "24px", height: "24px", asSVG: true, image: itemList.icon })) : null, itemList.text ? jsx("span", { className: "text-l-light", children: itemList.text }) : null] }, `list_item_${String(i)}`));
2516
+
2509
2517
  const foldableBlockClassNames = 'transition-all duration-300 max-h-0 overflow-hidden';
2510
2518
  const useActiveHandler = ({ initialState = false }) => {
2511
2519
  const [isActive, setIsActive] = useState(initialState);
@@ -2670,162 +2678,130 @@
2670
2678
  }) }));
2671
2679
  };
2672
2680
 
2673
- const Radio = JSX(({ name, text, value, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer", children: [jsx("input", { className: "appearance-none flex justify-center items-center w-5 h-5 border-2 border-primary-main rounded-full cursor-pointer after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main", type: "radio", value: value, name: name, checked: checked, onChange: onChange }), text ? jsx("span", { className: "font-sans ml-3 cursor-pointer", children: text }) : null] }) })));
2674
-
2675
- // TODO: Добавить типизацию
2676
- const SafeDepositRentalForm = JSX(({ cities, cellDimensions, cellOptions, days, setDays }) => {
2677
- return (jsxs("div", { className: "flex-1 mr-9", children: [cities.length ? jsx(CitiesOffices, { cities: cities }) : null, renderRentalPeriod(days, setDays), cellDimensions.length && cellOptions.length ? (jsx(DimensionsOptions, { cellDimensions: cellDimensions, cellOptions: cellOptions })) : null, jsx("span", { className: "text-secondary-text text-l-light", children: "\u0422\u0438\u043F \u0434\u043E\u0433\u043E\u0432\u043E\u0440\u0430" }), jsxs("div", { className: "flex justify-between items-center mt-5", children: [jsx(RadioButtons, {}), jsx(Button, { text: "\u041E\u0444\u0438\u0441\u044B \u043D\u0430 \u043A\u0430\u0440\u0442\u0435", version: "primary" })] })] }));
2678
- });
2679
- const CitiesOffices = JSX(({ cities }) => {
2680
- const [selectedCity, setSelectedCity] = useState(cities[0].city);
2681
- const setSelected = (_) => setSelectedCity(_);
2682
- const offices = cities.find((_) => _.city === selectedCity).offices;
2683
- return (jsxs("div", { className: "flex justify-between mb-6", children: [jsx("div", { className: "w-full mr-4", children: cities.length
2684
- ? renderSelect({
2685
- data: cities,
2686
- field: 'city',
2687
- selected: selectedCity,
2688
- setSelected,
2689
- label: 'Город',
2690
- })
2691
- : null }), jsx("div", { className: "w-full", children: offices.length
2692
- ? renderSelect({
2693
- data: offices,
2694
- field: 'office',
2695
- selected: offices[0],
2696
- setSelected,
2697
- label: 'Отделение',
2698
- })
2699
- : null })] }));
2681
+ const BRANCHES_URL = '/api/v1/safeboxes';
2682
+ async function fetchBranches(regionCode) {
2683
+ try {
2684
+ const response = await fetch(BRANCHES_URL + `?regionCode=${regionCode}`, {
2685
+ headers: {
2686
+ 'Content-Type': 'application/json',
2687
+ },
2688
+ });
2689
+ const result = await response.json();
2690
+ return Promise.resolve(result);
2691
+ }
2692
+ catch (err) {
2693
+ console.error(err);
2694
+ return Promise.reject();
2695
+ }
2696
+ }
2697
+
2698
+ const WrapperSelect = JSX(({ data, fieldLabel, fieldValue, selected, placeholder = 'Выберите значение', setSelected, label, }) => {
2699
+ return (jsxs("div", { children: [jsx("span", { className: "block text-m-light mb-2", children: label }), jsxs(Select, { className: `h-14 border border-gray p-4 rounded-md text-s w-full cursor-pointer ${!selected ? 'text-secondary-text' : ''}`, value: selected, onChange: (_) => setSelected(_), children: [jsx(SelectOption, { value: "", children: placeholder }), data.map((_, i) => (jsx(SelectOption, { value: _?.[fieldValue || fieldLabel], children: _?.[fieldLabel] }, String(i))))] })] }));
2700
2700
  });
2701
- const DimensionsOptions = JSX(({ cellDimensions, cellOptions }) => {
2702
- const [selectedDimension, setSelectedDimension] = useState(cellDimensions[0].dimension);
2703
- const [selectedOption, setSelectedOption] = useState(cellOptions[0].option);
2704
- return (jsxs("div", { className: "flex justify-between mb-6", children: [jsx("div", { className: "mr-4 w-full", children: cellDimensions.length
2705
- ? renderSelect({
2706
- data: cellDimensions,
2707
- field: 'dimension',
2708
- selected: selectedDimension,
2709
- setSelected: setSelectedDimension,
2710
- label: 'Размер ячейки',
2711
- })
2712
- : null }), jsx("div", { className: "w-full", children: cellOptions.length
2713
- ? renderSelect({
2714
- data: cellOptions,
2715
- field: 'option',
2716
- selected: selectedOption,
2717
- setSelected: setSelectedOption,
2718
- label: 'Параметры ячейки, мм (ВхШхД)',
2719
- })
2720
- : null })] }));
2701
+
2702
+ const RegionsAndBranches = JSX(({ regions = [], selectedRegion, onSelectedRegion: onSelectedRegion, branches = [], selectedBranch, onSelectedBranch, }) => {
2703
+ return (jsxs("div", { className: "flex justify-between mb-6", children: [jsx("div", { className: "w-full mr-4", children: jsx(WrapperSelect, { data: regions, fieldValue: "code", fieldLabel: "name", selected: selectedRegion, setSelected: onSelectedRegion, label: "\u0413\u043E\u0440\u043E\u0434" }) }), jsx("div", { className: "w-full", children: jsx(WrapperSelect, { data: branches, fieldValue: "branchCode", fieldLabel: "address", selected: selectedBranch, setSelected: onSelectedBranch, label: "\u041E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435" }) })] }));
2721
2704
  });
2722
- const renderSelect = (props) => {
2723
- const { data, field, selected, setSelected, label } = props;
2724
- return (jsxs("div", { children: [jsx("span", { className: "block text-m-light mb-2", children: label }), jsx(Select, { className: "h-14 border border-gray p-4 rounded-md text-s w-full cursor-pointer", value: selected, onChange: (_) => setSelected(_), children: data.map((_, i) => (jsx(SelectOption, { value: _?.[field], children: _?.[field] }, String(i)))) })] }));
2725
- };
2726
- const renderRentalPeriod = (days, setDays) => {
2727
- const items = ['От 1 дня', 'До 365 дней'];
2728
- return (jsxs("div", { className: "mb-6", children: [jsx("span", { className: "block text-m-light mb-[3px]", children: "\u0421\u0440\u043E\u043A \u0430\u0440\u0435\u043D\u0434\u044B" }), jsx(InputRange, { min: 1, max: 365, value: days, items: items, onChange: setDays })] }));
2729
- };
2730
- // TODO: В качестве компонента не годится
2731
- const RadioButtons = JSX(() => {
2732
- const [selected, setSelected] = useState('option2');
2733
- const onChange = (_) => setSelected(_.target.value);
2734
- return (jsxs("div", { children: [jsx(Radio, { className: "mb-2", name: "contractType", text: "\u041F\u0440\u043E\u0441\u0442\u043E\u0435 \u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435", value: "option1", checked: selected === 'option1', onChange: onChange }), jsx(Radio, { name: "contractType", text: "\u0421\u0434\u0435\u043B\u043A\u0430 \u0441 \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u044C\u044E", value: "option2", checked: selected === 'option2', onChange: onChange })] }));
2705
+
2706
+ const Radio = JSX(({ name, text, value, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "flex items-center relative cursor-pointer", children: [jsx("input", { className: "appearance-none flex justify-center items-center shrink-0 w-5 h-5 border-2 border-primary-main rounded-full cursor-pointer after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main", type: "radio", value: value, name: name, checked: checked, onChange: onChange }), text ? jsx("span", { className: "font-sans ml-3 cursor-pointer", children: text }) : null] }) })));
2707
+
2708
+ const RenderRadioButtons = JSX(() => {
2709
+ const [selectedOption, setSelectedOption] = useState('option1');
2710
+ const onChange = (_) => setSelectedOption(_.target.value);
2711
+ return (jsxs("div", { children: [jsx(Radio, { className: "mb-2", name: "contractType", text: "\u041F\u0440\u043E\u0441\u0442\u043E\u0435 \u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435", value: "option1", checked: selectedOption === 'option1', onChange: onChange }), jsx(Radio, { name: "contractType", text: "\u0421\u0434\u0435\u043B\u043A\u0430 \u0441 \u043D\u0435\u0434\u0432\u0438\u0436\u0438\u043C\u043E\u0441\u0442\u044C\u044E", value: "option2", checked: selectedOption === 'option2', onChange: onChange })] }));
2735
2712
  });
2736
2713
 
2737
- const SafeDepositRentalTotal = ({ days }) => {
2738
- const price = calculatePrice(days);
2714
+ const ITEMS = ['От 1 дня', 'До 365 дней'];
2715
+ const MIN = 1;
2716
+ const MAX = 365;
2717
+ const RentalPeriod = JSX(({ days, setDays }) => (jsxs("div", { className: "mb-6", children: [jsx("span", { className: "block text-m-light mb-[3px]", children: "\u0421\u0440\u043E\u043A \u0430\u0440\u0435\u043D\u0434\u044B" }), jsx(InputRange, { min: MIN, max: MAX, value: days, items: ITEMS, onChange: setDays })] })));
2718
+
2719
+ const SafeBoxCases = JSX(({ caseVolumes = [], selectedCaseVolume, onSelectedCaseVolume, safeBoxCases = [], selectedBoxSize, onSelectedBoxSize, }) => {
2720
+ return (jsxs("div", { className: "flex justify-between mb-6", children: [jsx("div", { className: "mr-4 w-full", children: jsx(WrapperSelect, { data: caseVolumes, fieldLabel: "volume", selected: selectedCaseVolume, setSelected: onSelectedCaseVolume, label: "\u0420\u0430\u0437\u043C\u0435\u0440", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0430\u0437\u043C\u0435\u0440" }) }), jsx("div", { className: "w-full", children: jsx(WrapperSelect, { data: safeBoxCases, fieldLabel: "safeBoxCasesSize", selected: selectedBoxSize, setSelected: onSelectedBoxSize, label: "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u044F\u0447\u0435\u0439\u043A\u0438, \u043C\u043C (\u0412\u0445\u0428\u0445\u0414)", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u044F\u0447\u0435\u0439\u043A\u0438" }) })] }));
2721
+ });
2722
+
2723
+ const SafeDepositRentalTotal = JSX(({ days, tariffs = [] }) => {
2724
+ const price = calculatePrice(days, tariffs);
2739
2725
  return (jsxs("div", { className: "flex flex-col justify-between", children: [jsxs("div", { className: "flex", children: [renderTotal('Аренда за', days, 'mr-11'), renderTotal('Цена', price + ' ₽')] }), jsxs("div", { className: "bg-primary-main px-10 pt-10 pb-4 text-center", children: [jsx(Img, { image: { icon: 'PackA4Icon' }, width: "290", height: "257", asSVG: true }), jsxs("span", { className: "text-s-light text-white opacity-80 mt-2 inline-block", children: ["\u041D\u0430 \u0440\u0438\u0441\u0443\u043D\u043A\u0438 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0430 \u043F\u0430\u0447\u043A\u0430", jsx("br", {}), " \u043B\u0438\u0441\u0442\u043E\u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0430 \u04104"] })] })] }));
2740
- };
2726
+ });
2741
2727
  const renderTotal = (label, total, className = '') => {
2742
2728
  return (jsxs("div", { className: className, children: [jsx("span", { className: "block text-m-light mb-1", children: label }), jsx("span", { className: "text-h3", children: total })] }));
2743
2729
  };
2744
- const calculatePrice = (days) => {
2745
- let TariffType = 1;
2730
+ const calculatePrice = (days, tariffs) => {
2731
+ const tariffType = getTariffType(days);
2732
+ const tariffValue = tariffs?.find((_) => _.tariffType === String(tariffType))?.tariffValue || 0;
2733
+ return days * tariffValue;
2734
+ };
2735
+ const getTariffType = (days) => {
2736
+ let tariffType = 1;
2746
2737
  switch (true) {
2747
2738
  case days > 30 && days <= 90:
2748
- TariffType = 2;
2739
+ tariffType = 2;
2749
2740
  break;
2750
2741
  case days > 90 && days <= 180:
2751
- TariffType = 3;
2742
+ tariffType = 3;
2752
2743
  break;
2753
2744
  case days > 180 && days <= 365:
2754
- TariffType = 4;
2745
+ tariffType = 4;
2755
2746
  break;
2756
2747
  }
2757
- return days * TariffType;
2748
+ return tariffType;
2758
2749
  };
2759
2750
 
2760
2751
  const DEFAULT_DAYS = 26;
2761
- const DATA = {
2762
- cities: [
2763
- {
2764
- city: 'Москва',
2765
- offices: [
2766
- {
2767
- office: 'выберите отделение',
2768
- rate: null,
2769
- },
2770
- {
2771
- office: 'МоскваОфис1',
2772
- rate: 1,
2773
- },
2774
- {
2775
- office: 'МоскваОфис2',
2776
- rate: 2,
2777
- },
2778
- {
2779
- office: 'МоскваОфис3',
2780
- rate: 3,
2781
- },
2782
- ],
2783
- },
2784
- {
2785
- city: 'Краснодар',
2786
- offices: [
2787
- {
2788
- office: 'КраснодарОфис1',
2789
- rate: 2,
2790
- },
2791
- {
2792
- office: 'КраснодарОфис2',
2793
- rate: 4,
2794
- },
2795
- {
2796
- office: 'КраснодарОфис3',
2797
- rate: 6,
2798
- },
2799
- ],
2800
- },
2801
- ],
2802
- cellDimensions: [
2803
- {
2804
- dimension: 'маленькая',
2805
- },
2806
- {
2807
- dimension: 'средняя',
2808
- },
2809
- {
2810
- dimension: 'большая',
2811
- },
2812
- ],
2813
- cellOptions: [
2814
- {
2815
- option: '125x225x375',
2816
- },
2817
- {
2818
- option: '200x300x400',
2819
- },
2820
- {
2821
- option: '300x400x500',
2822
- },
2823
- ],
2824
- };
2825
- const SafeDepositRental = JSX(({ context, className = '', ...rest }) => {
2752
+ const SafeDepositRentalForm = JSX(({ regions }) => {
2753
+ const [selectedRegion, setSelectedRegion] = useState('');
2754
+ const [branches, setBranches] = useState([]);
2755
+ const [selectedBranch, setSelectedBranch] = useState('');
2756
+ const [selectedCaseVolume, setSelectedCaseVolume] = useState('');
2757
+ const [selectedBoxSize, setSelectedBoxSize] = useState('');
2826
2758
  const [days, setDays] = useState(DEFAULT_DAYS);
2827
- const data = DATA;
2828
- return (jsxs(BlockWrapper, { context: context, className: `bg-white px-8 py-12 ${className}`, ...rest, children: [jsxs("div", { className: "flex justify-between align-top mb-6", children: [data?.cities?.length ? (jsx(SafeDepositRentalForm, { ...data, days: days, setDays: setDays })) : null, jsx(SafeDepositRentalTotal, { days: days })] }), jsx("p", { className: "text-s-light text-secondary-text", children: "\u0410\u0440\u0435\u043D\u0434\u0430 \u0421\u042F, \u0432 \u0441\u043B\u0443\u0447\u0430\u0435 \u043F\u0440\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043F\u0440\u043E\u0446\u0435\u0434\u0443\u0440\u044B \u043A\u0443\u043F\u043B\u0438-\u043F\u0440\u043E\u0434\u0430\u0436\u0438, \u0441 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435\u043C \u043D\u0430\u043B\u0438\u0447\u043D\u044B\u0445 \u0434\u0435\u043D\u0435\u0433 \u0438\u043B\u0438 \u043F\u0440\u043E\u0446\u0435\u0434\u0443\u0440\u044B \u0438\u043F\u043E\u0442\u0435\u0447\u043D\u043E\u0439 \u0441\u0434\u0435\u043B\u043A\u0438" })] }));
2759
+ useEffect(() => {
2760
+ setSelectedRegion(getInitialValueSelectedRegion(regions));
2761
+ }, [regions]);
2762
+ useEffect(() => {
2763
+ if (selectedRegion) {
2764
+ fetchBranches(selectedRegion).then((result) => {
2765
+ setBranches(result);
2766
+ });
2767
+ }
2768
+ else {
2769
+ setBranches([]);
2770
+ }
2771
+ setSelectedBranch('');
2772
+ setSelectedCaseVolume('');
2773
+ setSelectedBoxSize('');
2774
+ }, [regions, selectedRegion]);
2775
+ const onSelectedBranch = (value) => {
2776
+ setSelectedBranch(value);
2777
+ setSelectedCaseVolume('');
2778
+ setSelectedBoxSize('');
2779
+ };
2780
+ const onSelectedCaseVolume = (value) => {
2781
+ setSelectedCaseVolume(value);
2782
+ setSelectedBoxSize('');
2783
+ };
2784
+ const branch = getBranch(branches, selectedBranch);
2785
+ const caseVolumes = getCaseVolumes(branch?.safeBoxCaseVolumes);
2786
+ const safeBoxCases = getCaseVolume(branch?.safeBoxCaseVolumes, selectedCaseVolume)?.safeBoxCases;
2787
+ const tariffs = getTariffs(safeBoxCases, selectedBoxSize);
2788
+ return (jsxs("div", { className: "flex justify-between align-top mb-6", children: [jsxs("div", { className: "flex-1 mr-9", children: [jsx(RegionsAndBranches, { regions: regions, selectedRegion: selectedRegion, onSelectedRegion: setSelectedRegion, branches: branches, selectedBranch: selectedBranch, onSelectedBranch: onSelectedBranch }), jsx(RentalPeriod, { days: days, setDays: setDays }), jsx(SafeBoxCases, { caseVolumes: caseVolumes, selectedCaseVolume: selectedCaseVolume, onSelectedCaseVolume: onSelectedCaseVolume, safeBoxCases: safeBoxCases, selectedBoxSize: selectedBoxSize, onSelectedBoxSize: setSelectedBoxSize }), jsx("span", { className: "text-secondary-text text-l-light", children: "\u0422\u0438\u043F \u0434\u043E\u0433\u043E\u0432\u043E\u0440\u0430" }), jsxs("div", { className: "flex justify-between items-center mt-5", children: [jsx(RenderRadioButtons, {}), jsx(Button, { text: "\u041E\u0444\u0438\u0441\u044B \u043D\u0430 \u043A\u0430\u0440\u0442\u0435", version: "primary" })] })] }), jsx(SafeDepositRentalTotal, { days: days, tariffs: tariffs })] }));
2789
+ });
2790
+ const getInitialValueSelectedRegion = (regions) => regions?.find((_) => _.name === 'Москва')?.code || '';
2791
+ const getBranch = (branches, selectedBranch) => branches.find((_) => _.branchCode === selectedBranch);
2792
+ const getCaseVolumes = (safeBoxCaseVolumes) => safeBoxCaseVolumes?.length ? safeBoxCaseVolumes?.filter((_) => _?.safeBoxCases?.length) : [];
2793
+ const getCaseVolume = (caseVolumes, selectedCaseVolume) => caseVolumes?.find((_) => _.volume === selectedCaseVolume);
2794
+ const getTariffs = (safeBoxCases, selectedBoxSize) => safeBoxCases?.find((_) => _.safeBoxCasesSize === selectedBoxSize)?.tariffs;
2795
+
2796
+ const REGIONS_URL = '/api/v1/admin/regions';
2797
+ function useGetRegions() {
2798
+ const { data } = useAsyncData(REGIONS_URL, fetchJSONUnsafe);
2799
+ return data || [];
2800
+ }
2801
+
2802
+ const SafeDepositRental = JSX(({ title, context, className = '', ...rest }) => {
2803
+ const regions = useGetRegions();
2804
+ return (jsxs(BlockWrapper, { context: context, className: `bg-white px-8 py-12 ${className}`, ...rest, children: [title ? (jsx(Heading, { title: title, headingType: "h3", as: "h2", className: "mb-2.5 text-center" })) : null, jsx(SafeDepositRentalForm, { regions: regions }), jsx("p", { className: "text-s-light text-secondary-text", children: "\u0410\u0440\u0435\u043D\u0434\u0430 \u0421\u042F, \u0432 \u0441\u043B\u0443\u0447\u0430\u0435 \u043F\u0440\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043F\u0440\u043E\u0446\u0435\u0434\u0443\u0440\u044B \u043A\u0443\u043F\u043B\u0438-\u043F\u0440\u043E\u0434\u0430\u0436\u0438, \u0441 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435\u043C \u043D\u0430\u043B\u0438\u0447\u043D\u044B\u0445 \u0434\u0435\u043D\u0435\u0433 \u0438\u043B\u0438 \u043F\u0440\u043E\u0446\u0435\u0434\u0443\u0440\u044B \u0438\u043F\u043E\u0442\u0435\u0447\u043D\u043E\u0439 \u0441\u0434\u0435\u043B\u043A\u0438" })] }));
2829
2805
  });
2830
2806
 
2831
2807
  const checkIsIconRenderable = (icon) => Boolean(icon?.icon || icon?.src);
@@ -3101,6 +3077,21 @@
3101
3077
  return (jsxs("div", { role: "table", children: [jsxs("div", { className: "relative", children: [children, jsx(TableArrowScrollControl, { ...tableArrowScrollControlProps })] }), isScrollAvailable ? (jsx("div", { className: "absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white" })) : null] }));
3102
3078
  });
3103
3079
 
3080
+ const renderErrorContent = (error) => {
3081
+ if (error?.errorContentType === 'Image' && error?.image) {
3082
+ return jsx(Img, { className: "mb-7", image: error.image });
3083
+ }
3084
+ if (error?.errorContentType === 'Code' && error.code) {
3085
+ return jsx("div", { className: "text-title-extra gradient-color-text", children: error.code });
3086
+ }
3087
+ return null;
3088
+ };
3089
+ const ErrorBlock = JSX(({ context, className = '', title, subtitle, error, button }) => {
3090
+ const { useRouter, handlerDecorator } = context;
3091
+ const router = useRouter();
3092
+ return (jsxs("section", { className: `flex flex-col justify-center items-center ${className}`, role: "listitem", children: [jsx("div", { className: "flex justify-center mb-7", children: renderErrorContent(error) }), title ? jsx(Heading, { headingType: "h1", className: "text-left mb-4", title: title }) : null, subtitle ? jsx("div", { className: "text-xl-light text-left mb-7", children: subtitle }) : null, button?.text ? (jsx(Button, { className: "py-4 px-9", version: button?.version, ...useLink({ router, handlerDecorator }, button), children: button.text })) : null] }));
3093
+ });
3094
+
3104
3095
  const Blocks = {
3105
3096
  Accordion,
3106
3097
  BenefitsBlock,
@@ -3135,6 +3126,8 @@
3135
3126
  BonusBenefitsBlock,
3136
3127
  SafeDepositRental,
3137
3128
  Tabs,
3129
+ ErrorBlock,
3130
+ OfficeServicesBlock,
3138
3131
  };
3139
3132
 
3140
3133
  const api = LikeAPI();